I\'m trying to find the contour of a rectangle object with round corner in a image. I tried HoughLinesP and findContours, but did not achieve the d
HoughLinesP
findContours
You can find bounding rectangle of nonzero points.
image = cv2.imread("./img/findrect0.png", 1) gray = util.grayImage(image) gray_inv = cv2.bitwise_not(gray) points = cv2.findNonZero(gray) rect = cv2.boundingRect(points)