Blender
V3.3
|
#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 |
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.
#define MAX_ACCESSOR_CLIP 64 |
Definition at line 147 of file tracking_private.h.
typedef struct TrackingImageAccessor TrackingImageAccessor |
void tracking_cameraIntrinscisOptionsFromTracking | ( | struct MovieTracking * | tracking, |
int | calibration_width, | ||
int | calibration_height, | ||
struct libmv_CameraIntrinsicsOptions * | camera_intrinsics_options | ||
) |
Fill in Libmv C-API camera intrinsics options from tracking structure.
Definition at line 498 of file tracking_util.c.
References BLI_system_thread_count(), MovieTracking::camera, camera, distortion_model_parameters_from_tracking(), libmv_CameraIntrinsicsOptions::focal_length, libmv_CameraIntrinsicsOptions::image_height, libmv_CameraIntrinsicsOptions::image_width, libmv_CameraIntrinsicsOptions::num_threads, MovieTrackingCamera::pixel_aspect, libmv_CameraIntrinsicsOptions::principal_point_x, and libmv_CameraIntrinsicsOptions::principal_point_y.
Referenced by BKE_tracking_distort_v2(), BKE_tracking_distortion_new(), BKE_tracking_distortion_update(), BKE_tracking_reconstruction_context_new(), and BKE_tracking_undistort_v2().
void tracking_configure_tracker | ( | const MovieTrackingTrack * | track, |
float * | mask, | ||
bool | is_backwards, | ||
struct libmv_TrackRegionOptions * | options | ||
) |
Fill in libmv tracker options structure with settings need to be used to perform track.
Definition at line 168 of file tracking_region_tracker.c.
References MovieTrackingTrack::algorithm_flag, LIBMV_TRACK_REGION_BACKWARD, LIBMV_TRACK_REGION_FORWARD, mask(), MovieTrackingTrack::minimum_correlation, MovieTrackingTrack::motion_model, NULL, options, TRACK_ALGORITHM_FLAG_USE_BRUTE, TRACK_ALGORITHM_FLAG_USE_MASK, and TRACK_ALGORITHM_FLAG_USE_NORMALIZATION.
Referenced by autotrack_context_init_tracks_for_clip(), and configure_and_run_tracker().
struct MovieTrackingMarker* tracking_get_keyframed_marker | ( | struct MovieTrackingTrack * | track, |
int | current_frame, | ||
bool | backwards | ||
) |
Get previous keyframed marker.
Definition at line 534 of file tracking_util.c.
References Freestyle::a, BKE_tracking_marker_get(), MovieTrackingMarker::flag, MARKER_DISABLED, MARKER_TRACKED, MovieTrackingTrack::markers, next, and NULL.
Referenced by dna_marker_to_libmv_marker(), and tracking_context_get_keyframed_ibuf().
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).
void tracking_get_search_origin_frame_pixel | ( | int | frame_width, |
int | frame_height, | ||
const struct MovieTrackingMarker * | marker, | ||
float | frame_pixel[2] | ||
) |
void tracking_image_accessor_destroy | ( | TrackingImageAccessor * | accessor | ) |
Definition at line 913 of file tracking_util.c.
References BLI_spin_end(), TrackingImageAccessor::cache_lock, TrackingImageAccessor::libmv_accessor, libmv_FrameAccessorDestroy(), MEM_freeN, and TrackingImageAccessor::tracks.
Referenced by BKE_autotrack_context_free().
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.
Definition at line 884 of file tracking_util.c.
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, MEM_callocN, MEM_malloc_arrayN, TrackingImageAccessor::num_clips, TrackingImageAccessor::num_tracks, tracks, and TrackingImageAccessor::tracks.
Referenced by autotrack_context_init_image_accessor().
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.
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] | ||
) |
Inverse of tracking_get_marker_coords_for_tracking.
Definition at line 351 of file tracking_util.c.
References MovieTrackingMarker::pattern_corners, MovieTrackingMarker::pos, and search_pixel_to_marker_unified().
Referenced by BKE_tracking_refine_marker().
float* tracking_track_get_mask_for_region | ( | int | frame_width, |
int | frame_height, | ||
const float | region_min[2], | ||
const float | region_max[2], | ||
MovieTrackingTrack * | track | ||
) |
Region is in pixel space, relative to marker's center.
Definition at line 1203 of file tracking.c.
References mask(), MEM_callocN, NULL, 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().
void tracking_trackingCameraFromIntrinscisOptions | ( | struct MovieTracking * | tracking, |
const struct libmv_CameraIntrinsicsOptions * | camera_intrinsics_options | ||
) |
Definition at line 208 of file tracking_util.c.
References BKE_tracking_track_free(), BLI_ghash_free(), BLI_spin_end(), map, MEM_freeN, and NULL.
Referenced by BKE_tracking_reconstruction_context_free().
void tracks_map_get_indexed_element | ( | struct TracksMap * | map, |
int | index, | ||
struct MovieTrackingTrack ** | track, | ||
void ** | customdata | ||
) |
Definition at line 82 of file tracking_util.c.
References map.
int tracks_map_get_size | ( | struct TracksMap * | map | ) |
Definition at line 77 of file tracking_util.c.
References map.
void tracks_map_insert | ( | struct TracksMap * | map, |
struct MovieTrackingTrack * | track, | ||
void * | customdata | ||
) |
Definition at line 94 of file tracking_util.c.
References BLI_ghash_insert(), map, MovieTrackingTrack::markers, and MEM_dupallocN.
Referenced by BKE_tracking_reconstruction_context_new().
void tracks_map_merge | ( | struct TracksMap * | map, |
struct MovieTracking * | tracking | ||
) |
Definition at line 111 of file tracking_util.c.
References Freestyle::a, BKE_tracking_object_add(), BKE_tracking_object_get_named(), BKE_tracking_track_duplicate(), BLI_addtail(), BLI_findindex(), BLI_ghash_lookup(), BLI_ghash_reinsert(), BLI_remlink(), BLI_spin_lock(), BLI_spin_unlock(), BLI_uniquename(), BLT_I18NCONTEXT_ID_MOVIECLIP, CTX_DATA_, ListBase::first, MovieTrackingTrack::flag, map, MovieTrackingTrack::markers, MEM_dupallocN, MEM_freeN, MovieTrackingTrack::name, MovieTrackingTrack::next, next, NULL, MovieTrackingTrack::pat_flag, MovieTrackingTrack::prev, MovieTrackingTrack::search_flag, tracks, and MovieTracking::tracks.
Referenced by BKE_tracking_reconstruction_finish().
struct TracksMap* tracks_map_new | ( | const char * | object_name, |
bool | is_camera, | ||
int | num_tracks, | ||
int | customdata_size | ||
) |
Definition at line 51 of file tracking_util.c.
References BLI_ghash_ptr_new(), BLI_spin_init(), BLI_strncpy(), map, and MEM_callocN.
Referenced by BKE_tracking_reconstruction_context_new().