- Edited
Hello! When testing the rgb_preview.py script in the examples folder, I noticed the OAK-D-SR outputs a slightly pink tinted image stream compared to the OAK-D-S2. Is this expected? I checked that both are outputting RGB images, so they both seem to be in the same color schema. Should I expect roughly the same colored image between the OAK-D-SR and OAK-D-S2, or am I doing something wrong in the code when it comes to specifying the input nodes?
Here's my minimal code for the OAK-D-SR camera below. Thank you!
import cv2
import depthai as dai
# Create pipeline
pipeline = dai.Pipeline()
# Define source and output
camRgb = pipeline.create(dai.node.ColorCamera)
xoutRgb = pipeline.create(dai.node.XLinkOut)
camRgb.setBoardSocket(dai.CameraBoardSocket.CAM_B)
# Properties
camRgb.setPreviewSize(300, 300)
camRgb.setInterleaved(False)
camRgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.RGB)
xoutRgb.setStreamName("rgb")
# Linking
camRgb.preview.link(xoutRgb.input)
# Connect to device and start pipeline
with dai.Device(pipeline) as device:
print('Connected cameras:', device.getConnectedCameraFeatures())
# Print out usb speed
print('Usb speed:', device.getUsbSpeed().name)
# Bootloader version
if device.getBootloaderVersion() is not None:
print('Bootloader version:', device.getBootloaderVersion())
# Device name
#print('Device name:', device.getDeviceName(), ' Product name:', device.getProductName())
# Output queue will be used to get the rgb frames from the output defined above
qRgb = device.getOutputQueue(name="rgb", maxSize=4, blocking=False)
while True:
inRgb = qRgb.get() # blocking call, will wait until a new data has arrived
# Retrieve 'bgr' (opencv format) frame
cv2.imshow("rgb", inRgb.getCvFrame())
if cv2.waitKey(1) == ord('q'):
break