回放叠加改用展开底图,并统一 2D/3D 投递。

箭头/采集图像与 live 的 processed_frame 对齐;deliver_measurement 先画 2D 再提交同一包给 3D。已用 overlay、scene3d 与 replay 相关测试验证。
This commit is contained in:
ykcheungab
2026-10-06 21:21:37 +08:00
parent 321e52f47a
commit 829d2c1b53
10 changed files with 519 additions and 125 deletions
@@ -262,6 +262,32 @@ class _Host:
self.frames.append(frame)
def show_analysis_packet(self, packet) -> None:
self.deliver_measurement(packet, advance="flush", paint_2d=False)
def deliver_measurement(
self,
packet,
*,
advance: str = "tick",
arrow_policy=None,
image_source: str | None = None,
paint_2d: bool = True,
) -> None:
if paint_2d:
from orisys_app_shared.acquisition.image_backend import ImageFrame
self.frames.append(
ImageFrame(
getattr(packet, "processed_frame", None),
flow=getattr(packet, "flow", None),
depth=getattr(packet, "depth", None),
valid_mask=getattr(packet, "valid_mask", None),
source=image_source or "replay",
frame_id=int(getattr(packet, "frame_id", 0) or 0),
arrow_policy=arrow_policy,
result_available=True,
)
)
self.analysis_packets.append(packet)
def drop_render_marker(self) -> None: