Actcast Application Framework
Project description
Actcast Application Framework for Python
This package provides a Python API for developing Actcast apps.
Installation
for Raspberry Pi
sudo apt-get update
sudo apt-get install -y python3-pil python3-setuptools python3-wheel
pip3 install .
Document
Usage
Construct your application with a task parallel model
- Application
actfw.Application
: Main application
- Workers
actfw.task.Producer
: Task generatoractfw.capture.PiCameraCapture
: Generate CSI camera capture imageactfw.capture.V4LCameraCapture
: Generate UVC camera capture image
actfw.task.Pipe
: Task to Task converteractfw.task.Consumer
: Task terminator
Each worker is executed in parallel.
User should
- Define subclass of
Producer/Pipe/Consumer
class MyPipe(actfw.task.Pipe): def proc(self, i): ...
- Connect defined worker objects
p = MyProducer() f1 = MyPipe() f2 = MyPipe() c = MyConsumer() p.connect(f1) f1.connect(f2) f2.connect(c)
- Register to
Application
app = actfw.Application() app.register_task(p) app.register_task(f1) app.register_task(f2) app.register_task(c)
- Execute application
app.run()
Please, see and try examples.
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
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size actfw-1.3.9-py3-none-any.whl (28.5 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |