Merge branch 'main' of ssh://892887cvmk08.aicp.io:24928/orisys-tech/orisys-app

This commit is contained in:
ykcheungab
2026-10-10 14:16:03 +08:00
parent f5ba64e01a
commit cf86bd0702
14 changed files with 118 additions and 4 deletions
+14
View File
@@ -52,6 +52,20 @@ def test_depth_arrows_draws_the_flow_on_the_depth_picture():
assert not np.array_equal(over, plain)
def test_depth_display_threshold_uses_base_colour_without_changing_source():
depth = np.array([[0.1, 0.4, 0.8]], dtype=np.float32)
original = depth.copy()
frame = backend.ImageFrame(_image(1, 3), depth=depth)
plain = backend.render_image(frame, mode="depth", depth_range=(0.0, 1.0))
tuned = backend.render_image(
frame, mode="depth", depth_range=(0.0, 1.0), depth_threshold=0.5
)
assert plain is not None and tuned is not None
assert np.array_equal(tuned[0, 0], tuned[0, 1])
assert np.array_equal(tuned[0, 2], plain[0, 2])
assert np.array_equal(depth, original)
def test_a_recorded_frame_is_raw_and_says_so():
"""No flow and no depth: the frame *is* the picture, and the note explains it."""
plan = backend.plan_image(backend.ImageFrame(_image(), source=backend.SOURCE_REPLAY))