This work began last week for a recognizing task, for which I have to calculate the accuracy of template matching and prefer sub-pixel accuracy if it is possible. The 1st thing I have to consider is the speed of existing approaches I can use in the project. The ones implemented via OpenCV were used for test and it seems acceptable while running on my laptop. Then, I come to the 2nd work, i.e. the accuracy.
Any suggestion would be appreciated.
I don’t know about accuracy but resolution can certainly be gotten. you’d have to assess the accuracy from synthetic data (i.e. resampled/interpolated data where you know the shift).
use the response map from matchTemplate. if that doesn’t suit you, take a look at samples/python/mosse.py. it’s a correlation tracker.
whatever response map you have, it is possible to find the peak, take its neighborhood, assume a parabola or gaussian shape, and calculate the apex of that.