forked from bartvdbraak/blender
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.
This commit is contained in:
parent
616eb84452
commit
1dd5a89c87
5
extern/libmv/libmv-capi.cpp
vendored
5
extern/libmv/libmv-capi.cpp
vendored
@ -192,7 +192,7 @@ static void imageToFloatBuf(const libmv::FloatImage *image, int channels, float
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DUMP_FAILURE) || defined (DUMP_ALWAYS)
|
#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_infop info_ptr;
|
||||||
png_structp png_ptr;
|
png_structp png_ptr;
|
||||||
@ -437,6 +437,9 @@ int libmv_trackRegion(const struct libmv_trackRegionOptions *options,
|
|||||||
#endif
|
#endif
|
||||||
saveImage("old_patch", old_patch, x1[4], y1[4]);
|
saveImage("old_patch", old_patch, x1[4], y1[4]);
|
||||||
saveImage("new_patch", new_patch, x2[4], y2[4]);
|
saveImage("new_patch", new_patch, x2[4], y2[4]);
|
||||||
|
|
||||||
|
if (options->image1_mask)
|
||||||
|
saveImage("mask", image1_mask, x2[4], y2[4]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user