Ask Your Question

Revision history [back]

Use the warpAffine method:

cv::Mat rotation = cv::getRotationMatrix2D(rotatedRect.center, -rotatedRect.angle, 1);
cv::warpAffine(src, dst, rotation, dst.size());