Video capture and analytics for retail

IoT Edge
IoT Hub
Media Services
Azure Stack Edge
Web Apps

Solution Idea

If you'd like to see us expand this article with more information, such as potential use cases, alternative services, implementation considerations, or pricing guidance, let us know with GitHub Feedback!

This solution describes how retailers like grocery stores can monitor storefront events and take immediate actions to improve customer experience. In this solution, 5G-enabled internet protocol (IP) cameras capture real-time video of shelf inventory, curbside pickup, and cashier queues. On-premises IoT Edge devices analyze the video data in real time to detect the number of people in checkout queues, empty shelf space, or cars in the parking lot.

Metrics analysis can trigger anomaly events to alert the store manager or stock supervisors to take corrective actions. The solution stores summary video clips or events in the cloud for long-term trend analysis.

Potential use cases

This approach can also:

  • Monitor and maintain occupancy limits in an establishment.
  • Stop unauthorized users from tailgating others into an office building.
  • Prevent fraud at grocery store self-checkout stations.


Screenshot showing on-premises video capture and analysis through Azure Stack Edge with Azure Video Analyzer and Spatial Analysis. Event notifications pass through Azure IoT Hub to a web app for alerts, and to Azure Media Services Storage for long-term analysis.

  1. 5G-enabled IP cameras capture video in real time, and send the video feed to a 5G Radio Access Network (RAN) device.

  2. The 5G radios in the stores forward the data to the 5G packet core running on the Azure Stack Edge IoT Edge server.

  3. The packet core authenticates the devices, applies Quality of Service (QoS) policies, and routes the video traffic to the target application.

  4. Azure Video Analyzer also runs on the edge server, which provides the low latency necessary for transporting and processing the video feeds.

  5. Video Analyzer simplifies setting up a video streaming pipeline and pre-processing the video for spatial analysis.

  6. The Spatial Analysis module on the edge server anonymously counts cars, goods on a shelf, or people in line. The module sends these event notifications to the Azure IoT Hub module in the cloud.

  7. The IoT Hub module records the event notifications in a web app, and alerts store managers or stock keepers if certain thresholds are passed.

  8. An Azure Media Services Storage account stores events for long-term trend analysis to help with resource planning.


This solution uses the following Azure components:

  • Azure Stack Edge is a portfolio of devices that bring compute, storage, and intelligence to the IoT Edge. Azure Stack Edge acts as a cloud storage gateway that enables data transfers to Azure, while retaining local access to files.
  • Azure Video Analyzer helps build intelligent video-based applications using your choice of AI.
  • Web Apps in Microsoft Azure App Service creates and deploys mission-critical web applications that scale with your business.
  • Azure IoT Hub is a cloud-based managed service for bidirectional communication between IoT devices and Azure.
  • Media Services Storage uses Azure Storage to store large media files.
  • Azure Network Function Manager enables the deployment of network functions to the IoT Edge using consistent Azure tools and interfaces.

Next steps