vipfocus
Open this model

# Video Focus Assessment

This demo uses the Computer Vision System Toolbox™ to determine whether video frames are in focus using the ratio of the high spatial frequency content to the low spatial frequency content within a region of interest (ROI). When this ratio is high, the video is in focus. When this ratio is low, the video is out of focus.

## Contents

- Demo Model
- Video Focus Assessment Results
- Available Demo Versions

## Demo Model

The following figure shows the Video Focus Assessment model:

## Video Focus Assessment Results

This demo shows a video sequence that is moving in and out of focus. The model uses the Draw Shapes block to highlight an ROI on the video frames and the Insert Text block to indicate whether or not the video is in focus.

The Relative Focus window displays a plot of the ratio of the high spatial frequency content to the low spatial frequency content within the ROI. This ratio is an indication of the relative focus adjustment of the video camera. When this ratio is high, the video is in focus. When this ratio is low, the video is out of focus. Although it is possible to judge the relative focus of a camera with respect to the video using 2-D filters, the approach used in this demo enables you to see the relationship between the high spatial frequency content of the video and its focus.

The FFT Data window shows the 2-D FFT data within the ROI.

## Available Demo Versions

Windows® only: vipfocus_win.mdl

Platform independent: vipfocus_all.mdl

Windows-only demo models might contain compressed multimedia files or To Video Display blocks, both of which are only supported on Windows platforms. The To Video Display block supports code generation, and its performance is optimized for Windows.