Hello i read this article http://queue.acm.org/detail.cfm?id=2206309
and saw optical flow with OpenCV should be 1.6 times faster on Tegra3 with
neon library.

So i tried an easy example and measured the time it takes to call

goodFeaturesToTrack() and calcOpticalFlowPyrLK()
The result was, with Tegra3 lib (arm/neon) and OpenCV 2.4.2 i'm only 12%

Can anybody interpret my result? Why is the gain so small?


Search Discussions

  • Kirill Kornyakov at Jan 17, 2013 at 6:21 am

    There might be several reasons of why you don't see the speedup. Let's
    discuss them all.

    1. First of all I would ask what you see if you measure optical flow
    alone. According to OpenCV perf tests<https://github.com/Itseez/opencv/blob/master/modules/video/perf/perf_optflowpyrlk.cpp>,
    you should get the speedup varying fro, 1.1 to 2.6, and 1.6 on average. Of
    course the actual performance is greatly affected by your parameters and
    activity of other threads. If your system is busy, processing time may be
    too unstable. So, please first of all measure the optical flow only. If
    you'll see 1.5 speedup, everything is OK. If not, read below.
    2. Speedup depends on your parameters. Try to use less/more points,
    smaller/larger search window size. Its possible that if you want to see the
    actual speedup, you need to give more work to optical flow function.
    3. But IMO the actual reason why you don't see the speedup, is that you
    possible include GFTT runtime into measurements, and this function is slow
    and almost not optimized. Its speedup is 1.1 - 1.8 with 1.3 on average. So,
    please report perf numbers for these two functions separately. And I think
    you should use a more lightweight approach for feature points detection.
    You can try to use FAST feature detector or a regular grid of points. This
    question was discussed several times here (like this<https://groups.google.com/d/msg/android-opencv/YwNUkqul1bY/3d1k6zAOPZoJ>),
    try to search for "grid" and "optical flow".



Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupandroid-opencv @
postedJan 17, '13 at 5:52a
activeJan 17, '13 at 6:21a

2 users in discussion

Kirill Kornyakov: 1 post Benfred: 1 post



site design / logo © 2019 Grokbase