question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Add `depth_to_disparity` and `disparity_to_depth` methods in `StereoCamera` class

See original GitHub issue

🚀 Feature

Two methods to convert between disparity and depth maps. This should be batched and be general, i.e. the normal conversion depth = (baseline * focal length) / disparity) doesn’t work for different focal lengths.

Motivation

Some downstream tasks in 3D vision uses depth maps rather than point clouds or disparity maps.

Pitch

Add two new methods:

  • disparity_to_depth
  • depth_to_disparity

To the StereoCamera class. Both methods should take as input a tensor of shape (B, H, W, 1) and return the same shape. Core logic should be separated into its own function and there should be extensive tests. Tests can utilize already added test data in the test_stereo.py module.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nitaifingerhutcommented, Mar 23, 2022

I can also guide you through this or maybe do it myself if I’ll find the time

1reaction
copaahcommented, Nov 6, 2021

@ankitajais20

Do you still want to contribute to this? I can supervise you if you have any questions - just ping me here or on slack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stereo Camera Depth Estimation With OpenCV (Python/C++)
In this post, we discuss classical methods for stereo matching and for depth perception. We explain depth perception using a stereo camera and ......
Read more >
Stereo & 3D Vision - Washington
This method of determining depth from disparity d is called triangulation. Note that depth is inversely proportional to disparity ...
Read more >
Chapter 11. Depth
A common method for extracting such depth information from intensity images is to acquire a pair of images using two cameras displaced from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found