stop_line_detect — DRIVE lane op

• Data kinds: labels × table → table

• Call: import fullseye as fs; fs.ledger.stop_line_detect(labels, lane_model) (to call the implementation directly, import laneops; laneops.stop_line_detect(labels, lane_model); from the registry, opsdrive.get("stop_line_detect"))

• GPU: none (CPU reference implementation only)

Usage

Detect the stop line and Japanese-style crosswalk as separate typed outputs.

> The detailed description below is the original text — the summary and the headings are translated.

白画素を車線内へ切り、連結片を世界座標へ写す。同じ前方距離の遮蔽片を結合し、車線接線への直交角、幅、厚さで停止線を判定する。日本式の横断歩道は、車の進行方向と平行な細長い白線を道路幅方向に並べる様式なので、長手が接線方向・幅が道路幅方向に細い片を横断歩道縞として数える。同一の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

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)

• lane_ops_tour — py -3.11 examples/lane_ops_tour.py

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

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (lane)

color_rule_mask · plane_topview_color · lane_boundary_fit · lane_center_path


*Provenance: laneops.py — DRIVE 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.