CogTrevistaDepthImageParams DepthMode Property Cognex VisionPro 9.23
Gets or sets the algorithm used to compute the depth image.

Namespace: Cognex.VisionPro.Trevista
Assembly: Cognex.VisionPro.Trevista (in Cognex.VisionPro.Trevista.dll) Version: 91.0.0.0
Syntax

public CogTrevistaDepthModeConstants DepthMode { get; set; }

Property Value

Type: CogTrevistaDepthModeConstants
The algorithm used to calculate the depth image: Default is Local.
Events

Event TypeReason
ICogChangedEvent Changed Fires when this property changes. The following state flag may be affected:
Exceptions

ExceptionCondition
ArgumentOutOfRangeException The supplied value is not a valid member of the CogTrevistaDepthModeConstants enumeration.
Remarks

The DepthImage comes in two varieties: "local" and "global".

When the DepthMode is Local, the DepthImage is computed by effectively integrating the ContourImage twice to get the surface height. Use Local mode to compute the relative heights of surface areas that lie near each other in your image.

When the DepthMode is Global, the DepthImage is computed by effectively integrating the ShapeHorizontalImage and the ShapeVerticalImage to get the surface height. Use Global mode to compute the relative heights of surface areas that lie far away from each other in your image.

Flat areas of your 3D surface will have a value of zero in the floating point ContourImage, but may have a non-zero floating point value in the ShapeHorizontal and ShapeVertical images. This means that Global mode is a better choice for surfaces that have large, flat areas that are not perpendicular to the optical axis of your lens.

See Also