当前位置: 首页>>代码示例>>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;未经允许,请勿转载。