I extracted parts of an image using the cv::Rect
Mat myimg = imread("gopro.png");
Mat draw = Mat(myimg.size(), myimg.type(), Scalar::all(0));
Rect r2 = Rect(417, 144, 153, 85);
myimg(r2).copyTo(draw(r2));
It copies the rectangle just fine. My question is : is there a way to rotate that rectangle before copying it to the other Mat ?
I ve already tried cv::RotatedRect, but it s not what i am searching for. Or maybe I didn't know how to use it.
If anyone has an idea how to do so, please help.