# im

From spatstat v1.6-6
by Adrian Baddeley

##### Create a Pixel Image Object

Creates an object of
class `"im"`

representing a two-dimensional pixel image.

- Keywords
- spatial

##### Usage

`im(mat, xcol=seq(ncol(mat)), yrow=seq(nrow(mat)))`

##### Arguments

- mat
- matrix of grey level pixel values of the image.
- xcol
- vector of $x$ coordinates for the pixels
- yrow
- vector of $y$ coordinates for the pixels

##### Details

This function creates an object of class `"im"`

representing
a two-dimensional pixel image. See `im.object`

for details of this class.

Note that the **row** index of the matrix `mat`

corresponds
to increasing **y** coordinate, while the column index of `mat`

corresponds to increasing **x** coordinate. Thus
`xrow`

has one entry for each row of `mat`

and `ycol`

has one entry for each column of `mat`

. A correct
display of the image would be obtained by transposing, e.g.
`image.default(xcol, yrow, t(mat))`

, 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

##### Examples

```
whitenoise <- im(matrix(rnorm(10000), 100, 100))
image(whitenoise)
```

*Documentation reproduced from package spatstat, version 1.6-6, License: GPL version 2 or newer*

### Community examples

Looks like there are no examples yet.