LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display/save 8 bit grayscale image

Solved!
Go to solution

 

I have a VI that is capturing an 8 bit grayscale image (1D array of 1500 pixels). It has a 10 byte header that I strip off and try to display it.  The problem is that the displayed picture is interpeted as an RGB.  Also, the saved image can be opened using a picture viewer but is not correct.  It is missing the pixel data. How do I get this to display as an 8 bit grayscale image.  I would also like to duplicate the 1 row of image data to about 50 rows so that it is easier to view.  using a for loop and indexing the row only leaves the pxmao empty.

 

image data.JPG

0 Kudos
Message 1 of 4
(4,034 Views)

Hello,

 

Would you mind posting some sample data?

 

Thanks,

Patricia B.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(4,007 Views)
Solution
Accepted by Bjoles

Bjoles,

You are missing a colour table input to your flatten pixmap block. See the vi snippet I have attached. Also, I have found that building arrays from a for loop is a quick way of doing it, Labview seems to preallocate the memory correctly.

Luke_A_P
--
Message 3 of 4
(3,993 Views)

Thanks,

The color table solved the issue. 

0 Kudos
Message 4 of 4
(3,982 Views)