diff --git a/src/omv/py/py_image.c b/src/omv/py/py_image.c index a090d6d77..cc2795174 100644 --- a/src/omv/py/py_image.c +++ b/src/omv/py/py_image.c @@ -2714,7 +2714,7 @@ static mp_obj_t py_image_match_descriptor(uint n_args, const mp_obj_t *args, mp_ case DESC_ORB: { py_kp_obj_t *kpts1 = ((py_kp_obj_t*)args[1]); py_kp_obj_t *kpts2 = ((py_kp_obj_t*)args[2]); - int threshold = py_helper_lookup_int(kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_threshold), 70); + int threshold = py_helper_lookup_int(kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_threshold), 85); int filter_outliers = py_helper_lookup_int(kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_filter_outliers), false); // Sanity checks diff --git a/usr/examples/07-Face-Detection/face_tracking.py b/usr/examples/07-Face-Detection/face_tracking.py index 2563dd0f4..2c314a886 100644 --- a/usr/examples/07-Face-Detection/face_tracking.py +++ b/usr/examples/07-Face-Detection/face_tracking.py @@ -63,7 +63,7 @@ while (True): # Match the first set of keypoints with the second one c=image.match_descriptor(image.ORB, kpts1, kpts2) match = c[6] # C[6] contains the number of matches. - if (match>2): + if (match>5): img.draw_rectangle(c[2:6]) img.draw_cross(c[0], c[1], size=10) print(kpts2, "matched:%d dt:%d"%(match, c[7])) diff --git a/usr/examples/09-Feature-Detection/keypoints.py b/usr/examples/09-Feature-Detection/keypoints.py index c91e50a86..2dae2d9dc 100644 --- a/usr/examples/09-Feature-Detection/keypoints.py +++ b/usr/examples/09-Feature-Detection/keypoints.py @@ -39,9 +39,9 @@ while (True): kpts1 = kpts2 draw_keypoints(img, kpts1) elif kpts2: - c = image.match_descriptor(image.ORB, kpts1, kpts2, threshold=70) + c = image.match_descriptor(image.ORB, kpts1, kpts2, threshold=85) match = c[6] # C[6] contains the number of matches. - if (match>2): + if (match>5): img.draw_rectangle(c[2:6]) img.draw_cross(c[0], c[1], size=10)