LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

superimposing 2 images

Hi,

 

I would like to refresh this thread. I used MixPicture4.vi and modified it a little bit. I want to mix a normal image with binary image. Unfortunately I always get a black image as a result. I checked this method numerically in Matlab and it seems to work correctly. Before mixing I have to multiply the binary image by 255 but it doesn't change anything. Any ideas?

 

mix4_1.png

0 Kudos
Message 21 of 27
(1,303 Views)

The top part in your code (the one without IMAQ code) seems to work fine - if I give it a two-color BMP and an image (I actually used a PNG, but that shouldn't make a difference) it merges the two together, making the black parts darker and the white parts lighter.

 

Make sure your images are exactly the same size. If that doesn't help, upload some sample images and explain exactly what you expect to happen and what actually happens.


___________________
Try to take over the world!
0 Kudos
Message 22 of 27
(1,291 Views)

Thanks for reply. Both images are the same size. What I want to achieve is an image that is a fusion of binary image of thz image with vis image. Both images are attached. The problem is, as I suppose in the connection between IMAQ and the rest of the code. 

0 Kudos
Message 23 of 27
(1,280 Views)

@bikekowal wrote:

What I want to achieve is an image that is a fusion of binary image of thz image with vis image.


I don't know what that means. There can be any number of ways to overlay the two images. You need to add more details than that. Maybe use a graphics editor to create a sample result. Paint.NET is a good example of a free and simple editor.

 


The problem is, as I suppose in the connection between IMAQ and the rest of the code. 

Then maybe you should get rid of one of them. If it all can be done using the standard picture control VIs, I would suggest keeping that.


___________________
Try to take over the world!
0 Kudos
Message 24 of 27
(1,271 Views)

@tst wrote:

Then maybe you should get rid of one of them. If it all can be done using the standard picture control VIs, I would suggest keeping that.



I don't understand. What I want to do is superimpose two images - binary image (which is an THz image after thresholding) and normal image (from vis camera). The problem is that I get a black image - probably because all of pixel values in binary image are 0 or 1 and in normal image - from 0 to 255. That is why I multiply binary image by 255. Still, this doesn't work. It works in Matlab perfectly but in LabView there is some problem I cannot solve...

0 Kudos
Message 25 of 27
(1,269 Views)

This is what I get when I run the top part of your code:

 

Merge_Pic.png

 

 

I can't comment on the IMAQ code since I don't have it installed.


___________________
Try to take over the world!
0 Kudos
Message 26 of 27
(1,252 Views)

So I guess you don't have VDM? The problem is in the bottom code line... anyone?

0 Kudos
Message 27 of 27
(1,248 Views)