Add light-normalized tracking to the planar tracker
authorKeir Mierle <mierle@gmail.com>
Fri, 18 May 2012 02:12:47 +0000 (02:12 +0000)
committerKeir Mierle <mierle@gmail.com>
Fri, 18 May 2012 02:12:47 +0000 (02:12 +0000)
commit7414ccfeeb745ef0e86ee010137865b5398d10a0
tree85714624885df2a406e38e7e3b25adfd79319067
parentd38f2bc99fa274fbc957b504bbaf7fa9ec07d39e
Add light-normalized tracking to the planar tracker

This commit adds the ability to normalize patterns by their
average value while tracking, to make them invariant to global
illumination changes.

To see this in action, check out the "Lobby" scene from Hollywood
VFX. If you track the markers that are shadowed by the actress,
previously they would not track. With the scale adaption on, the
tracker would shrink the area to compensate for the changed
illumination, losing the track. With "Normalize" turned on, the
patch is correctly tracked and scale is maintained.

A remaining problem is that only the Ceres cost function is
updated to handle the normalization. The brute translation search
does not take this into account. Perhaps "Prepass" (see below)
should get disabled if normalization is enabled until I fix the
prepass to normalize as well.

There are a few other changes:

- Cleanups in tracking RNA comments.

- Bail out of the sampling loop early if the mask is zero; this
  saves expensive samples of the image derivatives.

- Rename the wordy "Translation initialization" to "Prepass" at
  Sebastian's suggestion.

- Fix a bug where the mask was ignored when sampling in the cost
  functor.
extern/libmv/libmv-capi.cpp
extern/libmv/libmv-capi.h
extern/libmv/libmv/tracking/track_region.cc
extern/libmv/libmv/tracking/track_region.h
release/scripts/startup/bl_ui/space_clip.py
source/blender/blenkernel/intern/tracking.c
source/blender/makesdna/DNA_tracking_types.h
source/blender/makesrna/intern/rna_tracking.c