pupilometer/src/unified_web_ui
Tempest 5e7f874bfd feat(web-ui): Constrain camera feed section and Basler streams to viewport height
Addressed user feedback to prevent the camera feed section and its internal
streams from overflowing the viewport.

- **Explicitly constrained camera-view height:** Ensured `.camera-view` utilizes
  `height: 100%` and `overflow-y: auto` to fit within its parent (`.main-container`)
  and allow internal scrolling if content is too tall.
- **Refined individual stream container sizing:** Removed fixed `height: 100%`
  from `.camera-container-individual` and re-enabled `max-width: 100%`. This,
  combined with `aspect-ratio` and `max-height: 100%`, allows individual camera
  streams to scale correctly within their allocated grid cells without causing
  overflow.
- **Ensured grid row containment:** Applied `height: 100%` and `overflow: hidden`
  to `.camera-color-row` and `.camera-mono-row` to tightly constrain content
  within grid rows.
2025-12-03 12:29:23 +07:00
..
static feat(web-ui): Constrain camera feed section and Basler streams to viewport height 2025-12-03 12:29:23 +07:00
templates feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00
tests feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00
app.py feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00
ble_controller.py feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00
camera_scanner.py feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00
gstreamer_pipeline.py feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00
README.md feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00
run.py feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00
test.py feat(web-ui): Implement responsive camera stream layout and styling 2025-12-03 10:45:01 +07:00

Unified WebUI

This application combines the functionality of the detectionSoftware and controllerSoftware into a single, unified web interface.

Features

  • Camera View: Displays a tiled video stream from multiple Basler cameras.
  • Lamp Control: Provides a web interface to control a 5x5 LED matrix via Bluetooth Low Energy (BLE).
  • Responsive UI: The UI is designed to work on both desktop and mobile devices. On desktop, the lamp control and camera view are displayed side-by-side. On mobile, they are in separate tabs.

Setup

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Run the application:

    python src/unified_web_ui/app.py
    
  3. Open the web interface: Open a web browser and navigate to http://<your-ip-address>:5000.

Modules

  • app.py: The main Flask application file.
  • ble_controller.py: Handles the BLE communication with the lamp matrix.
  • camera_scanner.py: Scans for connected Basler cameras.
  • gstreamer_pipeline.py: Creates and manages the GStreamer pipeline for video processing.
  • templates/index.html: The main HTML template for the web interface.
  • static/style.css: The CSS file for styling the web interface.