# as.matrix.owin

From spatstat v1.61-0
by Adrian Baddeley

##### Convert Pixel Image to Matrix

Converts a pixel image to a matrix.

##### Usage

```
# S3 method for owin
as.matrix(x, ...)
```

##### Arguments

- x
A window (object of class

`"owin"`

).- …
Arguments passed to

`as.mask`

to control the pixel resolution.

##### Details

The function `as.matrix.owin`

converts a window to a
logical matrux.

It first converts the window `x`

into a binary pixel mask
using `as.mask`

. It then extracts the pixel entries
as a logical matrix.

The resulting matrix has entries that are
`TRUE`

if the corresponding pixel is inside the window,
and `FALSE`

if it is outside.

The function `as.matrix`

is generic. The function
`as.matrix.owin`

is the method for windows (objects of class `"owin"`

).

Use `as.im`

to convert a window to a pixel image.

##### Value

A logical matrix.

##### See Also

##### Examples

```
# NOT RUN {
m <- as.matrix(letterR)
# }
```

*Documentation reproduced from package spatstat, version 1.61-0, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.