# Histogram Equalization

Histogram equalization increases the global contrast of an image, especially when the majority of histogram bins are in a small range. After performing histogram equalization, the image intensities are more evenly distributed throughout the histogram. This can be very helpful, especially with under- or over-exposed images.

<div align="left"><figure><img src="/files/w8IEWqpTJOmBeDJkgnuI" alt="The Histogram Equalization tool."><figcaption><p>The Histogram Equalization tool.</p></figcaption></figure></div>

**Equalize RGB channels**\
This performs histogram equalization on each red, green and blue channel individually. In some cases, this can lead to an unwanted color shift.

**Equalize Luminance channel**\
After converting the image to the HSL color space, histogram equalization is done on the luminance channel (L) only. Then the image is converted back to RGB.

**Equalize Value channel**\
This converts the image to HSV color space, then does histogram equalization on the value channel (V) only. The image is then converted back to RGB.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://astra-image.gitbook.io/astra-image-6.0/processing-tools/histogram-equalization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
