91 track = tracksbase->
first;
100 float weight = track->
weight;
129 libmv_reconstruction);
151 bool origin_set =
false;
156 tracksbase = &tracking->
tracks;
162 tracksbase = &
object->tracks;
168 track = tracksbase->
first;
184 printf(
"Unable to reconstruct position for track #%d '%s'\n", tracknr, track->
name);
198 "temp reconstructed camera");
200 for (
int a = sfra;
a <= efra;
a++) {
208 for (
int i = 0; i < 4; i++) {
209 for (
int j = 0; j < 4; j++) {
210 mat[i][j] = matd[i][j];
240 printf(
"No camera for frame %d\n",
a);
251 track = tracksbase->
first;
311 int frame1 =
object->keyframe1, frame2 =
object->keyframe2;
314 track = tracksbase->
first;
342 N_(
"At least 8 common tracks on both keyframes are needed for reconstruction"),
350 BLI_strncpy(error_msg,
N_(
"Blender is compiled without motion tracking library"), error_size);
371 "MovieReconstructContext data");
375 int sfra = INT_MAX, efra = INT_MIN;
390 track = tracksbase->
first;
392 int first = 0, last = track->
markersnr - 1;
408 if (first <= track->markersnr - 1) {
425 context->keyframe1 = keyframe1;
426 context->keyframe2 = keyframe2;
429 context->error_message[0] =
'\0';
435 const char *error_message)
437 if (
context->error_message[0]) {
511 progressdata.
stop = stop;
521 &
context->camera_intrinsics_options,
522 &reconstruction_options,
528 &
context->camera_intrinsics_options,
529 &reconstruction_options,
533 if (
context->select_keyframes) {
555 context,
"Failed to solve the motion: most likely there are no good keyframes");
572 if (
context->select_keyframes) {
573 object->keyframe1 =
context->keyframe1;
574 object->keyframe2 =
context->keyframe2;
589 const float scale[3])
591 float first_camera_delta[3] = {0.0f, 0.0f, 0.0f};
606 sub_v3_v3(track->bundle_pos, first_camera_delta);
float evaluate_fcurve(struct FCurve *fcu, float evaltime)
struct FCurve * id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven)
float BKE_movieclip_remap_clip_to_scene_frame(const struct MovieClip *clip, float framenr)
struct MovieTrackingReconstruction * BKE_tracking_object_get_reconstruction(struct MovieTracking *tracking, struct MovieTrackingObject *object)
bool BKE_tracking_track_has_enabled_marker_at_frame(struct MovieTrackingTrack *track, int framenr)
void BKE_tracking_dopesheet_tag_update(struct MovieTracking *tracking)
struct MovieTrackingObject * BKE_tracking_object_get_named(struct MovieTracking *tracking, const char *name)
struct ListBase * BKE_tracking_object_get_tracks(struct MovieTracking *tracking, struct MovieTrackingObject *object)
#define LISTBASE_FOREACH(type, var, list)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m4(float m[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3(float r[3], const float a[3])
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
@ REFINE_TANGENTIAL_DISTORTION
@ REFINE_RADIAL_DISTORTION
struct MovieReconstructedCamera MovieReconstructedCamera
@ TRACKING_USE_KEYFRAME_SELECTION
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
Read Guarded memory(de)allocation.
StructRNA RNA_MovieTrackingTrack
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void libmv_cameraIntrinsicsExtractOptions(const libmv_CameraIntrinsics *libmv_intrinsics, libmv_CameraIntrinsicsOptions *camera_intrinsics_options)
struct libmv_CameraIntrinsics libmv_CameraIntrinsics
libmv_Reconstruction * libmv_solveReconstruction(const libmv_Tracks *libmv_tracks, const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options, libmv_ReconstructionOptions *libmv_reconstruction_options, reconstruct_progress_update_cb progress_update_callback, void *callback_customdata)
double libmv_reprojectionErrorForImage(const libmv_Reconstruction *libmv_reconstruction, int image)
libmv_CameraIntrinsics * libmv_reconstructionExtractIntrinsics(libmv_Reconstruction *libmv_reconstruction)
double libmv_reprojectionError(const libmv_Reconstruction *libmv_reconstruction)
void libmv_reconstructionDestroy(libmv_Reconstruction *libmv_reconstruction)
int libmv_reconstructionIsValid(libmv_Reconstruction *libmv_reconstruction)
int libmv_reprojectionCameraForImage(const libmv_Reconstruction *libmv_reconstruction, int image, double mat[4][4])
libmv_Reconstruction * libmv_solveModal(const libmv_Tracks *libmv_tracks, const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options, const libmv_ReconstructionOptions *libmv_reconstruction_options, reconstruct_progress_update_cb progress_update_callback, void *callback_customdata)
int libmv_reprojectionPointForTrack(const libmv_Reconstruction *libmv_reconstruction, int track, double pos[3])
double libmv_reprojectionErrorForTrack(const libmv_Reconstruction *libmv_reconstruction, int track)
@ LIBMV_REFINE_TANGENTIAL_DISTORTION
@ LIBMV_REFINE_FOCAL_LENGTH
@ LIBMV_REFINE_RADIAL_DISTORTION
@ LIBMV_REFINE_PRINCIPAL_POINT
struct libmv_Tracks libmv_Tracks
const ProjectiveReconstruction & reconstruction
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void error(const char *str)
struct SELECTID_Context context
struct MovieTracking tracking
struct libmv_Tracks * tracks
struct libmv_Reconstruction * reconstruction
char object_name[MAX_NAME]
libmv_CameraIntrinsicsOptions camera_intrinsics_options
int refine_camera_intrinsics
MovieTrackingMarker * markers
struct MovieTrackingTrack * next
MovieTrackingReconstruction reconstruction
MovieTrackingCamera camera
MovieTrackingSettings settings
void libmv_tracksDestroy(libmv_Tracks *)
libmv_Tracks * libmv_tracksNew(void)
void libmv_tracksInsert(libmv_Tracks *, int, int, double, double, double)
struct ReconstructProgressData ReconstructProgressData
static void reconstruct_update_solve_cb(void *customdata, double progress, const char *message)
static struct libmv_Tracks * libmv_tracks_new(MovieClip *clip, ListBase *tracksbase, int width, int height)
void BKE_tracking_reconstruction_context_free(MovieReconstructContext *context)
static void reconstruct_retrieve_libmv_intrinsics(MovieReconstructContext *context, MovieTracking *tracking)
bool BKE_tracking_reconstruction_finish(MovieReconstructContext *context, MovieTracking *tracking)
static int reconstruct_count_tracks_on_both_keyframes(MovieTracking *tracking, MovieTrackingObject *object)
void BKE_tracking_reconstruction_report_error_message(MovieReconstructContext *context, const char *error_message)
static bool reconstruct_retrieve_libmv_tracks(MovieReconstructContext *context, MovieTracking *tracking)
static int reconstruct_refine_intrinsics_get_flags(MovieTracking *tracking, MovieTrackingObject *object)
static int reconstruct_retrieve_libmv(MovieReconstructContext *context, MovieTracking *tracking)
void BKE_tracking_reconstruction_scale(MovieTracking *tracking, float scale[3])
const char * BKE_tracking_reconstruction_error_message_get(const MovieReconstructContext *context)
bool BKE_tracking_reconstruction_check(MovieTracking *tracking, MovieTrackingObject *object, char *error_msg, int error_size)
void BKE_tracking_reconstruction_solve(MovieReconstructContext *context, short *stop, short *do_update, float *progress, char *stats_message, int message_size)
static void tracking_scale_reconstruction(ListBase *tracksbase, MovieTrackingReconstruction *reconstruction, const float scale[3])
MovieReconstructContext * BKE_tracking_reconstruction_context_new(MovieClip *clip, MovieTrackingObject *object, int keyframe1, int keyframe2, int width, int height)
struct MovieReconstructContext MovieReconstructContext
static void reconstructionOptionsFromContext(libmv_ReconstructionOptions *reconstruction_options, MovieReconstructContext *context)
void tracking_cameraIntrinscisOptionsFromTracking(MovieTracking *tracking, int calibration_width, int calibration_height, libmv_CameraIntrinsicsOptions *camera_intrinsics_options)
void tracks_map_free(TracksMap *map, void(*customdata_free)(void *customdata))
void tracking_trackingCameraFromIntrinscisOptions(MovieTracking *tracking, const libmv_CameraIntrinsicsOptions *camera_intrinsics_options)
void tracks_map_insert(TracksMap *map, MovieTrackingTrack *track, void *customdata)
TracksMap * tracks_map_new(const char *object_name, bool is_camera, int num_tracks, int customdata_size)
void tracks_map_merge(TracksMap *map, MovieTracking *tracking)