diff options
Diffstat (limited to 'extern/libmv/third_party/fast/fast.c')
-rw-r--r-- | extern/libmv/third_party/fast/fast.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/extern/libmv/third_party/fast/fast.c b/extern/libmv/third_party/fast/fast.c new file mode 100644 index 00000000000..c675f0af883 --- /dev/null +++ b/extern/libmv/third_party/fast/fast.c @@ -0,0 +1,71 @@ +#include <stdlib.h> +#include "fast.h" + + +xy* fast9_detect_nonmax(const byte* im, int xsize, int ysize, int stride, int b, int* ret_num_corners) +{ + xy* corners; + int num_corners; + int* scores; + xy* nonmax; + + corners = fast9_detect(im, xsize, ysize, stride, b, &num_corners); + scores = fast9_score(im, stride, corners, num_corners, b); + nonmax = nonmax_suppression(corners, scores, num_corners, ret_num_corners); + + free(corners); + free(scores); + + return nonmax; +} + +xy* fast10_detect_nonmax(const byte* im, int xsize, int ysize, int stride, int b, int* ret_num_corners) +{ + xy* corners; + int num_corners; + int* scores; + xy* nonmax; + + corners = fast10_detect(im, xsize, ysize, stride, b, &num_corners); + scores = fast10_score(im, stride, corners, num_corners, b); + nonmax = nonmax_suppression(corners, scores, num_corners, ret_num_corners); + + free(corners); + free(scores); + + return nonmax; +} + +xy* fast11_detect_nonmax(const byte* im, int xsize, int ysize, int stride, int b, int* ret_num_corners) +{ + xy* corners; + int num_corners; + int* scores; + xy* nonmax; + + corners = fast11_detect(im, xsize, ysize, stride, b, &num_corners); + scores = fast11_score(im, stride, corners, num_corners, b); + nonmax = nonmax_suppression(corners, scores, num_corners, ret_num_corners); + + free(corners); + free(scores); + + return nonmax; +} + +xy* fast12_detect_nonmax(const byte* im, int xsize, int ysize, int stride, int b, int* ret_num_corners) +{ + xy* corners; + int num_corners; + int* scores; + xy* nonmax; + + corners = fast12_detect(im, xsize, ysize, stride, b, &num_corners); + scores = fast12_score(im, stride, corners, num_corners, b); + nonmax = nonmax_suppression(corners, scores, num_corners, ret_num_corners); + + free(corners); + free(scores); + + return nonmax; +} |