LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining two intensity graph

Solved!
Go to solution

Hi,

I have two two 2D arrays. First one is an ''image'' and the second is extra information about that image. For exemple, imagine I have a black and white image of a beach and I want to add with color where a metal detector detected something on the beach. I want the pixel on the image to be redder with the intensity of metal detected. In a way, I'm trying to superpose the information of an image and a detected property at certain position on that image through colors.

 

From a more math point, the way I could imagine it being done, I start with one of my black and white pixel and use it's RGB value: 30/30/30, and I modify it. If the value in my second matrix is high, I'll display RGB: 90/0/0, if it's low, I'll keep the 30/30/30.

 

Is there a way of doing this sort of thing? Have anybody ever tried something similar?

Thank you.

RMT

0 Kudos
Message 1 of 3
(2,282 Views)

Note that intensity graphs have only a 256 element color map for the z axis, so you cannot operate on RGB values the way you want. Maybe you want a picture indicator instead.

 

Instead of adding red, You could do a simple binary masking operation and remove (set to zero) the G and B component

0 Kudos
Message 2 of 3
(2,277 Views)
Solution
Accepted by topic author RaphaelMT

For an intensity graph, you could "cheat" by creating a custom color ramp that goes from black to white for the even elements and from black to red for the odd elements. Scale your values into U8 arrays and round all regular values down to the next even element, then do a +1 on all element that should be red.

0 Kudos
Message 3 of 3
(2,262 Views)