fillPoly: Fill Polygon with Color in Image

Description Usage Arguments Value Author(s) See Also Examples

View source: R/draw.R

Description

fillPolygon fills all the pixels of an image withing a given polygon with a given color.

Usage

1
fillPoly(image, polygon, color = "white")

Arguments

image

An Image object.

polygon

An m x 2 matrix (or an object that can be converted to an m x 2 matrix), with the first column containing the x coordinates of the polygon and the second column containing the y coordinates of the polygon.

color

A value or vector of any kind of R color specification compatible with col2rgb representing the color to fill the polygon with (default: "white").

Value

This function does not return anything. It modifies image in place.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image, selectROI

Examples

1
# TODO

neuroconductor-devel/Rvision documentation built on May 16, 2021, 5:16 p.m.