import sys from PIL import Image import numpy as np names=["NEW GAME","LOAD GAME","TUTORIAL","OPTIONS","EXTRAS"] ys=[166,241,315,390,465] for p in sys.argv[1:]: a=np.asarray(Image.open(p).convert("L"),dtype=float) # the focus RING sits in the gutter left of the label; nothing else is bright there v=[a[y-20:y+20,500:542].max() for y in ys] i=int(np.argmax(v)) print(f"{p.split('/')[-1]:26s} -> {names[i]:10s} " + " ".join(f"{x:5.0f}" for x in v))