CogCaliperResults MapToImage Method Cognex VisionPro
Map from a caliper 1D space back to the image. T parameterizes the direction of projection such that a value of 0 corresponds to the P0PX edge of the caliper window and a value of 1 corresponds to the opposite edge.

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

public void MapToImage(
	double position,
	CogCaliperSpaceConstants fromSpace,
	double t,
	out double x,
	out double y
)

Parameters

position
Type: System Double

The 1-dimensional position to map.

fromSpace
Type: Cognex.VisionPro.Caliper CogCaliperSpaceConstants

The space from which to map position.

t
Type: System Double

Specify 0.0 to place the returned point at the top of the region (where the top is the origin side). Specify 1.0 to place the returned point at the bottom of the region. The default value for this parameter is 0.5, which places the point in the center of the region.

x
Type: System Double 

The x-coordinate of the returned location.

y
Type: System Double 

The Y-coordinate of the returned location.

Exceptions

ExceptionCondition
ArgumentException

fromSpace is not a member of CogCaliperSpaceConstants.

Remarks

Maps a 1-dimensional point from one of the supported 1-dimensional spaces to a 2-dimensional point within the input image.

Since the part of the input image that lies within the input region is projected to form a 1-dimensional image, the result location is actually a line within this region. You control where along this line the location is placed using the t parameter (it gives the offset from the top of the input region, in the range 0.0 through 1.0, as shown in the documentation for PositionXY(Double, Double , Double ).

See Also