Start
Loading Image
Training Using Evolution Strategy Algorithm (Input: Raw Image and Target Histogram Vector)
Goal: To Adjusting the Intensity by Equalizing the Image Histogram
Initialize the Population Size N and Number of Generations
While (number of generations is not reached)
Recombination of Attributes and Variances of Individuals
Mutation of Attributes and Variances
Evaluation of Fitness Function for Individuals
Selection for New and Best Individuals (Best Target Histogram Value)
End While
Apply Best Selected Target Histogram Vector
End of ES
Output: Evolutionary Intensity Adjusted of Target Histogram for Raw Input Image
Training Using Cultural Algorithm (Input: ES Equalized Histogram Image and Threshold Levels Vector)
Goal: To Quantize the Image by Fitting Threshold Level
Initialize the Population Size N and Number of Generations
While (number of generations is not reached)
Fitness Evaluation
Updating Belief Space
Reproduction Operators
Influence and Acceptance Functions
Selecting Best Individuals (Best Threshold Value)
End While
Apply Best Selected Threshold Level Vector
End of CA
Output: Evolutionary Fitted Threshold Level for Input Image
Training Using Simulated Annealing Algorithm (Input: Quantized Image and Filter Matrix)
Goal: To Select Best Edge Filters
Initialize the Population Size N and Number of Generations
While (number of generations is not reached)
Objective Function Evaluation
If Objective Function Decreases
Update the Best Solution for Each Filter Vector
Reduce the Current Temperature
Generate a New Trial Solution and Go to Evaluation Step
Else If Metropolis Criterion Is Meet
Go to Update Step
Else
Go to Reduce Temperature Step
End While
Apply Best Selected Edge Filter
End of SA
Output: Evolutionary Edge Detected Image
Training Using Particle Swarm Optimization + SA (Input: Edge Detected Input Image)
Goal: To Segment the Input Image
Initialize the Population Size N and Number of Generations
While (number of generations is not reached)
Initialized Particles with Random Position and Velocity for PSO
Evaluate the Fitness of Particles for each Pixel and Their Corresponding Distance for PSO
Objective Function Evaluation for SA as Optimizer
Find and update pbest and gbest for PSO
Reduce The Current Temperature for SA
Calculate and Update Velocity and Position for PSO
Generate a New Trial Solution and Go to Evaluation Step for SA
Show gbest the Optimal Solution for PSO
Desirable Temperature Reached for SA
Update the Best Solution Found for Pixel and Distance by PSO+SA
End While
Apply Best Clusters Found on Image to Segment
End of PSOSA
Overlay All Evolutionary Techniques
Output: Evolutionary Segmented Image
End
function Culture = AdjustCulture(Culture, spop)
n = numel(spop);
nVar = numel(spop(1).Position);
for i = 1:n
if spop(i).Cost Culture.Situational = spop(i); end for j = 1:nVar if spop(i).Position(j) || spop(i).Cost Culture.Normative.Min(j) = spop(i).Position(j); Culture.Normative.L(j) = spop(i).Cost; end if spop(i).Position(j)>Culture.Normative.Max(j) ... || spop(i).Cost Culture.Normative.Max(j) = spop(i).Position(j); Culture.Normative.U(j) = spop(i).Cost; end end end Culture.Normative.Size = Culture.Normative.Max-Culture.Normative.Min; end [1]余胜威. 基于FODPSO算法的图像分割及DSP实现[D]. 西南交通大学, 2016. [2]王建宾. 基于粒子群优化絮体图像分割算法的设计和应用[D]. 华东交通大学. Mousavi, S. M. H. (2022). Bio-Inspired Fossil Image Segmentation for %% Paleontology. International Journal of Mechatronics, Electrical and %% Computer Technology (IJMEC), 12(45), 5243-5249. 部分理论引用网络文献,若有侵权联系博主删除。
3 运行结果
4 参考文献
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。