필터 지우기
필터 지우기

Shear Image display problem

조회 수: 1 (최근 30일)
marie lasz
marie lasz 2020년 10월 14일
댓글: Matt J 2020년 10월 14일
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

답변 (1개)

Matt J
Matt J 2020년 10월 14일
편집: Matt J 2020년 10월 14일
You should use an imref2d object to specify the output view, using the syntax,
B= imwarp(A,RA,tform,'OutputView',RA)
  댓글 수: 2
marie lasz
marie lasz 2020년 10월 14일
편집: marie lasz 2020년 10월 14일
thank you for your answer. but what are A and RA? where imref2d should be use in the code?
Matt J
Matt J 2020년 10월 14일

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by