本文整理匯總了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]