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:
Diffstat (limited to 'intern/libmv')
-rw-r--r--intern/libmv/intern/reconstruction.cc23
-rw-r--r--intern/libmv/intern/track_region.cc2
2 files changed, 15 insertions, 10 deletions
diff --git a/intern/libmv/intern/reconstruction.cc b/intern/libmv/intern/reconstruction.cc
index e271d663c4a..64f00b19df0 100644
--- a/intern/libmv/intern/reconstruction.cc
+++ b/intern/libmv/intern/reconstruction.cc
@@ -264,15 +264,15 @@ libmv_Reconstruction *libmv_solveReconstruction(
update_callback.invoke(0, "Selecting keyframes");
- selectTwoKeyframesBasedOnGRICAndVariance(tracks,
+ if (selectTwoKeyframesBasedOnGRICAndVariance(tracks,
normalized_tracks,
*camera_intrinsics,
keyframe1,
- keyframe2);
-
- /* so keyframes in the interface would be updated */
- libmv_reconstruction_options->keyframe1 = keyframe1;
- libmv_reconstruction_options->keyframe2 = keyframe2;
+ keyframe2)) {
+ /* so keyframes in the interface would be updated */
+ libmv_reconstruction_options->keyframe1 = keyframe1;
+ libmv_reconstruction_options->keyframe2 = keyframe2;
+ }
}
/* Actual reconstruction. */
@@ -283,7 +283,7 @@ libmv_Reconstruction *libmv_solveReconstruction(
LG << "number of markers for init: " << keyframe_markers.size();
- if (keyframe_markers.size() < 8) {
+ if (keyframe_markers.size() < 16) {
LG << "No enough markers to initialize from";
libmv_reconstruction->is_valid = false;
return libmv_reconstruction;
@@ -291,13 +291,18 @@ libmv_Reconstruction *libmv_solveReconstruction(
update_callback.invoke(0, "Initial reconstruction");
- EuclideanReconstructTwoFrames(keyframe_markers, &reconstruction);
+ if (!EuclideanReconstructTwoFrames(keyframe_markers, &reconstruction)) {
+ LG << "Failed to initialize reconstruction";
+ libmv_reconstruction->is_valid = false;
+ return libmv_reconstruction;
+ }
+
EuclideanBundle(normalized_tracks, &reconstruction);
EuclideanCompleteReconstruction(normalized_tracks,
&reconstruction,
&update_callback);
- /* Refinement/ */
+ /* Refinement. */
if (libmv_reconstruction_options->refine_intrinsics) {
libmv_solveRefineIntrinsics(
tracks,
diff --git a/intern/libmv/intern/track_region.cc b/intern/libmv/intern/track_region.cc
index 565d9ac1af7..2a3909c0ced 100644
--- a/intern/libmv/intern/track_region.cc
+++ b/intern/libmv/intern/track_region.cc
@@ -28,7 +28,7 @@
#undef DUMP_FAILURE
/* define this to generate PNG images with content of search areas
- on every itteration of tracking */
+ on every iteration of tracking */
#undef DUMP_ALWAYS
using libmv::FloatImage;