Caliper Method

NI Vision for Visual Basic

Caliper Method

Syntax

CWIMAQVision.Caliper SourceImage, XCoordinates, YCoordinates, EdgeContrast, FilterWidth, FilterSteepness, InterpolationMethod, SubPixelAccuracy, EdgePolarity, EdgeSeparation, SeparationDeviation, CaliperReport, XEdgeCoordinates, YEdgeCoordinates

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Obsolete—Use Caliper2 instead. Finds edges along a path in an image, chooses pairs of the edges, and measures the distance between them.

Remarks

Use this method with image types U8, I16, and SGL.

Parameters

SourceImage As CWIMAQImage

The input image.

XCoordinates As Variant

An array containing the x-coordinates of the pixels along which the method uses the caliper tool.

YCoordinates As Variant

An array containing the y-coordinates of the pixels along which the method uses the caliper tool.

EdgeContrast As Long

Specifies the threshold for the contrast of the edge. The method identifies only edges with a contrast greater than this value in the detection process.

FilterWidth As Long

The number of pixels that the method averages to find the contrast at either side of the edge.

FilterSteepness As Long

The span, in pixels, of the slope of the edge projected along the path specified by the input points.

InterpolationMethod As CWIMAQInterpolateMethods

The method used to perform the interpolation for subpixel measurements. Valid options are cwimaqZeroOrder, cwimaqQuadratic, and cwimaqCubic.

SubPixelAccuracy As CWIMAQSubPixelAccuracyValues

The number of samples that the method obtains from a pixel. For example, a subpixel accuracy of one-fourth specifies that the method splits each pixel into four subpixels.

EdgePolarity As CWIMAQEdgePolarities

Specifies the edge polarity of the edge pairs.

EdgeSeparation As Single

The distance between edge pairs. If the edge pair has a separation greater than this value ± the SeparationDeviation, the function ignores the edge pair. Set this parameter to 0 to find all edge pairs.

SeparationDeviation As Single

The range around the EdgeSeparation value. If you set EdgeSeparation to 0, the function ignores SeparationDeviation.

CaliperReport As CWIMAQCaliperReport

On return, a report object containing information about each edge pair that the method found.

XEdgeCoordinates As Variant

On return, an array of points that specify the x-coordinates of the edges detected.

YEdgeCoordinates As Variant

On return, an array of points that specify the y-coordinates of the edges detected.

See Also

Caliper2