Question: Due Date: April 1 9 Fill in the missing functions: 0 average ( region ) : Takes a region of an image and returns the

Due Date: April 19
Fill in the missing functions:
0 average( region): Takes a region of an image and returns the average red, green, and blue values across the region.
setRegion ( region, r,g,b) : Takes a region of an image and red, green, and blue values, r,g, b. Sets the region so that all points have red values of r, green values of g, and blue values of b.
The functions are part of a program that averages smaller and smaller regions of an image until the underlying scene is visible (inspired by koalas to the max).
For example, if you inputted our favorite image, you would see (left to right):
A template program, averageImage. py, is available here on GitHub. The grading script does not run the whole program, but instead runs each of your functions separately ('unit tests') to determine correctness. As such, the names of the functions must match exactly the ones listed above (else, the scripts cannot find them).
Hint: See notes from Lecture 8.M
Due Date: April 1 9 Fill in the missing

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 Accounting Questions!