From owner-freebsd-questions@FreeBSD.ORG Mon Sep 7 11:16:04 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D3791065676 for ; Mon, 7 Sep 2009 11:16:04 +0000 (UTC) (envelope-from modulok@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 041568FC35 for ; Mon, 7 Sep 2009 11:16:03 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 4so1328078eyf.9 for ; Mon, 07 Sep 2009 04:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=14vSXM8GLXfRgOAGMBzhxVQNxi0FHr6GI12wX/4H7Aw=; b=hCpmHFxbAse2a1H+2bE8WPwKjL+L0ljgaBgj2x5X8pbV7ya291mmmJsfaxRifYmG7g CZJkyz0cG3M3aO/2jxNxnPWRT7anlQhHAf8DW2NBVS1u+qUV59nGXOZFOsKGQCd0c+by PFG4opyRz8lDrju4rJpSXaI+EW9x7OEBsyM0c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=g0ohVRexWJUDxw1KNwVAcus8rU8I20W+3R2PSdm15TRWnTndLE8McXxXzvEmYs1N2n GixBeqQ21GX8TXnYHlOpbsGKUBwafFPkAfbTExFZbelqRNh/XZP5mnVExWTvmcyqE9c5 E/C3ki57+SKtUcFN3OMPdXg/yRMKsvTCvrm5U= MIME-Version: 1.0 Received: by 10.211.145.15 with SMTP id x15mr16035088ebn.6.1252322162735; Mon, 07 Sep 2009 04:16:02 -0700 (PDT) In-Reply-To: <20090907083112.GA2787@holstein.holy.cow> References: <64c038660909050933h25a91edcw56688993f5557ad2@mail.gmail.com> <44skf0c6zq.fsf@lowell-desk.lan> <20090907083112.GA2787@holstein.holy.cow> Date: Mon, 7 Sep 2009 05:16:02 -0600 Message-ID: <64c038660909070416y285e0fddv42a43a7c127d4a74@mail.gmail.com> From: Modulok To: "parv@pair.com" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: Is there such thing as a 'soft checksum' tool? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 11:16:04 -0000 >> Modulok writes: >> > I'm not even sure such a tool exists, but it's worth asking: >> > >> > I'm looking for a pseudo-checksum tool for use with catalogging >> > images. For example, a strict checksum algorithm, like the sha >> > family, will produce a dramatically different checksum for two >> > files which differ by only a single bit. I'm looking for >> > something where two images images, which are similar, get a >> > proportionally similar checksum. When I speak of similarities >> > I'm referring to their image patterns. i.e two images of >> > differing sizes, which are otherwise identical, would produce >> > very similar checksums. So the closer the checksums are, the >> > more similar two given images are. >> > >> > Does anyone know of anything like this? > > See if this ... > > http://www.stonehenge.com/merlyn/LinuxMag/col50.html > > > ... fits. > > > - parv *laughs* It makes me feel pretty good after reading how Mr.Schwartz went about it. Before I got any replies I started to think about how I'd do it and began to sketch out an algorithm on the kitchen floor. (Largest black-board in my house.) The general approach was pretty much the same; Recursive bucketing of pixels and generating averaged values down to a user-defined finite limit. Thanks to all who have replied thus far! -Modulok-