Hi,
I have a program that continually takes screenshots of a Nintendo 64 Game from a capture card, it needs to compare the screenshot and determine if it matches another given screenshot.
My original plan was to use the
My SSIM test code:
[Image: zilz5w.png]
[Image: zwf1ph.jpg]
See how the top one is lower quality, the ssim only rates these as a 30% match, however I need my program to recognise these are images of the same thing with certainty.
What else can I do to reliably determine whether two images such as the ones posted above are the same/very similar? I'm open to a new method entirely. It just has to be somewhat quick as my application has to process at 29.97fps, and around half the frame is already spent taking the screenshot.
Thanks!
I have a program that continually takes screenshots of a Nintendo 64 Game from a capture card, it needs to compare the screenshot and determine if it matches another given screenshot.
My original plan was to use the
compare_ssim
method from the skimage.measure
package to determine the structural similarity, and then if the ssim percentage was high enough (i.e 95%) say it's match. This works well in theory, however the quality of capture cards vary and ssim gives poor results in practice.My SSIM test code:
from skimage.measure import compare_ssim import cv2 screenshot_img = cv2.cvtColor(cv2.imread("screenshot.png"), cv2.COLOR_BGR2GRAY) comparison_img = cv2.cvtColor(cv2.imread("comparison.png"), cv2.COLOR_BGR2GRAY) ssim = calc_ssim(screenshot_img, comparison_img) print(ssim)Here are two examples of what I'm trying to determine match.
[Image: zilz5w.png]
[Image: zwf1ph.jpg]
See how the top one is lower quality, the ssim only rates these as a 30% match, however I need my program to recognise these are images of the same thing with certainty.
What else can I do to reliably determine whether two images such as the ones posted above are the same/very similar? I'm open to a new method entirely. It just has to be somewhat quick as my application has to process at 29.97fps, and around half the frame is already spent taking the screenshot.
Thanks!