Chapter 5 Performing Machine Vision Tasks
© National Instruments Corporation 5-27 IMAQ Vision for Visual Basic User Manual
the rake method, and then they compute the distance between the points
detected on the edges along each search line of the rake and return the
largest or smallest distance in either the horizontal or vertical direction. The
MeasurementAxis parameter specifies the axis along which to measure.
You also need to specify the parameters for edge detection and the
separation between the search lines that you want to use within the search
region to find the edges. These methods work directly on the image under
inspection, and they output the coordinates of all the edge points that they
find. The following list describes the available clamp methods:
•
CWMachineVision.MeasureMaximumDistance—Measures the
largest separation between two edges in a rectangular search region.
•
CWMachineVision.MeasureMinimumDistance—Measures the
smallest separation between two edges in a rectangular search region.
Use
CWIMAQVision.FindPointDistances to compute the distances
between consecutive pairs of points in an array of points. You can obtain
these points from the image using any one of the feature detection methods
described in the Find Measurement Points section of this chapter.
Analytic Geometry Measurements
Use the following CWIMAQVision methods to make geometrical
measurements from the points you detect in the image:
•
FitLine—Fits a line to a set of points and computes the equation of
the line.
•
FitCircle2—Fits a circle to a set of at least three points and
computes its area, perimeter and radius.
•
FitEllipse2—Fits an ellipse to a set of at least six points and
computes its area, perimeter, and the lengths of its major and
minor axis.
•
FindIntersectionPoint—Finds the intersection point of two lines
specified by their start and end points.
•
FindAngleBetweenLines—Finds the smaller angle between two
lines.
•
FindPerpendicularLine—Finds the perpendicular line from a
point to a line.
•
FindDistanceFromPointToLine—Computes the perpendicular
distance between the point and the line.
•
FindBisectingLine—Finds the line that bisects the angle formed
by two lines.