Hi,
I am executing IMGLIB examples from the following path ...\libraries\ti\C6400\imglib.
I executed img_dilate_bin.pjt available at ...\ libraries\ti\C6400\imglib\examples\img_dilate_bin,in CCS v3.3 which is successful. But, if I give the input as a binary raw image of dimensions 1280*800 and dilate the same using the function IMG_dilate_bin_c(in_data, out_data_c, mask,COLS); the output is not correct
I am opening the image(1280*800) using FILE pointer and processing as follows;
#define N (1024000)
#define COLS (N/8)
unsigned char in_data[N];
unsigned char out_data_c[COLS];
const char mask[9] =
{
-1, 1, -1,
1, 1, 1,
-1, 1, -1
};
int main()
{
FILE *fprd,*fpwrt;
fprd=fopen("Input.raw","rb");
fread(in_data,sizeof(unsigned char),sizeof(in_data),fprd);
IMG_dilate_bin_c(in_data, out_data_c, mask,COLS);
fpwrt=fopen("Output.raw","wb");
fwrite(out_data_c,sizeof(unsigned char),sizeof(out_data_c),fpwrt);
printf("\n Output Generated\n");
}
Size of in_data is 1280*800 but out_data_c is ((1280*800)/8) =COLS in the function.
Thus the output will be of size COLS, so the complete image is not obtained.
How is this functionality working?What are the changes required in the function to get the output image of size 1280*800?
Kindly refer the attachment for input and output images(in .jpg as .raw is not the supported attachment ).
Input image
Output Image.
Thanks and Regards,
Sowmya.JV

