blob_label — BLOB connect op

Data kinds: masklabels2d

Call: import blob2d; blob2d.blob_label(region: 'Any', connectivity: 'int' = 8) -> 'np.ndarray' (or opsblob.get("blob_label"))

Usage

> This operator's description has not been translated yet. The original text follows as it is.

二値領域を連結成分に分け、`int32` のラベル画像(背景 0、物体 1..n)を返す。

Parameters

----------

region : array_like

2-D。`> 0` が前景(bool でも実数でもよい。NaN は背景)。

connectivity : {4, 8}

斜めに触れる 2 画素をつなぐか。既定 8 は `ndimage.label` と

HALCON `connection` の既定に一致する。**4 にすると斜めに接した塊が

別々に数えられる**。

Returns

-------

numpy.ndarray

`(H, W)int32`。番号は 1 から連番で歯抜けが無い。

Examples

--------

>>> import numpy as np

>>> m = np.zeros((6, 9), bool); m[1:4, 1:4] = True; m[1:4, 5:8] = True

>>> int(blob_label(m).max())

2

Detailed usage guide

blob_analysis family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

poc_gear_tooth_metrologypy -3.11 examples/poc_gear_tooth_metrology.py

poc_nuclei_ploidypy -3.11 examples/poc_nuclei_ploidy.py

poc_particle_sizingpy -3.11 examples/poc_particle_sizing.py

poc_particle_trackingpy -3.11 examples/poc_particle_tracking.py

poc_sea_ice_concentrationpy -3.11 examples/poc_sea_ice_concentration.py

poc_timelapse_growthpy -3.11 examples/poc_timelapse_growth.py

poc_traffic_countingpy -3.11 examples/poc_traffic_counting.py

poc_vessel_networkpy -3.11 examples/poc_vessel_network.py

poc_wound_area_trackingpy -3.11 examples/poc_wound_area_tracking.py

Ops the type connects to (they accept labels2d as input)

blob_features · blob_select · blob_select_largest · blob_split · blob_region · blob_boundaries · blob_overlay

Same category (connect)


*Provenance: blob2d.py — BLOB operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.