IMAQ Count Objects 2 VI

LabView NI Vision

IMAQ Count Objects 2 VI

Owning Palette: Count and Measure ObjectsInstalled With: NI Vision Development Module

Locates, counts, and measures objects in a rectangular search area. This VI uses a threshold on the pixel intensities to segment the objects from their background.

Details

IMAQ Count Objects 2

ccclst.gif

Settings is a cluster defining the parameters of the algorithm and the information that is overlaid on the result image.

cu16.gif

Objects specifies the type of objects to detect.

Bright Objects (0)

Searches for bright objects.

Dark Objects (1)

Searches for dark objects.

ci32.gif

Threshold specifies the grayscale intensity that is used as threshold level. When a Bright Objects type is selected, the threshold range used includes Threshold to the maximum possible intensity depending of the image type (255 for a 8-bit image). When a Dark Objects type is selected, the threshold range used includes the minimum possible intensity depending of the image type (0 for a 8-bit image) up to Threshold.

cbool.gif

Ignore Objects touching Image Borders specifies whether the binary objects touching the borders of the search area are ignored.

cbool.gif

Fill Holes within Objects specifies whether the holes in the binary objects are ignored.

cbool.gif

Minimum Object Size specifies whether the detected objects smaller than Min Size are ignored.

ci32.gif

Min Size specifies the size of the objects to ignore. When the parameter Minimum Objects Size is set to TRUE, the objects which size is smaller than or equal to Min Size are ignored.

cbool.gif

Maximum Object Size specifies whether the detected objects larger than Max Size are ignored.

ci32.gif

Max Size specifies the size of the objects to ignore. When the parameter Maximum Object Size is set to TRUE, the objects which size is larger than or equal to Max Size are ignored.

cbool.gif

Show Search Area determines whether the search area is overlaid on the image.

cbool.gif

Show Center determines whether the locations of the objects found are overlaid on the image.

cbool.gif

Show Bounding Box determines whether the bounding rectangles of the objects found are overlaid on the image.

cgenclasstagrefflat.gif

Image is a reference to the source image.

cnclst.gif

Search Rect (entire image) specifies the rectangular region of the image where the objects are located. The default value specifies a search on the entire image.

ci32.gif

Left is the x-coordinate of the upper left corner of the rectangle.

ci32.gif

Top is the y-coordinate of the upper left corner of the rectangle.

ci32.gif

Right is the x-coordinate of the bottom right corner of the rectangle.

ci32.gif

Bottom is the y-coordinate of the bottom right corner of the rectangle.

cdbl.gif

Rotation specifies the rotation angle in degrees of the rectangle with its center as point of rotation. If the rotation angle does not equal zero, the Left, Top, Right, and Bottom coordinates are not the actual coordinates of the upper left and bottom right corner of the rectangle, but their position if the rotation angle equals zero.

ccclst.gif

Coordinate System specifies the coordinate system to which the Search Rect is linked. If the Coordinate System input is used (connected), the location of the Search Rect is shifted and rotated by the difference between the reference position of the coordinate system and its new location.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

i1dcclst.gif

Objects is an array of clusters that return the following elements for each object located.

inclst.gif

Object Center is a point-coordinate cluster specifying the location of the center of mass of the binary object detected.

inclst.gif

Bounding Box is the bounding rectangle of the binary object.

isgl.gif

Area is the area of the binary object detected.

isgl.gif

Orientation returns the orientation of the longest segment in the binary object.

isgl.gif

Aspect Ratio is the ratio between the width and the height of the binary object.

ii32.gif

Nb Holes returns the number of holes found in the binary object.

igenclasstagrefflat.gif

Image Out is a reference to the destination image. The search area and/or the result of the measurement may be overlaid on the image according to the settings.

ii32.gif

Number of Objects is the number of objects located in the search area based on the input Settings.

icclst.gif

Coordinate System (duplicate) is a reference to the coordinate system.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

Details

Optional filters give the capability to ignore the objects smaller or larger than given sizes. Other options allow rejecting the objects touching the borders of the search area and ignoring the holes that the segmentation process may create in the objects. The segmented objects are then located and measured. IMAQ Count Objects 2 can overlay on the image returned the position of the search area, the centers and bounding rectangles of the objects detected.