View my account

How to get depth information (depth pixel) and extract the *.raw file ?

Comments

7 comments

  • Official comment
    Jesus Garcia

    Hello Lyhour,

    Read Pointclouds and Frame Alignment for information on creating pointclouds and aligning depth to color using the RealSense SDK 2.0. You can also view the python samples, OpenCV Pointcloud Viewer and AlignDepth2Color.

    Sincerely,
    Jesus G.
    Intel Customer Support

    Comment actions Permalink
  • Andi-1 0

    Hi, I dont have a answer to your question but how can you save from the sdk viewer a *.raw file? I only can save it as a .bag file

    0
    Comment actions Permalink
  • Lyhour Newtechnology

    Dear Andi-1 0

    I am a new in this area. I am using the new version of sdk viewer. During the streaming, I showed the RGB, Depth and IR. After that, I save the depth information and its automatically generates two files: *.png and *.raw. Is there any methods to save the depth information ? you mentioned that you save the *.bag file. Does this file provide the depth information corresponding to the RGB image ? Thank you.

    0
    Comment actions Permalink
  • Andi-1 0

    I've also just started in this area. The weird part is, that I can only save the recorded files a .bag files. And they do include depth informations. I'm using the Intel RealSense Viewer 2.42.0, wbu?

     

    0
    Comment actions Permalink
  • Lyhour Newtechnology

    Yes me too, I'm using the Intel RealSense Viewer 2.42.0.

    0
    Comment actions Permalink
  • Andi-1 0

    Hi, I might found a way you could get the *bag file or all other formats:

    Also checkout: https://intelrealsense.github.io/librealsense/python_docs/_generated/pyrealsense2.html

    If you're using python, try this:

    import pyrealsense2 as rs

    pipe = rs.pipeline()
    config = rs.config()
    config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)
    config.enable_record_to_file('nameOfFile.bag')
    pipe.start(config)
    frames = pipe.wait_for_frames()
    pipe.stop()

     

    0
    Comment actions Permalink
  • Lyhour Newtechnology

    Dear Everyone, Thank you very much for your suggestion. Now, I can alight the depth frame the same as RGB frame. However, I don't know how to aligned the infrared frame the same as RGB frame. is there any method to do that ? 

    0
    Comment actions Permalink

Please sign in to leave a comment.