I found many ways to detect different shapes. But hard luck when I am going for a physical object. From what I read we should have a black border around images to make a pat
Have you considered OpenCV for detecting and tracking object? Take a look at Find Objects with a Webcam tutorial (C++ / Qt). OpenCV is available for Android - OpenCV 4 Android.