VISIBILITY MONITORING USING MOBILE APPLICATION

Visibility is clarity with which the distant objects are perceived in the atmosphere with the naked eye. Visibility monitoring is an important concern in health, environment and transport safety context. Quantitative measures of visibility are increasingly becoming important in various areas as they are representative of the particles present in the environment that causes degradation of the visibility. Existing techniques of visibility estimation employ human observers, optical instruments, chemical sensors or combination of some of them. These techniques suffer from poor spatial and temporal resolution, high cost of installation and maintenance, need of specialized personnel, continuous power supply requirement and difficulty in portability. We propose a smart phone-based visibility monitoring system which estimates air visibility/quality in terms of a quantitative measure: Turbidity. In principle, the application calculates turbidity as difference of intensity of captured sky image and analytical value of sky luminance obtained by implementing Perez model. The estimated turbidity tagged with date, time, location, solar position and luminance is sent to the backend server generating consolidated database for mapping of turbidity and generating various analytical reports. The application can easily be deployed to be used by large number of people facilitating citizen science. The results from application were validated against the observations from SAFAR INDIA application at different stations in Ahmedabad, dates and under variable weather conditions.


I.INTRODUCTION
Air quality varies from place to place, as per seasons and according to geography of the place. Both natural phenomena and human activities play a decisive role in defining the quality of air. The main cause of air quality degradation is the atmospheric pollutants in the form of haze aerosols. These are the tiny particles suspended in air changing the hue of the air. Due to the scattering or absorption of sunlight by these pollutants, sky appears to be of different hues and colours. The source of this particulate matter can be natural like dust, fog, smog, haze, volcanic eruption etc., and/or manmade like combustion of fuel, pollution, urbanization, population, etc. Besides hazardous ill effects on health, air quality degradation has a prominent effect on visibility through the atmosphere. The term 'visibility' is variously defined in literatures, but generally indicates the distance to which human visual perception is limited by atmospheric conditions. S. Poduri refers to atmospheric visibility as "the clarity with which distant objects are perceived by naked eyes" [1] I. Tombach defines the visibility as "The primarily term based on human perception to be related to the air clarity between the target which is viewed and the observer and also based on the background and target colors, the position of the sun, shadow, light etc., and variety of other physical and psychological factors" [2]. In [3], R. R. Mali describes visibility as "air transparency in the horizontal direction and represents the maximum distance that one can see through the atmosphere at any given time" . Monitoring of visibility is an important task which needs to be performed precisely and regularly, particularly for the areas sensitive to hazards owing to low visibility like air traffic control, road accidents control and many more. Statistics show that one of the frequent factors leading to accidents is poor visibility (ncrb.gov.in). Poor visibility is also indicative of presence of aerosols that are harmful for health. So, there is a need to develop methods for real time visibility monitoring and in turn supervise air quality. Accordingly, quantitative measures of visibility are increasingly becoming important because quantitative measures are representatives of particles present in the environment that causes degradation of the visibility. Visibility can be quantitatively measured by two parameters namely meteorological range and turbidity. Meteorological range is "The distance under daylight conditions at which the apparent contrast between a black target and its background (horizon sky) becomes equal to a threshold constant of an observer" [4]Turbidity is "the ratio of the optical thickness of a hazed path to the optical thickness of the clean path in atmosphere when there are no molecules" [4].Although turbidity is a great simplification of the true nature of the atmosphere, atmospheric scientists have found it a practical measure of great utility as it does not require complex instrumentation to estimate turbidity. Currently, the visibility monitoring or air quality estimation processes employed widely can be categorized as optical, view and particle monitoring processes. Optical monitoring methods measure the visibility by looking at optical condition of the atmosphere. Transmissometers and nephelometers are the devices used to monitor the optical quality of the atmosphere [5]- [7].Transmissometers measures how much light can be transmitted from a calibrated incandescent light source through the atmosphere over a known distance. Nephelometers measure the amount of light scattered by gases and particles in a small portion of atmosphere. Particle monitoring detects the pollutants present in the atmosphere using specific sensors. These sensors characterize the chemicals present in the air [8] View Monitoring: Transmissometers and particle monitors only sample a small part of the scene while view monitoring uses the photographic system to study the scene as a whole. The photographic system consists of a camera, lens, camera databack and timer. It characterises the appearance of a specific scene and the presence of haze [9]- [17]Hybrid method is the combination of the particle, optical and scene. The techniques employing fixed camera in scene monitoring methods fail to take observation at night. The instruments deployed for optical monitoring are expensive and need skilled personnel to be operated and capture observations for a limited area. Sensor based techniques employing particle monitoring suffer from high cost of installation and maintenance. The observations are affected by change in field view due to traffic and the sensors need constant power supply. Moreover, sensor installation is sparse and their relocation is also very difficult because of their size and weight. Precision of sensors employed in particle-based monitoring is inconsistent depending on the electric equipment used. Nowadays mobile phones equipped with high resolution digital cameras, extensive storage capacity, exceptional computing power offers a massive yet ubiquitous infrastructure for various scientific and commercial applications. Additionally, capabilities of smart phone in the form of sensors provides a support to estimate real time parameters like latitude, longitude, orientation, time etc. Motivated from this scenario, this paper proposes a low-cost solution for reporting and mapping turbidity as a quantitative measure of atmospheric visibility. Using the mobile application, real time visibility data can be generated at varied spatial and temporal resolution creating consolidated database for further analysis and decision making by administration. This paper presents the theoretical framework, implementation details, and results of testing and validation.

II.THEORETICAL FRAMEWORK
Atmospheric turbidity in principle is estimated by matching the scaled luminance obtained from empirical models of sky appearance with observed intensity value of sky image captured through mobile phone camera. The seven well known sky luminance distribution models have been proposed namely-Brunger model, Matsuzawa model, ASRC-CIE model, Perez model, Perraudeau model, Harrison model and Kittler model [5]. Of these models, Perez model is found to work under different weather conditions [18]. Therefore, we zeroed down on implementation of Perez model. During acquisition phase, image of the sky is acquired and the real time parameters like latitude, longitude, time and focal length of camera registered. Android's orientation API's are used to estimate zenith and azimuth angle of the camera. The latitude, longitude and timer are used to estimate the zenith angle and azimuth angle of sun and sky and angle between sun and sky. Using these parameters, sky luminance is determined. This measured luminance is matched with the observed intensity value of the sky element captured. Figure 1 depicts the components utilised to estimate the turbidity. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLII-5, 2018 ISPRS TC V Mid-term Symposium "Geospatial Technology -Pixel to People", 20-23 November 2018, Dehradun, India

Implementation of Perez model
The first step towards luminance determination is finding solar position. The flowchart for the same is shown in Figure 2. and 13 respectively. The relative luminance lp of a sky element is a function of its zenith angle θp and the angle γp with the sun and is given by Equation 14 Where the 5 constants a, b, c, d, e specify the current atmospheric conditions, and all angles are expressed in radians [19]. Each of the parameters has a specific physical effect on the sky distribution and with different values they can capture a wide variety of sky conditions. For clear skies, the constants take on the following values: a =−1, b=−0.32, c =10, d =−3, e=0.45. Scaled luminance (Equation 16) is evaluated as ratio of true luminance to zenith luminance (Equation 15).

Turbidity estimation
Visibility is estimated by matching the scaled luminance ratio (f) with the observed image intensity values at sky pixels Intensity I is computed from RGB values using the CIE standard formula I = 0.2126R+0.7152G+0.0722B. Turbidity t is estimated as the value that minimizes the sum of squared error between measured intensity and the analytic luminance value as obtained from Perez model over the set P of sky pixels (Equation 18). k is the constant factor between the image intensity I and f at each pixel.

III.IMPLEMENTATION ENVIRONMENT
The application calculates the visibility in the form of turbidity. The turbidity encodes the amount of scattering in the atmosphere, so the lower the t, the clearer the sky. On execution of application the welcome screen with the tabs for capturing the scene, help and viewing history data FIGURE 4An alert to put on the GPS of the phone appears if it is off Figure 5(a) Location can be implicitly taken by GPS of the phone or can be manually entered by the user by interactively selecting from the phone Figure 5(b). To ensure that only the sky image is taken, the image is captured at an orientation angle greater than 130 0 . The capture button will be activated only at this angle The user is provided with the option to capture the relevant area of the scene captured .i.e., facility to crop the image is provided Zenith luminance Lo= (1+a·e(b/ cos(0)))(1+c·e(d·cos(θs)+e·cos 2 (θs)) Scaled luminance f(θp,γp,t)=(1+a·e(b/ cos(θp)))(1+c·e(d·cos(γp)+e·cos2(γp)) Intensity Turbidity (t) (t, k) = argmin(t, k) ∑ (Ip − kg(θc, φc, up, vp, t)) 2 p∈P

IV.IMPLEMENTATION ENVIRONMENT
The application calculates the visibility in the form of turbidity. That is the lesser the visibility the more is the visibility and vice versa. On execution of application the welcome screen with the tabs for capturing the scene, help and viewing history data appears FIGURE 4. An alert to put on the GPS of the phone appears if it is off Figure  5(a). Location can be implicitly taken by GPS of the phone or can be manually entered by the user by interactively selecting from the phone Figure 5(b). To ensure that only the sky area is captured, the capture button is activated only when the orientation angle of the camera is around 130 degree. Cropping facility is provided as an option to select a relevant area of the i. Azimuth and Zenith angles calculated from our application were found to be consistent with the the web sources with accuracy ranging from 96% to 100 % at different times of day. Comparitive plot of observations for the day 23/04/2018 at irregular time intervals is shown in Figure 9 and Figure 10. Shows the pattern of zenith angle for the date 23/04/2018 at regular intervals of 30 minutes. The minimum value is 13 deegrees at 12 p.m. where the elevation of sun is maximum at 78 degrees. Samsung J7(24 MP). Though the pattern of turbidity obtained was same for the three phones, individual turbidity captured was found to be correlated with megapixels of the camera Figure 12. iii.
Test drive to observe correlation of turbidity with place was performed on 26/04/2018 with Samsung J7 phone. Areas with variable pollution levels were covvered. The range of turbidity observed was only 1.2. Highest turbidity was observed at 100 ft ring road cluttered with traffic and lowest at a small street area of Prernatirth derasar Figure 13. iv.
Another test drive was performed on 21/06/2018 to find correlation between turbidity values of application and Air Quality Index reported at seven SAFAR stations of Ahmedabad by taking concurrent observations from stations as well as application. A correlation of 96% was observed Figure 14.

AQI Turbidity
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLII-5, 2018 ISPRS TC V Mid-term Symposium "Geospatial Technology -Pixel to People", 20-23 November 2018, Dehradun, India

VI.CONCLUSION
A mobile application to measure atmospheric turbidity has been developed and teseted under different weather conditions, locations,devices. The results validated by comparing with air Quality index observed at different SAFAR stations of Ahmedabad city. The application was found to be consistent and accurate.