I have no idea, why this openCV function gives me values of None, have any body some thoughts?
while True:
retval,frame = capture.read()
h, w = frame.shape[:2]
gray = cv2.cvtColor(frame, cv2.cv.CV_BGR2GRAY)
found, points = cv2.findChessboardCorners(gray, p_size)
if found!=0:
frame_count = frame_count + 1
objpoints.append(objp)
corners2 = cv2.cornerSubPix(gray, points, (11, 11), (-1,1), criteria)
imgpoints.append(corners2) </i>
If you check out the docs about cv2.cornerSubPix
, you can see that it returns None. Actually it modifies the array of corners passed as the argument.
cv2.cornerSubPix(image, corners, winSize, zeroZone, criteria) → None
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With