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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-11-05 12:04:27 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-11-05 12:04:27 +0400
commit3bd7816c75215a0c2dc47a9014adab9d6ca431db (patch)
treeac744cb91f4ba80dcc87bbaf36d2181c24862bf7 /source/blender/blenkernel
parent008630abfc65ebc33be48f05a40694394f5be392 (diff)
Camera Tracking: allow fallback to reprojection resection by user demand
This fixes some "regressions" introduced in rev50781 which lead to much worse solution in some cases. Now it's possible to bring old behavior back. Perhaps it's more like temporal solution for time being smarter solution is found. But finding such a solution isn't so fast, so let's bring manual control over reprojection usage. But anyway, imo it's now nice to have a structure which could be used to pass different settings to the solver.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/tracking.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 26775eaac8c..89446a1856f 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -173,6 +173,7 @@ void BKE_tracking_settings_init(MovieTracking *tracking)
tracking->settings.default_search_size = 61;
tracking->settings.dist = 1;
tracking->settings.object_distance = 1;
+ tracking->settings.reconstruction_success_threshold = 1e-3;
tracking->stabilization.scaleinf = 1.0f;
tracking->stabilization.locinf = 1.0f;
@@ -2561,6 +2562,9 @@ typedef struct MovieReconstructContext {
TracksMap *tracks_map;
+ float success_threshold;
+ int use_fallback_reconstruction;
+
int sfra, efra;
} MovieReconstructContext;
@@ -2830,6 +2834,9 @@ MovieReconstructContext *BKE_tracking_reconstruction_context_new(MovieTracking *
context->k2 = camera->k2;
context->k3 = camera->k3;
+ context->success_threshold = tracking->settings.reconstruction_success_threshold;
+ context->use_fallback_reconstruction = tracking->settings.reconstruction_flag & TRACKING_USE_FALLBACK_RECONSTRUCTION;
+
context->tracks_map = tracks_map_new(context->object_name, context->is_camera, num_tracks, 0);
track = tracksbase->first;
@@ -2929,12 +2936,18 @@ void BKE_tracking_reconstruction_solve(MovieReconstructContext *context, short *
reconstruct_update_solve_cb, &progressdata);
}
else {
+ struct libmv_reconstructionOptions options;
+
+ options.success_threshold = context->success_threshold;
+ options.use_fallback_reconstruction = context->use_fallback_reconstruction;
+
context->reconstruction = libmv_solveReconstruction(context->tracks,
context->keyframe1, context->keyframe2,
context->refine_flags,
context->focal_length,
context->principal_point[0], context->principal_point[1],
context->k1, context->k2, context->k3,
+ &options,
reconstruct_update_solve_cb, &progressdata);
}