Identification of an animation frame in a video feed

My goal is to identify a single frame within an animation (320 x 240 resolution) running on a small monitor being filmed by a webcam.

  1. Frame is known in advanced, it is a high quality image (not a photo) - actual image extracted from animation.
  2. Video is a webcam filming a screen displaying the animation in a high resolution (640x480).
  3. Frame to actual frame in photo size ratio is unknown due to webcam alignment.

I have tried using Template Matching in order to tackle this with no success - getting too many false negatives or false positives.
Even tried various resizing of the frame (template mage) in order to better match the size of the webcam produced photos with little success.

Any ideas how to go about doing this ?

Thank you

feature matching, estimate homography, to rectify the camera view so it aligns with the reference.

run samples/python/

when you have that working, you can try simply taking pixelwise differences for a start.

1 Like

Took @crackwitz advise and implemented Feature Matching using Homography using - OpenCV Python Tutorial
and I get almost perfect results (just need to tweak thresholds)

Thank you