plate_mesh_from_image — DRIVE roadjp op

• 数据种类:rgba → table

• 调用: import fullseye as fs; fs.ledger.plate_mesh_from_image(rgba, width: 'float', height: 'float', *, cell: 'int' = 4, thickness: 'float' = 0.004, back_color=(0.55, 0.55, 0.55), label: 'int' = 4) -> 'dict'(要直接调用实现,import roadjp; roadjp.plate_mesh_from_image(rgba, width: 'float', height: 'float', *, cell: 'int' = 4, thickness: 'float' = 0.004, back_color=(0.55, 0.55, 0.55), label: 'int' = 4) -> 'dict';从台账取用则 opsdrive.get("plate_mesh_from_image"))

用法

将 RGBA 图像转换为带面颜色的薄板网格(mesh)。

将图像切成 cell × cell 像素的区块,只把 alpha 平均值在 0.5 以上的区块做成面(2 个三角形)。面的颜色 = 该区块以 alpha 加权的平均色 Σ(α·rgb) / Σα。正面的法线 = −x(在 yaw 0 时朝向沿 +x 驶来的车), 背面形状相同,颜色为 back_color(法线 +x)。原点 = 板的中心,板位于 y-z 平面(图像的左 = +y、上 = +z), 厚度 thickness 沿 x 方向分配为 ±一半。不保留未使用的顶点(以便从顶点测量尺寸)。

返回值 {"V", "F", "color", "label", "front_faces": (0, n), "back_faces": (n, 2n), "cells": (rows, cols)}。空输入(rgba 为 0 个元素)会引发 ValueError。

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

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

可运行的示例(实际调用该算子并已验证的样例)

• gallery_drive_japan_roads — py -3.11 examples/gallery_drive_japan_roads.py

类型可衔接的下一个算子(可接受 table 作为输入)

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

同类别(roadjp)

sign_params · sign_image · sign_mesh · add_sign · signal_jp_mesh · add_signal_jp


*Provenance: roadjp.py — DRIVE 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

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