plant_color_index — SEGMENTATION plant op

• Data kinds: rgbimage → table

• Call: import fullseye as fs; fs.ledger.plant_color_index(rgb, *, index: 'str' = 'exg', dark_floor: 'float' = 0.02) -> 'Dict[str, object]' (to call the implementation directly, import cropweed; cropweed.plant_color_index(rgb, *, index: 'str' = 'exg', dark_floor: 'float' = 0.02) -> 'Dict[str, object]'; from the registry, opssegmentation.get("plant_color_index"))

Usage

Per-pixel plant colour indices from the three visible bands (ExG, ExR, ExGR, CIVE, NGRDI, VEG).

rgb is (H, W, 3). uint8 is divided by 255; float outside [0, 1] is refused. index is exg / exr / exgr / cive / ngrdi / veg. ExG, ExR, ExGR, CIVE and VEG use the chromatic coordinates r = R/(R+G+B), g, b; only NGRDI uses the raw (G − R)/(G + R). Pixels whose brightness (mean of RGB) is below dark_floor have chromaticity set by noise, so no value is made (NaN) and valid is False (VEG also drops pixels with r or b = 0, NGRDI those with G + R = 0).

Returns: index (H, W float, NaN = undefined), valid (bool), name, formula, vegetation_sign (+1 for indices that grow with plants, −1 for CIVE and ExR), citation, n_invalid, threshold_zero_is_boundary (True only for ExGR: 0 separates plant and background). Empty input, non-finite values, out-of-range values, unknown index names and images where every pixel is undefined raise ValueError.

Call example: fs.ledger.plant_color_index(img, index="exgr")["index"] > 0 gives the plant pixels.

Detailed usage guide

• halcon_segmentation 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_leaf_disease_area — py -3.11 examples/poc_leaf_disease_area.py

• poc_weed_rice_ratio — py -3.11 examples/poc_weed_rice_ratio.py

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

class_ndim_norm · fisher_lda_score

Same category (plant)

superpixel_color_texture_features · cover_ratio_grade


*Provenance: cropweed.py — SEGMENTATION 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.