diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-30 21:13:53 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-30 21:29:53 +0300 |
commit | f312f890f1bf035db52f3518ca9583a62999cf02 (patch) | |
tree | fc1a66f2aab9b857a608ce79e6aa4332cd59f707 /extern/libmv/intern | |
parent | 606329d0f872d675faf9362f9d2f89cf0551dd25 (diff) |
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.
Diffstat (limited to 'extern/libmv/intern')
-rw-r--r-- | extern/libmv/intern/frame_accessor.cc | 2 | ||||
-rw-r--r-- | extern/libmv/intern/tracksN.cc | 2 | ||||
-rw-r--r-- | extern/libmv/intern/tracksN.h | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/extern/libmv/intern/frame_accessor.cc b/extern/libmv/intern/frame_accessor.cc index a7d969af05b..8bf2cab914b 100644 --- a/extern/libmv/intern/frame_accessor.cc +++ b/extern/libmv/intern/frame_accessor.cc @@ -147,8 +147,8 @@ void libmv_frameAccessorgetTransformRun(const libmv_FrameTransform *transform, const libmv_FloatImage *input_image, libmv_FloatImage *output_image) { const FloatImage input(input_image->buffer, - input_image->width, input_image->height, + input_image->width, input_image->channels); FloatImage output; diff --git a/extern/libmv/intern/tracksN.cc b/extern/libmv/intern/tracksN.cc index 9d68bce2869..9e1da88ef10 100644 --- a/extern/libmv/intern/tracksN.cc +++ b/extern/libmv/intern/tracksN.cc @@ -54,6 +54,7 @@ void libmv_apiMarkerToMarker(const libmv_Marker& libmv_marker, marker->reference_frame = libmv_marker.reference_frame; marker->model_type = (Marker::ModelType) libmv_marker.model_type; marker->model_id = libmv_marker.model_id; + marker->disabled_channels = libmv_marker.disabled_channels; } void libmv_markerToApiMarker(const Marker& marker, @@ -78,6 +79,7 @@ void libmv_markerToApiMarker(const Marker& marker, libmv_marker->reference_frame = marker.reference_frame; libmv_marker->model_type = (libmv_MarkerModelType) marker.model_type; libmv_marker->model_id = marker.model_id; + libmv_marker->disabled_channels = marker.disabled_channels; } libmv_TracksN* libmv_tracksNewN(void) { diff --git a/extern/libmv/intern/tracksN.h b/extern/libmv/intern/tracksN.h index ea8b3e8a4f8..1366ea2f613 100644 --- a/extern/libmv/intern/tracksN.h +++ b/extern/libmv/intern/tracksN.h @@ -60,6 +60,12 @@ typedef enum libmv_MarkerModelType { LIBMV_MARKER_MODEL_TYPE_CUBE, } libmv_MarkerModelType; +enum libmv_MarkerChannel { + LIBMV_MARKER_CHANNEL_R = (1 << 0), + LIBMV_MARKER_CHANNEL_G = (1 << 1), + LIBMV_MARKER_CHANNEL_B = (1 << 2), +}; + typedef struct libmv_Marker { int clip; int frame; @@ -75,6 +81,7 @@ typedef struct libmv_Marker { int reference_frame; libmv_MarkerModelType model_type; int model_id; + int disabled_channels; } libmv_Marker; #ifdef __cplusplus |