I have a Raspberry Pi 3a with the Multicam 2.2. I have 3 cameras connected to ports A, B and C. I need to take pictures from each of them with very low frequency, but need the full resolution and control over exposure. Typically everything works well, but once every 10 images or so the image from camera A comes out wrong, like the image below.
The code I use is below.
Is there anything I can do to fix it?
i2c = “/usr/sbin/i2cset -y 1 0x70 0x00 0x04”
os.system(i2c)
gp.output(7, False)
gp.output(11, False)
gp.output(12, True)
time.sleep(1)
with PiCamera() as camera:
camera.annotate_background = picamera.Color(‘black’)
camera.annotate_text = datetime.datetime.now().strftime(’%Y-%m-%d %H:%M:%S’)
camera.resolution = (3280,2464)
print(“Starting camera 1 warmup preview”)
camera.start_preview()
time.sleep(5)
print("Camera 1 Exposure Parameters: Speed: “, camera.exposure_speed, " AWB: “, camera.awb_gains);
speed = camera.exposure_speed;
awb = camera.awb_gains;
camera.exposure_mode = ‘off’
camera.awb_mode = ‘off’
camera.shutter_speed = speed
camera.awb_gains = awb
camera.capture(”{0}-1.jpg”.format(name))
i2c = “/usr/sbin/i2cset -y 1 0x70 0x00 0x05”
os.system(i2c)
gp.output(7, True)
gp.output(11, False)
gp.output(12, True)
time.sleep(1)
with PiCamera() as camera:
camera.annotate_background = picamera.Color(‘black’)
camera.annotate_text = datetime.datetime.now().strftime(’%Y-%m-%d %H:%M:%S’)
camera.resolution = (3280,2464)
camera.exposure_mode = ‘off’
camera.awb_mode = ‘off’
camera.shutter_speed = speed
camera.awb_gains = awb
print("Camera 2 Exposure Parameters: Speed: “, camera.exposure_speed, " AWB: “, camera.awb_gains);
camera.capture(”{0}-2.jpg”.format(name))
i2c = “/usr/sbin/i2cset -y 1 0x70 0x00 0x06”
os.system(i2c)
time.sleep(1)
gp.output(7, False)
gp.output(11, True)
gp.output(12, False)
with PiCamera() as camera:
camera.annotate_background = picamera.Color(‘black’)
camera.annotate_text = datetime.datetime.now().strftime(’%Y-%m-%d %H:%M:%S’)
camera.resolution = (3280,2464)
camera.exposure_mode = ‘off’
camera.awb_mode = ‘off’
camera.shutter_speed = speed
camera.awb_gains = awb
print("Camera 3 Exposure Parameters: Speed: “, camera.exposure_speed, " AWB: “, camera.awb_gains);
camera.capture(”{0}-3.jpg”.format(name))