contour_following

CONTOUR_FOLLOWING takes a B&W image, returns the sorted contour points.
3,8K download
Aggiornato 21 mag 2007

Nessuna licenza

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.

Cita come

Francois Mourougaya (2025). contour_following (https://it.mathworks.com/matlabcentral/fileexchange/14947-contour_following), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R14
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0

Corrected a minor bug.