cv2.cornersSubPix仅给出None

时间:2013-08-22 14:30:25

标签: python opencv

我不知道,为什么这个openCV函数给了我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>

1 个答案:

答案 0 :(得分:7)

如果您查看关于cv2.cornerSubPix的{​​{3}},则可以看到它返回“无”。实际上它会修改作为参数传递的角点数组。

cv2.cornerSubPix(image, corners, winSize, zeroZone, criteria) → None