diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-28 17:26:46 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-28 17:26:46 +0400 |
commit | a3623a046bdc10f80319c1bedf2740bda072f53a (patch) | |
tree | 78274ab89cf64645bc956ff5225845163ab99849 /source/blender/makesdna/DNA_tracking_types.h | |
parent | 911be02fcd5c818b626482e313cb9f37da2bf054 (diff) |
Camera tracking: merging tracking presets stuff from tomato branch
This commit implements:
- Configurable settings for newly creating tracks
Now it's possible to set tracking algorithm and it's settings for
all newly creating tracks including manual tracks creation and
tracks creation by "Detect Features" operator.
- Moves margin, frames limit and adjust frame inside per-track
settings.
Was request from Francois for this.
- Adjust Frames replaced with menu called Pattern Match where it's
possible to choose between matching pattern from keyframe frame
or from previously tracked frame.
Didn't see somebody used adjust frames values differ from 0 and 1,
and this menu should make things more clear here/
Diffstat (limited to 'source/blender/makesdna/DNA_tracking_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_tracking_types.h | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index cbac3721ac3..c795cea88fb 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -100,33 +100,40 @@ typedef struct MovieTrackingTrack { float color[3]; /* custom color for track */ /* tracking algorithm to use; can be KLT or SAD */ - short tracker; - char pad4[2]; + short frames_limit; /* number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set) */ + short margin; /* margin from frame boundaries */ + short pattern_match; /* re-adjust every N frames */ - /* ** SAD tracker settings ** */ - float minimum_correlation; /* minimal correlation which is still treated as successful tracking */ + short tracker; /* tracking algorithm used for this track */ /* ** KLT tracker settings ** */ - int pyramid_levels; /* number of pyramid levels to use for KLT tracking */ - char pad5[4]; + short pyramid_levels, pad2; /* number of pyramid levels to use for KLT tracking */ + + /* ** SAD tracker settings ** */ + float minimum_correlation; /* minimal correlation which is still treated as successful tracking */ } MovieTrackingTrack; typedef struct MovieTrackingSettings { + int flag; + + /* ** default tracker settings */ + short default_tracker; /* tracking algorithm used by default */ + short default_pyramid_levels; /* number of pyramid levels to use for KLT tracking */ + float default_minimum_correlation; /* minimal correlation which is still treated as successful tracking */ + short default_pattern_size; /* size of pattern area for new tracks */ + short default_search_size; /* size of search area for new tracks */ + short default_frames_limit; /* number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set) */ + short default_margin; /* margin from frame boundaries */ + short default_pattern_match; /* re-adjust every N frames */ + /* ** common tracker settings ** */ short speed; /* speed of tracking */ - short frames_limit; /* number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set) */ - short margin; /* margin from frame boundaries */ - char pad[2]; - - int adjframes; /* re-adjust every N frames */ /* ** reconstruction settings ** */ int keyframe1, keyframe2; /* two keyframes for reconstrution initialization */ /* ** which camera intrinsics to refine. uses on the REFINE_* flags */ - short refine_camera_intrinsics; - - char pad2[6]; + short refine_camera_intrinsics, pad2; /* ** tool settings ** */ @@ -135,7 +142,7 @@ typedef struct MovieTrackingSettings { /* cleanup */ int clean_frames, clean_action; - float clean_error; + float clean_error, pad; } MovieTrackingSettings; typedef struct MovieTrackingStabilization { @@ -167,8 +174,6 @@ typedef struct MovieTrackingReconstruction { typedef struct MovieTracking { MovieTrackingSettings settings; /* different tracking-related settings */ - char pad2[4]; - MovieTrackingCamera camera; /* camera intrinsics */ ListBase tracks; /* all tracks */ MovieTrackingReconstruction reconstruction; /* reconstruction data */ @@ -197,10 +202,17 @@ enum { #define TRACK_CUSTOMCOLOR (1<<7) #define TRACK_USE_2D_STAB (1<<8) -/* MovieTrackingSettings->tracker */ +/* MovieTrackingTrack->tracker */ #define TRACKER_KLT 0 #define TRACKER_SAD 1 +/* MovieTrackingTrack->adjframes */ +#define TRACK_MATCH_KEYFRAME 0 +#define TRACK_MATCH_PREVFRAME 1 + +/* MovieTrackingSettings->flag */ +#define TRACKING_SETTINGS_SHOW_DEFAULT_EXPANDED (1<<0) + /* MovieTrackingSettings->speed */ #define TRACKING_SPEED_FASTEST 0 #define TRACKING_SPEED_REALTIME 1 |