02-09-2020 02:56 PM
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.
02-09-2020 04:35 PM
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
02-17-2020 04:09 AM
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)
02-17-2020 07:02 AM
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.
02-17-2020 08:34 AM
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