Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

declare binary parameters as bool #250

Merged
merged 2 commits into from
Sep 3, 2022
Merged
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.1)
project(apriltag VERSION 3.2.0 LANGUAGES C CXX)
project(apriltag VERSION 3.3.0 LANGUAGES C CXX)

if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
Expand Down
6 changes: 3 additions & 3 deletions apriltag.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ apriltag_detector_t *apriltag_detector_create()

td->qtp.max_line_fit_mse = 10.0;
td->qtp.cos_critical_rad = cos(10 * M_PI / 180);
td->qtp.deglitch = 0;
td->qtp.deglitch = false;
td->qtp.min_white_black_diff = 5;

td->tag_families = zarray_create(sizeof(apriltag_family_t*));
Expand All @@ -376,11 +376,11 @@ apriltag_detector_t *apriltag_detector_create()

td->tp = timeprofile_create();

td->refine_edges = 1;
td->refine_edges = true;
td->decode_sharpening = 0.25;


td->debug = 0;
td->debug = false;

// NB: defer initialization of td->wp so that the user can
// override td->nthreads.
Expand Down
10 changes: 5 additions & 5 deletions apriltag.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ struct apriltag_detector
// (e.g. 0.8).
float quad_sigma;

// When non-zero, the edges of the each quad are adjusted to "snap
// When true, the edges of the each quad are adjusted to "snap
// to" strong gradients nearby. This is useful when decimation is
// employed, as it can increase the quality of the initial quad
// estimate substantially. Generally recommended to be on (1).
// estimate substantially. Generally recommended to be on (true).
//
// Very computationally inexpensive. Option is ignored if
// quad_decimate = 1.
int refine_edges;
bool refine_edges;

// How much sharpening should be done to decoded images? This
// can help decode small tags but may or may not help in odd
Expand All @@ -160,10 +160,10 @@ struct apriltag_detector
// The default value is 0.25.
double decode_sharpening;

// When non-zero, write a variety of debugging images to the
// When true, write a variety of debugging images to the
// current working directory at various stages through the
// detection process. (Somewhat slow).
int debug;
bool debug;

struct apriltag_quad_thresh_params qtp;

Expand Down
2 changes: 1 addition & 1 deletion apriltag_quad_thresh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ image_u8_t *threshold(apriltag_detector_t *td, image_u8_t *im)

// this is a dilate/erode deglitching scheme that does not improve
// anything as far as I can tell.
if (0 || td->qtp.deglitch) {
if (td->qtp.deglitch) {
image_u8_t *tmp = image_u8_create(w, h);

for (int y = 1; y + 1 < h; y++) {
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>apriltag</name>
<version>3.2.0</version>
<version>3.3.0</version>
<description>AprilTag detector library</description>

<maintainer email="mkrogius@umich.edu">Max Krogius</maintainer>
Expand Down