I'm using the OpenCV function findChessboardCorners() successfully, but I'm confused by the shape of the corners return value.
Here is my code below. I already know that my chessboard image has 8 x 6 internal corners.
import cv2
nx = 8
ny = 6
img = cv2.imread('test_image2.png')
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, corners = cv2.findChessboardCorners(img, (nx, ny), None)
print(corners.shape)
The last line prints: (48, 1, 2).
Where does the 1 come from? I know there are 8 * 6 = 48 corners, and each corner has 2 coordinates. But what about the 1?
The documentation for findChessboardCorners() doesn't say anything about the corners result:
corners – Output array of detected corners.