Home /
Expert Answers /
Computer Science /
how-to-write-this-in-python-nbsp-the-greyscale-convertor-function-create-a-greyscale-convertor-fun-pa651
(Solved): how to write this in python? The greyscale_convertor function Create a greyscale_convertor fun ...
how to write this in python?
The greyscale_convertor function Create a greyscale_convertor function where it accepts no parameters and return None. Ii will loop through all of the pixels and perform the following: - Stores the current coordinate \( (x, y) \) as a tuple - Gets the colour in the current pixel (which returns a tuple, so store it as a tuple) Page 1 of 4 Brock Cinversity APCO/ASC 1P00 (Fall 2022) Assignment 04 - Gets tho individual red, green and blue chamnels - Uses get_average to find the average of the three channels (store the integer returned!) - Creates a new tuple denoting the new colour (a shade of grey) to place in the pixel - Places that newly created colour us the new colour in the pixel - All of these steps ensured we colour the current pixel as a shade of grey - We will perform the above steps on all of the pixels in the image After applying the atove steps, the output should be the following (which is not the final output of the assignent):