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 desired result.
I want to find the rectangle like this:
Code:
import cv2
import matplotlib.pyplot as plt
import util
image = cv2.imread("./img/findrect0.png", 1)
gray = util.grayImage(image)
edges = cv2.Canny(image, 50, 200)
lines = cv2.HoughLinesP(edges, 1, cv2.cv.CV_PI/180, 50, minLineLength=50, maxLineGap=10)[0]
li