---
title: areaLogarithmicHistogram()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/arealogarithmichistogram()
---

# areaLogarithmicHistogram()

Returns a logarithmic histogram of a specified area of the image.

## Declaration

```swift
class func areaLogarithmicHistogram() -> any CIFilter & CIAreaLogarithmicHistogram
```

## Return Value

Return Value A 1-pixel-high image containing the calculated histogram.

## Discussion

Discussion This filter calculates histograms of the red,``green,``blue, and alpha colors for the specified area of an image. A base two-logarithm function is applied to the values before binning. The count property controls the number of bins (or width) of the histogram. The histogram is scaled so that all the values sum to scale. The following code creates a filter that results in a 1-pixel-tall image with a width of 256. The pixel color components contain the logarithmic histogram values: func areaLogarithmicHistogram(inputImage: CIImage) -> CIImage {     let filter = CIFilter.areaLogarithmicHistogram()     filter.inputImage = inputImage     filter.count = 256     filter.scale = 15     filter.extent = CGRect(         x: inputImage.extent.width/2-250,         y: inputImage.extent.height/2-250,         width: 500,         height: 500)     return filter.outputImage! } Use the histogramDisplay() filter to display the histogram: func logarithmicHistogramDisplay(inputImage: CIImage) -> CIImage {     let filter = CIFilter.histogramDisplay()     filter.inputImage = areaLogarithmicHistogram(inputImage: inputImage)     filter.highLimit = 1     filter.height = 100     filter.lowLimit = 0     return filter.outputImage! }

## See Also

### Filters

- [areaAverage()](coreimage/cifilter-swift.class/areaaverage().md)
- [areaHistogram()](coreimage/cifilter-swift.class/areahistogram().md)
- [areaMaximum()](coreimage/cifilter-swift.class/areamaximum().md)
- [areaMaximumAlpha()](coreimage/cifilter-swift.class/areamaximumalpha().md)
- [areaMinimum()](coreimage/cifilter-swift.class/areaminimum().md)
- [areaMinimumAlpha()](coreimage/cifilter-swift.class/areaminimumalpha().md)
- [areaMinMax()](coreimage/cifilter-swift.class/areaminmax().md)
- [areaMinMaxRed()](coreimage/cifilter-swift.class/areaminmaxred().md)
- [columnAverage()](coreimage/cifilter-swift.class/columnaverage().md)
- [histogramDisplay()](coreimage/cifilter-swift.class/histogramdisplay().md)
- [kMeans()](coreimage/cifilter-swift.class/kmeans().md)
- [rowAverage()](coreimage/cifilter-swift.class/rowaverage().md)
