title: OpenCV C++ - Rectangle detection which has irregular side
body: <p><a href="https://i.stack.imgur.com/RktQv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RktQv.png" alt="enter image description here"></a>
  </p>
  
  <p>Hi.. I have problem with rectangle detection which has irregular side (not straight) like figure above. actually with method houghline can detect lines on the rectangle with some parameter configuration. After compute intersect and get 4 corner, I can rotate it to normal position.</p>
  
  <p>But if I change the image with another rectangle (different size and still has irregular side), I need to reconfigure the parameters again. This is because the line is not detected on four sides, beside that the line can be more than 4.</p>
  
  <p>is there any other method beside houghline which is more simple (does not require reconfiguration / difficult configuration)?</p>