module

CrImage::Operation::HistogramEqualize

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
image.contrast(10).save("contrast.jpg")
image.histogram_equalize.save("equalized.jpg")
Darker image of Mt. Fuji A higher contrast image of Mt. Fuji

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 Highly pixelated and poor quality photo of woman in black turtleneck on white background in grayscale

Instance methods

histogram(channel_type : ChannelType) : Histogram
Source
histogram_equalize
Source
histogram_equalize!
Source

Nested types