[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42222] branches/bmesh/blender: svn merge ^/trunk/blender -r42197:42221

Campbell Barton ideasman42 at gmail.com
Mon Nov 28 18:09:23 CET 2011


Revision: 42222
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42222
Author:   campbellbarton
Date:     2011-11-28 17:09:13 +0000 (Mon, 28 Nov 2011)
Log Message:
-----------
svn merge ^/trunk/blender -r42197:42221

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42197

Modified Paths:
--------------
    branches/bmesh/blender/extern/libmv/CMakeLists.txt
    branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/pipeline.cc
    branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/pipeline.h
    branches/bmesh/blender/extern/libmv/libmv-capi.cpp
    branches/bmesh/blender/extern/libmv/libmv-capi.h
    branches/bmesh/blender/release/scripts/startup/bl_operators/presets.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_clip.py
    branches/bmesh/blender/source/blender/blenkernel/BKE_depsgraph.h
    branches/bmesh/blender/source/blender/blenkernel/BKE_scene.h
    branches/bmesh/blender/source/blender/blenkernel/BKE_tracking.h
    branches/bmesh/blender/source/blender/blenkernel/intern/BME_tools.c
    branches/bmesh/blender/source/blender/blenkernel/intern/depsgraph.c
    branches/bmesh/blender/source/blender/blenkernel/intern/movieclip.c
    branches/bmesh/blender/source/blender/blenkernel/intern/scene.c
    branches/bmesh/blender/source/blender/blenkernel/intern/tracking.c
    branches/bmesh/blender/source/blender/blenloader/intern/readfile.c
    branches/bmesh/blender/source/blender/bmesh/editmesh_tools.c
    branches/bmesh/blender/source/blender/editors/include/ED_render.h
    branches/bmesh/blender/source/blender/editors/include/ED_view3d.h
    branches/bmesh/blender/source/blender/editors/mesh/bmesh_select.c
    branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
    branches/bmesh/blender/source/blender/editors/render/render_update.c
    branches/bmesh/blender/source/blender/editors/space_clip/clip_draw.c
    branches/bmesh/blender/source/blender/editors/space_clip/tracking_ops.c
    branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c
    branches/bmesh/blender/source/blender/editors/space_view3d/view3d_select.c
    branches/bmesh/blender/source/blender/makesdna/DNA_tracking_types.h
    branches/bmesh/blender/source/blender/makesrna/intern/rna_modifier.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_scene_api.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_tracking.c
    branches/bmesh/blender/source/blender/render/intern/source/rendercore.c
    branches/bmesh/blender/source/blender/windowmanager/CMakeLists.txt
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_event_system.c
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_init_exit.c
    branches/bmesh/blender/source/blenderplayer/CMakeLists.txt

Added Paths:
-----------
    branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/callbacks.cc
    branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/callbacks.h
    branches/bmesh/blender/release/scripts/presets/tracking_settings/
    branches/bmesh/blender/release/scripts/presets/tracking_settings/blurry_movie.py
    branches/bmesh/blender/release/scripts/presets/tracking_settings/default.py
    branches/bmesh/blender/release/scripts/presets/tracking_settings/fast_motion.py

Removed Paths:
-------------
    branches/bmesh/blender/release/scripts/presets/tracking_settings/blurry_movie.py
    branches/bmesh/blender/release/scripts/presets/tracking_settings/default.py
    branches/bmesh/blender/release/scripts/presets/tracking_settings/fast_motion.py

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/
    branches/bmesh/blender/source/blender/editors/space_outliner/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517
/trunk/blender:39992-42197
   + /branches/soc-2011-cucumber:37517
/trunk/blender:39992-42221

Modified: branches/bmesh/blender/extern/libmv/CMakeLists.txt
===================================================================
--- branches/bmesh/blender/extern/libmv/CMakeLists.txt	2011-11-28 16:44:17 UTC (rev 42221)
+++ branches/bmesh/blender/extern/libmv/CMakeLists.txt	2011-11-28 17:09:13 UTC (rev 42222)
@@ -39,6 +39,7 @@
 	libmv-capi.cpp
 	libmv/numeric/numeric.cc
 	libmv/numeric/poly.cc
+	libmv/simple_pipeline/callbacks.cc
 	libmv/simple_pipeline/reconstruction.cc
 	libmv/simple_pipeline/resect.cc
 	libmv/simple_pipeline/intersect.cc
@@ -83,6 +84,7 @@
 	libmv/numeric/poly.h
 	libmv/numeric/function_derivative.h
 	libmv/numeric/numeric.h
+	libmv/simple_pipeline/callbacks.h
 	libmv/simple_pipeline/resect.h
 	libmv/simple_pipeline/reconstruction.h
 	libmv/simple_pipeline/camera_intrinsics.h

Copied: branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/callbacks.cc (from rev 42221, trunk/blender/extern/libmv/libmv/simple_pipeline/callbacks.cc)
===================================================================
--- branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/callbacks.cc	                        (rev 0)
+++ branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/callbacks.cc	2011-11-28 17:09:13 UTC (rev 42222)
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 libmv authors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+
+#include "libmv/simple_pipeline/callbacks.h"
+
+namespace libmv {
+
+void ProgressUpdateCallback::invoke(double progress, const char* message)
+{
+}
+
+} // namespace libmv

Copied: branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/callbacks.h (from rev 42221, trunk/blender/extern/libmv/libmv/simple_pipeline/callbacks.h)
===================================================================
--- branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/callbacks.h	                        (rev 0)
+++ branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/callbacks.h	2011-11-28 17:09:13 UTC (rev 42222)
@@ -0,0 +1,33 @@
+// Copyright (c) 2011 libmv authors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+
+#ifndef LIBMV_SIMPLE_PIPELINE_CALLBACKS_H_
+#define LIBMV_SIMPLE_PIPELINE_CALLBACKS_H_
+
+namespace libmv {
+
+class ProgressUpdateCallback {
+ public:
+  virtual void invoke(double progress, const char *message);
+};
+
+}  // namespace libmv
+
+#endif  // LIBMV_SIMPLE_PIPELINE_MARKERS_H_

Modified: branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/pipeline.cc
===================================================================
--- branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/pipeline.cc	2011-11-28 16:44:17 UTC (rev 42221)
+++ branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/pipeline.cc	2011-11-28 17:09:13 UTC (rev 42222)
@@ -21,6 +21,7 @@
 #include <cstdio>
 
 #include "libmv/logging/logging.h"
+#include "libmv/simple_pipeline/pipeline.h"
 #include "libmv/simple_pipeline/bundle.h"
 #include "libmv/simple_pipeline/intersect.h"
 #include "libmv/simple_pipeline/resect.h"
@@ -117,14 +118,32 @@
 
 }  // namespace
 
+static void CompleteReconstructionLogProress(ProgressUpdateCallback *update_callback,
+    double progress,
+    const char *step = NULL)
+{
+  if(update_callback) {
+    char message[256];
+
+    if(step)
+      snprintf(message, sizeof(message), "Completing solution %d%% | %s", (int)(progress*100), step);
+    else
+      snprintf(message, sizeof(message), "Completing solution %d%%", (int)(progress*100));
+
+    update_callback->invoke(progress, message);
+  }
+}
+
 template<typename PipelineRoutines>
 void InternalCompleteReconstruction(
     const Tracks &tracks,
-    typename PipelineRoutines::Reconstruction *reconstruction) {
+    typename PipelineRoutines::Reconstruction *reconstruction,
+    ProgressUpdateCallback *update_callback = NULL) {
   int max_track = tracks.MaxTrack();
   int max_image = tracks.MaxImage();
   int num_resects = -1;
   int num_intersects = -1;
+  int tot_resects = 0;
   LG << "Max track: " << max_track;
   LG << "Max image: " << max_image;
   LG << "Number of markers: " << tracks.NumMarkers();
@@ -148,12 +167,17 @@
       LG << "Got " << reconstructed_markers.size()
          << " reconstructed markers for track " << track;
       if (reconstructed_markers.size() >= 2) {
+        CompleteReconstructionLogProress(update_callback,
+                                         (double)tot_resects/(max_image));
         PipelineRoutines::Intersect(reconstructed_markers, reconstruction);
         num_intersects++;
         LG << "Ran Intersect() for track " << track;
       }
     }
     if (num_intersects) {
+      CompleteReconstructionLogProress(update_callback,
+                                       (double)tot_resects/(max_image),
+                                       "Bundling...");
       PipelineRoutines::Bundle(tracks, reconstruction);
       LG << "Ran Bundle() after intersections.";
     }
@@ -178,8 +202,11 @@
       LG << "Got " << reconstructed_markers.size()
          << " reconstructed markers for image " << image;
       if (reconstructed_markers.size() >= 5) {
+        CompleteReconstructionLogProress(update_callback,
+                                         (double)tot_resects/(max_image));
         if (PipelineRoutines::Resect(reconstructed_markers, reconstruction, false)) {
           num_resects++;
+          tot_resects++;
           LG << "Ran Resect() for image " << image;
         } else {
           LG << "Failed Resect() for image " << image;
@@ -187,6 +214,9 @@
       }
     }
     if (num_resects) {
+      CompleteReconstructionLogProress(update_callback,
+                                       (double)tot_resects/(max_image),
+                                       "Bundling...");
       PipelineRoutines::Bundle(tracks, reconstruction);
     }
     LG << "Did " << num_resects << " resects.";
@@ -208,6 +238,8 @@
       }
     }
     if (reconstructed_markers.size() >= 5) {
+      CompleteReconstructionLogProress(update_callback,
+                                       (double)tot_resects/(max_image));
       if (PipelineRoutines::Resect(reconstructed_markers, reconstruction, true)) {
         num_resects++;
         LG << "Ran Resect() for image " << image;
@@ -217,6 +249,9 @@
     }
   }
   if (num_resects) {
+    CompleteReconstructionLogProress(update_callback,
+                                     (double)tot_resects/(max_image),
+                                     "Bundling...");
     PipelineRoutines::Bundle(tracks, reconstruction);
   }
 }
@@ -244,7 +279,7 @@
         PipelineRoutines::ProjectMarker(*point, *camera, intrinsics);
     double ex = reprojected_marker.x - markers[i].x;
     double ey = reprojected_marker.y - markers[i].y;
-
+#if 0
     const int N = 100;
     char line[N];
     snprintf(line, N,
@@ -262,6 +297,7 @@
            ex,
            ey,
            sqrt(ex*ex + ey*ey));
+#endif
     total_error += sqrt(ex*ex + ey*ey);
   }
   LG << "Skipped " << num_skipped << " markers.";
@@ -289,9 +325,11 @@
 }
 
 void EuclideanCompleteReconstruction(const Tracks &tracks,
-                                     EuclideanReconstruction *reconstruction) {
+                                     EuclideanReconstruction *reconstruction,
+                                     ProgressUpdateCallback *update_callback) {
   InternalCompleteReconstruction<EuclideanPipelineRoutines>(tracks,
-                                                            reconstruction);
+                                                            reconstruction,
+                                                            update_callback);
 }
 
 void ProjectiveCompleteReconstruction(const Tracks &tracks,

Modified: branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/pipeline.h
===================================================================
--- branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/pipeline.h	2011-11-28 16:44:17 UTC (rev 42221)
+++ branches/bmesh/blender/extern/libmv/libmv/simple_pipeline/pipeline.h	2011-11-28 17:09:13 UTC (rev 42222)
@@ -21,6 +21,7 @@
 #ifndef LIBMV_SIMPLE_PIPELINE_PIPELINE_H_

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list