9

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.]

4

1 回答 1

3

也许这会有所帮助……来自中佛罗里达大学计算机视觉小组的视频讲座:

Jan Erik Solem 的其他 python 代码:使用 Python 编程计算机视觉

阅读第 10.4 章,它很可能会回答你所有的问题。

另请参阅该书的第 5.4 章,如果您用相机拍摄图像,然后在 x 方向上稍微移动相机并拍摄另一张图像,您可以使用这两个图像计算出称为“视差图”的东西图像中的东西在前面和后面。这有点像弄清楚 z 方向。类似于您已经尝试过的内容以及一些评论中提到的有关立体成像的内容。

第 4.3 章解释了使用平面标记的姿态估计。您可以使用放置在相机前面已知距离的物体来校准相机。这很可能是您应该首先查看的内容。

于 2013-06-06T21:04:13.177 回答