diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-04 17:26:11 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-04 17:26:11 +0400 |
commit | d26162380031d4e8f2cd4362799c8acbb91e6ebb (patch) | |
tree | 6abea0d78bd1d12cdb56a92f459db4c1a9bdc3b6 /extern/libmv/CMakeLists.txt | |
parent | 458ecaebf4ee1bf7e66978ff9fed89a35bba8f4f (diff) | |
parent | b7aefff198fddd8df0ca9149ec7cdcbb1034fa54 (diff) |
Camera tracking: merge hybrid tracker from tomato branch
Comment from Keir's commit:
Add a new hybrid region tracker for motion tracking to libmv, and
add it as an option (under "Hybrid") in the tracking settings. The
region tracker is a combination of brute force tracking for coarse
alignment, then refinement with the ESM/KLT algorithm already in
libmv that gives excellent subpixel precision (typically 1/50'th
of a pixel)
This also adds a new "brute force" region tracker which does a
brute force search through every pixel position in the destination
for the pattern in the first frame. It leverages SSE if available,
similar to the SAD tracker, to do this quickly. Currently it does
some unnecessary conversions to/from floating point that will get
fixed later.
The hybrid tracker glues the two trackers (brute & ESM) together
to get an overall better tracker. The algorithm is simple:
1. Track from frame 1 to frame 2 with the brute force tracker.
This tries every possible pixel position for the pattern from
frame 1 in frame 2. The position with the smallest
sum-of-absolute-differences is chosen. By definition, this
position is only accurate up to 1 pixel or so.
2. Using the result from 1, initialize a track with ESM. This does
a least-squares fit with subpixel precision.
3. If the ESM shift was more than 2 pixels, report failure.
4. If the ESM track shifted less than 2 pixels, then the track is
good and we're done. The rationale here is that if the
refinement stage shifts more than 1 pixel, then the brute force
result likely found some random position that's not a good fit.
svn command used: svn merge -r 42375:42376 -r 42377:42379 ^/branches/soc-2011-tomato
Diffstat (limited to 'extern/libmv/CMakeLists.txt')
-rw-r--r-- | extern/libmv/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt index 0349ad72000..0e74c41195b 100644 --- a/extern/libmv/CMakeLists.txt +++ b/extern/libmv/CMakeLists.txt @@ -53,6 +53,8 @@ set(SRC libmv/image/array_nd.cc libmv/tracking/pyramid_region_tracker.cc libmv/tracking/sad.cc + libmv/tracking/brute_region_tracker.cc + libmv/tracking/hybrid_region_tracker.cc libmv/tracking/esm_region_tracker.cc libmv/tracking/trklt_region_tracker.cc libmv/tracking/klt_region_tracker.cc @@ -100,6 +102,8 @@ set(SRC libmv/image/sample.h libmv/image/image.h libmv/tracking/region_tracker.h + libmv/tracking/brute_region_tracker.h + libmv/tracking/hybrid_region_tracker.h libmv/tracking/retrack_region_tracker.h libmv/tracking/sad.h libmv/tracking/pyramid_region_tracker.h |