boxPoints: Find Vertices of a Rotated Rectangle

View source: R/shape.R

boxPointsR Documentation

Find Vertices of a Rotated Rectangle

Description

boxPoints finds the four vertices of a rotated rectangle computed by minAreaRect or fitEllipse.

Usage

boxPoints(rect)

Arguments

rect

A list describing a rotated rectangle as created by minAreaRect and fitEllipse.

Value

A matrix containing the coordinates of the four vertices of the rotated rectangle in the following order: bottom left, top left, top right, and bottom right.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

minAreaRect, fitEllipse

Examples

rect <- minAreaRect(rnorm(100), rnorm(100))
boxPoints(rect)


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.