libmv.git
7 days agoCleanup: Fix build error with MSVC master
Lazydodo [Wed, 21 Aug 2019 16:38:33 +0000 (10:38 -0600)]
Cleanup: Fix build error with MSVC

Previously eigens internal include order somehow implicitly provided
M_PI and friends. The recent eigen version bump broke this implicit
behaviour, better to be explicit that we need the math defines for MSVC.

7 days agoCleanup: Spelling in Libmv comments
Sergey Sharybin [Mon, 15 Mar 2021 13:58:13 +0000 (14:58 +0100)]
Cleanup: Spelling in Libmv comments

7 days agoEnsure clang-format is disabled for 3rd party libraries
Sergey Sharybin [Thu, 21 Oct 2021 10:09:30 +0000 (12:09 +0200)]
Ensure clang-format is disabled for 3rd party libraries

7 days agoFix x/y mismatch in retract region tracker
Campbell Barton [Tue, 13 Jul 2021 11:58:45 +0000 (21:58 +1000)]
Fix x/y mismatch in retract region tracker

Correct X/Y mismatch in RetrackRegionTracker.

NOTE: This isn't used at the moment.

Reviewed By: sergey

Ref D11895

7 days agoCleanup: Use correct _WIN32/64 defines for MSVC
Jesse Yurkovich [Tue, 13 Jul 2021 04:01:18 +0000 (21:01 -0700)]
Cleanup: Use correct _WIN32/64 defines for MSVC

Docs: https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros

Differential Revision: https://developer.blender.org/D11460

7 days agoCleanup: comment blocks, trailing space in comments
Campbell Barton [Thu, 24 Jun 2021 05:56:58 +0000 (15:56 +1000)]
Cleanup: comment blocks, trailing space in comments

7 days agoFix new[]/delete[] mismatch
Campbell Barton [Sun, 13 Jun 2021 05:11:40 +0000 (15:11 +1000)]
Fix new[]/delete[] mismatch

7 days agoFix T86591: Tracking backwards is slower
Sergey Sharybin [Mon, 22 Mar 2021 14:16:07 +0000 (15:16 +0100)]
Fix T86591: Tracking backwards is slower

The root of the issue was caused by the PredictMarkerPosition()
always returning false when tracking backwards. This was making
it so tracker always had to run brute initialization, which is
an expensive operation.

From own timing here:

- Tracking forward takes 0.667637 seconds
- Tracking backward used to take 2.591856 seconds
- Tracking backward now takes 0.827724 seconds

This is a very nice speedup, although the tracking backwards is
still somewhat slower. Will be investigated further as part of
a regular development.

7 days agoFix T86262: Tracking backwards fails after gap in track
Sergey Sharybin [Mon, 15 Mar 2021 14:48:15 +0000 (15:48 +0100)]
Fix T86262: Tracking backwards fails after gap in track

The issue was caused by a prediction algorithm detecting tracking the
wrong way. Solved by passing tracking direction explicitly, so that
prediction will always happen correctly regardless of the state of the
Tracks context.

7 days agoCleanup: clang-format
Sergey Sharybin [Thu, 21 Oct 2021 09:18:10 +0000 (11:18 +0200)]
Cleanup: clang-format

Is based on Google style which was used in the Libmv project before,
but is now consistently applied for the sources of the library itself
and to C-API. With some time C-API will likely be removed, and it
makes it easier to make it follow Libmv style, hence the diversion
from Blender's style.

There are quite some exceptions (clang-format off) in the code around
Eigen matrix initialization. It is rather annoying, and there could be
some neat way to make initialization readable without such exception.

Could be some places where loss of readability in matrix initialization
got lost as the change is quite big. If this has happened it is easier
to address readability once actually working on the code.

This change allowed to spot some missing header guards, so that's nice.

Doing it in bundled version, as the upstream library needs to have some
of the recent development ported over from bundle to upstream.

There should be no functional changes.

7 days agoAvoid use of LOG(INFO) in solver
Sergey Sharybin [Tue, 23 Feb 2021 15:43:01 +0000 (16:43 +0100)]
Avoid use of LOG(INFO) in solver

Usage of LOG(INFO) actually went against own guidelines in the
logging.h: the INFO is for messages which are to be printed
regardless of debug/verbosity settings.

7 days agoCleanup: correct spelling in comments
Campbell Barton [Fri, 5 Feb 2021 05:23:34 +0000 (16:23 +1100)]
Cleanup: correct spelling in comments

7 days agoTweak default logging verbosity level
Sergey Sharybin [Tue, 1 Dec 2020 13:52:08 +0000 (14:52 +0100)]
Tweak default logging verbosity level

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.

7 days agoCleanup, remove unused logging macros
Sergey Sharybin [Tue, 1 Dec 2020 13:46:35 +0000 (14:46 +0100)]
Cleanup, remove unused logging macros

Unused and was not entirely happy with such short abbreviations.

7 days agoAdd threading primitives
Sergey Sharybin [Fri, 27 Nov 2020 14:58:55 +0000 (15:58 +0100)]
Add threading primitives

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.

7 days agoAdd build configuration header
Sergey Sharybin [Fri, 27 Nov 2020 14:43:44 +0000 (15:43 +0100)]
Add build configuration header

Allows to easily access build platform information, such as bitness,
compiler, supported C++ version and so on.

7 days agoCleanup: doxygen comments
Campbell Barton [Fri, 6 Nov 2020 03:35:38 +0000 (14:35 +1100)]
Cleanup: doxygen comments

7 days agoCleanup: follow our code style for float literals
Campbell Barton [Fri, 6 Nov 2020 00:25:27 +0000 (11:25 +1100)]
Cleanup: follow our code style for float literals

7 days agoFix clang inconsistent-missing-override warnings.
Ivan Perevala [Thu, 29 Oct 2020 09:19:06 +0000 (10:19 +0100)]
Fix clang inconsistent-missing-override warnings.

Reviewed By: sergey, ankitm

Differential Revision: https://developer.blender.org/D9377

7 days agoSimplify configuration of intrinsics to refine
Sergey Sharybin [Wed, 21 Oct 2020 08:53:13 +0000 (10:53 +0200)]
Simplify configuration of intrinsics to refine

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

7 days agoFix typo in packed intrinsics
Sergey Sharybin [Wed, 21 Oct 2020 08:48:13 +0000 (10:48 +0200)]
Fix typo in packed intrinsics

Was using doing an implicit cast of floating point value to boolean.
Was not noticed before because the boolean value was never never used.

7 days agoRefactor camera intrinsics parameter block
Sergey Sharybin [Tue, 13 Oct 2020 09:34:05 +0000 (11:34 +0200)]
Refactor camera intrinsics parameter block

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

7 days agoAdd generic class for packed intrinsics
Sergey Sharybin [Tue, 13 Oct 2020 09:32:35 +0000 (11:32 +0200)]
Add generic class for packed intrinsics

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.

7 days agoAdd array<type, size> to libmv namespace
Sergey Sharybin [Tue, 13 Oct 2020 09:25:34 +0000 (11:25 +0200)]
Add array<type, size> to libmv namespace

7 days agoFix test on windows
Sebastian Parborg [Tue, 20 Oct 2020 12:45:54 +0000 (14:45 +0200)]
Fix test on windows

There is no point in testing std::vector capacity as it can differ
between std implementations.

7 days agoSpelling: Miscellaneous
Harley Acheson [Mon, 19 Oct 2020 15:51:50 +0000 (08:51 -0700)]
Spelling: Miscellaneous

Corrects 34 miscellaneous misspelled words.

Differential Revision: https://developer.blender.org/D9248

Reviewed by Campbell Barton

7 days agoSpelling: It's Versus Its
Harley Acheson [Mon, 19 Oct 2020 15:12:33 +0000 (08:12 -0700)]
Spelling: It's Versus Its

Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.

Differential Revision: https://developer.blender.org/D9250

Reviewed by Campbell Barton

7 days agoFix alignment issues when compiling with AVX support
Sebastian Parborg [Mon, 19 Oct 2020 11:03:06 +0000 (13:03 +0200)]
Fix alignment issues when compiling with AVX support

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

7 days agoRemove array access from camera intrinsics
Sergey Sharybin [Mon, 12 Oct 2020 12:59:18 +0000 (14:59 +0200)]
Remove array access from camera intrinsics

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.

7 days agoFix wrong packing order of intrinsics for BA step
Sergey Sharybin [Mon, 12 Oct 2020 10:17:55 +0000 (12:17 +0200)]
Fix wrong packing order of intrinsics for BA step

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!

7 days agoFix memory leak in modal solver
Sergey Sharybin [Mon, 12 Oct 2020 08:46:31 +0000 (10:46 +0200)]
Fix memory leak in modal solver

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.

7 days agoCleanup, spelling in function name
Sergey Sharybin [Mon, 12 Oct 2020 08:44:57 +0000 (10:44 +0200)]
Cleanup, spelling in function name

Is a local function, not affecting API.

7 days agoImplement Brown-Conrady distortion model
Ivan Perevala [Wed, 30 Sep 2020 13:12:14 +0000 (15:12 +0200)]
Implement Brown-Conrady distortion model

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

7 days agoFix NukeCameraIntrinsics copy constructor
Ivan [Mon, 28 Sep 2020 07:57:03 +0000 (09:57 +0200)]
Fix NukeCameraIntrinsics copy constructor

Copy the appropriate parameter

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9014

7 days agoAdd units to motion tracking solve errors
Johan Walles [Tue, 7 Jul 2020 09:09:31 +0000 (11:09 +0200)]
Add units to motion tracking solve errors

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

7 days agoCleanup: spelling
Campbell Barton [Wed, 1 Jul 2020 03:12:24 +0000 (13:12 +1000)]
Cleanup: spelling

7 days agoUpdate Ceres to the latest upstream version
Sergey Sharybin [Thu, 18 Jun 2020 08:12:01 +0000 (10:12 +0200)]
Update Ceres to the latest upstream version

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.

7 days agoFix crash solving when having negative frames
Sergey Sharybin [Fri, 15 May 2020 12:54:30 +0000 (14:54 +0200)]
Fix crash solving when having negative frames

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

7 days agoAdd map utility
Sergey Sharybin [Fri, 15 May 2020 09:08:18 +0000 (11:08 +0200)]
Add map utility

7 days agoCleanup, spelling
Sergey Sharybin [Fri, 15 May 2020 09:05:07 +0000 (11:05 +0200)]
Cleanup, spelling

7 days agoCleanup: Doxygen: fix markup warnings for links
Aaron Carlisle [Fri, 8 May 2020 03:42:22 +0000 (23:42 -0400)]
Cleanup: Doxygen: fix markup warnings for links

7 days agoImplement Nuke/Natron distortion model
Sergey Sharybin [Mon, 20 Apr 2020 15:33:03 +0000 (17:33 +0200)]
Implement Nuke/Natron distortion model

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

7 days agoCleanup, naming
Sergey Sharybin [Tue, 21 Apr 2020 14:41:23 +0000 (16:41 +0200)]
Cleanup, naming

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.

7 days agoCleanup, spelling and naming in bundle adjustment
Sergey Sharybin [Tue, 21 Apr 2020 10:25:45 +0000 (12:25 +0200)]
Cleanup, spelling and naming in bundle adjustment

Just more things which were discovered to be annoying on unclear when
adding more features to this code.

7 days agoCleanup, spelling in comment
Sergey Sharybin [Mon, 20 Apr 2020 15:26:45 +0000 (17:26 +0200)]
Cleanup, spelling in comment

7 days agoDe-duplicate creation of residual block
Sergey Sharybin [Mon, 20 Apr 2020 10:44:07 +0000 (12:44 +0200)]
De-duplicate creation of residual block

Allows to centralize logic which is needed to check which cost functor
to use for the specific intrinsics.

7 days agoCleanup reprojection cost function
Sergey Sharybin [Mon, 20 Apr 2020 09:41:01 +0000 (11:41 +0200)]
Cleanup reprojection cost function

Make it smaller and more clear how and what it operates on.

7 days agoPass entire camera intrinsics to reprojection error functor
Sergey Sharybin [Mon, 20 Apr 2020 09:19:47 +0000 (11:19 +0200)]
Pass entire camera intrinsics to reprojection error functor

Currently no functional changes, but allows to have access to some
invariant settings of camera intrinsics such as image dimensions.

7 days agoCleanup, rephrase comment
Sergey Sharybin [Fri, 17 Apr 2020 15:34:19 +0000 (17:34 +0200)]
Cleanup, rephrase comment

7 days agoCleanup, fix indentation
Sergey Sharybin [Fri, 17 Apr 2020 15:29:04 +0000 (17:29 +0200)]
Cleanup, fix indentation

7 days agoCleanup, spelling in comments
Sergey Sharybin [Fri, 17 Apr 2020 15:26:36 +0000 (17:26 +0200)]
Cleanup, spelling in comments

7 days agoUse static scheduler for threading
Sergey Sharybin [Mon, 6 Apr 2020 12:47:35 +0000 (14:47 +0200)]
Use static scheduler for threading

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.

7 days agoCleanup: spelling, repeated words
Campbell Barton [Sun, 24 Nov 2019 13:55:11 +0000 (00:55 +1100)]
Cleanup: spelling, repeated words

7 days agoCleanup: spelling
Campbell Barton [Mon, 30 Sep 2019 07:06:28 +0000 (17:06 +1000)]
Cleanup: spelling

7 days agomacOS: Enabled posix_memalign() like on other Unix platforms.
Stefan Werner [Fri, 13 Sep 2019 20:49:26 +0000 (22:49 +0200)]
macOS: Enabled posix_memalign() like on other Unix platforms.

7 days agoCleanup: compiler warnings
Brecht Van Lommel [Fri, 13 Sep 2019 14:18:18 +0000 (16:18 +0200)]
Cleanup: compiler warnings

7 days agoCleanup, make strict compiler more happy
Sergey Sharybin [Mon, 11 Jun 2018 10:53:11 +0000 (12:53 +0200)]
Cleanup, make strict compiler more happy

In C++ it is not really safe to memcpy objects, and newer GCC will warn
about this. However, we don't use our vector for unsafe-to-memcpy objects,
so just explicitly silence that warning.

7 days agoHaiku OS Support
Campbell Barton [Thu, 30 Nov 2017 06:56:01 +0000 (17:56 +1100)]
Haiku OS Support

D2860 by @miqlas

Even though Haiku is a niche OS, only minor changes are needed.

4 years agoFix strict compiler warnings, unused variables
Sergey Sharybin [Tue, 9 May 2017 08:16:42 +0000 (10:16 +0200)]
Fix strict compiler warnings, unused variables

4 years agoFix T50243: libmv_panography_test is broken
Sergey Sharybin [Wed, 14 Dec 2016 09:44:57 +0000 (10:44 +0100)]
Fix T50243: libmv_panography_test is broken

There was fully wrong logic in comparison: was actually accessing memory
past the array boundary. Run test manually and the figure seems correct
to me now.

Spotted by @LazyDodo, thanks!

4 years agoFix some strict compiler warnings
Sergey Sharybin [Thu, 14 Jul 2016 09:49:38 +0000 (11:49 +0200)]
Fix some strict compiler warnings

One of them was a real bug!

4 years agoEnable explicit schur complement for BA step
Sergey Sharybin [Wed, 31 May 2017 09:22:34 +0000 (11:22 +0200)]
Enable explicit schur complement for BA step

This is something we do in Blender and only reason it was not
enabled for standalone Libmv is because we did not have fresh
enough version of Ceres bundled.

4 years agoUpdate tests to make tests pass after recent Ceres update
Sergey Sharybin [Wed, 2 Nov 2016 14:32:11 +0000 (15:32 +0100)]
Update tests to make tests pass after recent Ceres update

Just a precision issue, difference is around 1e-7. Should be fine to
simply update expected value.

4 years agoUpdate Ceres to latest release 1.12.0
Sergey Sharybin [Wed, 31 May 2017 08:54:48 +0000 (10:54 +0200)]
Update Ceres to latest release 1.12.0

4 years agoFix crash of keyframe selection on 32bit linux
Sergey Sharybin [Fri, 7 Apr 2017 15:10:44 +0000 (17:10 +0200)]
Fix crash of keyframe selection on 32bit linux

4 years agoSolve some strict warnings in tests
Sergey Sharybin [Tue, 19 Jan 2016 09:00:53 +0000 (14:00 +0500)]
Solve some strict warnings in tests

4 years agoFix a few compiler warnings with macOS / clang.
Brecht Van Lommel [Sat, 18 Feb 2017 22:52:31 +0000 (23:52 +0100)]
Fix a few compiler warnings with macOS / clang.

4 years agoFix comparison of identicals
Mike Erwin [Wed, 31 May 2017 08:43:08 +0000 (10:43 +0200)]
Fix comparison of identicals

Some of these check that dimensions match before running code that
assumes they do match.

Found with PVS-Studio T48917.

4 years agoAdd basic track masking API in place
Sergey Sharybin [Wed, 31 May 2017 08:39:16 +0000 (10:39 +0200)]
Add basic track masking API in place

This brings back ability to mask non-interesting parts of
specific track (the feature got lost with new auto-track API).

Added it back by extending frame accessor class. This isn't really
a frame thing, but we don't have other type of accessor here.

Surely, we can use old-style API here and pass mask via region
tracker options for this particular case, but then it becomes much
less obvious how real auto-tracker will access this mask with old
style API.

So seems we do need an accessor for such data, just matter of
finding better place than frame accessor.

4 years agoTests: Tweak epsilon to avoid what looks a false-positive failure
Sergey Sharybin [Wed, 31 May 2017 08:36:26 +0000 (10:36 +0200)]
Tests: Tweak epsilon to avoid what looks a false-positive failure

4 years agoCMake: Fix mistake in closing branch
Sergey Sharybin [Wed, 31 May 2017 08:15:43 +0000 (10:15 +0200)]
CMake: Fix mistake in closing branch

5 years agoSet of fixes for MSVC215
Sergey Sharybin [Thu, 21 Jul 2016 10:52:33 +0000 (12:52 +0200)]
Set of fixes for MSVC215

- Move GLOG/GFLAGS defines to a more global scope,
  this way ANY of our own libraries will use proper
  declspec.

- Compile png/zlib/openexif on Windows as well since
  those are required for a correct linking.

5 years agoDisable unexisting Ceres option
Sergey Sharybin [Wed, 20 Jul 2016 16:14:46 +0000 (18:14 +0200)]
Disable unexisting Ceres option

Explicit Schur complement requires having
newer Ceres than we currently have bundled.

5 years agoVarious fixes for MSVC
Sergey Sharybin [Wed, 20 Jul 2016 16:04:57 +0000 (18:04 +0200)]
Various fixes for MSVC

- Update Eigen to 3.2.7 since this brings crucial
  fixes for MSVC 2015.

- Switch to STATIC build by default.

  There are issues building current sources as dynamic
  libraries with MSVC2015 and additionally building
  dynamic Ceres is not recommended anyway, so let's
  not do this for the time being.

If anyone finds a way to make this all working --
it'llsurely be a welcome addition.

5 years agoFix strict compiler warnings
Sergey Sharybin [Mon, 4 Jan 2016 13:30:12 +0000 (18:30 +0500)]
Fix strict compiler warnings

5 years agoGLog/GFlags: Reduce difference between upstream and bundled versions
Sergey Sharybin [Sun, 3 Jan 2016 09:17:10 +0000 (14:17 +0500)]
GLog/GFlags: Reduce difference between upstream and bundled versions

Several things here:

- Re-bundled sources using own fork with pull-requests applied on the sources.

- Got rid of changes around include "config.h", it was needed by Blender to
  make it's include directories configuration to work. This could be addressed
  differently from Blender side.

- Moved some customization to defines set by CMakeLists.

5 years agoGFlags linking errors fix for MSVC
Sergey Sharybin [Sat, 2 Jan 2016 07:42:55 +0000 (12:42 +0500)]
GFlags linking errors fix for MSVC

5 years agoAlternative fix for missing prototype for a couple of functions
Sergey Sharybin [Thu, 31 Dec 2015 12:56:12 +0000 (17:56 +0500)]
Alternative fix for missing prototype for a couple of functions

5 years agoUpdate GFlags to the latest upstream version
Sergey Sharybin [Thu, 31 Dec 2015 12:33:05 +0000 (17:33 +0500)]
Update GFlags to the latest upstream version

Makes it easier to synchronize some compiler/warning fixes.

5 years agoGLog: Solve some compilation warnings
Sergey Sharybin [Thu, 31 Dec 2015 11:15:59 +0000 (16:15 +0500)]
GLog: Solve some compilation warnings

Those are actually sent to a pull-request, see

  https://github.com/google/glog/pull/81

5 years agoAdd Martijn Berger to the AUTHORS file
Sergey Sharybin [Thu, 31 Dec 2015 11:13:53 +0000 (16:13 +0500)]
Add Martijn Berger to the AUTHORS file

5 years agoFix compilation error of Glog and Gflags with MSVC2015
Martijn Berger [Thu, 31 Dec 2015 11:13:08 +0000 (16:13 +0500)]
Fix compilation error of Glog and Gflags with MSVC2015

5 years agoFix OS X (with 10.11 SDK) glog build errors due to using deprecated code.
Brecht Van Lommel [Thu, 31 Dec 2015 09:00:58 +0000 (14:00 +0500)]
Fix OS X (with 10.11 SDK) glog build errors due to using deprecated code.

Some values are now restored to the ones from before the upgrade today.

5 years agoTweaks to Glog to support building on all platforms
Sergey Sharybin [Wed, 30 Dec 2015 11:59:28 +0000 (16:59 +0500)]
Tweaks to Glog to support building on all platforms

This makes it possible to compile Libmv on all platforms,
amount of hacks is lower, which could bring some warnings
up, but those are better be addressed via upstream which
is now rather active.

5 years agoEnable explicit Schur complement matrix by default
Sergey Sharybin [Wed, 30 Dec 2015 11:15:47 +0000 (16:15 +0500)]
Enable explicit Schur complement matrix by default

Gives up to 2x speed up of camera solving process in average scene.
In the really huge one it might be slower, but that we need to investigate.

5 years agoFix one frame memory leak when tracking last frame
Sergey Sharybin [Wed, 30 Dec 2015 11:13:03 +0000 (16:13 +0500)]
Fix one frame memory leak when tracking last frame

5 years agoMotion tracking not workig with Xcode 7 on OS X.
Brecht Van Lommel [Wed, 30 Dec 2015 11:11:24 +0000 (16:11 +0500)]
Motion tracking not workig with Xcode 7 on OS X.

Caused by use of the uninitialized shape_ variable in Resize().

5 years agoUpdate GLog to latest upstream
Sergey Sharybin [Wed, 30 Dec 2015 10:56:40 +0000 (15:56 +0500)]
Update GLog to latest upstream

Should fix issues building with MSVC2015.

5 years agoFix wrong README file reference
Sergey Sharybin [Wed, 30 Dec 2015 11:01:10 +0000 (16:01 +0500)]
Fix wrong README file reference

6 years agoMake README more informative for GitHub viewers
Keir Mierle [Mon, 11 May 2015 09:16:53 +0000 (02:16 -0700)]
Make README more informative for GitHub viewers

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1295

6 years agoSimplify the modal solver Ceres cost function
Keir Mierle [Mon, 11 May 2015 08:54:09 +0000 (01:54 -0700)]
Simplify the modal solver Ceres cost function

Fix test by flipping the quaternion.

Reviewers: sergey

Reviewed By: sergey

Projects: #libmv

Differential Revision: https://developer.blender.org/D756

6 years agoSynchronize MSVC compilation fixes from Blender
Sergey Sharybin [Wed, 31 Dec 2014 14:05:51 +0000 (19:05 +0500)]
Synchronize MSVC compilation fixes from Blender

6 years agoUpdate GLog to latest upstream revision 143
Sergey Sharybin [Wed, 31 Dec 2014 10:32:07 +0000 (15:32 +0500)]
Update GLog to latest upstream revision 143

Mainly to solve compilation error with demangle.cc.

6 years agoUpdate GFlags to latest release 2.1.1
Sergey Sharybin [Fri, 12 Dec 2014 09:59:55 +0000 (14:59 +0500)]
Update GFlags to latest release 2.1.1

Main purpose of this (andsome of upcoming) update is to check if the
upstream sources are useable without any modifications for us. And if
not, then we'll need to consider moving some changes into upstream.

This commit contains an one-to-one copy of the upstream GFlags library
and also changes namespace usage since it's changed in the upstream.

6 years agoLibmv: Code cleanup, mixed class/struct in declaration/definition
Sergey Sharybin [Fri, 31 Oct 2014 21:53:36 +0000 (02:53 +0500)]
Libmv: Code cleanup, mixed class/struct in declaration/definition

6 years agoLibmv: Support disabled color channels in tracking settings
Sergey Sharybin [Thu, 30 Oct 2014 18:13:53 +0000 (23:13 +0500)]
Libmv: Support disabled color channels in tracking settings

This was never ported to a new tracking pipeline and now it's done using
FrameAccessor::Transform routines. Quite striaghtforward, but i've changed
order of grayscale conversion in blender side with call of transform callback.

This way it's much easier to perform rescaling in libmv side.

7 years agoMinor keyframe selection cleanups
Keir Mierle [Sat, 23 Aug 2014 07:38:01 +0000 (00:38 -0700)]
Minor keyframe selection cleanups

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D757

7 years agoimplement backward prediction
Sergey Sharybin [Fri, 22 Aug 2014 19:55:32 +0000 (01:55 +0600)]
implement backward prediction

The title actually says it all, just extend current implementation
of PredictMarkerPosition() to cases when tracking happens in the reverse
order (from the end frame to start).

it's still doesn't solve all the ambiguity happening in the function
in cases when one tracks the feature and then re-tracks it in order
to refine the sliding. This is considered a separate TODO for now and
will likely be solved by passing tracking direction to the prediction
function.

Reviewers: keir

Reviewed By: keir

Differential Revision: https://developer.blender.org/D663

7 years agoMake libmv compile on Ubuntu 14.04
Keir Mierle [Fri, 22 Aug 2014 05:45:22 +0000 (22:45 -0700)]
Make libmv compile on Ubuntu 14.04

Reviewers: fsiddi

Reviewed By: fsiddi

Subscribers: sergey

Differential Revision: https://developer.blender.org/D755

7 years agoFix wrong residual blocks counter
Sergey Sharybin [Tue, 22 Jul 2014 18:42:00 +0000 (00:42 +0600)]
Fix wrong residual blocks counter

This happened in cases when having zero-weighted tracks
and could lead to some assert failures on marking parameter
block constant.