Adapt to rpi-camera

This commit is contained in:
karl 2022-02-01 12:00:47 +01:00
parent 2c675f4176
commit ea3855f0ed
2 changed files with 12 additions and 1 deletions

View File

@ -9,8 +9,15 @@ import numpy as np
from skimage import io
import colorsys
img_path = 'IMG_20211204_220355.jpg'
img_path = 'input.jpg'
from picamera import PiCamera
camera = PiCamera()
time.sleep(2) # wait for the camera to initialize
camera.capture(img_path)
# Read the result
img = io.imread(img_path)[:, :, :]
# Average color

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
picamera
opencv-python
matplotlib
numpy