Python cv2.CALIB_CB_FAST_CHECK Examples
The following are 2
code examples of cv2.CALIB_CB_FAST_CHECK().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
cv2
, or try the search function
.
Example #1
Source File: stereo_cameras.py From StereoVision with GNU General Public License v3.0 | 7 votes |
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
Example #2
Source File: calibrate.py From depthai with MIT License | 5 votes |
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]