필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by