Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any way to find optical flow velocity from motion of real-world object without knowing depth Z?

I am struggling and need help.

I want to compute optical flow velocity from the known motion of real-world object (actually camera is moving). This is part of what I have asked in my previous question (Determining if a feature is part of a moving object from sparse optical flow (KLT)).

Anyway, I have done computing optical flow using cvGoodFeaturesToTrack() and cvCalcOpticalFlowPyrLK().

I just want to check if the flow I computed is theoretically correct (corresponding to the motion of camera).

Let my camera move only in Z axis (simply ignore yaw-rate for now). Assume my camera move for Vz (in Z direction).

I can find the optical flow by

vx = x * Vz / Z    
vy = y * Vz / Z

(assume Vx,Vy = 0 --> no camera motion in x and y axis)

This is what I have studied mainly from http://www.cse.psu.edu/~rcollins/CSE486/lecture22_6pp.pdf.

The problem is to solve this I have to have Z. In my case, I cannot assume surface Z to be flat or known. Camera is moving on road and directing perpendicular to the ground.

Please anyone help me answer the questions below:

  1. How can I get the depth of object Z value? Do I need additional technique?
  2. Or are there any way else that I can find the relationship between motion of camera and image optical flow?
  3. Have anyone tried the equation above? Is it valid when the camera moving just in one direction?

Thank you very much.

[If you find this question to be too vague, please let me know so that I can give more detail.]

like image 343
Sonia Avatar asked Nov 21 '12 08:11

Sonia


People also ask

How do you calculate optical flow?

where Vx=u=dx/dt V x = u = d x / d t denotes the movement of x over time and Vy=v=dy/dt V y = v = d y / d t denotes the movement of y over time. Solving for the two variables completes the optical flow problem.

What is U and V in optical flow?

The apparent motion of the brightness patterns is called as optical flow. • The optical flow is a field of 2D vectors and is. defined on the image domain, i.e. at each pixel (x,y) in the image, there is a vector (u(x,y),v(x,y)) giving the apparent displacement at (x,y) per unit time.

What are the possible applications of optical flow?

Optical flow was used by robotics researchers in many areas such as: object detection and tracking, image dominant plane extraction, movement detection, robot navigation and visual odometry. Optical flow information has been recognized as being useful for controlling micro air vehicles.


1 Answers

Perhaps this could help... Video lectures from University of Central Florida Computer Vision Group:

  • Chapter 6 - Optical Flow (The equation you asked for is at 31:00 min into the video)
  • Chapter 8 - Motion Models (Various approaches to dealing with yaw, tilt, rotation)
  • Chapter 9 - Global Motion (Addresses issues of ego-motion i.e. moving camera)

Additional python codes from Jan Erik Solem: Programming Computer Vision with Python.

Read chapter 10.4, it will most probably answer all your questions.

Also look at chapter 5.4 of that book, if you take an image with the camera and then move your camera slightly in the x-direction and take another image you can calculate something called a "disparity map" using the two images which tells what kind of things in the image were in the front vs back. this is slightly like figuring out the z-direction. something along the lines of what you have already tried and what some of the comments had mentioned about stereo imaging.

Chapter 4.3 explains pose estimation using planar markers. You can use object placed in front of the camera at a known distance to calibrate the camera. This is most probably what you should look at first.

like image 125
samkhan13 Avatar answered Oct 14 '22 14:10

samkhan13