Count Objects with Similar Gray Values
Use this tool to count objects with similar gray values, i.e., objects that have a similar brightness. For this tool easyTouch and easyTouch+ are available.
Parameters
Basic Parameters
Image:
This parameter represents the image in which the objects should be counted.
If a color image is used as input image for this tool, only the first channel, i.e., the red channel, is used for the processing.
Minimum Gray Value:
This parameter defines the "Minimum Gray Value" of the objects to be counted. It is set to 200 by default. All objects with a gray value lower than the specified "Minimum Gray Value" are excluded from the counting. When an object is selected for the counting, the "Minimum Gray Value" of this object is instantly determined and adopted. If further objects are added using easyTouch+, the "Minimum Gray Value" is adjusted automatically with each object that is added to the selection.However, you may also change its value manually at the corresponding connector.
Maximum Gray Value:
This parameter defines the "Maximum Gray Value" of the objects to be counted. It is set to 255 by default. All objects with a gray value higher than the specified "Maximum Gray Value" are excluded from the counting. When an object is selected for the counting, the "Maximum Gray Value" of this object is instantly determined and adopted. If further objects are added using easyTouch+, the "Maximum Gray Value" is adjusted automatically with each object that is added to the selection.However, you may also change its value manually at the corresponding connector.
Additional Parameters
ROI:
This parameter defines the region of interest (ROI) for processing. Image parts outside of the union of the ROI and "Processed Region" are not processed. In addition, if either of them is empty, the image part inside of the other one is processed. In case both of them are empty, the whole image is processed.
By default the ROI is defined as an empty ROI. If you want to use a non-empty ROI for the processing, you either have to connect the parameter to an appropriate ROI result of a previous tool or you have to draw new ROIs into the image using the available ROI buttons.
Alignment Data:
This parameter represents the alignment data that are used to align the ROI. By default no alignment data are connected and thus no effect is visible. If you want to use specific alignment data, you have to connect the parameter to an appropriate result of a previous tool such as Determine Alignment with Matching, Determine Alignment with Straight Border, Align Image, or Rotate Image.
Minimum Area:
This parameter defines the "Minimum Area" of the objects to be counted. It is defined in pixels and set to 5 px by default. All objects with an area smaller than the specified "Minimum Area" are excluded from the counting. When an object is selected for the counting, the "Minimum Area" of this object is instantly determined and adopted. If further objects are added using easyTouch+, the "Minimum Area" is adjusted automatically with each object that is added to the selection.However, you may also change its value manually at the corresponding connector.
Maximum Area:
This parameter defines the "Maximum Area" of the objects to be counted. It is defined in pixels and set to 5 000 000 px by default. All objects with an area greater than the specified "Maximum Area" are excluded from the counting. When an object is selected for the counting, the "Maximum Area" of this object is instantly determined and adopted. If further objects are added using easyTouch+, the "Maximum Area" is adjusted automatically with each object that is added to the selection.However, you may also change its value manually at the corresponding connector.
Area Tolerance:
This parameter defines a tolerance value for the area of the objects to be counted. It has a range from 0 to 100 and is set to the factor 30 by default. This value is not adjusted by easyTouch . However, it is used for the estimation of the values for the "Minimum Area" and "Maximum Area" of the object that is selected with easyTouch. Thus, the "Area Tolerance" does not affect the processing directly, but when easyTouch is used.
If the "Area Tolerance" is set to the maximum value of 100, the "Minimum Area" of the selected object is set to 1/2 of the actual area of the object and the "Maximum Area" is set to 2 times the actual area.
Processing Region:
This parameter defines the region of interest (ROI) for processing. Image parts outside of the union of the ROI and "Processed Region" are not processed. In addition, if either of them is empty, the image part inside of the other one is processed. In case both of them are empty, the whole image is processed.
By default, "Processing Region" is defined as empty region. To specify a "Processing Region", you have to connect the parameter to an appropriate region result of a previous tool to make sure that a region is transmitted to this tool.
Results
Basic Results
Extracted Region:
This result contains the region of the counted objects.
Number:
This result contains the "Number" of objects that are counted with the specified parameters. The result is returned as an integer number.
Tool State:
"Tool State" returns information about the state of the tool and thus can be used for error handling. Please see the topic Tool State Result for more information about the different tool state results.
Additional Results
Processing Time:
This result returns the duration of the most recent execution of the tool in milliseconds. The result is provided as additional result. Therefore, it is hidden by default but it can be displayed via the button beside the tool results. For more information see the section Processing Time in the tool reference overview.