Class of Images
"im" to represent a two-dimensional pixel image.
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
Xis an object of type
im, it contains the following elements:
vmatrix of values
dimdimensions of matrix
xrangerange of $x$ coordinates of image window
yrangerange of $y$ coordinates of image window
xstepwidth of one pixel
ystepheight of one pixel
xcolvector of $x$ coordinates of centres of pixels
yrowvector of $y$ coordinates of centres of pixels } Users are strongly advised not to manipulate these entries directly.
Image objects may be displayed using the methods
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
Calculations involving one or more images (for example,
subtracting one image from another) can often be done
Note that the row index of the matrix
to increasing y coordinate, while the column index of
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.
The internal representation of images is likely to change in the next release of this package.