CV Python
CV Python runs a selected .py computer-vision script against frames from the active capture tool.
Requirements
- A valid Python 3.10+ environment selected under Preferences â Python
- One running capture tool
- Any packages required by the selected script
- A compatible Compute GPU when the script uses inference or OCR
The panel shows Python: Configured/Invalid/Not configured and Video Input: Active/Not detected before the script starts.
Use
| Step | Action |
|---|---|
| 1 | Start the capture tool. |
| 2 | Open CV Python and select a .py script, or use Browse. |
| 3 | Start CV Python. |
| 4 | Use Restart after editing the script or when you need to reset its state. |
| 5 | Inspect errors in Output Panel and frames in Video Display/OpenGL Display. |
Script Shape
from helios import overlay
from helios.controls import BUTTON_10, get_actual
class CVWorker:
def __init__(self, width, height):
self.width = width
self.height = height
def process(self, frame):
if get_actual(BUTTON_10) > 0:
overlay.text("ACTIVE", 20, 20, color=(255, 255, 255))The frame is a borrowed HxWx3 NumPy view in BGR order. Process it in place during the callback and do not retain it across frames. Use helios.controls.send_cvdata() when the script needs to publish compact bytes.
Define an optional close() method when the worker owns resources that must be released. Helios calls it before unloading or restarting the script.
Available Script APIs
helios.controlsfor controller, keyboard/mouse, and compact data helpershelios.overlayfor frame and Fuser drawinghelios.inferencefor detection, pose, segmentation, and OCRhelios.visionfor current-frame contour, norm, and template matchinghelios.meterfor measuring distance, speed, and timing between two script-supplied points
See the Script API Reference for the supported user-facing calls.
Vision's per-frame find() and match() calls automatically use the current frame and take no frame argument. Meter similarly uses current frame size/timing while update(point, release_point, bounding_box, padding) receives only geometry found by the script. Create prepared Vision and Meter objects in __init__ and reuse them.
Python scripts do not compile against the native ABI. New named native functions become available through the matching Helios Python package without rebuilding the script.
Troubleshooting
- Python invalid: select another Python 3.10+ environment in Preferences. Helios validates the Python runtime, NumPy, OpenCV-Python, PyWin32, and the Helios CV host.
- Video not detected: start one capture tool, then restart CV Python.
- Import error: install the script's packages into the selected environment. Run Helios API scripts through CV Python inside Helios. If a bundled Helios module fails to load, update or re-extract the complete official release.
- Low FPS: tighten the ROI, lower capture resolution, reduce preview rate, and avoid unnecessary per-frame allocations.