As before, a perfect compare has partially transparent white overlay (lowlight-color), non-matches has partially transparent red overlay (highlight-color) and now the ignored regions from the mask have partially transparent gray overlay.
For example:
Image1
![Image](http://www.fmwconcepts.com/misc_tests/compare/hat_124_124_417_44.png)
Image2
![Image](http://www.fmwconcepts.com/misc_tests/compare/hat_124_124_417_44_green.png)
Read-Mask:
![Image](http://www.fmwconcepts.com/misc_tests/compare/hat_mask_124_124_417_44.png)
Code: Select all
magick compare -metric rmse -read-mask hat_mask_124_124_417_44.png hat_124_124_417_44.png hat_124_124_417_44_green.png hat_diff_A.png
![Image](http://www.fmwconcepts.com/misc_tests/compare/hat_diff_A.png)
Swapping the two images:
Code: Select all
magick compare -metric rmse -read-mask hat_mask_124_124_417_44.png hat_124_124_417_44_green.png hat_124_124_417_44.png hat_diff_D.png
![Image](http://www.fmwconcepts.com/misc_tests/compare/hat_diff_D.png)
Similarly for subimage-search compares. But the read-mask and associated image must be enclosed in parentheses. Also the ignored region will be red (highlight-color) for the time being.
Code: Select all
magick compare -metric rmse -subimage-search -dissimilarity-threshold 1 logo: \( -read-mask hat_mask_124_124_417_44.png hat_124_124_417_44_green.png \) hat_diff_C.png
![Image](http://www.fmwconcepts.com/misc_tests/compare/hat_diff_C-0.png)
![Image](http://www.fmwconcepts.com/misc_tests/compare/hat_diff_C-1.png)
In IM 7.0.3.10, one can specify the masklight color (only for same sized image compares) which defaults to partially transparent gray.
Code: Select all
magick compare -metric rmse -define compare:masklight-color=blue -read-mask hat_mask_124_124_417_44.png hat_124_124_417_44.png hat_124_124_417_44_green.png hat_diff_B.png
![Image](http://www.fmwconcepts.com/misc_tests/compare/hat_diff_B.png)