Parameter-Adjustable Semi-Automatic Tool
What is a Parameter-Adjustable Semi-Automatic Tool
A Parameter-Adjustable Semi-Automatic Tool is an image segmentation tool that combines user-defined parameter adjustments with algorithm-driven automation. It allows users to flexibly control the segmentation process by fine-tuning key parameters (e.g. thresholds, cell size, and intensity range) while leveraging algorithms for efficient batch processing. This type of tool sits between fully manual annotation (high precision but time-consuming) and fully automated methods (such as deep learning, which requires large datasets and may lack adaptability). It is particularly suitable for the following scenarios:
Medium-scale data processing — More efficient than manual annotation while avoiding errors from insufficient training data in fully automated tools.
Diverse experimental conditions – Flexible parameter tuning accommodates different staining types (DAPI, H&E, multi-channel fluorescence) and varying cell densities (sparse vs. dense regions).
Reproducibility – Once parameters are set, parameters can be reused for consistent and repeatable segmentation results.
This approach offers an ideal balance of speed, flexibility, and precision, making it a powerful tool for biological image analysis in research and clinical applications.
Understanding Segmentation Parameters
Nucleus parameters
Float (>=0, default 8.00). Radius for background estimation, should be > the largest nuclues radius. Set to 0 to disable background correction. Tip: Set a higher value for dense cell images.


Boolean (default on). Use opening-by-reconstructon for background estimation. Opening by reconstruction tends to give a "better' background estimate. because it icorporates more information across the image tile used for cell detection. However in some cases (e.g. image with prominent folds, background staining, or other artifacts) this can cause problems, with the background estimate varying substantially between tiles. Tip: Turn off if background correction causes unexpected issues.


Float (>=0, default 0.00). Radius of median filter used to reduce image texture. Tip: Increase this value for smoother segmentation in noisy images.


Float (>=0, default 1.50). Sigma value for Gaussian filter used to reduce noise; increasing the value stops nuclei being fragmented, reduce the accuracy of boundaries. Tip: Use a smaller value if you need to detect small cells.


Minimum area
Float (>=0). Detected nuclei with an area < minimum area will be discarded. Tip: Set a lower value for small-cell images to avoid losing valid nuclei.


Maximum area
Float (>=0). Detected nuclei with an area > maximum area will be discarded. Tip: Increase for images with large cells.


Intensity parameters
Float (≥ 0). Intensity threshold. The detected nuclei must have a mean intensity >threshold.
Default values:
8-bit grayscale image: 25.00
16-bit grayscale image: 100.00
Color image: 0.1
Tip: Adjust this value based on image type and background complexity.


Boolean (default on). Smooth the detected nucleus/cell boundaries. Tip: If disabled, edges may appear jagged. Enable this for more clear segmentation masks.


Tips to Optimizing Segmentation Results
Recommended order for fine-tuning parameters
Start with smaller sections to fine-tune your parameters, as this speeds up computation and allows quicker visualization of results.
Be aware that the automated tool only updates the segmentation within your selected region, so cells at the edges of the selection box will have rigid boundaries.
To avoid this issue, you can either select the entire tissue region to ensure smooth segmentation across the tissue, or use the drawing tools to fix any misclassified cells while maintaining the accuracy of the rest of the segmentation.
Minimum & Maximum Area
Adjust the cell size range to exclude artifacts or misdetections.
Increase to remove texture noise or small artifacts, but too high a value may lead to loss of cellular structures.


Increase to reduce noise and smooth boundaries.
Decrease to sharpen cell edges and retain fine details, such as the boundaries between cells.


Controls background estimation, affecting overall signal balance. Identifies cells and background in the image, and provides a comprehensive evaluation of features in adjacent regions.
Sparse cell regions: Use a larger radius for smoother background correction.
Dense cell regions: Use a smaller radius to retain more details.


Distinguish cell nuclei from the background. For color images with complicated backgrounds (e.g., H&E staining), it is recommended to set a smaller threshold.

Different staining types
Generally, Watershed segmentation algorithm performs better on grayscale images (e.g., ssDNA, DAPI, IF) compared to color images (e.g., H&E). This is because the algorithm treats the image as a topographic surface, where high intensity denotes peaks and low intensity denotes valleys. In grayscale images, this relationship is straightforward, making segmentation more effective. (docs.opencv.org)
In contrast, color images have multiple channels (e.g., red, green, blue), which may make segmentation more complicated. To simplify the process, color images are often converted to grayscale, and the grayscale values are normalized to the range [0, 1] before applying the Watershed algorithm.
For grayscale images
Threshold: Set a higher intensity threshold to separate cell nuclei from the background effectively.
Minimum/Maximum Area: Adjust based on the expected cell size to filter out noise and artifacts.

For color images
Sigma: Increase to reduce noise and smooth image boundaries.
Threshold: Set a lower intensity threshold (≤ 1) to achieve better segmentation results.

Dense vs. sparse cell regions
For dense cell regions:
Background Radius: Use a smaller background radius to preserve fine details.
Maximum Area: Lower the value to prevent cell merging.
For sparse cell regions:
Background Radius: Use a larger background radius to effectively subtrack large-scale background variantions.
Minimum Area: Increase cell size to reduce background noise misidentification.

Troubleshooting & Frequently Asked Questions
Q: Why do threshold defaults change depending on the image type?
A: Each image type has a different intensity scale. For example:
8-bit grayscale images range from 0 to 255, so the default is 25.00.
16-bit grayscale images range up to 65,535, so the default is 100.00.
Color images often use a 0–1 scale, so the default is 0.1.
These defaults are chosen to help distinguish foreground (like cells) from background under typical conditions. Of course, you can adjust them based on your specific image.
Last updated