Histograms are a tool used in photography to visualise the tonal distribution of a picture.
1 2 3 4 5
image, such as on read by [image::image_read]
For each channel (red, green, blue), the histogram displays on the tone (from 0 to 255) on the x axis, and the pixel count on the y axis.
The three channels can be combined together to form the brightness histogram.
The 'image_histogram_data' function makes a 'tibble' with 4 columns : - 'tone' : sequence from 0 to 255. - 'red', 'green', 'blue' : pixel count for each channel.
The 'image_histogram_brightness' makes a 'ggplot' object showing the brightness histogram.
The 'image_histogram_rgb' makes a 'ggplot' object showing the histograms for each channel.
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.