#include <math.h>#include <assert.h>#include <string.h>#include <stdio.h>#include <stdint.h>#include "apriltag.h"#include "common/image_u8x3.h"#include "common/zarray.h"#include "common/unionfind.h"#include "common/timeprofile.h"#include "common/zmaxheap.h"#include "common/postscript_utils.h"#include "common/math_util.h"
Go to the source code of this file.
Classes | |
| struct | blur_task |
| struct | cluster_hash |
| struct | cluster_task |
| struct | line_fit_pt |
| struct | minmax_task |
| struct | pt |
| struct | quad_task |
| struct | remove_vertex |
| struct | segment |
| struct | threshold_task |
| struct | uint64_zarray_entry |
| struct | unionfind_task |
Macros | |
| #define | _USE_MATH_DEFINES |
| #define | DO_CONN(dx, dy) |
| #define | DO_UNIONFIND2(dx, dy) if (im->buf[(y + dy)*s + x + dx] == v) unionfind_connect(uf, y*w + x, (y + dy)*w + x + dx); |
| #define | MAYBE_SWAP(arr, apos, bpos) |
| #define | MERGE(apos, bpos) |
Functions | |
| zarray_t * | apriltag_quad_thresh (apriltag_detector_t *td, image_u8_t *im) |
| struct line_fit_pt * | compute_lfps (int sz, zarray_t *cluster, image_u8_t *im) |
| unionfind_t * | connected_components (apriltag_detector_t *td, image_u8_t *threshim, int w, int h, int ts) |
| void | do_blur_task (void *p) |
| static void | do_cluster_task (void *p) |
| zarray_t * | do_gradient_clusters (image_u8_t *threshim, int ts, int y0, int y1, int w, int nclustermap, unionfind_t *uf, zarray_t *clusters) |
| void | do_minmax_task (void *p) |
| static void | do_quad_task (void *p) |
| void | do_threshold_task (void *p) |
| static void | do_unionfind_first_line (unionfind_t *uf, image_u8_t *im, int w, int s) |
| static void | do_unionfind_line2 (unionfind_t *uf, image_u8_t *im, int w, int s, int y) |
| static void | do_unionfind_task2 (void *p) |
| int | err_compare_descending (const void *_a, const void *_b) |
| void | fit_line (struct line_fit_pt *lfps, int sz, int i0, int i1, double *lineparm, double *err, double *mse) |
| int | fit_quad (apriltag_detector_t *td, image_u8_t *im, zarray_t *cluster, struct quad *quad, int tag_width, bool normal_border, bool reversed_border) |
| zarray_t * | fit_quads (apriltag_detector_t *td, int w, int h, zarray_t *clusters, image_u8_t *im) |
| zarray_t * | gradient_clusters (apriltag_detector_t *td, image_u8_t *threshim, int w, int h, int ts, unionfind_t *uf) |
| zarray_t * | merge_clusters (zarray_t *c1, zarray_t *c2) |
| float | pt_compare_angle (struct pt *a, struct pt *b) |
| static void | ptsort (struct pt *pts, int sz) |
| int | quad_segment_agg (zarray_t *cluster, struct line_fit_pt *lfps, int indices[4]) |
| int | quad_segment_maxima (apriltag_detector_t *td, zarray_t *cluster, struct line_fit_pt *lfps, int indices[4]) |
| image_u8_t * | threshold (apriltag_detector_t *td, image_u8_t *im) |
| image_u8_t * | threshold_bayer (apriltag_detector_t *td, image_u8_t *im) |
| static uint32_t | u64hash_2 (uint64_t x) |
| #define _USE_MATH_DEFINES |
Definition at line 31 of file apriltag_quad_thresh.c.
| #define DO_CONN | ( | dx, | |
| dy | |||
| ) |
| #define DO_UNIONFIND2 | ( | dx, | |
| dy | |||
| ) | if (im->buf[(y + dy)*s + x + dx] == v) unionfind_connect(uf, y*w + x, (y + dy)*w + x + dx); |
Definition at line 982 of file apriltag_quad_thresh.c.
| #define MAYBE_SWAP | ( | arr, | |
| apos, | |||
| bpos | |||
| ) |
| #define MERGE | ( | apos, | |
| bpos | |||
| ) |
| zarray_t* apriltag_quad_thresh | ( | apriltag_detector_t * | td, |
| image_u8_t * | im | ||
| ) |
Definition at line 1848 of file apriltag_quad_thresh.c.
| struct line_fit_pt* compute_lfps | ( | int | sz, |
| zarray_t * | cluster, | ||
| image_u8_t * | im | ||
| ) |
Compute statistics that allow line fit queries to be efficiently computed for any contiguous range of indices.
Definition at line 621 of file apriltag_quad_thresh.c.
| unionfind_t* connected_components | ( | apriltag_detector_t * | td, |
| image_u8_t * | threshim, | ||
| int | w, | ||
| int | h, | ||
| int | ts | ||
| ) |
Definition at line 1498 of file apriltag_quad_thresh.c.
| void do_blur_task | ( | void * | p | ) |
Definition at line 1116 of file apriltag_quad_thresh.c.
|
static |
Definition at line 1689 of file apriltag_quad_thresh.c.
| zarray_t* do_gradient_clusters | ( | image_u8_t * | threshim, |
| int | ts, | ||
| int | y0, | ||
| int | y1, | ||
| int | w, | ||
| int | nclustermap, | ||
| unionfind_t * | uf, | ||
| zarray_t * | clusters | ||
| ) |
Definition at line 1545 of file apriltag_quad_thresh.c.
| void do_minmax_task | ( | void * | p | ) |
Definition at line 1087 of file apriltag_quad_thresh.c.
|
static |
Definition at line 1049 of file apriltag_quad_thresh.c.
| void do_threshold_task | ( | void * | p | ) |
Definition at line 1150 of file apriltag_quad_thresh.c.
|
static |
Definition at line 984 of file apriltag_quad_thresh.c.
|
static |
Definition at line 999 of file apriltag_quad_thresh.c.
|
static |
Definition at line 1040 of file apriltag_quad_thresh.c.
| int err_compare_descending | ( | const void * | _a, |
| const void * | _b | ||
| ) |
Definition at line 299 of file apriltag_quad_thresh.c.
| void fit_line | ( | struct line_fit_pt * | lfps, |
| int | sz, | ||
| int | i0, | ||
| int | i1, | ||
| double * | lineparm, | ||
| double * | err, | ||
| double * | mse | ||
| ) |
Definition at line 175 of file apriltag_quad_thresh.c.
| int fit_quad | ( | apriltag_detector_t * | td, |
| image_u8_t * | im, | ||
| zarray_t * | cluster, | ||
| struct quad * | quad, | ||
| int | tag_width, | ||
| bool | normal_border, | ||
| bool | reversed_border | ||
| ) |
Definition at line 758 of file apriltag_quad_thresh.c.
| zarray_t* fit_quads | ( | apriltag_detector_t * | td, |
| int | w, | ||
| int | h, | ||
| zarray_t * | clusters, | ||
| image_u8_t * | im | ||
| ) |
Definition at line 1798 of file apriltag_quad_thresh.c.
| zarray_t* gradient_clusters | ( | apriltag_detector_t * | td, |
| image_u8_t * | threshim, | ||
| int | w, | ||
| int | h, | ||
| int | ts, | ||
| unionfind_t * | uf | ||
| ) |
Definition at line 1736 of file apriltag_quad_thresh.c.
Definition at line 1696 of file apriltag_quad_thresh.c.
Definition at line 295 of file apriltag_quad_thresh.c.
|
inlinestatic |
Definition at line 663 of file apriltag_quad_thresh.c.
| int quad_segment_agg | ( | zarray_t * | cluster, |
| struct line_fit_pt * | lfps, | ||
| int | indices[4] | ||
| ) |
Definition at line 507 of file apriltag_quad_thresh.c.
| int quad_segment_maxima | ( | apriltag_detector_t * | td, |
| zarray_t * | cluster, | ||
| struct line_fit_pt * | lfps, | ||
| int | indices[4] | ||
| ) |
Definition at line 323 of file apriltag_quad_thresh.c.
| image_u8_t* threshold | ( | apriltag_detector_t * | td, |
| image_u8_t * | im | ||
| ) |
Definition at line 1203 of file apriltag_quad_thresh.c.
| image_u8_t* threshold_bayer | ( | apriltag_detector_t * | td, |
| image_u8_t * | im | ||
| ) |
Definition at line 1382 of file apriltag_quad_thresh.c.
|
inlinestatic |
Definition at line 54 of file apriltag_quad_thresh.c.