update examples read.me
This commit is contained in:
+30
-69
@@ -1,36 +1,45 @@
|
|||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
User-facing demo scripts for the Orisys SDK. Run from the repository root.
|
Top-level demo scripts under `examples/`. Run them from the repository root.
|
||||||
|
|
||||||
## Layout
|
## Top-Level Files
|
||||||
|
|
||||||
- `basic_pipeline.py` — compound-eye sensor, OpenCV visualization
|
- `README.md` — this overview of the root-level example entry points
|
||||||
- `plot_data.py` — compound-eye sensor, force charts (PyQtGraph)
|
- `app_paths.py` — path helpers used by the packaged / frozen dashboard entry point
|
||||||
- `two_sensor_pipeline.py` — dual-sensor multiprocessing demo
|
- `basic_pipeline.py` — basic single-sensor OpenCV demo for the compound-eye pipeline
|
||||||
- `finger_pipeline.py` — finger UV minimal pipeline
|
- `plot_data.py` — single-sensor demo with OpenCV views plus PyQtGraph force charts
|
||||||
- `finger_pipeline_3dview.py` — finger UV unified Qt dashboard
|
- `two_sensor_pipeline.py` — two-sensor multiprocessing demo for parallel acquisition / display
|
||||||
- `pipeline/` — runtime acquisition (`FingerPipeline`, `FingerFrameView`)
|
- `finger_pipeline.py` — minimal finger UV-unroll pipeline with optional profiling
|
||||||
- `gui/` — Qt dashboard composition (3D + 2D + charts in one window)
|
- `finger_pipeline_3dview.py` — main finger dashboard entry point with the unified Qt UI
|
||||||
- `viz/` — rendering helpers (offscreen mesh, 2D panels, charts)
|
|
||||||
|
|
||||||
## Typical usage
|
## Typical Usage
|
||||||
|
|
||||||
|
For the Qt dashboard:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -e ".[gui]"
|
pip install -e ".[gui]"
|
||||||
|
|
||||||
python examples/finger_pipeline_3dview.py -v 0 -c ./config/dd02-ov.json
|
python examples/finger_pipeline_3dview.py -v 0 -c ./config/dd02-ov.json
|
||||||
|
```
|
||||||
|
|
||||||
# Sales-demo shim
|
For the minimal finger pipeline:
|
||||||
python scripts/qt_viewer_finger.py -v 0 -c ./config/dd02-ov.json
|
|
||||||
|
```bash
|
||||||
|
python examples/finger_pipeline.py --camera_id 0 --config ./config/dd02-ov.json
|
||||||
|
```
|
||||||
|
|
||||||
|
For the basic compound-eye pipeline:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python examples/basic_pipeline.py -v 0 -c ./config/ddjx01.json
|
||||||
```
|
```
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- SDK installed (`pip install -e .`)
|
- SDK installed from the repository root, for example `pip install -e .`
|
||||||
- camera or test video
|
- camera index or test video path
|
||||||
- JSON config under `./config/`
|
- matching config files under `./config/`
|
||||||
|
|
||||||
GUI examples additionally require:
|
Qt / PyQtGraph examples additionally require:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -e ".[gui]"
|
pip install -e ".[gui]"
|
||||||
@@ -38,54 +47,6 @@ pip install -e ".[gui]"
|
|||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Dashboard: click **启动** to start acquisition; `Q` quit, `R` reset, `S`/`E` record, `Esc` fullscreen.
|
- `finger_pipeline_3dview.py` is the main interactive demo. It uses `app_paths.py` so the same entry point works in editable and packaged runs.
|
||||||
|
- Dashboard controls: click **启动** to start acquisition; `Q` quits, `R` resets, `S` starts recording, `E` stops recording, and `Esc` toggles fullscreen.
|
||||||
## Windows standalone folder (CPU-only)
|
- `finger_pipeline.py` is the leanest finger example if you want to validate UV unroll + force/contact processing without the full dashboard.
|
||||||
|
|
||||||
Build a portable folder with bundled Python, packages, `config/`, and `assets/`:
|
|
||||||
|
|
||||||
```bat
|
|
||||||
conda activate py310
|
|
||||||
pip install -e ".[gui]"
|
|
||||||
pip install nuitka ordered-set zstandard
|
|
||||||
|
|
||||||
build\build_gui_win.bat
|
|
||||||
```
|
|
||||||
|
|
||||||
Output:
|
|
||||||
|
|
||||||
```
|
|
||||||
dist/OrisysDashboard/
|
|
||||||
OrisysDashboard.exe
|
|
||||||
config/
|
|
||||||
assets/
|
|
||||||
README.txt
|
|
||||||
(+ bundled DLLs and runtime files)
|
|
||||||
```
|
|
||||||
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```bat
|
|
||||||
cd dist\OrisysDashboard
|
|
||||||
OrisysDashboard.exe --video path\to\video.mp4
|
|
||||||
```
|
|
||||||
|
|
||||||
After building, smoke-test bundled files and `--help`:
|
|
||||||
|
|
||||||
```bat
|
|
||||||
python build\verify.py --gui-dist
|
|
||||||
```
|
|
||||||
|
|
||||||
Manual QA on a machine without Python:
|
|
||||||
|
|
||||||
1. Launch `OrisysDashboard.exe` — dashboard window opens
|
|
||||||
2. Play a bundled or local video — 3D mesh and charts update
|
|
||||||
3. Confirm default config resolves to `config\dd02-ov.json`
|
|
||||||
4. Toggle settings (log, displacement arrows, thresholds)
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
|
|
||||||
- One-folder layout is recommended (not a single-file exe) for Open3D + PyQt5 reliability
|
|
||||||
- CPU-only: CUDA/CuPy are excluded from the build
|
|
||||||
- Expect a large folder (Open3D, OpenCV, SciPy, Qt)
|
|
||||||
- Frozen path resolution lives in `examples/app_paths.py`
|
|
||||||
|
|||||||
Reference in New Issue
Block a user