Count in Back Light
Use this tool to count objects of a similar area in images with back light.
For this tool easyTouch and easyTouch+ are available. This means, you can select the objects to be counted interactively in the image while the corresponding parameters are adapted automatically. Move the mouse pointer over the objects to be counted. MERLIC will highlight all detected objects that fit to the current mouse position and display a preview of the respective center points. If you want to count the highlighted objects of the easyTouch preview, confirm the selection with a mouse click. The parameters are automatically adjusted to fit the selected objects. However, they still can be adjusted manually at the corresponding connectors.
To count further objects in the image, you can use easyTouch+, i.e., by pressing the Ctrl key and selecting the additional objects. MERLIC automatically checks if the selected objects fit to the current parameter settings of the previous selection. If they do not fit, e.g., because the mouse hovers over an object with an opposite gray value, MERLIC gives immediate feedback that the respective object will be ignored by easyTouch+.
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 Area:
This parameter defines the "Minimum Area" of the objects to be counted. It is defined in pixels and set to 2 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 500 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.
Additional Parameters
ROI:
This parameter defines the region of interest (ROI) for processing. Image parts outside of the union of the ROI and "Processing 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 Gray Value:
This parameter defines the "Minimum Gray Value" of the objects to be counted. The parameter is set to 0 by default. When an object is selected for the counting, the "Minimum Gray Value" of this object is instantly determined and adopted. All objects with a gray value lower than the specified "Minimum Gray Value" are excluded from the counting. 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 128 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.
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 for processing. Image parts outside of the union of the ROI and "Processing 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. For more information, see Tool State Result
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.
Application Examples
This tool is used in the following MERLIC Vision App examples:
- check_correct_filling_on_3d_height_images.mvapp