Refactor depth reference handling and cleanup
- Unified reference depth calculation to use a single implementation in common/depth.py. - Removed server-side reference depth computation and adjusted depth.json to only include image_size and intrinsics. - Updated depth texture handling to ignore transparent, invalid, and non-positive pixels when calculating reference depth. - Changed reference depth calculation to use the 95th percentile of valid depth values. - Adjusted depth direction fitting to return a flat direction when no samples are available. - Removed cleanup threshold parameters from Cutout and related nodes, simplifying the interface. - Updated tests to verify new reference depth logic and ensure compatibility with existing functionality.
This commit is contained in:
@@ -94,7 +94,7 @@ def test_saved_parameter_descriptions_match_definitions():
|
||||
thickness = next(item for item in sockets if item.name == "Thickness")
|
||||
direction = next(item for item in sockets if item.name == "Depth Direction")
|
||||
offset = next(item for item in sockets if item.name == "Depth Offset")
|
||||
assert offset.default_value == pytest.approx(1.0)
|
||||
assert offset.default_value == pytest.approx(0.0)
|
||||
assert (offset.min_value, offset.max_value) == (-10.0, 10.0)
|
||||
assert offset.subtype == "DISTANCE"
|
||||
assert direction.parent == thickness.parent == offset.parent
|
||||
|
||||
Reference in New Issue
Block a user