SPE {imagerExtra}R Documentation

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

Author(s)

Shota Ochi

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

Examples

dev.new()
par(mfcol = c(1,2))
boats_g <- grayscale(boats)
plot(boats_g, main = "Original")
SPE(boats_g, 0.1) %>% plot(main = "Screened Poisson Equation")

[Package imagerExtra version 1.3.2 Index]