View source: R/utils_efourier.R
efourier_error | R Documentation |
Computes the sum of squared distances between the original data and
reconstructed outline. It allows examining reconstructed outlines with the
addition of successive contributing harmonics indicated in the argument
nharm
.
efourier_error(
x,
nharm = NULL,
type = c("error", "outline", "deviations"),
plot = TRUE,
ncol = NULL,
nrow = NULL
)
x |
An object computed with |
nharm |
An integer or vector of integers indicating the number of
harmonics to use. If not specified the number of harmonics used in |
type |
The type of plot to produce. By default, a line plot with the sum
of squared distances (y-axis) and the number of harmonics (x-axis) is
produced. If |
plot |
A logical to inform if a plot should be produced. Defaults to
|
ncol, nrow |
The number of rows or columns in the plot grid. Defaults to
|
A list with the objects:
dev_points
A list with the deviations (distances) from original and
predicted outline for each pixel of the outline.
data.frame
object with the minimum, maximum and average
deviations (based on the outline points).
If x
is an object of class efourier_lst
, a list will be returned.
library(pliman)
ef <-
contours[[1]] |>
efourier(nharm = 30)
efourier_error(ef)
efourier_error(ef,
nharm = 30,
type = "outline")
efourier_error(ef,
nharm = c(1, 4, 20),
type = "deviations")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.