document-photo-auto-threshold stackoverflow.com: Automatic contrast and brightness adjustment of a color photo of a sheet of paper with OpenCV