Defining Regions Programmatically; Defining Regions With Masks - National Instruments IMAQ Vision for LabWindows TM /CVI User Manual

For labwindows/cvi
Table of Contents

Advertisement

Chapter 3
Making Grayscale and Color Measurements

Defining Regions Programmatically

Defining Regions with Masks

IMAQ Vision for LabWindows/CVI User Manual
The following list describes how you can display the tools palette in a
separate window and manipulate the palette.
Use
imaqShowToolWindow()
window.
Use
imaqSetupToolWindow()
tools palette.
Use
imaqMoveToolWindow()
Use
imaqCloseToolWindow()
If you want to draw an ROI without using an ROI constructor or displaying
the tools palette in a separate window, use
This function allows you to select a contour from the tools palette without
opening the palette.
When you have an automated application, you may need to define regions
of interest programmatically. To programmatically define an ROI, create
the ROI using
imaqCreateROI()
A contour is a shape that defines an ROI. You can create contours from
points, lines, rectangles, ovals, polygons, and annuli. For example, to add a
rectangular contour to an ROI, use
Specify regions by providing basic parameters that describe the region you
want to define. For example, define a point by providing the x-coordinate
and y-coordinate. Define a line by specifying the start and end coordinates.
Define a rectangle by specifying the coordinates of the top, left point; the
width and height; and in the case of a rotated rectangle, the rotation angle.
You can define regions to process with image masks. An image mask is
an 8-bit image of the same size as or smaller than the image you want to
process. Pixels in the mask image determine whether the corresponding
pixel in the source image needs to be processed. If a pixel in the image
mask has a value different than 0, the corresponding pixel in the source
image is processed. If a pixel in the image mask has a value of 0, the
corresponding pixel in the source image is left unchanged.
When you need to make intensity measurements on particles in an image,
you can use a mask to define the particles. First, threshold your image to
make a new binary image. For more information about binary images, refer
to Chapter 4,
Performing Particle
to display the tools palette in a floating
to configure the appearance of the
to move the tools palette.
to close the tools palette.
imaqSetCurrentTool()
, and then add the individual contours.
imaqAddRectContour()
Analysis. You can input the binary image
3-6
.
.
ni.com

Advertisement

Table of Contents
loading

This manual is also suitable for:

Imaq vision

Table of Contents