LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Image data to csv file

Hello together,

 

I wrote a program with a stage control and an image acquisition (via a CCD camera) to study interference. It all works fine and I get a .jpg data, but I also would like to have the image data converted to a .csv file. More precisely, I wish to have a table that gives an intensity value for each point of the camera.

Are there possibilities to convert the data from the camera to the wanted file type or from the jpg?

 

I would very much appreciate your help.

0 Kudos
Message 1 of 5
(3,545 Views)

Without your posting the actual LabVIEW code (not a picture of the code, but the actual VIs), there is a lot of information that we do not have.  I am going to assume (!) you are acquiring 8-bit Gray Scale images.  There are IMAQdx functions (such as IMAQ ImagetoArray) that will give you a 2D numeric array corresponding to Pixel values, and you can then use Write Delimited Spreadsheet to create a .csv file.

 

Bob Schor

0 Kudos
Message 2 of 5
(3,521 Views)

Thank you very much for your help.

The problem now is that I cannot provide the necessary image format for the ImageToArray function.

(Vi is attached)

0 Kudos
Message 3 of 5
(3,462 Views)

Unless this is going to be read by a human, I would strongly suggest manipulating the data directly.  A csv file will always end up being a LOT larger - and therefore a lot more time-consuming to manipulate -  than data in a binary format because it will take more bytes to display numbers as human-readable ASCII characters than it would to write an array of integers, as well as having to translate from one format to another and then back again.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 5
(3,440 Views)

I've never used .NET to do Image-processing in LabVIEW, only LabVIEW's IMAQdx functions.  However, I agree with @billko that if you want to do image processing with a computer, you'd be better off sticking to a binary format which saves a lot of disk space and provides much faster I/O.  I would also suggest that you not use a lossy format such as .jpg to compress the data that you subsequently want to analyze -- who knows what information you are discarding?

 

Bob Schor

0 Kudos
Message 5 of 5
(3,429 Views)