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 examplepicamerais 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 poetry
poetry install
Running tests
poetry run nose2 -v
Running examples
On a Raspberry Pi connected to HDMI display:
poetry run python example/hello
Releasing package & API doc
CI will automatically do. Follow the following branch/tag rules.
- Make changes for next version in
masterbranch (via pull-requests). - Make a PR that updates version in
pyproject.tomland merge it tomasterbranch. - Create GitHub release from
masterbranch's HEAD.- Draft a new release.
- Create new tag named
release-<New version>(e.g.release-1.4.0) fromChoose a tagpull down menu. - Write title and description.
- Publish release.
- Then CI will build/upload package to PyPI & API doc to GitHub Pages.
Metadata
Release files for actfw-raspberrypi 3.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| actfw_raspberrypi-3.3.1.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| actfw_raspberrypi-3.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.8 kB
Release files / actfw_raspberrypi-3.3.1.tar.gz
| Download URL | actfw_raspberrypi-3.3.1.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51d5c76c8941833c29d24a2857657d1aa4afdf29f2e1b87ea8315c74aef3c2d7
|
|
BLAKE2b-256 checksum How to use checksums |
36035ed3eef56a279c0288cdb6672a39fee2d404d5b3af07c0d0af598d0710a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.17 Linux/6.8.0-1024-aws
|
Release files / actfw_raspberrypi-3.3.1-py3-none-any.whl
| Download URL | actfw_raspberrypi-3.3.1-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
591433a13e08e1c77cf71bd7cd27cd2e5173a12f14a887e90e868a0a4a4e4a10
|
|
BLAKE2b-256 checksum How to use checksums |
ec9c2a44bbc4d7d8be6e9e98417bf24632ecb82ae154e6b4a10a546f83999b40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.17 Linux/6.8.0-1024-aws
|