Demo entry 6365594

图像处理

   

Submitted by anonymous on May 20, 2017 at 13:29
Language: Matlab. Code size: 572 Bytes.

A=imread('***.jpg');
U=rgb2gray(A);
subplot(2,2,1);imshow(U);
xlabel('a)原始图像');
U1=double(U);
f=fft2(U1);
g=fftshift(f);
[M,N]=size(f);
n=1;
d0=10;
u0=round(M/2);
v0=round(N/2);
for i=1:M;
    for j=1:N;
        d=sqrt((i-u0)^2+(j-v0)^2);
        h=exp(-(d0/d)^n);
        y(i,j)=h*g(i,j);
    end
end
y=ifftshift(y);
e1=ifft2(y);
e2=uint8(real(e1));
subplot(2,2,2);imshow(e2);
xlabel('b)指数高通滤波器处理');

F1=histeq(e2);
subplot(2,2,4);imshow(F1);
xlabel('d)指数高通滤波器后直方图均衡化图像');
F2=histeq(U);
subplot(2,2,3);imshow(F2);
xlabel('c)原始图像直方图均衡化后的图像');

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).