import numpy as np import cv2 import math cap = cv2.VideoCapture(0) #fgbg = cv2.BackgroundSubtractorMOG() while(1): ret, frame = cap.read() gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY) # fgmask = fgbg.apply(frame) corners = cv2.goodFeaturesToTrack(gray,25,0.01,10) corners = np.int0(corners) for i in corners: x,y = i.ravel() cv2.circle(frame,(x,y),3,255,-1) cv2.imshow('esquinas frame',frame) cv2.imshow('grises',gray) k = cv2.waitKey(30) & 0xff if k == 27: break cap.release() cv2.destroyAllWindows()