lane op• データ種: rgbimage × table → table
• 呼び出し: import fullseye as fs; fs.ledger.color_rule_mask(image, rules=None) (実装を直接呼ぶなら import laneops; laneops.color_rule_mask(image, rules=None)、台帳から引くなら opsdrive.get("color_rule_mask"))
• GPU: なし(CPU 参照実装のみ)
RGBを明示的なHSV規則で白線・黄線・不明に分け、maskと確信度を返す。
trans_from_rgb の既存実装でRGB→HSVに変換する。白と黄のscoreを独立に計算して最大scoreを採るため、rulesをlistで渡した順序には依存しない。scoreが min_class_confidence未満、または上位2色の差がambiguity_margin以下なら unknownに棄却する。影・逆光・濡れ路面に合わせた自動較正はしない。
image : (H, W, 3) rgbimage
0..1の有限なRGB画像。
rules : table or None
名前付きしきい値の上書き。[{"name":"white", "min_value":...}, ...]も可。
table
labels(0 unknown, 1 white, 2 yellow)、各mask、confidence、色ごとのscore、HSV、使った規則。
English: classify finite RGB pixels as white, yellow or unknown with explicit HSV thresholds after the existing trans_from_rgb conversion. Ambiguous pixels are rejected. White additionally requires local value contrast, so a uniformly bright road is not a white line; this is a fixed classical rule, not an illumination estimator.
呼び出し例::
import numpy as np
import laneops
rgb = np.array([[[0.9, 0.9, 0.9], [0.9, 0.75, 0.05], [0.3, 0.3, 0.3]]])
out = laneops.color_rule_mask(rgb, {})
assert out["labels"].tolist() == [[1, 2, 0]]
• サンプルデータ カタログ(DL URL / ライセンス) — 2-D は skimage.data(BSD/public)+ 合成、3-D は実データ源(Stanford/PDS 等)の DL URL。
• 演算子の来歴・参考文献 — この op 族の元になった研究/手法の出典。
• アルゴリズムの正典(著者・年)と用途は上記ファミリ使い方ガイドに記載。
• lane_ops_tour — py -3.11 examples/lane_ops_tour.py
table を入力に取れる)course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same
lane)plane_topview_color · lane_boundary_fit · lane_center_path · stop_line_detect
*Provenance: laneops.py — DRIVE operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.