Binary Image Cleaning Based on Area Size
No License
function sizethre(im,s,mode);
input: im=binary image matrix. 0 is background. 1 is foreground
input: s=pixel number
mode: string varable. It should either be 'up' or 'down'
when mode='up', area LARGER than s is DELETED
when mode='down', area SMALLER than s is DELETED
output: imout is an image matrix. size(imout)=size(im)
foreground whose area is larger (or smaller, depending on 'mode') is
preserved; otherwise, it is deleted (marked as background);
Zhe Wu 01-08-2002 @ University of Rochester
Cite As
Zhe Wu (2024). Binary Image Cleaning Based on Area Size (https://www.mathworks.com/matlabcentral/fileexchange/4140-binary-image-cleaning-based-on-area-size), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > Morphological Operations >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |