针对现有阈值分割算法利用穷举搜索寻找最优阈值而造成的计算成本较大的问题,提出了一种基于差分进化优化算法和模糊熵的多级阈值图像分割算法.图像分割是图像分析中非常重要的预处理步骤,在提出的方法中,首先选择模糊熵作为优化技术的目标函数.然后建立了一种基于差分进化优化算法的多层次图像阈值分割,通过模糊熵进行图像分割.最后从图像分割数据库中选取"Lena","Baboon"和"Airplane"作为测试图像进行性能分析(包括鲁棒性,效率和收敛性),并与现有的几种阈值分割算法进行比较.结果显示,提出的算法得到了的更高PSNR值和更少的分类误差,证明了该算法是一种高效的多级阈值图像分割算法.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This is a demo file
% I is the input image
% NThresholds: The number of thresholds required. It lies between
% 1 and (the difference between the maximum and minimum
% graylevel present in the image)
% This code is for thresholding of gray-scale images of 8-bit depth.
% Color images can also be inputted to this code. But it will be converted
% to gray-scale image by the code before starting the thresholding algorithm
I = imread('55067.jpg');
NThresholds = 3;
if size(I,3)==3
I=rgb2gray(I);
end
for i=1:size(I,3)
cI(:,:,i) = thresholdImage(I(:,:,i),NThresholds);
end
figure,subplot(1,2,1),imshow(I),title('Original Image');
subplot(1,2,2),imshow(cI),title(strcat('Thresholded Image (',num2str(NThresholds),' Thresholds)'));
[1]柳培忠等. "基于模糊熵的差分进化算法对乳腺图像进行分割的方法.", CN109146864A. 2019.
[2]吕福起, 李霄民. 基于粒子群优化算法和模糊熵的多级阈值图像分割算法[J]. 计算机应用研究, 2019, 36(9):5.
部分理论引用网络文献,若有侵权联系博主删除。