(OpenCV, RotatedRect) How to make RotatedRect class

This is example class creation.

RotatedRect tRect(Point2f(p2.x, p2.y), Size2f(W,H), atan(mn.first)*180/3.1415);

In Here,
p2.x, p2.y is center coordinate.
in Size2f(W,H), W, H is withd and Height of rectangle.
at last, atan(mn.first)*180/3.1415 means degree, atan(mn.first) is some radian
*180/3.1415 means calculation radian to degree.


RotatedRect tRect(Point2f(centerX, cneterY), Size2f(W,H), rotation_degree);

Thank you.


Popular posts from this blog

(OpenCV Study) Background subtractor MOG, MOG2, GMG example source code (BackgroundSubtractorMOG, BackgroundSubtractorMOG2, BackgroundSubtractorGMG)

OpenCV Stitching example (Stitcher class, Panorama)

AMP dose run on my pc?, AMP(Accelerated Massive Parallelism)

Example source code of extract HOG feature from images, save descriptor values to xml file, using opencv (using HOGDescriptor )

Optical Flow sample source code using OpenCV

Real-time N camera stitching Class.

OpenCV meanShiftFiltering example source code ( cpu: pyrMeanShiftFiltering, gpu:meanShiftFiltering, gpu:meanShiftSegmentation )

8 point algorithm (Matlab source code) / The method to get the Fundamental Matrix and the Essential matrix

Video Stabilization example source code, (using cvFindHomography, cvWarpPerspective functions in openCV)

Image warping (using opencv findHomography, warpPerspective)