Rotate a selected object in an image around a predefined point on Image

3 visualizaciones (últimos 30 días)
I have defined my object with the below function.
imshow(I);
h = impoly;
M = ~h.createMask();
I(M) = 0;
As an example I have attached an image with rotated object inside. I would be grateful if you could help me with that. The rotation angle, center point and distance from the center point is defined previously.

Respuesta aceptada

Image Analyst
Image Analyst el 16 de Jun. de 2018
You have to crop the image, use imcrop(). Then rotate using imrotate(). After that it's just geometry and pasting. See attached copy and paste demo.
  1 comentario
Ashkan sed
Ashkan sed el 19 de Jun. de 2018
Many thanks for your answer. Actually when I want to use imrotate() in 'loose' method, image would not be displayed. I can't use 'crop' method due to the reason that I want to rotate selected part of image without any cropping. I would be grateful if you could help me with that.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Geometric Transformation and Image Registration en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by