in reply to Regarding Perl Counting
Hm, CBIR - Content-based image retrieval.
WormScan seems to be about this problem.