Back to Adaptive Vision Library websiteYou are here:
Start »
Function Reference »
Path Local Transforms »
SmoothPath_Mean
Smooths a path by averaging its characteristic points within a kernel.
Syntax
C++
C#
void avl::SmoothPath_Mean
(
const avl::Path& inPath,
int inKernelRadius,
avl::Path& outPath
)
void SmoothPath_Mean
(
Path inPath,
int inKernelRadius,
out Path outPath
)
Parameters
|
Name |
Type |
Range |
Default |
Description |
|
inPath |
const Path& |
|
|
Input path |
|
inKernelRadius |
int |
0 - |
3 |
|
|
outPath |
Path& |
|
|
Output path |
Description
The operation replaces each characteristic point of the path with the local average, thus smoothing its shape.
The local average is computed as a simple arithmetic mean of the consecutive 2*inKernelRadius + 1 characteristic points.
Examples
A sample path |
|
|
SmoothPath_Mean run on the sample path with inKernelRadius = 1. |
SmoothPath_Mean run on the sample path with inKernelRadius = 3. |
Errors
Error type |
Description |
DomainError |
Kernel size exceeds the number of points in a path in SmoothPath_Mean. |
See Also
- SmoothPath_Gauss – Smooths a path by averaging its characteristic points within a kernel using gaussian-weighted average.