This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python3 | |
# based on https://raspberrypi.stackexchange.com/questions/58871/pi-camera-v2-fast-full-sensor-capture-mode-with-downsampling/58941#58941 | |
import time | |
import picamera | |
import numpy as np | |
from PIL import Image | |
RECORD_TIME = 5 # number of seconds to record | |
WRITE_IMAGES = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import subprocess | |
### for reference, the output of v4l2-ctl -d /dev/video1 -l (helpful for min/max/defaults) | |
# brightness (int) : min=0 max=255 step=1 default=128 value=128 | |
# contrast (int) : min=0 max=255 step=1 default=128 value=128 | |
# saturation (int) : min=0 max=255 step=1 default=128 value=128 | |
# white_balance_temperature_auto (bool) : default=1 value=1 | |
# gain (int) : min=0 max=255 step=1 default=0 value=0 | |
# power_line_frequency (menu) : min=0 max=2 default=2 value=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fast reading from the raspberry camera with Python, Numpy, and OpenCV | |
# Allows to process grayscale video up to 124 FPS (tested in Raspberry Zero Wifi with V2.1 camera) | |
# | |
# Made by @CarlosGS in May 2017 | |
# Club de Robotica - Universidad Autonoma de Madrid | |
# http://crm.ii.uam.es/ | |
# License: Public Domain, attribution appreciated | |
import cv2 | |
import numpy as np |