Chapter 5 Performing Machine Vision Tasks
© National Instruments Corporation 5-9 IMAQ Vision for LabWindows/CVI User Manual
Defining Regions Programmatically
When you have an automated application, you need to define ROIs
programmatically. You can programmatically define regions in two ways:
• Specify the contours of the ROI.
• Specify individual structures by providing basic parameters that
describe the region you want to define. You can specify a rotated
rectangle by providing the coordinates of the center, the width, the
height, and the rotation angle. You can specify an annulus by providing
the coordinates of the center, inner radius, outer radius, start angle, and
end angle. You can specify a point by setting its x-coordinates and
y-coordinates. You can specify a line by setting the coordinates of the
start and end points.
Refer to Chapter3 , Making Grayscale and Color Measurements, for more
information about defining ROIs.
Find Measurement PointsAfter you set regions of inspection, locate points within those regions on
which you can base measurements. You can locate measurement points
using edge detection, pattern matching, color pattern matching, and color
location.
Finding Features Using Edge Detection
Use the edge detection tools to identify and locate sharp discontinuities
in an image. Discontinuities typically represent abrupt changes in pixel
intensity values, which characterize the boundaries of objects.