On 8/26/05, Teemu Ikonen <[EMAIL PROTECTED]> wrote:
> On 8/26/05, Paolo Pedaletti <[EMAIL PROTECTED]> wrote:
> > (better were if I could count how much (%) of each color [.gif, indexed]
> > is present in the photo, but I can resolve this in other way...)

Oops, should have tested before posting. This should be better:

#! /usr/bin/octave -qf
# Print percentages of colours present in a 256-color image
# given as a command line argument

[x,n] = hist(imread(argv{1})(:), [0:255]+0.5, 100);
disp([floor(n)', x']);

Teemu

Reply via email to