Functions to enhance contrast of scanned images in OCaml (Benchmark)