ftlLabel

버전 0.9.1 (6.02 KB) 작성자: Nick Schaub
Fast, toolbox free connected component labeling
다운로드 수: 97
업데이트 날짜: 2019/3/5

라이선스 보기

FTLLABEL Fast, toolbox free connected component labeling

I = FTLLABEL(I) finds 8-connected components in logical matrix I
I = FTLLABEL(I,CONN) finds components with CONN connectivity
[I,num] = FTLLABEL(I) returns the number of objects [num]

FTLLABEL('compile') - Compile the mex file for faster labeling

[Example 1 - General Usage]
I = imread('text.png') % load a demo image
L = ftlLabel(I); % label the connected components
figure, imagesc(L); % visualize the output

[Example 2 - Use the Mex Version]
% Compile the mex file, then use it
ftlLabel('compile'); % compile mex, must be in ftlLabel.m directory
I = imread('text.png') % load a demo image
L = ftlLabel(I); % label the connected components
figure, imagesc(L); % visualize the output

[Inputs]
I - A 2-dimensional matrix, must be logical type
CONN - Connectivity, must be 1 (4-connected) or 2 (8-connected)

[Outputs]
I - A matrix of labeled objects
num - Number of objects

[Toolbox Requirements]
None

[Additional Information]
This function was developed to replace bwlabel for big images. It
maintains a small memory footprint, and the labeled image it returns uses
the smallest integer type required to store all object labels. In
comparison to bwlabel, the m-file function performs slightly worse on
small images (<1 megapixel), but performs significantly better on large
images.

The mex version runs 4-20x faster than bwlabel for any image.
NOTE: The mex file should be compiled using mingw64. This file uses the
interleaved complex API, meaning it will not compile in Matlab versions
prior to 2018a.

Parts of this algorithm mirror the "Light Speed Labeling" algorithm:
http://www-soc.lip6.fr/~lacas/Publications/ICIP09_LSL.pdf

[TODO]
1. Expand support for n-dimensional images
2. Additional mex optimization using different AVX instructions

See also BWLABEL

Author: nicholas.j.schaub@gmail.com
Created: 2-17-2018
Updated: 3-1-2019 - Added first mex version, added num as an output

인용 양식

Nick Schaub (2024). ftlLabel (https://www.mathworks.com/matlabcentral/fileexchange/70323-ftllabel), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
0.9.1

Minor bug fixes. Made code more modular.

0.9

Added mex, added number of objects as an output

0.8.1

Minor bug fixes.

0.8.0