depthai-experiments icon indicating copy to clipboard operation
depthai-experiments copied to clipboard

`gen2-record-replay` aligned depth possible?

Open JojoDevel opened this issue 3 years ago • 2 comments

Is it possible to obtain aligned depth & rgb from recodings? It works for me in real-time using depthai-python example.

But in replay when adding

nodes.stereo.setDepthAlign(dai.CameraBoardSocket.RGB)

to the replay pipeline below this line https://github.com/luxonis/depthai-experiments/blob/6ff9247d04661ea3ea435c210e230facc6fe2ee4/gen2-record-replay/libraries/depthai_replay.py#L109 I get

[1844301081DA6B1200] [153.761] [StereoDepth(3)] [warning] Align to RGB requested, but ColorCamera not configured. Using MonoCamera resolution

and the rgb seems not to be aligned to the depth frame...

JojoDevel avatar Mar 20 '22 21:03 JojoDevel

@JojoDevel You'll have to explicitly set the output disparity width/height to match that of the ColorCamera. CC: @Erol444 (these will have to be saved over to be able to replay in same manner as well)

themarpe avatar Mar 21 '22 00:03 themarpe

Nice that works pretty good :rocket: I recorded 1080p and when I use

node.stereo.setOutputSize(1920, 1080)

the disparty map is aligned with my RGB and my yolo detections :+1: Also works with downscaled resolutions (e.g. factor 2): (960, 540) and saves performance and data bandwidth.

JojoDevel avatar Mar 21 '22 06:03 JojoDevel

Abstracted in DepthAI SDK using Replaying functionality.

Erol444 avatar Mar 16 '23 12:03 Erol444