Skip to content

Commit

Permalink
Removed extraneous code
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Grijalva committed May 22, 2014
1 parent 7504d2b commit 1f1bb48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
15 changes: 1 addition & 14 deletions AR_Simple/Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ static void mainLoop(char* img_name)
ARMarkerInfo *marker_info;
int marker_num;

argDrawMode2D();

// detect the markers in the video frame
if (arDetectMarker(dataPtr, thresh, &marker_info, &marker_num) < 0)
{
Expand All @@ -131,6 +129,7 @@ static void mainLoop(char* img_name)
if (marker_info[i].id == object[j].id)
{
printf("%s ", object[j].name);
break;
}
}
}
Expand All @@ -140,11 +139,6 @@ static void mainLoop(char* img_name)

if (pattern_count > 2) // If at least 2 known patterns have been found.
{
//printf("Found %i markers:\n", marker_num);
/*for (int i = 0; i < marker_num; i++) // Print position of each marker
{
printf("marker %i: %f, %f\n", i, marker_info[i].pos[0], marker_info[i].pos[1]);
}*/
double midpoint[2];
double pair[2][2];
get_pair(&pair, marker_info, marker_num);
Expand All @@ -157,7 +151,6 @@ static void mainLoop(char* img_name)
printf("%i patterns isnt enough to find a center point!\n", marker_num);
writeLine(img_name, 0, 0);
}
//argSwapBuffers();
}

int main(int argc, char **argv)
Expand All @@ -177,12 +170,6 @@ int main(int argc, char **argv)
}
}

dataPtr = loadImage(argv[1], dataPtr, &img_width, &img_height); // Load the first image (so init() can properly register the image size)
if (dataPtr == NULL) // If image failed to load
exit(1);

glutInit(&argc, argv);

createOutputFile(); // Delete any old output.csv file and create a fresh one
for (int i = 1; i < argc; i++) // For each input image
{
Expand Down
6 changes: 0 additions & 6 deletions AR_Simple/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ ObjectData_T *read_ObjData( char *name, int *objectnum )
char buf[256], buf1[256];
int i;

//printf("Opening Data File %s\n",name); // For debugging

if( (fp=fopen(name, "r")) == NULL ) {
printf("Can't find the file - quitting \n");
return(0);
Expand All @@ -48,8 +46,6 @@ ObjectData_T *read_ObjData( char *name, int *objectnum )
get_buff(buf, 256, fp);
if( sscanf(buf, "%d", objectnum) != 1 ) {fclose(fp); return(0);}

//printf("About to load %d Models\n",*objectnum); // For debugging

object = (ObjectData_T *)malloc( sizeof(ObjectData_T) * *objectnum );
if( object == NULL ) return(0);

Expand All @@ -61,8 +57,6 @@ ObjectData_T *read_ObjData( char *name, int *objectnum )
fclose(fp); free(object); return(0);
}

//printf("Read in No.%d \n", i+1); // For debugging

get_buff(buf, 256, fp);
if( sscanf(buf, "%s", buf1) != 1 ) {
fclose(fp); free(object); return(0);}
Expand Down

0 comments on commit 1f1bb48

Please sign in to comment.