diff --git a/detect.py b/detect.py index 162452f..a6d96d9 100755 --- a/detect.py +++ b/detect.py @@ -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 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e20a3bc --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +picamera +opencv-python +matplotlib +numpy