最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - how come its strange color of the camera? - Stack Overflow

programmeradmin5浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论