
Label connected components in 2D array 1.0 File ID: 82126 


 Label connected components in 2D array 1.0 License: Shareware File Size: 10.0 KB Downloads: 12
Submit Rating: 



Label connected components in 2D array 1.0 Description 

Description: LABEL is a generalization of BWLABEL: BWLABEL works with 2D binary images only, whereas LABEL works with 2D arrays of any class. L = LABEL(I,N) returns a matrix L, of the same size as I, containing labels for the connected components in I. Two adjacent components (pixels), of respective indexes IDX1 and IDX2, are connected if I(IDX1) and I(IDX2) are equal.
N can have a value of either 4 or 8, where 4 specifies 4connected objects and 8 specifies 8connected objects; if the argument is omitted, it defaults to 8. Important remark:  NaN values are ignored and considered as background. Because LABEL works with arrays of any class, the 0s are NOT considered as the background.
Note:  The elements of L are integer values greater than or equal to 0. The pixels labeled 0 are the background (corresponding to the NaN components of the input array). The pixels labeled 1 make up one object, the pixels labeled 2 make up a second object, and so on. [L,NUM] = LABEL(...) returns in NUM the number of connected objects found in I.
[L,NUM,SZ] = LABEL(...) returns a matrix SZ, of the same size as I, that contains the sizes of the connected objects. For a pixel whose index is IDX, we have: SZ(IDX) = NNZ(L==L(IDX)).
Examples:  Enter "help label" in the Matlab Command Window for two examples.
 http://www.biomecardio.com/matlab  
More Similar Code 

accumconncomps creates vectors by accumulating elements in one vector using the connected components in another vector of same size. Connected components are regarded as subsequent, identical elements in a vector.
Example: Sum the values in val according to the connected components in cc. cc = [1 1 2 1 1 1 3 3 3 4 2 2]; val = [2.3 1.2 5 3 2 5 3.2 4.5 2 ... 2.2 1.2 2.2]; [c,valnew] =...
The program can get the 2D impulse response of a 2D recursive discrete system in 2D digital domain. For a 2D recursive discrete system, the inverse 2D z transform can be implemented by a 2D IIR filter [13]. Copyright (C) Yang XIAO,...
Matlab implementation of a monodomain reactiondiffusion model in 2D. The model equations are a variant of the FitzhughNagumo equations modified to simulate the cardiac action potential. The progression of the two normalized state variables,...
Takes an excel file, dumps out a series of CSV files (one for each sheet, named for the file and sheet) and a YAML file (an array of sheets, each sheet a dict containing the table_name and the table_data, a 2d array of cell values).
gdopContour shows a psuedocolor image of the PDOP (GDOP in 2D is referred to as PDOP). xmin/xmax/ymin/ymax are the limits on the plot. SVs is an [x,y] matrix showing the position of the "Space Vehicles" (GPS terminology). You can have...
2D dos Game(like space commanders ) is a 2d sprites based game.
It involves important concepts of game design issues such as timing a game, collisiondetection etc. It is a DOS based game which uses MODE 13H which has a resolution of...
The program can get spatialtime response of 2D ContinuousDiscrete systems by taking inverse 2D Laplacez transform [1]. The detailed algorithm is provided in Ref. [1]. Copyright (C) Yang XIAO, BJTU, July 28, 2007, EMail:...
You can follow the examples given in the codes, to construct your 2D fuction in 2D Laplace transform domain, insert it into the place of our examples, then you can get the inverse 2D Laplace transform of your function.
LABEL is a generalization of BWLABEL: BWLABEL works with 2D binary images only, whereas LABEL works with 2D arrays of any class. L = LABEL(I,N) returns a matrix L, of the same size as I, containing labels for the connected components...
The program can test the stability of 2D face of an interval matrix. Copyright (C) Yang XIAO, Beijing Jiaotong University, Aug.2, 2007, EMail: yxiao@bjtu.edu.cn. By relying on a twodimensional (2D) face test, Ref [1,2] obtained a... 
User Review for Label connected components in 2D array 
