im.object

0th

Percentile

Class of Images

A class "im" to represent a two-dimensional pixel image.

Keywords
spatial, attribute
Details

An object of this class represents a two-dimensional pixel image. It specifies

  • the dimensions of the rectangular array of pixels
  • $x$and$y$coordinates for the pixels
  • a numeric value (``grey value'') at each pixel
If X is an object of type im, it contains the following elements: ll{ v matrix of values dim dimensions of matrix v xrange range of $x$ coordinates of image window yrange range of $y$ coordinates of image window xstep width of one pixel ystep height of one pixel xcol vector of $x$ coordinates of centres of pixels yrow vector of $y$ coordinates of centres of pixels } Users are strongly advised not to manipulate these entries directly.

Objects of class "im" may be created by the function im. They are also returned by the functions Kmeasure and setcov.

Image objects may be displayed using the methods plot.im, image.im, persp.im and contour.im. There are also methods summary.im for summarising an image, mean.im for calculating the average pixel value, and hist.im for plotting a histogram of pixel values. Values of an image may be looked-up using lookup.im or using the subset operator [.im. Calculations involving one or more images (for example, subtracting one image from another) can often be done easily using eval.im. Note that the row index of the matrix v corresponds to increasing y coordinate, while the column index of m corresponds to increasing x coordinate. Thus a correct display of the image would be obtained by transposing, e.g. image.default(xcol, yrow, t(im)), if you wanted to do it by hand.

Warnings

The internal representation of images is likely to change in the next release of this package.

See Also

im, Kmeasure, setcov, plot.im, eval.im, lookup.im

Aliases
  • im.object
Documentation reproduced from package spatstat, version 1.9-1, License: GPL version 2 or newer

Community examples

Looks like there are no examples yet.