i got this pipeline to detect aruco marker with the rgb cam und get the depth data with the mono cams.the hole code work but the result of the depth are alwoays 3cm off, is the rgb aligned right ?
def create_pipeline():
pipeline = dai.Pipeline()
# Konfiguration der RGB-Kamera
cam_rgb = pipeline.create(dai.node.ColorCamera)
cam_rgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_4_K) # Oder eine andere geeignete Auflösung
cam_rgb.setPreviewSize(1280, 800) # Passen Sie dies an die Auflösung der Mono-Kameras an
cam_rgb.setInterleaved(False)
# Konfiguration der Stereo-Tiefenkamera
mono_left = pipeline.create(dai.node.MonoCamera)
mono_right = pipeline.create(dai.node.MonoCamera)
stereo = pipeline.create(dai.node.StereoDepth)
mono_left.setResolution(dai.MonoCameraProperties.SensorResolution.THE_800_P)
mono_right.setResolution(dai.MonoCameraProperties.SensorResolution.THE_800_P)
mono_left.setBoardSocket(dai.CameraBoardSocket.CAM_B)
mono_right.setBoardSocket(dai.CameraBoardSocket.CAM_C)
stereo.setLeftRightCheck(True)
stereo.setDepthAlign(dai.CameraBoardSocket.CAM_C)
stereo.initialConfig.setConfidenceThreshold(200)
mono_left.out.link(stereo.left)
mono_right.out.link(stereo.right)
# Medianfilter einstellen
stereo.setMedianFilter(dai.MedianFilter.KERNEL_7x7)
# Ausgabestreams für RGB-Bilder und Tiefeninformation
xout_rgb = pipeline.create(dai.node.XLinkOut)
xout_rgb.setStreamName("rgb")
xout_depth = pipeline.create(dai.node.XLinkOut)
xout_depth.setStreamName("depth")
cam_rgb.preview.link(xout_rgb.input)
stereo.depth.link(xout_depth.input)
# Konfiguration des SpatialLocationCalculator
spatial_location_calculator = pipeline.create(dai.node.SpatialLocationCalculator)
# Erstellen einer Eingangswarteschlange für die Konfiguration
config_in = pipeline.create(dai.node.XLinkIn)
config_in.setStreamName("spatialLocationCalculatorConfig")
config_in.out.link(spatial_location_calculator.inputConfig)
# Erstellen eines Ausgabestreams für die räumlichen Daten
xout_spatial_data = pipeline.create(dai.node.XLinkOut)
xout_spatial_data.setStreamName("spatialData")
spatial_location_calculator.out.link(xout_spatial_data.input)
# Linken der Tiefeninformationen zum SpatialLocationCalculator
stereo.depth.link(spatial_location_calculator.inputDepth)
return pipeline
the hole code work but the result of the depth are alwoays 3cm off, is the rgb aligned right ?