Normalized cross-correlation with alpha-masked templates for object detection

How to make 2d game recognition using classical computer vision approach


Normalized cross-correlation

Normalized cross-correlation

Implementing normalized cross-correlation with linear filtering

Linear image filtering
Numerator brackets for expanding
Denominator brackets for expanding
Transformed formula of normalized cross-correlation
Template with zero mean
Normalized cross-correlation
Enumerator parts
Denominator parts
Normalized cross-correlation in the new variables

Making Tux recognition

Template image for Tux searching
RGB screenshot for Tux search
Recognition result

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store