Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeir Mierle <mierle@gmail.com>2011-12-04 02:27:32 +0400
committerKeir Mierle <mierle@gmail.com>2011-12-04 02:27:32 +0400
commit232248d2e0cc988ebacd8f631b681a8abe14699d (patch)
treead9ae5cf07461b90b944608d40aeb3c6a5ce6f79 /source/blender/makesrna/intern/rna_tracking.c
parentb7aefff198fddd8df0ca9149ec7cdcbb1034fa54 (diff)
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_tracking.c')
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 89c17819265..5a2ef54cfc1 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -269,6 +269,7 @@ static MovieTrackingMarker *rna_trackingTrack_marker_find_frame(MovieTrackingTra
static EnumPropertyItem tracker_items[] = {
{TRACKER_KLT, "KLT", 0, "KLT", "Kanade–Lucas–Tomasi tracker which works with most of video clips, a bit slower than SAD"},
{TRACKER_SAD, "SAD", 0, "SAD", "Sum of Absolute Differences tracker which can be used when KLT tracker fails"},
+ {TRACKER_HYBRID, "Hybrid", 0, "Hybrid", "A hybrid tracker that uses SAD for rough tracking, KLT for refinement."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem pattern_match_items[] = {