Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to align images using the results of IMAQ Correlate.vi

Hi, I was wondering if someone could help me out with this problem, or point me in the right direction? I've been trying to measure the change in the size of liquid drops in a sequence of grayscale images, but I am having trouble removing enough of the background to measure the drops themselves. My Algorithm was initially as follows: Remove the differences between the image and the template using the Subtract or ExclusiveOr operator. Measure the remaining portion of the image. Except the changing drop sizes, the images themselves have very similar backgrounds; however, there are some unavoidable differences in lighting, shift, and rotation(<<1 degree). As far as I understand, a good solution is to align the image and the template using Cross-Correlation. (Unless there's another way?) Thus my Algorithm is actually: Align image with template image using the results of IMAQ Correlate.vi (or another Cross-Correlation algorithm, any suggestions?) Remove the differences between the image and the template using the Subtract or ExclusiveOr operator. Measure the remaining portion of the image. I tried using cross-correlation, but the IMAQ Correlate.vi takes far too long on my images (which are 1280 x 1024 jpeg) However, I tried working with smaller (about 40 x 40) test images and got a resulting image which contained the Correlation Data, {but I don't know how to use this result to align the image to the template. Does anyone know how to do that?} Since IMAQ Correlate.vi seems to work with small images, I was thinking about replacing the whole template image with just a small (but useful) portion of it and also reducing the Optional Rectangle to a location similar to where the template lies. Will that reduce computation time to at most a few seconds? I guess my main question is how do I use the results of cross-correlation to shift an image? Thank you very much! Yeg
0 Kudos
Message 1 of 4
(3,618 Views)
Could you provide a set of images?  It's hard to picture exactly what they look like.
Randall Pursley
0 Kudos
Message 2 of 4
(3,617 Views)
Whoops. I always forget to do that.

I was planning on using the first image (...run_02) - the one with the bubbles within the lower right drop - as my template for now, and eventually there will be an image without any drops in it to use as a template.

Although, if it is possible to just use a small portion of an image as a template, then the presence of drops (which are not part of the background) shouldn't matter.


Thanks again,

Eugene


Message Edited by yegeniy on 05-22-2008 10:49 AM

Message Edited by yegeniy on 05-22-2008 10:50 AM
0 Kudos
Message 3 of 4
(3,594 Views)
It is possible, and desirable, to use only a small portion of the image for correlation.  Just make sure it is a sub image that is not symmetric looking in either direction.
Randall Pursley
0 Kudos
Message 4 of 4
(3,575 Views)