You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
C = CONTOUR_FOLLOWING(BW) takes BW as an input. BW is a binary array containing the image of an object ('1': foreground, '0': background). It returns a circular list (N x 2, C(1,:)=C(end,:)) of the (row,column)-coordinates of the object's contour, in the order of appearance (This function was inspired from the freeman contour coding algorithm).
Note:
- if the object is less than 3 pixels, CONTOUR_FOLLOWING sends back [0 0].
- the algorithm is quite robust: the object can have holes, and can also be only one pixel thick in some parts (in this case, some coordinates pair will appear two times: they are counted "way and back").
This function was originally developed in order obtain an initialization for a snake algorithm.
The .zip files contains some example images and a test script.
Cite As
Francois Mourougaya (2026). contour_following (https://www.mathworks.com/matlabcentral/fileexchange/14947-contour_following), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (3.76 KB)
-
No License
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 | Corrected a minor bug. |