module CrImage::Operation::HistogramEqualize
Overview
Provides methods for histogram and histogram equalization. Follows method outlined here
If an image is particularly dark or particularly bright with low contrast, the Operation::Contrast#contrast
method will only
make the image darker or lighter. For images like these, equalizing the image along its histogram will produce better results.
![A dark image of Mt. Fuji](https://raw.githubusercontent.com/Vici37/cr-image/master/docs/images/mt_fuji.jpg)
image.contrast(10).save("contrast.jpg")
image.histogram_equalize.save("equalized.jpg")
![Darker image of Mt. Fuji](https://raw.githubusercontent.com/Vici37/cr-image/master/docs/images/mt_fuji_contrast_10.jpg)
![A higher contrast image of Mt. Fuji](https://raw.githubusercontent.com/Vici37/cr-image/master/docs/images/mt_fuji_histogram_equalized.jpg)
This method does not work well when a given method has a bimodal distribution of color pixels. For example:
![Woman in black turtleneck on white background in grayscale](https://raw.githubusercontent.com/Vici37/cr-image/master/docs/images/gray_sample.jpg)
![Highly pixelated and poor quality photo of woman in black turtleneck on white background in grayscale](https://raw.githubusercontent.com/Vici37/cr-image/master/docs/images/gray_sample_equalized.jpg)
Direct including types
Defined in:
cr-image/operation/histogram.crInstance Method Summary
- #histogram(channel_type : ChannelType) : Histogram
- #histogram_equalize : self
- #histogram_equalize! : self