以下是来自OpenCV文档这里的内容:
// contours : is your blobs found before
// Create a vector to store your rotated rectangles
vector<RotatedRect> minRect( contours.size() );
// in a for loop find rotated rectangles for each blob
for( int i = 0; i < contours.size(); i++ )
{
// minAreaRect() function is for finding Rotated Rectangles
minRect[i] = minAreaRect( Mat(contours[i]) );
}