Homography correction for track preview widget
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 9 Jun 2012 11:14:36 +0000 (11:14 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 9 Jun 2012 11:14:36 +0000 (11:14 +0000)
commit039acbbfef112e140a47dcab05a40d732d293deb
tree1f09f15a6052691edf805629865388493ad819e9
parentf9be7fca1747218323cc53a52842374229cdff4a
Homography correction for track preview widget

Use homography transformation for pattern displayed in track preview widget.
Sampling of this pattern happens to resolution of preview widget itself,
which implied some bigger changes in how scopes are working:

- Instead of real pattern store search area in BKE_movieclip_update_scopes,
  which is later used for sampling pattern.
- Sampling of pattern happens in ui_draw_but_TRACKPREVIEW from search area
  which allows to sample it to actual resolution of preview widget.
- If size of preview widget is not changing, this sampled pattern wouldn't
  be re-sampled until scopes are tagged to update.

There are some issues with pattern sampling which seems to happen SamplePlanarPatch,
changing linear sampling to nearest removes that unwanted 1px offset.

Left commented saving of sampled image in ui_draw_but_TRACKPREVIEW which should
help figuring the issue out.
13 files changed:
extern/libmv/libmv-capi.cpp
extern/libmv/libmv-capi.h
extern/libmv/libmv/tracking/track_region.cc
extern/libmv/libmv/tracking/track_region.h
source/blender/blenkernel/BKE_tracking.h
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenloader/intern/readfile.c
source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
source/blender/editors/interface/interface_draw.c
source/blender/editors/space_clip/space_clip.c
source/blender/makesdna/DNA_movieclip_types.h
source/blender/nodes/composite/nodes/node_composite_keyingscreen.c