apologies if this question is not composed correctly I can revise if necessary.
I am essentially doing template matching from a large array of candidate images. I am actually interested in the 'best' available match - best being subjective, but ultimately what a human would likely perceive as closest (smooth outline, retaining shape, etc).
I have done a lot of work on identifying close matches, but Hu and Zernike scoring aren't getting me that final step.
The image I have attached shows (I just drew these, to illustrate the point, they are not actual data) a template and two matches showing the deviation from the templates contour.
The red image shows (theoretical) deviations for a lower quality match and green a better quality match. Essentially I am defining the lower quality match as more extreme swings in the deviation from my templates contour - which I am trying to illustrate on my (poorly drawn) graph - I'm not sure how to extract this data, or analyze it effectively - just considering it.
I am really looking for advice or concepts on how I can refine my 'top 500' hu scored matches to get the best defined shape match (or, at least improve my ranking). My actual data is a similar complexity ie not photos and I am certainly seeing some better matches with a worst hu score in my current ranking. I'm primarily using Python/C++ and OpenCV etc.
Any advice ?