It is relatively simple. A contrast ratio is a ratio of a white point brightness on a monitor to a black point . If you have a test signal that splits the screen in two halfs, one is black (Red level =0, Green level = 0, Blue level = 0) and one is white (Red level = 2^8, Blue level = 2^8, Green level = 2^8 for 8-bit signal) brightness measurements of each half would give numbers for contrast ratio calculation, i.e. black level = 0.3 cd/m2 and white level = 400 cd/m2. The contrast ratio is 400 / 0.3 = 1333.
Brightness level is straightforward, the higher it is the brighter picture is.
Will