extrema2dC {EMD} | R Documentation |
Finding Local Extrema
Description
This function finds the bidimensional local extrema based on the equivalence relation between neighboring pixels.
Usage
extrema2dC(z, nnrow=nrow(z), nncol=ncol(z))
Arguments
z |
matrix of an input image |
nnrow |
the number of row of an input image |
nncol |
the number of column of an input image |
Details
This function finds the bidimensional local extrema based on the equivalence relation between neighboring pixels. See Kim et al. (2012) for detalis.
Value
minindex |
index of minima. Each row specifies index of local minimum. |
maxindex |
index of maxima. Each row specifies index of local maximum. |
References
Kim, D., Park, M. and Oh, H.-S. (2012) Bidimensional Statistical Empirical Mode Decomposition. IEEE Signal Processing Letters, 19, 191–194, doi: 10.1109/LSP.2012.2186566.
See Also
extrema
, , extractimf2d
, emd2d
.
Examples
data(lena)
z <- lena[seq(1, 512, by=4), seq(1, 512, by=4)]
par(mfrow=c(1,3), mar=c(0, 0.5, 2, 0.5))
image(z, main="Lena", xlab="", ylab="", col=gray(0:100/100), axes=FALSE)
example <- extrema2dC(z=z)
localmin <- matrix(256, 128, 128)
localmin[example$minindex] <- z[example$minindex]
image(localmin, main="Local minimum", xlab="", ylab="", col=gray(0:100/100), axes=FALSE)
localmax <- matrix(0, 128, 128)
localmax[example$maxindex] <- z[example$maxindex]
image(localmax, main="Local maximum", xlab="", ylab="", col=gray(0:100/100), axes=FALSE)
[Package EMD version 1.5.9 Index]