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:
Diffstat (limited to 'source/blender/blenkernel/tracking_private.h')
-rw-r--r--source/blender/blenkernel/tracking_private.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/source/blender/blenkernel/tracking_private.h b/source/blender/blenkernel/tracking_private.h
index 8de6ec93a7c..0c1f73fa4b6 100644
--- a/source/blender/blenkernel/tracking_private.h
+++ b/source/blender/blenkernel/tracking_private.h
@@ -78,12 +78,21 @@ void tracking_get_search_origin_frame_pixel(int frame_width,
const struct MovieTrackingMarker *marker,
float frame_pixel[2]);
+/**
+ * Each marker has 5 coordinates associated with it that get warped with
+ * tracking: the four corners ("pattern_corners"), and the center ("pos").
+ * This function puts those 5 points into the appropriate frame for tracking
+ * (the "search" coordinate frame).
+ */
void tracking_get_marker_coords_for_tracking(int frame_width,
int frame_height,
const struct MovieTrackingMarker *marker,
double search_pixel_x[5],
double search_pixel_y[5]);
+/**
+ * Inverse of #tracking_get_marker_coords_for_tracking.
+ */
void tracking_set_marker_coords_from_tracking(int frame_width,
int frame_height,
struct MovieTrackingMarker *marker,
@@ -92,11 +101,23 @@ void tracking_set_marker_coords_from_tracking(int frame_width,
/*********************** General purpose utility functions *************************/
+/**
+ * Place a disabled marker before or after specified ref_marker.
+ *
+ * If before is truth, disabled marker is placed before reference
+ * one, and it's placed after it otherwise.
+ *
+ * If there's already a marker at the frame where disabled one is expected to be placed,
+ * nothing will happen if overwrite is false.
+ */
void tracking_marker_insert_disabled(struct MovieTrackingTrack *track,
const struct MovieTrackingMarker *ref_marker,
bool before,
bool overwrite);
+/**
+ * Fill in Libmv C-API camera intrinsics options from tracking structure.
+ */
void tracking_cameraIntrinscisOptionsFromTracking(
struct MovieTracking *tracking,
int calibration_width,
@@ -109,17 +130,26 @@ void tracking_trackingCameraFromIntrinscisOptions(
struct libmv_TrackRegionOptions;
+/**
+ * Fill in libmv tracker options structure with settings need to be used to perform track.
+ */
void tracking_configure_tracker(const MovieTrackingTrack *track,
float *mask,
bool is_backwards,
struct libmv_TrackRegionOptions *options);
+/**
+ * Get previous keyframed marker.
+ */
struct MovieTrackingMarker *tracking_get_keyframed_marker(struct MovieTrackingTrack *track,
int current_frame,
bool backwards);
/*********************** Masking *************************/
+/**
+ * Region is in pixel space, relative to marker's center.
+ */
float *tracking_track_get_mask_for_region(int frame_width,
int frame_height,
const float region_min[2],
@@ -145,11 +175,13 @@ typedef struct TrackingImageAccessor {
SpinLock cache_lock;
} TrackingImageAccessor;
-/* Clips are used to access images of an actual footage.
+/**
+ * Clips are used to access images of an actual footage.
* Tracks are used to access masks associated with the tracks.
*
- * NOTE: Both clips and tracks arrays are copied into the image accessor. It means that the caller
- * is allowed to pass temporary arrays which are only valid during initialization. */
+ * \note Both clips and tracks arrays are copied into the image accessor. It means that the caller
+ * is allowed to pass temporary arrays which are only valid during initialization.
+ */
TrackingImageAccessor *tracking_image_accessor_new(MovieClip *clips[MAX_ACCESSOR_CLIP],
int num_clips,
MovieTrackingTrack **tracks,