MATLAB Answers

1

How to convert optical flow velocity to meters per second?

Erik S. 님이 질문을 제출함. 24 Feb 2015
최근 활동 Dima Lisin 님이 댓글을 추가함. 25 Feb 2015
Hi,
I have a calibrated camera and can convert positions from pixels to meters using the transformPointsInverse function. I am also estimating velocities of moving objects using the optical flow method provided in Computer Vision System Toolbox. However, I would like to convert the velocities from pixels/frame to meters/sec. How can I do this?
Obviously I tried
diff(position)/fps
but this magnifies noise in the signal so I don't get realistic velocities.

  댓글 수: 0

로그인 to comment.

답변 수: 1

Dima Lisin 님의 답변 24 Feb 2015

Hi Erik,
You should multiply by fps, instead of dividing. The time between two frames in seconds is 1/fps.
Also, are you reading the video from a file, or are you processing live video? In the latter case, you would not really know your frame rate, because it would depend on how much processing you are doing. The best thing to do would be to get the timestamp for the frames that you are comparing.

  댓글 수: 2

Hi Dima,
You are right, I type to quick, but I divide with the time difference of 1/fps.
I read the video from a file. Do you have any suggestion for that case?
Thanks!
Erik
Are you sure that you are computing the distances in meters correctly? How exactly are you calibrating your camera?

로그인 to comment.



Translated by