Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra)
add_compile_options(-Wpedantic)
# sqrt() & friends never need errno here; this lets them compile to bare
# sqrt instructions (vectorizable) instead of guarded libm calls
add_compile_options(-fno-math-errno)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(
-Wno-gnu-zero-variadic-macro-arguments
Expand Down
3 changes: 3 additions & 0 deletions apriltag.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ void apriltag_detector_destroy(apriltag_detector_t *td)
zarray_destroy(td->tag_families);
if (td->cached_uf)
unionfind_destroy(td->cached_uf);
if (td->cached_threshim)
image_u8_destroy(td->cached_threshim);
free(td->cached_tile_bufs);
free(td);
}

Expand Down
5 changes: 5 additions & 0 deletions apriltag.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ struct apriltag_detector

// Cached unionfind structure (reused across detect calls)
unionfind_t *cached_uf;

// Cached threshold buffers (reused across detect calls)
image_u8_t *cached_threshim;
uint8_t *cached_tile_bufs; // 4 contiguous tw*th tile min/max arrays
int cached_tile_bufs_size;
};

// Represents the detection of a tag. These are returned to the user
Expand Down
Loading