LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I convert a bitmap image into an array in LabVIEW 6.0.2, then to a spreadsheet for further analysis without NI-IMAQ or Vision?

I do not have NI-IMAQ or NI Vision.

I acquired the image using a picolo board then just saved it as a bitmap file.
0 Kudos
Message 1 of 3
(3,581 Views)
You want to convert it to an array of what? Of numbers? Of LabVIEW colors?

The "Read BMP File.vi" VI outputs a 1-D array of the pixels, but I suspect it is not exactly in the format that you need. I am NOT sure, but I think that each group of 3 elements of that 1-D array (which is inside the cluster "image data" that the VI outputs) represents the red, green and blue levels of a single pixel (but it may be hue, saturation and lum.). Also, since it is a 1-D array, you would have to divide it by the width (which is also included in the "image data" cluster) to get some sort of 2-D array of data.

You can find the "Read BMP File.vi" VI in the functions palete> "Graphics & sound">"Graphics Formats".
0 Kudos
Message 2 of 3
(3,580 Views)
Just to add a few more details to the previous answer, each set of 3 array elements do represent 8-bit levels of red, green and blue, and it goes rows first, then columns.
So, the first 3 elements are RGB for the pixel on the top left corner, elements 3, 4, and 5 are RGB for the second pixel of the first row, and so on.
0 Kudos
Message 3 of 3
(3,579 Views)