Design a function that uses nested for loops that


Problem

When the red, green, and blue components of a pixel are equal, the observed color is black, white, or a shade of gray. You can transform a color image into a gray scale image by converting each pixel to a shade of gray that approximates the brightness of the original color. The easiest way to do this is to replace each color component for a pixel with the average of all the color components.

a) Design a function that uses nested for loops that transforms a color image into gray scale using the technique described earlier.

b) The method of producing gray scale images in the previous exercise assumes the human eye is equally sensitive to each of the three color components. In reality, this is not the case. The human eye is much more sensitive to greens than the other colors. How would you modify your solution so that greens influence the brightness of the image more than the reds and blues?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Design a function that uses nested for loops that
Reference No:- TGS02695395

Expected delivery within 24 Hours