Ret, corners = cv2.findChessboardCorners(gray, (nline, ncol), None)Ĭorners2 = cv2.cornerSubPix(gray, corners, (11, 11), (-1, -1), criteria)
Gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) Ĭriteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) If it is not, I can't figure out what king of preprocessing I should do. I thought the image would be appropriated for this function. However, I can't find the good arguments to pass to the function such that it succeeds in detecting the chessboard. I'm trying to get the corners of a chessboard pattern, and thought I could use openCV with cv2.findChessboardCorners.