CASP Tutorial-4 Project

This tutorial demonstrates how to do basic hardware interfacing with webcam.

Pre-Requisites

·         Tutorial-2 should be completed.

Model

·         Network Camera block is used to capture video images. The output of camera is passed through edge detector filter.

·         Original image along with edge detection image is displayed in separate sub-windows in simulation panel.

Step 1: Create New Project

·         Follow steps mentioned in Tutorial-2.

Step 2: Select Target Hardware

·         Follow steps mentioned in Tutorial-2.

Step 3: Creating Model

·         Create a model as shown in below figure.

·         To access camera connected to USB port, set camera address as 0. For a network camera set relevant URL of camera video stream.

·         Leave image configuration parameters in camera and edge detector blocks to defaults.

·         Configure edge detector block execution during Simulation Plot Step.

·         Give names to image viewer blocks shown in below figure.

·         Configure simulation panel and map image viewer blocks to simulation panel sub-windows as explained in Tutorial-2.

Step 4: Setup Simulation Parameters

·         Set simulation time step to 1000msec and plot step to 10000msec.

·         Rest of the parameters shall be set as mentioned in Tutorial-2.

Step 5: Run Simulation

·         Press Build/Run button from Home->Simulation menu item. CASP builds and compiles the model and opens separate simulation panel window. In the simulation panel window press ‘Run Simulation’ button to run simulation.

·         The output of image blocks are shown below.