You are on page 1of 2

Jesse Jimenez Ruezga

9/7/18

Homework 5
1a) 134
1b)10
1c)9
1d) True
1e)2

3a) 21 100
3b)
1
13
135
1357

3c)
2468
2468
2468
2468

3d)
10 11 31 0
10 5 31 5
10 2 31 23
10 1 31 27

5a) This pixel function is quite simple as the p = Pixel(0,0,0) indicates it has no intensity and is
pure black.

5b)This pixel function is similar however the p = Pixel(0,0,0) represents full intensity and pure
white.

5c) Describe in English what these image or pixel functions do and what are their difference.

These functions send q which have the value obtained from pixel function and its parameters.
fun3(p) takes the average of the input pixul and then returns(q) a pixel with equal red, green,
and blue values. The intensity of this function is the calculated average.

In comparison, fun4(p) returns q a pixel with equal red, green and blue values, however, it has
the intensity of the color red located in the input pixel.The first function is more complex than
the second.
5d) Similar to fun4(p), fun5(p) returns q a new pixel with the same green value that is located in
the input pixel, however the red and blue of that input pixel is twice as red and blue.

7a) print(funa(w)) = 19
print(w) = [1, 4, 9, 4, 1]

7b) print(funb(w)) = 10
print(w) = [1, 2, 3, 2, 1]

You might also like