Skip to content

Commit cfac2f5

Browse files
committed
Fix issue 422
1 parent c2172a2 commit cfac2f5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

apriltag.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,12 @@ zarray_t *apriltag_detector_detect(apriltag_detector_t *td, image_u8_t *im_orig)
10521052
return s;
10531053
}
10541054

1055+
if (im_orig->width < 6 || im_orig->height < 6) {
1056+
zarray_t *s = zarray_create(sizeof(apriltag_detection_t*));
1057+
debug_print("Image too small (%d x %d)\n", im_orig->width, im_orig->height);
1058+
return s;
1059+
}
1060+
10551061
if (td->wp == NULL || td->nthreads != workerpool_get_nthreads(td->wp)) {
10561062
workerpool_destroy(td->wp);
10571063
td->wp = workerpool_create(td->nthreads);

repro

100644100755
84 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)