Hi guys,
First, I detect coordinates for left and right corners of a mouth in Corners.c and saved in struct Coordinate for 72 images.
How can I able to link it to another C file, let's say try5.c so that it can be used for template matching purpose when i execute 72 images in a loop in try5.c?
Sorry because I cannot provide the full program because it is a way too long to read. These are the parts which i think very important in order to solve the problem. Help from anyone will be appreciated.
Thank you very much.
Code:
Corners.c
struct Coordinate
{
int x;
int y;
};
susan_corners(in,r,bp,max_no,corner_list,x_size,y_size){
:
:
struct Coordinate left_corner, right_corner;
}
try5.c
:
:
#define NUM 72
:
main()
{
:
:
if((fp33 = fopen("facecolor_input.dat","r")) == NULL){
printf("File input filename2 can not open\n");
exit(1);
}
for(k=0;k<NUM;k++){
fscanf(fp33,"%s",filename33[k]);
}
fclose(fp33);
:
:
for(total = 0; total<NUM; total ++){
printf("\nimage==>%d\n",(total+1));
/** read the color data from the file of input face image **/
read_data_color(filename33[total],inpcolor);
:
:
/* Template Matching */
//example for eye template matching
XX1=56; // Left X coordinate for eye template
YY1=44;
XX2=164; //right X coordinate for eye template
YY2=44;
// plf_x, plf_y, prg_x, prg_y are the left and right x & y coordinates from the full input image which has been obtained in Corners.c
affine_recog_a(plf_x, plf_y, prg_x, prg_y, XX1, YY1, XX2, YY2);
cross_correlation_recog_a(TEMPLATE_a, image_out_a, &CC1[0]);
:
:
}
Best regards,
Tommy