15-311 HW 3

Meng Jun Zheng (mzheng)

(Lab 2: http://www.contrib.andrew.cmu.edu/~mzheng/lab3.htm )

1a The 3x 3 mask implementing the average operator has 1/9 for every cell of the mask.

 b This operator just causes a blurring effect.

 c  We have lost information and it is not possible to regenerate it because the the mask takes 9 parameters and compute a number.  It would be impossible to compute the inverse because it’s not possible to figure out the contribution of each pixel.

 d One possible weighted mask with larger weight on the actual pixel would be ½ for the actual pixel mask and 1/16 for the remaining 8 neighbors.  The total weight adds up to 1.

2

 

We will use geometry to solve this problem.  The above diagram shows the top-down view.  We will use similar triangles to find the slopes of the lines intercepting the two cameras and the alien.  Finally, we will find the distance by setting one equation (point-slope form) equals to the other.

Tan a = (30/72) * 2, Tan b = (50/72) * 2

                >a = arctan (30/36), b = arctan(50/36)

Y1 = tan (pi/2 – a) x1 + 6.25 * tan (pi/2 –a ) = 1.2x + 7.5

Y2 = tan (pi/2 – b) x2 - 6.25 * tan (pi/2 - b) = 0.72x – 4.5

>X = -25, Y = -22.5

Therefore, the vertical distance from the robot to the alien is 22.5 inches.