1 内容介绍
针对现有阈值分割算法利用穷举搜索寻找最优阈值而造成的计算成本较大的问题,提出了一种基于差分进化优化算法和模糊熵的多级阈值图像分割算法.图像分割是图像分析中非常重要的预处理步骤,在提出的方法中,首先选择模糊熵作为优化技术的目标函数.然后建立了一种基于差分进化优化算法的多层次图像阈值分割,通过模糊熵进行图像分割.最后从图像分割数据库中选取"Lena","Baboon"和"Airplane"作为测试图像进行性能分析(包括鲁棒性,效率和收敛性),并与现有的几种阈值分割算法进行比较.结果显示,提出的算法得到了的更高PSNR值和更少的分类误差,证明了该算法是一种高效的多级阈值图像分割算法.
2 仿真代码
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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