Skip to content
Snippets Groups Projects
Commit 031427a3 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

depth to disparity

parent e41bf418
No related branches found
No related tags found
2 merge requests!214feature/python,!208Python: HEVC depth decoding
Pipeline #17753 passed
......@@ -8,6 +8,13 @@ def disparity_to_depth(disparity, camera, max_depth=10.0, invalid_value=0.0):
depth[depth > max_depth] = invalid_value
return depth
def depth_to_disparity(depth, camera, invalid_value=0.0):
invalid = depth == 0.0
depth[invalid] = 1.0
disparity = ((camera.fx * camera.baseline) / depth) + camera.doff
disparity[invalid] = invalid_value
return disparity
from enum import IntEnum
# components/codecs/include/ftl/codecs/hevc.hpp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment