Question: In c please! Q3. The e RBG color model is one of the most common color representation techni ee additive primary colors, red, green, and

In c please!  In c please! Q3. The e RBG color model is one

Q3. The e RBG color model is one of the most common color representation techni ee additive primary colors, red, green, and blue. That is, each color has three i The name of the model comes from the initials of the h as televisions and computers. usually ran Another d ging from 0-255, representing how much red, blue and green is needed to get that color. er common color space is the HSV where each color is represented with three com (H) Hue: number between 0-360 (degrees) (S) Saturation: number between 0.0 and 1.0 (V) Value: number between 0.0 and 1.0 (This actually represents how bright the color is) (5 pts) Define the structure to represent a RGB color and define an alias for it. Create a function that receives the memory address of a RGB color and change it to the greyscale (5 pts) Define the structure to represent a HSV color and define an alias for it. (5 pts) A RGB greyscale color will be any RGB color with all its components equal to certain value. RGB color where the value of its components is: 0.2989 R + 0.5870 G 0.1140 B (15 pts) Create a function that receives the address of a RGB color and converts it to a HSV color. Your function must return the HSV color memory address. For this, create a new HSV color in the heap region (not the stack) and initialize its components as follows: M max(R,G, B) m = min(R, G, B) C M-m V-M if C 0 G- B H= B- R 2)EM a 60. R-G 60.+4 ifM B 0, ifV0 , otherwise V

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