Player earning coins


How do I know when a player hits a coin in (OpenCV, Python)? The idea is when a player hits a coin, the score should increase by +1.

Please advise.



OpenCV is for computer vision.

for game mechanics programming, use a different library.

I am developing a game using OpenCV

Ok, I can display an image using:

cv2.imshow(“I1”, img)

How do I stop displaying it?