![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
img
longyuan20102011
这个作者很懒,什么都没留下…
展开
-
img gamma变化
i=imread('1.jpg'); subplot(1,3,1); imshow(imadjust(i,[],[],0.75)); title('Gamma 0.75'); subplot(1,3,2); imshow(imadjust(i,[],[],1)); title('Gamma 1'); subplot(1,3,3); imshow(imadjust(i,[],[],1原创 2013-04-14 09:29:42 · 574 阅读 · 0 评论 -
img 中值滤波
>> i=imread('2.jpg');>> imshow(i);>> j=imnoise(i,'salt & pepper');>> figure,imshow(j);>> j=medfilt2(j,[3 3]);>> figure,imshow(j);>>原创 2013-04-16 19:38:24 · 690 阅读 · 0 评论 -
img 平均平滑
i=imread('3.jpg');figure,imshow(i);h=fspecial('average',3);i3=imfilter(i,h,'corr','replicate');figure,imshow(i3);h=fspecial('average',5);i3=imfilter(i,h,'corr','replicate');figure,imshow(i3);h原创 2013-04-16 11:14:22 · 485 阅读 · 0 评论 -
img 滤波
f=imread('1.jpg');imshow(f);w=[1.5 1 1.5;1.5 1 1.5;1 1 1]/9;g=imfilter(f,w,'corr','replicate');figure,imshow(g);原创 2013-04-16 10:22:35 · 451 阅读 · 0 评论 -
img 插值算法
a=imread('1.png');b=imrotate(a,30,'nearest');c=imrotate(a,30,'bilinear');d=imrotate(a,30,'bicubic');subplot(2,2,1);imshow(a);subplot(2,2,2);imshow(b);subplot(2,2,3);imshow(c);subplot(2,2,4);ims原创 2013-04-16 07:28:31 · 830 阅读 · 0 评论 -
img 图像旋转
>> a=imread('1.jpg');>> b=imrotate(a,30,'nearest','crop');>> subplot(1,2,1);imshow(a);>> subplot(1,2,2),imshow(b);>>原创 2013-04-16 07:11:52 · 1344 阅读 · 0 评论 -
img 高斯平滑
i=imread('5.jpg');figure;imshow(i);h3_5=fspecial('gaussian',3,0.5);i3_5=imfilter(i,h3_5);figure,imshow(i3_5);h7_18=fspecial('gaussian',7,1.8);i7_18=imfilter(i,h7_18);figure,imshow(i7_18);原创 2013-04-16 11:34:40 · 547 阅读 · 0 评论 -
img robert交叉梯度
>> i=imread('4.jpg');>> imshow(i);>> i=double(i);>> w1=[-1 0;0 1];>> w2=[0 -1;1 0];>> g1=imfilter(i,w1,'corr','replicate');>> g2=imfilter(i,w2,'corr','replicate');>> g=abs(g1)+abs(g2);>> figur原创 2013-04-16 20:07:53 · 1836 阅读 · 0 评论 -
img 镜像
a=imread('2.jpg');[height,width,dim]=size(a);tform=maketform('affine',[-1 0 0;0 1 0;width 0 1]);b=imtransform(a,tform,'nearest');tform2=maketform('affine',[1 0 0;0 -1 0; 0 height 1]);c=imtransfor原创 2013-04-15 22:46:33 · 693 阅读 · 0 评论 -
img 图像平移
>> a=imread('2.jpg');>> se=translate(strel(1),[80 50]);>> b=imdilate(a,se);>> figure;>> subplot(1,2,1);subimage(a);>> title('原图像');>> subplot(1,2,2);subimage(b);>> title('图像平移');原创 2013-04-15 22:31:10 · 836 阅读 · 0 评论 -
img 绘制灰度直方图
>> i=imread('img2.jpg');>> figure;>> imshow(i);title('source');>> figure;>> imhist(i);title('graph');>>原创 2013-04-13 22:12:43 · 702 阅读 · 0 评论 -
img 直方图均衡化
>> i=imread('4.jpg');>> i=im2double(i);>> %对于对比度较大的图像>> i1=2*i-55/255;>> subplot(4,4,1);>> imshow(i1);>> subplot(4,4,2);>> imhist(i1);>> subplot(4,4,3);>> imshow(histeq(i1));>> subplot(4,4,4原创 2013-04-14 22:28:54 · 786 阅读 · 0 评论 -
img 灰度阈值变化
>> i=imread('3.jpg');>> thresh=graythresh(i)thresh = 0.4824>> bw1=im2bw(i,thresh);>> bw2=im2bw(i,130/255);>> subplot(1,3,1);imshow(i);title('原图像');>> subplot(1,3,2);imshow(bw1);title('自动选原创 2013-04-14 11:26:53 · 926 阅读 · 0 评论 -
img 修改图片对比度
i=imread('3.jpg'); i=im2double(i);%转化数据类型为double figure(1); imshow(i); title('原图像'); %增加对比度 fa=2;fb=-55; o=fa.*i+fb/255; figure(3); subplot(2,2,1); imshow(o); title('增加对比度'); %原创 2013-04-14 11:06:04 · 724 阅读 · 0 评论 -
img sobel梯度
> i=imread('4.jpg');>> w1=fspecial('sobel')w1 = 1 2 1 0 0 0 -1 -2 -1>> w2=w1'w2 = 1 0 -1 2 0 -2 1 0 -1>> g1=imfilter(原创 2013-04-16 20:13:04 · 664 阅读 · 0 评论