(modified from here)
// Find the rotated rectangles for each contour
vector<cv::RotatedRect> cv::minRect( contours.size() );
for( size_t = 0; i < contours.size(); i++ )
{
minRect[i] = minAreaRect( cv::Mat(contours[i]) );
}
If you want the actual points on the contour, you can later find for each contour the points that is closest to each of the corners of the RotatedRect