5
Tôi không biết, tại sao hàm openCV này mang lại cho tôi giá trị None, có bất kỳ suy nghĩ nào về cơ thể?cv2.cornersSubPix chỉ cho phép None
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>
Lưu ý cho tương lai. Có vẻ như bắt đầu từ OpenCV 3.0 'cv2.cornerSubPix' sẽ trả về' các góc' thay vì 'Không có': [http://docs.opencv.org/trunk/modules/imgproc/doc/feature_detection.html](http:/ /docs.opencv.org/trunk/modules/imgproc/doc/feature_detection.html#cornersubpix) Cả hai phiên bản của tài liệu hiện đang trực tuyến để một số người dùng có thể bị nhầm lẫn. – sastanin