View my account

Disparity to Depth Conversion for Complex Scenes

Comments

5 comments

  • MartyG

    Hi Temeiwang  I would recommend trying to set disparity-to-depth and depth-to-disparity with bools as suggested in your other case.  That will help to determine whether problems with scenes containing several objects are related to your use of a conversion formula or to something else.

    https://support.intelrealsense.com/hc/en-us/community/posts/360051896473/comments/360013274934 

    0
    Comment actions Permalink
  • Temeiwang

    Thanks a lot for your comments. This issue is different from the other issue I posted because the depth maps and disparity maps are saved from "Intel RealSense Viewer v2.36.0", not from my code. I will do more tests and share the results if there is any new findings.

    0
    Comment actions Permalink
  • Temeiwang

    I found the reason! We need to wait until the change of disparity mode becomes effective no matter in Viewer or my code.

    Though the following code shows the disparityMode is changed (the last "cout" command), the disparity map is incorrect. I executed the code twice to get correct disparity map.

    STDepthTableControl depth_table = advanced_mode.get_depth_table();
    cout << "Disparity Mode: " << depth_table.disparityMode << endl;
    depth_table.disparityMode = 1.f; // enable disparity mode
    advanced_mode.set_depth_table(depth_table); // write changes
    depth_table = advanced_mode.get_depth_table();
    cout << "Disparity Mode: " << depth_table.disparityMode << endl;

    Now, the histogram of converted depth map (B) is similar to the depth map (A) in complex scenes.

    I'm not sure whether the command "advanced_mode.set_depth_table(depth_table);" should be called twice or insert sleep() to wait the change becomes effective. If we can insert sleep() instead, how long should be wait?

    0
    Comment actions Permalink
  • MartyX Grover

    I would recommend using sleep.  It is difficult to say precisely how long for though.  I would suggest starting with a high value such as 5 seconds and then reducing it down a little at a time and re-testing until you find the point where it becomes unstable.  Then set the time a little above that.

    0
    Comment actions Permalink
  • Temeiwang

    Thanks for the comment. I will do several tests and share the results later.

    0
    Comment actions Permalink

Please sign in to leave a comment.