Jump to content

How to Display 8 Bit Gray pic


Recommended Posts

Do you mean that you have a 24bit color image and you want to extract the colors to 3 8bit gray image? If so, if you can get an array of the 24 bit color image, then deinterlace the array to 3 output arrays, each output array is your gray image data. But you need to know what is your color image color order, some are RGBRGB... but some image output in the order of BGRBGR... so that you know which output array is R, which is G and which is B.

But I guess I may misunderstand you. Maybe you just want an image window or picture control that can display gray image. If so, at least I know IVision LabVIEW toolkit can do it. The image window accept 8bit gray image or 24bit color image. Link is here:

http://www.hytekautomation.com/Products/IVision.html

Irene

Link to comment
I just want an image window to display gray images, but I can't open the link you give me.

:(

If you have 2D array of grayscale values, you can display the array in an Intensity Graph display.

If you set the colormap of the Intensity Graph to ramp from black-to-white, (and enable interpolate colors), the data will be displayed as a gray image.

Link to comment

If you have not discovered OpenG then you really need to get over there and take the time to figure out how to download and install the libraries found there. It all starts with "OpenG Commander"... :thumbup:

But, with that said, it can be a bit imposing the first time you download/install it so I've attached a bit of one of the libraries to this message and it contains enough to do what you want to do. It'll open/read/display an image file. I've even tossed in some color lookup table data (in the form of a VI) so you can truely force the display to be gray (or yarg which is gray inverted).

Download File:post-2800-1127945724.zip

Link to comment
If you have 2D array of grayscale values, you can display the array in an Intensity Graph display.

If you set the colormap of the Intensity Graph to ramp from black-to-white, (and enable interpolate colors), the data will be displayed as a gray image.

It did work! But I don't know how to set the colormap of the Intensity Graph. I tried to find the corresponding property node but failed.

Link to comment
  • 2 weeks later...
It did work! But I don't know how to set the colormap of the Intensity Graph. I tried to find the corresponding property node but failed.

post-2800-1128971215.jpg?width=400

And, for those that don't know about color boxes on the block diagram, you create a color box on the Front Panel and then drag it from there onto the Block Diagram. Delete it from the front panel and use the copy on the block diagram. Click on it with the "finger" to change colors..

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.