Back to Adaptive Vision Library websiteYou are here:
Start »
Function Reference »
Regression Analysis »
LinearRegression_RANSAC
Computes linear regression of given point set using RANSAC.
Syntax
C++
C#
void avl::LinearRegression_RANSAC
(
const atl::Array<float>& inYValues,
const atl::Optional<atl::Array<float> >& inXValues,
atl::Optional<int> inMaxOutlierCount,
float inMaxInlierDistance,
atl::Optional<int> inIterationCount,
avl::LinearFunction& outLinearFunction,
atl::Array<float>& outEstimatedValues,
atl::Array<float>& outResiduals
)
void LinearRegression_RANSAC
(
float[] inYValues,
float[] inXValues,
int? inMaxOutlierCount,
float inMaxInlierDistance,
int? inIterationCount,
out LinearFunction outLinearFunction,
out float[] outEstimatedValues,
out float[] outResiduals
)
Parameters
|
Name |
Type |
Default |
Description |
|
inYValues |
const Array<float>& |
|
Sequence of ordinates |
|
inXValues |
const Optional<Array<float> >& |
NIL |
Sequence of abscissae, or {0, 1, 2, ...} by default |
|
inMaxOutlierCount |
Optional<int> |
NIL |
Determines how many outlier points can be present to end the search |
|
inMaxInlierDistance |
float |
|
Distance from a line for point to be considered an inlier |
|
inIterationCount |
Optional<int> |
NIL |
Number of iterations; Auto means that all point pairs will be used |
|
outLinearFunction |
LinearFunction& |
|
Linear function approximating the given point set |
|
outEstimatedValues |
Array<float>& |
|
The result of application of the computed function to the X values |
|
outResiduals |
Array<float>& |
|
Difference between an input Y value and the corresponding estimated value |
Errors
Error type |
Description |
DomainError |
Inconsistent size of arrays in LinearRegression_RANSAC. |