in reply to
pixel counting
This doesn't really answer your question, but is there any particular reason you aren't using GIS? It's a software package that was made for this kind of work.
Comment on
Re: pixel counting
In Section
Seekers of Perl Wisdom