Determination of the monitor brightness in the investigations of light sensitivity of retina

The article describes the principles of a highly sensitive photometer based on modern CCD digital cameras and laptop. The photometer is designed to measure the absolute brightness of the visual objects, which are formed on the screen of the monitor. The examples of the determination of the integrated brightness of R, G, and B pixel elements, of which the image of a visual object is formed for several types of monitors are given. Streszczenie. Artykuł opisuje zasady budowę i zasadę działania bardzo czułego fotometru opracowanego na nowoczesnych wideo kamerach cyfrowych opartych na strukturach CCD i laptopie. Fotometr przeznaczony jest do pomiaru absolutnej jaskrawości obiektów wyświetlanych na ekranie monitora. Dla kilku typów monitorów zostały podane przykłady wyznaczenia zintegrowanej jaskrawości dla wartości R, G i B elementów pikseli, z których formowany jest wizualny obraz obiektu (Wyznaczenie jaskrawości monitorów przy badaniach czułości świetlnej siatkówki).


Introduction
When conducting investigations of light and colour contrast sensitivity of the retina [1][2] the brightness of stimuli given to the patient in the CRT screen should be known.Stimuli are usually formed by software, and their brightness is set by forming a full colour image in RGB format.Because the retinal sensitivity is investigated in total darkness, for small values of the brightness of monitor pixels it is appropriate to use the modern digital cameras on monochrome CCD silicon photodetectors in order to determine the integral over the spectrum brightness of pixel luminescence L int .These cameras have the high light sensitivity and good linearity over a wide range of registered fluxes.
The problems that should be solved when designing a photometer able to determine the absolute value of the image of visual object L int are discussed in the article.The digital photometer based on the laptop that uses two types of digital monochrome cameras: mvBlueFOX 223G (Matrix Vision, Germany) and GEV-1410M-SC000 (IMPERX, USA), is briefly described.The examples of determination of the integral luminescent brightness of R, G, B pixel elements which form the stimulus image are given for three types of monitors: Samsung SyncMaster 550b (CRT) and 750s (CRT), Samsung SyncMaster 204T (LCD).

Basic calculation relations
In order to determine the brightness of monitor's pixels, preliminary the photometer based on camera should be calibrated, and the parameters of the measuring circuit and the lens, which could differ from the values used in the calibration, should be considered during measurements.
For the sizes of a visual object, which is small compared with the distance z from the camera lens, the spectral illumination of its image on the surface of the matrix of photodetectors is given by expression [3]: , where  is the wavelength;  ob , D and f are the transmission, diameter and focal length of the lens, respectively; M() is the spectral luminosity of the pixel element of display.Spectral flux incident on the light-sensitive element of the matrix with an area of s el , can be calculated by multiplying the illumination of the image by s el : (2) is the coefficient, which takes into account the parameters of the lens and the measurement scheme.The photocurrent generated in the photosensitive element of the photodetector matrix is calculated using the following expression: (3) where S max is the maximum absolute spectral sensitivity of the elements of the matrix, s() is the relative spectral sensitivity of the elements of the matrix,  1 and  2 are the limits of the spectrum in which s() is different from zero.Relative spectral sensitivity of matrices is usually given in their documentation [4,5], which makes it easy to consider s() in the calculations.The maximum value of the absolute sensitivity S max should be set during the calibration of the photometer against a reference radiation source.Charges Q accumulated in the light-sensitive elements of the matrix on CCD structures are determined by the photocurrent I ph and the exposure time , i.e.Q = I ph .During frame reading these charges are transmitted by line into the horizontal output register and reading unit, and are converted into the voltage of video signal.These video signals are amplified by the built-in analogue amplifier with amplification factor g. Further they are put to an analogueto-digital converter (ADC).In order to reduce the influence of thermal noise of reading unit the correlated double sampling is used, and the following digital signal at the output of ADC is formed: D = gk QD I ph , where k QD is the conversion factor of the accumulated charge Q into the digital signal [6] at g = 1.
The obtained digital readings D should be divided by the exposure time  to get a digital signal V proportional to the photocurrent or luminosity of M elements of the monitor screen: (4)

Calibration of digital photometer
In expression (4) there are two unknown quantities k QD and S max that are not contained in the documentation for the matrix and camera.As these values are constants they can be combined into a single unknown quantity k QDS , which should be determined during the calibration of the photometer against a reference radiation source.To simplify the calculations one can consider S max as standard value for silicon photodetectors, i.e. equal to 0.5 A / W, and find correction factor k cor during calibration.If multiply k cor by calculated value k QDS then the calculated V cal and experimental V ex values obtained during calibration of the photometer against a reference emitter are coincided.If during determining the relationship between the brightness of the monitor and the value of the control signal a few discrete values of the ratio D/f of the lens are used, it is necessary to determine k cor for each of them.When the aperture is changed the ratio D/f is usually set with an error, which should be considered.
Because the brightness of the reference radiation source is usually high in the visible region of the spectrum the narrowband optical filter with transmission  f () should be applied in the measurement circuit in order to reduce the value of the registered fluxes.If the reference radiation source is a blackbody, the following integral expression for calculation of the digital signals V р should be used: where c 1 and c 2 are the first and second constants of radiation, respectively.

Calculation of the radiation spectra of RGB elements of monitor
At photometric measurements of integrated brightness of emission of formed visual object the radiation spectrum should be considered.The relative radiation spectra of R, G, B luminophors of cathode-ray tube of monitor Samsung Master 550b measured using spectrometer AvaSpec-2048 USB2 are shown in Fig. 1.When determining these spectra both the relative spectral sensitivity of the CCD linear Sensor ILX554B (Sony) of spectrometer and the spectral characteristic of the used VA diffraction grating of average resolution of 300 lines per millimetre were taken into account.The obtained spectra roughly coincide with the emission radiation spectra of typical CRT displays.
If the luminescence spectrum is monotonic, e.g. for blue and green luminophors, one can use the average radiation wavelength  av and equivalent width of the radiation spectrum  eff allowing to simply find the integral brightness of the formed visual object.In this case the integral in (5) The relationships between the radiation intensities of these luminophors can be obtained by analysing the normalised sum spectrum of luminescence, registered at the formation of stimulus of white light and shown in Fig. 2.
For small deviations of the observation direction from the normal to the screen of monitor we can assume that the radiation brightness of its elements approximately corresponds to the brightness of Lambertian radiator, i.e.L = M/.Then the measured integrated brightness of the screen will be equal: In the case of a complex radiation spectrum, e.g.linear spectrum of the red luminiphor of CRT monitos (Fig. 1), for the precise determination of the integral over the spectrum of the radiation brightness it is necessary to predetermine its normalised spectrum m() = M()/M max and use the following equation to determine L int : is the correction coefficient of the measured values L int that takes into account the radiation spectrum of the monitor.The maximum value of the spectral luminosity M max can be found from the measured value of the average rate of increase of digital signals: We used expression (8) when determining L int .The calculated values of correction coefficients for the measured values L int , which take into account the corresponding radiation spectra of R, G and B luminophors of the Samsung SyncMaster 550b monitor and the radiation spectrum of the white visual object are respectively as follows: k mRs = 1.4762, k mGs = 1.0864, k mBs = 1.2316, k mWs = 1.2397.

Features of the program for controlling the operation of digital photometer
When measuring the brightness of the monitor screen a number of parameters of measurement scheme, the image sampling by light sensitive elements of the matrix, the quantization of the received signal by ADC, and the pulsed character of the pixel luminescence should be considered.
The window of the program in Matlab for controlling the operation of video cameras and processing of the received frames is shown in Fig. 3.The program implements all the functions necessary to determine the brightness of the monitor screen and allows to introduce all required parameters of measurement circuit (values z, D/f, g,  av ) and the value of the exposure time .There is a possibility of entering the value of the normalised threshold th_n necessary for the correct formation of the signal averaging field in obtained images.
The monochrome image obtained by digital camera is displayed in the main graphical window located under the panel of inputting the required parameters and outputting the obtained values of integrated brightness L int .
The second small graphical window allows you to visually check the correctness of the choice of the field of spatial averaging of signals.This dialog shows a binary image obtained at exceeding the normalised threshold th_n value by digital readings of D pixels.
The third graphical window displays a histogram of the obtained image and the average in area of the visual object value of digital readings D av (vertical line with a circle marker).These digital readings are needed to quickly evaluate the correctness of the choice of the normalised threshold th_n.
In order to use the full range of the operation of ADC, it is necessary to choose the exposure time  so that the maximum number of registered signals should be near the upper limit of the range.The used video cameras transmit the 10-bit video stream.Therefore, the maximum number of digital readings D provided with used algorithm of the automatic determination of the exposure time  is near 900 ADC counts.This ensures the correct registration of the average value of slowly varying signals taking into account the statistical nature of the photon flux formation.However, the time dependence of the brightness of light-emitting elements of monitor is of a pulsed character.Therefore, to reduce the error component of L int determination that appears during time averaging of signals it is necessary to carry out their accumulation in time interval, multiple to the period of image update at screen.In the algorithm of choosing the time  the minimum interval equal to 1/60 s is used.When measuring the brightness of the screen the frame rate of the monitor of 60 Hz is set.
The current values of the frame exposure time are displayed in the field «tau_t =», which is located under the field «tau =».When manually entering the values , the used exposure time is adjusted to be a multiple of 1/60 s, as one can see in Fig. 3.
The measurement circuit parameters z, D/f, preamp amplification factor g and value  av are set in editable fields in the top left corner of the program window.
The program contains the arrays of normalised dependencies of luminescence spectra of RGB screen elements m() allowing to choose the corresponding normalised spectrum for calculation L int (setting R, G or B).When setting both R, G and B the total normalised emission spectrum for white light is used.
To start and to stop the process of determining L int the buttons "Start" and "Stop" are applied.When you click "Start" button the video camera is initialised and the process of automatic choice of the exposure time starts.The obtained images are displayed in the main graphical window; simultaneously a histogram and a binary image of spatial averaging field are displayed.The default value th_n equals to 0.2.The average values of the measured brightness are displayed in the field «L =».Brightness is given in units of mW/(m 2 sr), which are most convenient for the perception of the values in the whole range of screen emission.

The applied algorithm of L int averaging
The values of brightness L int are averaged in time and selected by threshold th_n over the image area.In the process of formation of a binary image applied in the averaging the threshold value D th = D max th_n above which the pixels of the original image should be used in the averaging is calculated.
The digital values of the ADC counts D ij for pixels in the averaging region are added and divided by the total number N p .Since in colour monitors each pixel consists of RGB triads the area of pixel luminescence at the formation of R, G or B colour is always three times smaller than the area of the pixel, visible at white luminescence of the screen.On the other hand, the photometer on the matrix is calibrated over the reference emitter with a smooth dependence of M() on coordinates.Therefore it is necessary to determine the total number of pixels of matrix, which are covered by the image of visual object.For this a special operation of binary image increase taking into account connectivity with adjacent pixels that allows to fill all the gaps between the regions with high brightness is used (Fig. 3).The area of the binary image the pixels of which are not averaged is black.This enables to obtain a binary image of the stimulus that coincides with the initial image, and then to count the total number of pixels N p of the image.This number is displayed in the field "N_pixel = '.The pixel addresses of the obtained binary image with a value of 1 are stored and are used in the calculation of the average values of ADC counts «D_av», signal «V_av», and the average brightness of the visual object.
The values L int obtained for each frame are averaged in time by using a sliding window with a maximum length nW = 36.

Examples of determination of the relationship between the screen brightness and the value of control signal
The designed digital photometer was used to determine the brightness of the RGB elements of the screen of LCD and CRT monitors of Samsung Corporation.At appropriate adjustments the CRT monitors ensure receiving almost dark screen at zero brightness of the digital control signal.
For comparison, we measured the relationships between the control signal and brightness of the visual object in the form of a square 22 mm 2 formed on the LCD monitor (Samsung SyncMaster 204T) at its different colours of luminescence.The obtained dependencies are shown in Fig. 4 (points mark the measured values of brightness L int ).
The minimum brightness of the screen elements of this monitor slightly less than 1 mW/(sm2sr) is quite insufficient for determination of the light and colour-contrast sensitivity of the eye.Measurements of similar characteristics of CRT Samsung SyncMaster 550b monitor, which were carried out using the video camera mvBlueFOX 223G, have shown that the minimum brightness of RGB elements of this monitor is less about 3 orders than of Samsung SyncMaster 204T monitor (Fig. 5).As one can see in Fig. 5 the character of dependence L int (U cs ) in the lower and upper half of the range of reproducible brightness is significantly different.At these settings of the brightness and contrast adjustment for Samsung Master 550b monitor and zero values of the digital control signals the elaborated photometer registered the residual luminosity of the screen due to incomplete blanking of electron beam guns.We note that during the measurements of the minimum levels of brightness of screen the low frequency noises of the mvBlueFOX 223G camera in the form of horizontal strips of different width and brightness introduce a noticeable error into the measured signals.
The application of GEV-1410M camera with the better design of block for double correlated sampling approximately two orders decreased the minimum levels of authentically measured brightness.Measurements of the dependence L int (U cs ) with this camera for red luminophor of Samsung SyncMaster 750s monitor have shown that in thoroughly darkened room using the subtracting of the background illumination and the dark charge matrix the brightness range reproducible by the monitor is about 7 orders (Fig. 6) and can be used for investigations of retina light sensitivity.If necessary, the brightness values are recalculated in units used in ophthalmology taking into account the visibility function of the eye.The method of calculation of the pupil illumination and photon flux incident on the cornea is given in [3].

Conclusions
The developed methods, software and hardware have confirmed the effectiveness of application of the described approach for the determination of the relationship between the absolute brightness of the monitor screen (in SI units) on the value of the controlled digital signal.Software based on the obtained approximations of the dependencies of the stimuli brightness formed on a display screen allows to calculate the absolute values of the brightness of stimuli displayed to a patient during the study of light and colour contrast sensitivity of retina.

Fig. 1 .Fig. 2 .
Fig. 1.Relative normalised emission spectra of R, G, B luminophors of monitor Samsung SyncMaster 550b on a cathode ray tube

Fig. 3 .
Fig. 3.The program window for control of operation of the photometer video camera and processing of the frames obtained when determining the brightness of the visual object in the form of a circle of 2 mm diameter

Fig. 4 .Fig. 5 .
Fig. 4. Registered relationships between the relative value of control digital signal and brightness of the R, G and B pixel elements of LCD Samsung SyncMaster 204T monitor at adjustments of brightness of 54 % and contrast of 81 %

Fig. 6 .
Fig.6.The registered dependencies of brightness of R, G and B pixel elements of monitor Samsung SyncMaster 750s on the relative value of the control signal at regulated brightness (100 %) and contrast (100 %)