Table of Contents

HW 5 Waldo v2

Finishing up "Where's Waldo"

Adding Rotation

//Rotates 90 degrees
for (ri = 0; ri < image->h; ri++) {
	for (ci = 0; ci < image->w; ci++) {
		result->pData[ri*image->w + ci] = image->pData[(image->w -1 -ci)*image->w + ri];
	}
}

Doing rotations other than 90 degrees is a bit harder (interpolation and making a larger image size is necessary), and I'll touch that when I have to.

Final Code

//To run executable
./hw5 waldoSearch01.pgm 200 55

Final Image!

Convolution Problem

Pattern 1 Pattern 2


Pattern 3 Pattern 4

Closed Loop Problem

Original After Proportion Gain Increase