Back to Aurora Vision Library websiteYou are here:
Start »
Function Reference »
Profile »
Profile Features »
ProfileZeroCrossings
Header: |
AVL.h
|
Namespace: |
avl |
Module: |
FoundationPro |
Finds the points of a profile at which the profile intersects the x-axis.
Syntax
C++
C#
void avl::ProfileZeroCrossings
(
const avl::Profile& inProfile,
atl::Optional<const avl::Range&> inRange,
atl::Array<float>& outZeroCrossings
)
Parameters
|
Name |
Type |
Default |
Description |
|
inProfile |
const Profile& |
|
Input profile |
|
inRange |
Optional<const Range&> |
NIL |
|
|
outZeroCrossings |
Array<float>& |
|
X coordinates of the locations where the profile crosses the y=0 axis |
Description
The operation assumes linear interpolation between the profile values and finds precise locations at which the profile crosses the horizontal \(y = 0\) axis. For the constant profile sections of value 0 only the integer coordinates of the sampling points in the section are returned.
Examples
|
|
inProfile = {-1.0,3.0,0.0,0.0,0.0}
|
outZeroCrossings = {0.25, 2.0, 3.0, 4.0}
|
Errors
List of possible exceptions:
Error type |
Description |
DomainError |
Range exceeds the input profile in ProfileZeroCrossings. |