6 Replies Latest reply on Sep 11, 2018 9:28 AM by Intel Corporation

    Understanding the depth table (D435)

    gianfr90

      Hello,

      I have some question about the depth table data structure (STDepthTableControl):

       

      typedef struct

      {

          uint32_t depthUnits;

          int32_t  depthClampMin;

          int32_t  depthClampMax;

          uint32_t disparityMode;

          int32_t  disparityShift;

      }STDepthTableControl;

       

      1. what does disparity mode mean? I see from the viewer that it can have two values: 0 and 1 but I cannot find any documentation about it
      2. Which is the default unit measure of depth units ? mm, cm or m?
      3. which is the range of allowed values of depth units and disparity shift? can I consider those showed in the viewer ?
      4. Does the clamps control only the color mapping of the disparity image ? So if you can actually change the depth range you have to use the disparity shift

       

      Thanks!

        • 1. Re: Understanding the depth table (D435)
          MartyG

          1.  Intel have stated that they do not plan to provide documentation for every setting in Advanced Mode, and DisparityMode seems to be one of those undocumented settings.  Intel says there is a complex interplay between all parameters, so they instead use machine learning to globally optimize for different usages.

           

          2.  RealSense uses mm.

           

          3.  The tuning document below is excellent for learning about disparity shift and depth scale.

           

          'Tuning D415 And D435 Cameras For Optimal Performance' presentation

           

          4.  I am not sure about this one.  Someone else may be able to provide a better answer than I can on this particular question. 

          • 2. Re: Understanding the depth table (D435)
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hello gianfr90,

            Thank you for your interest in the Intel RealSense D435 camera.

            Thank you very much MartyG for the input! 

            Regarding your 4th question, depthClampMin will restrict the depth of a scanned area by ignoring anything below this value, while depthClampMax will restrict the depth of a scanned area by ignoring anything above this value. You can read more about it on: https://github.com/IntelRealSense/librealsense/issues/1680

            The actual physical MinZ and MaxZ can be manipulated in two ways as described in the BKMs paper (page 5, sections b. and c.). By changing the Resolution of the depth imagers and increasing the disparity shift. The Clamps controls cannot move the depthClampMin and the depthClampMax beyond the values set by the controls described above. So, MinZ <= depthClampMin <= depthClampMax <= MaxZ. However, the camera will not scan anything beyond depthClampIn and depthClampMax.

            To summarize, the color mapping is not changed by modifying the Clamp values and Intel does not recommend for users to manually change the Advanced Mode parameters and instead use the depth presets provided.

            I hope that this information helps you! 

            Thank you and best regards,
            Eliza
            • 3. Re: Understanding the depth table (D435)
              gianfr90

              Hello Eliza,

              thank you for the explanation. Now it is clear to me.

              May ask you why Intel does not recommend to let the user changing those parameter?

               

              I am creating an application using the librealsense2 SDK and typically the user has a camera fixed at a known distance from the target object and typically also the height of the object is known. So it may happen that the user wants a custom depth range that fits the object height and the working distance.

              Is there any particular drawback in doing so? Of course expect the case that the camera may not get an object outside the custom depth range.

               

              Many Thanks!

               

              Gianfranco

              • 4. Re: Understanding the depth table (D435)
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hello gianfr90,

                I am glad that I could help you! 

                The reason behind this is the one stated by MartyG above. Due to the fact that there is a complex interplay between all parameters, we currently use machine learning to globally optimize for different usages. For this reason we do not recommend changing any of the parameters and we recommend using the presets instead. 

                Thank you and best regards,
                Eliza

                • 5. Re: Understanding the depth table (D435)
                  gianfr90

                  Hello Eliza,

                  thank you. So basically it turns out that by changing any advanced parameter the user may not get the desired result since there other advanced (and internals?) parameter linked to it that the learning algorithm takes into account when using the presets mode. Am I correct?

                   

                  Thank you very much.

                   

                  Gianfranco

                  • 6. Re: Understanding the depth table (D435)
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hello gianfr90,

                    Yes, this is correct. The only mention is that all parameters are exposed for transparency and there are no other hidden parameters. 

                    You can modify the parameters 
                    whose purpose and effect is well understood, such as the Clamp but most parameters are not as straightforward.

                    Thank you and best regards,
                    Eliza