<< Chapter < Page Chapter >> Page >
This module describes general procedures for reading and writing stills images with the DSK6416. The scripts and models created her will serve as the framework for image processing algorithms simulation and implementation.

Introduction

This module describes general procedures for reading and writing stills images. The scripts and models created in this chapter will be the basis for image processing algorithms simulation and implementation using the DSK6416.

This section will show you how to activate CCS under the Simulink.

  1. Create a new Simulink model.
  2. Open the Simulink library browser and add the "C6416DSK" from the "Target Preferences" group of the "Embedded Target for the TI TMS320C6000 DSP" Blockset (Please refer to Figure 1).
    The C6416DSK Block
  3. Set the model to “Generate a CCS Project” in the Simulation->Configuration Parameters ->Build Action, as shown in the following picture:

Configuration Parameters for CCS

We now need to create Simulink dedicated blocks to execute CCS commands. The first is the “Build”. We can do this in many ways: clicking Build icon, pressing Ctrl-B or in MATLAB® typing make_rtw. Given this command is available in MATLAB, we will create a custom block with this command.

    • Give it a name. In our example we use “Generate Code&Create Project”
    • Choose the shadow, colour etc…
    • Right click on the Subsystem, choose “ Block Properties”. Go to the Callbacks tab, and under OpenFcn enter: “make_rtw;”, as shown in the following picture:
    Creating the “Generate Code&Create Project” Simulink block
  • Repeat this process for the following commands as follows:
    Block Name CCS Command OpenFcn
    Build Build in CCS: CCS_Obj.build;
     Load Load Program in CCS: CCS_Obj.load([pwd,'\',bdroot,'_c6000_rtw\', bdroot, '.out']);
     Run Run on target: CCS_Obj.run;
     Halt Halt on target: CCS_Obj.halt;
     Reset Reset target: CCS_Obj.reset;
    Close Active Project Close Active Project close(CCS_Obj,[],'project')
    Your model should look as follows:
    Simulink Blocks for CCS commands

Image (stills) i/o

Simulation

Figure 5 shows the data flow for the edge detection simulation. The Edge detection model reads the source picture from a file in the PC, and displays both the original and the processed images.

Simulation Environment

Reading and displaying a picture

  1. Start by creating a new model in Simulink
  2. Open the Simulink library browser and add the "Image from File" from the "Sources" group of the Video and Image Processing Blockset (Please refer to Figure 6). This block reads an image and converts it to the RGB format in Simulink .
    The "ImageFrom File" Simulink Block
  3. Double Click and select the TMW2.jpg image (Please refer to Figure 7).
    The Source Block Configuration
  4. In order to display the picture the "Video Viewer" from the "Sinks" group of the Video and Image Processing Blockset (Please refer to Figure 8). This block displays an input RGB or intensity video stream or image. The edge detection block operates on intensity images.
    The Video Viewer Block
  5. Select the "intensity" input format as shown in Figure 9.
    Video Viewer Configuration
  6. The conversion from RGB to intensity will be executed in the Color Space Conversion: from the "Conversions" group of the Video and Image Processing Blockset (Please refer to Figure 10).
    The Color Conversion Block
  7. Double Click and select the "R'G'B' to intensity" conversion scheme as shown in Figure 11.
    Configuring the Color Conversion Scheme
  8. Connect the three blocks as shown in Figure 12.
    Reading and Displaying a Picture
  9. Run the model, you should get the image shown in Figure 13
    The Video Viewer Display

Questions & Answers

how does Neisseria cause meningitis
Nyibol Reply
what is microbiologist
Muhammad Reply
what is errata
Muhammad
is the branch of biology that deals with the study of microorganisms.
Ntefuni Reply
What is microbiology
Mercy Reply
studies of microbes
Louisiaste
when we takee the specimen which lumbar,spin,
Ziyad Reply
How bacteria create energy to survive?
Muhamad Reply
Bacteria doesn't produce energy they are dependent upon their substrate in case of lack of nutrients they are able to make spores which helps them to sustain in harsh environments
_Adnan
But not all bacteria make spores, l mean Eukaryotic cells have Mitochondria which acts as powerhouse for them, since bacteria don't have it, what is the substitution for it?
Muhamad
they make spores
Louisiaste
what is sporadic nd endemic, epidemic
Aminu Reply
the significance of food webs for disease transmission
Abreham
food webs brings about an infection as an individual depends on number of diseased foods or carriers dully.
Mark
explain assimilatory nitrate reduction
Esinniobiwa Reply
Assimilatory nitrate reduction is a process that occurs in some microorganisms, such as bacteria and archaea, in which nitrate (NO3-) is reduced to nitrite (NO2-), and then further reduced to ammonia (NH3).
Elkana
This process is called assimilatory nitrate reduction because the nitrogen that is produced is incorporated in the cells of microorganisms where it can be used in the synthesis of amino acids and other nitrogen products
Elkana
Examples of thermophilic organisms
Shu Reply
Give Examples of thermophilic organisms
Shu
advantages of normal Flora to the host
Micheal Reply
Prevent foreign microbes to the host
Abubakar
they provide healthier benefits to their hosts
ayesha
They are friends to host only when Host immune system is strong and become enemies when the host immune system is weakened . very bad relationship!
Mark
what is cell
faisal Reply
cell is the smallest unit of life
Fauziya
cell is the smallest unit of life
Akanni
ok
Innocent
cell is the structural and functional unit of life
Hasan
is the fundamental units of Life
Musa
what are emergency diseases
Micheal Reply
There are nothing like emergency disease but there are some common medical emergency which can occur simultaneously like Bleeding,heart attack,Breathing difficulties,severe pain heart stock.Hope you will get my point .Have a nice day ❣️
_Adnan
define infection ,prevention and control
Innocent
I think infection prevention and control is the avoidance of all things we do that gives out break of infections and promotion of health practices that promote life
Lubega
Heyy Lubega hussein where are u from?
_Adnan
en français
Adama
which site have a normal flora
ESTHER Reply
Many sites of the body have it Skin Nasal cavity Oral cavity Gastro intestinal tract
Safaa
skin
Asiina
skin,Oral,Nasal,GIt
Sadik
How can Commensal can Bacteria change into pathogen?
Sadik
How can Commensal Bacteria change into pathogen?
Sadik
all
Tesfaye
by fussion
Asiina
what are the advantages of normal Flora to the host
Micheal
what are the ways of control and prevention of nosocomial infection in the hospital
Micheal
what is inflammation
Shelly Reply
part of a tissue or an organ being wounded or bruised.
Wilfred
what term is used to name and classify microorganisms?
Micheal Reply
Binomial nomenclature
adeolu
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

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