With following code I can detect Edges of Rectangle but now I wanted to click on each Edge of Rectangle? How I can do this ?
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib
import win32api
matplotlib.rcParams["savefig.dpi"] = 400 # to get high resolution
img = cv2.imread('1.png');
plt.imshow( img )
plt.title('Original Image')
plt.show()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
# Apply Canny edge detection method on the image
edges = cv2.Canny(gray,75,150,apertureSize = 3)
plt.imshow(edges )
plt.title('My Image edges')
plt.show()
#lines = cv2.HoughLines(edges,1,np.pi/180, 200)
lines = cv2.HoughLinesP(edges,1,np.pi/180, 150)
print(lines)