Repository: opencv
Issue: Specify the return value (angle) of minAreaRect()
Labels: category: imgproc,category: documentation

<!--
If you have a question rather than reporting a bug please go to https://forum.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.4.13, 4.5.1
- Operating System / Platform => Ubuntu 18.04 & Windows 64 Bit
- Compiler => gcc
-->

- OpenCV => 3.4.13, 4.5.1
- Operating System / Platform => Ubuntu 18.04
- Compiler => gcc

##### Detailed description

The return value of minAreaRect() contains the angle of that rectangle box. For years of records online, people believe that the value of this angle ranges from -90 to 0 degrees (and it does). But since version 3.4.13 and 4.5.1, the value of angle becomes positive (not sure if 0\~90 or -90\~90). I think this commit [3e5d7e1](https://github.com/opencv/opencv/commit/3e5d7e1718cf6470c34fb29db9d913d6cd352168#diff-c34281f7de9be18af9eb9434d448b098d293fcfc60edf2d99f73c0734f7f9bb6) might be the cause of the change.

The related document doesn't have any information about the range of this return value, nor the change of behaviour. Is this change intended or is it a bug? Could anyone please specify the expected value & the change of it in the doc?

##### Issue submission checklist

 - [x] I report the issue, it's not a question
   <!--
   OpenCV team works with forum.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [x] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://forum.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [x] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [ ] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->