Skip to content

Commit 1651d4c

Browse files
committed
Change new aruco marker to id 220
- Allows us to keep using DICT_6X6_250, which has more robust detections - Updated aruco imagery and removed the old unused marker - Updated ID references, the reflectance data should be the same
1 parent bcbb0c5 commit 1651d4c

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

imgcorrect/corrections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _get_band_coeff(row):
4747
23: zenith_co.sg3144_batch1_coefficients,
4848
63: zenith_co.sg3144_batch2_coefficients,
4949
217: zenith_co.sg3144_batch3_coefficients,
50-
287: zenith_co.sg3144_batch4_coefficients,
50+
220: zenith_co.sg3144_batch4_coefficients,
5151
}
5252

5353
aruco_id = row["aruco_id"]

imgcorrect/detect_panel.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def extract_panel_bounds(image):
6161
# |
6262
# |
6363
# v +Y
64-
dictionary = cv.aruco.Dictionary_get(cv.aruco.DICT_6X6_1000)
64+
dictionary = cv.aruco.Dictionary_get(cv.aruco.DICT_6X6_250)
6565
corners, ids, rejected_img_points = cv.aruco.detectMarkers(image, dictionary)
6666

6767
# if at least one marker detected
6868
if ids is not None and (
69-
ids[0][0] == 23 or ids[0][0] == 63 or ids[0][0] == 217 or ids[0][0] == 287
69+
ids[0][0] == 23 or ids[0][0] == 63 or ids[0][0] == 217 or ids[0][0] == 220
7070
):
7171
aruco_side_length_p = cv.norm(corners[0][0][1] - corners[0][0][0])
7272
gsd = ARUCO_SIDE_LENGTH_M / aruco_side_length_p
@@ -78,9 +78,9 @@ def extract_panel_bounds(image):
7878

7979
# panels with markers of id:63 are incorrectly oriented
8080
# in this case, panel is beneath marker
81-
if ids[0][0] == 63 or ids[0][0] == 217 or ids[0][0] == 287:
81+
if ids[0][0] == 63 or ids[0][0] == 217 or ids[0][0] == 220:
8282
logger.info(
83-
"Aruco ID: 63, 217, or 287 detected. Adjusting for panel beneath marker."
83+
"Aruco ID: 63, 217, or 220 detected. Adjusting for panel beneath marker."
8484
)
8585
top_aruco_line = corners[0][0][3] - corners[0][0][2]
8686
top_aruco_line_middle = top_aruco_line / 2.0 + corners[0][0][2]

tests/aruco_markers/aruco_220.png

5.27 KB
Loading

tests/aruco_markers/aruco_287.png

-5.26 KB
Binary file not shown.

tests/test_corrections.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111

1212
def test_aruco_marker_detection():
13-
"""Test that all four supported aruco marker IDs (23, 63, 217, 287) can be detected."""
14-
dictionary = cv.aruco.Dictionary_get(cv.aruco.DICT_6X6_1000)
13+
"""Test that all four supported aruco marker IDs (23, 63, 217, 220) can be detected."""
14+
dictionary = cv.aruco.Dictionary_get(cv.aruco.DICT_6X6_250)
1515

1616
# Test all four marker IDs
17-
for marker_id in [23, 63, 217, 287]:
17+
for marker_id in [23, 63, 217, 220]:
1818
test_image_path = f"tests/aruco_markers/aruco_{marker_id}.png"
1919

2020
# Skip test if image doesn't exist

0 commit comments

Comments
 (0)