+ 1
How to get the coordinates of an element in a Screenshot with python using OpenCv module?
To be more precise, I want to get the coordinates of an element that could be (an image inside an image) or an element that I would define for example the coordinates of the sun in the picture, etc.. So how I want to proceed is taking a Screenshot And using the module OpenCv to detect the element and make a program to get the coordinates. ( If you know other modules to do my request there is no problem but it has to be in python) I Know that there are some pre-made functions to get the coordinates but I don't know how to do this altogether. If someone could help me with this problem I would be very grateful. Thank you for your time! Have a great day! Edit : Don't forget to +1 to help me even if you don't reply.
4 Respuestas
+ 2
Just use pyautogui.locateCenterOnScreen("/path/to/screen/shot/")
it returns the coordinates of the picture if its on the screen hope this helps cause i dont know anything about open CV
+ 1
Thank you, I will try this and let you know :)
+ 1
Yeah it works perfectly fine thank you very much!!
0
Anytime