A new video‐camera‐based visiometer system

We provide a novel design of atmosphere visibility measurement system with the contrast principle used in the naked eye visibility observation. The new digital photography visiometer system (DPVS), composed of a CCD camera and two identical targets, utilizes the contrast of dual targets to measure the visibility. Two operational modes are designed to enable the DPVS to accommodate the lighting conditions of the day and night. Two passive targets, black bodies, are employed for daytime visibility measurement, and two active lights, LED panels, are utilized for nighttime. The mathematical models of the dual targets for both daytime and nighttime are developed, and the sensitivity analysis shows the requirements of the hardware to achieve desired accuracy. The design of the target including the blackbody and the LED panel is briefly discussed, and the temperature dependence and stability of the LED panels are measured experimentally. Finally, the DPVS is compared with two commercial visibility devices, a forward scatter meter and a transmission meter for field validation. A 5‐day comparative experiment shows that the measurements of the DPVS generally well agree with those of the transmissometer and the forward scatter meter for visibility up to 15 km, and the relative bias of 87% of the DPVS measurements lies between −0.2 and 0.2.


| INTRODUCTION OF A DIGITAL PHOTOGRAPHY VISIOMETER SYSTEM (DPVS)
According to the World Meteorological Organization (WMO), visibility is defined by the greatest distance at which a certain dimension black object can be seen and identified by the observer from the background of sky in daytime, or certain lights intensity can be seen or identified in nighttime (WMO, 1990;2010). Visibility measurement is important for the areas of transportation safety, environment monitoring, etc. In retrospect, visibility is measured by human observers through observing a set of objects or lights located different distances. However, as the developments of optical sensors, several types of autonomous visibility sensors have been invented and developed, and gradually replace the functions of the human observers. Overall, there are a few commercially matured visibility sensors that have been widely used: scatter visibility sensor, transmissometer and lidar (Brock and Richardson, 2001). The scatter visibility sensors directly measure the scatter coefficient of the air and aerosol particles and refer to visibility based on the scattering light intensity. The transmissometers measure the visibility based on Koschmieder law (Koschmieder, 1924), and it has a pair of transmitter and receiver. The receiver measures the loss of the light intensity emitted by transmitter to obtain the extinction coefficient through the Beer-Lambert law. The lidar-type visibility sensor can measure the visibility of line of sight of the laser beam and calculates the visibility through measuring the backscatter and extinction coefficients.
Since the rapid developments of digital video camera and computer information technology many researchers have proposed different methods of measuring visibility with the images taken by video camera (e.g., Xie et al., 1999;Wang et al., 2002;Babari et al., 2011;Graves and Newsam, 2011;Babari et al., 2012;Wang et al., 2014;Wang et al., 2018). In this paper, we present a new digital visibility measurement system with dual designed targets that can provide visibility measurement in both day and night time. The digital photography visiometer system (DPVS) is developed from the novel visiometer system proposed by Lv et al. (2004). This system follows the principle of observing atmosphere visibility by human with the visual contrast principles. In section 2, the mathematical model of the DPVS is developed, and the sensitivity will be discussed. Section 3 will briefly introduce the instrumentation of DPVS, and the field validation and discussion will be presented in section 4.

| The mathematical model of the DPVS
The basic principle of visibility based on visual contrast that is the relative difference between the light intensity of background and the object is presented in Duntley (1948). The visual contrast is defined by Equation (1), where B g and B t are the light intensities of the sky background and the object, respectively. When the atmosphere is homogenous, the visual contrast obeys the Beer-Lambert law, therefore we have the relationship between the observed contrast C v (R) and the original contrast C v (0), showed in Equation (2), where σ is the atmosphere extinction coefficient. The relationship between extinction coefficient and visibility is given by the Koschmieder law (Koschmieder, 1924), which is Equation (3), where ξ 0 is the contrast ratio, recommended to be 0.02 by the WMO, or 0.05 by the International Civil Aviation Organization (ICAO). Therefore, the relationship between visibility and contrast is given by Equation (4), The C v (0) is the intrinsic luminance contrast of the object against the sky background when the observer stands just in front of the object, and C v (R) is the corresponding contrast when the observer is at distance of R from the object. C v (0) only depends on the radiance of the sky and object itself. For the natural objects, it is difficult to obtain their accurate intrinsic luminance contrast since the albedos of natural objects are variable with many factors. This circumstance stimulates the demand of human designed objects with known albedos to obtain the intrinsic contrast in Equation (4).
Several video-camera-based visibility measurement systems with man-made objects have been proposed and studied (Kwon and Fleege, 1998;Xie et al., 1999;Wang et al., 2014). In the video-camera-based visiometer, the luminance of man-made targets and sky background are measured by Charged Coupled Device (CCD) video camera. CCD is a device widely used in digital photography that converts the radiance of objects into digitized photos. Since the objects are recorded simultaneously in the same image, a dual-target DPVS has been proposed by Lv et al. (2004) and further developed by Wang et al. (2014). The schematic structure of the dual man-made targets system is presented in Figure 1.
Based on the principle of the definition of visibility suggested by WMO, the DPVS adopts different operational modes for the daytime and nighttime. In the daytime, dual passive targets are utilized. For instance, the intrinsic luminance contrast of an ideal black body is equal to one so that Equation (4) can be greatly simplified. Assumed the two black bodies located at L1 and L2 from the video camera, as F I G U R E 1 A schematic structure of the DPVS shown in Figure 1, the visibility can be derived from the brightness of the black bodies and sky background, based on Equations (1) and (4), where D t1 and D t2 are the averaged brightness of black body 1 and 2 measured by the CCD camera, respectively; D g1 and D g2 are the averaged sky brightness. B t10 and B t20 are the original luminance of black body 1 and 2 and are equal to zero if the black bodies are ideal. Therefore, Equation (5) can be simplified to During the nighttime when the sunlight fades away, the DPVS switches to nighttime mode, since Equation (5) would not be available due to the absence of sky luminance. In principle, the DPVS measures the extinction coefficient σ based on the contrast to measure the visibility. In nighttime, the extinction coefficient can be obtained through comparing the light intensities of dual lights located at different distances. Similar to the dual-target approach used in daytime, the nighttime visibility is given by Equation (7), where D l1 and D l2 are the averaged brightness of light 1 and 2 at position L 1 and L 2 , respectively, and D t1 and D t2 are the averaged brightness of two black bodies. The B l10 and B l20 are the original radiance of light 1 and 2.

| Sensitivity analysis of the DPVS
Mathematically, Equation (5) shares the same formula format with Equation (7), which can be written in general form as Equation (8), where n D represents the contrast ratio of two targets, which are (D t1 -D g1 )/(D t2 -D g2 ) for daytime and (D l1 -D t1 )/ (D l2 -D t2 ) for nighttime, and n o represents the original contrast ratio. As shown Equation (8), the visibility in daytime or nighttime is determined by the brightness measurements from the CCD camera and the corresponding true values of black bodies, lights and sky background. Obviously, because the noises of image brightness are uncorrelated with the luminance fluctuations of blackbodies, lights and sky background, by the use of the error propagation principle, the total root mean square (RMS) visibility error can be written as Equation (9), Equation (9) shows that the errors of the DPVS are from two major sources. The first part error is from the image brightness error generated by the CCD camera, because D l1 , D l2 , D t1 , D t2 , D g1 and D g2 are the brightness directly obtained from the same image. Although the dual-target approach, to a great extent, can eliminate the influences of the common biases and fluctuations, such as the dark current and the gain of the CCD camera, there are a few other factors that still play essential roles in the accuracy performance of the DPVS, for instance, the linearity and uniformity of the CCD, shot noise and so on. The second part error source Δn o is mainly produced by the non-ideal observation conditions, since it is hardly to make ideal black bodies with zero reflectance at visible light band, ideal light source with constant light intensity without drifting, to obtain ideal sky background with uniform luminance distribution. Figure 2 presents the total error as a function of visibility for a given relative error of visibility, where the total error is equal to F I G U R E 2 The contrast ratio ξ 0 is set to 0.02, and the distance between two targets is 35 m. The black and red lines represent the total error |Δn tot /n tot | as a function of visibility when the relative error of visibility (ΔV rms /V) is set to 20 and 10%, respectively : For a given error tolerance of visibility, the relative total error is an inverse function of visibility based on Equation (9). Therefore, the higher visibility will tolerate smaller total error, for instance, when the visibility is 2 km, the total error should be controlled within 1.37% for (ΔV rms /V) less than 20% and decreases to 0.679% for (ΔV rms /V) less than 10%.
The errors generated by instrument itself, such as the CCD camera, black bodies and light transmitters, are beyond the scope of this paper; at the same time, the instrument errors can also be greatly controlled and reduced by wellmade and well-calibrated devices.

| CONFIGURATION OF THE DPVS
The DPVS consists of one digital video sub-system with a high-quality lens and a 14-bit monochrome CCD camera, and two identical targets, which are located at near and far positions, as illustrated in Figure 1. Each target has a blackbody and a LED light source. The CCD camera is installed in an environment-controlled chamber. Multiple images of the two targets and sky background are taken per second, and pixels at selected sky background and the targets in the acquired images are averaged spatially and temporally to compute the brightness of the sky and the targets in Equations (5) and (7). After obtaining this information, the visibility algorithm computes the atmosphere extinction coefficient, then compute the visibility with the limiting contrast value (ξ 0 ) of 0.02. The configuration is shown in Figure 3.
The accuracy for estimating atmosphere visibility largely depends on both the qualities of the hardware, such as CCD camera, black bodies, light sources, etc., and the performance of the image recognition algorithm for identifying the pixels of the targets. The inevitable vibrations caused by wind or human activity can lead to pixel position drifting of the targets on the CCD image both horizontally and vertically. This issue can be solved by an image convolution algorithm that acquires the pixel positions with high accuracy. An industrial CCD camera is being used for obtaining and processing images with specifications of 14 bit, 1,392 × 1,040 pixels, 0.1 LUX minimum illuminance and 1-6,796,800 μs exposure time. 14-bit CCD camera has enough capacity to resolve 0.01% relative brightness change. Therefore, one of the critical success factors of the DPVS would be the design of the target.

| Novel design of the DPVS target
The new designed target consists of a black-body module (top part of the target), and a high stable LED light module (bottom part). The structure of the target is shown in Figure 4.
An ideal black body can absorb all incident light, regardless of the frequency and angle of incidence. However, practically speaking, an idealized black body can hardly be made, especially the open window is needed to be large enough to form a clear image on CCD camera. Lü (2003) provided a comprehensive discussion of black body design for the DPVS. Number of techniques can be adopted to minimize the reflectivity of the black body. For instance, multiple stops can be placed inside the black body so that minimum light rays can reach into the black body. Secondly, the inner wall of the black body should be covered with some specific material that can efficiently absorb visible light. Finally, a robust calibration procedure for the black body is necessary.
The DPVS adopts light-emitting diodes (LEDs) as target light source due to their environmental friendless, long lifespan, fast response, high brightness and power efficiency. As discussed in section 2, the lighting stability of the target light is essential for the accuracy of the DPVS. Many approaches have been proposed to stabilize the emission power of LEDs (e.g., Chen et al., 2004;Salzberg et al., 2005;Huang et al., 2009). The conventional control method is to design a driving circuit with emission power feedback based on the power measured by a photodiode. The control accuracy depends on the accuracy of the feedback photodiode and the adjusting driven current. The higher accuracy gives rise to more complexity of the circuit.
To achieve high cost-effective target light and reduce the circuit complexity with desired accuracy, we propose a novel LED light panel with constant current driver through The relationship between the LED temperature and the panel brightness is quantified experimentally under different the junction temperatures with a constant driven current. The measurement setup is that the LED panel is placed inside the DPVS target, and the brightness is measured by the CCD camera of the DPVS. Eventually, the LED panel forms 400 × 400 pixels image on CCD camera, and the averaged brightness was utilized to represent the lighting power of the LED panel. Two LEDs located at the center and premiere of the LED panel are chosen for simultaneous junction temperature measurement with a thermocouple thermometer. The measurement is carried on during nighttime when all the ambient lights are taken off. The relationship of the temperature and the LED panel brightness is shown in Figure 5. Negative linear regression is found in the relationship between the LED panel brightness and the junction temperature. The center temperature is a few degrees higher than premiere temperature because the center LED is surrounded by other LEDs and has lower heat dissipation rate. The negative regression coefficients suggest the brightness changes roughly 0.1% per degree. It could result in dramatical effect and degrade the accuracy performance of the DPVS in the nighttime since atmosphere temperature variations can reach ten degrees through one night.
The dual target lights of the DPVS, to a great extent, can reduce the errors generated by the brightness variations caused by drifting ambient temperature, because the contrast of the two target lights in Equation (7) can cancel out the temperature-brightness linear regression coefficients of the two target lights. When the LEDs achieve thermal equilibrium, the ambient temperature changes the brightness of LED panels but has negligible effects on the brightness ratio once the ambient temperatures at two target lights are the same. Figure 6 presents the brightness ratio variation of two independent LED panels through one night. It has the similar measurement setup as the experiment for Figure 5, except one more LED panel added. The data is one-minute averaged, and 475 data points give about 8-hour continuous F I G U R E 4 The structure of the DPVS target F I G U R E 5 The relationship between LED center temperature (left) and LED panel brightness, and premiere temperature (right) and LED panel brightness measurement. The histogram in Figure 6 suggests that the brightness ratio can be approximated by a Gaussian distribution with mean ratio of 1.049. The standard deviation (SD) is 3.9 × 10 −4 , and three standard deviations give about 1.2 × 10 −3 , which means that the fluctuations of the brightness ratio of two LED panel is around 0.11% during this measurement. As discussed in section 2, 0.11% fluctuations can ensure visibility error less than 10% for visibility below 10 km.

| FIELD OBSERVATION AND VALIDATION
As shown in Figure 7, a DPVS was installed at Nanjiao Weather Observatory, which is the largest weather observatory in Beijing (39.8 N,116.47 E) and capable of providing reference observations for instrument comparative experiment. The two targets and the video camera are aligned with north-south orientation that the video camera is located at the north side and the two targets are located at the south side. The distance between the video camera and the first target is set to 15 m, and two targets are separated by a distance of 35 m. At the east side of the second target, a Vaisala transmissometer LT31and a Vaisala forward visibility sensor PWD22 were installed 50 m away from the DPVS. The measurement range is from 10 m to 15 km for LT31, and 10 m to 20 km for PWD22. The specifications of the LT31 and the PWD22 can be obtained from the open resources to the public (https://www.vaisala.com/en). For the sake of convenience, the measurement range of the DPVS is set to 10 m to 20 km, although some reliable measurements still can be made above 20 km. The data rates of the LT31, the PWD22 and the DPVS are set to one data point per minute.

| Experimental data
The luminance of the targets and sky background are converted the gray scales through a 14-bit image as shown in Figure 8. As discussed in section 3, the positions of the two black bodies and two LED panels are identified by a target recognition algorithm, and a selected pixel area without F I G U R E 6 Stability of the ratio of the two LED panels for 8-hr continuous testing (left), and the histogram of the distribution of the ratios (right) F I G U R E 7 The DPVS installed at Nanjiao observatory, Beijing object image is designated as sky background. The averaged gray values of each target are used to compute the visibility. A customized autonomous algorithm of controlling the exposure time of the CCD camera has been utilized in the DPVS to adapt the extreme dynamical range of sky background. The exposure time is set to a reasonable range to ensure well linearity of the output of CCD camera through avoiding over exposure of the sky or under exposure of the blackbodies. Figure 9 shows an example when visibility exhibits rapid changes from 500 m at 0600 to 7 km at 0700, and to 15 km at 0730. The visibilities vary between 300 m and 1.1 km during the nighttime and stay above 10 km for most of the daytime. The transition of the operational mode from nighttime to daytime of the DPVS occurs during the stage of visibility increasing rapidly. It can be seen that the measurements of the DPVS are well consistent with the results of the LT31 and the PWD22. The correlation coefficients for the 10-min averaged visibilities between the DPVS and the LT31 are 0.9947 and 0.7057 for nighttime and daytime, respectively, and the corresponding correlation coefficients between the DPVS and the PWD22 are 0.9929 and 0.8237. Relatively larger discrepancy between the DPVS and the LT31 is found for high visibility after 0700, and the DPVS shows similar trend with the PWD22 with smaller discrepancy.

| The comparative evaluation
To evaluate the stability of the DPVS, another field evaluation with 5 days continuous run was made from October 15-19, 2017. The instruments were carefully calibrated, and the 6-day run was fully automatic without interruption or artificial interference. A total of 7,200 data points or 120 hr data were collected, as shown in Figure 10.
First, the overall consistency of the data among the DPVS, the LT31, and the PWD22 is well observed through the evaluation period when the visibility exhibits dramatical variations from tens of meter to 20 km, excepting that a few large discrepancies between the DPVS and the LT31 or the PWD22 are found around the 42nd, 43rd, and 45th, 107th, 108th, 111th and 112th hour with short period from tens of minute to 2 hr. The first three set happens during the nighttime on October 16, and the last four set happens during the daytime on October 19. These outliers happen when the visibility is higher than 5 km. It may be caused by the forward scatter technique that only measures the scatter coefficients and is not able to measure atmosphere absorption coefficient. Another possibility is that the homogeneous assumption in Equation (4) is partially valid, for instance, when low clouds or patched fog exit.
The scatter graphs of the DPVS and the LT31 (a), the DPVS and the PWD22 (b) are presented in Figure 11 in logarithm format. The overall linearities of the two data sets are quite good, and the scatter graphs are relatively symmetric with respect to the diagonal axis (Y = X). The red lines are given by the linear regression, and the fitting equations are shown in Figure 11. The black dotted and dashed lines denote the references of 20% differences. The DPVS has F I G U R E 9 Rapid change of visibility occurred on October 28, 2017, measured by the LT31 (green dashed line), the PWD22 (the blue dotted-dashed line) and the DPVS (red and black lines for nighttime and daytime models, respectively). The cyan line denotes the time of sunrise F I G U R E 8 A typical image of the two targets and sky background taken by the CCD camera. The image is not the original size and has been cropped for better presentation better linear correlation with the LT31 than the PWD22, especially when the visibility lower than 1,000 m. It accords with a generally agreed point of view that the transmissometer has better performance than the scatter visibility sensors for low visibility. Relatively large biases are found when visibility is between 100 meters to 1000 meters.
The distributions of the relative biases of the DPVS, the LT31 and the PWD22 are shown in Figure 12. Here, we utilize a virtually true visibility that is defined by the average of the three visibilities of the DPVS, the LT31 and the PWD22 (Crosby, 2003). The relative bias is computed by Equation (10), where V T is the true visibility, and V I is the visibility of the DPVS, the LT31, or the PWD22. The means and standard deviations (SDs) of the relative bias of the DPVS in Figure 12 are −0.013 and 0.17, respectively, and the  Table 1. The correlation coefficient is calculated by virtually true visibility and the observed visibility with the DPVS, the LT31, and the PWD22 for visibility range of 10 m-2 km, 2-10 km and 10-15 km. The overall correlations with correlation coefficients above 0.9 are quite good for all instruments when visibility lower than 10 km. The SDs of the DPVS are close to twice the SD of the LT31 for visibilities from 10 m to 2 km, 2 to 10 km, and the SDs of the PWD22 lie between the DPVS and the LT31. The SD of the PWD22 in range of 10 m-2 km is 50% higher than that in range of 2-10 km, implying relatively larger bias under low visibility for the PWD22.

| CONCLUSION
A camera-based visibility system equipped with an industrial CCD camera and two targets is designed according to the principle of human visibility observation. The mathematical model of the DPVS is developed based on contrast principle. The dual targets method, to a great extent, can reduce the errors caused by the drifting of the hardware properties, increase the accuracy of visibility measurement.
In this paper, a novel model of the target that consists of a black body and high-brightness LED light source is presented for the DPVS. Unlike the previous camera-based visibility system, this new target enables the DPVS to provide visibility measurement through day and night with relatively high accuracy. The design of the black body is briefly discussed, and a constant current driven LED module is introduced. The stability test of the brightness ratio of the two LED panels shows the evidence of a limited error induced by LED brightness variations when the DPVS measures the visibility through the contrast of the two LED panels during the nighttime.
Two commercial visibility instruments are used for the evaluation of the performance of the DPVS. The DPVS can provide 24-hr continuous observation with reliable results even with a rapid change of visibility during the transition of the two operational modes of the DPVS. The 5-day continuous comparison shows promising results, especially the DPVS shows good consistency with the LT31 for low visibility range. The SD of the overall bias is not larger than 16% for visibility up to 10 km and suggests that the DPVS is capable for field applications.
When visibility is high, some relatively large biases are found in the DPVS. In future work, we will examine the possible factors that may generate large biases for high visibility. A reliable data quality control algorithm is to estimate the best the contrast of the targets by removing the effects of the outlier images contaminated by the uninvited objects or ambient lights.
T A B L E 1 Statistics of the relative biases between the DPVS, the LT31, the PWD22 and the true visibility ranges under ranges of 10 m-2 km, 2-10 km and 10-15 km 10 m-2 km 2-10 km 10-15 km