Page 1 of 1

Subimage search - getting error ?

Posted: 2017-11-02T01:17:51-07:00
by bipsen
Hi

When trying to search for a sub-image in a larger image, I get an error from Magick.exe (windows).

Command called as:

magick compare -subimage-search -metric rmse c:\temp\Coin-unknown.png c:\temp\Coin-Sub5.png
compare: `c:\temp\Coin-unknown.png' @ error/compare.c/CompareImagesCommand/937.

The version output:

Version: ImageMagick 7.0.2-5 Q16 x64 2016-07-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

The subimage is 14x11 pixels, the larger is 20x30 pixels...


Tried to update to:
Version: ImageMagick 7.0.7-9 Q16 x64 2017-10-31 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps raw rsvg tiff webp xml zlib


The error still pops up - another line, though:
compare: `c:\temp\Coin-unknown.png' @ error/compare.c/CompareImagesCommand/1155.


Any idea what could be the issue ?

Re: Subimage search - getting error ?

Posted: 2017-11-02T02:14:54-07:00
by bipsen
Found problem - an output name is needed...

Re: Subimage search - getting error ?

Posted: 2017-11-02T05:00:26-07:00
by snibgo
Yes, that's it. You need two inputs and an output. The output can be "NULL:".

Re: Subimage search - getting error ?

Posted: 2019-02-11T01:55:01-07:00
by shen
What do you mean for "an output name is needed"?

I get 1155 for this command:

> magick compare -verbose a.png b.png

Output:
a.png PNG 398x452 398x452+0+0 8-bit sRGB 21329B 0.016u 0:00.008
compare: `a.png' @ error/compare.c/CompareImagesCommand/1155.

Re: Subimage search - getting error ?

Posted: 2019-02-11T05:20:25-07:00
by snibgo
shen wrote:magick compare -verbose a.png b.png
You have two inputs but no output. You need an output. The output can be "NULL:". Like this:

Code: Select all

magick compare -verbose a.png b.png NULL: