0

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.

just_user
  • 11,769
  • 19
  • 90
  • 135
  • Wouldn't a simple luminosity analysis on the image already imply a possible glare?(pardon my lack of knowledge if this is not the case) I know this could be very primitive solution, but you can maybe divide the image to blocks and apply luminosity analysis on each block? There are many solutions for analysing luminosity with CameraX but let me know If you can't find anything and you need it. – Orcun Sep 08 '21 at 09:16
  • I didn't consider that, could work! – just_user Sep 08 '21 at 10:02

0 Answers0