How to use TI Image Library (IMGLIB) in Code Composer

by Rattanachai Ramaithitima

1.     Download and install IMGLIB. IMGLIB can be download at http://www.ti.com/tool/sprc264

I used C64XPLUS-IMGLIB.

Description: C:\Users\Tee\Dropbox\images\7.png

The installation should be straightforward (running .exe file). If you have trouble regarding installation, please refer to the user guide at http://www.ti.com/lit/ug/spruf30a/spruf30a.pdf.

 

NOTE: From now on, I will refer to the data path that IMGLIB was installed as ${PATH_IMG}. Hence, the IMGLIB will be at C:\${PATH_IMG\. [It was C:\ramaith1\c64plus-imglib_2_02_00_00 in my pictures]. There should be multiple folders in there including “include” and “lib.”

2.     Let’s move on to Code Composer. We need to include the header file to the project.

Open up your program and right click on your project.

Choose Properties (shortcut = Alt+Enter).

Description: C:\Users\Tee\Dropbox\images\1.png

 

Under Build->C600 Compiler-> Include Options, choose add (the green plus sign on top right) and add “C:\ ${PATH_IMG}\include” in there. Click OK.

Description: C:\Users\Tee\Dropbox\images\5.png

You should see C:\${PATH_IMG}\include in your project->Includes. (Refresh your project if you don’t see it.) There should be a lots of header files (.h) in that folder.

Description: C:\Users\Tee\Dropbox\images\6.png

 

3.     The next step is to link the runtime support library.

Again, go to project’s Properties. Under Build->C6000 Linker->File Search Path, add “imglib2.l64P” and

“rts64plus.lib” to your project.

“imglib2.l64P” is in the folder “C:\${PATH_IMG}\lib\target\.”

NOTE: you MUST choose file type all files when adding. Otherwise you will not see the library (.l64P).

“rts64plus.lib” is in your code composer folder. (It should be the default location when adding new library.)

Description: C:\Users\Tee\Dropbox\images\2.png

4.     To use each function, you need to add the header of each function on the top of your main c file.

For example, to use 3x3 edge detection, you need to add:

#include “IMG_sobel_3x3_8.h” in your main c file.

Description: C:\Users\Tee\Dropbox\images\3.png

 

Please refer to the user guide at http://www.ti.com/lit/ug/spruf30a/spruf30a.pdf for the details of each function.