---
title: "vImageEqualization_ARGB8888(_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vimageequalization_argb8888(_:_:_:)"
---

# vImageEqualization_ARGB8888(_:_:_:)

Performs histogram equalization on an 8-bit-per-channel, 4-channel interleaved buffer.

## Declaration

```swift
func vImageEqualization_ARGB8888(_ src: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ flags: vImage_Flags) -> vImage_Error
```

## Parameters

- `src`: The source vImage buffer.
- `dest`: A pointer to the destination vImage buffer structure. You’re responsible for filling out the doc://com.apple.accelerate/documentation/Accelerate/vImage_Buffer/height, doc://com.apple.accelerate/documentation/Accelerate/vImage_Buffer/width, and doc://com.apple.accelerate/documentation/Accelerate/vImage_Buffer/rowBytes fields of this structure, and for allocating a data buffer of the appropriate size. On return, the data buffer this structure points to contains the destination image data. When you no longer need the data buffer, deallocate the memory to prevent memory leaks.
- `flags`: The options to use when performing the operation. If your code implements its own tiling or its own multithreading, pass doc://com.apple.accelerate/documentation/Accelerate/kvImageDoNotTile; otherwise, pass doc://com.apple.accelerate/documentation/Accelerate/kvImageNoFlags. To specify that the function doesn’t apply the operation to the alpha channel, set the doc://com.apple.accelerate/documentation/Accelerate/kvImageLeaveAlphaUnchanged flag.

## Return Value

Return Value kvImageNoError; otherwise, one of the error codes in Data Types and Constants.

## Discussion

Discussion Histogram equalization transforms an image so that its histogram is more uniformly distributed across the entire range of values. The operation stretches dense parts of the histogram, where contrast is low, and condenses sparse parts of the histogram, where contrast is high. A truly uniform histogram is one in which each histogram bin contains the same value, that is, its cumulative histogram is a diagonal line. The vImage histogram equalization functions approximate that truly uniform histogram.

## See Also

### Related Documentation

- [Enhancing image contrast with histogram manipulation](accelerate/enhancing-image-contrast-with-histogram-manipulation.md)
- [Specifying histograms with vImage](accelerate/specifying-histograms-with-vimage.md)

### Equalizing a histogram

- [vImageEqualization_Planar8(_:_:_:)](accelerate/vimageequalization_planar8(_:_:_:).md)
- [vImageEqualization_PlanarF(_:_:_:_:_:_:_:)](accelerate/vimageequalization_planarf(_:_:_:_:_:_:_:).md)
- [vImageEqualization_ARGBFFFF(_:_:_:_:_:_:_:)](accelerate/vimageequalization_argbffff(_:_:_:_:_:_:_:).md)
