1 cl;
 2 w=0.6;              %放大或缩小的宽度
 3 h=1.4;            %放大或缩小的高度
 4 img=imread('Corner.png');
 5 imshow(img);
 6 [m n]=size(img);
 7 imgn=zeros(h*m,w*n);
 8 
 9 rot=[h 0 0;0 w 0;0 0 1];                                    %变换矩阵x=h*u,y=w*v
10 inv_rot=inv(rot);
11 
12 for x=1:h*m
13     for y=1:w*n
14         pix=[x y 1]*inv_rot;                 
15         imgn(x,y)=img(round(pix(1)),round(pix(2)));        
16     end
17 end
18 
19 figure,imshow(uint8(imgn))

 

相关文章:

  • 2022-01-05
  • 2022-12-23
  • 2021-05-05
  • 2021-12-19
  • 2021-12-04
  • 2021-10-04
  • 2021-06-16
  • 2022-01-09
猜你喜欢
  • 2021-06-17
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-08-27
  • 2022-12-23
相关资源
相似解决方案