diff --git a/docs/CrImage/Operation/HistogramEqualize.html b/docs/CrImage/Operation/HistogramEqualize.html new file mode 100644 index 0000000..0f24e11 --- /dev/null +++ b/docs/CrImage/Operation/HistogramEqualize.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + + + + + CrImage::Operation::HistogramEqualize - cr-image master + + + + + + + + +
+

+ + 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 +
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 + + + + + + + + + + + +

+ + + + Direct including types +

+ + + + + +

+ + + + Defined in: +

+ + + + cr-image/operation/histogram.cr + + +
+ + + + + + + + + + +

+ + + + Instance Method Summary +

+ + + + + + +
+ +
+ + + + + + +

+ + + + Instance Method Detail +

+ +
+
+ + def histogram(channel_type : ChannelType) : Histogram + + # +
+ +
+
+ + [View source] + +
+
+ +
+
+ + def histogram_equalize : self + + # +
+ +
+
+ + [View source] + +
+
+ +
+
+ + def histogram_equalize! : self + + # +
+ +
+
+ + [View source] + +
+
+ + + + + +
+ + + diff --git a/docs/CrImage/Operation/HistogramEqualize/Histogram.html b/docs/CrImage/Operation/HistogramEqualize/Histogram.html new file mode 100644 index 0000000..8f54bd7 --- /dev/null +++ b/docs/CrImage/Operation/HistogramEqualize/Histogram.html @@ -0,0 +1,508 @@ + + + + + + + + + + + + + + + + CrImage::Operation::HistogramEqualize::Histogram - cr-image master + + + + + + + + +
+

+ + class CrImage::Operation::HistogramEqualize::Histogram + +

+ + + + + + + +

+ + + + Overview +

+ +

A histogram of an Image for a specific ChannelType

+ + + + + + + + + + + + + + +

+ + + + Defined in: +

+ + + + cr-image/operation/histogram.cr + + +
+ + + + + + +

+ + + + Constructors +

+ + + + + + +

+ + + + Instance Method Summary +

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +

+ + + + Constructor Detail +

+ +
+
+ + def self.new(image : Image, channel_type : ChannelType) + + # +
+ +
+
+ + [View source] + +
+
+ + + + + + +

+ + + + Instance Method Detail +

+ +
+
+ + def cdf : Hash(UInt8, Float64) + + # +
+ +
+ +

Get the cumulative distribution for the image's histogram

+
+ +
+
+ + [View source] + +
+
+ +
+
+ + def counts : Hash(UInt8, Int32) + + # +
+ +
+ +

Get the raw counts for a given pixel value (0-255) in the image

+
+ +
+
+ + [View source] + +
+
+ +
+
+ + def equalize : Hash(UInt8, UInt8) + + # +
+ +
+ +

Remap the cumalitive distribution of pixels to get a new, more spread out pixel value

+
+ +
+
+ + [View source] + +
+
+ +
+
+ + def normalize : Hash(UInt8, Float64) + + # +
+ +
+ +

Get pixel counts normalized - all values between 0.0 and 1.0

+
+ +
+
+ + [View source] + +
+
+ + + + + +
+ + +