Go to the documentation of this file.
35 int tanpi8gx, tan3pi8gx;
40 tanpi8gx = 27146 * gx;
41 tan3pi8gx = 158218 * gx;
61 uint8_t *
dst,
int dst_linesize,
62 const int8_t *dir,
int dir_linesize,
63 const uint16_t *
src,
int src_linesize)
67 #define COPY_MAXIMA(ay, ax, by, bx) do { \
68 if (src[i] > src[(ay)*src_linesize + i+(ax)] && \
69 src[i] > src[(by)*src_linesize + i+(bx)]) \
70 dst[i] = av_clip_uint8(src[i]); \
73 for (j = 1; j <
h - 1; j++) {
77 for (
i = 1;
i <
w - 1;
i++) {
90 uint8_t *
dst,
int dst_linesize,
91 const uint8_t *
src,
int src_linesize)
95 for (j = 0; j <
h; j++) {
96 for (
i = 0;
i <
w;
i++) {
102 if (!(!
i ||
i ==
w - 1 || !j || j ==
h - 1) &&
static int get_rounded_direction(int gx, int gy)
#define COPY_MAXIMA(ay, ax, by, bx)
void ff_non_maximum_suppression(int w, int h, uint8_t *dst, int dst_linesize, const int8_t *dir, int dir_linesize, const uint16_t *src, int src_linesize)
Filters rounded gradients to drop all non-maxima pixels in the magnitude image Expects gradients gene...
void ff_double_threshold(int low, int high, int w, int h, uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize)
Filters all pixels in src to keep all pixels > high, and keep all pixels > low where all surrounding ...
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define i(width, name, range_min, range_max)