RAW to Grayscale

Hello,
I am new to opencv here, can anyone help me here to convert RAW to Grayscale Image.
My camera (OV2311) outputs RAW data encapsulated in YUV2 format.

Kindly let me know if in case of more details required.

Thanks!