Open domef opened 1 year ago
Hi @domef , You are down-scaling the ISP output;
camera.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
camera.setIspScale(1, 4)
Which means it will go from 1920x1080 to 480x270. And since video/preview are derived from isp output, you can't have higher preview/video size than isp (in your case 480x270). So you shouldn't downscale the isp that much if you want to have 300x300 preview. Thoughts? Thanks, Erik
The point is that I'm not using the preview, so why it should throw an error?
Moreover I just fount out that my "hack" can cause some problems (that doesn't appear without camera.setPreviewSize(2, 2)
), in particular with this code:
import cv2
import depthai as dai
pipeline = dai.Pipeline()
camera = pipeline.create(dai.node.ColorCamera)
camera.setPreviewSize(2, 2)
camera.setResolution(dai.ColorCameraProperties.SensorResolution.THE_13_MP)
camera.setIspScale(1, 4)
link = pipeline.createXLinkOut()
link.setStreamName("rgb")
link.input.setBlocking(False)
camera.video.link(link.input)
device = dai.Device(pipeline, usb2Mode=False)
queue = device.getOutputQueue(name="rgb", maxSize=10, blocking=False)
while True:
image_raw = queue.get()
image = image_raw.getCvFrame()
print(image.shape)
cv2.namedWindow("image", cv2.WINDOW_NORMAL)
cv2.imshow("image", image)
c = cv2.waitKey(1)
if c == ord("q"):
break
an error is continuosly thrown:
[18443010C1818F0E00] [1.1] [1.139] [ColorCamera(0)] [error] RGB postprocessing error, rescheduling!
[18443010C1818F0E00] [1.1] [1.245] [ColorCamera(0)] [error] RGB postprocessing timeout!
[18443010C1818F0E00] [1.1] [1.245] [ColorCamera(0)] [error] RGB postprocessing error, rescheduling!
[18443010C1818F0E00] [1.1] [1.311] [ColorCamera(0)] [error] RGB postprocessing timeout!
Describe the bug When streaming for example with
video
orisp
outputs using an OAK-D-Lite, an error on preview size is thrown, even if I am not using thepreview
output:Minimal Reproducible Example This is my code:
The resolution 300x300 is the default preview size. To fix I have to add this line:
Expected behavior There shouldn't be a check on preview size if I'm not using
preview
output.Attach system log