> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EnhanceLocalContrast Method of the ImageDocument Object

This method increases the local contrast of the image. Such preprocessing may increase recognition quality of low contrast images. The images for which this preprocessing method is effective include:

* photos or scans of documents with texture or pictures in the background. With the normal binarization procedure, the characters that coincide with darker areas of background may be lost or recognized unreliably. If you apply this method before recognition, such areas are detected, and contrast is increased, with the result that after binarization the characters stand out more distinctly.

  <Accordion title="See the illustration">
    <img src="https://mintcdn.com/abbyy/lsETHFYUFiongXSm/images/fine-reader/engine/enhance1.gif?s=e4c2976d83d4686e1d973b2e09c60f23" alt="enhance1" width="386" height="127" data-path="images/fine-reader/engine/enhance1.gif" />

    This picture is low-contrast as a whole, and in the areas where the background is green the text can be lost. Applying EnhanceLocalContrast before recognition helps to retrieve, for example, the issue date field quite reliably.
  </Accordion>

  * photos or scans of documents with highly colorful background or text highlighting.

    <Accordion title="See the illustration">
      <img src="https://mintcdn.com/abbyy/lsETHFYUFiongXSm/images/fine-reader/engine/enhance2.gif?s=bce5bcf87dae51ea2a79cbe10550a76c" alt="enhance2" width="450" height="150" data-path="images/fine-reader/engine/enhance2.gif" />

      On this picture the column highlighted in dark-blue is recognized poorly. But if this method is applied during preprocessing, the recognition quality improves.
    </Accordion>

    We recommend that you call this method at the beginning of a preprocessing procedure (before orientation and resolution detection, but after the image cropping).

    <Warning>
      This method can be used for color and gray images only.
    </Warning>

    ## Syntax

    ### C++

    ```cpp theme={null}
    HRESULT EnhanceLocalContrast();
    ```

    ### C\#

    ```
    void EnhanceLocalContrast();
    ```

    ### Visual Basic .NET

    ```vb theme={null}
    Sub EnhanceLocalContrast()
    ```

    ## Return values

    This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

    ## See also

    [ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument)
