actfw's additional components for RaspberryPi
Project description
actfw-raspberrypi
actfw's components for Raspberry Pi. actfw is a framework for Actcast Application written in Python.
Installation
sudo apt-get update
sudo apt-get install -y python3-pip python3-pil
pip3 install actfw-raspberrypi
Document
Usage
See actfw-core for basic usage.
actfw-raspberrypi provides:
actfw_raspberrypi.capture.PiCameraCapture
: Generate CSI camera capture imageactfw_raspberrypi.Display
: Display using PiCamera Overlayactfw_raspberrypi.vc4.Display
: Display using VideoCore IVactfw_raspberrypi.vc4.Window
: Double buffered window
Example
example/hello
: The most simple application example- Use HDMI display as 640x480 area
- Capture 320x240 RGB image from CSI camera
- Draw "Hello, Actcast!" text
- Display it as 640x480 image (with x2 scaling)
- Notice message for each frame
- Support application setting
- Support application heartbeat
- Support "Take Photo" command
- Depends: python3-picamera fonts-dejavu-core
example/grayscale
: Next level application example- Use HDMI display as 640x480 area
- Capture 320x240 RGB image from CSI camera
- Convert it to grayscale
- Display it as 640x480 image (with x2 scaling)
- Notice message for each frame
- Support application setting
- Support application heartbeat
- Support "Take Photo" command
- Depends: python3-picamera
example/parallel_grayscale
: Paralell processing application example- Use HDMI display as 640x480 area
- Capture 320x240 RGB image from CSI camera
- Convert it to grayscale
- There exists 2 converter task
- Round-robin task scheduling
- Display it as 640x480 image (with x2 scaling)
- Notice message for each frame
- Show which converter processes image
- Support application setting
- Support application heartbeat
- Support "Take Photo" command
- Depends: python3-picamera
example/uvccamera
: UVC camera capture examplepicamera
is unnecessary- Use HDMI display center 640x480 area
- Capture 320x240 RGB image from UVC camera
- Convert it to grayscale
- Display it as 640x480 image (with x2 scaling)
- Notice grayscale pixel data histogram
- Support application setting
- Support application heartbeat
- Support "Take Photo" command
- Depends: libv4l-0 libv4lconvert0
Development Guide
Installation of dev requirements
pip3 install pipenv
pipenv install --dev -e .
Running tests
pipenv run nose2 -v
Running examples
On a Raspberry Pi connected to HDMI display:
pipenv run install-raspberrypi
pipenv run python example/hello
Uploading package to PyPI
See https://packaging.python.org/tutorials/packaging-projects/ first.
pipenv run python setup.py sdist bdist_wheel
pipenv run python -m twine upload --repository pypi dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for actfw-raspberrypi-1.4.0a2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3f087dffc3ea227cd88f30b57e618e9ef865f706f9df2d8696e33311643dbb8 |
|
MD5 | 4775ed7fb74c02b75854a6f9d11978ca |
|
BLAKE2b-256 | 0b588f1a0c6df35997f60af6ef99cf86b003d64c86ca8bce19550fe317a10af8 |
Close
Hashes for actfw_raspberrypi-1.4.0a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96ac953b2de82f52fa966908012b6719a87e1101fe60136a763a3d4bd12862ca |
|
MD5 | ee96f5a272356db4a865c4c4077c3043 |
|
BLAKE2b-256 | 931fc5f3c08179815ee80c0bfb07b80db2805daf03866814bf44358707482f70 |