Skip to main content

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​

  1. Receive image bytes from the RequestSingleImageFromDevice activity
  2. Save the full-resolution image to Blob Storage
  3. Generate a thumbnail (aspect-ratio preserved)
  4. Save the thumbnail to Blob Storage
  5. Write metadata to Table Storage (includes blob URLs, PTZ data, timestamp)
  6. Broadcast metadata to SignalR

Panoramic Images​

Service: PanoImageStorageService

Stitched 360Β° panoramas composed of multiple images from different pan positions.

Stitching Process​

  1. Receive array of component images (typically 6 images at 60Β° intervals)
  2. Create a canvas with width = sum of all component widths, height = max component height
  3. Draw each component image horizontally using Graphics.DrawImage()
  4. Encode as JPEG (quality 50 for size optimization)
  5. Save stitched panorama to Blob Storage
  6. Write metadata to Table Storage
  7. 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​

  1. Receive array of component images
  2. Create a ZIP archive containing all individual images
  3. Associate with a correlation ID linking to the stitched panorama
  4. Save ZIP to Blob Storage
  5. 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