I tried reading the docs but couldn't understand the difference.
I was expecting the same results when the target is a 3x3 square,
but I get 3x3 with cv::boundingRect() and 2x2 with cv::minAreaRect().
I'm using OpenCV 4.4.

Here is a sample code.

```
char data[25] = {
    0, 0, 0, 0, 0,
    0, 255, 255, 255, 0,
    0, 255, 255, 255, 0,
    0, 255, 255, 255, 0,
    0, 0, 0, 0, 0
};
cv::Mat image = cv::Mat(5, 5, CV_8U, data);

std::vector<std::vector<cv::Point>> contours;
std::vector<cv::Vec4i> hierarchy;
cv::findContours(image, contours, hierarchy, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE);

cv::Rect boundingRect = cv::boundingRect(contours[0]);
std::cout << "[cv::boundingRect]" << std::endl;
std::cout << "w, h: " << boundingRect.size().width << " x " << boundingRect.size().height << std::endl;

cv::RotatedRect minAreaRect = cv::minAreaRect(contours[0]);
std::cout << "[cv::minAreaRect]" << std::endl;
std::cout << "w, h: " << minAreaRect.size.width << " x " << minAreaRect.size.height << std::endl;

```

And the output is:

```
[cv::boundingRect]
w, h: 3 x 3
[cv::minAreaRect]
w, h: 2 x 2

```

Thanks in advance.