Write a function that posterizes an input picture along a very specific process. If the red value is greater than 180, then set the pixel to red. If not, then check if the blue value is greater than 180, and if so, set the pixel to blue. If not, then check if the green value is greater than 180, and if so, set the pixel to green. If none of the three channels is greater than 180, set the pixel to black.
What will be an ideal response?
```
def posterize(picture):
for p in getPixels(picture):
if getRed(p)>180:
setColor(p,red)
elif getBlue(p)>180:
setColor(p,blue)
elif getGreen(p)>180:
setColor(p,green)
else:
setColor(p,black)
```
Computer Science & Information Technology
You might also like to view...
Line ________ or thickness around a shape can be adjusted
Fill in the blank(s) with correct word
Computer Science & Information Technology
Which Apple service allows you to connect back to a Mac through your iCloud account?
A) Remote Desktop B. TeamViewer C. VNC D. Back to My Mac
Computer Science & Information Technology