Its a school project i am working on .I want to detect and extract coordinates of corners .As this is a screen capture ,things will move ,so i want to retain the points that are not lost during the movement ,and get the new coordinates .Please help me .
I am using python
Currently I am using this for corner detection,if someone has a faster method please let me know :
import numpy as np
from PIL import ImageGrab
import cv2
import time
last_time=time.time()
while(True):
screen = np.array(ImageGrab.grab(bbox=(0,40,800,640)))
print ('Loop took {} seconds'.format(time.time()-last_time))
last_time=time.time()
gray=cv2.cvtColor(screen,cv2.COLOR_BGR2GRAY)
gray=np.float32(gray)
dst=cv2.cornerHarris(gray,2,3,0.04)
dst=cv2.dilate(dst,None)
screen[dst>0.01*dst.max()]=[0,0,255]
cv2.imshow('window',screen)
if cv2.waitKey(25) & 0xFF== ord('q') :
cv2.destroyAllWindows()
break