Skip to main content

An easier solution to computer vision.

Project description

An easier solution to computer vision.

What is pycamera?

Pycamera is a wrapper around OpenCV for people who, don't know how to use OpenCV, don't want to use OpenCV for such a simple project, or want something easier!

Examples

Save Picture

from pycamera import camera

cam = camera.Camera(0) # Choosing a camera
snap = cam.snap() # Snapping a picture from that camera

snap.save("output.jpg") # Save picture to output.jpg

Editing with Pillow

from pycamera import camera
from PIL import Image, ImageDraw

cam = camera.Camera(0) # Choosing a camera
snap = cam.snap() # Snap photo
image = snap.to_pillow() # Convert pycamera image to Pillow image

draw = ImageDraw.Draw(image)
# Draw stuff here
image.show()

Live View

import pycamera
from pycamera import camera

cam = camera.Camera(0) # Choosing a camera

while True:
    snap = cam.read() # (reading is better for loops)
    snap.show()
    pycamera.waitForKey() # Wait until key is pressed (default key is Escape)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycamera-0.3.tar.gz (3.2 kB view hashes)

Uploaded source

Built Distribution

pycamera-0.3-py3-none-any.whl (3.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page