http://www.miikahweb.com/feed.php MiikaHweb - Blender Commits By Keir http://www.miikahweb.com/ MiikaHweb - Blender Commits By Keir fi Thu, 27 Feb 20 05:06:22 +0000 MiikaHweb RSS contact at miikahweb.com <![CDATA[[b15a056] master: Libmv: Initial commit of unfinished AutoTrack API]]> http://www.miikahweb.com/en/blender/git-logs/commit/b15a056230434bbb873a5d5d04e560a6569d8e62 b15a056
Branches : master
Author : Keir Mierle (keir)
Committed By : Sergey Sharybin (sergey)
----------------------------------------
Libmv: Initial commit of unfinished AutoTrack API

This starts the creating the new AutoTrack API. The new API will
make it possible for libmv to do full autotracking, including
predictive tracking and also support multiple motion models (3D
planes etc).

The first goal (not in this patch) is to convert Blender to use
the new API without adding any new functionality.

This API currently contanins:

- Frame accessor to access frames which are stored in Blender side.
- New Tracks implementation
- New Reconstruction implementation

Currently this API only tested on doing the same frame-to-frame
tracking as the old API allowed to do. But it also supports now
predictive tracking which is based on the Kalman filter.

----------------------------------------
24 Paths Changed]]>
Thu, 30 Oct 2014 18:03:34 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/b15a056230434bbb873a5d5d04e560a6569d8e62Keir Mierle
<![CDATA[[9b927ef] libmv_prediction: Initial commit of unfinished AutoTrack API]]> http://www.miikahweb.com/en/blender/git-logs/commit/9b927ef8d371dc157279d921d402fc6c4e895055 9b927ef
Branches : libmv_prediction
Author : Keir Mierle (keir)
Committed By : Sergey Sharybin (sergey)
----------------------------------------
Initial commit of unfinished AutoTrack API

This starts the creating the new AutoTrack API. The new API will
make it possible for libmv to do full autotracking, including
predictive tracking and also support multiple motion models (3D
planes etc).

The first goal (not in this patch) is to convert Blender to use
the new API without adding any new functionality.

This API currently contanins:

- Frame accessor to access frames which are stored in Blender side.
- New Tracks implementation
- New Reconstruction implementation

Currently this API only tested on doing the same frame-to-frame
tracking as the old API allowed to do. But it also supports now
predictive tracking which is based on the Kalman filter.

----------------------------------------
24 Paths Changed]]>
Fri, 26 Sep 2014 18:51:22 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/9b927ef8d371dc157279d921d402fc6c4e895055Keir Mierle
<![CDATA[[e021860] soc-2011-tomato: Add Procrustes PNP ("PPnP") resection algorithm to libmv]]> http://www.miikahweb.com/en/blender/git-logs/commit/e021860d13bd2a884ee957c899fd4c71fdbdcb40 e021860
Branches : soc-2011-tomato
Author : Keir Mierle (keir)
----------------------------------------
Add Procrustes PNP ("PPnP") resection algorithm to libmv

This adds a new Euclidean resection method, used to create the
initial reconstruction in the motion tracker, to libmv. The method
is based on the Procrustes PNP algorithm (aka "PPnP"). Currently
the algorithm is not connected with the motion tracker, but it
will be eventually since it supports initialization.

Having an initial guess when doing resection is important for
ambiguous cases where potentially the user could offer extra
guidance to the solver, in the form of "this point is in front of
that point".

----------------------------------------
2 Paths Changed]]>
Fri, 02 Aug 2013 07:59:26 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/e021860d13bd2a884ee957c899fd4c71fdbdcb40Keir Mierle
<![CDATA[[e13fa94] depsgraph_refactor: Removed the IDKey for building relations, due to ambiguity...]]> http://www.miikahweb.com/en/blender/git-logs/commit/e13fa944ee73bc277fc5e60b01776ca19b9bd495 e13fa94
Branches : depsgraph_refactor
Author : Keir Mierle (keir)
----------------------------------------
Removed the IDKey for building relations, due to ambiguity and failing to add
relations.

To add a relations between operations we need to address a specific component or
operation directly.

----------------------------------------
3 Paths Changed]]>
Tue, 20 May 2014 16:25:12 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/e13fa944ee73bc277fc5e60b01776ca19b9bd495Keir Mierle
<![CDATA[[427844c] master: Eagerly attempt to refine a track before doing a brute search...]]> http://www.miikahweb.com/en/blender/git-logs/commit/427844c28d2083ffcec93066ebee3fcf0fd01e42 427844c
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Eagerly attempt to refine a track before doing a brute search

Before the refinement phase of tracking, a brute force SAD search
is run across the search area. This works well but is slow;
especially if the guess for the track's location is accurate.

This patch runs a refinement phase before running a brute force
search, hoping that the guessed position (in x2, y2) is close to
the best answer. If it is, then no brute search is done. If it is
not, then a normal brute force search followed by refinement is
done.

In some cases this may produce worse tracks than before; the
regressions will need investigation. The predictive motion model
(to be implemented) will reduce the probability of that happening.

----------------------------------------
3 Paths Changed]]>
Tue, 29 Oct 2013 01:06:50 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/427844c28d2083ffcec93066ebee3fcf0fd01e42Keir Mierle
<![CDATA[[d10abe6] master: Fix bug where libmv tracking incorrectly succeeds on failure]]> http://www.miikahweb.com/en/blender/git-logs/commit/d10abe6d4d6792bf0f9d6dbeed75acb9e46f210f d10abe6
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Fix bug where libmv tracking incorrectly succeeds on failure

Before this patch, if Ceres returned USER_SUCCESS indicating that
Ceres was only changing the tracked quad slightly between
iterations (indicating convergence), no final correlation check
was done. This leads to incorrectly returning that the tracking
was successful, when it actually failed.

----------------------------------------
1 Path Changed]]>
Mon, 28 Oct 2013 18:34:19 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/d10abe6d4d6792bf0f9d6dbeed75acb9e46f210fKeir Mierle
<![CDATA[[2833994] master: Switch motion tracker bundle adjustment to Ceres.]]> http://www.miikahweb.com/en/blender/git-logs/commit/2833994a71c548917341a51f9085149f122ddf53 2833994
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Switch motion tracker bundle adjustment to Ceres.

Patch originally written by me, then finished by Sergey. Big
thanks to Sergey for troopering through and fixing the many issues
with my original (not compilable) patch.

The Ceres implementation uses 2 parameter blocks for each camera
(1 for rotation and 1 for translation), 1 parameter block for
common intrinsics (focal length etc) and 1 parameter block for
each track (e.g. bundle or 3D point).

We turn on some fancy optimizer options to get better performance,
in particular:

options.preconditioner_type = ceres::SCHUR_JACOBI;
options.linear_solver_type = ceres::ITERATIVE_SCHUR;
options.use_inner_iterations = true;
options.use_nonmonotonic_steps = true;
options.max_num_iterations = 100;

Special thanks to Sameer Agarwal of Ceres fame for splitting out
the SCHUR_JACOBI preconditioner so that it didn't depend on
CHOLMOD. Previously we could not use that preconditioner in
Blender because CHOLMOD is too large of a dependency for Blender.

BundleIntrinsicsLogMessage:
- Moved bunch of if(foo) LG << "bar" into this function, to make
EuclideanBundleCommonIntrinsics a little bit easier to follow.

EuclideanBundle:
- Fix RMSE logging.

----------------------------------------
2 Paths Changed]]>
Mon, 25 Feb 2013 20:00:48 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/2833994a71c548917341a51f9085149f122ddf53Keir Mierle
<![CDATA[[e38c1a5] master: Make Euclidean resection "always" succeed.]]> http://www.miikahweb.com/en/blender/git-logs/commit/e38c1a5ae721630c217ca7830fd7aabf6f4620e0 e38c1a5
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Make Euclidean resection "always" succeed.

The Euclidean resection code had a magical constant, 1e-3, used to
compare the results of solving an equation. This failure detection
was well-intended, trying to prevent poor solutions from getting
made without notifying the caller. Unfortunately in practice, this
threshold is too conservative. Furthermore, it is not clear the
threshold should exist at all; the purpose of the Euclidean
resection is to come up with the best solution it can; other
methods (e.g. reprojection error) should be used to compare
whether the method succeeded.

This commit changes the Euclidean EPnP code to always succeed,
causing the previous fallback to projective resection to never
run. In most cases, this will result in better reconstructions.

This should, in most cases, fix the dreaded "flipping" problem.

----------------------------------------
5 Paths Changed]]>
Thu, 20 Sep 2012 18:55:44 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/e38c1a5ae721630c217ca7830fd7aabf6f4620e0Keir Mierle
<![CDATA[[5e43392] master: Fix variable naming in the planar tracker.]]> http://www.miikahweb.com/en/blender/git-logs/commit/5e433927b56ee99d57615bd932dd15c8eb5df556 5e43392
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Fix variable naming in the planar tracker.

----------------------------------------
1 Path Changed]]>
Thu, 20 Sep 2012 02:27:34 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/5e433927b56ee99d57615bd932dd15c8eb5df556Keir Mierle
<![CDATA[[0af0da9] master: Add smarter tolerance checking in the planar tracker.]]> http://www.miikahweb.com/en/blender/git-logs/commit/0af0da957d2898adcab16a69cddc14c54f1ac5f1 0af0da9
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Add smarter tolerance checking in the planar tracker.

The planar tracker uses Ceres for the refinement stage. During
refinement, Ceres iteratively updates the parameters with the
latest best guess. If the change in the parameters falls below a
threshold, Ceres will abort successfully ("converged").

For the case of pure translation tracking, the parameters are
exactly the two pixel shifts (dx, dy), and measuring the change in
these parameters gives a meaningful termination criterion.
However, for all the other parameterizations like affine, where
the parameterization involves affine parameters that have no
physical interpretation, Ceres is left with no way to terminate
the solver early. With the existing code, often many iterations
are run long after Ceres has found a solution sufficiently
accurate for all tracking needs. No one needs tracking with
a quadrillionth of a pixel accuracy; that time is wasted.

This patch extends the existing iteration callback that is passed
in to Ceres to check if the pattern has fallen out of the search
window, to also check if the optimizer has made a tiny step. In
particular, if the maximum shift of any patch corner between two
successful optimizer steps is less than a threshold (currently
0.005 pixels), the track is declared successful and tracking
is terminated.

This leads to dramatic speed increases in some cases, with little
to no loss in track quality. This is especially apparent when
tracking patches with affine or perspective motion models. For
example, on some tracking cases I tried, the iterations Ceres took
went from 50 to 3.

----------------------------------------
2 Paths Changed]]>
Thu, 20 Sep 2012 02:10:33 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/0af0da957d2898adcab16a69cddc14c54f1ac5f1Keir Mierle
<![CDATA[[a6f4474] master: Detect too-small planar tracking patches.]]> http://www.miikahweb.com/en/blender/git-logs/commit/a6f447427bbe6dab37431ca00bfc83decc9e7e87 a6f4474
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Detect too-small planar tracking patches.

The planar tracker did not detect very skinny patches which have
effectively zero area and are untrackable. This adds detection and
rejection of patterns with zero area. This fixes a crash found by
during Mango production.

----------------------------------------
2 Paths Changed]]>
Wed, 19 Sep 2012 22:25:02 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/a6f447427bbe6dab37431ca00bfc83decc9e7e87Keir Mierle
<![CDATA[[8a46b84] master: Cleanup for when trackers fall out of the search window.]]> http://www.miikahweb.com/en/blender/git-logs/commit/8a46b8454ed1788c1ac17d36187e79c8a4cbb10d 8a46b84
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Cleanup for when trackers fall out of the search window.

Sergey originally left a TODO() here, but his fix is the correct
one. I removed the TODO and fixed some comment issues.

----------------------------------------
1 Path Changed]]>
Wed, 19 Sep 2012 22:01:42 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/8a46b8454ed1788c1ac17d36187e79c8a4cbb10dKeir Mierle
<![CDATA[[7bb79e7] master: Change libmv's bilinear sampling to assume the same pixel]]> http://www.miikahweb.com/en/blender/git-logs/commit/7bb79e777dd44d3d919a15b37d1bf4863c8d2856 7bb79e7
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Change libmv's bilinear sampling to assume the same pixel
conventions as Blender. This fixes the preview widget, and
should make tracking slightly more accurate.

----------------------------------------
1 Path Changed]]>
Sat, 09 Jun 2012 19:22:39 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/7bb79e777dd44d3d919a15b37d1bf4863c8d2856Keir Mierle
<![CDATA[[a844adc] master: Add new warp regularization scheme for planar tracking.]]> http://www.miikahweb.com/en/blender/git-logs/commit/a844adc9c2a5c513f3a8b8de5a029aaffdd96d34 a844adc
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Add new warp regularization scheme for planar tracking.

This adds a new term to the tracking cost function that
restricts how much the optimizer can warp the patch (as
opposed to merely adjusting the translation). This should
reduce the "jumpiness" that is sometimes seen when doing
non-"Loc" tracks.

It is disabled in this commit; a subsequent commit will add
controls to the tracking dialog for this.

----------------------------------------
2 Paths Changed]]>
Sat, 09 Jun 2012 18:58:51 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/a844adc9c2a5c513f3a8b8de5a029aaffdd96d34Keir Mierle
<![CDATA[[1c42677] master: Formatting fixes in Ceres.]]> http://www.miikahweb.com/en/blender/git-logs/commit/1c42677e6c393ea650569b4da1bc0148805fbcd7 1c42677
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Formatting fixes in Ceres.

----------------------------------------
1 Path Changed]]>
Sat, 09 Jun 2012 18:45:54 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/1c42677e6c393ea650569b4da1bc0148805fbcd7Keir Mierle
<![CDATA[[f9be7fc] master: Planar tracker polish.]]> http://www.miikahweb.com/en/blender/git-logs/commit/f9be7fca1747218323cc53a52842374229cdff4a f9be7fc
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Planar tracker polish.

- Fixes the correlation checking code that was broken in the
previous commit. The bug was a transpose error.
- Fixes a memory leak of the warp functor, found by Sameer.
- Various cleanups done at Sameer's suggestion.

Thanks to Sameer Agarwal for a code review.

----------------------------------------
3 Paths Changed]]>
Sat, 09 Jun 2012 06:55:21 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/f9be7fca1747218323cc53a52842374229cdff4aKeir Mierle
<![CDATA[[2767015] master: Make planar tracking much faster.]]> http://www.miikahweb.com/en/blender/git-logs/commit/276701502a6a55be8e447a728914406150e7b7c0 2767015
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Make planar tracking much faster.

- This makes planar tracking around 2-3x or more faster than
before, by rearranging how the sampling is done.
Previously, the source patch was sampled repeatedly on
every optimizer iteration; this was done for
implementation speed, but was wasteful in computation.

- This also contains some additions to Ceres to help
deailing with mixed numeric / automatic differentation. In
particular, there is now a "Chain::Rule" operator that
facilitates calling a function that takes Jet arguments,
yet does numeric derivatives internally. This is used to
mix the numeric differentation of the images with the warp
parameters, passed as jets by Ceres to the warp functor.

There is also a new "JetOps" object for doing operations
on types which may or may not be jets, such as scaling
the derivative part only, or extracting the scalar part
of a jet.

The Ceres patches are aimed at upstream.

- A new function for sampling a patch is now part of the
track_region.h API; this will get used to make the preview
widget properly show what is getting tracked. Currently
the preview widget does not handle perspective tracks.

Known issues:

This patch introduces a bug such that the "Minimum
Correlation" flag does not work; if it is enabled, tracking
aborts immediately. The workaround for now is to disable the
correlation checking, and examine your tracks carefully. A
fix will get added shortly.

----------------------------------------
4 Paths Changed]]>
Fri, 08 Jun 2012 17:42:17 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/276701502a6a55be8e447a728914406150e7b7c0Keir Mierle
<![CDATA[[c72298e] master: Remove an unnecessary template<> line in libmv. Convert debug...]]> http://www.miikahweb.com/en/blender/git-logs/commit/c72298ea19b92ac8674bef8804592d4de8f53a70 c72298e
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Remove an unnecessary template<> line in libmv. Convert debug logs to LG.

----------------------------------------
1 Path Changed]]>
Fri, 18 May 2012 20:04:43 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/c72298ea19b92ac8674bef8804592d4de8f53a70Keir Mierle
<![CDATA[[837eb6b] master: Support normalization in the tracking prepass]]> http://www.miikahweb.com/en/blender/git-logs/commit/837eb6bb182c2020571ded2f4cf155a55e16bd0c 837eb6b
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Support normalization in the tracking prepass

The last tracker commit added normalized tracking. This makes
tracking patches undergoing uniform illumination change easier.
However, the prepass which computes a quick translation-only
estimate of the warp did not take this into account. This commit
fixes that.

This works reasonably well but in some examples the brute
initialization fails. I suspect this is due to the warped template
estimate in the current frame being too different from the
original, so there are multiple peaks in the normalized-SAD
correlation function.

The solution is to use the previous frame for the brute
initialization and the keyframe for refinement, but that requires
architecture changes.

----------------------------------------
1 Path Changed]]>
Fri, 18 May 2012 12:05:10 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/837eb6bb182c2020571ded2f4cf155a55e16bd0cKeir Mierle
<![CDATA[[7414ccf] master: Add light-normalized tracking to the planar tracker]]> http://www.miikahweb.com/en/blender/git-logs/commit/7414ccfeeb745ef0e86ee010137865b5398d10a0 7414ccf
Branches : master
Author : Keir Mierle (keir)
----------------------------------------
Add light-normalized tracking to the planar tracker

This commit adds the ability to normalize patterns by their
average value while tracking, to make them invariant to global
illumination changes.

To see this in action, check out the "Lobby" scene from Hollywood
VFX. If you track the markers that are shadowed by the actress,
previously they would not track. With the scale adaption on, the
tracker would shrink the area to compensate for the changed
illumination, losing the track. With "Normalize" turned on, the
patch is correctly tracked and scale is maintained.

A remaining problem is that only the Ceres cost function is
updated to handle the normalization. The brute translation search
does not take this into account. Perhaps "Prepass" (see below)
should get disabled if normalization is enabled until I fix the
prepass to normalize as well.

There are a few other changes:

- Cleanups in tracking RNA comments.

- Bail out of the sampling loop early if the mask is zero; this
saves expensive samples of the image derivatives.

- Rename the wordy "Translation initialization" to "Prepass" at
Sebastian's suggestion.

- Fix a bug where the mask was ignored when sampling in the cost
functor.

----------------------------------------
8 Paths Changed]]>
Fri, 18 May 2012 02:12:47 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/7414ccfeeb745ef0e86ee010137865b5398d10a0Keir Mierle