Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
Checks each pixel of a logical array to see if it is connected to other pixels in at least two directions. If it's not, it attempts to draw connections to the nearest unconnected pixel until it is, or until it reaches the maximum layer, rMax.
The region and checking order of nearby pixels are given by the edgeVecs vector (see edgeVecs folder), and r indexes the layers to check.
The goal is to take an outline with holes and breaks and create a continuous boundary which can then be used with e.g. imfill(mask,'holes') to create a contiguous region.
**Note**
The behavior of the algorithm can be changed by editing the edgeVecs array, which makes it very flexible to specific applications, while still allowing a general user to use a common pattern from the sample folder.
I have optimized it as much as possible and created a mex function which is very fast.
Citation pour cette source
Keith Coffman (2026). Connect Pixels (https://fr.mathworks.com/matlabcentral/fileexchange/57062-connect-pixels), MATLAB Central File Exchange. Extrait(e) le .
Remerciements
Inspiré par : Bresenham optimized for Matlab
Informations générales
- Version 1.2.0.0 (4,06 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.2.0.0 | Optimized file for speed, added edgeVecs functionality, and added example files. |
||
| 1.0.0.0 | (Added note on the use of edgeVecs array) |
