Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Hi,


I need to create a VI that plots scatter plots of the pixels in a red and green image.The red pixels should be plotted as red,green as green and the pixels which contain both red and green should be plotted as yellow.In other words this VI has to perform colocalization.
0 Kudos
Message 1 of 2
(3,004 Views)
It doesn't sound like you are using vision.

If you are just trying to do a scatter plot, use an intensity graph or picture control to display it.

Create an array with all zeroes in it. Use unique binary values for the two base colors. As you set each pixel value, use AND to combine it with the existing value. This way, if you set the same pixel to both red and green, it will contain the combined value, which will be yellow (depending on your colormap).

A quicker way, depending on how you collect your data, is to create a binary array for each color. Multiply each array by the appropriate color, then AND them together.

Hope this helps.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 2
(3,004 Views)