% area.m
%
% Computes the 'area' of a binary image.
%
% Returns the amount of 'on' pixels in the image

function a = area(I);
[m,n] = size(I);
a = 0;
for x=1:m
    for y=1:n
        if I(x,y) == 1
            a = a + 1;
        end
    end
end
