Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image blending for image panorama

Could anyone help me how to blend images when I mosaic the images for the rotated images which blackens around its periphery during the image rotation?
I need to blend the images so that I remove the black area while I paste one image over the other and only the mosaiced image has to be seen. The black area lying in and around the image has to be removed
0 Kudos
Message 1 of 7
(4,394 Views)
Sundar,

I'm not sure I really understand what is going on. Can you post some images to help clarify what you are trying to do? What functions are you currently using in your program to do this?
0 Kudos
Message 2 of 7
(4,385 Views)
Hai,
These are some of test images that I have attached,

1) Image to be mosaiced 1---------template1
2) Image to be mosaiced 2---------template2 at an angle.
3) To obtain ----------image that is be obtained.
4) Obtained ----------image that I have obtained.
5) Original image.

I have tried to mosaic the images (1 & 2) to obtain a single image, combining the two images but due to angle difference in image (2), the image (2) has to be rotated with respect to the image (1) that is considered as our reference.
So for this purpose I used IMAQ rotate which actually resizes the image, by blackening at its periphery that is to be removed. If I disable the resize image option I loose most of the image information for which I cannot mosaic the images.

I have also attached image obtained (3) and highlighted the area the I am actually supposed to obtain.
0 Kudos
Message 3 of 7
(4,377 Views)
Hai,
These are some of test images that I have attached,

1) Image to be mosaiced 1---------template1
2) Image to be mosaiced 2---------template2 at an angle.
3) To obtain ----------image that is be obtained.
4) Obtained ----------image that I have obtained.
5) Original image.

I have tried to mosaic the images (1 & 2) to obtain a single image, combining the two images but due to angle difference in image (2), the image (2) has to be rotated with respect to the image (1) that is considered as our reference.
So for this purpose I used IMAQ rotate which actually resizes the image, by blackening at its periphery that is to be removed. If I disable the resize image option I loose most of the image information for which I cannot mosaic the images.

I have also attached image obtained (3) and highlighted the area the I am actually supposed to obtain.
0 Kudos
Message 4 of 7
(4,378 Views)
Hi Sundar

This may help, this is some code that I use for extracting a rotated rectangle region of interest into an image. All you need is the ROI to feed it to start with

Hope this helps

Mike
0 Kudos
Message 5 of 7
(4,375 Views)
thank you,
for that vi but this doesnt really work want i wanted .
i have sent the images, please see them that i really need for my application.
0 Kudos
Message 6 of 7
(4,356 Views)
I don't think I understand exactly where the trouble is. Mike's code seems to do pretty much what I understood the problem to be. It removes the unwanted (black) area from an image. But then you could use pattern matching to overlay one image over the other on a portion that they share (for example the rear-view mirror on the images you attached). Of course the two images may not be exactly the same along the edges, but there isn't a particular function to smooth that out. You would have to write an algorithm to adjust the two images pixel by pixel along the edges. I hope this helps you out.
0 Kudos
Message 7 of 7
(4,334 Views)