Image recognition tool
Sannyasin Sivakatirswami
katir at hindu.org
Sun Jul 20 15:26:03 EDT 2003
oops.. I didn't have that posted quite like i was doing it... here
Vikram's solution with your suggested parenthetical function notation:
on mouseup
answer file "choose the first image"
put url ("binfile:" & it) into tFirstImage
answer file "choose the second image"
put url ("binfile:" & it) into tSecondmage
put md5Digest(tFirstImage) into tCheckDigestImg1
put md5Digest(tSecondImage) into tCheckDigestImg2
if tCheckDigestImg1 = tCheckDigestImg2 then answer "Match!"
end mouseup
this still doesn't work... both cases fail:
a) case where the two images were separately processed to the exact
same specs from a hi-res source (used same ImageReady droplet to make a
thumbnail) and
b) case where I did a finder copy of image the first image (OSX) such
that the second image should indeed be the exact same binary data of
its source.
The md5digest of a binary data file doesn't appear to work. So far,
seems the images have to be loaded to the card first, then check the
image data and this does work for both a) and b) above....which is very
doable for each loop process on a G4 dual processor work station (not
my powerbook) and come back later.. (dups would be tagged or move to to
another directory by script) to check -- (real world example: -- 20
incoming images against an already existing archive of 500 plus images.
We also can't to a preliminary triage with file names (which would be
lightening fast) as
DSCN0002.JPG ## hi res source
DSCN0002-01.jpg ## first thumbnail output with droplet
DSCN0002-02.jpg ## second thumbnail output with same droplet
DSCN0002-02 copy.jpg ## finder copy of above file.
are all the same image, but a month later a file by the same name
DSCN0002.JPG might come in from a different camera and be a completely
different image.
So, we have a solution, but its not very "run time" like you see on the
TV shows where some intelligence agency is scanning a photo against a
data base of photos for a match.. all in the blink of an eye -- can
you believe that stuff... ;-)
but anything has got to be better than (very tedious and unproductive
routine:) dragging all the images into an iView catalog and, by eye,
trying to spot dups...then sending those to the trash.
--Sivakatirswami
On Sunday, July 20, 2003, at 08:43 AM, Richard Gaskin wrote:
> From: Richard Gaskin <ambassador at fourthworld.com>
> Date: Sun Jul 20, 2003 8:43:55 AM Pacific/Honolulu
> To: <use-revolution at lists.runrev.com>
> Subject: Re: Image recognition tool
> Reply-To: use-revolution at lists.runrev.com
>
> Sannyasin Sivakatirswami wrote:
>
>> this does not work:
>>
>> -- answer file "choose the first image"
>> -- put url ("binfile:" & it) into tFirstImage
>> -- answer file "choose the second image"
>> -- put url ("binfile:" & it) into tSecondmage
>> -- put (the md5Digest of tFirstImage) into tCheckDigest
>> -- put cr & (the md5Digest of tSecondImage) after
>> tTestMd5DigestMatch
>> -- put tTestMd5DigestMatch
>
> What is the error?
>
> Does it work if you use the standard parenthetical function form?:
>
> put md5Digest(tFirstImage) into tCheckDigest
More information about the use-livecode
mailing list