View my account

Record streams of D435i on Android

Comments

3 comments

  • MartyX Grover

    Hi Yixun Liu  May I first confirm if you have defined values in your script for DEPTH_STREAM_HEIGHT and DEPTH_STREAM_WIDTH

     

    Does the problem still occur if you define the width and height as hard-coded values like in the code below?

     

    config.enableStream(StreamType.DEPTH, 640, 480,StreamFormat.Z16);
    config.enableStream(StreamType.COLOR, 640, 480, StreamFormat.BGR8);
    config.enableStream(StreamType.INFRARED, 640, 480,StreamFormat.Y8, 30);

    0
    Comment actions Permalink
  • Yixun Liu

    I do use 640x480 and it does not work.

    I think the reason is the file access. If I use config.enableRecordToFile("a.bag"), the default location is the public share folder and it only supports URI access. So I change the code to String path = contex.getFileDir() + "/" + "a.bag"; config.enableRecordToFile(path) and it works now. The contex.getFileDir() return the private File folder and it supports access by a String path.

    One more question is I notice you ignore the index in config.enableStream(StreamType.INFRARED, 640, 480,StreamFormat.Y8, 30); I want to record the first infrared stream. Is its index 0 or 1?

    Thanks.

    Yixun

     

    0
    Comment actions Permalink
  • MartyX Grover

    If an index number is not defined for the infrared stream when using only left infrared instead of both left and right then it should default to using the left stream.

    0
    Comment actions Permalink

Please sign in to leave a comment.