Search for a rectangle in the image
📁 Advanced Python Topics
Task : Find a rigid disk in the photo, determine its angle and contours
Problem: It is not always possible to find the correct disk contour.
In the code, I make images gray, blur, find the difference between them and determine the contours, but the solution is not accurate. I would like your help.
firstframe = cv2.imread(bg_im) # Background image frame_img = cv2.imread(frame) # image with a disk gray = cv2.cvtcolor(frame_img, cv2.color_bgr2gray) gray = cv2.gaussianblur(gray, (21, 21), 0) firstframe = cv2.cvtcolor(firstframe, cv2.color_bgr2gray)