How to implement waveform monitor programmatically?

Posted by Farooq Nasim Ahmad on February 07, 2019

Waveform monitor are used to adjust exposure levels in a camera. Waveform are scaled according to IRE unit. IRE is a unit that represent amplitude characteristics of a video signal and it is created by Institute of Radio Engineers, this organization later became the IEEE, the Institute of Electrical and Electronics Engineers. The scale values are from 0 to 100.

In order to better understand IRE, we can consider that 0 is black and 100 is white. This is not a linear scale between black and white i.e. between 0 and 100. One may consider that 0 is blackest black and 100 is whitest white. However, for black IRE is usually set at 7.5 while 0 is considered to be super black. The IRE value for Caucasian skin is 70 for good exposure. To get correct exposure while recording a Caucasian the camera should be set at IRE value of 70 with help of waveform monitor and zebra stripes.

Waveform monitor

Waveform monitors displays a waveform representing IRE values of image. The width of waveform is always equal to width of the image. The height of waveform represents corresponding IRE value between 0 and 100. Exposure can be adjusted on basis of waveform till it reaches correct IRE value to avoid over exposure or under exposure.

Waveform monitor CTPro

Implementation

If the input video frame is in RGB format it is required to be converted into YUV format. We are only interested in luminance or Y component. The Y component value ranges from 0-255. It will be normalized by dividing each value by 255 and then multiplying by 100. This way each Y component value will be scaled between 0-100. Each value in range of 0-100 corresponds to the relevant IRE value. The IRE values are plotted against horizontal position of pixel to obtain waveform.