View my account

Align to color stream using D405 using Java on Android

Comments

6 comments

  • MartyX Grover

    Hi Yixun Liu  Thanks very much for your questions.

     

    1.  When depth to color alignment is performed, the depth field of view resizes to match the color field of view size.  If the color FOV is smaller than the depth FOV then the edges of the aligned image will be cut off.  So there may be some resizing of the display happening as a consequence but it would not mean that the aligned image is inaccurate.

     

    2.  You are correct, the D405 does not have an RGB sensor,  It instead obtains an RGB image from the depth sensor.  This image is passed through an Image Signal Processor (ISP) chip in the camera to generate the final RGB image.  Although the D405's depth and RGB share the same viewpoint, this RGB image tends to not be perfectly aligned with the depth image. 

     

    A better-aligned image can be obtained by instead using the 'RGB from left infrared' mode of the D405.  To do so, you define an Infrared 1 stream instead of an RGB stream and set the stream's format to RGB8 or BGR8 instead of the default Y8 format of the IR stream.  This alternate RGB from IR mode will be perfectly aligned with depth.

    0
    Comment actions Permalink
  • Yixun Liu

    If I use the  'RGB from left infrared' mode of the D405 when I do OpenGL rendering I need to use the intrinsic of the depth or the infrared 1 intrinsic, right?

    0
    Comment actions Permalink
  • MartyX Grover

    As it is an infrared type stream even though the image output is RGB, please use the Infrared 1 intrinsics.

    0
    Comment actions Permalink
  • Yixun Liu

    On Android with Java the following code generate exception: Failed to start pipeline. Couldn't resolve requests. 

    config.enableStream(StreamType.INFRARED, 1, 640, 480, StreamFormat.RGB8, 30);             
                    try (PipelineProfile pp = mPipe.start(config)) {

                    } catch (Exception e) {
                        Log.d(TAG, "Failed to start pipeline. " + e.getMessage());                    
                    }

    0
    Comment actions Permalink
  • Yixun Liu

    If I change the index from 1 to -1 it works.

    0
    Comment actions Permalink
  • MartyX Grover

    It's great to hear that you were successful.  Thanks very much for the update!

    0
    Comment actions Permalink

Please sign in to leave a comment.