title: OpenCV C++ set ROI from a rectangular area
body: <p>Anyone know how to set ROI based on image bellow? </p>
  
  <p>I used Hough Transform to detect the white line and draw the red line into the image.
  What I need to do is to set the ROI in the rectangle. </p>
  
  <p>Since Hough Transform unable to get location of each rectangle and the main problem is I cannot defined the location (x,y) manually. </p>
  
  <p>Any solution that able to auto detect the rectangle and set the ROI? </p>
  
  <p>Anyone can give some idea for me or the code can be use?</p>
  
  <p>Please forgive my poor english and thank you.</p>
  
  <p><img src="https://i.stack.imgur.com/NC3Ur.png" alt="enter image description here"></p>