Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #55499

Re: Any quick, easy way to compare two images?

From john hevelin <bwotte@panix.com>
Newsgroups comp.sys.mac.system
Subject Re: Any quick, easy way to compare two images?
Date 2014-01-28 02:26 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <lc74hg$ft6$1@reader1.panix.com> (permalink)
References (19 earlier) <lc3ka4$ft8$1@dont-email.me> <2014012613303278552-savageduck1@REMOVESPAMmecom> <lc44d1$v66$1@dont-email.me> <lc4c75$joi$1@reader1.panix.com> <lc4g82$c2o$2@dont-email.me>

Show all headers | View raw


Don Bruder <dakidd@sonic.net> wrote:
> In article <lc4c75$joi$1@reader1.panix.com>,
>  john hevelin <bwotte@panix.com> wrote:

> > Don Bruder <dakidd@sonic.net> wrote:
> > 
> > 
> > > For anyone who might give a damn, I've coded a workaround that seems to 
> > > be doing the job just fine. I'll let it keep dumping debug reports for 
> > > another half a day or so, and if it continues to show no problems, call 
> > > it "good enough".
> > 
> > I'm interested in efficient ways to compare files.  I'd be interested
> > in seeing what you've worked up when you're satisfied with it.

> Pretty simple, really - Especially considering the insanity that this 
> thread has spawned. 

> In my "try to grab a new image" routine, I grab the image as "current", 
> then just loop through the first hundred bytes of the last image (saved 
> as "previous" for this purpose) that was considered "new", XORing them 
> against the same bytes in "current". If any of the XORs produce a 
> non-zero, I break out of the loop, replace "previous" with "current" for 
> next time around, and hand "current" back to the caller. If the XORs all 
> come up zero, I drop "current" on the floor, and return nil to the 
> caller to signal "no new image this time around - try again later".

Ok.  You understand this approach will generate false duplicates
and that you will miss frames that you would otherwise have included.

> *VERY* simplistic, obviously won't catch differences beyond the first 
> hundred bytes, and probably has other technically "unforgivable" 
> problems, but so far, hasn't shown me a wrong choice, runs quick, and 
> didn't take much "brain-sweat" to code.

Since your method will erroneously detect false duplicates, your
QA process is failing to detect the errors.  Do you have an
alternative method for verifying your code?  Right now it was quick
to develop, runs fast, and produces the wrong answers.  If the
errors are within the tolerances of your project, that's your call.

I'm curious as to why you seem reluctant to use existing utilities
such as cmp(1) that are readily available under Mac OS X, which
have a development time of zero, produce correct answers, and run
blindingly fast.  I just used cmp(1) to compare two equal 25M files
on my iMac running Tiger:  wall clock time was 0.12 seconds

Back to comp.sys.mac.system | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-23 10:42 -0800
  Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-23 14:24 -0500
    Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-23 13:00 -0800
      Re: Any quick, easy way to compare two images? Tom Stiller <clusterfux.upmon@gmail.com> - 2014-01-23 21:11 +0000
        Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-23 16:38 -0800
          Re: Any quick, easy way to compare two images? john hevelin <bwotte@panix.com> - 2014-01-24 01:57 +0000
            Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-23 18:03 -0800
        Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-23 21:25 -0800
      Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-23 16:31 -0500
        Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-23 16:57 -0500
          Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-23 17:02 -0500
        Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-23 21:28 -0800
      Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-23 16:32 -0500
        Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-23 16:22 -0800
          Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-23 19:48 -0500
            Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-23 23:54 -0800
              Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-24 08:09 -0800
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-24 08:44 -0800
          Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-23 22:06 -0500
            Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-23 23:37 -0800
  Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-23 20:46 +0000
  Re: Any quick, easy way to compare two images? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-01-23 23:19 +0000
    Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-23 18:38 -0500
      Re: Any quick, easy way to compare two images? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-01-24 00:49 +0000
        Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-23 19:59 -0500
  Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-23 15:25 -0800
    Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-23 18:37 -0500
      Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-23 16:05 -0800
        Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-23 19:47 -0500
          Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-23 17:10 -0800
            Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-24 17:42 -0500
              Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-24 16:42 -0800
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-24 20:08 -0800
                Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-25 10:54 -0500
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 15:31 -0500
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-25 17:31 -0800
                Re: Any quick, easy way to compare two images? Michael Vilain <vilain@NOspamcop.net> - 2014-01-25 17:57 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 03:09 +0000
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 23:02 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 05:04 +0000
                Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-25 10:58 -0500
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-25 10:29 -0800
                Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-25 13:39 -0500
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 13:45 -0500
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-25 13:27 -0800
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 16:30 -0500
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-25 13:33 -0800
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 16:52 -0500
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 17:31 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-25 22:35 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 17:49 -0500
                Re: Any quick, easy way to compare two images? Tom Stiller <clusterfux.upmon@gmail.com> - 2014-01-25 22:55 +0000
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 18:33 -0500
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 19:42 -0500
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-25 17:38 -0800
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 22:50 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 02:49 +0000
                Re: Any quick, easy way to compare two images? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-01-26 14:21 +0000
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 15:17 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-26 14:04 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 00:17 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 19:42 -0500
                Re: Any quick, easy way to compare two images? dorayme <do_ray_me@bigpond.com> - 2014-01-26 12:23 +1100
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 02:54 +0000
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 02:52 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 22:10 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 03:32 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 22:55 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 05:02 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-26 14:04 -0500
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-25 18:03 -0800
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 22:10 -0500
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 17:49 -0500
                Re: Any quick, easy way to compare two images? Savageduck <savageduck1@{REMOVESPAM}me.com> - 2014-01-25 15:59 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 00:24 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 19:42 -0500
                Re: Any quick, easy way to compare two images? Savageduck <savageduck1@{REMOVESPAM}me.com> - 2014-01-25 17:30 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 02:57 +0000
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 22:46 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 03:49 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 22:55 -0500
                Re: Any quick, easy way to compare two images? dorayme <do_ray_me@bigpond.com> - 2014-01-26 12:08 +1100
                Re: Any quick, easy way to compare two images? Savageduck <savageduck1@{REMOVESPAM}me.com> - 2014-01-25 17:31 -0800
                Re: Any quick, easy way to compare two images? dorayme <do_ray_me@bigpond.com> - 2014-01-26 13:00 +1100
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-25 20:13 -0800
                Re: Any quick, easy way to compare two images? dorayme <do_ray_me@bigpond.com> - 2014-01-26 16:15 +1100
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-25 18:07 -0800
                Re: Any quick, easy way to compare two images? Savageduck <savageduck1@{REMOVESPAM}me.com> - 2014-01-25 18:24 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 02:58 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 22:10 -0500
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-25 17:36 -0800
                Re: Any quick, easy way to compare two images? Savageduck <savageduck1@{REMOVESPAM}me.com> - 2014-01-25 17:51 -0800
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-26 00:39 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 15:43 +0000
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-26 08:19 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 16:31 +0000
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-26 09:54 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 18:14 +0000
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-26 10:44 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 19:10 +0000
                Re: Any quick, easy way to compare two images? dorayme <do_ray_me@bigpond.com> - 2014-01-27 11:14 +1100
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-26 16:22 -0800
                Re: Any quick, easy way to compare two images? dorayme <do_ray_me@bigpond.com> - 2014-01-27 11:44 +1100
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-27 13:06 -0500
                Re: Any quick, easy way to compare two images? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-01-27 12:48 +0000
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-27 05:49 -0800
                Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-26 12:05 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 17:08 +0000
                Re: Any quick, easy way to compare two images? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-01-26 12:27 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 17:37 +0000
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-26 15:36 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 21:46 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-26 14:04 -0500
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-26 12:16 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 21:47 +0000
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-26 16:21 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-27 01:57 +0000
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-26 10:32 -0800
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 18:54 +0000
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-26 15:40 -0500
                Re: Any quick, easy way to compare two images? Savageduck <savageduck1@{REMOVESPAM}me.com> - 2014-01-26 13:30 -0800
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-26 15:06 -0800
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-26 18:20 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 23:35 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-27 13:06 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-27 19:14 +0000
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-27 23:18 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-28 04:27 +0000
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-29 14:01 -0500
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-29 14:01 -0500
                Re: Any quick, easy way to compare two images? john hevelin <bwotte@panix.com> - 2014-01-27 01:19 +0000
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-26 18:28 -0800
                Re: Any quick, easy way to compare two images? john hevelin <bwotte@panix.com> - 2014-01-28 02:26 +0000
                Re: Any quick, easy way to compare two images? Don Bruder <dakidd@sonic.net> - 2014-01-28 06:35 -0800
                Re: Any quick, easy way to compare two images? dorayme <do_ray_me@bigpond.com> - 2014-01-27 10:55 +1100
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-25 22:10 -0500
                Re: Any quick, easy way to compare two images? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-01-25 21:41 -0800
                Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-26 14:04 -0500
                Re: Any quick, easy way to compare two images? Jolly Roger <jollyroger@pobox.com> - 2014-01-26 03:13 +0000
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 17:30 -0500
                Re: Any quick, easy way to compare two images? john hevelin <bwotte@panix.com> - 2014-01-25 18:51 +0000
                Re: Any quick, easy way to compare two images? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-01-25 19:06 +0000
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 15:37 -0500
                Re: Any quick, easy way to compare two images? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-25 15:35 -0500
        Re: Any quick, easy way to compare two images? nospam <nospam@nospam.invalid> - 2014-01-23 22:06 -0500

csiph-web