Shear Image display problem
Show older comments
Hello Everyone,
I am applying shearing on an image which is 512x512 pixels. When i am executing the code I am getting bigger images like 615x512 and in y-axis 512x615. Shear should lie in the 512x512 frame, but both output images are different in scale. Please tell me what am I doing wrong here?
Thanks in advance :-)

subplot(3, 3, 3);
tformImage = affine2d([1 .2 0; 0 1 0; 0 0 1]); %shear x-axis
shear = imwarp(Image, tformImage);
disp(size(shear));
imshow(shear);
title('Shear Attack x-axis','FontSize', fontSize);
set(gcf, 'Position', get(0,'Screensize'));
axis off
Answers (1)
You should use an imref2d object to specify the output view, using the syntax,
B= imwarp(A,RA,tform,'OutputView',RA)
2 Comments
marie lasz
on 14 Oct 2020
Edited: marie lasz
on 14 Oct 2020
Matt J
on 14 Oct 2020
They are as documented here,
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!