You are here: Start » AVL.NET » AVL.PathTurnAngleLocalMaxima Method

AVL.PathTurnAngleLocalMaxima Method

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

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void PathTurnAngleLocalMaxima(
	AvlNet.Path inPath,
	AvlNet.TurnAngleDirection inAllowedTurnDirection,
	AvlNet.TurnAnglePrecision inResultPrecision,
	float inMinTurnAngle,
	float inMinDistance,
	float inSmoothingStdDev,
	out float[] outTurnAngleMaximaIndices,
	out AvlNet.Point2D[] outTurnAngleMaximaPoints,
	out float[] outTurnAngleMaximaAngles,
	out AvlNet.Path diagSmoothedPath,
	out AvlNet.Profile diagTurnAngleProfile
)

Parameters

Name Type Range Default Description
inPathAvlNet.PathInput path.
inAllowedTurnDirectionAvlNet.TurnAngleDirectionAllAllows to detect only left-turns, only right-turns or both. Default value: All.
inResultPrecisionAvlNet.TurnAnglePrecisionSwitches between pixel-precise or subpixel-precise detection of the found maxima.
inMinTurnAnglefloat<0.0f, 180.0f>30.0fMinimal value of a relevant angle. Default value: 30.0f.
inMinDistancefloat<0.0f, INF>0.0fMinimal distance on the path between two local maxima assuming each path segment has unit length. Default value: 0.0f.
inSmoothingStdDevfloat<0.0f, INF>0.6fStandard deviation of the gaussian smoothing applied to the input path. Default value: 0.6f.
outTurnAngleMaximaIndicesfloatIndices of found local maxima.
outTurnAngleMaximaPointsAvlNet.Point2DFound local maxima of turn angle profile of the smoothed input path.
outTurnAngleMaximaAnglesfloatTurn angles of found local maxima.
diagSmoothedPathAvlNet.PathInput path smoothed with gaussian kernel.
diagTurnAngleProfileAvlNet.ProfileProfile of turn angles at characteristic points of the smoothed input path.

Description

The operation computes the profile of turn angles of a path and finds the local maxima of the profile having value at least inMinTurnAngle. The inAllowedTurnDirection parameter restricts kind of turns taken into consideration (left-turns only, right-turns only or both), while inResultPrecision determines the precision of the resulting maxima points. Found maxima have to be at least inMinDistance from each other (the distance is measured along the input path assuming each path segment has unit length).

Examples

PathTurnAngleLocalMaxima run on the sample path with inAllowedTurnDirection = Right

See also