I am using C# code to launch an emulator (Memu) and open an application using ADB. I need to find a reliable way to recognize buttons on the screen to perform actions and decision-making.
So far, I’ve tried the following methods:
OpenCV: I used OpenCV to match a screenshot and a template of the button. However, this method doesn’t seem reliable enough. I experimented with different threshold values (0.5-0.8), but the results were inconsistent. OpenCV finds the wrong button or doesn’t find it at all.
Tesseract: I found out about Tesseract for text recognition but haven’t tried it yet. The limitation here is that not every button has text, so it might not be a comprehensive solution.
My Question:
Is there any other efficient way to recognize elements (especially buttons) on the screen in an emulator using C#?
Kris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.