Blender Git Loki
Git Commits -> Revision 232248d
Revision 232248d by Keir Mierle (master) December 3, 2011, 22:27 (GMT) |
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. |
Commit Details:
Full Hash: 232248d2e0cc988ebacd8f631b681a8abe14699d
SVN Revision: 42376
Parent Commit: b7aefff
Lines Changed: +514, -12
4 Added Paths:
/extern/libmv/libmv/tracking/brute_region_tracker.cc (+310, -0) (View)
/extern/libmv/libmv/tracking/brute_region_tracker.h (+46, -0) (View)
/extern/libmv/libmv/tracking/hybrid_region_tracker.cc (+67, -0) (View)
/extern/libmv/libmv/tracking/hybrid_region_tracker.h (+52, -0) (View)
/extern/libmv/libmv/tracking/brute_region_tracker.h (+46, -0) (View)
/extern/libmv/libmv/tracking/hybrid_region_tracker.cc (+67, -0) (View)
/extern/libmv/libmv/tracking/hybrid_region_tracker.h (+52, -0) (View)
6 Modified Paths:
/extern/libmv/CMakeLists.txt (+4, -0) (Diff)
/extern/libmv/libmv-capi.cpp (+25, -8) (Diff)
/extern/libmv/libmv-capi.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/tracking.c (+6, -3) (Diff)
/source/blender/makesdna/DNA_tracking_types.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_tracking.c (+1, -0) (Diff)
/extern/libmv/libmv-capi.cpp (+25, -8) (Diff)
/extern/libmv/libmv-capi.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/tracking.c (+6, -3) (Diff)
/source/blender/makesdna/DNA_tracking_types.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_tracking.c (+1, -0) (Diff)