ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect pixel saturation

I am trying to take an image and easily detect the pixels that are saturated within the image.  So far I have extracted a single plane or band from the image and then converted it into an array.  One question I have is why does the display show only the middle half of the image alongthe x axis? Secondly, I can't figure out how to get it to display just the image based on its dimensions.  The x and y values that it automatically detects are not the image dimensions (1912 x 1076)and I can't figure out what they are representing.  Third, is there a way to change the displays color ramp from something other than shades of blue?

 

Thanks in advance!

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

Hi,

 

Is there a reason why you are not using an image display (from the Vision palette)?  With that, the image will display as a grayscale.  

 

Take a look at the attachment.  Is this more what you are looking for?

Message 2 of 4
(4,298 Views)

I wasn't sure what display to use for what I was trying to do.  I want to be able to specify the ranges of values to be displayed; say 0-100 as black, 101-200 as grey, and 201-255 as white for example so that the saturated or near saturated pixels will be easily detected telling me I need to adjust the integration times on the camera.  I'll play around with what you did and see if it does what I'm looking for. 

 

Thanks for the response!

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

After using the vi I originally posted, it seems that the "Saturated" display is mixing up the x and y values, so it displays the width as being 1076 pixels wide instead of 1912.  If I can figure out how to swap the x and y input values, then this way of displaying the images will do.  Using a rotate function rotated the image but it didn't change the display function properties.  It would be nice also if I had a little more control on the colors used in the color ramp ie. red for the red band, green for the green band, and blue for the blue band.

 

Any thoughts?

0 Kudos
Message 4 of 4
(4,282 Views)