I'm using googles cameraX library to scan some documents and to help the user to take the best possible image I would like to detect if there is any glare live in the camera. With all searches I have made most suggestions point to the OpenCv library which I don't want to import into my project just for detecting glare. Does anyone know any algorithm for glare detection in an image?
The closest answer I have found is this answer, but I'm not really sure how to effectively put that into practice in android using kotlin.