Quantification of atmospheric visibility with dual digital cameras during daytime and nighttime

Introduction Conclusions References


Introduction
Atmospheric visibility can be described by the maximum horizontal distance at which a target with a sky background can be visually observed by human eyes (Horvath, 1981).Usually, it is also interpreted as "visual range" (Malm, 1979), which is determined with different definitions of threshold contrast.For example, Koschmieder (1924) used a threshold contrast of 0.02 to calculate atmospheric visibility, while the WMO (World Meteorological Organization, 1971) uses 0.05 as the threshold contrast.To make our results comparable to calculations of visibility reported by most research, we selected the threshold contrast of 0.02 in this study.Atmospheric visibility has decreased over the globe since the 1970s (Wang et al., 2009).Visibility degradation is highly associated with atmospheric pollution, which affects not only human health but also the safety of air and road transportation.Another issue is that the particles that impair visibility also contribute to a change of the global radiation balance, which, in turn, affects climate.
In air quality research, visibility reflects the extent of pollution by particulate matters in the air (Charlson, 1969), and therefore is regulated and measured regularly.Most meteorological stations in China apply the human visual range observation method to determine atmospheric visibility.However, human perception is influenced by a number of factors such as target illumination (brightness), background illumination, target geometry, air pollution levels along the observation, and scenic characteristics (Malm, 1999).The "human eye" method requires the observer to make a visibility measurement by synthesizing the impact of these factors subjectively.Errors are introduced due to subjectivity because human eyes possess different thresholds for contrast perceptions for the same target.Middleton (1952) tested 1000 people to find that the threshold contrast varies from 0.01 to 0.20.This difference would lead to completely different visibility estimation by these people in comparison to the meteorological range with a threshold contrast of 0.02.Therefore, optical instruments, such as transmissometer, were developed to measure the light extinction, which can be used to calculate visibility.Instrumentation-based visibility measurements are more "objectively" and independent of human observations.Transmissometers quantify visibility by measuring the light extinction of the atmosphere between the transmitter and the receiver.An optical path of 300 m-2 km (Auvermann et al., 2004) is usually required.In addition, the reliability of this method relies on the stability of both the light source and the photosensitive device at the receiving end.Another type of optical instruments, called the scatterometer, is based on forward light scattering.The transmitter and receiver are placed less 1 m apart with their optical axes crossing each other at a certain angle.Light scattering is quantified based on the scattered light received by the receiver, and thereby light extinction can be calculated with assumed single scattering albedo.Visibility can then be calculated from the light extinction.This technology generates a more stable signal than transmissometry because the transmitter and receiver are fixed on one rigid frame of the scatterometer, while they are separated far apart (from 10 m to more than 1000 m for transmissometers).However, the results of scatterometer are prone to being biased by local pollution, because the small sampling volume makes the result not representative of the visibility of the ambient atmosphere over a larger spatial area.
Photographic methods have been developed to estimate atmospheric visibility.In the 1980s, Richard et al. (1989) developed a method to monitor atmospheric visibility using a film camera.In this method, calibration was performed to quantify the relationship between the film density and the radiance received by the camera using a teleradiometer and panels with different grayscale values.The atmospheric visibility was calculated by analyzing the signal recorded on the film.Most recently, methods were developed to determine atmospheric visibility using digital cameras, which can be categorized into two groups according to their working principles.The first group of methods determines visibility by measuring the apparent contrast of a distant target against its background.Xie et al. (1999) developed a digital photographic visibility system (DPVS) to monitor diurnal visibility.In this method, a distant mountain was selected as the target.Visibility was calculated based on the contrast between the target and its sky background, and the distance of the target.The blackbody assumption of the target made this method consistently underestimate the visibility.Later on, Lv et al. (2004) improved this method by photographing two targets along a straight line but at two distances.The ratio of the differential brightness between the two targets and their respective sky backgrounds was used to calculate the visibility.This scheme eliminates the impact from the dark current in the imaging system and background stray lights and, thus, improved the observation range and accuracy of DPVS.However, prior knowledge of the ratio of the inherent differential brightness for the two targets against their respective sky backgrounds was required, which could only be assumed instead of directly measured.Therefore, an assumption, usually an arbitrary estimate, needs to be made for this ratio, which becomes an important systematic source of error for this method (Lv et al., 2005).Luo et al. (2002) studied the relationship between the specific brightness of a distant target and the atmospheric visibility.Good correlation, with a correlation coefficient of 0.9079, was observed for visibility from 5 to 10 km.One limitation of this method is that the proportional coefficient for calculating visibility from specific brightness is dependent on the target characteristics and the distance between the camera and target, both of which limit the adaptability of this method.The second type of photography-based methods quantifies visibility by relating visibility with numerical indices that were constructed through digital image analysis in spatial and frequency domains (Liaw et al., 2009;Xie et al., 2008).This type of method employs a digital signal analysis technique to characterize the relationship between the visibility and a certain parameter (e.g., frequency) of the image, which is scenespecific.This indicates that the relationship needs to be reconstructed for a different scene, which limits the adaptability of those methods.Recently, another novel method was developed to mimic the procedure of the visual observation method using a digital panorama camera to take pictures of a series of targets with known distances (Baumer et al., 2008).In this method, an algorithm was designed to try to identify the edge for each target.The visibility is determined by the distance of the furthest target whose edge can be identified.To apply this method, multiple targets with different known distances are required, which make it more inconvenient than photographing a single target.In addition, the accuracy of this method is limited by the number of targets.
In this study, a new digital-photography-based algorithm was developed to quantify atmospheric visibility by taking pictures of the same target at two different distances.Visibility was calculated by determining the contrasts of target with its sky background in the two digital photos, as well as the distance between the locations where the photos were taken.This method was further adapted to quantify visibility during nighttime.Field campaigns were carried out to test this method, and the results were compared to those obtained with a co-located visibility meter.The results suggest that, compared with other visibility methods, DOM-Vis is more adaptive for field measurement while still providing reliable measurement of visibility.

Daytime method
Figure 1a shows two digital still cameras obtaining images of the same target and its sky background during the daytime.Usually, an object with a dark color such as a building or mountain is selected to get an apparent contrast with the sky background.The two camera locations and the target are along the same straight line.The distance from the near  camera to the target is X 1 , and the distance between the far camera and the near camera is X 2 .
The radiances of the light originated from the dark target and the sky background are N b0 and N w0 , respectively.The radiances of the light received by the near camera, after transferring through the atmosphere along path X 1 , are N b1 (from the dark target) and N w1 (from the sky background).The terms are described in Eqs. ( 1) and (2): where N * 1 is the path radiances for path X 1 .T 1 is the transmittance of the atmosphere along path X 1 .The path radiance N * 1 can be estimated with an equilibrium radiance model for uniform illumination (clear sky or uniformly overcast sky) (Molenar et al., 1994).
The radiances of the light received by the far camera, after transferring through the atmosphere along path X 2 , are N b2 (from the dark target) and N w2 (from the sky background), respectively.They are described in Eqs. ( 4) and ( 5): where N * 2 is the path radiance for path X 2 .T 2 is the transmittance of the atmosphere along path X 2 .
Equations ( 4)-( 5) are rearranged to determine the transmittance (T 2 ) of path X 2 : As discussed previously, N w1 = N w2 = N w0 .Substituting it into Eq.( 6), T 2 can then be calculated from the ratios of the radiances from the target and its sky background received by the near and far cameras.
According to the Lambert-Beer law, transmittance degrades exponentially with the product of extinction coefficient σ ext and path length: The extinction coefficient, σ ext , can then be determined from Eqs. ( 7) and ( 8).Substituting it into the Koschmieder (1924) equation, visibility is thus computed with Eq. ( 9): The ratios of N b2 to N w2 and N b1 to N w1 are determined with the digital images taken with the far camera and near camera, respectively, using the method developed by Du (2007).

Nighttime method
Figure 1b shows two digital still cameras shooting pictures of the same light-emitting target (e.g., an illuminated window of a building) along the same line of sight during the nighttime.The distance from the near camera to the target is X 1 , and the distance from the far camera to the near camera is X 2 .
The radiance of the light from the light-emitting target is N 0 .The radiances received by the near and far cameras are N 1 and N 2 , respectively, which can be described in Eqs. ( 10) and (11).
where T 1 and T 2 are the transmittances of the atmosphere along paths X 1 and X 2 , respectively.The transmittance of path X 2 can be calculated from Eqs. ( 10) and (11).
According to Eq. ( 8), the extinction coefficient σ ext can be determined with Eq. ( 12).Then substituting σ ext into Koschmieder equation leads to the determination of visibility:

Field evaluations
Prior to field evaluation, the cameras were calibrated to characterize the relationship between the pixel value and the exposure received by the pixel, which is proportional to the [(incoming radiance) × (exposure time) × (aperture area)].
During the calibration, different levels of exposure were achieved by taking pictures of a uniform white surface with Lambertian reflectivity with fixed aperture size but changing exposure time.The exposure times were plotted in lieu of exposure with pixel values in logarithmic scale (Fig. 2).With the camera response curve shown in Fig. 2, the ratio of exposure between two pixels (a and b), which is the vertical distance between the point A and point B, can be calculated from the corresponding pixel values PV A and PV B .Details of calibration procedure and method for obtaining exposure ratio between two spots in a digital image from their pixel values were described by Du (2007).
The field study was carried out from February to September 2011 in Xiamen, China (24 • 36 N, 118 • 03 E).To evaluate the daytime method, a 13-story building was selected as the target, which was grey in color and thus suitable as the target of this method.The near camera site (hereafter abbreviated as NC) was located 750 m from the target.To test the impact of the distance between the two shooting sites on the result, two far camera sites were selected.The first was "far camera one" (FC1), located 150 m away from NC, and the other was "far camera two" (FC2), which was 250 m away from NC (Fig. 3).The three camera locations and the target were in the same straight line.To minimize the variance caused by using different cameras, the same camera was used to take pictures at these three locations within 3 min.The assumption was that the atmospheric visibility remains constant within such a short time.During each experiment, all pictures were taken at the fixed aperture of F8.0.The actual exposure times were selected depending on the lighting condition when taking the pictures.For example, exposure times were 1/50-1/100 s when it was cloudy, while 1/400-1/500 s when it was sunny and bright.The idea is to make the pixel values of the target and background fall into the range of 30-220 to avoid distortion of the camera response from overexposure and underexposure.The pictures were saved in JPEG format, which is convenient for storage, analysis, and viewing.To minimize the error of nonlinearity resulting from incamera processing, the camera was calibrated with the pictures also taken in JPEG format.The resulting pixel values and exposure times were analyzed using non-linear regression to characterize the correlation between pixel value and exposure time specific to the camera that was used.Testing results indicated that such an approach is still capable of providing consistent results of contrast, such as using raw images, with the average difference less than 6 %.The experiment was conducted on a daily basis during the abovementioned period unless it rained.On sunny days, the locations of the camera were carefully selected so that the sun was behind the camera in the morning and left of the camera in the afternoon.
The nighttime algorithm of DOM-Vis was also tested with one digital camera taking pictures of a light source at two sites along the same straight line during nighttime.The light source was a curtained window with lights turned on inside the room.The curtain was semi-translucent so that the window appeared homogenous in the pictures (Fig. 3).The near site was 100 m away from the window, and the far site was 250 m away from the window.The difference of the radiances received by the camera at the near and far sites is proportional to the attenuation of the light along the two sites.PVs of selected zones in the pictures taken at the near and far sites were used to quantify the radiance ratio received by the camera at the two sites by means of camera response curve, and then substituted into Eq.( 13) to quantify the nighttime visibility.
A Vaisala Maws 301 meteorological station (Vaisala Inc., Finland) was installed on a site that continuously monitored the atmospheric visibility with a Vaisala scatterometer (Vaisala PWD-20, Finland).The instrument quantifies visibility by measuring the light scattering.It was calibrated with a transmissometer (for example, Vaisala Mitras) by the manufacture to characterize the relationship between the scattered light signal and extinction coefficient, assuming the single scattering albedo keeps constant.Then, visibility can be calculated from the scattered light signal using the empirical relationship between scattering and extinction coefficient.PWD-20 can quantify visibility ranging from 10 m to 20 km.The distance between the transmitter and the receiver of the visibility detector was 0.5 m.The accuracy of PWD 20 is ±10 % when the visibility ranges from 10 m to 10 km, and ±15 % when the visibility ranges from 10 to 20 km.The visibility values acquired by Vaisala PWD-20 served as a reference to validate DOM-Vis.

Daytime field tests
A total of 321 pairs of pictures were obtained during daytime and were analyzed for visibility using the daytime algorithm.Each pair of pictures consisted of one photo taken at the near camera location and one at the far camera location.Ideally, as discussed in Sect.2.1, the radiances from the sky background that were detected by the camera at the two locations should be the same (i.e., N w1 = N w2 ).And as a consequence, the pixel values corresponding to the sky background in the far and near pictures should be the same.However, in practice, the pixel value of the sky is affected not only by camera settings (e.g., aperture size and exposure time) but also the relative sizes of dark (target) and bright (sky) areas in the scene.According to the field experience, the optical and electronic system in the commercial digital cameras would make an adjustment to let the sky brighter if the percentage of the dark area in the scene increased.The difference in pixel values of the sky background in near and far pictures is denoted as PV sky .Among the 321 pairs of pictures, 51 pairs had PV sky < 1; 84 pairs had PV sky between 1 and 2; 142 pairs had PV sky between 2 and 4; and the remaining pairs had PV sky > 4.
Table 1 lists the correlations between the visibilities obtained with DOM-Vis and the Vaisala scatterometer by grouping the results according to PV sky .The comparison shows that as the PV sky becomes smaller, the correlation coefficients increased, and hence the accuracy of DOM-Vis was improved.Figure 4   NC-FC1 and NC-FC2 correlated well with those obtained with the Vaisala scatterometer, with correlation coefficients of 0.86 and 0.85, respectively, both of which were statistically significant at the confidence level of 95 % according to the student t test.The mean absolute relative error was 34 % for NC-FC1, and 33 % for NC-FC2.According to the result of paired t test, the mean difference was not significantly greater than zero (p = 0.21735 and 0.44534), indicating that, at the confidence level of 95 %, there was no significant difference between the results provided by DOM-Vis and Vaisala scatterometer.It was observed during the tests that PV sky could be significantly reduced when the camera zoomed in at FC1 or FC2 to increase the size of the target in the scene so that the pictures looked similar to those taken at NC. Therefore, to achieve the best performance of DOM-Vis, it is recommended to use the same type of cameras, the same settings, and apply optical zoom in the far camera to make near and far pictures look similar.

Nighttime field tests
During the nighttime tests, the pixel values were obtained for the illuminated window in the pictures taken at the near and far locations.The changes in PV of the window in the near and far pictures were used to quantify the nighttime visibility.These results show that it is feasible to use this method to monitor visibility during nighttime but with lower accuracy than during daytime.Under high visibility conditions (e.g., visibility > 20 km), the light extinction along the path between the two locations was so little that the difference between N 1 and N 2 is not significant.The uncertainty in detecting the radiance from the lighted window (in lieu of pixel value) may result in very close N 1 and N 2 or even N 1 < N 2 , which, as a consequence, would result in very large values or negative values for calculated visibility.Therefore, those erratic results were excluded from the data shown in Fig. 5.When the visibilities measured with Vaisala scatterometer (i.e., reference visibility) were less than 10 km, the mean absolute relative error was 44 %.When the visibilities were larger than 10 km, the average absolute relative error was 51 %.

Discussions
The performance of DOM-Vis is influenced by a number of factors.This section quantitatively evaluates the errors that might possibly be associated with key operational and field conditions, as well as suggests ways for optimally deploying cameras and taking pictures during the execution of DOM-Vis.

Zoom
During daytime, a constant sky radiance is assumed along the same direction: N w0 = N w1 = N w2 = N sky .Therefore, the radiance of the sky light reaching the far camera should be the same as that reaching the near camera.Consequently, when both cameras set the same aperture size and exposure, in theory, the corresponding pixel values of the sky background in the two pictures should also be the same, which is independent of the zoom.However, in reality, the pixel values of both the sky background and the target were observed to be slightly affected by the relative sizes of the sky background and the target in the picture when different zoom settings were applied.The mainstream digital camera brands available on the market (Minolta, Canon, Sony, and cell phone cameras) were tested, and the above phenomenon was consistently observed.It was speculated that commercial digital cameras adopt a function that automatically adjusts the relative brightness of the contrasting objects within the same picture to make them visually appealing, even under manual operation mode.Figure 6a and b are pictures taken by one camera aiming at the same target at the same location with different zoom settings.The target appears much bigger when zoomed in on(Fig.6b); as a result, the pixel value of sky background went up higher in the same direction.In field applications, in order to minimize the errors caused by the above-described phenomenon, the zoom needs to be adjusted to make the sky background and the target appear as similar as possible in the pictures.Once the exposure and aperture size are fixed, it does not matter how far or close the objects appear as long as they look similar in the images (unpublished data).

Exposure
In this method, the atmospheric visibility is calculated by determining the change of contrast using the PVs of the pictures taken by the near and the far cameras.The PV is a function of light exposure, relying on the exposure time and aperture size.As long as the far camera and the near camera take pictures under the same exposure time and aperture size, in theory, the visibility determined using this method is independent of the exact value of exposure.In other words, the visibilities measured with different exposure times should be the same provided the exposure time and aperture size hold the same values for both cameras.Figure 7 shows the visibilities measured at two exposure times.The x coordinate of each data point is the visibility measured by DOM-Vis, but the pictures were taken at a long exposure time.The y coordinate indicates the DOM-Vis result obtained under the same condition except that the picture was taken at a short exposure time.The actual exposure times selected were determined by the ambient lighting condition when the pictures were taken.For example, when it was sunny, shorter exposure times such as 1/400 s and 1/500 were selected for "long exposure time" and "short exposure time".When it was dark, longer exposure times such as 1/50 and 1/100 were selected for "longer exposure time" and "short exposure time".Therefore, the actual exposure times of data points shown in Fig. 7 covered exposure time from 1/25 to 1/800 s.It demonstrated that the results were consistent especially when the visibility fell below 10 km.For visibilities in the range of 0 to 30 km, the correlation coefficient between the visibilities determined at two different exposure times was 0.83 for near camera and far camera two.
One observation was that, under low visibility conditions (< 7 km), the above correlations held better than for high visibility conditions.The reason is that as visibility increases, the atmospheric extinction becomes smaller, resulting in lower light attenuation along the path from the near camera location to the far camera location, causing larger relative error when quantifying the difference in target/sky contrast from the two pictures.

Distance between the two cameras
DOM-Vis quantifies visibility by determining the difference in target/sky contrasts captured by the near and far cameras.Therefore, it is important to generate sufficient extinction of light between the two locations so as to achieve a good signal-to-noise ratio (S/N).According to Beer-Lambert law, the extinction depends on the length of optical path and extinction coefficient.Under high visibility conditions, to achieve a good S/N, the distance between the two camera locations should be increased.The below example gives a step-by-step illustration of how this minimum distance is calculated: under the conditions that (i) for the near picture, the PVs of the sky background and target are 180, and 50, respectively; (ii) the uncertainty of PV, defined as the standard deviation of PVs within the selected homogenous area of the target or background, is 1, so the PV of the target is 50 ± 1.
To achieve an S/N of 10 or higher, the PV of the target in the far picture should reach 60 or above.If the visibility is 10 km, the minimum distance between the two camera locations should be 100 m.
Nevertheless, if the distance is too large to stay within the optical zoom range of the camera, the two pictures would not look similar.Therefore, the maximum magnification of the zoom lens determines the maximum distance by which the two cameras can be separated.As long as the distance between the two camera locations falls between the minimum distance determined by the actual visibility and required S / N, and the maximum distance determined by the zoom range, the visibility quantified using DOM-Vis is independent of the actual distance as suggested by Fig. 8.
Figure 8 summarizes the results of a test during which two groups of measurements were compared under the same conditions except for the distance between the two camera locations.One set of measurements was carried out at the distance of 200 m between the near camera and the far camera (NC-FC1), and the other 300 m (NC-FC2).The values of visibility measured under NC-FC1 and NC-FC2 conditions correlate well, with a correlation coefficient of 0.78 (statistically significant at the level of significance of 0.05).In particular, under low visibility conditions (e.g., visibility < 5 km), the correlation was better.This confirms the afore-stated independence of visibility on distance.
Atmospheric visibility could be quantified with two digital cameras taking pictures of the same target along the same line of sight.This method was developed based on the contrast of the target and sky background in both pictures.Provided that the camera settings and distance between the two camera locations are carefully selected, there is no need to make blackbody assumption for the target, nor the need to obtain knowledge of the actual distances from the cameras to the target.In addition, no instrumental measurement for calibration is required.These features make DOM-Vis more adaptive than traditional methods during field implementation.Its capability for quantifying visibility during nighttime is also demonstrated.

Highest and lowest visibilities DOM-Vis can detect
In this method, pictures of the target with its sky background are taken by both far and near cameras.The difference of the target/sky contrasts in both pictures is quantified to calculate visibility.Therefore, it requires that the target can be discerned from its background in both pictures.So the visibility should be larger than the distance between the far camera and the target.The highest visibility DOM-Vis can quantify, however, depends on the distance between the two cameras and the inherent contrast between the target and its sky background.Determining the upper limit of visibility for DOM-Vis is a sort of inverse calculation of that described in Sect.5.3.Here is an example calculation: -Conditions: (i) the distance between the two cameras X 2 = 200 m; (ii) threshold contrast = 0.02; (iii) the PVs for the sky and target in the near picture are 180 and 50, respectively; (iv) uncertainty of PV is 1; (v) the minimum S/N ratio is 10, which means the PV of the target in the far camera is 60.
-Calculation: using the camera response curve and PVs of 180/50, 180/60 for sky/target in pictures taken by near and far cameras, the ratios of N b2 /N w2 and N b1 /N w1 are calculated to be 0.1617 and 0.1274, respectively.Substituting X = 200 m and N b2 /N w2 = 0.1617 and N b1 /N w1 = 0.1274 into Eq.( 9), we have visibility = 19 482, which is the highest visibility DOM-Vis can determine under the above conditions.

Two cameras vs. one camera
DOM-Vis quantifies visibility from the change of target/sky contrast in the two pictures taken at two distances.This makes it more accurate than the one-camera digital photographic method that usually assumes the target as blackbody.To demonstrate the advantages of DOM-Vis, 10 couples of pictures were selected, which were taken under visibility from 2 to 17 km as measured by the Vaisala scatterometer.Those pictures were analyzed with both DOM-Vis and the traditional one-camera digital photographic method using the pictures taken by FC1 (1000 m from the target).It was shown that DOM-Vis and one-camera method provided consistent results under low visibility conditions (visibility < 5 km).However, when visibility went up, one-camera method underestimated visibility (Fig. 9).With the measurements from Vaisala scatterometer as the reference, the average relative errors from DOM-Vis and one-camera method are 4 and 22 %, respectively.

Summaries
As demonstrated by the tests described above, DOM-Vis has the ability to quantify atmospheric visibility during both daytime and nighttime.It does not require pre-calibration or assume the target to be a blackbody.However, it does require the target to be dark with sufficient contrast against its sky background.In addition, it requires the two camera positions and the target to be in the same straight line.Despite these limitations, DOM-Vis provides an alternative method to quantify atmospheric visibility that is low-cost, adaptive and able to work at night.

Figure 1 .
Figure 1.Schematic describing DOM-Vis takes pictures of a target at distances of X 1 and X 2 during daytime (A) and nighttime (B).

Fig. 1 .
Fig. 1.Schematic describing how DOM-Vis takes pictures of a target at distances of X 1 and X 2 during daytime (A) and nighttime (B).

Figure 3 .Fig. 3 .
Figure 3. Locations of the target and camera sites for daytime and nighttime field tests480

Figure 4 .Fig. 4 .
Figure 4. Comparison of Vaisala scatterometer measurements to DOM-Vis results from 486 shows comparison of the 51 results from DOM-Vis and Vaisala scatterometer under the condition that the PV sky < 1.The results of DOM-Vis from both www.atmos-meas-tech.net/6

Figure 6 . 494 Fig. 6 .
Figure 6.Digital images of the same target in the same location with different zoom 493

Fig. 7 .
Fig. 7. Comparison between DOM-Vis results obtained at different exposure times.

Figure 9 .Fig. 9 .
Figure 9.Comparison of DOM-Vis and one-camera digital photographic method 501 Fig. 9. Comparison of DOM-Vis and one-camera digital photographic method.

Table 1 .
Correlation of DOM-Vis and Vaisala scatterometer measurements for different PV sky values.