I mounted an OAK-D PoE on a UTV for real time data collection. The UTV engine generates lots of vibrations, and driving only make it worse. The camera outputs images with very low qualities, characterized by horizontal blurry stripes and pixel line horizontal displacements, giving the images a "wiggling" appearance. I attached a few sample images captured over concrete floor and sandy surface.
In my current code, I configured three camera parameters:
camRgb.initialControl.setAutoExposureLimit(302)
control.setManualWhiteBalance(5000)
control.setManualFocus(121)
I did not specify any other parameters so they would be in default values. I did not specify FPS since my exposure time limit was already very low so I did not think it would be necessary.
I understand it is a rolling shutter camera so the horizontal pixel displacement makes sense, but the blurry stripes make no sense, as my exposure time is low and my focus is fixed. My first question is, coding-wise, what can I do to improve image quality and minimize those artifacts?
Regrading the connectivity issue, I frequently experienced camera crash and frozen frame when the camera is mounted on the UTV. I can confirm all cable connections were good, and the camera and my code worked perfectly fine in lab. As I was not able to replicate the crashing on demand no matter how I try, I suspect the UTV vibration disrupted the camera's internal components. The error happened for this command:
videoIn = video.get()
Error:
[184430107165F50F00] [169.254.1.222] [1743022587.886] [host] [error] Device likely crashed but did not reboot in time to get the crash dump
RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'video' (X_LINK_ERROR)'
After I restart the program, it would run just fine again, for a while at least. My second question is, coding-wise, how can I handle this error so that my while loop below does not stop and will keep running? I tried try and except structure to catch the error but it won't update the frame after it was frozen.
with dai.Device(pipeline) as device:
video = device.getOutputQueue(name="video", maxSize=1, blocking=False)
while True:
videoIn = video.get()
frame = videoIn.getCvFrame()