Matlab 数字图像处理1---图像的收缩和放大
2018-02-26 12:17
681 查看
内插是在放大、收缩、旋转和几何校正等任务中广泛应用的基本工具。
最近邻内插法(nearest): 原图像中寻找最接近的像素,并把该像素的灰度赋给新像素。
双线性内插法(bilinear):用4个最近邻去估计给定位置的灰度。(最实用)v(x, y) = ax + by + cxy + d;v(x, y)灰度值,a,b,c,d通过四个最近邻点求得。
双三次内插法(bicubic):用16个最近邻点赋予给定位置的灰度值.(商业图像编辑程序的标准内插方法).(数字图像处理(P37))
Matlab Keyword: imresize
code:
Image_original = imread('D:\图像处理\image\rice1.jpg');
Image_shrink2_1 = imresize(Image_original,[128 128]);
Image_shrink2_2 = imresize(Image_original,0.5);
Image_enlarge2_nearest = imresize(Image_original,2,'nearest');
Image_enlarge2_bilinear = imresize(Image_original,2,'bilinear');
Image_enlarge2_bicubic = imresize(Image_original,2,'bicubic');
subplot(231)
imshow(Image_original)
title('Original')
subplot(232)
imshow(Image_shrink2_1)
title('Shrink 2 times_1')
subplot(233)
imshow(Image_shrink2_2)
title('Shrink 2 times_2')
subplot(234)
imshow(Image_enlarge2_nearest)
title('Enlarge 2 times.nearest')
subplot(235)
imshow(Image_enlarge2_bilinear)
title('Enlarge 2 times.bilinear')
subplot(236)
imshow(Image_enlarge2_bicubic)
title('Enlarge 2 times.bicubic')
处理结果:
相关链接: 点击打开链接
最近邻内插法(nearest): 原图像中寻找最接近的像素,并把该像素的灰度赋给新像素。
双线性内插法(bilinear):用4个最近邻去估计给定位置的灰度。(最实用)v(x, y) = ax + by + cxy + d;v(x, y)灰度值,a,b,c,d通过四个最近邻点求得。
双三次内插法(bicubic):用16个最近邻点赋予给定位置的灰度值.(商业图像编辑程序的标准内插方法).(数字图像处理(P37))
Matlab Keyword: imresize
code:
Image_original = imread('D:\图像处理\image\rice1.jpg');
Image_shrink2_1 = imresize(Image_original,[128 128]);
Image_shrink2_2 = imresize(Image_original,0.5);
Image_enlarge2_nearest = imresize(Image_original,2,'nearest');
Image_enlarge2_bilinear = imresize(Image_original,2,'bilinear');
Image_enlarge2_bicubic = imresize(Image_original,2,'bicubic');
subplot(231)
imshow(Image_original)
title('Original')
subplot(232)
imshow(Image_shrink2_1)
title('Shrink 2 times_1')
subplot(233)
imshow(Image_shrink2_2)
title('Shrink 2 times_2')
subplot(234)
imshow(Image_enlarge2_nearest)
title('Enlarge 2 times.nearest')
subplot(235)
imshow(Image_enlarge2_bilinear)
title('Enlarge 2 times.bilinear')
subplot(236)
imshow(Image_enlarge2_bicubic)
title('Enlarge 2 times.bicubic')
处理结果:
相关链接: 点击打开链接
相关文章推荐
- 数字图像处理(一) matlab图像简单操作
- 数字图像处理实验(14):PROJECT 06-01,Web-Safe Colors 标签: 图像处理MATLAB 2017-05-27 20:45 116人阅读
- 使用双线性插值法放大图像(matlab实现)
- 数字图像处理实验(1):PROJECT 02-01, Image Printing Program Based on Halftoning 标签: 图像处理MATLAB 2017-04-2
- 图像放大并进行BiCubic插值 Matlab/C++代码
- 数字图像处理实验(15):PROJECT 06-02,Pseudo-Color Image Processing 标签: 图像处理MATLAB 2017-05-27 20:53
- 使用思维导图学习Matlab图像处理(1)——数字图像处理简介
- 数字图像处理实验(11):PROJECT 05-02,Noise Reduction Using a Median Filter 标签: 图像处理MATLAB 2017-05-26 23:
- 使用 matlab 数字图像处理(三)—— 实现图像的旋转(不使用 imrotate)
- 数字图像处理实验(9):PROJECT 04-05,Correlation in the Frequency Domain 标签: 图像处理MATLAB 2017-05-25 10:14
- 数字图像处理实验(6):PROJECT 04-02,Fourier Spectrum and Average Value 标签: 图像处理MATLABfft 2017-05-07 23:1
- matlab练习程序(图像放大/缩小,放大没有进行插值操作)
- 应用MATLAB语言进行数字图像处理 应用MATLAB语言进行数字图像处理
- 灰度图像放大_matlab
- 数字图像处理实验(5):Proj03-01 ~ Proj03-06 标签: 图像处理matlab 2017-04-30 10:39 184人阅读
- 数字图像处理实验(17):PROJECT 06-04,Color Image Segmentation 标签: 图像处理MATLAB 2017-05-27 21:13
- matlab小技巧:imshow放大图像显示位置
- 基于matlab图像放大缩小测试
- 使用双线性插值法放大图像(matlab实现)
- matlab练习程序(图像放大/缩小,双线性插值)