Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion vilib/vilib.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
os.environ['LIBCAMERA_LOG_LEVELS'] = '*:ERROR'
from picamera2 import Picamera2
import libcamera
from libcamera import controls

import cv2
import numpy as np
Expand Down Expand Up @@ -233,7 +234,11 @@ def camera():

# init picamera
picam2 = Picamera2()

picam2.set_controls({"AwbMode": controls.AwbModeEnum.Auto})
picam2.sensor_mode = 3
picam2.iso = 0 #Auto.This will yield less noise during day exposures and keep the iso down in low light for less noise.
picam2.framerate_range = (0.167, 6) #this should match the values available in sensor mode, allowing upto a 6 second exposure
picam2.exposure_mode = 'nightpreview' #raises the gains, and lowers the iso
preview_config = picam2.preview_configuration
# preview_config.size = (800, 600)
preview_config.size = Vilib.camera_size
Expand Down