# how to find straight rects from a contour

Hello,

I have some triangle with rounded corners objects and I'm trying to find te edge's length. First I obtain the contour and then I tryied to use approxPolyDP to use the points to find the 3 largests lines.

But the responses of approxPolyDP don't seem to be a good option for doing this...

epsilon = arcLength * 0.015

epsilon = arcLength * 0.015

The goal is to determine if some corners are so much rounded. As you can see, the edges are not perfectly straight, but I would like to obtain the points where the corners start, but I don't know how to do this.

Thanks