[RESOLVED] NCC subimage-search
Posted: 2014-05-06T09:26:37-07:00
Metric NCC doesn't seem to work with subimage-search. As always, the bug may be in my understanding.
Testing on IM v 6.8.9-0 on Windows 8.1. Create large and small sample images:
RMSE search:
The result is good.
NCC search:
This is (I think) a bad result.
If I understand correctly, NCC result 1.0 (or greater, huh?) is a perfect match, where 0.0 isn't. But subimage-search finds the minimum score.
Testing on IM v 6.8.9-0 on Windows 8.1. Create large and small sample images:
Code: Select all
%IM%convert ^
-size 400x300 xc: ^
-sparse-color barycentric "0,0 #88f 399,0 #44f 0,299 #2f2 399,299 #484" ^
si_large.png
%IM%convert ^
-size 50x50 xc:#0aa ^
si_sub.png
Code: Select all
%IM%compare ^
si_large.png si_sub.png ^
-metric RMSE ^
-subimage-search ^
NULL:
12068.7 (0.184156) @ 182,140
NCC search:
Code: Select all
%IM%compare ^
si_large.png si_sub.png ^
-metric NCC ^
-subimage-search ^
NULL:
0 @ 0,20
If I understand correctly, NCC result 1.0 (or greater, huh?) is a perfect match, where 0.0 isn't. But subimage-search finds the minimum score.