Skip to main content

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 image
  • actfw_raspberrypi.Display : Display using PiCamera Overlay
  • actfw_raspberrypi.vc4.Display : Display using VideoCore IV
  • actfw_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 example
    • picamera 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.

  1. Make changes for next version in master branch (via pull-requests).
  2. Make a PR that updates version in pyproject.toml and merge it to master branch.
  3. Create GitHub release from master branch's HEAD.
    1. Draft a new release.
    2. Create new tag named release-<New version> (e.g. release-1.4.0) from Choose a tag pull down menu.
    3. Write title and description.
    4. Publish release.
  4. Then CI will build/upload package to PyPI & API doc to GitHub Pages.

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

actfw_raspberrypi-3.3.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

actfw_raspberrypi-3.3.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file actfw_raspberrypi-3.3.0.tar.gz.

File metadata

  • Download URL: actfw_raspberrypi-3.3.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.16 Linux/6.8.0-1024-aws

File hashes

Hashes for actfw_raspberrypi-3.3.0.tar.gz
Algorithm Hash digest
SHA256 a1762f93ea584c7c4198bdff0a34f8f13f3438fbe66f6be86415fdd2ec03d38e
MD5 ffa3028ef21244f65a2da335f493928d
BLAKE2b-256 b337a6ed2854534f1ffb9a20a35e624c116c650aa1188973d961f0045a79dc32

See more details on using hashes here.

File details

Details for the file actfw_raspberrypi-3.3.0-py3-none-any.whl.

File metadata

  • Download URL: actfw_raspberrypi-3.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.16 Linux/6.8.0-1024-aws

File hashes

Hashes for actfw_raspberrypi-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed7d8aac47c83dfb9719c3e6a18589d3d40f49967ef447c38597c8690cbf4a0c
MD5 22c9c8f27eb3bec1da13e5dc5f93d692
BLAKE2b-256 2f86827444e2ea5d4daac55080f5660109dfd8a33bec113c9c1ac5e0bddde1d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page