CogLineMaxEdgeDetectionParams ProjectionLengthInPixels Property Cognex VisionPro
Gets or sets the length of the 1D kernel used during gradient field projection. This length is along the expected line tangent direction.

Namespace: Cognex.VisionPro.LineMax
Assembly: Cognex.VisionPro.LineMax (in Cognex.VisionPro.LineMax.dll) Version: 65.1.0.0
Syntax

public double ProjectionLengthInPixels { get; set; }

Property Value

Type: Double
The length in pixels. The default is 5.
Events

Exceptions

ExceptionCondition
ArgumentOutOfRangeException Thrown if set to a value less than 1.
Remarks

Decrease this value to improve accuracy and fidelity; increase this value to smooth out short edges and fill in gaps in long edges.

The ProjectionLengthInPixels value will be applied non-uniformly if the number of pixels per physical unit differs along the x and y axes of the image. In these cases the "pixel" unit is one pixel along the axis having more pixels per physical unit, and less than one pixel along the other axis. See GradientKernelSizeInPixels for more information.

The ContrastThreshold and NormalizedContrastThreshold constraints are applied to projection results, not image pixels or the gradient field gradients. Therefore, the number of edge points ultimately extracted is reduced by a factor of the projection length. This results in higher accuracy and longer execution times for smaller values; and lower accuracy and shorter execution times for larger values.

The GradientKernelSizeInPixels value serves as a lower limit for ProjectionLengthInPixels. Setting ProjectionLengthInPixels to a value smaller than the current GradientKernelSizeInPixels value will automatically update GradientKernelSizeInPixels to this smaller value. Likewise, setting GradientKernelSizeInPixels to a value larger than the current ProjectionLengthInPixels value will automatically set ProjectionLengthInPixels to that larger value.

See Also