フィルターのクリア

Optical Flow in Single Video Frame

3 ビュー (過去 30 日間)
youngz
youngz 2019 年 7 月 18 日
回答済み: kuku hello 2022 年 3 月 27 日
Hi,
I am looking to the example available in the pages of the different algorithms implementations of optical frame (e.g., https://it.mathworks.com/help/vision/ref/opticalflowlk.html ).
The optical frame should estimate the direction and speed between two frames in a video. Anyway, in the example, it gets in input a single video frame - i.e. flow = estimateFlow(opticFlow,frameGray); -. Consequentially, how it is able to compute the flow using a single image?
Thanks

回答 (2 件)

Roshni Garnayak
Roshni Garnayak 2019 年 8 月 2 日
In the example (https://www.mathworks.com/help/vision/ref/opticalflowlk.html), an optical flow object has been created using the class opticalFlowLK. This class has a function estimateFlow which computes the optical flow between the frame specified in the argument of the function and the previous frame.
For detailed working of the function, you can type the following command in the Command Window:
edit estimateFlow
  2 件のコメント
Tintumon
Tintumon 2021 年 1 月 28 日
編集済み: Tintumon 2021 年 1 月 28 日
I went through the estimateFlow code and understood that the previous frame is obtained from the frame buffer.
But,I needed to evaluate the optical flow methods for two consecutive images (as obtained from middlebury dataset). In this case, is there any workaround to estimate optical flow for only the two given frames?
Specifically I wanted to evaluate the Lukas Kanade, Horn & Schunk, Farnebach optical flow algorithms (which are all part of estimateFlow class, I believe.)
Julius Å
Julius Å 2021 年 2 月 11 日
編集済み: Julius Å 2021 年 2 月 11 日
I'm also interested in the answer to this question. Have you found out how this can be done?

サインインしてコメントする。


kuku hello
kuku hello 2022 年 3 月 27 日
As been told above, try to do edit estimateFlow and you will see the following comment:
reset(flow) resets the internal state of the object. It sets the previous frame to black.
Which means that if it didn't have any frame before the one you are using it creates a black frame.

カテゴリ

Help Center および File ExchangeTracking and Motion Estimation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by