Connect Pixels

버전 1.2.0.0 (4.06 KB) 작성자: Keith Coffman
Connect pixels into a continuous boundary
다운로드 수: 339
업데이트 날짜: 2016/5/13

라이선스 보기

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.

인용 양식

Keith Coffman (2025). Connect Pixels (https://kr.mathworks.com/matlabcentral/fileexchange/57062-connect-pixels), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2016a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Image Arithmetic에 대해 자세히 알아보기
도움

도움 받은 파일: Bresenham optimized for Matlab

Community Treasure Hunt

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

Start Hunting!

connectDots/

버전 게시됨 릴리스 정보
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)