ReadBarcode (Invalid image type) Capture images with a prosilica camra

Hello everyone,
I'm a new user of Labview and making an application that reads barcodes via Prosilica camera, I made a VI, but it gives me the same error again and again.
I searched the site and found something about ROIToMask, but couldn't use it.
Can you please give me tips on how to do it.
I'm uploading the VI file.
I know that this might be an easy question, but I spend alot of time and at last I deceided to ask you guys.
Thank you
Attachments:
Barcode reader.vi ‏86 KB

Thanks for your reply, I think that you are right, what I did was I changed the camera settings, so now it reads not as 16 bit, but as 8 bit.
But now I'm facing another problem with it, when the camera records it gives a message that says :
Not a linear barcode
unfortunately I'm not at the lab at this moment so I can't give you the number of the message, but it says as I mentioned. If I use the barcode example of the LabView it works ofcourse, but I justed changed the barcode example of Labview so that it shouldn't read from a file, but it should read via camera, but the Not a linear barcode comes!!!!!!
The VI file that I uploaded doesn't have any problems you are right but could you please give me some advice on how should I make this VI.
Thanks again
Mike

Similar Messages

  • Strange behavior with invalid image type error

    Hi,
    I'm currently developing a stereo vision application. I started with the StereoVisionExample provided by NI but want to use my own camera drivers.
    I created the GetImage vi (see attachment) that accepts the camera handle and an allocated image, reads the acquired image from the camera, transforms the image array to a color image and returns it. I tested it with the TestVI (attached) and it works perfectly well.
    Now I wanted to integrate it as image source for the given example application and replace the ExpressVIs but this doesn't work. I get a 1074396080 invalid image type error as soon as the GetImage SubVI is called. The only possibility to run it without an error is to set the image type to RGB64 but in this case the image is not shown correctly. I get the error no matter if I choose Grayscale, HSL or RGB32 for the initial image creation. The strange is that with the TestVI everything works perfect, even with HSL that I'm using to get the grayscale image or RGB32. Basically I didn't do anything except copying the VI from Test to StereoExample. It's driving me crazy that the GetImage VI works perfect in the one but not in the other VI with the same data! What's wrong with that?
    I appreciate your help.
    Attachments:
    getImage.jpg ‏47 KB
    stereoVision example.jpg ‏92 KB
    TestVI.jpg ‏44 KB

    Hello NicoSch!
    In order to reproduce the error, I need the image data generated by the image driver you are using. Please wire the 2D array with the image data to a control on the frontpanel and run the VI. With the data now displayed, right-click the control and choose "Data Operations > Make Current Value Default" to save the data in the control. Please attach the VI to a new forum post.
    Additionally, can you describe the type of image acquired by the camera? Is the 2D array a 32bit RGB image? What camera and LabVIEW version are you using?
    Regards,
      Georg

  • I get an 'Invalid Image Type' error when using the Locate Features. (Evaluatio​n version)

    I'm using the Evaluation Version of Vision Builder. I Simulate Acquisition using my own image (jpg), which loads fine. However, when I try to use any of the Inspection Steps features, other than Enhance Images, I get an "Invalid Image Type" error.

    Hello,
    Vision Builder functions usually work with a certain image type. For example, all the functions listed under Binary (in the menubar) will only work with binary images. Likewise, color functions will work for color images and grayscale will work for grayscale images.
    You can convert a color image into a grayscale by extracting a color plane and a grayscale image can be converted to binary using the threshold function.
    Hope this helps!
    Regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • How to capturing scrolling images with no java controls?

    Can somebody help me? I am trying to capture the image of the browser, using the followed code to do it, but I can not take it scrolling the screen. I do not use any control of java in the browser. Does anybody have an idea?
    Robot r = new Robot();
    image1 = r.createScreenCapture(clippedScreen);
    File file = new File("c:\\Csa\\3.9\\Fimages\\"+counter+".jpg");
    javax.imageio.ImageIO.createImageOutputStream(file);
    ImageIO.write(image1,"jpg",file);
    //Scroll the screen
    scrollTheScreen ();
    //Takes scrolled area
    image2 = r.createScreenCapture(new Rectangle(0,666,1280,80));
    File file2 = new File("c:\\Csa\\3.9\\Fimages\\"+counter+1+".jpg");
    javax.imageio.ImageIO.createImageOutputStream(file2);
    ImageIO.write(image2,"jpg",file2);
    As you can see I take two parts of the screen but I am having troubles adding the images, I do not know if there is an easier way to do this.
    Thank you in advance.

    Thanks to anybody, but i found the way on how to capture the image.
    1. Take a snapshot of the screen.
    2. Scroll the screen pushing the button down.
    3. Take the snapshot of the scrolled part of the screen.
    4. Scroll the screen pushing the button down.
    5. Take the snapshot of the scrolled part of the screen.
    6. Compare the 2 last images, if they are equals, stop scrolling, else scroll again.
    7. Join the images first, second and third images, to get a single one corresponding to the hole info of the browser.
    8. Save the resulting image.
    The thing in this problem is to manage the images as RGB components for that you must use the getPixel(col, row, color); method to manipulate the components in matrix and added to a bigger matrix where you join the complete components. Be sure that you manage the 3D matrix correctly, [width of the screen] [height of the screen] [RGB components], i.e.
    * This saves just the red component, the green and blue must be saved too.
    public int[][] imreadRed(BufferedImage bi)
              Raster r = null;     // * Raster
              int [][] image;     // * Image array
              int imageWidth = bi.getWidth();     // * Image Width
              int imageHeight = bi.getHeight();     // * Image Height
              int[] color = new int[3];     // * array to colors RGB (r -> 0, g -> 1, b -> 2)
              r = bi.getData();
              image = new int[imageHeight][imageWidth];
              for(int row = 0; row < imageHeight; row++)
                   for(int col = 0; col < imageWidth; col++)
                        r.getPixel(col, row, color);
                        image[row][col] = color[0];          //Saves the red color to the array image on the first coordinate
              return image;     //Return the array with the red component
         }* This merge the matrix into a bigger one.
    public int [][] mergeMatrix (int [][] mat1, int [][] mat2){
             int rowsMat1 = (mat1.length-53), colsMat1 = mat1[0].length,     //mat1.length da los renglones de la matriz height  
             rowsMat2 = mat2.length, colsMat2 = mat2[0].length;          //mat1[0].length da las columnas de la matriz width
             int [][] addedMatrix = new int [rowsMat1+rowsMat2][colsMat1];
             for (int row = 0; row < rowsMat1; row++) {
                  for (int col = 0; col < colsMat1; col++) {
                       addedMatrix [row] [col] = mat1 [row] [col];
              for (int row=0; row < rowsMat2; row++) {
                   for (int col = 0; col < colsMat2; col++) {
                        addedMatrix [rowsMat1+row] [col]  = mat2 [row] [col];
             return addedMatrix;
        }* This convert the matrix into an image.
    public BufferedImage imwriteComponents (int [][] arrRedImg, int [][] arrGreenImg, int [][] arrBlueImg) {
              int arrayWidth = arrRedImg[0].length;     // * Image Width
              int arrayHeight = arrRedImg.length;     // * Image Height
              BufferedImage completeImage = new BufferedImage(arrayWidth, arrayHeight, BufferedImage.TYPE_INT_RGB);     // Create a BufferedImage with RGB pixels
              WritableRaster wRaster = completeImage.getRaster();     // Create a raster so we can access the BufferedImage pixels
              int [] color = new int [3];     //color variable to save all the components
              //join the 3 matrix in one color type
              for(int row = 0; row < arrayHeight; row++)
                   for(int col = 0; col < arrayWidth; col++) {
                        color [0] = arrRedImg [row][col];
                        color [1] = arrGreenImg [row][col];
                        color [2] = arrBlueImg [row][col];
                        wRaster.setPixel(col, row, color);
              return completeImage;     //Return the Buffered image with the red array component
        }That is a solution that I found to this problem, if someone has an easy way to do it please tell us.
    Thank you.

  • Imaq invalid image type

    Hi,
    i try to analyse a video image. it is an image typ 32 bit rgb. In the sub vi I try to count the pixel with a red value greater than the green and the blue value. Therefore i need to split the colorplanes.
    After that I write the values in an arry to count them.
    Sometimes the Error "Invalid image typ" appears. I´m not sure why this error sometimes appeared and sometimes not.
    I hope someone can help me to find the solution.
    Attachments:
    RED Pixel.vi ‏45 KB

    Hello,
    does the error happen only, when your ROI is passed as an empty cluster? So, if you have an active ROI, there is no error right?
    Make sure your ROI is not empty, or alternatively you could use "IMAQ SetImageSize" after allocating the memory for the mask (set the size to the same size as the input rgb image with "IMAQ GetImageSize".
    Does this help?
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

  • Creating Windows 8.1 master image with MDT 2013,cannot capture .WIM

    I am having an issue with creating a master image with Windows 8.1 and MDT 2013.  
    I have followed extensive tutorials on how to create a master image using Microsoft Deployment Toolkit. my goal is to have a fully configured windows 8.1 image which I can deploy through Windows Deployment Services. I have been relatively successful thus far,
    except for one issue I have run into, which is successfully capturing this image as a .WIM.
    I have successfully created a task sequence and the task sequence is able to run all the way through until the final step. Essentially the task sequence is supposed to install Windows and Office, then suspend the task sequence to allow me to make customisations
    to the start screen and desktop background, and I simply click resume task sequence, and the task sequence should sysprep reboot and capture the machine image as a .WIM file.
    the task sequence is able to sysprep the machine, but upon rebooting it boots into out of box experience, and does not create a wim file. I receive an error saying: "cannot find script file C:\ltibootstrap.Vbs" after the machine completes OOBE 
    I am using Windows Server 2012 r2, creating my Master machine image using hyper-v, and my master image is running Windows 8.1.
    Any help would be greatly appreciated.

    I'm not sure about the sequence of steps here. Try taking your captured.wim file and deploying it using MDT again, or at least to another machine. MDT sometimes leaves extra files around on the captured machine, so simply rebooting it may not get a accurate
    test results.
    IF you are getting the ltibootstrap.vbs it is most likely because there is a stray unattend.xml file somewhere in your image that is looking for this file. Crack open your Wim file and search for any unattend.xml files.
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com

  • LabWindows/CVI and IMAQ - Invalid Image Type when saving bitmap

    I create and image, grab it, then display it, but when I go to save it using imaqWriteBMPFile, I get an error that maps to Invalid Image Type, so I use imaqCast to cast it to an IMAQ_IMAGE_U8 type (which is what the orignal image was created as), then it works, except that my image has changed, that looks like the contrast or something has changed. Any suggestions?
    Attachments:
    image.bmp ‏302 KB

    What kind of camera & IMAQ board are you using? I have seen similar problems when a 12 bit camera is used. The image is acquired as a 16 bit image, and if you just convert it to an 8 bit image, it ends up looking like the one you attached. To correctly convert to 8 bits, you need to shift the appropriate number of bits during the conversion. For a 12 bit camera, that would be 4 bits.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • IMAQ resample invalid image type

    Hi,
    I am rewriting an old non-versatile version of a VI. I don't have much experience but I have the old VI as sort of a template for what I need to do. It's weird but although I try to do things exactly the same way, they don't work.
    I acquire a high resolution image from the camera (IMAQ Acquire) which is too big (1280x1024). I want to resample (IMAQ Resample) it to 256x320px.
    I get the error message: Error -1074396080 occurred at IMAQ Resample Invalid image type.
    The probe I put in to read the Image Src shows the image correctly and tells me it is an unsigned 16 bit image. This should be a valid image type, right?
    Dennis
    P.S. I use LabView 2009
    Solved!
    Go to Solution.

    Deneck wrote:
    I get the error message: Error -1074396080 occurred at IMAQ Resample Invalid image type.
    The probe I put in to read the Image Src shows the image correctly and tells me it is an unsigned 16 bit image. This should be a valid image type, right?
    No, not right. IMAQ Resample doesn't support U16 type (at least up to VDM2011). Refer to Help.
    Convert your image to I16 (if possible) prior to resampling.
    Andrey.

  • Capture image with webcam: how to change image orientation

    Hi all,
    I have taken the code shown in thread http://forum.java.sun.com/thread.jspa?threadID=570463&tstart=0, and it works ok (many thanks for it).
    However, all webcam resolutions are in "landscape" mode (e.g. 320 x 240), but I would like to capture a "portrait" image (e.g. in 240 x 320).
    Do you know any easy way to do it (but not physically tilting the camera, so that the video in the screen is shown in its correct orientation)?
    Best regards.

    Hi Owen,
    in my current application I don't need right now to use any large image, so that I have decided to implement a "simple" solution as the first one that you appointed: to use a transparent rectangle above the image, and then crop the saved image withing the limits of this rectangle.
    In order to do it, I have modified your code so that the panel (visualContainer) where to show the image is using an OverlayLayout format:
    <address>visualContainer = new JPanel();</address>
    <address>OverlayLayout overlay = new OverlayLayout(visualContainer);</address>
    <address>visualContainer.setLayout(overlay);</address>
    I have added one class to create the transparent rectangle, using a code like this:
    class TopPanel extends JPanel
    Point loc;
    int width, height;
    public TopPanel()
    setOpaque(false);
    width = 50;
    height = 50;
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    if(loc == null)
    init();
    g2.setPaint(Color.blue);
    g2.drawRect(loc.x, loc.y, width, height);
    private void init()
    int w = getWidth();
    int h = getHeight();
    loc = new Point();
    loc.x = (w - width)/2;
    loc.y = (h - height)/2;
    In order to show the rectangle, what I have done is to add a TopPanel() to visualContainer just before adding the Player visualComponent.
    However, by doint in this way, the rectangle is not shown, but only the webcam image. I don't know if I'm doing something wrong, so any help on this issue is welcome.
    Best regards,
    izk

  • Capture a part of an image with the mouse ?

    Hi,
    I am really stuck with it ! I would like to capture a part of an image with the mouse. The selection can be a rectangle or an ellipse. For a rectangle a could use PixelGrabber but for an ellipse ?
    Thanks a lot !

    thanks a lot !

  • Capture image with .wim and unattend.xml?

    Hi,
    We captured an image with the default wim of windows 7 + an unattend.xml. Now it seems this unattend.xml was not correctly applied (media center was removed but is still there, some components were installed
    but are not etc). Question: when capturing an image, you CAN use a default .wim right? Or should you use “apply operating system from original installation source” to have it applied correctly?
    Our problem is that our original task sequence had to many Windows updates and crashed. That’s why we are using offline updates which we include in the capture task sequence.
    If we would need to use the "apply operating system from original ..." then we'd need to:
    1.capture without updates
    2.import this wim into sccm
    3.offline update this wim
    4.use this for capture WITH updates
    Please advise. J.
    Jan Hoedt

    Have you tried making a package of your unattended.xml and pointing to it in your Apply Operating system step?
    If I remember correctly SCCM will make it's own unattended.xml even if one exists in the wim file, using the package of the unattended.xml that you have already created will make it use that one. Looks something like this in the task sequence with the highlighted
    yellow parts filled out by your package of the unattended.xml:

  • How to compare any type of image with any Palette ?

    How can I compare any image with any Palette file (ex. sample.pal file) ?
    If that image don't satisified selected Palette file then show me exception or any kind of message.
    Plz reply me with proper guidence or any hints.
    Thanks
    Harshal

    How can I compare any image with any Palette file (ex. sample.pal file) ?
    If that image don't satisified selected Palette file then show me exception or any kind of message.
    Plz reply me with proper guidence or any hints.
    Thanks
    Harshal

  • IMAQ Low pass filter failed with invalid image border.

    Hi Expert,
    I try to use imaqLowPass function. I expect  the input image could be processed by low pass filter.
    But this is a run-time error showed "Invalid image border".
    Can somebody tell me what's going on?
    Solved!
    Go to Solution.

    Problem resolved. 
    I add a border to the image. 
    Needs to take care the border size and filter size.

  • Generate image with CFIMAGE - but need to use img tag to serve the content

    I create a new image with cfimage, that already works without
    any problems.
    But instead of using the action="writetobrowser" I need to be
    able to use the script inside a img tag:
    Example: <img
    src="myscript.cfm?somedata=iwanttheimagetocreate>
    I found one webpage that deals with that problem (
    http://www.webdevelopernews.com/2007/09/14/serving-up-cfimages-via-image-tags/)
    but the image served to the browser, when using the code below, is
    of a very low quality and another point is that you can't serve
    .gif's to the browser.
    <cfcontent type="image/jpg"
    variable="#ImageGetBlob(backgroundimage)#">
    Any suggestions/solutions?
    Thanks,
    Phil

    In that entry Raymond mentions:
    "The WriteToBrowser action actually generates HTML that points
    to a ‘magic’ URL to serve the image.". ie <img
    src="/CFFileServlet/_cf_image/_cfimg-12345036853711072.PNG" alt=""
    />
    Perhaps you could create a function that captures the
    generated html by using <cfsavecontent>.
    <cfsavecontent variable="imageTagHTML">
    <cfimage action="writeToBrower" ..>
    </cfsavecontent>
    Then uses a regular expression to extract and return the url
    portion only. ie
    "/CFFileServlet/_cf_image/_cfimg-12345036853711072.PNG"
    <cfset ExtractedURLHere = SomeFunction(arguments...)>
    <cfoutput><img
    src="#ExtractedURLHere#"></cfoutput>
    Though you could also use the entire html string directly
    <cfoutput>#imageTagHTML#</cfoutput>

  • Deploying Custom Image with Answer File

    Hi everyone!
    I'm in the process of making a custom image for ~25 computers, using WAIK (no network so no MDT, WDS...). I followed Technet's "Step-by-Step: Basic Windows 7 Deployment for IT Professionals", and installed from original Win7 Ultimate Retail
    Media, with an answer file. Finally I customized that install and now have a properly set-up install, in audit mode and waiting to be generalized.
    I'd like to deploy this custom install with an answer file/configuration set, in order to auto-install some drivers and hardware-specific apps, answer typical questions, etc...
    But I must admit, I'm a bit unclear as to how to proceed from there. So I'm going to state how I understand it, and would love you to correct me where I'm wrong!
    On reference computer, run syprep /generalize /oobe /shutdown
    Boot to WinPE, capture image with ImageX
    Open the resulting custom.wim in WSIM, generate a catalog file
    Make Answer File + Configuration Set, copy them to the root of an empty UFD
    Replace the Original Win7 Media's install.wim with my custom.wim, make bootable UFD
    Deploy to other computers with the 2 UFD's
    Does that sound right to you? Am I missing something? Also, should I be running sysprep with a /unattend:xxx.xml switch (not sure how that works)?
    Bonus Question:
    I'd like to use the Answer File + Configuration Set to perform some silent installs via script. Could you point me to a relevant Technet (or 3rd party) resource for that?
    Thank you very much for reading ^^

    If you are doing the "replace install.wim" option, then you are installing using Setup. In this scenario, Setup will ignore the answer file specified in the image with the /unattend switch with Sysprep. So it would be unnecessary to prepare the
    image with that switch.
    Awesome! Thanks very much for clarifying the use of the /unattend switch with sysprep =)
    Anyways, I'd rather use an autounattend.xml in another UFD, which I can replace for any different hardware type, partition layout, etc...
    Also, the "replace install.wim" method is the only one I know. Are there others I should be aware of?
    Thanks!
    Hi,
    yes, the basic process is like what you said.
    Here is a guide which contains the video and text to tech you how to do the deployment.
    Deploy Windows 7 The Easy Way: Using WDS, MDT and AIK - Step-By-Step Video - See more at:
    http://blogs.technet.com/b/danstolts/archive/2010/03/11/deploy-windows-7-the-easy-way-using-wds-mdt-and-aik-step-by-step-video.aspx
    You could refer to this article. If you have any question about it, feel free to contact us
    Thank you very much for confirming, and for this useful resource =)
    I'll definitely give it a read once I get a proper domain up and running at the office.

Maybe you are looking for

  • IPhoto & iMovie update not available with this Apple ID

    Hi everyone - I'm at a loss as to how to fix this issue... I'm trying to update iPhoto and iMovie from the Mac App Store but I get the following error message: Update unavailable with this Apple ID: This update is not available for this Apple ID eith

  • After a recover database, how can I find the time of the last transaction?

    After doing a restore and recovery. Is there something in the data dictionary that I can query to find the time of the last applied transaction that took place during the recover process? restore database ; recover database ; For example, if I restor

  • Basic System Requirements for running 3rd party samples

    Here's a VSL instruments conundrum. From what I can see, I've got approximately double the minimum system requirements spelled out by VSL for running Vienna Instruments II. But my system is crashing immediately with only one instrument plugged in. He

  • AE seems to work, no config errors but it does not work

    I have configured an AE to work as a network extender (implemented with an AEX that is properly working). The Airport Utility configures it correctly and I have the AE with the green LED lighting. When I connect my Macbook to ethernet through the AE

  • Multiple Buttons help needed

    Hey everyone, I am just beginning to learn the basics of creating web sites in flash. I have been following a tutorial and have it done pretty well, but they only cover one main button, and I am at the point where I need several more, but I am doing