Providing binarization of grayscale images using the following algorithms. Four types of algorithms are provided, from simple ones to advanced ones that determine the threshold by feedback from recognition results.
  1. In the case of non-uniform lighting, shading correction binarization.
  2. The fastest binarization using the simplest discriminant analysis (Otsu's method).
  3. If the foreground (black) and background (white) regions are separated, the threshold is set to the luminance value where the variance within each region is the smallest and the variance between black and white is the largest.
  4. Binarization suitable for monochrome documents and line drawings.
  5. In cases where the contrast between the foreground and background is high, the threshold tends to shift towards the background, causing characters and line drawings to become blurred in discriminant analysis binarization.
    Adjust the threshold by considering the balance of the number of foreground and background pixels and the histogram in the vicinity of the threshold.
  6. Binarization for character recognition using the confidence of the actual recognition results.
  7. Although it takes longer processing time, it adopts a threshold that maximizes the validity of the actual recognition results.