You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The grayscale transformation is very easy. A pixel is gray if each color channel (red, green, blue) have the same value. That means each color has the same amount and the pixel is just a brightness value from black to white.
This implementation multiplies each channel with a different factor. The factors are given by the ITU-R BT.709-Standard for HDTV. The green channel has the biggest factor. That means the green channel has the biggest influence for the gray image. The calculated "color" value in the rgb variable is set to each channel.