Filter löschen
Filter löschen

how to determine multilevel thresholds for segmentation using real coded genetic agorithm

1 Ansicht (letzte 30 Tage)
function fitR = Kapur(m,level,xR,PI) %Metodo de Entropia de Kapur fitR = zeros(1,m); for j = 1: m PI0 = PI(1:xR(j,1)); % probabilidad de la primer clase ind = PI0 == 0; ind = ind .* eps; PI0 = PI0 + ind; clear ind w0 = sum(PI0); %w0 de la primer clase H0 = -sum((PI0/w0).*(log2(PI0/w0))); fitR(j) = fitR(j) + H0;
for jl = 2: level
PI0 = PI(xR(j,jl-1)+1:xR(j,jl)); % probabilidad de la primer clase
ind = PI0 == 0;
ind = ind .* eps;
PI0 = PI0 + ind;
clear ind
w0 = sum(PI0); %w0 de la primer clase
H0 = -sum((PI0/w0).*(log2(PI0/w0)));
fitR(j) = fitR(j) + H0;
end
end
In this code how to determine the level, xR, PI, and m

Antworten (0)

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by