Commit 223abc9
feat: add wide-angle camera detection and intelligent sensor mode selection (v2.7.0)
This release adds automatic detection of wide-angle cameras (Camera Module 3 Wide)
and intelligent sensor mode selection to preserve the full 120° field of view.
### Core Features
**Wide-Angle Camera Detection**
- Auto-detect Camera Module 3 Wide (120° FOV) via model name (imx708_wide_noir)
- Distinguish wide cameras (120° FOV) from standard cameras (66° FOV)
- Graceful fallback to standard camera if detection fails
**Intelligent Sensor Mode Selection**
- Wide cameras: Always use full sensor (Mode 0/1) to preserve 120° FOV
- Mode 2 crops the sensor and would lose the wide-angle advantage
- 720p-1080p: Use Mode 1 (2304x1296 @ 56fps) - Full sensor with binning
- 4K: Use Mode 0 (4608x2592 @ 14fps) - Full sensor, no binning
- Standard cameras: Can use Mode 2 (cropped) for higher framerates
- Optimized for framerate vs resolution tradeoffs
**Critical Fix**
- Wide-angle cameras no longer lose field of view at lower resolutions
- Previously: Mode 2 (1536x864 cropped) was used for 720p → Lost wide FOV
- Now: Mode 1 (2304x1296 full sensor) preserves full 120° FOV at 720p/1080p
### API Changes
**Enhanced GET /v1/camera/status**
- Added is_wide_camera: Boolean flag for camera type
- Added sensor_mode_width: Sensor mode width being used
- Added sensor_mode_height: Sensor mode height being used
**Enhanced GET /v1/camera/capabilities**
- Added is_wide_camera: Camera type detection result
- Added field_of_view_degrees: FOV in degrees (120° or 66°)
- Added sensor_modes: Complete IMX708 sensor mode specifications
- Added recommended_resolutions: Resolution presets optimized for camera type
- Wide cameras: Prioritize full FOV preservation
- Standard cameras: Prioritize framerate optimization
### Technical Details
**camera_service/camera_controller.py**
- New method: _detect_wide_camera() -> bool
- New method: _get_recommended_resolutions() -> list
- Updated: _get_optimal_sensor_mode() - Camera type-aware selection
- New instance variable: self._is_wide_camera
**camera_service/api.py**
- Updated CameraStatusResponse model with v2.7 fields
- Updated CameraCapabilitiesResponse model with v2.7 fields
- Field mappings in get_camera_status endpoint
- Field mappings in get_camera_capabilities endpoint
**Documentation**
- Updated CHANGELOG.md with comprehensive v2.7.0 release notes
- Updated README.md with wide-angle camera features section
- Updated API endpoint examples with v2.7 fields
- Added client integration examples for dynamic preset generation
### Breaking Changes
None - Fully backwards compatible with v2.6.x
### Tested On
- Raspberry Pi 5 with Camera Module 3 Wide NoIR (imx708_wide_noir)
- Verified 720p uses Mode 1 (2304x1296) preserving 120° FOV
- Verified API returns is_wide_camera=true and sensor mode info
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent dbde127 commit 223abc9
File tree
4 files changed
+312
-33
lines changed- camera_service
4 files changed
+312
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
8 | 109 | | |
9 | 110 | | |
10 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
216 | 218 | | |
217 | 219 | | |
218 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
219 | 258 | | |
220 | 259 | | |
221 | 260 | | |
| |||
472 | 511 | | |
473 | 512 | | |
474 | 513 | | |
475 | | - | |
| 514 | + | |
476 | 515 | | |
477 | 516 | | |
478 | 517 | | |
| |||
504 | 543 | | |
505 | 544 | | |
506 | 545 | | |
507 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
508 | 552 | | |
509 | 553 | | |
510 | 554 | | |
511 | | - | |
| 555 | + | |
512 | 556 | | |
513 | 557 | | |
514 | 558 | | |
| |||
550 | 594 | | |
551 | 595 | | |
552 | 596 | | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
553 | 612 | | |
554 | 613 | | |
555 | 614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
260 | 265 | | |
261 | 266 | | |
262 | 267 | | |
| |||
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
281 | 291 | | |
282 | 292 | | |
283 | 293 | | |
| |||
588 | 598 | | |
589 | 599 | | |
590 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
591 | 606 | | |
592 | 607 | | |
593 | 608 | | |
| |||
0 commit comments