How can you performing imwarp about the center of an image, not the top left corner?
Ältere Kommentare anzeigen
I am trying to transform a 2D image using an affine2D object (translation, rotation, and scale). I want to apply it about the center of the image and the output image to be the same size as the input image. When I used imwarp, it applies it at the top left corner. I did it as follows:
T = affine2d(H);
R = imref2d(size(img));
img2 = imwarp(img,T,'OutputView',R);
Can you please help?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Generic Geometric Transformations finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!