why is it strange color when the camera turn on? i have my raspberry pie 5 connected to a global shutter camera. trying to setup my camera.
from picamera2 import Picamera2
import cv2
picam2 = Picamera2()
picam2.configure(picam2.create_preview_configuration(main={"format": "RGB888", "size": (640, 480)}))
picam2.start()
while True:
frame = picam2.capture_array()
frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR) # Fixar färger
cv2.imshow("RPICAM Test", frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
picam2.stop()
cv2.destroyAllWindows()
i think the configuration is wrong?