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.