A bot to segment foreground from background using a basic three-step algorithm:
> watershed to split touching objects
Usage: call 'thresholdSegmentationBot' and follow the instructions.
If you have image data already loaded as a double, grayscale, range [0,1] image I,
use thresholdSegmentationTool as in the example below:
I = imread('rice.png');
I = double(I)/255;
I = imtophat(I,strel('disk',12,0')); % background subtraction
TST = thresholdSegmentationTool(I);
% use tool, then click 'Done Setting Parameters'
The final segmentation mask can then be accessed at TST.FinalMask,
and the segmentation model at TST.ThrModel.
The threshold models can be passed to
thresholdSegmentationHeadlessBot for batch processing.
call siameseThresholdSegmentationBot for a version that admits two images side by side.
This can be used to test the same set of parameters in two images simultaneously.
siameseThresholdSegmentationHeadlessBot is the corresponding function for batch processing.
Video tutorial: https://youtu.be/0ylCDfWzJS0
Sample data: https://www.dropbox.com/s/f0abxekladzcf5y/Nuclei.zip?dl=0
MatBots are primitive AIs, 'assistants' if you will, that use minimalistic GUI dialogs to guide the user through a data processing pipeline in Matlab.
Isn't that an 'app'? Bots are much more restrictive than apps. Users are, to a greater extent than in an app, guided through the correct steps to perform a task. A bot usually performs a much more limited task than an app.
When possible, bots have a 'headless' mode, which allows them to execute a processing pipeline as a typical Matlab function, either on an image or a folder of images.
For more bots and tools for bio-image analysis, see https://hms-idac.github.io/MatBots/
Marcelo Cicconet (2023). ThresholdSegmentationBot (https://www.mathworks.com/matlabcentral/fileexchange/64725-thresholdsegmentationbot), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!