Summarizing a Pixel Image
summary
method for class "im"
.
## S3 method for class 'im' summary(object, ...) ## S3 method for class 'summary.im' print(x, ...)
object |
A pixel image. |
... |
Ignored. |
x |
Object of class |
summary.im
extracts information about the pixel image,
and print.summary.im
prints this information in a
comprehensible format.
In normal usage, print.summary.im
is invoked implicitly
when the user calls summary.im
without assigning its value
to anything. See the examples.
The information extracted by summary.im
includes
The range of the image values.
The mean of the image values.
The “integral” of the image values, calculated as the sum of the image values multiplied by the area of one pixel.
The dimensions of the pixel array:
dim[1]
is the number of rows in the array,
corresponding to the y coordinate.
summary.im
returns an object of class "summary.im"
,
while print.summary.im
returns NULL
.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner r.turner@auckland.ac.nz
# make an image X <- as.im(function(x,y) {x^2}, unit.square()) # summarize it summary(X) # save the summary s <- summary(X) # print it print(X) s # extract stuff X$dim X$range X$integral
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.