FindEdges Method

NI Vision for Visual Basic

FindEdges Method

Syntax

CWIMAQVision.FindEdges SourceImage, XCoordinates, YCoordinates, EdgeContrast, FilterWidth, FilterSteepness, InterpolationMethod, SubPixelAccuracy, EdgeReport, XEdgeCoordinates, YEdgeCoordinates

Return Type

Long

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

Purpose

Obsolete—Use FindEdges2 instead. Finds edges along a path in an image.

Remarks

Use this method with U8, I16, and SGL images.

You can use this method in conjunction with the CWIMAQRegions.RegionsProfile method to obtain the XCoordinates and YCoordinates arrays.

Parameters

SourceImage As CWIMAQImage

The input image.

XCoordinates As Variant

An array containing the x-coordinates of pixels along which the method detects edges.

YCoordinates As Variant

An array containing the y-coordinates of pixels along which the method detects edges.

EdgeContrast As Long

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

FilterWidth As Long

Number of pixels that the function 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. Set this parameter to cwimaqInterpolateQuadratic to use quadratic interpolation or cwimaqInterpolateCubic to use cubic spline interpolation.

SubPixelAccuracy As CWIMAQSubPixelAccuracyValues

The number of samples obtained from a pixel. For example, a subpixel accuracy of one-fourth specifies that each pixel is split into four subpixels

EdgeReport As CWIMAQEdgeReport

On return, a CWIMAQEdgeReport object with information about each edge.

XEdgeCoordinates As Variant

On return, an array containing the x-coordinates of the detected edges. If you specified subpixel accuracy, the method returns the results with subpixel accuracy.

YEdgeCoordinates As Variant

On return, an array containing the y-coordinates of the detected edges. If you specified subpixel accuracy, the method returns the results with subpixel accuracy.

See Also

FindEdges2

CWIMAQRegions.RegionsProfile