Guest User

Untitled

a guest
Feb 15th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Mat rotated_full_map_image;
  2. Point2f src_center(full_map_image.cols/2.0F, full_map_image.rows/2.0F);
  3. Mat rot_mat = getRotationMatrix2D(src_center, angle, 1.0);
  4. warpAffine(full_map_image, rotated_full_map_image, rot_mat, full_map_image.size());
  5.  
  6. Point rotated_centre;
  7. Point2f p(some_x,some_y);
  8. 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);
  9. 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