GetPointsOnContour Method
Syntax
CWIMAQVision.GetPointsOnContour SourceImage, ContourSegmentsReport
Return Type
On success, this method returns 0. On failure, this function returns a negative number.
Purpose
Finds the number of edge segments in an image and returns the coordinates of the pixels in each segment. Any pixel that is greater than zero is considered as an edge location.
Remarks
Use this method with U8 images.
This method joins adjoining edge pixels into edge segments. An edge segment is considered closed if it forms a loop. Each edge segment is given a weight based on the pixel gray values along that edge. An edge segment with high gray values has a higher weight.
Parameters
SourceImage As CWIMAQImage
The source image.
ContourSegmentsReport As CWIMAQContourSegmentsReport
On return, a report containing information about the edge segments the method found in the image.
Example
Dim report As New CWIMAQContourSegmentsReport ' Find the edge segment information from the image in Viewer1 CWIMAQVision1.GetPointsOnContour CWIMAQViewer1.Image, report