Hello,

We have been working with the Oak-D S2 camera to record videos.

We found an example in the documentation where we were able to collect stereo.depth as output.

However, we are unsure of how to utilize this file (how to open it, etc.).

Is there a particular software that needs to be used to open this file?

Thanks!

Link to Code

    HI RehanJ
    Depends on how you are saving the depth. I can't see the code. You can paste the small chunk here using ``` on each side to create code block.

    Stereo depth is RAW16 value, which cannot be encoded on device, so it is probably saved as numpy array or something similar.

    Thanks,
    Jaka

    Hi @jakaskerl

    Please see the code below:

    from depthai_sdk import OakCamera, RecordType

    with OakCamera() as oak:    

    color = oak.create_camera('color', resolution='1080P', fps=30, encode='MJPEG')    

    color.config_color_camera(isp_scale(2, 3)) # 720P    

    left = oak.create_camera('left', resolution='400p', fps=30)   

    right = oak.create_camera('right', resolution='400p', fps=30)    

    stereo = oak.create_stereo(left=left, right=right)

      # Sync & save all streams    

    recorder = oak.record([color.out.encoded, left, right, stereo.out.depth], './', RecordType.VIDEO)      

    oak.visualize(left)    

    oak.start(blocking=True)

    As mentioned the file of interest is the output of stereo.out.depth (a depth.dat file)

    Hi @RehanJ
    The depth won't work unless you set the record type to MCAP or ROSBAG. You can however use stereo.out.disparity which will work with VIDEO.

    Thanks,
    Jaka