Question: This program must be done in C. The shell code to use is below. Only write the program you are going to write where it

This program must be done in C. The shell code to use is below. Only write the program you are going to write where it says "Your code goes here". You will see it in the shell code. Also do not change or add any libaries. The project description is also below. Thanks!

This program must be done in C. The shell code to useis below. Only write the program you are going to write whereit says "Your code goes here". You will see it in theshell code. Also do not change or add any libaries. The project

/* This program finds George in a crowd.

*/

#include

#include

int main(int argc, char *argv[]) {

int CrowdInts[1024];

int NumInts, TopLeft, BottomRight;

int Load_Mem(char *, int *);

if (argc != 2) {

printf("usage: ./P1-1 valuefile ");

exit(1);

}

NumInts = Load_Mem(argv[1], CrowdInts);

if (NumInts != 1024) {

printf("valuefiles must contain 1024 entries ");

exit(1);

}

/* your code goes here. */

TopLeft = 0; // Temporary: replace this.

BottomRight = 100; // Temporary: replace this.

printf("George is located at: top left pixel %4d, bottom right pixel %4d. ", TopLeft, BottomRight);

exit(0);

}

/* This routine loads in up to 1024 newline delimited integers from

a named file in the local directory. The values are placed in the

passed integer array. The number of input integers is returned. */

int Load_Mem(char *InputFileName, int IntArray[]) {

int N, Addr, Value, NumVals;

FILE *FP;

FP = fopen(InputFileName, "r");

if (FP == NULL) {

printf("%s could not be opened; check the filename ", InputFileName);

return 0;

} else {

for (N=0; N

NumVals = fscanf(FP, "%d: %d", &Addr, &Value);

if (NumVals == 2)

IntArray[N] = Value;

else

break;

}

fclose(FP);

return N;

}

}

This project focuses on an image search problem: finding a specific face in an image or photo- graph. This is a problem that arises in many video surveillance applications (e.g., detecting a well-known terrorist's face in a crowd at an airline terminal) as well as in searching large collec- tions of digital images (e.g., finding all photos you took that contain your grandmother). In this assignment, we will focus on finding George P. Burdell, whose mugshots are shown in Figure 1, in an image that contains a crowd of faces, such as the sample scene in Figure 2. The faces in the scene, including George's, may be at varying distances from the camera, so they may appear scaled. For example in Figure 3a, George is scaled two times the original size and in Figure 3b he is scaled by a factor of three. All faces will be facing forward and upright (not rotated). Find George Variable Scale This project focuses on an image search problem: finding a specific face in an image or photo- graph. This is a problem that arises in many video surveillance applications (e.g., detecting a well-known terrorist's face in a crowd at an airline terminal) as well as in searching large collec- tions of digital images (e.g., finding all photos you took that contain your grandmother). In this assignment, we will focus on finding George P. Burdell, whose mugshots are shown in Figure 1, in an image that contains a crowd of faces, such as the sample scene in Figure 2. The faces in the scene, including George's, may be at varying distances from the camera, so they may appear scaled. For example in Figure 3a, George is scaled two times the original size and in Figure 3b he is scaled by a factor of three. All faces will be facing forward and upright (not rotated). Find George Variable Scale

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!