https://github.com/cran/spatstat
Tip revision: 95fd631dcecc6e90c663947d755f3243af3ee213 authored by Adrian Baddeley on 22 July 2008, 00:00:00 UTC
version 1.14-1
version 1.14-1
Tip revision: 95fd631
as.matrix.im.Rd
\name{as.matrix.im}
\alias{as.matrix.im}
\title{Convert Pixel Image to Matrix}
\description{
Convert a pixel image to a matrix
}
\usage{
\method{as.matrix}{im}(x, ...)
}
\arguments{
\item{x}{A pixel image (object of class \code{"im"}).}
\item{\dots}{Ignored.}
}
\details{
This function takes the pixel image \code{x}
and returns a matrix containing the pixel values.
It is handy when you want to extract a summary of the pixel values.
See the Examples.
}
\value{
A matrix.
}
\examples{
# artificial image
Z <- setcov(square(1))
M <- as.matrix(Z)
median(M)
\dontrun{
# plot the cumulative distribution function of pixel values
plot(ecdf(as.matrix(Z)))
}
}
\author{Adrian Baddeley
\email{adrian@maths.uwa.edu.au}
\url{http://www.maths.uwa.edu.au/~adrian/}
and Rolf Turner
\email{r.turner@auckland.ac.nz}
}
\keyword{spatial}
\keyword{methods}