Page 1 of 1

[RESOLVED] Suggestion For Enhancement

Posted: 2016-06-02T15:06:09-07:00
by fmw42
For reference see the difference processing at viewtopic.php?f=1&t=29823

The idea is to add a new define or threshold argument to compare so that the (red) overlay of where there are differences (in the first output) is thresholded first so as to remove some of the very small differences from the overlay. (No change to the correlation image).

This is not a very high priority for me. Just a nice additional feature to match the kind of processing the OP's js reference is doing, so as to save all the extra additional -compose difference post-processing.

Re: Suggestion For Enhancement

Posted: 2016-06-02T15:45:44-07:00
by snibgo
Isn't this already provided by "-fuzz"?

For example:

Code: Select all

convert rose: -evaluate pow 0.9 r.png

compare -metric RMSE  -subimage-search rose: r.png d0.png

compare -metric RMSE  -fuzz 1% -subimage-search rose: r.png d1.png

compare -metric RMSE  -fuzz 3% -subimage-search rose: r.png d3.png
The numbers we get out are the same (because metric RMSE isn't sensitive to fuzz), but the output images d0, d1 and d3.png are different (the numbers of red pixels decreases).

Re: [RESOLVED] Suggestion For Enhancement

Posted: 2016-06-02T16:13:17-07:00
by fmw42
Good catch, snibgo. I had not connected fuzz with that feature. The only difference is that the image gets muted (lower saturation) before the overlay is added.

Code: Select all

compare -metric rmse -fuzz 5% People.jpg People2.jpg people_compare4.png
Image

But that can be fixed using the lowlight-color:

Code: Select all

compare -metric rmse -fuzz 5% -lowlight-color none People2.jpg people_compare5.png
Image

Unfortunately, adding -alpha off, does not turn off the fully opaque alpha channel. I had to revert to

Code: Select all

compare -metric rmse -fuzz 5% -lowlight-color none People.jpg People2.jpg miff:- | convert - -alpha off people_compare6.png
Image