answered Apr 10 '13
Sample code:
MatOfPoint2f points = new MatOfPoint2f(new Point(1, 1), new Point(5, 1), new Point(4, 3), new Point(6, 2)); RotatedRect rrect = Imgproc.minAreaRect(points);