下のチュートリアルがうまく動かない
https://docs.opencv.org/3.1.0/df/d0c/tutorial_py_fast.html
cv2.FastFeatureDetector()はcv2.FastFeatureDetector_create()とする。
https://github.com/opencv/opencv/issues/6534
あと、cv2.drawKeypoints(gray, kp, img)のようにする。
https://github.com/opencv/opencv/issues/6487
import numpy as np import cv2 from matplotlib import pyplot as plt cap = cv2.VideoCapture(0) while True: _,frame = cap.read() gray=cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) fast = cv2.FastFeatureDetector_create() kp = fast.detect(gray,None) img2 = cv2.drawKeypoints(gray, kp, frame, color=(255,0,0)) cv2.imshow('hoge',img2) key = cv2.waitKey(1) & 0xff if key == ord('q'): break