optimEllipse: Fit an Ellipse

View source: R/misc.R

optimEllipseR Documentation

Fit an Ellipse

Description

Given a set of x/y positions, this function attempts to find the best fitting ellipse that goes through these points.

Usage

optimEllipse(x, y)

Arguments

x, y

Vectors of x and x positions.

Value

A vector with 5 elements: the x and y coordinated of the center of the ellipse, the width and height of the ellipse, and the angle of the ellipse relative to the y axis.

Author(s)

Simon Garnier, garnier@njit.edu

Examples

optimEllipse(rnorm(100), rnorm(100))


swarm-lab/trackR documentation built on Nov. 20, 2022, 11:29 a.m.