-
Notifications
You must be signed in to change notification settings - Fork 458
Add camera device endpoint #5101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new endpoint to retrieve available camera devices on the system. The implementation includes a new CameraInfo schema, service method to enumerate cameras, and API endpoint at /api/system/devices/camera.
Key changes:
- Added
get_camera_devices()method toSystemServicethat uses thecv2-enumerate-cameraslibrary - Created new
CameraInfoschema with index and name fields - Added GET endpoint
/api/system/devices/camerato the system router
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| application/backend/pyproject.toml | Added cv2-enumerate-cameras dependency version 1.3.1 |
| application/backend/app/schemas/system.py | Defined CameraInfo schema for camera device information |
| application/backend/app/services/system_service.py | Implemented get_camera_devices() method using enumerate_cameras library |
| application/backend/app/api/routers/system.py | Added GET /api/system/devices/camera endpoint |
| application/backend/tests/unit/services/test_system_service.py | Added test coverage for get_camera_devices() method |
| application/backend/tests/unit/routers/test_system.py | Added test coverage for camera devices endpoint |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test coverage report
|
Docker Image SizesCPU
GPU
XPU
|
Summary
Adds an endpoint which displays the available camera devices
How to test
GET /api/system/devices/cameraChecklist