At my previous work I had written the image comparison framework for our
regression test suite, it worked very well for us and it was in
python/numpy/scipy (which threads well internally).
Werner the case you have on SE seems to indicate you need a translation
invariant test, I think. Another thing that worked well to reduce our
thresholds was to apply a few test to images and have separate thresholds
for the various metrics.
In your case you could compute min diff over all possible translations that
would bring your first test result to 0, while not appropriate for all test
cases, it seems like this would be an ok thing to do for many of them
(ImageMagick can't do this, I don't think)

On Sat, 27 Jul 2024, 19:24 Han-Wen Nienhuys, <hanw...@gmail.com> wrote:

> FWIW, I wrote a version of the comparison in Go that does the entire
> comparison in-memory, without shelling out to any program. I did this
> because it parallelized much better (ie. is faster), but it also means
> you can easily test alternative algorithms.
>
> See here:
> https://github.com/hanwen/lilypond-ci/blob/master/cmd/compare/main.go
>
> Given the example you cite, maybe calculating optical flow would let
> you detect and filter general motion of objects between two frames,
> but from a quick look, it seems involved.
>
> On Sat, Jul 27, 2024 at 6:56 PM Werner LEMBERG <w...@gnu.org> wrote:
> >
> >
> > I've posted a question on StackExchange, searching for a better
> > regtest comparison algorithm
> >
> >
> https://computergraphics.stackexchange.com/questions/14143/search-for-special-image-difference-metric
> >
> >
> >     Werner
> >
>
>
> --
> Han-Wen Nienhuys - hanw...@gmail.com - http://www.xs4all.nl/~hanwen
>
>

Reply via email to