A
A
anya_hacker2022-03-12 22:38:59
Java
anya_hacker, 2022-03-12 22:38:59

How to find out the boundaries of an object in a photo in Android?

There is an application plan for Android.
Football field - background, game background. This is just a photograph.
622cf593b1123392514625.png
There is a white strip in the middle of the screen, and a circle in the middle.
A button should move along this line, and if the player pressed this button when it was in this white circle, then the player won.
But if the line and the circle are just a photograph, i.e. on different phones (on different screen sizes) they will have different positions, it is impossible to understand where the circle has already begun.
You can move the button along the line: it is enough to know the size of the screen and divide it in half. But:
How to understand that the button is inside a white circle, if the football field and the circle are all just one photo as a background in the application?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question