·¢²¼Ê±¼ä : ÐÇÆÚÈÕ ÎÄÕÂÊý×ÖͼÏñ´¦Àí-ͼÏñƽ»¬ºÍÈñ»¯±ä»»´¦Àí¸üÐÂÍê±Ï¿ªÊ¼ÔĶÁ85e974a8915f804d2b16c1ae
ͼÏñƽ»¬ºÍÈñ»¯±ä»»´¦Àí
Ò»¡¢ÊµÑéÄÚÈݺÍÒªÇó
1¡¢ »Ò¶È±ä»»£º»Ò¶ÈÀÉì¡¢Ö±·½Í¼¾ùºâ¡¢Ù¤ÂíУÕý¡¢log±ä»»µÈ¡£ 2¡¢ ¿ÕÓòƽ»¬£ºbox¡¢gaussÄ£°å¾í»ý¡£ 3¡¢ ƵÓòƽ»¬£ºµÍͨÂ˲¨Æ÷ƽ»¬¡£ 4¡¢¿ÕÓòÈñ»¯£ºÈñ»¯Ä£°åÈñ»¯¡£ 5¡¢ÆµÓòÈñ»¯£º¸ßͨÂ˲¨Æ÷Èñ»¯¡£
¶þ¡¢ÊµÑéÈíÓ²¼þ»·¾³
PC»úһ̨¡¢MATLABÈí¼þ
ÈýʵÑé±à³Ì¼°µ÷ÊÔ
1¡¢ »Ò¶È±ä»»£º»Ò¶ÈÀÉì¡¢Ö±·½Í¼¾ùºâ¡¢Ù¤ÂíУÕý¡¢log±ä»»µÈ¡£ ¢Ù»Ò¶ÈÀÉì³ÌÐòÈçÏ£º I=imread('kids.tif');
J=imadjust(I,[0.2,0.4],[]); subplot(2,2,1),imshow(I); subplot(2,2,2),imshow(J); subplot(2,2,3),imhist(I); subplot(2,2,4),imhist(J);
¢ÚÖ±·½Í¼¾ùºâ³ÌÐòÈçÏ£º I=imread('kids.tif'); J=histeq(I); Subplot(2,2,1); Imshow(I);
Title('ÔͼÏñ'); Subplot(2,2,2); Imshow(J);
Title('Ö±·½Í¼¾ùºâ»¯ºóµÄͼÏñ') ; Subplot(2,2,3) ; Imhist(I,64);
Title('ÔͼÏñÖ±·½Í¼') ; Subplot(2,2,4);
Imhist(J,64) ; Title('¾ùºâ±ä»»ºóµÄÖ±·½Í¼') ;
¢ÛÙ¤ÂíУÕý³ÌÐòÈçÏ£º A=imread('kids.tif'); x=0:255;
a=80,b=1.8,c=0.009;
B=b.^(c.*(double(A)-a))-1; y=b.^(c.*(x-a))-1;
subplot(3,2,1); imshow(A); subplot(3,2,2); imhist(A); subplot(3,2,3); imshow(B); subplot(3,2,4); imhist(B); subplot(3,2,6); plot(x,y);
¢Ülog±ä»»³ÌÐòÈçÏ£º Image=imread('kids.tif');
subplot(1,2,1);imshow(Image); Image=log(1+double(Image)); subplot(1,2,2);imshow(Image,[]);
2¡¢ ¿ÕÓòƽ»¬£ºbox¡¢gaussÄ£°å¾í»ý¡£ A=imread('onion.png'); B=rgb2gray(A);
figure,subplot(3,2,1);imshow(B); title('ÔʼͼÏó');
H=imnoise(B,'gaussian'); subplot(3,2,2);imshow(H); title('¸ß˹ÔëÉù');
Q=imnoise(B,'salt & pepper'); subplot(3,2,3);imshow(Q); title('½·ÑÎÔëÉù');
M=fspecial('average',3*3); E=imfilter(Q,M);
subplot(3,2,4);imshow(E); title('3*3ƽ¾ùÄ£°å'); N=fspecial('average',5*5); K=imfilter(Q,N);
subplot(3,2,5);imshow(K); title('5*5ƽ¾ùÄ£°å'); Z=fspecial('average',7*7); J=imfilter(Q,Z);
subplot(3,2,6);imshow(J); title('7*7ƽ¾ùÄ£°å');
3¡¢ ƵÓòƽ»¬£ºµÍͨÂ˲¨Æ÷ƽ»¬¡£ ƵÓòµÍͨÂ˲¨´¦ÀíÔëÉùµÄ³ÌÐòÈçÏ£º [f1,f2]=freqspace(25,'meshgrid');
Hd=zeros(25,25);
d=sqrt(f1.^2+f2.^2)<0.5;%0.5Ϊ½ØÖ¹°ë¾¶´óС Hd(d)=1;
h=fsamp2(Hd);
figure(1),freqz2(h,[64,64]); RGB=imread('onion.png'); I=rgb2gray(RGB);
I1=imnoise(I,'gaussian');
I2=imnoise(I,'salt & pepper',0.02); I3=imnoise(I,'speckle'); J=imfilter(I,h,'replicate'); J1=imfilter(I1,h,'replicate'); J2=imfilter(I2,h,'replicate'); J3=imfilter(I3,h,'replicate');
figure(2),subplot(221),imshow(J); title('ÔͼÏñÂ˲¨ºó'); subplot(222),imshow(J1); title('¸ß˹ÎÛȾͼÏñÂ˲¨ºó'); subplot(223),imshow(J2); title('½·ÑÎÎÛȾͼÏñÎÛȾºó'); subplot(224),imshow(J3); title('³Ë·¨ÎÛȾͼÏñÂ˲¨ºó');
4¡¢ ¿ÕÓòÈñ»¯£ºÈñ»¯Ä£°åÈñ»¯¡£ I=imread('onion.png'); A=RGB2gray(I); figure,subplot(2,3,1); imshow(A); title('Ôͼ');
hs=fspecial('sobel'); S=imfilter(A,hs); hp=fspecial('prewitt'); P=imfilter(A,hs);
A=double(A);%Ë«¾«¶ÈÐÍ
H=[0,1,0;1,-4,1;0,1,0];%ÀÆÕÀ˹Ëã×Ó J=conv2(A,H,'same'); K=A-J;
subplot(2,3,2),imshow(K); title('ÀÆÕÀ˹Èñ»¯Í¼Ïñ'); B=edge(A,'roberts',0.1); subplot(2,3,3),imshow(B); title('ÂÞ²®ÌØÈñ»¯Í¼Ïñ'); subplot(2,3,4),imshow(S); title('sobelËã×ÓÈñ»¯Í¼Ïñ');
subplot(2,3,5),imshow(P); title('prewittËã×ÓÈñ»¯Í¼Ïñ');
5¡¢ÆµÓòÈñ»¯£º¸ßͨÂ˲¨Æ÷Èñ»¯¡£ A=imread('onion.png'); B=rgb2gray(A);
figure,subplot(131),imshow(B); title('Ôͼ'); B=double(B);
B=fftshift(fft2(B)); E=B;
[M,N]=size(B); k1=round(M/2); k2=round(N/2); D=50;
for i=1:1:M for j=1:1:N
juli=sqrt((i-k1)^2+(j-k2)^2);
K(i,j)=1-exp((-1/2)*juli^2*(1/D^2));E(i,j)=K(i,j)*E(i,j); end end
E=ifft2(ifftshift(E)); E=uint8(real(E));
subplot(132),imshow(E);title('¸ß˹¸ßͨÂ˲¨Æ÷');
ËÄ¡¢ÊµÑé½á¹û¼°·ÖÎö
1¡¢»Ò¶È±ä»»£º»Ò¶ÈÀÉì¡¢Ö±·½Í¼¾ùºâ¡¢Ù¤ÂíУÕý¡¢log±ä»»µÈ¡£ ¢Ù»Ò¶ÈÀÉìÔËÐнá¹ûÈçÏ£º
¢ÚÖ±·½Í¼¾ùºâÔËÐнá¹ûÈçÏ£º