Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mat rotated_full_map_image;
- Point2f src_center(full_map_image.cols/2.0F, full_map_image.rows/2.0F);
- Mat rot_mat = getRotationMatrix2D(src_center, angle, 1.0);
- warpAffine(full_map_image, rotated_full_map_image, rot_mat, full_map_image.size());
- Point rotated_centre;
- Point2f p(some_x,some_y);
- rotated_centre.x = rot_mat.at<double>(0,0)*p.x + rot_mat.at<double>(0,1)*p.y + rot_mat.at<double>(0,2);
- rotated_centre.y = rot_mat.at<double>(1,0)*p.x + rot_mat.at<double>(1,1)*p.y + rot_mat.at<double>(1,2);
Add Comment
Please, Sign In to add comment