PiCamera preview hangs
Posted: Tue Jun 16, 2020 3:11 pm
I have the cameras setup and working when you issue the commands for raspistill on both cameras. I have tried to get the PiCamera module to work with very little success:
Simple script:
from picamera import PiCamera
from time import sleep
try:
camera = PiCamera(stereo_mode='side-by-side', resolution=(1280, 720))
camera.start_preview()
sleep(2)
camera.capture( 'foo2.jpg )
finally:
camera.close()
If I comment out the start_preview line I will actually get a jpg with a image of the two cameras side by side. If I leave the preview line in then the program hangs. The LED for camera 0 is lit and stays lit, but the LED for camera 1 never lights up.
Any help is appreciated.
Simple script:
from picamera import PiCamera
from time import sleep
try:
camera = PiCamera(stereo_mode='side-by-side', resolution=(1280, 720))
camera.start_preview()
sleep(2)
camera.capture( 'foo2.jpg )
finally:
camera.close()
If I comment out the start_preview line I will actually get a jpg with a image of the two cameras side by side. If I leave the preview line in then the program hangs. The LED for camera 0 is lit and stays lit, but the LED for camera 1 never lights up.
Any help is appreciated.