34 LOG(FATAL) <<
"Unhandled tracking direction " << direction
35 <<
", should never happen.";
41 switch (motion_model) {
42#define LIBMV_CONVERT(the_model) \
43 case TrackRegionOptions::the_model: return TrackRegionOptions::the_model;
55 LOG(FATAL) <<
"Unhandled motion model " << motion_model
56 <<
", should never happen.";
67 track_region_options->
mode = convertMotionModelToMode(
options.motion_model);
91 result->termination_reason =
"";
92 result->correlation = track_region_result.
correlation;
107 double xx1[5], yy1[5];
108 double xx2[5], yy2[5];
109 bool tracking_result =
false;
112 for (
int i = 0; i < 5; ++i) {
120 FloatImage image1_mask;
125 options->image1_mask, image1_width, image1_height, 1, &image1_mask);
131 FloatImage old_patch, new_patch;
133 image1, image1_width, image1_height, 1, &old_patch);
135 image2, image2_width, image2_height, 1, &new_patch);
138 TrackRegion(old_patch,
142 track_region_options,
145 &track_region_result);
148 for (
int i = 0; i < 5; ++i) {
156 tracking_result =
true;
160#if defined(DUMP_FAILURE) || defined(DUMP_ALWAYS)
161 bool need_dump = !tracking_result;
176 return tracking_result;
3D array (row, column, channel).
CCL_NAMESPACE_BEGIN struct Options options
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
bool libmv_saveImage(const FloatImage &image, const char *prefix, int x0, int y0)
void libmv_floatBufferToFloatImage(const float *buffer, int width, int height, int channels, FloatImage *image)
#define LIBMV_CONVERT(the_model)
void libmv_configureTrackRegionOptions(const libmv_TrackRegionOptions &options, TrackRegionOptions *track_region_options)
void libmv_regionTrackergetResult(const TrackRegionResult &track_region_result, libmv_TrackRegionResult *result)
int libmv_trackRegion(const libmv_TrackRegionOptions *options, const float *image1, int image1_width, int image1_height, const float *image2, int image2_width, int image2_height, const double *x1, const double *y1, libmv_TrackRegionResult *, double *x2, double *y2)
libmv_TrackRegionDirection
@ LIBMV_TRACK_REGION_FORWARD
@ LIBMV_TRACK_REGION_BACKWARD
void TrackRegion(const FloatImage &image1, const FloatImage &image2, const double *x1, const double *y1, const TrackRegionOptions &options, double *x2, double *y2, TrackRegionResult *result)
bool use_normalized_intensities
bool use_brute_initialization
double minimum_correlation
bool attempt_refine_before_brute