<< Chapter < Page Chapter >> Page >
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.

Simulation

Start by creating a new model in Simulink®.

  1. 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
  2. Double Click and select the “vipmem_Y.avi” input file(Please refer to Figure 2).
    Source Block Configuration
  3. 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
  4. Connect the three blocks as shown in Figure 5.
    Displaying a Video-Clip
  5. Run the model, you should see the video clip. A single frame is shown mage shown in Figure 6.
    The Video Display
  6. 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.

Using the Video I/O of the DM6437 board

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.

  1. Open the “stills_R_W.mdl”
  2. Delete the “From RTDX” and “To RTDX” blocks
  3. Add the "Task" block from the "DSP/BIOS library" group of the "Target Support Package TC6" Blockset.
  4. Add the “Function- Call Subsystem” from the “Ports&Subsystems" group of the "Simulink" Blockset (Please refer to Figure 8).
    The "Function-Call Subsystem" Block
  5. Rename “Function- Call Subsystem” to “Video Processing” and connect it to the “Task” block.
  6. 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
  7. Double-click the “Task” block and make the same changes as shown in Figure 34.
    Configuring a "Task"
  8. Double-click the “Video Processing” block. A new window will be opened.
  9. 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
  10. 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
  11. 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
  12. Connect the blocks as shown in Figure 14.
    Capturing and Displaying Video
  13. Generate code&create project. Double-click the " Generate code&.." block.
  14. Build the project. Double-click the “Build Project” block.
  15. Load the project. Double-click the “Load Project” block.
  16. Run the target. Double-click the “Run” block. This model can be found here .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  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.

Notification Switch

Would you like to follow the 'From matlab and simulink to real-time with ti dsp's' conversation and receive update notifications?

Ask