Hi my friends. We are making an android app related to document management with special notebook and we need to add some capabilities to an existing but very initial android app (made in Java with Android Studio). The capability i need its the ability to open the camera with a button (already placed in a bottom app bar, material2), but i need a special camera function, i need the camera detects dinamically a document border, and read some QR code placed in a page, the documents border must appear as an overlay over the camera image, and should permit the user to modifiy the selection once captured using some anchors (in case the camera misdetects some border). The captured image, once the user confirms the capture, should auto rotate to a straight position if the image its inclined. The output of this feature should be the captured image, straightened (eliminating skew), framed by the border detection feature or corrected by the user. Additionally the QR code embedded in the page, if any, must be available to the app along with the image captured for further treatment and storage. We only need add features, no the full app, which we will continue to finish by ourselves.