本文整理汇总了Python中cv2.CALIB_CB_FAST_CHECK属性的典型用法代码示例。如果您正苦于以下问题:Python cv2.CALIB_CB_FAST_CHECK属性的具体用法?Python cv2.CALIB_CB_FAST_CHECK怎么用?Python cv2.CALIB_CB_FAST_CHECK使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类cv2
的用法示例。
在下文中一共展示了cv2.CALIB_CB_FAST_CHECK属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_chessboard
# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import CALIB_CB_FAST_CHECK [as 别名]
def get_chessboard(self, columns, rows, show=False):
"""
Take a picture with a chessboard visible in both captures.
``columns`` and ``rows`` should be the number of inside corners in the
chessboard's columns and rows. ``show`` determines whether the frames
are shown while the cameras search for a chessboard.
"""
found_chessboard = [False, False]
# Placeholder for corners
found_corners = [None, None]
while not all(found_chessboard):
frames = self.get_frames()
if show:
self.show_frames(1)
for i, frame in enumerate(frames):
(found_chessboard[i],
found_corners[i]) = cv2.findChessboardCorners(frame, (columns, rows),
flags=cv2.CALIB_CB_FAST_CHECK)
return frames, found_corners
示例2: find_chessboard
# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import CALIB_CB_FAST_CHECK [as 别名]
def find_chessboard(frame):
chessboard_flags = cv2.CALIB_CB_ADAPTIVE_THRESH + cv2.CALIB_CB_FAST_CHECK + cv2.CALIB_CB_NORMALIZE_IMAGE
small_frame = cv2.resize(frame, (0, 0), fx=0.3, fy=0.3)
return cv2.findChessboardCorners(small_frame, (9, 6), chessboard_flags)[0] and \
cv2.findChessboardCorners(frame, (9, 6), chessboard_flags)[0]