Hi all,
Currently, I am working in project to find square/rectangle shape in the image and only draw contours of square/rectangle objects.
I use to code below for object classification
peri= cv2.arcLength(cnt,True)
approx = cv2.approxPolyDP(cnt, 0.02 * peri, True)
However, when I ran the code, I found that the code is not optimized for rectangle/square detection. Most objects are not rectangle/square have been removed, but some are still remaining although they are not rectangle/square
Is there any suggestion that I could totally remove irregular shape highlighted in red rectangle
Thanks