Code covered by the BSD License  

Highlights from
Soft thresholding for image segmentation

image thumbnail
from Soft thresholding for image segmentation by SANTIAGO AJA-FERNANDEZ
Image segmentation based on histogram soft thresholding

minimizationFunction(y,h,x,Nmax)
function f = minimizationFunction(y,h,x,Nmax)
% -h + \sum alpha_i*normpdf(x,mu_i,sigma_i)
tmp = -h;

for iNmax =1:Nmax;
    id = 3*(iNmax-1)+1;
    tmp = tmp + y(id).*normpdf(x,y(id+1),y(id+2));
end

f = sum(tmp.^2);

Contact us