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 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
master
branch (via pull-requests). - Make a PR that updates version in
pyproject.toml
and merge it tomaster
branch. - Create Git tag from
master
branch's HEAD namedrelease-<New version>
. E.g.release-1.4.0
. - Then CI will build/upload package to PyPI & API doc to GitHub Pages.
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-2.0.0a0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd773842a855137b6e7c666bd16487a4c7fe291dafaa7bc80a9f0dc101391064 |
|
MD5 | cca7fbb2baeb98486e7291a1fcc8403d |
|
BLAKE2b-256 | 632f935bbdb734d5956ae918a9380f16bea048ee1640aac4e7cd5a302327608a |
Close
Hashes for actfw_raspberrypi-2.0.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 159b3bfc628f5be11c4ac2c9c66f249c2e7251b5108749dab7c28d8bcd266fe1 |
|
MD5 | 5db51116d9c1b0bf2ebe082ebce72eaa |
|
BLAKE2b-256 | 68e920cf61f4f766109ab569bffaa30175e27a083312d33b31c6e79c49746c7e |