[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] comparing image files



At 10:50 AM -0700 9/11/99, Brian McNett wrote:
>Another idea is to use bit-interleaving to create a unique key based on
>the internal structure of the file.  Treat the file as a string of bits.
>Find the mid-point in the string, and fold the string back on itself.
>Bits from the front half of the file become the odd-numbered bits of the
>key, and bits from the back half become the even-numbered bits of the
>key.  Files that are similar will have similar keys, so performing a sort
>of the keys, gives you a list of files sorted by similarity!  You could
>even truncate the key to it's first few (oh about 32) bits, and it should
>still work.

I don't understand how this would work.  Let's say that the file is a
pixrect, with 32 bits per pixel.  If I fold the rectangle around the
midpoint, the first 32 bits of my bit string would be made up of 16 bits
each from the first and last pixels of the image.  Not too definitive...

So, I assume that I am totally misunderstanding you; could you try to
go through this again, in a bit more detail?

-r
--
Rich Morin:          rdm@cfcl.com, +1 650-873-7841, http://www.ptf.com/~rdm
Prime Time Freeware: info@ptf.com, +1 408-433-9662, http://www.ptf.com
MacPerl: http://www.macperl.com,       http://www.ptf.com/ptf/products/MPPE
MkLinux: http://www.mklinux.apple.com, http://www.ptf.com/ptf/products/MKLP

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org