RNotes | EBImage


library(EBImage)

Equalize the image histogram to a specified range and number of levels.

Individual channels of color images and frames of image stacks are equalized separately, which results in a high-contrast image, but usually with color distortion.

Grayscale example

x = readImage(system.file('images', 'cells.tif', package='EBImage'))
display(x, all=TRUE)

hist(x)
grid()

y = equalize(x)
hist(y)
grid()

display(y, title='Equalized Grayscale Image', all=TRUE)

Color example

x = readImage(system.file('images', 'sample-color.png', package='EBImage'))
display(x)

hist(x)
grid()

y = equalize(x)
hist(y)
grid()

display(y, title='Equalized Grayscale Image')


packageVersion("EBImage")
## [1] '4.8.2'

efg
2015-01-18 1944