Detect Stain
Use this tool to detect stains on surfaces. For this tool easyTouch is available.
Parameters
Basic Parameters
Image:
This parameter represents the image in which stains should be detected.
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.
Stain Diameter:
This parameter defines the diameter of the stains to be detected. It is defined in pixels and set to 10 px by default. When a stain is selected for detecting, the "Stain Diameter" of this stain is instantly determined and adopted. However, you may also change its value manually at the corresponding connector.
Stain Contrast:
The "Stain Contrast" defines the contrast in gray values of the stains relative to the background. The parameter is set to the value 10 by default. When a stain is selected for detecting, the "Stain Contrast" is instantly determined and adopted. However, you may also change its value manually at the corresponding connector.
Stain Property:
This parameter defines the property, whether the stains appears dark or light with respect to the background. It is set to "light" by default. If necessary, you can change the value at the corresponding connector.
|
Value |
Description |
|---|---|
|
light |
Use this value, if the stains to be detected appear light on a dark surface. If this value is set, all light stains are included in the detection. |
|
dark |
Use this value, if the stains to be detected appear dark on a light surface. If this value is set, all dark stains are included in the detection. |
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 Area:
This parameter defines the "Minimum Area" of the stains to be detected. It is defined in pixels and set to 2 px by default. All stains with an area lower than the specified "Minimum Area" are excluded from the detection. When a stain is selected for detecting, the "Minimum Area" of this stain is instantly determined and adopted. However, you may also change its value manually at the corresponding connector.
Maximum Area:
This parameter defines the "Maximum Area" of the stains to be detected. It is defined in pixels and set to 1 000 px by default. All stains with an area higher than the specified "Maximum Area" are excluded from detecting. When a stain is selected for the counting, the "Maximum Area" of this stain is instantly determined and adopted. However, you may also change its value manually at the corresponding connector.
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
Stain:
This result contains the region of the detected stains.
Number:
This result contains the "Number" of detected stains 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:
- count_defect_clusters.mvapp