---
title: "HistogramEqualize Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_HistogramEqualize.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# HistogramEqualize Class
 
This class enables you to apply histogram equalization algorithm.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public NotInheritable Class HistogramEqualize _Inherits PerChannelBitmapTransform
```
 
```csharp
public sealed class HistogramEqualize : PerChannelBitmapTransform
```
 
## Remarks
  
Histogram equalization algorithm is used to automatically enhance a contrast of the image. As usual it makes the image too posterized, that's why it is seldom used to with photos (you should use [Contrast](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Contrast.htm.md) effect with [Auto](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_Contrast_Auto.htm.md) property set to **true**). However it suits for scientific tasks (as a preparation before applying some specific algorithm like vectorization, recognition, etc).
 
Main idea of this algorithm is to build such look-up table (LUT) which makes the bitmap histogram equalized (all histogram entries are equal each other). Actually the histogram is never equalized absolutely, however this algorithm makes it as much as possible. After that this LUT is applied using [ApplyLut](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_ApplyLut.htm.md) class.
 
This class enables you to use not only histogram of the source bitmap, but any other histogram too. In this case algorithm will build the LUT for this histogram, but apply this LUT on the source bitmap. To specify another histogram, use property [Histogram](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_HistogramEqualize_Histogram.htm.md). If you want to get histogram from the bitmap automatically, set **null** to this property.
 
As long as this class is inherited from [PerChannelBitmapTransform](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_PerChannelBitmapTransform.htm.md) class, you can equalize histogram for specific channels. Just use [Channels](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_PerChannelBitmapTransform_Channels.htm.md) property, [SelectAllChannels()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_PerChannelBitmapTransform_SelectAllChannels.htm.md), and [DeselectAllChannels()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_PerChannelBitmapTransform_DeselectAllChannels.htm.md) methods in the common way for this.
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.SyncHandler](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_SyncHandler.htm.md)
        - [Aurigma.GraphicsMill.UnitConverterHandler](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_UnitConverterHandler.htm.md)
            - [Aurigma.GraphicsMill.Transforms.BitmapTransform](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_BitmapTransform.htm.md)
                - [Aurigma.GraphicsMill.Transforms.MaskedBitmapTransform](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_MaskedBitmapTransform.htm.md)
                    - [Aurigma.GraphicsMill.Transforms.PerChannelBitmapTransform](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_PerChannelBitmapTransform.htm.md)
                        - Aurigma.GraphicsMill.Transforms.HistogramEqualize
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_288.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_HistogramEqualize.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_289.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Histogram.htm.md)
 
## Supported Pixel Formats

| Member Name | Description |
| --- | --- |
| **Format8bppGrayScale** | 8 bits per pixel. Grayscale. 8 bits are used for luminosity level. |
| **Format16bppGrayScale** | 16 bits per pixel. Grayscale. All 16 bits are used for luminosity level (extended pixel format). |
| **Format16bppAGrayScale** | 16 bits per pixel. Grayscale with alpha channel. 8 bits are used for alpha channel and other 8 bits are used for luminosity level. |
| **Format32bppAGrayScale** | 32 bits per pixel. Grayscale with alpha channel. 16 bits are used for alpha channel and other 16 bits are used for luminosity level (extended pixel format). |
| **Format24bppRgb** | 24 bits per pixel. RGB. 8 bits each are used for the red, green, and blue components. |
| **Format32bppRgb** | 32 bits per pixel. RGB. 8 bits each are used for the red, green, and blue components. The rest 8 bits are unused. |
| **Format32bppArgb** | 32 bits per pixel. RGB with alpha channel. 8 bits each are used for the alpha, red, green, and blue components. |
| **Format48bppRgb** | 48 bits per pixel. RGB. 16 bits each are used for the red, green, and blue components (extended pixel format). |
| **Format64bppArgb** | 64 bits per pixel. RGB with alpha channel. 16 bits each are used for the alpha, red, green, and blue components (extended pixel format). |
| **Format32bppCmyk** | 32 bits per pixel. CMYK. 8 bits each are used for the cyan, magenta, yellow, and black components. |
| **Format64bppCmyk** | 64 bits per pixel. CMYK. 16 bits each are used for the cyan, magenta, yellow, and black components (extended pixel format). |
| **Format80bppAcmyk** | 80 bits per pixel. CMYK with alpha channel. 16 bits each are used for the alpha, cyan, magenta, yellow, and black components (extended pixel format). |
 
## See Also

### Reference

- [HistogramEqualize Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Transforms_HistogramEqualize.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
