Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Edge Detection

This example shows how to find object edges 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 example finds in the video. This model also illustrates how to use the Compositing block to overlay the edges on the original video frames.

Example 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 Example Versions

Floating-point versions of this example:

Windows® only: vipedge_win.mdlvipedge_win.mdl

Platform independent: vipedge_all.mdlvipedge_all.mdl

Fixed-point versions of this example:

Windows only: vipedge_fixpt_win.mdlvipedge_fixpt_win.mdl

Platform independent: vipedge_fixpt_all.mdlvipedge_fixpt_all.mdl

Windows-only example 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.

Was this topic helpful?