Blender V4.3
tracking_private.h File Reference
#include "BLI_threads.h"

Go to the source code of this file.

Classes

struct  TracksMap
 
struct  TrackingImageAccessor
 

Macros

#define MAX_ACCESSOR_CLIP   64
 

Typedefs

typedef struct TracksMap TracksMap
 
typedef struct TrackingImageAccessor TrackingImageAccessor
 

Functions

struct TracksMaptracks_map_new (const char *object_name, int num_tracks)
 
int tracks_map_get_size (struct TracksMap *map)
 
void tracks_map_insert (struct TracksMap *map, struct MovieTrackingTrack *track)
 
void tracks_map_free (struct TracksMap *map)
 
void tracks_map_merge (struct TracksMap *map, struct MovieTracking *tracking)
 
void tracking_get_search_origin_frame_pixel (int frame_width, int frame_height, const struct MovieTrackingMarker *marker, float frame_pixel[2])
 
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])
 
void tracking_set_marker_coords_from_tracking (int frame_width, int frame_height, struct MovieTrackingMarker *marker, const double search_pixel_x[5], const double search_pixel_y[5])
 
void tracking_principal_point_normalized_to_pixel (const float principal_point_normalized[2], int frame_width, int frame_height, float r_principal_point_pixel[2])
 
void tracking_principal_point_pixel_to_normalized (const float principal_point_pixel[2], int frame_width, int frame_height, float r_principal_point_normalized[2])
 
void tracking_marker_insert_disabled (struct MovieTrackingTrack *track, const struct MovieTrackingMarker *ref_marker, bool before, bool overwrite)
 
void tracking_cameraIntrinscisOptionsFromTracking (struct MovieTracking *tracking, int calibration_width, int calibration_height, struct libmv_CameraIntrinsicsOptions *camera_intrinsics_options)
 
void tracking_trackingCameraFromIntrinscisOptions (struct MovieTracking *tracking, const struct libmv_CameraIntrinsicsOptions *camera_intrinsics_options)
 
void tracking_configure_tracker (const MovieTrackingTrack *track, float *mask, bool is_backwards, struct libmv_TrackRegionOptions *options)
 
struct MovieTrackingMarkertracking_get_keyframed_marker (struct MovieTrackingTrack *track, int current_frame, bool backwards)
 
floattracking_track_get_mask_for_region (const int frame_width, const int frame_height, const float region_min[2], const float region_max[2], const MovieTrackingTrack *track)
 
TrackingImageAccessortracking_image_accessor_new (MovieClip *clips[MAX_ACCESSOR_CLIP], int num_clips, MovieTrackingTrack **tracks, int num_tracks)
 
void tracking_image_accessor_destroy (TrackingImageAccessor *accessor)
 

Detailed Description

This file contains declarations of function which are used by multiple tracking files but which should not be public.

Definition in file tracking_private.h.

Macro Definition Documentation

◆ MAX_ACCESSOR_CLIP

#define MAX_ACCESSOR_CLIP   64

Typedef Documentation

◆ TrackingImageAccessor

typedef struct TrackingImageAccessor TrackingImageAccessor

◆ TracksMap

typedef struct TracksMap TracksMap

Function Documentation

◆ tracking_cameraIntrinscisOptionsFromTracking()

◆ tracking_configure_tracker()

void tracking_configure_tracker ( const MovieTrackingTrack * track,
float * mask,
bool is_backwards,
struct libmv_TrackRegionOptions * options )

◆ tracking_get_keyframed_marker()

struct MovieTrackingMarker * tracking_get_keyframed_marker ( struct MovieTrackingTrack * track,
int current_frame,
bool backwards )

◆ tracking_get_marker_coords_for_tracking()

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] )

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).

◆ tracking_get_search_origin_frame_pixel()

void tracking_get_search_origin_frame_pixel ( int frame_width,
int frame_height,
const struct MovieTrackingMarker * marker,
float frame_pixel[2] )

◆ tracking_image_accessor_destroy()

◆ tracking_image_accessor_new()

TrackingImageAccessor * tracking_image_accessor_new ( MovieClip * clips[MAX_ACCESSOR_CLIP],
int num_clips,
MovieTrackingTrack ** tracks,
int num_tracks )

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.

Definition at line 884 of file tracking_util.cc.

References accessor_get_image_callback(), accessor_get_mask_for_track_callback(), accessor_release_image_callback(), accessor_release_mask_callback(), BLI_assert, BLI_spin_init(), TrackingImageAccessor::cache_lock, TrackingImageAccessor::clips, TrackingImageAccessor::libmv_accessor, libmv_FrameAccessorNew(), MAX_ACCESSOR_CLIP, TrackingImageAccessor::num_clips, TrackingImageAccessor::num_tracks, and TrackingImageAccessor::tracks.

Referenced by autotrack_context_init_image_accessor().

◆ tracking_marker_insert_disabled()

void tracking_marker_insert_disabled ( struct MovieTrackingTrack * track,
const struct MovieTrackingMarker * ref_marker,
bool before,
bool overwrite )

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.

◆ tracking_principal_point_normalized_to_pixel()

void tracking_principal_point_normalized_to_pixel ( const float principal_point_normalized[2],
int frame_width,
int frame_height,
float r_principal_point_pixel[2] )

Convert the lens principal point (optical center) between normalized and pixel spaces.

The normalized space stores principal point relative to the frame center which has normalized principal coordinate of (0, 0). The right top corner of the frame corresponds to a normalized principal coordinate of (1, 1), and the left bottom corner corresponds to coordinate of (-1, -1).

The pixel space is measured in pixels, with the reference being the left bottom corner of the frame.

Definition at line 348 of file tracking_util.cc.

References float.

Referenced by BKE_tracking_camera_principal_point_pixel_get(), BKE_tracking_camera_shift_get(), BKE_tracking_distort_v2(), BKE_tracking_distortion_new(), BKE_tracking_distortion_update(), BKE_tracking_undistort_v2(), and tracking_cameraIntrinscisOptionsFromTracking().

◆ tracking_principal_point_pixel_to_normalized()

void tracking_principal_point_pixel_to_normalized ( const float principal_point_pixel[2],
int frame_width,
int frame_height,
float r_principal_point_normalized[2] )

◆ tracking_set_marker_coords_from_tracking()

void tracking_set_marker_coords_from_tracking ( int frame_width,
int frame_height,
struct MovieTrackingMarker * marker,
const double search_pixel_x[5],
const double search_pixel_y[5] )

◆ tracking_track_get_mask_for_region()

float * tracking_track_get_mask_for_region ( const int frame_width,
const int frame_height,
const float region_min[2],
const float region_max[2],
const MovieTrackingTrack * track )

Region is in pixel space, relative to marker's center.

Definition at line 1136 of file tracking.cc.

References mask(), track_mask_gpencil_layer_get(), and track_mask_gpencil_layer_rasterize().

Referenced by accessor_get_mask_for_track_callback(), and BKE_tracking_track_get_mask().

◆ tracking_trackingCameraFromIntrinscisOptions()

void tracking_trackingCameraFromIntrinscisOptions ( struct MovieTracking * tracking,
const struct libmv_CameraIntrinsicsOptions * camera_intrinsics_options )

◆ tracks_map_free()

void tracks_map_free ( struct TracksMap * map)

◆ tracks_map_get_size()

int tracks_map_get_size ( struct TracksMap * map)

Definition at line 69 of file tracking_util.cc.

◆ tracks_map_insert()

void tracks_map_insert ( struct TracksMap * map,
struct MovieTrackingTrack * track )

◆ tracks_map_merge()

◆ tracks_map_new()

struct TracksMap * tracks_map_new ( const char * object_name,
int num_tracks )

Definition at line 52 of file tracking_util.cc.

References BLI_ghash_ptr_new(), BLI_spin_init(), and STRNCPY.

Referenced by BKE_tracking_reconstruction_context_new().