Main purpose of this is to bring new gflags library which is more likely
to have a fix for undefined order of static variables initialization and
also to bring new glog where some compilation error are fixed (which are
only visible with more strict checks with clang and c++11 enabled).
The main idea is to share as much code between cases when feature-full built
is done and only logging is needed, so all the defines and include directories
are guaranteed to be the same.
This would hopefully make it so MinGW compilation is all happy about Cycles
logging for both CMake and SCons.
Couple of issues:
- Fist/last frame calculation was wrong
- Keyframe selection might silently fail leading to unpredictable math
errors all over the place. Now if keyframe selection fails solver wouldn't
run.
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.
The title actually tells it all, this commit switches Blender to use the new
autotrack API from Libmv.
From the user point of view it means that prediction model is now used when
tracking which gives really nice results.
All the other changes are not really visible for users, those are just frame
accessors, caches and so for the new 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.
We on'don't really support 10.5 anymore for my knowledge and in any case
the defined symbol was never checked in the sources, so this workaround
was basically doing nothing for quite some time now.
This makes headers a bit less clean (with the anonymous structs
mainly and headers inclusion from another header.
Makes compilation with clang a bit less noisy.
This commit makes it possible to use Glog library for the debug logging.
For now only possible when using CMake and in order to use the logging
the WITH_CYCLES_LOGGING configuration variable is to be enabled.
When this option is not enabled or when using Scons there's no difference
in Cycles behavior at all, when using logging and no output to the console
impact is gonna to be minimal.
This is done in order to make it possible to have debug logging persistent
in code (without need to add it when troubleshooting some bug and removing
it afterwards).
For now actual logging is not placed yet, only all the functions needed for
the logging are written and so.
This would give some performance boost when solving huge scenes,
amount of boost depends on particular scene.
For now enable all of the specializations, in the future we might
add some local patches and restrict only unneeded ones.
Brings new bounds limiting and also prepares build system
for the changes in the upstream.
Namely shared_ptr header and namespace is now being detected
by a build system rather than by hacks in the code.
This commit includes some changes to auto-detection flags
in SCons, presumably adding more consistency there. This
is main changes which are suppoed to be reviewed here.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D581
Pass the arrays by reference rather than by value,
should give some percent of speedup.
Also don't pass the dimensions to the function but
get them from the images themselves.
Hopefully this will give some %% of tracker speedup.
This means if one makes change to either SConscript or CMakeLists.txt
there he MUST update bundle.sh.
Also made it so *.cc files from intern/libmv are matching which would
make it easier to add more .cc files there if needed.
And one more thing is removing 'simple_pipeline/distortion_models.cc'
which doesn't match any of the files.
This commit makes it so CameraIntrinsics is no longer hardcoded
to use the traditional polynomial radial distortion model. Currently
the distortion code has generic logic which is shared between
different distortion models, but had no other models until now.
This moves everything specific to the polynomial radial distortion
to a subclass PolynomialDistortionCameraIntrinsics(), and adds a
new division distortion model suitable for cameras such as the
GoPro which have much stronger distortion due to their fisheye lens.
This also cleans up the internal API of CameraIntrinsics to make
it easier to understand and reduces old C-style code.
New distortion model is available in the Lens panel of MCE.
- Polynomial is the old well-known model
- Division is the new one which s intended to deal better with huge
distortion.
Coefficients of this model works independent from each other
and for division model one probably want to have positive values
to have a barrel distortion.
This gives a huge speedup gain for cases when you've got
rather huge markers on a byte images.
Done by skipping IMB_float_from_rect()/IMB_rect_from_float()
for such cases. We can sample the buffers without color space
conversion.