I am working on an Android app that detects squared/rectangular objects, captures their image and auto-crops the image. I am able to detect the object, however I am having difficulty linking the openCV detection with Camera2 API, or even with the original Android Camera API for that matter. I have looked online but I feel lost when it comes to this junction. How can I link openCV camera with the Android Camera2 API and capture the object that is being detected?
I can provide code if necessary.