English · العربية · Español · Français · 日本語 · 한국어 · Tiếng Việt · 中文 (简体) · 中文(繁體) · Deutsch · Русский
SyncImagingSystem is a Python workspace for synchronized frame-camera and event-camera capture, organized around practical workflows for EVK/DAVIS and Hikrobot/Haikang cameras.
| Section | Link |
|---|---|
| Primary workflows | Usage |
| Project setup | Installation |
| Troubleshooting | Troubleshooting |
| Contribution details | Contributing |
| Support | ❤️ Support |
SyncImagingSystem is a Python workspace for synchronized frame-camera and event-camera capture.
It provides three main active workflows:
| Script | Purpose | Notes |
|---|---|---|
DualCamera_separate_transform_davis+evk.py |
Unified frame + event GUI | Supports Hikrobot/Haikang frame camera + EVK or DAVIS event camera |
unified_event_gui.py |
Event-only GUI | EVK + DAVIS capture with auto-detect and per-run recording |
save_davis_tcp.py |
DAVIS capture script | Supports direct camera mode and DV Viewer TCP network mode |
The repository also contains vendor SDK/sample bundles and historical prototypes for reference.
| Area | Highlights |
|---|---|
| 🎛️ Unified GUI | Unified frame + event capture GUI with per-device controls and unified start/stop controls. |
| ⚡ Event GUI | Event-only GUI with multi-device connect/preview/record operations. |
| 📡 DAVIS Sources | DAVIS capture from direct hardware (INPUT_MODE = "camera") or DV Viewer network stream (INPUT_MODE = "network", default ports 7777/7778). |
| 💾 Output Formats | Recording outputs include .avi, .raw, .aedat4, and optional compressed events.npz. |
| 🗂️ Run Organization | Automatic timestamped run-folder organization under recordings/ or davis_output/. |
| 🔧 Controls | EVK bias controls in unified GUI workflows. |
| 🪞 Frame Transform | Vertical flip, horizontal flip, and 90-degree rotation in the dual-camera GUI. |
| 🖥️ Windowing | Preview window placement helpers for multi-window workflows (especially on Windows). |
SyncImagingSystem/
├── README.md
├── AGENTS.md
├── DualCamera_separate_transform_davis+evk.py # Main unified frame+event GUI (EVK + DAVIS)
├── DualCamera_separate_transform.py # Older integrated frame+EVK GUI variant
├── unified_event_gui.py # Event-only GUI for EVK + DAVIS
├── save_davis_tcp.py # DAVIS capture (camera or DV Viewer TCP)
├── code-legacy/ # Historical scripts/prototypes
├── evk_sdk/ # Prophesee/Metavision SDK scripts and samples
├── haikang_sdk/ # Hikrobot/Haikang SDK bundles and samples
├── i18n/ # Translation directory
├── recordings/ # Runtime output (gitignored, created on use)
└── davis_output/ # Runtime output for save_davis_tcp.py (gitignored)
- Hikrobot/Haikang frame camera (for frame workflows).
- EVK event camera and/or DAVIS event camera.
- Windows is the primary target for full frame-camera SDK integration and preview placement behavior.
- Linux/macOS may run parts of the event pipeline, but full parity is not guaranteed.
- Python 3.x.
Install core runtime dependencies in your active environment:
pip install numpy opencv-python dv-processingFor EVK workflows, install Prophesee Metavision Python packages available in your environment.
For Windows window-control behavior in GUI previews:
pip install pywin32- Clone the repository.
- Open a terminal in the repository root:
cd /home/lachlan/ProjectsLFS/SyncImagingSystem- Create/activate your Python environment.
- Install dependencies (see above).
- Ensure required camera SDK runtimes/drivers are installed for your devices.
Assumption note: exact vendor driver/firmware version matrix is not fully documented in-repo yet; preserve your known-good local SDK setup.
python DualCamera_separate_transform_davis+evk.pyWhat it provides:
- Auto-scan for frame and event devices at startup.
- Frame camera controls: connect, grab, preview, record, exposure/gain.
- Event camera controls: connect, capture, visualize, record.
- Unified controls: start/stop preview and recording for both sides together.
- Output directory + filename prefix controls in the GUI.
Default output behavior:
| Output | Pattern |
|---|---|
| Base directory | recordings/ |
| Run folder | <prefix>_<timestamp>/ |
| Frame files | <frame_device_label>/<prefix>_frame_<timestamp>.avi |
| Event files (EVK) | <event_device_label>/<prefix>_<timestamp>.raw |
| Event files (DAVIS) | <event_device_label>/output.aedat4 (+ events.npz on stop) |
python unified_event_gui.pyDefault behavior:
- Output base directory:
recordings/ - Default run prefix:
session - Device discovery:
- DAVIS from
dv.io.camera.discover() - EVK as
EVK:autowhen Metavision modules are available
- DAVIS from
- Record outputs:
- EVK:
.raw - DAVIS:
output.aedat4andevents.npz(if buffered events exist)
- EVK:
python save_davis_tcp.pyDefault key constants in the script:
| Constant | Default |
|---|---|
INPUT_MODE |
"camera" ("network" for DV Viewer TCP) |
HOST |
"127.0.0.1" |
EVENTS_PORT |
7777 |
FRAMES_PORT |
7778 |
CAPTURE_SECONDS |
3.0 |
SAVE_EVENTS_NPZ |
True |
SAVE_FRAMES_VIDEO |
True |
SAVE_AEDAT4 |
True |
SHOW_EVENT_PREVIEW |
True |
Output directory format:
davis_output/<YYYYmmdd_HHMMSS>/- Typical files:
events.npz,frames.avi,output.aedat4
Adjust the top-level uppercase constants to configure:
- input source (
INPUT_MODE) - network endpoint (
HOST,EVENTS_PORT,FRAMES_PORT) - capture duration (
CAPTURE_SECONDS) - output toggles (
SAVE_EVENTS_NPZ,SAVE_FRAMES_VIDEO,SAVE_AEDAT4) - preview behavior (
SHOW_EVENT_PREVIEW,PREVIEW_FPS,PREVIEW_WINDOW_NAME)
GUI-exposed runtime settings include:
- output folder and filename prefix
- frame transforms (vertical/horizontal flip, rotation)
- frame exposure and gain controls
- EVK bias controls (
bias_diff,bias_diff_off,bias_diff_on,bias_fo,bias_hpf,bias_refr) when supported
Key defaults (editable in script):
DEFAULT_OUTPUT_DIR = "recordings"DEFAULT_PREFIX = "session"PREVIEW_FPS = 30.0
Edit save_davis_tcp.py:
INPUT_MODE = "camera"
CAPTURE_SECONDS = 10.0
SAVE_AEDAT4 = True
SAVE_EVENTS_NPZ = True
SAVE_FRAMES_VIDEO = TrueRun:
python save_davis_tcp.pyEdit save_davis_tcp.py:
INPUT_MODE = "network"
HOST = "127.0.0.1"
EVENTS_PORT = 7777
FRAMES_PORT = 7778Run:
python save_davis_tcp.pypython unified_event_gui.pyThen in GUI:
- Click
Scan. - Connect selected devices.
- Set output folder/prefix.
- Use
Record Allto start synchronized per-run output folders.
- No build system or package metadata is currently defined (
pyproject.toml,requirements.txt, etc. are absent). - Scripts are launched directly with Python entrypoints.
- Configuration is mostly script constants and GUI controls, not CLI flags.
- Vendor SDK directories are intentionally kept in-repo:
evk_sdk/haikang_sdk/
- Output/data artifacts are gitignored, including:
recordings/,davis_output/,data/,*.aedat4,*.raw,*.avi,*.npz, etc.
- The dual-camera GUI includes preview placement logic designed to reduce preview pop-in and keep windows from obscuring the main controls, especially on Windows.
- No devices found at startup.
- Verify camera cables, power, and vendor drivers.
- Confirm device permissions and that event/frame runtimes are installed.
- Mixed GUI freezes on first frame preview.
- Start with frame and event devices disconnected, then reconnect and re-scan.
- DAVIS network mode receives no data.
- Confirm DV Viewer stream ports match
EVENTS_PORT/FRAMES_PORT. - Verify firewall rules for local loopback and UDP/TCP traffic as configured.
- Confirm DV Viewer stream ports match
- Event
.npzor.aedat4file not created.- Verify save toggles in
save_davis_tcp.pyare enabled. - Confirm write permissions to output folder.
- Verify save toggles in
- Window position jumps on Windows.
- Ensure
pywin32is installed and Python has required permissions.
- Ensure
Planned docs-driven and usability improvements (not yet claimed complete in-repo):
- Centralize dependencies in a pinned requirements file.
- Add lightweight CLI alternatives for non-GUI capture modes.
- Expand SDK and firmware compatibility matrix.
- Add safe, hardware-independent tests for project constants and file layout logic.
Contributions are welcome.
- Keep changes constrained to script-level workflows and avoid altering runtime capture behavior unless intentionally changing a camera path.
- Preserve existing camera-thread lifecycle and output folder layout conventions unless justified in the PR.
- Validate changed paths/scripts with at least one full local capture run.
- Include assumptions and hardware context in your PR description.
| Donate | PayPal | Stripe |
|---|---|---|
If you need integration help for a specific hardware setup, include your camera model, OS, and exact error output in your issue description.
No license file is present in the repository root at the time of this draft. Add a LICENSE file before public redistribution.
