Description Usage Arguments Value Examples
Use this function if you have a data set of uniformly distributed points on
an elliptical domain in the plane but captured with additive errors. The
estimation algorithm takes many horizontal and vertical, or star-shaped
slices of the object. Length estimation procedure is conducted on each slice
and in that way the set of edge points is obtained. An ellipse or a circle
is fitted to these edge points by function
EllipseDirectFit
or
CircleFitByPratt
from the package conicfit
and its semi-axes and area are returned as a result. Function optionally
plots input points, calculated edge points and the resulting ellipse or
circle.
1 2 3 4 |
data |
Two-column data matrix containing the points that describe observed object. First column represents x coordinate of the point, while second column represents y coordinate. |
nrSlices |
Number of slices applied for plain data cutting. Defaults to 10. |
error |
A character string specifying the error distribution. Must be one of "laplace", "gauss" or "student". Can be abbreviated. |
var.est |
A character string specifying the method of error variance
estimation. Must be given if |
var |
Explicit error variance. Needs to be given if |
plot |
Logical parameter (TRUE or FALSE) that determines whether to plot given object, calculated edge points and the resulting ellipse. Defaults to FALSE. |
parallel |
Logical parameter (TRUE or FALSE) that determines whether to perform estimation procedure in a parallel manner. Can shorten estimation time if many border points need to be calculated. Defaults to FALSE. |
slicing |
A character string specifying the method of slicing. Can be "hv" (horizontal and vertical slicing) or "star" (star-shaped slicing). Can be abbreviated. |
representation |
A character string specifying the shape of an observed object. Can be "ellipse" or "circle". Can be abbreviated. |
List containing:
area: Estimated area of the object,
points: Set of calculated object's edge points,
semiaxes: Resulting ellipse's semi-axes or circle radius.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # load a data set representing the ellipse with additive Gaussian error,
# run area estimation on it, and plot the results
inputfile <- system.file("extdata", "ellipse_3_4_0.1_gauss.txt", package = "LeArEst")
inputdata <- read.table(inputfile)
area <- areaest(inputdata, error = "gauss", var.est = "ML", plot = TRUE,
slicing = "hv", representation = "ellipse")
# load a data set representing the ellipse with additive Laplacian error,
# run area estimation on it, and plot the results
inputfile <- system.file("extdata", "ellipse_3_4_0.1_laplace.txt", package = "LeArEst")
inputdata <- read.table(inputfile)
area <- areaest(inputdata, error = "laplace", var = 0.1, nrSlices = 5, plot = TRUE,
slicing = "star", representation = "ellipse")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.