How dnxjcui/neuromorphic-screens works
Project Type and Purpose
• neuromorphic_screens.exe (CLI + ImGui replay)
• neuromorphic_screens_streaming.exe (live GUI, overlay, UDP)
• A Python-based test suite/visualizer lives under src/test_UDP, using a bundled virtual environment.
File Structure
• Top Level
• CMakeLists.txt: defines 3 targets (capture/replay exe, streaming exe, benchmark tool)
• benchmark_parallelization.cpp, build_benchmark.bat: OpenMP performance test
• docs/: demo GIFs
• env/: isolated Python venv for UDP tests
• src/: main application code, subdivided into capture/, core/, streaming/, visualization/, test_UDP/
• src/capture: Desktop Duplication API + OpenMP to detect pixel changes
• src/core: command-line parsing, event data structures, file I/O, temporal index, timing
• src/streaming: high-throughput UDP event streamer with adaptive dropping
• src/visualization: multiple GUIs (ImGui event viewer, ImGui streaming viewer, direct overlay)
• src/test_UDP: Python scripts for testing and visualizing UDP streaming
README for Additional Insights
• Modes of operation (capture, replay, GUI, overlay, UDP streaming)
• Performance features: ring buffer temporal index, dirty‐region tracking, event deduplication, batch processing
• Technical stack: DirectX 11, OpenMP, ImGui, CMake, Python+PyOpenGL+ImGui (for test_UDP)
1. Screen Capture Module (src/capture)
2. Core Event Engine (src/core)
– Command Line Parser
– EventGenerator & EventStream
– EventFile I/O (AEDAT/CSV/TXT)
– TemporalEventIndex & Deduplication
– Timing & Performance Counters
3. Streaming Engine (src/streaming)
– UDPEventStreamer
4. Visualization Layer
– ImGui Event Viewer (src/visualization/imgui_event_viewer)
– ImGui Streaming Viewer (src/visualization/imgui_streaming_viewer)
– Direct Overlay Viewer (src/visualization/direct_overlay_viewer)
5. Command-line Executables
– main.cpp (capture + replay + GUI)
– main_streaming.cpp (live/overlay/UDP)
6. External/Secondary Components
– File System (for .aedat/.csv/.txt storage)
– Network (UDP socket)
– Python UDP Visualizer (src/test_UDP)
– Third-party libs: DirectX11, ImGui, OpenMP
1. Screen → [Capture Module] → Pixel-change events
2. → [Core Event Engine] → timestamped EventStream →
• → [File I/O] → Disk
• → [Temporal Index + Deduplication] → filtered stream →
– → [ImGui Event Viewer] (on replay)
– → [ImGui Streaming Viewer] (live GUI)
– → [Direct Overlay Viewer] (live overlay)
– → [UDP EventStreamer] → Network
· → [Python UDP Visualizer]
c. Architectural Patterns & Design Principles
• Modular layering: capture, core, streaming, UI
• Single Responsibility: each directory/module has a clear focus
• Lock-free / Mutex-protected data structures for thread safety
• Batch processing & ring‐buffer indexing for O(k) recent‐event access
• Adaptive network backpressure / event dropping
d. Key Technologies & Frameworks
• Desktop Duplication API + DirectX11 for capture & rendering
• OpenMP for parallel pixel processing (benchmark and in capture)
• Dear ImGui for all C++ GUIs
• BSD-style sockets (UDP) for network streaming
• CMake for build orchestration
• Python + PyOpenGL + imgui[glfw] for test_UDP visualizer