in reply to Image analysis

Sounds like what you want is a histogram: essentially, an x-y diagram of frequency of colors in an image. Your basic idea is sound, but things get complicated quickly. Do you have RGB data or transparency as well? How many bits deep are the images? Do you want to do any binning (group "similar" colors for some suitable definition of similar)?

As a first shot, you may want to try writing some Perl-Fu scripts in The GIMP to test your ideas, rather than starting completely from scratch. That way, you can get a better feel for how hard or easy it is to do what you want.

Replies are listed 'Best First'.
Re: Re: Image analysis
by AssFace (Pilgrim) on Apr 29, 2003 at 22:14 UTC
    Histogram? Excellent. If I know a word is associated with it, then I can search on how to do it. That's a start.

    Do I have transparency? I will assume no, or if I do (by "I" I of course really mean "the image" - everyone knows that I'm transparent), then I will just ignore the transparency.

    How many bits deep? Don't know. Some will be black and white, some will be 256, some will be "bunches o' colors" (sorry to get all technical there).
    This is going to be tied into images originating from an infinite supply (the web), so the pool is varied.
    If that is bad, then I can limit the pool - assuming there is an "easy" way to do so (for starters ignoring extensions - ie only look at gifs).

    Do I want binning? Sure! I'll take two.


    Hmm... scripting in GIMP... sounds like I'm going to have to figure out how to get the GIMP working on my Win laptop (none of my Linux machines have heads).

    I am essentially going to be pushing my way towards Bayesian classification of images - so I need access to the grid of colors so that I can see what colors are there, and ideally where they are as well (although that feature can be tacked on in a much later version).



    -------------------------------------------------------------------
    There are some odd things afoot now, in the Villa Straylight.
      An alternative which might make your linux machines more fun would be to install Cygwin on your windows box, including XFree86. Then you could ssh to one of them, and run whatever unix software you like over the network.
        I've got Cygwin on my work box for using GCC when I need to do something that I can't do on the shared machine (if the cpu usage goes over 30 seconds on the pair.com account, it will kill the process... for good reason).
        At home I just use PuTTY and ssh into whatever machine I want to use - but I can't use the graphical stuff (assuming you are suggesting for graphical cases - hence XFree86).
        I haven't tried the Cygwin XWindows though - maybe I'll give that a shot. I've used VNC in the past for basic stuff - checking when rendering is done and such, but not XFree86 over the net.

        Thanks for the tip.

        (for this particular case, I've found a way to side step that need (Gimp scripting) for now, but might find down the road that I will need it, and will keep it in mind)

        -------------------------------------------------------------------
        There are some odd things afoot now, in the Villa Straylight.
      Hmm... scripting in GIMP... sounds like I'm going to have to figure out how to get the GIMP working on my Win laptop (none of my Linux machines have heads).

      I've heard GIMP somewhat works on Windows.

      Leonid Mamtchenkov