Part Number: TMDXIDK57X-LCD
Tool/software: TI C/C++ Compiler
Hi,
I'm trying to use imglib library to apply a simple 3x3 kernel (Gaussian filter) to an image, I use IMG_conv_3x3_i8_c8s, for that purpose, I have broken my input image into several iterations and each time I feed some rows of the image to IMG_conv_3x3_i8_c8s routine, I checked some first iterations and it is working correctly, but after some iterations, it starts to generate zeros, can anyone explain why that happens? how can I correct my code?
this is my input image known as cameraMan:
this is my output image with zeros for most parts:
this is my main.c:
/* * ======== main.c ======== */ #include <xdc/std.h> #include <xdc/runtime/Error.h> #include <xdc/runtime/System.h> #include <ti/imglib/imglib.h> #include <ti/sysbios/BIOS.h> #include <ti/sysbios/knl/Task.h> #include "ImgCode.h" #define imSize 256*256 #define Cols 256 #define Rows 256 const char myMask[] = { 0, 1, 0, 1, 2, 1, 0, 1, 0 }; Void taskFxn(UArg a0, UArg a1) { unsigned char resultImage[(254)*(252)]; int iter0=0,iter1=0; for(iter0=0,iter1=0; iter0<(256*256-3*256); iter0+=256,iter1+=252){ IMG_conv_3x3_i8_c8s(&myImage[iter0], &resultImage[iter1], 252, 254, myMask, 3); } } /* * ======== main ======== */ Int main() { Task_Handle task; Error_Block eb; System_printf("enter main()\n"); Error_init(&eb); task = Task_create(taskFxn, NULL, &eb); if (task == NULL) { System_printf("Task_create() failed!\n"); BIOS_exit(0); } BIOS_start(); /* does not return */ return(0); }
and this is my project folder:
Im using sys/BIOS 6_75_02_00 , XDCtools 3_51_01_18, imglib_c66x_3_2_0_1 and CCS 9.1.0.
any help would be appreciated.
alex.