03-02-2015 04:21 AM
I am trying to do a project which is similar to the working of an optical mouse. So my robot will be having a camera pointing downward and I will be acquiring images from that camera in labview. What I need is that based on the comparision of the previous and the current image, my robot should provide me with the distance it has travelled. I know that it has something to do with the pattern matching and pattern shift of both the images and then that would somehow provide me with the distance but what I dont know is how to implement that in labview as i am new. Any help in form of a solution to this problem or some tutorials that would help building this sort of example is much appreciated. Thanks
03-02-2015 03:17 PM
What you are looking at implementing is called Optical Flow. Newer version of LabVIEW include it in the Vision module. You will need sufficient texture in the camera FOV to get good results.
03-02-2015 11:16 PM
Hey thanks, I was searching for what its actually called . So the technique is pretty clear to me now of how it overlays the velocity vectors on the images but is it possible to actually use those velocity component to calculate the shift in image ie the distance travelled by the robot? Sorry for being noob here.
03-03-2015 02:22 PM
Yes. The distance that the vectors travel can be had in an array. If you strip out the upper and lower 20%, and average the rest (in X and Y), you should have a fairly accurate distance count in pixels. To get reall world measurements, you can calibrate the camera image, and figure out what one pixel equals in real distance.
I think rotation can also be measured.
03-04-2015 12:35 AM
Thanks. So I tried implementing it but there seems to be an error and most frustating is that the labview cant detect what the error is. So I am taking video feed from ar drone and using lk method but it seems that the velocity components are not returning anything. I thought that the optical flow works on grayscale images only so i tried casting the image source to grayscale but that too doesnt seem to work.. What to do?
03-04-2015 09:24 AM
Sorry for the above post. I have figured out that using ar drone's botttom camera is not very efficient and now i will be using a wifi camera below ar drone to compute optical flow which is much more responsive and faster.