如何使用 picamera2 设置曝光时间
以下代码将使用固定曝光 10ms 捕获 640x480 PNG 图像到 Exposure10ms.png:
exposure_fixed.py
#!/usr/bin/env python3
import time
import picamera2
import numpy as np
with picamera2.Picamera2() as camera:
camera.set_controls({"ExposureTime": 1000, "AnalogueGain": 1.0})
camera.start()
camera.capture_file("Exposure10ms.png")
camera.stop()注意在 camera.set_controls() 之后运行 camera.start() 很重要。
Check out similar posts by category:
Python, Raspberry Pi
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow