I`m trying to start stereo mode on Raspbian x64 bullseye with picamera2 and stereopiV2.
Everything works but only with 1 camera at once:
Code: Select all
import os;import cv2;import numpy as np;from datetime import datetime
#from picamera.array import PiRGBArray
#from picamera import PiCamera
from picamera2 import MappedArray, Picamera2, Preview
# Initialize the camera
# camera = PiCamera(stereo_mode='side-by-side',stereo_decimate=False)
# camera.resolution=(cam_width, cam_height)
# camera.framerate = 5
# camera.exposure_mode = 'off'
# camera.shutter_speed = 1000000
# camera.contrast = 0 # Контрастность
# camera.brightness = 60 # Яркость
# camera.saturation = 0 # Насыщенность
# camera.ISO = 800 # Чувствительность
# camera.awb_mode = "auto" # "fluorescent"
camera = Picamera2()
config = camera.create_preview_configuration(main={"format": "RGB888"})
camera.configure(config)
camera.start_preview(Preview.QT)
camera.start()
#for frame in camera.capture_continuous(capture, format="bgr", use_video_port=True,
#resize=(img_width,img_height)):
while True:
origin_img = camera.capture_array()
Code: Select all
[0:29:08.795269441] [5481] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3700-f30ad033
[0:29:08.832856316] [5490] INFO RPI raspberrypi.cpp:1368 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media0
How to start up stereo mode ?