python - Image inspection before OCR preprocessing -


we're running user-submitted images through ocr , our ocr application (third party) displays warning image being bright or dark. considering writing script inspect image before goes ocr , rejecting if it's bright or dark.

however, don't have clear understanding of "brightness" means in context. there actual unit of brightness? contrast ratio? else? there optimal or "normal" ranges of values?

fyi working in python-- use pil (or opencv, if necessary).


Comments