图像转置——MATLAB实现

来源:互联网 发布:简单c语言程序 编辑:程序博客网 时间:2024/06/05 14:51

转置变换公式为:
转置变换公式
%图像转置
img = imread(‘g0.jpg’)
form=maketform(‘affine’,[0 1 0;1 0 0;0 0 1]);%创建空间转换结构
tran=imtransform(img,form,’nearest’);%对图像应用二维空间变换,由form定义的2-D空间变换来转换图像img,nearest为指定要使用的插值的形式
subplot(1,2,1);imshow(img);
title(‘orginal image’);
subplot(1,2,2);imshow(tran);
title(‘transform image’);
处理结果:
这里写图片描述