35 lines
893 B
Python
35 lines
893 B
Python
#!/usr/bin/env python3
|
|
"""Launch the public Sensor Bench exhibition app without installing the package.
|
|
|
|
Usage (from the repository root):
|
|
python run.py
|
|
|
|
Private operator UI:
|
|
python internal/run_operator.py
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Must be set before importing OpenCV / sensor_bench modules that import cv2.
|
|
os.environ.setdefault("OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS", "0")
|
|
|
|
ROOT = Path(__file__).resolve().parent
|
|
SRC = ROOT / "src"
|
|
if str(SRC) not in sys.path:
|
|
sys.path.insert(0, str(SRC))
|
|
|
|
# Prefer sibling orisys-sdk checkout for Sensor-owned preview.
|
|
ORISYS_SRC = ROOT.parent / "orisys-sdk" / "src"
|
|
if ORISYS_SRC.is_dir() and str(ORISYS_SRC) not in sys.path:
|
|
sys.path.insert(0, str(ORISYS_SRC))
|
|
|
|
from sensor_bench.main import main # noqa: E402
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|