A filter that computes the histogram of an image.
- iOS 9.0+
- macOS 10.13+
- tvOS 9.0+
- Metal Performance Shaders
Listing 1 shows how you can create a histogram filter to calculate the histogram of the
source. The filter is passed an instance of
MPSImage that specifies information to compute the histogram for the channels of an image. After encoding,
histogram contains the histogram information and can be used for further operations such as equalization or specification.