Computer Vision System Toolbox
This example shows how to segment video in time. The algorithm in this example can be used to detect major changes in video streams, such as when a commercial begins and ends. It can be useful when editing video or when you want to skip ahead through certain content.
|On this page…|
The following figure shows the Scene Change Detection example model:
The model segments the video using the following steps. First, it finds the edges in two consecutive video frames, which makes the algorithm less sensitive to small changes. Based on these edges, the model uses the Block Processing block to compare sections of the video frames to one another. If the number of different sections exceeds a specified threshold, the example determines that the scene has changed.
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.