Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding camera movement vector...

I am working on an application that uses a handheld Unibrain Firewire camera.  The camera captures 30 frames per second.  I need to detect the direction and (ideally) the speed with which the user is moving the camera relative to the surface that the camera is looking at.  Although there are particles that can be detected on the surface, there is no regular pattern across the surface.  Furthermore there may be SEVERAL particles that all appear very similar within a given frame.
 
All processing is done using LabVIEW 8.2 (soon to be upgraded to 8.5), IMAQ, NI Vision etc.
 
The additional challenge is that, although the user does their best to maintain the distance of the camera at around 0.5 in., there is no way to fix that distance of course.
 
Any ideas?  I was told that the way to do this was by cross-correlating images from subsequent frames but I have been unable to find an appropriate example.
 
Thanks for your help!
0 Kudos
Message 1 of 3
(3,176 Views)
Hey 2and4,
 
I've been looking into a method for achieving this.  The IMAQ correlation takes a template image and finds that template image inside the main image.  So if your template image was of a pebble, it would find the pebbles in the main image.  When I am differencing multiple images, I use an operator function such as add, subtract, or multiply.  One operator that is particularly useful is the XOR function.  With this function it will remove everything that is similar in two images and leave only what is different.  From there, you would then calibrate the image to be in real world units.  After you have the image calibrated, you could measure how far apart the key parts of the image have moved between the two images.  Once you have the distance, since you have a 30 fps camera, you can then divide by time per frame and get velocity.  Let me know if this helps you out!  Take care.
 
Thanks,
 
Evan D.
Installer R&D
National Instruments
0 Kudos
Message 2 of 3
(3,141 Views)

Thanks for the help Evan.  I actually had some colleagues of mine work on this problem last week and they apparently had some success.  I'll pass your posting on to them.

Thanks!

0 Kudos
Message 3 of 3
(3,133 Views)