Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 5 (25 Pts) Removing the red eye in photographs is an important part of camera applications. The hard part of this problem is
Problem 5 (25 Pts) Removing the red eye in photographs is an important part of camera applications. The hard part of this problem is identifying which pixels are part of the red eyes in the image. Lucky for you, you do not have to write the function to do that. is Red Eye below will return true if the R, G. B values of a pixel is part of a red eye. It will also indicate a factor between 0.0 and 1.0 via pass by pointer. int is RedEye (int red, int green, int blue, double *factor); Complete the fixRedEye function below. It needs to examine every pixel of the image passed as img which is MAXW by MAXH pixels. Each pixel has a red, green, and blue value stored in that order. e.g. img [3] [6] [2] stores the blue value for the pixel at column 3 and row 6. If a pixel is part of a red eye, then modify its red value by multiplying it by the factor. The function should return the number of pixels it modifies. int fixRedEye (int img [MAXW] [MAXH] [3]) {
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started