Can someone help me with figuring out how to set the format from RAW8 to RAW10 for a higher gradient. I have been fighting with the chat.luxonis.com for a several hours. I am using the OAK-FFC 3P module with a OAK-FFC OV9282 monochrome camera module connected to the CAM_C socket. Here is my code below to check the RAW format:
import depthai as dai
import cv2
# Create pipeline
pipeline = dai.Pipeline()
# Define a source - mono (grayscale) camera
monoCam = pipeline.create(dai.node.MonoCamera)
monoCam.setBoardSocket(dai.CameraBoardSocket.CAM_C) # Set camera socket
monoCam.setResolution(dai.MonoCameraProperties.SensorResolution.THE_800_P) # Set resolution
monoCam.setRawOutputPacked(True) # Enable MIPI-packed format
# Create output
xout = pipeline.create(dai.node.XLinkOut)
xout.setStreamName("mono")
monoCam.out.link(xout.input)
# Connect to device and start pipeline
with dai.Device(pipeline) as device:
# Output queue will be used to get the grayscale frames from the output defined above
q = device.getOutputQueue(name="mono", maxSize=4, blocking=False)
while True:
inMono = q.get() # Blocking call, will wait until a new data has arrived
frame = inMono.getCvFrame()
# Check the frame type
if inMono.getType() == dai.RawImgFrame.Type.RAW8:
print("Frame is in RAW8 format")
elif inMono.getType() == dai.RawImgFrame.Type.RAW10:
print("Frame is in RAW10 format")
else:
print("Frame is in an unknown format")
print(f"Frame type: {inMono.getType()}")
# Display the frame
cv2.imshow("mono", frame)
if cv2.waitKey(1) == ord('q'):
break