SPE: Correct inhomogeneous background of image by solving Screened Poisson Equation
Description
Correct inhomogeneous background of image by solving Screened Poisson Equation
Usage
SPE(im, lamda, s = 0.1, range = c(0, 255))
Arguments
im
a grayscale image of class cimg
lamda
this function corrects inhomogeneous background while preserving image details. lamda controls the trade-off. when lamda is too large, this function acts as an edge detector.
s
saturation percentage. this function uses BalanceSimplest. s is used as both sleft and sright. that's why s can not be over 50%.
range
this function assumes that the range of pixel values of of an input image is [0,255] by default. you may prefer [0,1].
Value
a grayscale image of class cimg
References
Jean-Michel Morel, Ana-Belen Petro, and Catalina Sbert, Screened Poisson Equation for Image Contrast Enhancement, Image Processing On Line, 4 (2014), pp. 16-29. https://doi.org/10.5201/ipol.2014.84