Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cv2.cornersSubPix gives only None

Tags:

python

opencv

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>
like image 423
user2707777 Avatar asked Aug 22 '13 14:08

user2707777


1 Answers

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
like image 86
Froyo Avatar answered Sep 30 '22 13:09

Froyo