Table Of Contents

Count Objects (G Dataflow)

Last Modified: June 25, 2019

Locates, counts, and measures objects in a rectangular search area.

This node uses a threshold on the pixel intensities to segment an object from its background.

connector_pane_image
datatype_icon

image in

Reference to the source image.

datatype_icon

search rectangle

Rectangular region of the image where the objects are located.

The default value specifies a search on the entire image.

datatype_icon

left

X-coordinate of the upper left corner of the rectangle.

datatype_icon

top

Y-coordinate of the upper left corner of the rectangle.

datatype_icon

right

X-coordinate of the bottom right corner of the rectangle.

datatype_icon

bottom

Y-coordinate of the bottom right corner of the rectangle.

datatype_icon

rotation

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. Instead these coordinates are a position, if the rotation angle equals zero.

datatype_icon

options

Cluster defining the parameters of the algorithm and the information that is overlaid on the result image.

datatype_icon

objects

Type of objects to detect.

Name Value Description
bright objects 0

Searches for bright objects.

dark objects 1

Searches for dark objects.

datatype_icon

threshold

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, or 255 for an 8-bit image. When a dark objects type is selected, the threshold range used includes the minimum possible intensity depending of the image type, or 0 for an 8-bit image, up to threshold.

datatype_icon

reject border

Boolean that specifies whether to ignore objects that touch the inspection region border.

TRUE Ignores objects that touch the inspection region border.
FALSE Does not ignore objects that touch the border.

Default: True

datatype_icon

fill holes

Boolean that specifies whether the holes in the binary objects are ignored.

datatype_icon

min object size

Boolean that specifies if the detected objects smaller than min size are ignored.

datatype_icon

min size

Size of the objects to ignore.

When the parameter minimum object size is set to TRUE, objects smaller than or equal to min size are ignored.

datatype_icon

max object size

Boolean that specifies whether the detected objects larger than max size are ignored.

datatype_icon

max size

Size of the objects to ignore.

When the parameter maximum object size is set to TRUE, the objects larger than or equal to max size are ignored.

datatype_icon

show search area

Boolean that specifies if the ROI is overlaid on the image.

datatype_icon

show center

Boolean that specifies if the locations of the objects found are overlaid on the image.

datatype_icon

show bounding box

Boolean that specifies if the bounding rectangles of the objects found are overlaid on the image.

datatype_icon

coordinate system

Input that specifies the coordinate system to use.

datatype_icon

reference system

Cluster containing origin, angle (deg), and axis reference.

datatype_icon

origin

Point cluster that specifies the origin of the base-reference coordinate system.

datatype_icon
x

X-coordinate of the center of the circle.

datatype_icon
y

Y-coordinate of the center of the circle.

datatype_icon

angle (deg)

Angle that the base-reference coordinate system makes with the image coordinate system.

datatype_icon

axis reference

Element defined as direct or indirect.

datatype_icon

measurement system

Cluster containing origin, angle (deg), and axis reference.

datatype_icon

origin

Point cluster that specifies the origin of the base-reference coordinate system.

datatype_icon
x

X-coordinate of the center of the circle.

datatype_icon
y

Y-coordinate of the center of the circle.

datatype_icon

angle (deg)

Angle that the base-reference coordinate system makes with the image coordinate system.

datatype_icon

axis reference

Element defined as direct or indirect.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

image out

Reference to the destination image.

The search area and/or the result of the measurement can be overlaid on the image according to the settings.

datatype_icon

objects

Array of clusters that return elements for each object located.

datatype_icon

object center

Point-coordinate cluster specifying the location of the center of mass of the binary object detected.

datatype_icon

bounding box

Bounding rectangle of the binary object.

datatype_icon

area

Area of the binary object detected.

datatype_icon

orientation

Orientation of the longest segment in the binary object.

datatype_icon

aspect ratio

Ratio between the width and the height of the binary object.

datatype_icon

nb holes

Number of holes found in the binary object.

datatype_icon

number of objects

Number of objects located in the search area based on the input options.

datatype_icon

coordinate system dup

Reference to the coordinate system.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Object Behavior

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. Count Objects can overlay on the image returned the position of the search area and the centers and bounding rectangles of the objects detected.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics