[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46470] branches/soc-2011-tomato: Initial Ceres integration into Blender

Sergey Sharybin sergey.vfx at gmail.com
Wed May 9 17:39:54 CEST 2012


Revision: 46470
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46470
Author:   nazgul
Date:     2012-05-09 15:39:54 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Initial Ceres integration into Blender

Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.

Integration details:

- Even CMake build files are not re-used from Ceres's trunk: they're using some
  automatic stuff detection like glog, pthreads, protobuf and so and it's not
  so clear how to re-use that files without modifications.
  And IMO it's easier if build files are getting re-generated automatically to
  match Blender-specific setup rather than keeping changes made locally in
  Blender in sync when re-bundling Ceres library. Especially in case when it's
  alerady needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
  to have them, but they'll need clear integration with current module test stuff
  in Blender.
  Hopefully integration went smooth.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
  making cholmod working fine on windows. Would be added in future
- collections_port.cc was also stripped. It's not used by Ceres's upstream and
  it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
  also not sure if it makes sense having them switchable on and off -- IMO better
  to have single configuration which works and does not require special tweaks
  after everything was set up.
- Personally i'd say if some of Ceres modules are not used better to drop it
  away -- all symbols would be stripped anyway, but it'll be waste of compilation
  time which is annoying in cases when one doing, say, binary search of revision
  at which some regression was introduced. Especially when it's easy to add modules
  which should be used by Blender.
  But as long as it stays in Tomato i'm not worrying much about this.

To bundle updated version of Ceres:

- You'll need to use GIT-SVN checkout,
  Re-bundling Ceres using SVN is still NOT supported!
- Go to extern/libmv/third_party/ceres folder
- Run ./bundle.sh

This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.

If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./mkfiles.sh from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.

Thanks all Ceres developers for this library and thanks to Keir Mierle with
help integrating Ceres into Blender!

Modified Paths:
--------------
    branches/soc-2011-tomato/extern/libmv/CMakeLists.txt
    branches/soc-2011-tomato/extern/libmv/ChangeLog
    branches/soc-2011-tomato/extern/libmv/SConscript
    branches/soc-2011-tomato/extern/libmv/bundle.sh
    branches/soc-2011-tomato/extern/libmv/libmv/image/convolve.cc
    branches/soc-2011-tomato/extern/libmv/libmv/image/convolve.h
    branches/soc-2011-tomato/extern/libmv/mkfiles.sh
    branches/soc-2011-tomato/source/blenderplayer/CMakeLists.txt
    branches/soc-2011-tomato/source/creator/CMakeLists.txt

Added Paths:
-----------
    branches/soc-2011-tomato/extern/libmv/third_party/CMakeLists.txt
    branches/soc-2011-tomato/extern/libmv/third_party/SConscript
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/CMakeLists.txt
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/ChangeLog
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/LICENSE
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/README
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/SConscript
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/bundle.sh
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/files.txt
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/autodiff_cost_function.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/ceres.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/conditioned_cost_function.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/cost_function.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/internal/
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/internal/autodiff.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/internal/eigen.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/internal/fixed_array.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/internal/macros.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/internal/manual_constructor.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/internal/port.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/internal/scoped_ptr.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/iteration_callback.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/jet.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/local_parameterization.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/loss_function.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/normal_prior.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/numeric_diff_cost_function.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/problem.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/rotation.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/sized_cost_function.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/solver.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/include/ceres/types.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_evaluate_preparer.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_evaluate_preparer.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_jacobian_writer.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_jacobian_writer.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_random_access_dense_matrix.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_random_access_dense_matrix.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_random_access_matrix.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_random_access_matrix.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_random_access_sparse_matrix.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_random_access_sparse_matrix.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_structure.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/block_structure.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/canonical_views_clustering.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/canonical_views_clustering.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/casts.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/cgnr_linear_operator.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/collections_port.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/compressed_row_jacobian_writer.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/compressed_row_jacobian_writer.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/conditioned_cost_function.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/conjugate_gradients_solver.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/conjugate_gradients_solver.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/corrector.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/corrector.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/dense_jacobian_writer.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/detect_structure.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/detect_structure.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/evaluator.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/evaluator.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/file.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/file.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_2.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_3.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_4.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_d.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_3.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_4.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_9.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_d.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_3.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_4.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_d.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_2.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_3.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_4.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_d.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_d_d_d.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/gradient_checking_cost_function.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/gradient_checking_cost_function.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/graph.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/graph_algorithms.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/integral_types.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/levenberg_marquardt.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/levenberg_marquardt.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/linear_operator.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/linear_operator.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/linear_solver.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/linear_solver.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/local_parameterization.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/loss_function.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/map_util.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/matrix_proto.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/minimizer.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/mutex.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/normal_prior.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/parameter_block.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/problem.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/problem_impl.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/problem_impl.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/program.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/program.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/program_evaluator.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/random.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/residual_block.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/residual_block.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/residual_block_utils.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/residual_block_utils.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/runtime_numeric_diff_cost_function.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/runtime_numeric_diff_cost_function.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator_impl.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/schur_ordering.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/schur_ordering.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/scratch_evaluate_preparer.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/scratch_evaluate_preparer.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/solver.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/solver_impl.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/solver_impl.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/sparse_matrix.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/sparse_matrix.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/split.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/stl_util.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/stringprintf.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/stringprintf.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/suitesparse.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/suitesparse.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/types.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/visibility.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/visibility.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.cc
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.h
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/mkfiles.sh
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/patches/
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/patches/series

Modified: branches/soc-2011-tomato/extern/libmv/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/extern/libmv/CMakeLists.txt	2012-05-09 15:37:56 UTC (rev 46469)
+++ branches/soc-2011-tomato/extern/libmv/CMakeLists.txt	2012-05-09 15:39:54 UTC (rev 46470)
@@ -32,6 +32,7 @@
 	third_party/ssba
 	third_party/ldl/Include
 	../colamd/Include
+	third_party/ceres/include
 )
 
 set(INC_SYS
@@ -250,3 +251,5 @@
 )
 
 blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}")
+
+add_subdirectory(third_party)

Modified: branches/soc-2011-tomato/extern/libmv/ChangeLog
===================================================================
--- branches/soc-2011-tomato/extern/libmv/ChangeLog	2012-05-09 15:37:56 UTC (rev 46469)
+++ branches/soc-2011-tomato/extern/libmv/ChangeLog	2012-05-09 15:39:54 UTC (rev 46470)
@@ -1,3 +1,54 @@
+commit b813dbe3f46bbbc7e73ac791d4665622e4fc7ba5
+Author: Sergey Sharybin <sergey.vfx at gmail.com>
+Date:   Wed May 9 19:01:10 2012 +0600
+
+    Modal solver: Detect rigid transformation between initial frame and current
+    instead of detecting it between two neighbour frames.
+    
+    This prevents accumulation of error and seems to be working better in footages i've tested.
+
+commit 9254621c76daaf239ec1f535e197ca792eea97b6
+Author: Sergey Sharybin <sergey.vfx at gmail.com>
+Date:   Wed May 9 18:57:00 2012 +0600
+
+    Backport changes made by Keir in Blender:
+    
+    - Enhance logging in libmv's trackers.
+    - Cleanups in brute_region_tracker.cc.
+
+commit d9c56b9d3c63f886d83129ca0ebed1e76d9c93d7
+Author: Sergey Sharybin <sergey.vfx at gmail.com>
+Date:   Fri Apr 27 16:20:41 2012 +0600
+
+    Fixes for MinGW64 support by Caleb Joseph with slight modifications by Antony Riakiotakis
+    
+    - Functions snprintf and sincos shouldn't be redefined for MinGW64
+    - Type  pid_t shouldn't be re-defined for MinGW64
+
+commit e1902b6938676011607ac99986b8b140bdbf090e
+Author: Sergey Sharybin <sergey.vfx at gmail.com>
+Date:   Fri Apr 27 16:04:19 2012 +0600
+
+    Fixes for Qt calibration tool
+    
+    - Passing directory with images via command line argument now isn't
+      required -- it there's no such directory specified  standard open
+      dialog might be used for this (before application used to abort
+      due to accessing to non-existing list element).
+    - Conversion of source images to grayscale now happens correct.
+      It was needed to build grayscale palette for 8bit indexed buffer.
+
+commit 05f1a0a78ad8ff6646d1e8da97e6f7575b891536
+Author: Sergey Sharybin <sergey.vfx at gmail.com>
+Date:   Sat Apr 14 17:21:29 2012 +0600
+
+    Make QtTracker compilable again porting it to recent API change and code cleanup:
+    
+    - It was using SAD tracker with own API, now it's using standard RegionTracker API
+      which should make it easier to switch between different trackers.
+    - Restored LaplaceFilter from old SAD module which convolves images with the
+      discrete laplacian operator.
+
 commit a44312a7beb2963b8e3bf8015c516d2eff40cc3d
 Author: Sergey Sharybin <sergey.vfx at gmail.com>
 Date:   Thu Apr 12 13:56:02 2012 +0600
@@ -503,33 +554,3 @@
 Date:   Fri Aug 19 18:37:48 2011 +0200
 
     Fix CMake build.
-
-commit 2ac7281ff6b9545b425dd84fb03bf9c5c98b4de2
-Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
-Date:   Fri Aug 19 17:34:45 2011 +0200
-
-    Avoid symbol shadowing.
-
-commit 2a7c3de4acc60e0433b4952f69e30528dbafe0d2
-Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
-Date:   Fri Aug 19 17:22:47 2011 +0200
-
-    Better dragging behavior when hitting borders.
-
-commit a14eb3953c9521b2e08ff9ddd45b33ff1f8aeafb
-Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
-Date:   Fri Aug 19 17:12:12 2011 +0200
-
-    Update marker preview to new affine tracking.
-
-commit 5299ea67043459eda147950e589c2d327a8fbced
-Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
-Date:   Fri Aug 19 16:05:54 2011 +0200
-
-    sqrt takes double precision.
-
-commit 9f9221ce151d788c49b48f6f293ab2e2f8813978
-Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
-Date:   Fri Aug 19 16:04:37 2011 +0200
-
-    MSVC compatibility: heap allocate pattern, explicit float cast.

Modified: branches/soc-2011-tomato/extern/libmv/SConscript
===================================================================
--- branches/soc-2011-tomato/extern/libmv/SConscript	2012-05-09 15:37:56 UTC (rev 46469)
+++ branches/soc-2011-tomato/extern/libmv/SConscript	2012-05-09 15:39:54 UTC (rev 46470)
@@ -30,7 +30,7 @@
 src += env.Glob('third_party/ssba/Geometry/*.cpp')
 src += env.Glob('third_party/ssba/Math/*.cpp')
 
-incs = '. ../Eigen3'
+incs = '. ../Eigen3 third_party/ceres/include'
 incs += ' ' + env['BF_PNG_INC']
 incs += ' ' + env['BF_ZLIB_INC']
 
@@ -65,3 +65,5 @@
 incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include'
 
 env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv )
+
+SConscript(['third_party/SConscript'])

Modified: branches/soc-2011-tomato/extern/libmv/bundle.sh
===================================================================
--- branches/soc-2011-tomato/extern/libmv/bundle.sh	2012-05-09 15:37:56 UTC (rev 46469)
+++ branches/soc-2011-tomato/extern/libmv/bundle.sh	2012-05-09 15:39:54 UTC (rev 46470)
@@ -23,7 +23,7 @@
 done
 
 rm -rf libmv
-rm -rf third_party
+rm -rf `find third_party/ -mindepth 1 -maxdepth 1 | grep -v ceres | grep -v CMake | grep -c SCons`
 
 cat "files.txt" | while read f; do
   mkdir -p `dirname $f`
@@ -37,14 +37,14 @@
 sources=`find ./libmv -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t/' | sort -d`
 headers=`find ./libmv -type f -iname '*.h' | sed -r 's/^\.\//\t/' | sort -d`
 
-third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | sed -r 's/^\.\//\t/' | sort -d`
-third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | sed -r 's/^\.\//\t/' | sort -d`
+third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | grep -v ceres | sed -r 's/^\.\//\t/' | sort -d`
+third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | grep -v ceres | sed -r 's/^\.\//\t/' | sort -d`
 
 third_glog_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d`
 third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d`
 
 src_dir=`find ./libmv -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/' | sort -d | uniq`
-src_third_dir=`find ./third_party -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/'  | sort -d | uniq`
+src_third_dir=`find ./third_party -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \;  | grep -v ceres | sed -r 's/^\.\//\t/'  | sort -d | uniq`
 src=""
 win_src=""
 for x in $src_dir $src_third_dir; do
@@ -124,6 +124,7 @@
 	third_party/ssba
 	third_party/ldl/Include
 	../colamd/Include
+	third_party/ceres/include
 )
 
 set(INC_SYS
@@ -218,6 +219,8 @@
 )
 
 blender_add_lib(extern_libmv "\${SRC}" "\${INC}" "\${INC_SYS}")
+
+add_subdirectory(third_party)
 EOF
 
 cat > SConscript << EOF
@@ -244,7 +247,7 @@
 src = env.Glob("*.cpp")
 $src
 
-incs = '. ../Eigen3'
+incs = '. ../Eigen3 third_party/ceres/include'
 incs += ' ' + env['BF_PNG_INC']
 incs += ' ' + env['BF_ZLIB_INC']
 
@@ -279,4 +282,6 @@
 incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include'
 
 env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv )
+
+SConscript(['third_party/SConscript'])
 EOF

Modified: branches/soc-2011-tomato/extern/libmv/libmv/image/convolve.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/image/convolve.cc	2012-05-09 15:37:56 UTC (rev 46469)
+++ branches/soc-2011-tomato/extern/libmv/libmv/image/convolve.cc	2012-05-09 15:39:54 UTC (rev 46470)
@@ -302,4 +302,18 @@
   BoxFilterVertical(tmp, box_width, out);
 }
 
+void LaplaceFilter(unsigned char* src, unsigned char* dst, int width, int height, int strength) {
+  for(int y=1; y<height-1; y++) for(int x=1; x<width-1; x++) {
+    const unsigned char* s = &src[y*width+x];
+    int l = 128 +
+        s[-width-1] + s[-width] + s[-width+1] +
+        s[1]        - 8*s[0]    + s[1]        +
+        s[ width-1] + s[ width] + s[ width+1] ;
+    int d = ((256-strength)*s[0] + strength*l) / 256;
+    if(d < 0) d=0;
+    if(d > 255) d=255;
+    dst[y*width+x] = d;
+  }
+}
+
 }  // namespace libmv

Modified: branches/soc-2011-tomato/extern/libmv/libmv/image/convolve.h
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/image/convolve.h	2012-05-09 15:37:56 UTC (rev 46469)
+++ branches/soc-2011-tomato/extern/libmv/libmv/image/convolve.h	2012-05-09 15:39:54 UTC (rev 46470)
@@ -87,6 +87,16 @@
                int box_width,
                FloatImage *out);
 
+/*!
+    Convolve \a src into \a dst with the discrete laplacian operator.
+
+    \a src and \a dst should be \a width x \a height images.
+    \a strength is an interpolation coefficient (0-256) between original image and the laplacian.
+
+    \note Make sure the search region is filtered with the same strength as the pattern.
+*/
+void LaplaceFilter(unsigned char* src, unsigned char* dst, int width, int height, int strength);
+
 }  // namespace libmv
 
 #endif  // LIBMV_IMAGE_CONVOLVE_H_

Modified: branches/soc-2011-tomato/extern/libmv/mkfiles.sh
===================================================================
--- branches/soc-2011-tomato/extern/libmv/mkfiles.sh	2012-05-09 15:37:56 UTC (rev 46469)
+++ branches/soc-2011-tomato/extern/libmv/mkfiles.sh	2012-05-09 15:39:54 UTC (rev 46470)
@@ -1,4 +1,4 @@
 #!/bin/sh
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list