| simplify.owin | R Documentation |
Given a window, this function finds a simpler polygon that approximates it.
simplify.owin(W, dmin)
W |
The window which is to be simplied.
An object of class |
dmin |
Numeric value. The smallest permissible length of an edge. |
This function simplifies a polygon W
by recursively deleting the shortest edge of W
until all remaining edges are longer than the specified
minimum length dmin, or until there are only three edges left.
The argument W must be a window (object of class
"owin"). If W is a rectangle, it is returned without alteration.
If W is a binary mask, it is first converted to a polygonal
window (with many small vertical and horizontal edges), then simplified.
Another window (object of class "owin")
of type "polygonal".
.
fillholes.owin,
owin
plot(letterR, col="red")
plot(simplify.owin(letterR, 0.3), col="blue", add=TRUE)
W <- Window(chorley)
plot(W)
WS <- simplify.owin(W, 2)
plot(WS, add=TRUE, border="green")
points(vertices(WS))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.