25 int count = features.size();
28 for (
int i = 0; i <
count; i++) {
29 libmv_features->
features[i] = features.at(i);
35 return libmv_features;
41#define LIBMV_CONVERT(the_detector) \
42 case LIBMV_DETECTOR_##the_detector: \
43 detector_options->type = DetectOptions::the_detector; \
71 libmv_convertDetectorOptions(
options, &detector_options);
75 Detect(image, detector_options, &detected_features);
78 libmv_Features* result = libmv_featuresFromVector(detected_features);
93 libmv_convertDetectorOptions(
options, &detector_options);
97 Detect(image, detector_options, &detected_features);
100 libmv_Features* result = libmv_featuresFromVector(detected_features);
112 return libmv_features->
count;
124 *score = feature.
score;
125 *size = feature.
size;
3D array (row, column, channel).
input_tx image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "preview_img") .compute_source("compositor_compute_preview.glsl") .do_static_compilation(true)
CCL_NAMESPACE_BEGIN struct Options options
#define LIBMV_CONVERT(the_detector)
void libmv_getFeature(const libmv_Features *libmv_features, int number, double *x, double *y, double *score, double *size)
libmv_Features * libmv_detectFeaturesByte(const unsigned char *image_buffer, int width, int height, int channels, libmv_DetectOptions *options)
void libmv_featuresDestroy(libmv_Features *libmv_features)
libmv_Features * libmv_detectFeaturesFloat(const float *image_buffer, int width, int height, int channels, libmv_DetectOptions *options)
int libmv_countFeatures(const libmv_Features *libmv_features)
void libmv_floatBufferToFloatImage(const float *buffer, int width, int height, int channels, FloatImage *image)
void libmv_byteBufferToFloatImage(const unsigned char *buffer, int width, int height, int channels, FloatImage *image)
void Detect(const FloatImage &image, const DetectOptions &options, vector< Feature > *detected_features)
std::vector< ElementType, Eigen::aligned_allocator< ElementType > > vector
unsigned char * moravec_pattern
#define LIBMV_STRUCT_NEW(type, count)
#define LIBMV_STRUCT_DELETE(what)