LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

meansquare from Area of a Picture

Hallo,

how can I read a JPG-Picture or any other format, and calculate the
meansquare from the R-G-B Values from all of the Pixels about the
Picture-area?

Please answer me as PM, german Language is wishable. 😉

Thanks for helping me.

Ciao, Martin.
0 Kudos
Message 1 of 3
(2,782 Views)
Hi Martin,
first load the image as a bitmap (because is not archived). This will allow you to have RGB information for each pixel in a picture (after you discard the header). You can find information about BMP format on the net (consider this link for the beggining: http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html)
0 Kudos
Message 2 of 3
(2,782 Views)
In LabVIEW you can read jpg, bmp and png image file using the corresponding read picture function, which are located in:

Graphics & Sound -> Graphics Formats

Those VI's return the actual image as a 1D array (flattened image data) and a color table, which togheter will correspong to the RGB values you are looking for. You can convert the image array to a 2D array by using the "Unflatten Pixmap.vi", located in the same menu.

Use a numeric array indicator to display the color table values. Remeber that you should display these values as hexagesimal number to better understand them. To do that, right click an indicator in the array and select "Format & Precision...". Also, remember that a single value contain the RGB information, except if the image is 24-bit. In that c
ase, three consecutive numbers in the IMAGE DATA array represent a single pixel and the color table will be empty.

Best regards;
Enrique
www.vartortech.com
0 Kudos
Message 3 of 3
(2,782 Views)