www.gusucode.com > Diabetic retinopathy > lamda_weighting_function.m

    
function y=lamda_weighting_function(x,thresh1,thresh2)
% Used in retinex based color enhancement

if(x<=thresh1)
    y=0;
else if ((x>thresh1)&& (x<thresh2))
    y=(x-thresh1)/(thresh2-thresh1);
    else
        y=1;
    end
end
return