バージョン 1.4.0.0 (179 KB) 作成者:
Computes the graph of adjacent regions in a labeled image
ダウンロード: 6.1K

ライセンスの表示

Computes region adjacency graph of a labeled 2D or 3D image.
Two regions are considered as neighbor if they are separated by a small number of pixel in the horizontal or vertical direction, as well as depth direction for 3D images.
The result is a N*2 array, containing 2 indices for each couple of neighbor regions.

usage:
ADJ has the format [LBL1 LBL2], LBL1 and LBL2 being vertical arrays the same size.

LBL1 is given in ascending order, LBL2 is given in ascending order for each LBL1. Ex :
[1 2]
[1 3]
[1 4]
[2 3]
[2 5]
[3 4]

Alternative syntax:
Return two arrays: the first one is a [N*2] array containing centroids of the N labeled region, and ADJ is the adjacency previously described.

For 3D images, the node array is [N*3].

The algorithm proceed in scanning each line (horizontal, vertical, and in z-direction for 3D images), and by detection transitions in the labels. A background gap of width 1 pixel/voxel is assumed to exist between regions. It is possible to specify different gaps:

* gap = 0 if regions are contiguous (no background),
* gap = 1, when considering the result of a watershed, for example
* gap > 1 if regions are separated by thick background (some neignborhoods can be missed)

### 引用

David Legland (2024). Region Adjacency Graph (RAG) (https://www.mathworks.com/matlabcentral/fileexchange/16938-region-adjacency-graph-rag), MATLAB Central File Exchange. 取得済み .

すべてのリリースと互換性あり
##### プラットフォームの互換性
Windows macOS Linux
##### カテゴリ
Help Center および MATLAB AnswersGraph and Network Algorithms についてさらに検索

### Community Treasure Hunt

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

Start Hunting!

#### imRAG/html/

バージョン 公開済み リリース ノート
1.4.0.0

avoid duplicate adjacencies for 3D images, update help

1.3.0.0

correct processing of gap>1, and simplification of the code

1.2.0.0

changes the algorithms to remove the 'diff' function, reducing the amount of memory required, and add psb to use different gaps between regions.

1.1.0.0

removed dependencies to image processing toolbox, updated doc

1.0.0.0