Hello,

I'm trying to generate depth maps in post-processing my inputs are: average frame of mono left video, average frame of mono right video, camera intrinsic + extrinsic parameters. I've tried with opencv but the resulting depth map is way too noisy. Is there a way to compute the averages and then get the depth map while recording the videos so I don't have to do it in post processing ?

    ferrari19 average frame of mono left video, average frame of mono right video

    What are these average frames?

    ferrari19 Is there a way to compute the averages and then get the depth map while recording the videos so I don't have to do it in post processing ?

    There are various filters you can apply to depth map to make it look nicer: https://docs.luxonis.com/projects/api/en/latest/components/nodes/stereo_depth/#currently-configurable-blocks

    Thanks,
    Jaka

    Thank you for your answer! The average image is a bakcground estimation so I need to compute the depth map of the average image not the average of the depth maps

    Hi @ferrari19
    It's possible to send frames to host and do this host-side and then send images to device to run depth inference. But it's bandwidth heavy and not pretty.
    Thanks,
    Jaka

    6 days later

    Hi,

    I was wondering if you could point to me where I could find more infos on how to implement that?

    Thank you in advance

    Hi @ferrari19
    I don't think we have any prior examples.

    • Create L,R mono cameras.
    • XLinkOut them to the host
    • On host, perform averaging for L and R separately
    • create 2 mock dai.ImgFrame on host and set data to avg L and avg R and specify size and type (GRAY8).
    • Send average L and R back to device via XlinkIn
    • link XlinkIn to stereo node
    • Link stereo however you want

    This is a rather ugly approach but it is the only one I could think of atm.

    Thanks,
    Jaka