图像旋转-不同插值法比较——MATLAB
2017-06-19 18:49
183 查看
%不同插值法比较
clear all;
img = imread(‘g0.jpg’);
rotateimg1=imrotate(img,30,’nearest’);%最邻近插值
rotateimg2=imrotate(img,-30,’bilinear’);%双线性插值
rotateimg3=imrotate(img,50,’bicubic’);%三次插值
subplot(2,2,1),imshow(img);
title(‘orginal’);
subplot(2,2,2),imshow(rotateimg1);
title(‘nearest’);
subplot(2,2,3),imshow(rotateimg2);
title(‘bilinear’);
subplot(2,2,4),imshow(rotateimg3);
title(‘bicubic’);
处理结果:
当图像灰度有明显变化时,最邻近插值法的锯齿边较为明显,此时双线性插值法和三线性插值法能很好的保持图像的细节。相对于运算时间而言,三线性插值法花费的时间最长。
clear all;
img = imread(‘g0.jpg’);
rotateimg1=imrotate(img,30,’nearest’);%最邻近插值
rotateimg2=imrotate(img,-30,’bilinear’);%双线性插值
rotateimg3=imrotate(img,50,’bicubic’);%三次插值
subplot(2,2,1),imshow(img);
title(‘orginal’);
subplot(2,2,2),imshow(rotateimg1);
title(‘nearest’);
subplot(2,2,3),imshow(rotateimg2);
title(‘bilinear’);
subplot(2,2,4),imshow(rotateimg3);
title(‘bicubic’);
处理结果:
当图像灰度有明显变化时,最邻近插值法的锯齿边较为明显,此时双线性插值法和三线性插值法能很好的保持图像的细节。相对于运算时间而言,三线性插值法花费的时间最长。
相关文章推荐
- matlab实现图像的平移、旋转、缩放
- matlab 图像几何变换 平移、旋转、缩放
- 用matlab代码分析不同尺寸的卷积核对图像的影响
- Matlab 实现图像的平移,旋转,缩放
- 基于matlab的图像旋转
- Matlab图像、矩阵旋转、翻转函数 rot90、flipud、fliplr、imrotate、flipdim、flip详解
- matlab 对一个文件夹里的所有图像进行批量旋转90度并保存
- matlab练习程序(图像旋转,双线性插值)
- matlab中简单的图像旋转算法
- MATLAB图像旋转源代码
- 使用Matlab进行图像的读写、显示和缩放(最近临插值和双线性内插值法)
- 我写的 matlab 二次差值 图像 旋转
- (实验二) --- 图像旋转变换---matlab实现
- 图像透明拷贝--不同方法的效率比较
- MATLAB subplot显示不同尺度图像
- opencv 旋转图像函数实现 等同于matlab里的rotate() (注:旋转后图像变大,超出部分填为黑色)
- 使用 matlab 数字图像处理(三)—— 实现图像的旋转(不使用 imrotate)
- 图像旋转 matlab程序
- 图像透明拷贝--不同方法的效率比较
- 比较图像处理中图像的匹配,图像 配准, 图像融合的概念上的不同