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