Next: , Previous: , Up: Image Processing   [Contents][Index]


Histogram

Other Guile-CV histogram procedures and methods.

Procedures

im-histogram
Procedure: im-histogram image [#:subtitle “Untitled”]

Returns two values: (1) an image; (2) a list (or a list of list) of significant values for image: one list if image is GRAY, a list of list of values per channel if image is RGB.

The returned image is composed of a header (title, #:subtitle), either the GRAY or the RGB channel histogram(s) for image and a footer, which is a table containg, for each channel, the following values: mean, standard deviation, minimum, maximum, the mode11 followed by its value.

Here below, the call sequence and the histogram for the GRAY image sinter.png given along with Guile-CV documentation and examples:

scheme@(guile-user)> (im-load "sinter.png")
$32 = (212 128 1 (#f32(25.0 39.0 50.0 52.0 51.0 45.0 # …)))
scheme@(guile-user)> (im-histogram $32 #:subtitle "sinter.png")
$34 = (282 271 1 (#f32(255.0 255.0 255.0 255.0 255.0 # …)))
$35 = (27136 163.346 75.081 0 243 215 727)
sinter-histogram

Note that histogram images returned by im-histogram have no borders, the above histogram has been padded - using (im-padd $34 1 1 1 1 #:color '(96 96 96)) - for better readability, otherwise the title above and the table below would look as if they were not centered.


Footnotes

(11)

The mode is the integer corresponding to the histogram entry that received the maximum of hits, and the value displayed in parens precisely is the number of hits.