Apriltag WASM Detector
Apriltag detector using the apriltag C library and compiled to WASM using emscripten.
apriltag_js.h
Go to the documentation of this file.
1 
11 #ifndef _APRILTAG_JS_
12 #define _APRILTAG_JS_
13 
14 #include "apriltag.h"
15 #include "apriltag_pose.h"
16 #include "str_json.h"
17 
18 // maximum size of string for each detection
19 #define STR_DET_LEN 1500
20 
28 int atagjs_init();
29 
35 int atagjs_destroy();
36 
50 int atagjs_set_detector_options(float decimate, float sigma, int nthreads, int refine_edges, int max_detections, int return_pose, int return_solutions);
51 
62 int atagjs_set_pose_info(double fx, double fy, double cx, double cy);
63 
75 uint8_t *atagjs_set_img_buffer(int width, int height, int stride);
76 
86 
87 #endif
int atagjs_set_detector_options(float decimate, float sigma, int nthreads, int refine_edges, int max_detections, int return_pose, int return_solutions)
Sets the given detector options.
Definition: apriltag_js.c:141
uint8_t * atagjs_set_img_buffer(int width, int height, int stride)
Creates/changes size of the image buffer where we receive the images to process.
Definition: apriltag_js.c:164
Definitions for simple json strings creation.
int atagjs_destroy()
Releases resources.
Definition: apriltag_js.c:128
int atagjs_set_pose_info(double fx, double fy, double cx, double cy)
Sets camera intrinsics (in pixels) for tag pose estimation.
Definition: apriltag_js.c:154
t_str_json * atagjs_detect()
Detect tags in image stored in the buffer (g_img_buf)
Definition: apriltag_js.c:189
int atagjs_init()
Init the apriltag detector with given family and default options default options: quad_decimate=2...
Definition: apriltag_js.c:103
Definition: str_json.h:17