Phase 1: Vision & Perception - DXGI Capture and Window Management #1

Merged
nikomo merged 1 commit from feat/dpi-dynamic-capture into master 2026-05-06 23:03:04 +00:00
Collaborator

This PR implements the core perception layer for the self-driving agent.

Changes

  • High-Speed Frame Capture: Implemented FrameCapture using bettercam (DXGI) to ensure low-latency, high-FPS screen capture.
  • Window Management: Implemented WindowManager using pygetwindow and pywin32 to:
    • Automatically detect the Assetto Corsa window coordinates.
    • Handle window focus management (restoring minimized windows and bringing AC to the foreground).
  • DPI Awareness: Integrated Windows Display Scaling (DPI awareness) to ensure coordinate accuracy across different display settings.
  • Dynamic Repositioning: Enabled real-time capture region updates to support dynamic window movement.
  • Dependencies: Updated requirements.txt with bettercam, pygetwindow, pywin32, and numpy.

Verification

  • Implemented basic test scripts (test_capture.py, test_dynamic_capture.py) to verify capture speed and coordinates on Windows.

This completes Phase 1 of the project roadmap.

This PR implements the core perception layer for the self-driving agent. ### Changes - **High-Speed Frame Capture**: Implemented `FrameCapture` using `bettercam` (DXGI) to ensure low-latency, high-FPS screen capture. - **Window Management**: Implemented `WindowManager` using `pygetwindow` and `pywin32` to: - Automatically detect the Assetto Corsa window coordinates. - Handle window focus management (restoring minimized windows and bringing AC to the foreground). - **DPI Awareness**: Integrated Windows Display Scaling (DPI awareness) to ensure coordinate accuracy across different display settings. - **Dynamic Repositioning**: Enabled real-time capture region updates to support dynamic window movement. - **Dependencies**: Updated `requirements.txt` with `bettercam`, `pygetwindow`, `pywin32`, and `numpy`. ### Verification - Implemented basic test scripts (`test_capture.py`, `test_dynamic_capture.py`) to verify capture speed and coordinates on Windows. This completes Phase 1 of the project roadmap.
nikomo merged commit 1324a84a53 into master 2026-05-06 23:03:04 +00:00
nikomo deleted branch feat/dpi-dynamic-capture 2026-05-06 23:03:04 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nikomo/self-driving!1
No description provided.