Answers.Body: <p>You can use OpenCV's <a href="https://docs.opencv.org/2.4/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=minarearect#minarearect" rel="nofollow noreferrer">cv2.minAreaRect()</a> to detect oriented/rotated rectangular bounding boxes. Below's an example result from <a href="https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_contours/py_contour_features/py_contour_features.html#b-rotated-rectangle" rel="nofollow noreferrer">OpenCV-Python-tutorials</a>:</p>
  
  <p><a href="https://i.sstatic.net/V9LKp.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/V9LKp.png" alt="Using cv2.minAreaRect()"></a></p>
  
  <p>Alternatively, you could train a supervised object detection model to output 8 co-ordinate values (x0,y0,x1,y1,x2,y2,x3,y3) of the quadrilateral by training with a labeled oriented-bounding-box dataset. You could also create the bounding box labels yourself for the same by using tools such as <a href="http://www.robots.ox.ac.uk/~vgg/software/via/via_demo.html" rel="nofollow noreferrer">VGG Annotator Tool</a> among others.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-04T07:58:14.283Z
Answers.LastActivityDate: 2020-01-04T07:58:14.283Z
Answers.UserDisplayName: Balraj Ashwath
Body: <p>Is there some established Object Detection algorithm that is able to detect the four corners of an arbitrary quadrilateral  (x0,y0,x1,y1,x2,y2,x3,y3) as opposed to the more typical perpendicular rectangular (x,y,w,h) ?</p>
  
Tags: <object-detection>
Title: Object Detection Algorithm that detects four corners of arbitrary quadrilateral, not just perpendicular rectangular
UserDisplayName: Loop
ThreadText: # Object Detection Algorithm that detects four corners of arbitrary quadrilateral, not just perpendicular rectangular
  
  (Asked by: username_0 on 2020-01-03)
  
  Is there some established Object Detection algorithm that is able to detect the four corners of an arbitrary quadrilateral (x0,y0,x1,y1,x2,y2,x3,y3) as opposed to the more typical perpendicular rectangular (x,y,w,h) ?
  
  **Tags:** object-detection
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-01-04. Score: 1
  
  You can use OpenCV's [cv2.minAreaRect()](https://docs.opencv.org/2.4/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=minarearect#minarearect) to detect oriented/rotated rectangular bounding boxes. Below's an example result from [OpenCV-Python-tutorials](https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_contours/py_contour_features/py_contour_features.html#b-rotated-rectangle):
  
  [![Using cv2.minAreaRect()](https://i.sstatic.net/V9LKp.png)](https://i.sstatic.net/V9LKp.png)
  
  Alternatively, you could train a supervised object detection model to output 8 co-ordinate values (x0,y0,x1,y1,x2,y2,x3,y3) of the quadrilateral by training with a labeled oriented-bounding-box dataset. You could also create the bounding box labels yourself for the same by using tools such as [VGG Annotator Tool](http://www.robots.ox.ac.uk/~vgg/software/via/via_demo.html) among others.
  
  
  ---
  
  