EqualizePiecewise {imagerExtra} | R Documentation |
Piecewise Affine Histogram Equalization
Description
enhance contrast of image by piecewise affine histogram equalization
Usage
EqualizePiecewise(im, N, smax = 255, smin = 0, range = c(0, 255))
Arguments
im |
a grayscale image of class cimg |
N |
number of subintervals of partition. N controls how the input gray levels will be mapped in the output image. if N is large, Piecewise Affine Equalization and Histogram Equalization are very similar. |
smax |
maximum value of slopes. if smax is small, contrast enhancement is suppressed. |
smin |
minimum value of slopes. if smin is large, contrast enhancement is propelled, and saturations occur excessively. |
range |
range of the pixel values of image. this function assumes that the range of pixel values of of an input image is [0,255] by default. you may prefer [0,1]. if you change range, you should change smax. one example is this (smax = range[2] - range[1]). |
Value
a grayscale image of class cimg
Author(s)
Shota Ochi
References
Jose-Luis Lisani, Ana-Belen Petro, and Catalina Sbert, Color and Contrast Enhancement by Controlled Piecewise Affine Histogram Equalization, Image Processing On Line, 2 (2012), pp. 243-265. https://doi.org/10.5201/ipol.2012.lps-pae
Examples
dev.new()
par(mfcol = c(1,2))
boats_g <- grayscale(boats)
plot(boats_g, main = "Original")
EqualizePiecewise(boats_g, 10) %>% plot(., main = "Piecewise Affine Equalization")