www.pudn.com > fractional-differential.rar > Enhance_Contrast_YanMo.m, change:2013-09-09,size:1407b

```%%  图像增强实验&&掩膜算子对比
close all
clear all
img2=img1(:,:,1);
imshow(img2);
title('原图像');
img = im2double(img2);

v = 0.5;
%% 分数阶微分掩膜算子结构
% Methods of <自适应分数阶微分在图像纹理增强中的应用>_汪成亮
F_1 = [v/(8*v-8),v/(8*v-8),v/(8*v-8);...
v/(8*v-8),8/(8-8*v),v/(8*v-8);...
v/(8*v-8),v/(8*v-8),v/(8*v-8)];

% Methods of 《基于分数阶微分的图像增强》_杨柱中
for i=1:H
for j=1:L
a0 = 1;
a1 = -v;
a2 = (-v)*(-v+1)/2;
a3 = (-v)*(-v+1)*(-v+2)/6;

F_2(i,j).filter = [a3 0 0 a3 0 0 a3 ;0 a2 0 a2 0 a2 0 ;0 0 a1 a1 a1 0 0 ;a3 a2 a1 8*a0 a1 a2 a3;...
0 0 a1 a1 a1 0 0 ;0 a2 0 a2 0 a2 0 ;a3 0 0 a3 0 0 a3];   % 7*7分数阶掩膜算子
end
end

imgfil_1 = ones(H,L);
imgfil_2 = ones(H,L);

for i=1:H
for j=1:L
imgfil_1(i,j) = myfilter(img(i,j),F_1(i,j).filter); % Function “filter”of convolution
end
end
figure,imshow(imgfil_1,[]);
title('自适应分数阶微分处理后图像based on method First');
tic
for i=1:H
for j=1:L
imgfil_2(i,j) = myfilter(img(i,j),F_2(i,j).filter); % Function of convolution 取代imfilter函数
end
end
figure,imshow(imgfil_2,[]);
title('自适应分数阶微分处理后图像based on method Second');
toc```