viplivergbhistogram
Open this model

# Histogram Display Using Live Video Acquisition

This demo uses the From Video Device block to acquire live image data from the Logitech® Quickcam Zoom webcam into Simulink®. This demo uses the Histogram block from Computer Vision System Toolbox™ to calculate the histograms of R, G, and B values in each video frame to maximize the dynamic range of the acquired video.

Image Acquisition Toolbox™ provides functions for acquiring images and video directly into MATLAB® and Simulink from PC-compatible imaging hardware. You can detect hardware automatically, configure hardware properties, preview an acquisition, and acquire images and video.

This demo requires Image Acquisition Toolbox and a Logitech Quickcam Zoom webcam to run the model.

## Contents

- Demo Model
- Live Video Input
- Histogram Display Results
- Available Demo Versions

Watch histogram display using live video acquisition. (5 seconds)

## Demo Model

The following figure shows the demo model using the From Video Device block.

## Live Video Input

The demo acquires the input video live from a winvideo image acquisition device (Logitech Quickcam Zoom). In this demo, the block acquires RGB frames from the Logitech camera and outputs them into the Simulink model at every simulation time step.

## Histogram Display Results

The demo displays the histograms of R, G, and B values in the RGB Histogram window and displays the original RGB video in the To Video Display window.

Even though a winvideo Logitech webcam was used for this demo, you can update this model to use other supported image acquisition devices. This enables you to use the same Simulink model with different image acquisition hardware.

## Available Demo Versions

Windows® only: viplivergbhistogram_win.mdl (using live video acquisition)

Windows only: viphistogram_win.mdl (using stored video data)

Platform independent: viphistogram_all.mdl

Windows-only demo models contain To Video Display block and From Video Device block, which are only supported on Windows platforms.