Matlab图像转置
Matlab实现代码如下:
clc
I=rgb2gray(imread('Campus-scenery1sk.JPG'));
figure,imshow(I);
title('原图');
T=affine2d([0 1 0;1 0 0;0 0 1]);%构造空间变换结构T.这里为转置变换矩阵
dst=imwarp(I,T); %对原图像I进行转置变换
figure,imshow(dst);
title('转置变换后的图片');
程序运行结果如下图所示:
程序中转置变换矩阵说明:
设(x0,y0)是原图像上的点,(x1,y1)是图像进行转置变换后的点,则:
&n