You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Perfect for the beginner, this demo illustrates simple object detection (segmentation, feature extraction), measurement of various characteristics (area, etc.), and filtering (extracting only certain objects).
First it finds all the objects (coins), then filters results to pick out objects of certain diameters. The basic concepts of thresholding, labeling, and regionprops are demonstrated with a simple example.
It's a good tutorial for those users new to MATLAB's image processing capabilities to learn on, before they go on to more sophisticated algorithms.
Requires the Image Processing Toolbox because it demonstrates some functions supplied by that toolbox, plus it uses the "coins" demo image supplied with that toolbox.
Tested with R2008b through R2022a.
Cite As
Image Analyst (2026). Image Segmentation Tutorial (https://nl.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: Cell_Analyzer, SimpleColorDetectionByHue(), Image segmentation using fast fuzzy c-means clusering, M-code for leaf identification
General Information
- Version 1.7.0.0 (10.7 KB)
MATLAB Release Compatibility
- Compatible with R2008b and later releases
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.7.0.0 | Better comments. Now blobs are labeled with the label number. Made sure it runs with r2022a. |
||
| 1.6.0.0 | Updated for R2015a. |
||
| 1.5.0.0 | Renamed main title and altered description slightly. |
||
| 1.4.0.0 | Spelling correction in the description. |
||
| 1.3.0.0 | Updated description and made change to how labeled image is displayed. |
||
| 1.1.0.0 | Added label numbers to each blob. Extracted each blob to a separate image. |
||
| 1.0.0.0 |
