Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ismaeelakram/pycamera
An easier solution to computer vision.
https://github.com/ismaeelakram/pycamera
computer-vision opencv python3
Last synced: 18 days ago
JSON representation
An easier solution to computer vision.
- Host: GitHub
- URL: https://github.com/ismaeelakram/pycamera
- Owner: IsmaeelAkram
- License: mit
- Created: 2021-06-14T15:41:29.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-12T22:11:34.000Z (over 3 years ago)
- Last Synced: 2024-10-23T01:50:42.748Z (25 days ago)
- Topics: computer-vision, opencv, python3
- Language: Python
- Homepage: https://pypi.org/project/pycamera/
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README-pypi.md
- License: LICENSE
Awesome Lists containing this project
README
An easier solution to computer vision.
## What is pycamera?
PyCamera is a computer vision library 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
```python
from pycamera import cameracam = camera.Camera(0) # Choosing a camera
snap = cam.snap() # Snapping a picture from that camerasnap.save("output.jpg") # Save picture to output.jpg
```### Editing with Pillow
```python
from pycamera import camera
from PIL import ImageDrawcam = camera.Camera(0) # Choosing a camera
snap = cam.snap() # Snap photo
image = snap.to_pillow() # Convert pycamera image to Pillow imagedraw = ImageDraw.Draw(image)
white = (255, 255, 255)
draw.ellipse([(10, 10), (100, 100)], width=3, fill=white, outline=white) # Draw circle
image.show()
```### Live View
```python
import pycamera
from pycamera import cameracam = 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)
```