LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Merge an Intensity Graph with an image

I have an intensity graph that displays the elevation of the ground.  In some areas the sensor cant see the ground, and in those areas I want to put an image that is an image of the ground.

This is in effect a merger of an overhead photo, with a digital elevation model.

I have the elevation data in a 2D array and plot it in the intensity graphs using a fixed color ramp. This is shown in plot image.

The raw array is 600 by 600, but in this plot only a sub sample of it is shown. (axis are not autoscaled).

I also have an image that is 600 by 600, and another 600 by 600 array that is ether numbers or NaN's.  My initial plan was to sub in image pixel values where there were NaN's.

But this doesn't really work as the intensity graph isn't actually 600 by 600, it includes the axis and a bunch of other stuff.

I can convert the intensity graph to a jpg, then load the jpg, then convert to a RGB array, do the same with the overhead photo and then do a merge using the decisions array, and then convert it back to a RGB picture.  This is shown in the merged example, but because the intensity graph has different extents than the actual data, it doesn't really work.

Any ideas? could I somehow convert just the contents of the intensity graph to an image, that would then have a 600 by 600 extent (at least if it was autoscaled), and merge the contents and then put it back in the intensity graph?  At the end the intensity graph is good as it includes the X and Y axis and shows the scale of the map.

The code example shows the appropriate bit of code I am currently using and image_bits shows the front panel portion of things and the two things that I am trying to merge together.

0 Kudos
Message 1 of 2
(2,227 Views)

Hi AZ,

 

surely you can do all this!

You just need to program it…

 

A different idea: use your "photo" to create a background image for your intensity graph. You can set it using a property node of the graph!

Edit: just checked those propertynodes and only found a "foreground image" for the intensity graph. To get the intensity plot in front of your photo you might use a 2DPictureIndictor or use the foreground and background image of a XY graph…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,199 Views)