From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display Gray Scale Image

Solved!
Go to solution

Dear  Members,

 

Kindly, how can I display (write) a gray scale image in labview using Flatten Pixmap when my input image is a two dimensional matrix 64x64 gray scale.? 

0 Kudos
Message 1 of 12
(4,268 Views)
Solution
Accepted by topic author Tasnim

One way of doing it would be to wire an array representing a greyscale colour map to the colors input of Flatten Pixmap.vi.

 

greyscale.png

Message 2 of 12
(4,244 Views)

Thank you very much for the useful answer..

 

in case I want to read a gray scale image in labview using Flatten Pixmap.vi or Unflatten Pixmap.vi when my input image is a two dimensional matrix 64x64 gray scale..is it the same way you answered me before?

 

Thank you 

 
0 Kudos
Message 3 of 12
(4,213 Views)
Solution
Accepted by topic author Tasnim

@Tasnim wrote:

in case I want to read a gray scale image in labview using Flatten Pixmap.vi or Unflatten Pixmap.vi when my input image is a two dimensional matrix 64x64 gray scale..is it the same way you answered me before?


If you want to read data from an image that is a 2D Picture Control, use Picture to Pixmap.vi then Unflatten Pixmap.vi to return a 2D array.  If your data is in the form of a LabVIEW matrix, it will have to be converted to a 2D array first as the picture functions do not operate on matrix data.

 

Andy

Message 4 of 12
(4,198 Views)

Thank you Andy for the useful answer

0 Kudos
Message 5 of 12
(4,152 Views)

Dear Members,

 

Can anybody advise me how to display grayscale (.tiff) image size of 64x64 and the image depth is 8 in LabVIEW?

 

Thank you

Tasnim

0 Kudos
Message 6 of 12
(4,110 Views)

Tasnim,

 

Just to check: do you mean read an existing TIFF file and display it in a picture control in LabVIEW?

 

Andy

0 Kudos
Message 7 of 12
(4,105 Views)

yes, this is what I mean.

 

Thank you

0 Kudos
Message 8 of 12
(4,088 Views)

I don't think LabVIEW has anything built-in to read TIFF files directly.  Many posts discuss use of the IMAQ image library or libtiff.

 

This post has a library which might help you, and there are a few threads on lavag.org discussing reading of TIFF files.

 

The easiest thing to do might be to convert losslessly to a suitable format that LabVIEW can handle using an external tool, but I have no experience of this.

 

Andy

0 Kudos
Message 9 of 12
(4,076 Views)

ok thank u very much for the reply and help..

 

I will try to check it 

0 Kudos
Message 10 of 12
(4,060 Views)