This page is optimized for mobile devices, if you would prefer the desktop version just
click here
This module describes general procedures for reading and writing video streams using the DM6437 Digital Video Development Platform (DVDP). The scripts and models created in this chapter will be the basis for simulation and implementation of video processing algorithms.
Introduction
This chapter describes general procedures for reading and writing video streamss. The scripts and models created in this chapter will be the basis for the other video processing chapters.
Hardware and software requirements
This laboratory was originally developed using the following hardware and software:
- MATLAB® R2008a
- Code Composer Studio (CCS) v3.3
- Texas Instruments DM6437 Digital Video Development Platform (DVDP) .
- Video camera and screen.
Related files
- Simulink Model for Simulation - Video_sim.mdl
- Input Video File - vipmem_Y.avi
- Simulink Model for Real-Time Video Processing with a Camera- Video_R_W.mdl
- MATLAB script for Real-Time TCP/IP Interface - RW_tcpip_script.m
- Simulink Model for Real-Time Video Processing through the TCP/IP Interface - RW_dm6437_tcpip.mdl
- Simulink Model for PC Control of Real-Time Video Processing through the TCP/IP Interface - RW_pcl_tcpip.mdl
Simulation
Start by creating a new model in Simulink®.
- Open the Simulink library browser and add the "From Multimedia File" from the "Sources" group of the Video and Image Processing Blockset (Please refer to Figure 1).
The "From Multimedia File" Simulink Block - Double Click and select the
“vipmem_Y.avi” input file(Please refer to Figure 2).
Source Block Configuration - In order to display the picture the "Video Viewer" from the "Sinks" group of the Video and Image Processing Blockset will be used.
The "To Video Display" Block Configuring the Video Viewer - Connect the three blocks as shown in Figure 5.
Displaying a Video-Clip - Run the model, you should see the video clip. A single frame is shown mage shown in Figure 6.
The Video Display - Save your model (We used the name “Video_sim.mdl", that you may find it here ).
Real-time processing with the dm6437 dvdp
Using a camera and a display
The procedure for capture/display video using the DM6437 is shown in Figure 7.
Ccs code generation
This procedure is similar to the one developed for stills pictures. Video will be capture/display using a camera and a monitor. Image acquisition and Processing will run in a DSP/BIOS task.
- Open the “stills_R_W.mdl”
- Delete the “From RTDX” and “To RTDX” blocks
- Add the "Task" block from the "DSP/BIOS library" group of the "Target Support Package TC6" Blockset.
- Add the “Function- Call Subsystem” from the “Ports&Subsystems" group of the "Simulink" Blockset (Please refer to Figure 8).
The "Function-Call Subsystem" Block - Rename “Function- Call Subsystem” to “Video Processing” and connect it to the “Task” block.
- Save the model as “Video_R_W.mdl”. Your model should look as follows
You may add a title to the model, as done here ( ”Video Processing Template”) :
The Video Processing Model Template - Double-click the “Task” block and make the same changes as shown in Figure 34.
Configuring a "Task" - Double-click the “Video Processing” block. A new window will be opened.
- In the new window, add the "Video Capture" and "Video Display" from the "DM6437 EVM Board Support" group of the ""Target Support Package TC6" Blockset as shown in Figure 11.
The "Video Capture" block - Double-click the “Video Capture” block and change the Sample Time (and the Video capture mode only if you are using the components in the PAL mode) as shown in Figure 12.
Video Capture Configuration - Double-click the “Video Display” block and change the Video capture mode only if you are using the components in the PAL
If the camera video capture mode is NTSC you should choose this option mode as shown in Figure 13.
Video Display Configuration - Connect the blocks as shown in Figure 14.
Capturing and Displaying Video - Generate code&create project. Double-click the " Generate code&.." block.
- Build the project. Double-click the “Build Project” block.
- Load the project. Double-click the “Load Project” block.
- Run the target. Double-click the “Run” block. This model can be found here .
Read also:
OpenStax, From matlab and simulink to real-time with ti dsp's. OpenStax CNX. Jun 08, 2009 Download for free at http://cnx.org/content/col10713/1.1
Google Play and the Google Play logo are trademarks of Google Inc.