當前位置: 首頁>>代碼示例>>Python>>正文


Python cv2.CALIB_CB_FAST_CHECK屬性代碼示例

本文整理匯總了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 
開發者ID:erget,項目名稱:StereoVision,代碼行數:24,代碼來源:stereo_cameras.py

示例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] 
開發者ID:luxonis,項目名稱:depthai,代碼行數:7,代碼來源:calibrate.py


注:本文中的cv2.CALIB_CB_FAST_CHECK屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。