Zorbing icon

[Medtec] imageContrast.m

Zorbing | PRO | 07/09/13 08:18:32 PM UTC | 0 ⭐ | 280 👁️ | Never ⏰ | []
MatLab |

340 B

|

None

|

0 👍

/

0 👎

%% Bildkontrast
% 3.
function contrast = imageContrast(image)
    % 3.a)
    image = image(:);
    
    % 3.b)
    image = double(image);
    
    % 3.c)
    meanGreyValue = sum(image) / numel(image);
    
    % 3.d)
    contrast = sum(image .* image) / numel(image);
    contrast = contrast - (meanGreyValue * meanGreyValue);
end

Comments