Image Types
The ImageStorageService handles three distinct image types, each with its own concrete storage service.
Single Imagesβ
Service: SingleImageStorageService
The most common image type. Captures a single frame from the camera's current PTZ position.
Storage Flowβ
- Receive image bytes from the
RequestSingleImageFromDeviceactivity - Save the full-resolution image to Blob Storage
- Generate a thumbnail (aspect-ratio preserved)
- Save the thumbnail to Blob Storage
- Write metadata to Table Storage (includes blob URLs, PTZ data, timestamp)
- Broadcast metadata to SignalR
Panoramic Imagesβ
Service: PanoImageStorageService
Stitched 360Β° panoramas composed of multiple images from different pan positions.
Stitching Processβ
- Receive array of component images (typically 6 images at 60Β° intervals)
- Create a canvas with
width = sum of all component widths,height = max component height - Draw each component image horizontally using
Graphics.DrawImage() - Encode as JPEG (quality 50 for size optimization)
- Save stitched panorama to Blob Storage
- Write metadata to Table Storage
- Broadcast metadata to SignalR
UCSD Panoramasβ
When images come from the UCSD API, they may need re-stitching with corrected orientation:
- UCSD provides pre-captured panoramic components
- The service re-stitches them with proper alignment
- Results in a seamless 360Β° view
Pre-Stitched Imagesβ
Service: PreStitchedImageStorageService
Raw component images saved before panoramic stitching, stored as a ZIP archive.
Storage Flowβ
- Receive array of component images
- Create a ZIP archive containing all individual images
- Associate with a correlation ID linking to the stitched panorama
- Save ZIP to Blob Storage
- Write metadata to Table Storage
Purposeβ
Pre-stitched archives provide:
- Data provenance β Original captures can be verified against the stitched result
- Re-stitching β If the stitching algorithm is improved, panoramas can be regenerated from the raw components
- Debugging β Individual component quality can be inspected