Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to adjust CWIMAQViewer display range for gray scale images?

Hi,

I'm using CWIMQViewer in VS2008 to display a 12-bit (0-4095) gray  scale image.  How do I adjust the display range of the viewer so that when the image is very dim (say max. is 300), there is still good contrast?  A concrete example would be most helpful.  Thanks much.

 

 

 

0 Kudos
Message 1 of 4
(3,987 Views)

Hello aoslo,

 

I read you post and I will like to see one of the images. Since the image is 12 bits (0-4096) I believe a maximum value in intensity of 300 is really low, due that I will like to see an histogram of the image to see if doing an equalization could be a good option. In this link here is a good explanation of what and how to equalize and image:

 

http://docs.opencv.org/doc/tutorials/imgproc/histograms/histogram_equalization/histogram_equalizatio...

 

Please attach a picture to the post.

Randy @Rscd27@
0 Kudos
Message 2 of 4
(3,963 Views)

@Rscd27 wrote:

Hello @aoslo,

 

I read you post and I will like to see one of the images. Since the image is 12 bits (0-4096) I believe a maximum value in intensity of 300 is really low, due that I will like to see an histogram of the image to see if doing an equalization could be a good option. In this link here is a good explanation of what and how to equalize and image:

 

http://docs.opencv.org/doc/tutorials/imgproc/histograms/histogram_equalization/histogram_equalizatio...

 

Please attach a picture to the post.


Hello Randy,

Thank you for your response.  In fact, the CWIMAQViewer seems to automatically adjust to the dynamic range of the image and display it corretly, i.e. it can display a dim image just as well.

I read the documentation on equalization and didn't think that was what we wanted to do.  Had the CWIMAQViewer not been able to auto adjust, we would have wanted to do a linear transformation of the grayscale palette to correctly reflect the dynamic range of the image.

 

That brings up another question I have: is it possible to create a palette  at runtime and have the CWIMAQViewer use the new palette?  The idea behind this is that there're times when we want to 'highlight'  the bright spots in the image, say set all spots above 4000 to RED.   This would require generating a user-defined palette.  The documentation for CWIMAQViewer indicates that palette is a readonly property, which I find a bit restricting.  Any ideas of how to get around the problem?

Thanks.

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

Hello Aoslo,

 

Can you attach one of the images? I have to be hones I am not sure what the CWIMAQViewver is. 

Randy @Rscd27@
0 Kudos
Message 4 of 4
(3,920 Views)