Page 1 of 1
Processing time concern
Posted: 2013-01-12T14:08:46-07:00
by cambob
convert other.jpg -crop 100x100+100+100 crop.jpg
This command takes 90 seconds to complete, master.jpg is 640x480 24 bit, is the 24 bit the problem? if so how do i reduce?
compare -metric RMSE master.jpg crop.png -subimage-search null:
Re: Processing time concern
Posted: 2013-01-12T14:27:53-07:00
by snibgo
Subimage searches take a long time. IM needs to examine every position the subimage might be on the full image, then do a pixel-by-pixel comparison.
You can massively increase performance by:
(1) cropping a smaller area for the subimage;
(2) cropping master.jpg, and searching within that.
Re: Processing time concern
Posted: 2013-01-12T14:28:56-07:00
by snibgo
Or (3) resizing both master.jpg and other.jpg.
Re: Processing time concern
Posted: 2013-01-12T17:42:25-07:00
by fmw42
In one of my scripts, I was able to speed it up by reducing both image sizes doing a search and then doing it again at full resolution bu limiting the search to a subsection of the original image in the neighborhood of the first match.
Re: Processing time concern
Posted: 2013-01-22T18:29:13-07:00
by anthony
Take a look at the very raw bare bones "overlap" script (for merging computer generated images which has small overlaps).
It takes smaller crops of one images to find them on the first (typically larger) image. It has room for improvement in finding good sub-sections to crop for the search, and these have been noted in comments in the script.
http://www.imagemagick.org/Usage/scripts/overlap
See example in the discussion...
viewtopic.php?f=1&t=22526