Go to Post 7 divisions would be... interesting. - cadandcookies [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 30-12-2007, 07:32
tommy_chai tommy_chai is offline
Registered User
no team
 
Join Date: Oct 2007
Location: Msia
Posts: 12
tommy_chai is an unknown quantity at this point
How to use the data obtain in one C file to another C file?

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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write image data to binary PGM file format(P5)? tommy_chai Programming 0 08-10-2007 08:22
"Error.MCP" file after HEX file trans iwdu15 Programming 1 24-01-2007 20:05
Help! making an inventor file into an autodesk file kjhobin Inventor 5 19-03-2006 23:04
Reading binary data from a file and writing it in VB complete Programming 1 02-01-2006 21:21
How do we convert a modified user routines file into a valid .HEX file HuskieRobotics Programming 13 28-02-2004 12:12


All times are GMT -5. The time now is 13:43.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi