PathTurnAngleLocalMaxima


Finds the local maxima of the profile of turn angles of a path.

Applications:Detection of feature points related to object corners.

Syntax

C++
C#
Python
 
def PathTurnAngleLocalMaxima(
	inPath: Path,
	/,
	*,
	inAllowedTurnDirection: TurnAngleDirection = TurnAngleDirection.All,
	inResultPrecision: TurnAnglePrecision = TurnAnglePrecision.PointPrecise,
	inMinTurnAngle: float = 30.0,
	inMinDistance: float = 0.0,
	inSmoothingStdDev: float = 0.6,
	diagSmoothedPath: Path | None = None,
	diagTurnAngleProfile: Profile | None = None
)
-> (
	outTurnAngleMaximaIndices: list[float],
	outTurnAngleMaximaPoints: list[Point2D],
	outTurnAngleMaximaAngles: list[float]
)

Parameters

Name Type Range Default Description
Input value inPath Path Input path
Input value inAllowedTurnDirection TurnAngleDirection TurnAngleDirection.All Allows to detect only left-turns, only right-turns or both
Input value inResultPrecision TurnAnglePrecision TurnAnglePrecision.PointPrecise Switches between pixel-precise or subpixel-precise detection of the found maxima
Input value inMinTurnAngle float 0.0 - 180.0 30.0 Minimal value of a relevant angle
Input value inMinDistance float 0.0 - 0.0 Minimal distance on the path between two local maxima assuming each path segment has unit length
Input value inSmoothingStdDev float 0.0 - 0.6 Standard deviation of the gaussian smoothing applied to the input path
Output value outTurnAngleMaximaIndices list[float] Indices of found local maxima
Output value outTurnAngleMaximaPoints list[Point2D] Found local maxima of turn angle profile of the smoothed input path
Output value outTurnAngleMaximaAngles list[float] Turn angles of found local maxima
Diagnostic input diagSmoothedPath Path | None None Input path smoothed with gaussian kernel
Diagnostic input diagTurnAngleProfile Profile | None None Profile of turn angles at characteristic points of the smoothed input path