stop_line_detect — DRIVE lane op

• 資料種類:labels × table → table

• 呼叫: import fullseye as fs; fs.ledger.stop_line_detect(labels, lane_model)(要直接呼叫實作,import laneops; laneops.stop_line_detect(labels, lane_model);從台帳取用則 opsdrive.get("stop_line_detect"))

• GPU:無(僅 CPU 參考實作)

用法

將停止線和日式行人穿越道作為獨立的型別化輸出進行偵測。

> 以下的詳細說明為原文 —— 摘要與標題已翻譯。

白画素を車線内へ切り、連結片を世界座標へ写す。同じ前方距離の遮蔽片を結合し、車線接線への直交角、幅、厚さで停止線を判定する。日本式の横断歩道は、車の進行方向と平行な細長い白線を道路幅方向に並べる様式なので、長手が接線方向・幅が道路幅方向に細い片を横断歩道縞として数える。同一の8近傍成分に停止線と縦縞が接しても、まず各前方位置の横方向の帯を取り出して停止線候補を残す。縞は別に横方向へ束ね、停止線とは別の横断歩道表として手前/奥の弧長、幅、縞数、縞幅、白線間隔、確信度を返す。縞の間隔が法令の範囲外なら横断歩道と断定しない。別様式の横断歩道はこのopの入力契約外である。

様式の一次情報: 道路標識、区画線及び道路標示に関する命令(昭和三十五年総理府・建設省令第三号)別表第6の横断歩道(201)および停止線(203)、e-Gov法令検索

https://laws.e-gov.go.jp/law/335M50004002003 。警察庁の設置基準では201の幅員は原則4 m(縮小しても3 m以上)、白線間隔は45--90 cm、51 cm以上の間隔では5本以上、原則等間隔(差10 cm以内)である。

https://www.npa.go.jp/laws/notification/koutuu/kisei/kisei20240726_4.pdf 。BEVでは各端を1画素までしか測れないため、接線・法線へ投影した別々の画素フットプリントを使う。画像端に達した候補は legal_compliance="unconfirmed" とし、法令適合を断定しない。

Parameters

labels : (H, W) labels

color_rule_maskのlabelを俯瞰へ写したもの。1だけを白として使う。

lane_model : table

path(世界xy), lane_width と pixel_to_world(俯瞰画素col,row→世界xy)。

Returns

table

停止線のfound、ambiguous、経路始点からのdistance[m]、width[m]、

confidence、候補に加え、別の型付き crosswalk 表と同じ値の

crosswalk_found、crosswalk_near_distance、crosswalk_far_distance、

crosswalk_width、crosswalk_stripe_count、crosswalk_stripe_width、

crosswalk_stripe_spacing、crosswalk_confidence、観測した縞数

observed_crosswalk_stripe_countを返す。互換用のrejected_crosswalkは、

実際に法令条件で棄却した縞だけを数える。

English: find wide white components nearly perpendicular to the lane tangent and merge fragments split by occlusion. It returns a separate typed crosswalk table. The supported Japanese crosswalk style is a set of long lane-parallel, laterally narrow stripes, per Road Sign, Road Marking and Road Surface Marking Order, Appended Table 6, crosswalk (201) and stop line (203), e-Gov https://laws.e-gov.go.jp/law/335M50004002003 . Its clear stripe gaps requires 3 m width even when reduced (normally 4 m), 0.45--0.90 m clear gaps, at least five stripes when a gap is 0.51 m or wider, and gaps within 0.10 m, per the National Police Agency installation standard. It uses separate pixel footprints projected on the local path tangent and normal; an image-edge candidate is returned as unconfirmed rather than legally compliant. Other national styles are outside this op's contract. It validates every path segment and an affine nonsingular BEV mapping first. Distance is arc length from path[0].

呼び出し例::

import numpy as np

import laneops

labels = np.zeros((201, 81), np.int16); labels[100:104, 8:73] = 1

H = np.array([[.05,0.,-2.],[0.,-.05,10.],[0.,0.,1.]])

lane = {"path":np.c_[np.zeros(101), np.linspace(0.,10.,101)], "lane_width":3.5, "pixel_to_world":H}

out = laneops.stop_line_detect(labels, lane)

assert out["found"] and abs(out["distance"] - 5.0) < 0.11

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者、年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• 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)

color_rule_mask · plane_topview_color · lane_boundary_fit · lane_center_path


*Provenance: laneops.py — DRIVE 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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