function J=gamma_filter(Img,deta)
window_size=7;
delta=deta;
p=2*delta;
K=3;
if(ndims(Img)==3)
Img=rgb2gray(Img);
end;
[height width]=size(Img);
J=zeros(height,width);
J=uint8(J);
for i=1:height
for j=1:width
total=0;
total_1=0;
count=0;
count_1=0;
for k=i-floor(window_size/2):i+floor(window_size/2)
if(k<=0 || k>height)
continue;
end;
for l=j-floor(window_size/2):j+floor(window_size/2);
if(l<=0 || l>width)
continue;
end;
if(Img(k,l)>=Img(i,j)-p && Img(k,l)<=Img(i,j)+p)
伽马滤波实现(Matlab源码)
最新推荐文章于 2023-03-03 10:02:49 发布