1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Use clustering for findCirclesGrid in multiview calibration to get rid of pattern flip.

This commit is contained in:
Alexander Smorkalov
2025-09-17 10:47:25 +03:00
parent 57b813eaad
commit 16bb0600bd
+4 -2
View File
@@ -729,15 +729,17 @@ def detect(cam_idx, frame_idx, img_name, pattern_type,
corners, winsize, (-1,-1), criteria)
elif pattern_type.lower() == 'circles':
# Workaround: CALIB_CB_CLUSTERING does not allow pattern flip
ret, corners = cv.findCirclesGrid(
img_detection, patternSize=grid_size, flags=cv.CALIB_CB_SYMMETRIC_GRID
img_detection, patternSize=grid_size, flags=cv.CALIB_CB_SYMMETRIC_GRID+cv.CALIB_CB_CLUSTERING
)
if ret:
corners2 = corners / scale
elif pattern_type.lower() == 'acircles':
# Workaround: CALIB_CB_CLUSTERING does not allow pattern flip
ret, corners = cv.findCirclesGrid(
img_detection, patternSize=grid_size, flags=cv.CALIB_CB_ASYMMETRIC_GRID
img_detection, patternSize=grid_size, flags=cv.CALIB_CB_ASYMMETRIC_GRID+cv.CALIB_CB_CLUSTERING
)
if ret:
corners2 = corners / scale