|
Blender V4.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 |
Functions | |
| struct TracksMap * | tracks_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 MovieTrackingMarker * | tracking_get_keyframed_marker (struct MovieTrackingTrack *track, int current_frame, bool backwards) |
| 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) |
| TrackingImageAccessor * | tracking_image_accessor_new (MovieClip *clips[MAX_ACCESSOR_CLIP], int num_clips, MovieTrackingTrack **tracks, int num_tracks) |
| void | tracking_image_accessor_destroy (TrackingImageAccessor *accessor) |
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 157 of file tracking_private.h.
Referenced by autotrack_context_init_image_accessor(), and tracking_image_accessor_new().
| typedef struct TrackingImageAccessor TrackingImageAccessor |
| typedef struct TracksMap TracksMap |
| 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 484 of file tracking_util.cc.
References BLI_system_thread_count(), distortion_model_parameters_from_tracking(), libmv_CameraIntrinsicsOptions::focal_length, libmv_CameraIntrinsicsOptions::image_height, libmv_CameraIntrinsicsOptions::image_width, int, libmv_CameraIntrinsicsOptions::num_threads, MovieTrackingCamera::pixel_aspect, libmv_CameraIntrinsicsOptions::principal_point_x, libmv_CameraIntrinsicsOptions::principal_point_y, and tracking_principal_point_normalized_to_pixel().
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 169 of file tracking_region_tracker.cc.
References MovieTrackingTrack::algorithm_flag, LIBMV_TRACK_REGION_BACKWARD, LIBMV_TRACK_REGION_FORWARD, mask(), MovieTrackingTrack::minimum_correlation, MovieTrackingTrack::motion_model, 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 530 of file tracking_util.cc.
References BKE_tracking_marker_get(), MovieTrackingMarker::flag, MARKER_DISABLED, MARKER_TRACKED, MovieTrackingTrack::markers, and next.
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 911 of file tracking_util.cc.
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.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().
| 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_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().
| 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] ) |
Definition at line 360 of file tracking_util.cc.
References float.
Referenced by BKE_tracking_camera_principal_point_pixel_set(), and tracking_trackingCameraFromIntrinscisOptions().
| 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 313 of file tracking_util.cc.
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 | ( | 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().
| void tracking_trackingCameraFromIntrinscisOptions | ( | struct MovieTracking * | tracking, |
| const struct libmv_CameraIntrinsicsOptions * | camera_intrinsics_options ) |
| void tracks_map_free | ( | struct TracksMap * | map | ) |
Definition at line 178 of file tracking_util.cc.
References BKE_tracking_track_free(), BLI_ghash_free(), BLI_spin_end(), and MEM_freeN().
Referenced by BKE_tracking_reconstruction_context_free().
Definition at line 69 of file tracking_util.cc.
| void tracks_map_insert | ( | struct TracksMap * | map, |
| struct MovieTrackingTrack * | track ) |
Definition at line 74 of file tracking_util.cc.
References BLI_ghash_insert(), 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 87 of file tracking_util.cc.
References 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, MovieTrackingTrack::markers, MEM_dupallocN, MEM_freeN(), MovieTrackingTrack::name, MovieTrackingTrack::next, next, offsetof, MovieTrackingTrack::pat_flag, MovieTrackingTrack::prev, MovieTrackingTrack::search_flag, and MovieTrackingObject::tracks.
Referenced by BKE_tracking_reconstruction_finish().
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().