Creating a depth map from the disparity map function

Hi everyone, I am having trouble with the following code:
I want to create a depth map from the disparityBM function, by applying the equation of , where z is the depth, f is the focal length, b is the baseline and d is the disparity.
However, the depth map I receive is not intuitive, as ideally the object in white should be in black and the background around it should be in white.
Please can I request guidance on how to fix my code? Thank you!

回答 (1 件)

Qu Cao
Qu Cao 2022 年 2 月 17 日

0 投票

You can use reconstructScene for your workflow.

3 件のコメント

Arijit Bhattacharyya
Arijit Bhattacharyya 2022 年 2 月 17 日
@Qu Cao We tried to use this function and it returns this error:
When we use this for stereo rectification, it returns this error:
Qu Cao
Qu Cao 2022 年 2 月 17 日
You need to call rectifyStereoImages before calling reconstructScene. See the following example:
https://www.mathworks.com/help/vision/ref/reconstructscene.html
Arijit Bhattacharyya
Arijit Bhattacharyya 2022 年 2 月 17 日
@Qu Cao When we call rectifyStereoImages before calling reconstructScene we get the following error:

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeComputer Vision Toolbox についてさらに検索

製品

リリース

R2021b

質問済み:

2022 年 2 月 17 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by