diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-20 16:54:28 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-20 16:54:28 +0400 |
commit | 1dd5a89c87563d077f016fc38894c5195f6f03b0 (patch) | |
tree | c01f4f666380cdc206913d88ed5f2f0417ae00e3 | |
parent | 616eb844525759cbb491a6bcd0de0dfce37be346 (diff) |
Motion tracking: dump mask image when dump images is enabled
This is pure development option which is enabled by defining DUMP_FAILURE
or DUMP_ALWAYS libmv-capi.
-rw-r--r-- | extern/libmv/libmv-capi.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extern/libmv/libmv-capi.cpp b/extern/libmv/libmv-capi.cpp index a15927f881d..c1788cc9422 100644 --- a/extern/libmv/libmv-capi.cpp +++ b/extern/libmv/libmv-capi.cpp @@ -192,7 +192,7 @@ static void imageToFloatBuf(const libmv::FloatImage *image, int channels, float } #if defined(DUMP_FAILURE) || defined (DUMP_ALWAYS) -void savePNGImage(png_bytep *row_pointers, int width, int height, int depth, int color_type, char *file_name) +static void savePNGImage(png_bytep *row_pointers, int width, int height, int depth, int color_type, char *file_name) { png_infop info_ptr; png_structp png_ptr; @@ -437,6 +437,9 @@ int libmv_trackRegion(const struct libmv_trackRegionOptions *options, #endif saveImage("old_patch", old_patch, x1[4], y1[4]); saveImage("new_patch", new_patch, x2[4], y2[4]); + + if (options->image1_mask) + saveImage("mask", image1_mask, x2[4], y2[4]); } #endif |