Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can IMAQ Image be saved in some ASCII format in CVI?

I currently use CVI and IMAQ to gather images from a camera. I use the four supported file formats, but am being asked to save the data in a text file so that it can be manipulated and analyzed manually. Anyone have a block of code that does this?
0 Kudos
Message 1 of 2
(2,815 Views)
Try using imaqImageToArray() to get the image data into a 2D array. Please see the IMAQ Vision for LabWindows/CVI function reference for more details.

Once you have the pixel data in an array, use the ArrayToFile() function to write it to a file. This is a high level file IO function that handles opening, formatting, writing, and closing all in one function call. Alternately, you could use lower level file IO functions for more flexible control. You can find more information about file IO in the LabWindows/CVI Help under "Formatting and I/O".

Regards,

Brent R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,815 Views)