detection debugging going poorly

This commit is contained in:
2024-07-14 20:08:35 -04:00
parent a63d659fc6
commit 30366410c3
156 changed files with 20 additions and 370690 deletions

View File

@@ -136,8 +136,8 @@ def display_features(image, imgpts, totalDist):
# setting up apriltag detection. Make sure this is OUTSIDE the loop next time
options = apriltag.DetectorOptions(families='tag36h11', border=1, nthreads=1,
quad_decimate=1.0, quad_blur=0.0, refine_edges=True,
refine_decode=False, refine_pose=False, debug=False, quad_contours=True)
quad_decimate=2.0, quad_blur=0.0, refine_edges=True,
refine_decode=False, refine_pose=False, debug=True, quad_contours=True)
detector = apriltag.Detector(options)
# main vision processing code
@@ -153,6 +153,7 @@ while True:
tagFrame = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
output = detector.detect(tagFrame)
print(output)
for det in output:
# if the confidence is less than 30% exclude the tag from being processed.

View File

@@ -3,14 +3,17 @@ import numpy as np
import cv2
options = apriltag.DetectorOptions(families='tag36h11', border=1, nthreads=1,
quad_decimate=1.0, quad_blur=0.0, refine_edges=True,
quad_decimate=2.0, quad_blur=0.0, refine_edges=True,
refine_decode=False, refine_pose=False, debug=False, quad_contours=True)
detector = apriltag.Detector(options)
image = cv2.imread("/home/tyler/Desktop/FRC-Apriltag-Pose-Detection/FRC_Fiducial_Tracking/Static_Tag_Pics/0.jpg")
image = cv2.imread("/home/tyler/Desktop/FRC-Apriltag-Pose-Detection/FRC_Fiducial_Tracking/Static_Tag_Pics/2.jpg")
tagFrame = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow("frame", tagFrame)
cv2.waitKey(0)
output = detector.detect(tagFrame)
print(output)

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB