IMAQ Vision - Writing Image Files: File Format

Hi,
I want to save some images in LabView 5.1.1 - IMAQ Vision 2.2.1 acquired by
a camera. Several file formats are supported:
BMP, JPEG, PNG and TIFF
For me the PNG format seems to the most attractive one as it provides
lossy-less compression and platform independentness. But, in the manual
there is a comment which I don't understand: It says that the PNG format is
not recommend for precise gauging or inspection measurements - and that is
exactly what I want to do.
I always thought that once an image file is loaded into LabView there is no
difference regarding to the file format the images were saved in. Can anyone
explain me, what the problem of the PNG format is? Which format can you
recommend for preci
se gauging instead (BMP?)?
Thanks,
Gerd Simons

one correction:
I use IMAQ Vision 5.0 and NI-IMAQ 2.2.1.
Gerd Simons
"Gerd Simons" wrote in message
news:[email protected]..
> Hi,
>
> I want to save some images in LabView 5.1.1 - IMAQ Vision 2.2.1 acquired
by
> a camera. Several file formats are supported:
>
> BMP, JPEG, PNG and TIFF
>
> For me the PNG format seems to the most attractive one as it provides
> lossy-less compression and platform independentness. But, in the manual
> there is a comment which I don't understand: It says that the PNG format
is
> not recommend for precise gauging or inspection measurements - and that is
> exactly what I want to do.
> I always thought that once an image file is loaded into LabView there is
no
> difference regarding to the fil
e format the images were saved in. Can
anyone
> explain me, what the problem of the PNG format is? Which format can you
> recommend for precise gauging instead (BMP?)?
>
>
> Thanks,
> Gerd Simons
>
>

Similar Messages

  • I really want to get IMAQ Case Image and IMAQ Arry to Image.vi files

    Hello!
    Although I already installed LabVIEW8.2 and NI-IMAQ, I do not have  IMAQ Case Image and IMAQ Arry to Image.vi files.
    To use infrared camera, I need them.
    I really want to get IMAQ Case Image and IMAQ Arry to Image.vi files.
    How can I get these files?
    Please, let me know the methods.
    Sincerely!
    Solved!
    Go to Solution.

    Please stick to a single thread for same type of questions. continue in your original post here.

  • Error -1074396077 (IMAQ Vision: Incompatible image type) after running IMAQ Mask

    I am attempting to process color picture of pellet. I want to exclude any particle that touches the edges of the color images. I created mask from original image and used this mask on the original color image to retain only the color particles that don't touch the boundary. The error occured  when I ran the IMAQ Mask. The error message is “Error -1074396077 (IMAQ Vision:  Incompatible image type)”. How can I fix it ?
    I have picture and program as attached.
    Attachments:
    color sorter 01f.vi ‏87 KB
    Red01a1.jpg ‏30 KB

    Hi XuanThuy,
    The IMAQ Cast function is part of the Vision Development Module (VDM), under the Image Management Palette, as indicated by this document: http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_cast_image/. If you can't locate it and you indeed have the VDM, there may be an issue with the installation of this module. A similar issue has been encountered and resolved in this forum post: http://forums.ni.com/t5/Machine-Vision/can-t-find-IMAQ-cast-image-vi/td-p/340157. What version of the vision software are you using?

  • Error-1074396074 IMAQ vision: Incompatible imag size

    Hi everybody,
    I need your help because I have a big problem and I don`t understand why...... But I hope it is easy to resolve.
    I searched but found nothing.
    I have this kind of error
    But I don`t understand because I have two software, the first works very well, So I just copy this code to put in the second software, just to record one video.
    Everything it`s the same but with the second there is this error message.
    this software works very, whitout problem.
    And this software, you cansee it is the same code, doesn`t work
    I can`t understand why really..... I try to change the format of the imaq, or use IMAQ cast imag, but whitout results.....
    If someone can help me
    Thanks a lot in advance

    Hi!
    It is strange that if you used the same code, one time it works and another time it doesnt. To be able to see good if there is an error it would be great if you could submit your VI. But first try to take a look at this KB: http://digital.ni.com/public.nsf/allkb/4FAC615B62919BA5C1256ED00046997A
    This explains the error and I hope you will understand which steps to take as there are also other links inside this KB for more information. So please verify the KB mentioned above and the settings you are doing in your code. 
    Please let me know how the progress is going. 
    Collin de Wit
    National Instruments
    Applications Engineering

  • Writing a Compressed AVI File in NI LabWindows/CVI with the IMAQ Vision Acquisition

    I'm still facing some problems when I try to save pictures from a GigE Vision camera into a compressed avi-file in a LabWindows/CVI application on Windows7.
    The task is to grab images from the camera with 30 fps to monitor a process, evaluate the grabbed pictures to find certain characteristics of the monitored process and save them in an avi-file to have the possibility to load and evaluate them once again Offline if necessary.
    My questions: which compression filters can I get with the NI-Imaq Vision Acquisition and Vision Development Runtime 2012 SP1? Is a mpeg4 codec available to compress quickly and effective? Can I use a third party codec or only the ones delivered with NI-Vision?
    I posted the problem two times already, but there is little response up to now. Thanks

    The encoding algorithm, or codec, that's used for compression needs to present on your system. When I had done some research on this sometime back, I found that if your custom codec could align with the DirectShow architecture, then your codec would work with IMAQ AVI functions.The codecs that are available may vary from system to system, depending on what software is currently installed. Be sure to check out this article:
    Writing a Compressed AVI File with the IMAQ Vision Acquisition Software
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • How to load .raw files within IMAQ Vision?

    Does IMAQ Vision support .raw format? How do I load an .raw image into an IMAQ Viewr?

    IMAQ Vision supports the following standard image formats; BMP, TIFF, JPEG, PNG, and AIPD. Non-standard or other images can be read with IMAQ Vision and converted to the IMAQ image data type. In LabVIEW, the IMAQ ReadFile.vi has a set of options to be used for non-standard or other image types. Depending on how your .raw file is stored, you might have to do some other types manipulation before you will be able to read the file in. I would start with the option in the ReadFile command. Once the image has been successfully read into Vision, you can attach it to an IMAQ Viewer just like other images.
    Hope this helps.
    Jack Arnold
    Application Engineer
    National Instruments

  • IMAQ ClipboardToImage IMAQ Vision does not support the file type you specified.

    Hi.
    I have been trying out the inventeering INVENTvisionIMAQexample.vi. But i always encoutered
    an error in the INVENTvisionVFWcopy.vi of "IMAQ ClipboardToImage IMAQ Vision
    does not support the file type you specified." And the video window does not
    appear full size with real-time capture image. Does anyone encountered this problem as well? Please enlightened me. Thank you.

    What error it is throwing ? if you could attach the vi then it will be easy to find out the problem

  • Can load image from file using LabVIEW and display on IMAQ graph?

    I dont have IMAQ Vision for LabVIEW on my computer. Is it possible to load image file and display on an IMAQ graph?
    Thanks!

    Hey werwr,
    In response to: "I dont have IMAQ Vision for LabVIEW on my computer. Is it possible to load image file and display on an IMAQ graph?"
    As of right now, in order to read an image from file, you actually do need the IMAQ Vision software. The IMAQ driver without the Vision VI's will allow you to collect images from a framegrabber, and it will allow you to save those images to file. But the function that allows you to read an image from file does require the Vision VI's. Once you have the VI to read images from a file, you will be able to display the image on an IMAQ "Graph" or otherwise known as an Image Display.
    I hope this helps. Please let me know if you have any further questions.
    Thanks,
    DJ
    Applications Engineer
    National Instruments

  • Writing image to wbmp file in java

    I am having problem writing images to wbmp files by java using the javax.imageio.* class. Though wbmp is present in the list given by writer format names.
    String[] writers = ImageIO.getWriterFormatNames();
    System.out.println("Can write to -");
    for ( String s : writers)
                System.out.println(s);
            }but my code to convert an image format is not working for wbmp files
    File in=new File("star.png");
    File out=new File("def.wbmp");
    File out1=new File("def.jpg");
    BufferedImage image;
    try {
         image = ImageIO.read(in);
         ImageIO.write(image,"wbmp",out);
         ImageIO.write(image,"jpg",out1);
    } catch (IOException e) {}the jpeg file is created successfully but the wbmp file remains empty. can you tell me where the problem is. Or is there some alternative method for image conversion.

    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class WirelessPrep {
        private JPanel getContent(BufferedImage image) {
            JPanel panel = new JPanel(new GridLayout(1,0));
            panel.add(wrap(image));
            panel.add(wrap(convert(image)));
            return panel;
        private BufferedImage convert(BufferedImage image) {
            // Convert to BufferedImage.TYPE_BYTE_BINARY
            BufferedImage binary = convert(image, BufferedImage.TYPE_BYTE_BINARY);
            BufferedImage wbmp = null;
            File file = new File("wirelessPrep.wbmp");
            try {
                ImageIO.write(binary, "wbmp", file);
                wbmp = ImageIO.read(file);
            } catch(IOException e) {
                System.out.println("io error: " + e.getMessage());
            return wbmp;
        private BufferedImage convert(BufferedImage src, int type) {
            int w = src.getWidth();
            int h = src.getHeight();
            BufferedImage dst = new BufferedImage(w, h, type);
            Graphics2D g2 = dst.createGraphics();
            g2.drawImage(src, 0, 0, null);
            g2.dispose();
            return dst;
        private JLabel wrap(BufferedImage image) {
            ImageIcon icon = new ImageIcon(image);
            JLabel label = new JLabel(icon, JLabel.CENTER);
            return label;
        public static void main(String[] args) throws IOException {
            String path = "images/bison.jpg";
            BufferedImage image = ImageIO.read(new File(path));
            JPanel panel = new WirelessPrep().getContent(image);
            JOptionPane.showMessageDialog(null, panel, "", -1);
    }

  • Problem writing image(Blob) to file

    Hi ,
    I'm trying to write image to file. The Image(26KB) is stored in database as BLOB. I have to change this to CLOB because when I try to write to file its writing all junk data. So I converted BLOB to CLOB then I try to write its giving me error.
    ORA-21560 :argument string is null, invalid, or out of range
    Cause: The argument is expecting a non-null, valid value but the argument value passed in is null, invalid, or out of range. Examples include when the LOB/FILE positional or size argument has a value outside the range 1 through (4GB - 1), or when an invalid open mode is used to open a file, etc.
    Action: Check your program and correct the caller of the routine to not pass a null, invalid or out-of-range argument value.
    The size of IMAGE after coverting to CLOB is 21102 bytes which is between the range.
    Here is how my code looks like:
    DECLARE
    f UTL_FILE.file_type;
    l_blob_len INTEGER;
    buffer VARCHAR2 (32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER (38);
    l_blob BLOB;
    l_clob CLOB := 'x';
    l_dest_offsset INTEGER := 1;
    l_src_offsset INTEGER := 1;
    l_lang_context INTEGER := DBMS_LOB.default_lang_ctx;
    l_warning INTEGER;
    BEGIN
    SELECT blobdata
    INTO l_blob
    FROM lob_table ip
    WHERE ip.id = 2;
    DBMS_LOB.converttoclob (dest_lob => l_clob,
    src_blob => l_blob,
    amount => DBMS_LOB.lobmaxsize,
    dest_offset => l_dest_offsset,
    src_offset => l_src_offsset,
    blob_csid => DBMS_LOB.default_csid,
    lang_context => l_lang_context,
    warning => l_warning);
    amount := buffer_size;
    offset := 1;
    f := UTL_FILE.fopen ('IN_FILE_LOC', 'something.doc', 'w');
    WHILE amount >= buffer_size
    LOOP
    DBMS_OUTPUT.put_line ('buffer_size');
    DBMS_LOB.READ (l_clob,
    amount,
    offset,
    buffer);
    UTL_FILE.PUT (f, buffer);
    UTL_FILE.FFLUSH (f);
    END LOOP;
    UTL_FILE.fclose (f);
    END;
    Please tell me what did I do wrong.

    Try this posts
    http://www.oracle-base.com/articles/9i/ExportBlob9i.php
    http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96591/adl06faq.htm

  • IMAQ Vision AVI create - file access denied error

    Hello:
    I am getting some really strange behavior with the IMAQ Vision AVI create function.  I am seeing the following error with the following file name or pretty much any other file name I try.  I did try to hard code the same file path name, and one time it worked, but another time it did not.  Anyone seen this error before?
    I will cross-post in the Vision forum also.
    Thanks,
    Don
    Message Edited by DonRoth on 07-28-2008 11:27 AM
    Attachments:
    1074395992.png ‏7 KB

    Here is the simple version of the code.  I have even gotten out of LabVIEW and then come back in and still could not save to AVI (even if deleting the old file of same name) so not sure what is going on. The error occurs right on the error output of Create AVI.vi...Don
    Message Edited by DonRoth on 07-28-2008 01:33 PM
    Attachments:
    save_images_to_avi.png ‏16 KB
    Same_Image_Series.llb ‏117 KB

  • How do I convert an IMAQ image buffer into an IMAQ Vision 'Image'?

    Using NI IMAQ and IMAQ Vision with LabWindows/CVI 6.0...
    I have some acquisition code that uses IMAQ img functions to set up a
    triggered image acquisition and stores the image into an 1D unsigned char
    array buffer.
    I would now like to add code that uses the IMAQ Vision functions. The IMAQ
    Vision function use an Image data type, which from what I can glean from the
    ..h files, is a structure.
    Is it possible to convert the 1D unsigned char array image buffer to an
    Image? How would I do this?
    An inefficiant brute-force way would be to write the image to a BMP file
    from IMAQ using imgSessionSaveBufferEx, then read the same file back in
    using IMAQ Vision imaqReadVisionFile. I am hoping there is a more elegant
    way to perform the conversion in memory without needing to write disk files.
    Thank you,
    Robert Rafuse
    Etec, Inc.
    tel: (978)531-5025
    e-mail: [email protected]
    web: http://www.etec-inc.com

    Bob Rafuse wrote:
    > Is it possible to convert the 1D unsigned char array image buffer to
    > an Image? How would I do this?
    Never mind. I found:
    http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3F11556A4E034080020E74861&p_node=DZ52490&p_submitted=N&p_rank=&p_answer=&p_source=External
    which indicates that the img functions actually return a 2D array, so I can
    use imaqArraytoImage after all.
    My bad.
    Bob

  • Why I can't subtract two images in imaq vision builder?

    Hi,
    I have many times tried but failed to get the objects in a image by subtraction with another image which is background, in imaq vision builder(ver. 6.0). I totally can't use the "operators" command under "greyscale" to subtract the two images becauee all commands under the "greyscale" are always unactivated after two images have been stored in 2 idfferent buffers. I really don't know why and this vision builder is so difficult to use, unbelievable! I followed the instructions in its Help and it's quite simple but I totally failed to make this operation!
    Two samples of images have been attached and maybe it's very ease for you to filter out objects(fibers) by subtraction each other. Show me your scrip
    t if you can. It's urgent to me.
    Or the idea of the way I thought for filtering the objects is wrong? Point out please if you know.
    Thanks and Merry Christmas and Happy New year!!
    Swedlin
    Attachments:
    10Img0.jpg ‏27 KB
    123Img0.jpg ‏25 KB

    Okay, this is not quite as straightforward as it could be, but you can do image subtraction in Vision Builder. The basic idea is as follows:
    - select first object image and copy it to buffer 1
    - select "image >> get new image" and load your background image from a file.
    - put this in buffer 2
    - retrieve object image from buffer 1
    - perform subtraction. Even though these images appear to be greyscale, they are actually saved as 24-bit RGB images, so you need to use the color operators instead. Vision Builder will only allow you to select steps that are valid for the image you have loaded. You could extract the luminance plane from all of your images to work with 8-bit images if you like.
    I have attached below a background image, several object i
    mages, my script, and the results of batch processing. You will need to edit the "get new image" step with the correct path to the background image on your machine.
    Bruce is right though. This is a bit easier in LabVIEW.
    Regards,
    Brent R.
    Applications Engineer
    National Instruments

  • Encore cs4 creates invalid disc image (iso file)

    I have a video I edit in premiere cs4, exported an .mpg file that I import into encore to create a DVD. This works mostly fine (I have to delete the .xmp* file before importing to encore).
    Today I edited the video, re-encoded the mpg file using quality 5 and 2 pass vbr, and added a slide show (about 6 photos) to the encore project. It also builds fine to a disc image (iso file). But when I try to burn the iso file using windows 7, it tells me the iso image is invalid. I tried imgburn and got an  error message like this:
    session 1 track 1 MODE1 .... 2054
    dvd format: MODE1 .... 2048
    If I ask imgburn to continue it then says something about CSS and encryption, which I don't use, so I assume the iso file is too messed up.
    I burned a DVD5 directly from encore, and it works in a dvd player.
    Any idea why this invalid iso happens and whether there is a work-around?
    Since cs4 is not the latest version, I assume there is no hope of bug fix?

    There seem to be major problems in the disc creation process. I am struggling since several days now and I am not able to produce a working Blu-Ray Disk or iso image with Encore 5.5:
    - when producing Blu-Ray ISO images, you get an ISO that is recognized as DVD iso in all virtual drive programs. Therefore, you cann not burn them on a BD-R disc, also viewing them is not possible because it is a "DVD with blu-ray content".
    - when burning directly to disk, Encore does not close the sessing. This means, the Disk is not playable on all home Blue-Ray players. It was playable on my computer, but after closing the session manually the disc was a coaster.
    - when burning on a virtual burner (Virtual CD 10), the Blue-Ray plays ok on my computer, but I am NOT able to make a ISO image from this disk because some errors (unreadable blocks) on the disk are reported during creation and image creation stops.
    - from time to time (not reproduceable), Encore produces an additional AACS folder on the created Blu-Ray.
    I am an experienced user and dont have any issues with other software solutions, but with Encore I was not able to get any usable results so far.
    Win 7 x64 SP1

  • Can't see image in File Open box for CR2 files.

    I just upgraded to PSE 13. When I open a folder with my RAW files, CR2 format, I only see icons, not the actual image. I didn't have this issue with PSE 11. Do I need to download a codec to allow me to view the files? I am running Windows7 Professional 64 Bit

    Which canon camera are the .cr2 files from?
    The open and save dialogs in pse 13 use the standard windows 7 dialogs, where as previous versions of pse used the older windows xp dialogs that showed the previews.
    You might try the Microsoft Camera Codec Pack
    http://www.microsoft.com/en-us/download/details.aspx?id=26829

Maybe you are looking for