Attila Kis
Attila Kis

Reputation: 533

Python: Recognize a part of an Image, and get coordinates

I have a problem. I have a screenshot of my screen, and want to recognize a simple button. (I know how the button is looking, and what to find). How to do it? Using PIL? I just want coordinates.

Upvotes: 2

Views: 2590

Answers (1)

gbtimmon
gbtimmon

Reputation: 4322

I think OpenCV will be a easy answer -- Train an image detector on your button and it will return coordinates. I would suggest a cascade classifier, even though it might be overkill for find a button (Its usually used for face recognition) the library support is very good so it will make your life easy rather then homebrewing something. Resource use is very good also it is designed to run with very little CPU and memory.

http://opencv.org/

http://docs.opencv.org/2.4/doc/tutorials/objdetect/table_of_content_objdetect/table_of_content_objdetect.html#table-of-content-objdetect

Upvotes: 2

Related Questions