Hi erik ,
I see. I intend to use OAK-D PRO AF mounted on a mechanism, with a dekstop as my host. My use case is to detect an object, the mechanism with move towards the object and perform an inspection. We'll display the RGB feed using pysimplegui.
As we all know, we usually perform object detection eg using YOLO with small resolutions eg 640*640. So maybe I can initiate the OAK-D with THE_1080_P or something similar. However, I would like to take a 12MP (4032x3040) image once the mechanism has positioned the camera in front of the object.
The OAK's 12MP RGB view presented to the user via the GUI can be downscaled/resized (eg 1000*1000px to fit the GUI window). But this presented view should have all the objects in the original 12MP passed to the inspection algorithm so I can determine whether it is in focus.
But I've observed that the frame is lagging if we just take the ISP output to the host and present it. Cropping/resizing after taking the isp output to host did not help. "Preview" and "video" is side-cropped but do correct me if I've mistaken.
Based on most of the tutorial I've seen , we set the RGB resolution, eg. "cam.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)" at the start. Can we change this sensor resolution in the code automatically midway? ie
if depth == 10cm: # object was detected, mechanism moves camera towards the object
cam.setResolution(dai.ColorCameraProperties.SensorResolution.THE_12MP) # change resolution to take 12MP image
take a picture and save it for inspection
cam.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P) # switch back to original resolution for object detection
Pls let me know if you have any suggestions.