Skip to content

Commit 644cb9f

Browse files
committed
Add fourth aruco (ID 287, batch4 coefficients)
1 parent 663fc0b commit 644cb9f

5 files changed

Lines changed: 2232 additions & 9 deletions

File tree

imgcorrect/corrections.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +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,
5051
}
5152

5253
aruco_id = row["aruco_id"]

imgcorrect/detect_panel.py

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

6767
# if at least one marker detected
68-
if ids is not None and (ids[0][0] == 23 or ids[0][0] == 63 or ids[0][0] == 217):
68+
if ids is not None and (ids[0][0] == 23 or ids[0][0] == 63 or ids[0][0] == 217 or ids[0][0] == 287):
6969
aruco_side_length_p = cv.norm(corners[0][0][1] - corners[0][0][0])
7070
gsd = ARUCO_SIDE_LENGTH_M / aruco_side_length_p
7171
logger.debug("Calibration image GSD: %10.5f m/pixel", gsd)
@@ -76,9 +76,9 @@ def extract_panel_bounds(image):
7676

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

0 commit comments

Comments
 (0)