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
AgeCommit message (Collapse)Author
2020-12-01Libmv: Tweak default logging verbosity levelSergey Sharybin
Log to verbosity level 1 rather than INFO severity. Avoids a lot of overhead coming from construction of the INFO stream and improves performance and threadability of code which uses logging. This makes tracking of 250 frames of a track of default settings to drop down from 0.6sec to 0.4sec.
2020-12-01Libmv: Cleanup, remove unused logging macrosSergey Sharybin
Unused and was not entirely happy with such short abbreviations.
2020-11-30Libmv: Add threading primitivesSergey Sharybin
Allows to use mutex, scoped_lock, and conditional_variable from within the libmv namespace. Implementation is coming from C++11. Other configurations are easy to implement, but currently C++11 is the way to go.
2020-11-30Libmv: Add build configuration headerSergey Sharybin
Allows to easily access build platform information, such as bitness, compiler, supported C++ version and so on.
2020-11-30Libmv: add missing files to bundlerSergey Sharybin
Bundler wouldn't be able to pull changes form upstream until all the changes are upstreamed, but is better to have information consistent.
2020-11-09Libmv: Fix warning about unused parameter in CeresSergey Sharybin
Ceres is an external library, so consider it a system header which makes it so all strict flags are properly ignored for them.
2020-11-06Cleanup: doxygen commentsCampbell Barton
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-10-29Libmv: Fix clang inconsistent-missing-override warnings.Ivan Perevala
Reviewed By: sergey, ankitm Differential Revision: https://developer.blender.org/D9377
2020-10-28Tracking: Simplify configuration of intrinsics to refineSergey Sharybin
Previously, only predefined and limited set of intrinsics combinations could have been refined. This was caused by a bundle adjustment library used in the early days of the solver. Now it is possible to fully customize which intrinsics are to be refined during camera solving. Internally solver supports per-parameter settings but in the interface they are grouped as following: * Focal length * Optical center * Radial distortion coefficients (which includes k1, k2, k3, k4) * Tangential distortion coefficients (which includes p1, p2) Differential Revision: https://developer.blender.org/D9294
2020-10-28Libmv: Fix typo in packed intrinsicsSergey Sharybin
Was using doing an implicit cast of floating point value to boolean. Was not noticed before because the boolean value was never never used.
2020-10-20Libmv: Refactor camera intrinsics parameter blockSergey Sharybin
Use the newly introduced packed intrinsics, which allows to remove code which was initializing parameters block based on distortion model type. Now such initialization is done by a particular implementation of a distortion model. Differential Revision: https://developer.blender.org/D9192
2020-10-20Libmv: Add generic class for packed intrinsicsSergey Sharybin
This is a common class which can be used in all sort of minimization problems which needs camera intrinsics as a parameter block. Currently unused, but will replace a lot of hard-coded logic in the bundle adjustment code.
2020-10-20Libmv: Add array<type, size> to libmv namespaceSergey Sharybin
2020-10-20Fix libmv test on windowsSebastian Parborg
There is no point in testing std::vector capacity as it can differ between std implementations.
2020-10-19Spelling: MiscellaneousHarley Acheson
Corrects 34 miscellaneous misspelled words. Differential Revision: https://developer.blender.org/D9248 Reviewed by Campbell Barton
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-19Fix libmv eigen alignment issues when compiling with AVX supportSebastian Parborg
There would be eigen alignment issues with the custom libmv vector class when compiling with AVX optimizations. This would lead to segfaults. Simply use the std::vector base class as suggested by the old TODO in the class header. Reviewed By: Sergey Differential Revision: http://developer.blender.org/D8968
2020-10-12Libmv: Remove array access from camera intrinsicsSergey Sharybin
That was a suboptimal decision from back in the days, which ended up being problematic. It is no longer used, so remove it from API making it so new code does not depend on this weak concept.
2020-10-12Libmv: Fix wrong packing order of intrinsics for BA stepSergey Sharybin
The order got broken when Brown distortion model has been added. Made it so the indexing of parameters is strictly defined in the parameter block, matching how parameters are used in the cost function. There is some duplication going on accessing parameters. This can be refactored in the future, by either moving common parts packing and cost function to an utility function in bundle.cc. Alternatively, can introduce a public PackedIntrinsics class which will contain a continuous block of parameters, and each of the camera models will have API to be initialized from packed form and to create this packed form. The benefit of this approach over alternative solutions previously made in the master branch or suggested in D9116 is that the specific implementation of BA does not dictate the way how public classes need to be organized. It is API which needs to define how implementation goes, not the other way around. Thanks Bastien and Ivan for the investigation!
2020-10-12Revert "Fix critical lens distortion bug in libmv after rB3a7d62cd1f5e."Sergey Sharybin
This reverts commit 7e836bde11ce6521953c9f246cacd442a3ef6c0e. Reverting the incomplete workaround, due to the following reasoning: - There should be no dependency between CameraIntrinsics and the bundler code. This violates intended abstraction of the intrinsics class. - The fix was not complete, or wrong. Even in the world where there is a requirement to the parameters storage size this should have applied to all distortion models, including Divisions, Nuke. Proper fix will be committed next.
2020-10-12Libmv: Fix memory leak in modal solverSergey Sharybin
The leak was happening when problem did not have any parameters blocks defined. This happens, for example, if there are no 3D points at all, or when all markers are set to 0 weight. Was noticeable in libmv_modal_solver_test when building with LSAN enabled.
2020-10-12Libmv: Cleanup, spelling in function nameSergey Sharybin
Is a local function, not affecting API.
2020-10-05Fix critical lens distortion bug in libmv after rB3a7d62cd1f5e.Bastien Montagne
Current libmv_modal_solver_test fails since rB3a7d62cd1f5e. It appears that the issue is caused by the insertion of the new OFFSET_K4 parameter, as, if camera intrinsics are not required to implement/use all of those deform parameters, they absolutely have to keep order (values) matching those defined in bundle.cc, otherwise `PackIntrinisicsIntoArray` and `UnpackIntrinsicsFromArray` will mangle them around.
2020-09-30Tracking: Implement Brown-Conrady distortion modelIvan Perevala
Implemented Brown-Conrady lens distortion model with 4 radial and 2 tangential coefficients to improve compatibility with other software, such as Agisoft Photoscan/Metashapes, 3DF Zephir, RealityCapture, Bentley ContextCapture, Alisevision Meshroom(opensource). Also older programs: Bundler, CPMVS. In general terms, most photogrammetric software. The new model is available under the distortion model menu in Lens settings. For tests and demos check the original patch. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9037
2020-09-28Libmv: Fix NukeCameraIntrinsics copy constructorIvan
Copy the appropriate parameter Reviewed By: sergey Differential Revision: https://developer.blender.org/D9014
2020-07-16T73268: Link C/C++ unit tests into single executableSybren A. Stüvel
This commit introduces a new way to build unit tests. It is now possible for each module to generate its own test library. The tests in these libraries are then bundled into a single executable. The test executable can be run with `ctest`. Even though the tests reside in a single executable, they are still exposed as individual tests to `ctest`, and thus can be selected via its `-R` argument. Not yet ported tests still build & run as before. The following rules apply: - Test code should reside in the same directory as the code under test. - Tests that target functionality in `somefile.{c,cc}` should reside in `somefile_test.cc`. - The namespace for tests is the `tests` sub-namespace of the code under test. For example, tests for `blender::bke` should be in `blender::bke:tests`. - The test files should be listed in the module's `CMakeLists.txt` in a `blender_add_test_lib()` call. See the `blenkernel` module for an example. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7649
2020-07-07UI: Add units to motion tracking solve errorsJohan Walles
The unit being "pixels". Before this change the solve errors were unitless in the UI. With this change in place, the UI is now clear on that the unit of the reprojection errors is pixels (px). Differential Revision: https://developer.blender.org/D8000
2020-07-01Cleanup: spellingCampbell Barton
2020-06-19Ceres: Update to the latest upstream versionSergey Sharybin
Using latest master because of various compilation error fixes. Brings a lot of recent development. From most interesting parts: - New threading model. - Tiny solver. - Compatibility with C++17.
2020-05-15Libmv: Fix crash solving when having negative framesSergey Sharybin
Don't use linear array with frame as an index since it has the following disadvantages: - Requires every application to take care of frame remapping, which could be way more annoying than it sounds. - Inefficient from memory point of view when solving part of a footage which is closer to the end of frame range. Using map technically is slower from performance point of view, but could not feel any difference as the actual computation is way more complex than access of camera on individual frames. Solves crash aspect of T72009
2020-05-15Libmv: Add map utilitySergey Sharybin
2020-05-15Libmv: Cleanup, spellingSergey Sharybin
2020-05-08Cleanup: Doxygen: fix markup warnings for linksAaron Carlisle
2020-04-29Tracking: Implement Nuke/Natron distortion modelSergey Sharybin
Neither Nuke nor Natron support OpenCV's radial distortion model which makes it impossible to have any kind of interoperability. The new model is available under the distortion model menu in Lens settings. Differential Revision: https://developer.blender.org/D7484
2020-04-21Libmv: Cleanup, namingSergey Sharybin
Initial bundle adjustment only supported OpenCV's radial distortion model, so the cost functor was called after it. Nowadays it supports more than this single model, so naming was a bit wrong and misleading.
2020-04-21Libmv: Cleanup, spelling and naming in bundle adjustmentSergey Sharybin
Just more things which were discovered to be annoying on unclear when adding more features to this code.
2020-04-20Libmv: Cleanup, spelling in commentSergey Sharybin
2020-04-20Libmv: De-duplicate creation of residual blockSergey Sharybin
Allows to centralize logic which is needed to check which cost functor to use for the specific intrinsics.
2020-04-20Libmv: Cleanup reprojection cost functionSergey Sharybin
Make it smaller and more clear how and what it operates on.
2020-04-20Libmv: Pass entire camera intrinsics to reprojection error functorSergey Sharybin
Currently no functional changes, but allows to have access to some invariant settings of camera intrinsics such as image dimensions.
2020-04-20Libmv: Cleanup, rephrase commentSergey Sharybin
2020-04-20Libmv: Cleanup, fix indentationSergey Sharybin
2020-04-20Libmv: Cleanup, spelling in commentsSergey Sharybin
2020-04-06Libmv: Use static scheduler for threadingSergey Sharybin
For a real-world distortion the payload is quite uniformly distributed across scanlines. Surely, in the corners more iterations of minimizer is needed, but that happens in threads without scheduling overhead.
2020-04-06Tracking: Fix (un)distortion happen in single threadSergey Sharybin
Need to communicate available number of threads to the camera intrinsics implementation, otherwise default value of 1 is used. Must have been single-threaded for a very long time.
2020-01-25Cleanup: include missing CMake headersCampbell Barton
2020-01-23CMake: Refactor external dependencies handlingSergey Sharybin
This is a more correct fix to the issue Brecht was fixing in D6600. While the fix in that patch worked fine for linking it broke ASAN runtime under some circumstances. For example, `make full debug developer` would compile, but trying to start blender will cause assert failure in ASAN (related on check that ASAN is not running already). Top-level idea: leave it to CMake to keep track of dependency graph. The root of the issue comes to the fact that target like "blender" is configured to use a lot of static libraries coming from Blender sources and to use external static libraries. There is nothing which ensures order between blender's and external libraries. Only order of blender libraries is guaranteed. It was possible that due to a cycle or other circumstances some of blender libraries would have been passed to linker after libraries it uses, causing linker errors. For example, this order will likely fail: libbf_blenfont.a libfreetype6.a libbf_blenfont.a This change makes it so blender libraries are explicitly provided their dependencies to an external libraries, which allows CMake to ensure they are always linked against them. General rule here: if bf_foo depends on an external library it is to be provided to LIBS for bf_foo. For example, if bf_blenkernel depends on opensubdiv then LIBS in blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES. The change is made based on searching for used include folders such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries to LIBS ion that CMakeLists.txt. Transitive dependencies are not simplified by this approach, but I am not aware of any downside of this: CMake should be smart enough to simplify them on its side. And even if not, this shouldn't affect linking time. Benefit of not relying on transitive dependencies is that build system is more robust towards future changes. For example, if bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES and all such code is moved to bf_blenkernel this will not break linking. The not-so-trivial part is change to blender_add_lib (and its version in Cycles). The complexity is caused by libraries being provided as a single list argument which doesn't allow to use different release and debug libraries on Windows. The idea is: - Have every library prefixed as "optimized" or "debug" if separation is needed (non-prefixed libraries will be considered "generic"). - Loop through libraries passed to function and do simple parsing which will look for "optimized" and "debug" words and specify following library to corresponding category. This isn't something particularly great. Alternative would be to use target_link_libraries() directly, which sounds like more code but which is more explicit and allows to have more flexibility and control comparing to wrapper approach. Tested the following configurations on Linux, macOS and Windows: - make full debug developer - make full release developer - make lite debug developer - make lite release developer NOTE: Linux libraries needs to be compiled with D6641 applied, otherwise, depending on configuration, it's possible to run into duplicated zlib symbols error. Differential Revision: https://developer.blender.org/D6642
2019-11-24Cleanup: spelling, repeated wordsCampbell Barton
2019-09-30Cleanup: spellingCampbell Barton