feat: GET /api/raw/latest, color + depth of one frameset without align
For aligning on the host: on the Jetson rs.align.process costs ~104 ms and holds the GIL (optimize-streams R04/R05). JSON in the usual envelope, one response: frameset_seq, camera_timestamp_ms, timestamp_domain, host_timestamp, color_jpeg_b64 (color grid), depth_png_b64 (16-bit PNG, mm, depth grid), color_shape, depth_shape, depth_units. after=N / timeout_ms as /api/color/latest. JSON + base64 like /api/capture: every client already parses that envelope, one request gets both images, base64 costs ~0.1 ms. Built once per frameset (EncodedRaw, last 4 kept); the color JPEG is the color channel's own (same bytes). The depth is converted only on request (camera.raw_frame, phase raw_depth; PNG in phase png_raw_depth). camera: _published() shared by color_frame() and raw_frame(); _depth_mm() extracted unchanged from _aligned_frame(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3b6c17c86e
commit
22815e9b0f
3 files changed
+117
-7
No files matched your search
@@ -166,6 +166,7 @@ suo `.env` l'URL della camera con `http://192.168.123.99:8878`.
|
||||
| `/api/close` | POST | Chiude camera |
|
||||
| `/api/capture` | GET | RGB+depth in JSON (base64) |
|
||||
| `/api/rgb` | GET | RGB come JPEG (colore del frame allineato: stesso frame di `/api/depth`) |
|
||||
| `/api/raw/latest` | GET | **Frameset grezzo per allineare sull'host**: JSON con colore (JPEG, griglia colore) e profondità (PNG 16 bit in mm, griglia depth) **dello stesso frameset, senza align**, più `frameset_seq` (stessa numerazione di `/api/color/latest` e del `frameset_seq` di `/api/capture`), `camera_timestamp_ms`, `timestamp_domain`, `host_timestamp`. `after=N` / `timeout_ms` come `/api/color/latest`. Calibrazione per allineare: `/api/intrinsics` |
|
||||
| `/api/color/latest` | GET | **Canale colore veloce**: JPEG dell'ultimo frame colore, **senza align**, al ritmo della camera. `after=N` aspetta un frame numerato oltre N (fino a `timeout_ms`, default 1000, max 5000; 504 se non arriva). Header `X-Frame-Seq`, `X-Camera-Timestamp-Ms` (orologio della camera), `X-Camera-Timestamp-Domain`, `X-Host-Timestamp` (arrivo sull'host, s). Non va usato insieme a `/api/depth`: non è lo stesso frame |
|
||||
| `/api/depth` | GET | Depth come PNG 16-bit (mm) |
|
||||
| `/api/depth/color` | GET | Depth colormap JET come JPEG |
|
||||
|
||||
Reference in new issue
Block a user