Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 795 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 795 Bytes

Camera

This provides a simple interface, via OpenCV, for configuring and utilizing a camera device, using Python

Installation Instructions

We will need to install OpenCV with the Python bindings so that we can access laptop cameras via our Python code. Follow the instructions for Windows and Mac.

Installing opencv (Recommended)

conda install -c conda-forge opencv

Clone Camera, navigate to the resulting directory, and run

pip install -e .

Usage

Please see the camera tutorial notebookin this repo for details of how to configure your camera.

%matplotlib notebook
from camera import take_picture
import matplotlib.pyplot as plt
img_array = take_picture()  # returns shape-(H, W, C) array

fig,ax = plt.subplots()
ax.imshow(img_array)