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.
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).
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.
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.
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.)
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.
Please refer to
the user guide at http://www.ti.com/lit/ug/spruf30a/spruf30a.pdf for the details of each function.