LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a scale bar for an image using color palette

Hi,

I am using Labview to display gray scale images captured by a monochrome camera. By applying color palette, the gradient of the image is shown with the specific color profile, such as a "rainbow" palette. However, is there a way to show the color scale along with the image? In that way the scale bar can be a reference for the intensity gradient in the image. 

 

Greatly appreciate. Thanks.

0 Kudos
Message 1 of 8
(4,381 Views)

I don't know of a way to show a scale bar using the image control. You can switch to an intensity graph instead. Alternatively, you could create another image to put next to your first with values going from 0 to 255 (or higher depending on the resolution of your camera).

capture.PNG

Message 2 of 8
(4,351 Views)

I've used a 1D array of narrow frameless colorboxes in the past.

Message 3 of 8
(4,332 Views)

Thanks a lot! Your reply and example is very helpful. I am going to try the strategy..

0 Kudos
Message 4 of 8
(4,271 Views)

You could use a Color Ramp and place it next to the image.

"If you weren't supposed to push it, it wouldn't be a button."
Message 5 of 8
(4,144 Views)

Hi Paul, It's very interesting to see your vi. However, I currently still work with a previous version (2017) than yours (2018), so couldn't really open it up on my machine. Could you paste a snapshot of your diagram for me to see? I have implement the way Gregory provided and then add some real-time scale adjustment into it to dynamically link to the camera signal gain in my program. 

Thanks a lot for your work and advice.   

0 Kudos
Message 6 of 8
(4,130 Views)

Here it is in LV 2017

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 8
(4,124 Views)

Wow, this is a very cool way of doing it! thanks!

0 Kudos
Message 8 of 8
(4,110 Views)