rad = 2
while True:
    ret, img = cam.read()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
keypoints, descriptors = surf.detect(gray, None, False)
for kp in keypoints:
    x = int(kp.pt[0])
y = int(kp.pt[1])
cv2.circle(img, (x, y), rad, (0, 0, 255))
cv2.imshow('features', img)
if cv2.waitKey(10) == 27:
    break
Does anyone have any examples of using OpenCV with python for descriptor extraction?