Convert RGB Image to Grayscale

Core Vision Operations DS practice problem on Onlearn.

Difficulty: easy.

Topics: Understanding Luminance and Image Channel Manipulation, Weighted Summation, Floating Point Precision, RGB Color Model, Grayscale Mapping, Normalization, Digital Image Processing, Color Theory, Linear Algebra, Data Representation, Computer Vision Foundations, Color Spaces, Pixel Intensity, Channel Decomposition, Luminance vs Chrominance, Quantization.

Write a function that converts a 3 channel RGB pixel (a list or tuple of [R, G, B]) into a single grayscale intensity value using the standard luminance formula (Y = 0.299 R + 0.587 G + 0.114 B). Round the result to the nearest integer.