EqualizeADP: Adaptive Double Plateaus Histogram Equalization

Description Usage Arguments Value Author(s) References Examples

View source: R/adaptive_double_plateaus_histogram_equalization.R

Description

compute the paramters, t_down and t_up, and then apply double plateaus histogram equalization.

Usage

1
2
EqualizeADP(im, n = 5, N = 1000, range = c(0, 255),
  returnparam = FALSE)

Arguments

im

a grayscale image of class cimg

n

window size to determine local maximum

N

the number of subintervals of histogram

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].

returnparam

if returnparam is TRUE, returns the computed parameters: t_down and t_up.

Value

a grayscale image of class cimg or a numericvector

Author(s)

Shota Ochi

References

Kun Liang, Yong Ma, Yue Xie, Bo Zhou ,Rui Wang (2012). A new adaptive contrast enhancement algorithm for infrared images based on double plateaus histogram equalization. Infrared Phys. Technol. 55, 309-315.

Examples

1
2
3
4
g <- grayscale(dogs)
layout(matrix(1:2, 1, 2))
plot(g, main = "Original")
EqualizeADP(g) %>% plot(main = "Contrast Enhanced")

Example output

Loading required package: imager
Loading required package: magrittr

Attaching package:imagerThe following object is masked frompackage:magrittr:

    add

The following objects are masked frompackage:stats:

    convolve, spectrum

The following object is masked frompackage:graphics:

    frame

The following object is masked frompackage:base:

    save.image

imagerExtra documentation built on May 2, 2019, 1:44 p.m.