16 #include <cvd/fast_corner.h> 17 #include <cvd/utility.h> 19 template <
void (* F)(const CVD::BasicImage<CVD::byte>& I, std::vector<CVD::ImageRef>& corners,
int barrier)>
22 std::vector<size_t>* out_feats_index_by_row)
24 auto ptr =
reinterpret_cast<CVD::byte*
>(I->imageData);
25 CVD::BasicImage<CVD::byte>
img(ptr, {I->width, I->height}, I->widthStep);
27 std::vector<CVD::ImageRef> outputs;
29 outputs.reserve(I->width * I->height);
30 F(
img, outputs, barrier);
31 for(
auto & output : outputs)
35 if(out_feats_index_by_row)
37 auto & counters = *out_feats_index_by_row;
38 counters.assign(I->height, 0);
39 for(
auto & output : outputs)
48 std::vector<size_t>* out_feats_index_by_row)
50 fast_corner_detect<CVD::fast_corner_detect_9>(I, corners, barrier, octave, out_feats_index_by_row);
55 std::vector<size_t>* out_feats_index_by_row)
57 fast_corner_detect<CVD::fast_corner_detect_10>(I, corners, barrier, octave, out_feats_index_by_row);
63 std::vector<size_t>* out_feats_index_by_row)
65 fast_corner_detect<CVD::fast_corner_detect_12>(I, corners, barrier, octave, out_feats_index_by_row);
void fast_corner_detect(const IplImage *I, TSimpleFeatureList &corners, int barrier, uint8_t octave, std::vector< size_t > *out_feats_index_by_row)
void push_back_fast(const FEATURE &f)
void fast_corner_detect_12(const IplImage *I, TSimpleFeatureList &corners, int barrier, uint8_t octave, std::vector< size_t > *out_feats_index_by_row)
void fast_corner_detect_9(const IplImage *I, TSimpleFeatureList &corners, int barrier, uint8_t octave, std::vector< size_t > *out_feats_index_by_row)
void fast_corner_detect_10(const IplImage *I, TSimpleFeatureList &corners, int barrier, uint8_t octave, std::vector< size_t > *out_feats_index_by_row)