Script API Reference
Helios provides a server API for trusted Online Resources integrations plus CV APIs for scripts that read input state, analyze images, run models, read text, draw overlays, and publish compact data.
Use these pages after installing and selecting either CV Python or CV C++. For controller-only scripts, use the GPC 3 reference.
Choose a Reference
| Reference | Use it for |
|---|---|
| Online Resources API | Manage access to your Private or Locked resources from a trusted server-side app |
| Controls and Script Data | Read controller, keyboard, or mouse state and publish compact bytes |
| Vision Tools | Find colored contours and compare images or templates |
| Meter Measurements | Measure distance, speed, and timing between two detected points |
| Python Inference | Run detection, pose, or segmentation models from CV Python |
| C++ Inference | Run the same model workflow from CV C++ |
| OCR | Read text from fixed frame regions |
| Overlay Drawing | Draw lines, boxes, circles, and text on the frame or fuser output |
Python Worker
Helios creates CVWorker with the capture size and calls process(frame) for each frame. The frame is an HxWx3 uint8 BGR image.
class CVWorker:
def __init__(self, width, height):
pass
def process(self, frame):
pass
def close(self):
pass # Optional cleanup before unload or restartProcess the borrowed frame in place and do not retain it across callbacks. Put model creation and other one-time setup in __init__, not in the per-frame method. Use helios.controls.send_cvdata() to publish compact bytes. Define close() only when the worker owns resources that need cleanup.
Common Workflow
| Step | Action |
|---|---|
| 1 | Confirm a capture plugin is producing video. |
| 2 | Add CV Python or CV C++ and select the script. |
| 3 | Add only the APIs the script needs. |
| 4 | Process the frame and publish any optional script-data bytes. |
| 5 | Check the Output Panel when a script does not start. |
The Compute GPU selected in Helios Preferences is used for inference, OCR, and other accelerated vision work.