07-18-2013 04:35 AM
Hello!
I have 2 pictures, with many similarities. I would like to overlay them on a specified point, or edge, or some unique feature. Is there any way to choose a point (by hand or by an algorithm) then find the one matching it (or similar to it) on the other image? and then overlay the images according to the matched point? Overlaying algorithm is done, now I need to find correspondences between the two images, and then overlay them according to the similarity.
Thank you!
gbbalint
Solved! Go to Solution.
07-18-2013 05:12 AM
Hello,
i can suggest using template matching (correlation). This can detect objects with scale, rotation and occulsion (depends which algorithm you use). It can detect features with sub-pixel accuracy. I work with this functions all of the time and they perform great (roboust and fast).
You have some examples already - try searching for them (geometric matching, pattern matching).
If you come accross any problems, i think i have some examples myself. You could also post the images if you like.
Alternatively, you could also do this manually - clicking on the approximate area and finding some distinct features. For example, if this objects are elliptical, you can detect edges in a circular pattern, fit the ellipse and find the centerpoint.
Or combination of the above.
Best regards,
K
07-18-2013 04:10 PM
Hello!
Thank you! I attached two images, to make it clear. I would like to pick for example the left upper peak of the tea boxes, then overlay them, as the coordinates of the peaks are aligned. It means I may need to cut a bit from one of the images, but it doesn't matter. I looked for examples in the LabVIEW help, but if you think you have a vi. for my problem, I would appreciate if you can send it to me.
gbbalint
07-19-2013 02:02 AM
Hello,
I have modified the labview example. Run it, input two images (left, right) then "load" them, select the edge ROI (see the image below) and "search". Then overlay one image over another with transparency ("overlay"). The code is a bit messy, but you can clean it up for your project.
You have said that the overlaying algorithm is done, could you please share it? Maybe your solution is more sophisticated and can help me with another project.
I hope this helps you.
Best regards,
K
07-19-2013 07:17 AM
Hello!
I attached the vi. for the overlaying, however it contains my whole code. It gets the RGB color values from both images, then between interpolates them, and the new RGB values will be the values on the mixed picture. Its slow, because it does it pixel-by-pixel, but after I have the whole program working as I want, I will try to enhance the performance.
Thank you for your help!
gbbalint
07-19-2013 08:40 AM
BTW, does this program work for colored images? If yes what shoould I modificate? Or I need colorful images in the end.
07-19-2013 08:57 AM
You know I need to add the cyan and red colors for 3D feeling. But I have no idea where to add them.
07-19-2013 09:21 AM
Once you have two grayscale images that are properly aligned, you can combine using color planes to image. Use one image as the blue and green inputs, and one as the red input. The output should be your two color image.
Bruce
07-19-2013 02:17 PM
I don't really understand, You mean, applying the color planes after I overlayed the two images, or before, when I have two images? For the first image apply the green/blue and for the other the red and then overlay? Or after overlaying?
07-21-2013 02:32 AM
Hello!
I have a result finally. After some processing I got images like that. The only problem with them that they are very bright.
gbbalint