vipedge
Open this model

# Edge Detection

This demo uses the Computer Vision System Toolbox™ to find the edges of objects in a video stream using the Prewitt method. When you run the model, you can double-click the Edge Detection block and adjust the Threshold parameter while the simulation is running. The higher you make the threshold, the smaller the amount of edges the demo finds in the video. This model also illustrates how to use the Compositing block to overlay the edges on the original video frames.

## Contents

- Demo Model
- Edge Detection Results
- Available Demo Versions

## Demo Model

The following figure shows the Edge Detection model:

## Edge Detection Results

The Edge Detection block outputs a binary image with the edges shown in white. This output is displayed in the Edges window. The Compositing block accepts the original video frames, shown in the Original window, and the output of the Edge Detection block as inputs at its Image1 and Mask ports, respectively. The input to the Mask port tells the Compositing block which pixels to highlight. As a result, the model displays a composite image in the Overlay window, where the original pixel values are overwritten by the white edge values.

## Available Demo Versions

Floating-point versions of this demo:

Windows® only: vipedge_win.mdl

Platform independent: vipedge_all.mdl

Fixed-point versions of this demo:

Windows only: vipedge_fixpt_win.mdl

Platform independent: vipedge_fixpt_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.