1. Introduction
The prevalence of sensor rich smartphones and high-speed wireless data connections has opened the door for low cost, large-scale data collection. Several studies have already demonstrated how smartphone sensors can be used to crowdsource atmospheric aerosol concentration, air temperature, seismic activity, and weather [
1,
2,
3,
4,
5].
In the oceanographic and limnological communities, the use of citizen science as a method of data collection is not well established. This is partially due to the lack of tools that are both robust and easy for citizen scientists to acquire and use. Many low cost tools for studying water quality require a significant initial time commitment (e.g., building a waterproof housing, constructing a Secchi disk, soldering electrical components, etc.). Our aim was to produce a simple yet robust mobile application that can be used for crowdsourcing water quality data. Ideally, the application should require a low commitment, yet produce results comparable to traditional water quality methods. The result was the HydroColor water quality application (available for iOS and Android devices).
HydroColor uses a smartphone digital camera as a three-band radiometer. The light intensity measured in a series of three images is used to compute the above water remote sensing reflectance (Rrs) in the red, green, and blue color channels of the camera. We show that a camera can be a viable light sensor, and that smartphones are particularly well suited for this application. The reflectance measured by HydroColor was directly compared with remote sensing reflectance measurements from precision radiometers. Additionally, the remote sensing reflectance was used to estimate water turbidity. The reflectance measured by HydroColor also has the potential to provide information on chlorophyll and dissolved organic matter.
Other studies have demonstrated working methods to measure water quality using a digital camera [
6,
7]. These previous studies used a digital camera fitted to a tube that extended below the surface of the water. The color of the images was used to estimate the concentration of chlorophyll and dissolved organic matter. The HydroColor application distinguishes itself from the previous studies in that it measures actual radiometric quantities instead of analyzing image color. Although this research focuses primarily on the HydroColor application, the methods described in this paper could be applied to virtually any digital camera.
The advantage of a reflectance based measurement is the direct comparability to measurements routinely made from other remote sensing platforms. Satellite remote sensing in particular has become an invaluable tool for oceanographers and limnologists [
8]. HydroColor can complement these measurements by providing comparable ground based measurements. Therefore, the data produced by HydroColor can be aligned with the existing scientific goals of several earth observation programs.
2. Materials and Methods
The HydroColor application requires a smartphone, a photographer’s 18% reflectance gray card, and access to optically deep water. Optically deep refers to a water depth where light reflection from the bottom does not influence the water leaving radiance. The smartphone must be equipped with a digital color camera, compass, and gyroscope. An internal Global Positioning System (GPS) and a data connection are beneficial but not required. These components are standard in all modern smartphones.
The digital camera is the component used for sensing the environment. The other required sensors are used for auxiliary data that aids in the collection of images. The resolution of the camera is not critical to the radiance measurement. However, the resolution will have an effect on the field of view seen by the HydroColor application. The internal Bayer filter contained in the color camera consists of an alternating pattern of red, green, and blue (RGB) filters. This allows the camera to measure light intensity in broadband RGB.
A compass and gyroscope are needed to orient the camera in the correct position to capture images. These sensors are present in most modern smartphones. The azimuth and zenith angles of the camera are critical for HydroColor to properly remove surface reflected light that enters the camera. The HydroColor application uses the compass and gyroscope to create an interactive display that guides the user to the correct azimuth and zenith angles for each image. The angular requirements of the images are described in the next section.
An internal GPS and data connection allows the smartphone to automatically acquire the user’s latitude and longitude. The user’s location and the Coordinated Universal Time (UTC) are used to determine the position of the sun. The sun position is used to direct the user to the correct azimuth angle for image collection. The user also has the option to enter their GPS coordinates manually. Thus, an internal GPS or data connection is not required to use the application.
HydroColor requires a surface of known reflectance to measure the downwelling irradiance. We found that a photographer’s 18% reflectance gray card was a suitable low cost reflectance standard. Gray cards are widely available online and in photography shops, typically for less than
$10 USD. Several previous studies have also used gray cards as reflectance standards [
9,
10]. While the standard gray card is 18% reflectance across the visible spectrum [
11], cards with other reflectance values are available. Therefore, it is important to ensure the gray card reflectance is labeled as 18% before using it with the HydroColor application. In custom applications of this method, any surface of known reflectance can be used provided it is a Lambertian reflector and its reflectance value is used in the computation of remote sensing reflectance.
2.1. Image Capture
To clarify the image capture procedure, the equation used to calculate above water remote sensing reflectance must be introduced. The following equation from Mobley [
12] is commonly used to determine the remote sensing reflectance from above water radiometers:
where
Lt is the radiance leaving the water surface,
Ls is the sky radiance,
Rref is the irradiance reflectance of a reflectance standard (0.18, for the 18% gray card used here),
Lc is the measured radiance leaving the reflectance standard, and
ρ is the sea surface reflectance factor. For clarity, the angular and spectral dependence of these quantities has been dropped (see
Table 1 for list of abbreviations and notations).
Note that the denominator is equal to the downwelling irradiance (Ed). By measuring the radiance of a reflectance standard, the downwelling irradiance can be measured without the use of a cosine collector, assuming the standard is a Lambertian reflector. One radiometer can be used to make all the required light measurements in Equation (1). The benefit of using one radiometer is that any scaling factor or multiplicative error cancels out in Equation (1). Therefore, the radiometer needs no absolute calibration. This is an important consequence of Equation (1), and is the key to HydroColor’s ability to measure remote sensing reflectance without the camera being calibrated to measure radiance.
The value for
ρ has been determined using HydroLight, which is a radiative transfer software used for modeling above and below water radiance distributions. The specific value of
ρ varies with environmental conditions and observation angle; however, the HydroColor application is programmed assuming a sun in a clear, cloudless sky. For custom applications, other sky conditions could be used, and the value of
ρ adjusted accordingly. To minimize the amount of surface reflectance, and thus
ρ, the water surface radiance (
Lt) should be measured at an azimuth angle 135° from the sun and 40° from nadir. Under ideal conditions, the value of
ρ is approximately 0.028 for these angles. See Mobley [
12,
13] for an in-depth discussion of the dependence of
ρ on viewing angle and sky conditions.
To fulfill the radiance requirements of Equation (1), three images must be captured. An image of a gray card is needed to determine the card radiance (
Lc), an image of the sky is needed determine the sky radiance (
Ls), and lastly, an image of the water is needed determine the radiance from the water surface (
Lt) (
Figure 1). Care should be taken to avoid capturing a water or gray card image that is shaded by a boat, dock or any other structure. Additional recommendations for collecting HydroColor measures can be found in
Appendix A.
Even though the surface reflection cannot be eliminated, it can be significantly reduced by collecting the water image at an angle of 135° from the sun and 40° from nadir. HydroColor collects a water image at these specific angles by taking advantage of the smartphone’s clock, GPS, compass, and gyroscope.
HydroColor uses the current GPS coordinates and the current UTC time to determine the position of the sun in the sky. HydroColor puts this information into a simple sun position model that runs onboard the phone [
14]. HydroColor uses the resulting sun azimuth angle to create a compass display. The compass display guides users to point the phone ±135° from the plane of the sun. The sun zenith angle is not used; however, it is saved along with the rest of the data. It can be used later for quality control.
The gyroscope measures pitch, yaw, and roll of the phone. HydroColor uses the pitch and roll function to create an inclinometer display alongside the compass display. The inclinometer display guides users to position the phone 40° or 130° from nadir, for the water and sky images, respectively. The exact angle of the phone is saved in the HydroColor metadata when each image is captured. Therefore, the metadata can be used to ensure the images were captured at the correct angle.
2.2. Extracting Radiance from Images
A digital smartphone camera, while not meant to be a quantitative environmental sensor, can be used to measure light intensity. Most smartphone cameras use a complementary metal-oxide semiconductor (CMOS) as the light sensor. In the HydroColor application, light intensity is extracted from compressed images captured by the camera. Ideally, raw data from the CMOS sensor should be used. However, due to limitations of the standard application program interface (API) of common smartphones cameras, compressed image data are used. Compression introduces some nonlinearity into the camera response. However, it was found that light measurements were not greatly influenced by image compression (
Figure 2). HydroColor measures relative light radiance using the following equation:
where
DN is the digital pixel value (0–255) from the camera image in either the red, green, or blue channel,
is the exposure time, and
S is the ISO speed. Aperture does not appear in the equation since the aperture is fixed for standard smartphone cameras. White balance of the camera does not appear because it is automatically locked by the HydroColor application at the beginning of each image collection sequence. Equation (2) is applied separately to each RGB channel to determine the relative radiance in each of the three channels.
To compare HydroColor measurements from different devices, the spectral sensitivity of the RGB channels must be similar between devices. Sensitivity curves for each device were acquired by recording the digital pixel values (0–255) returned by the camera while viewing the variable wavelength light source of a Cary 500 spectrophotometer. Light output from the spectrophotometer was varied from 400 to 700 nm at 1 nm intervals. A diffuser was placed between the camera and the light source to prevent pixel saturation. The exposure time, ISO speed, and white balance of the cameras were held constant during the spectral sensitivity measurement. The digital pixel values were recorded onboard the smartphone using a custom program. The resulting pixel values were smoothed using a 20 nm running average, then normalized by the largest recorded value in each channel.
2.3. Calculation of Remote Sensing Reflectance
Once the images are collected, they are processed onboard the phone to provide the remote sensing reflectance. To decrease the uncertainties of the measurements, the RGB pixel values from a 200 × 200 pixel region at the center of the image are averaged. The position of this region is highlighted when measurements are taken so that the user can minimize interferences by shadows and clouds. The average values are used to calculate the relative radiance using Equation (2). The relative radiances are used in Equation (1) to calculate the remote sensing reflectance.
As discussed previously, any scaling factor cancels out in Equation (1). Therefore, the camera needs no absolute calibration. All that is needed to calculate Rrs is a quantity proportional to radiance. The proportionality between the actual radiance and the camera’s measure of relative radiance is likely to change with cleanliness of the lens, age, temperature, and device manufacturer. However, because the three images are all taken using the same device in a short period of time (less than a minute typically), these errors cancel out in the calculation of Rrs.
2.4. Measuring SPM from Remote Sensing Reflectance
The concentration of suspended particulate matter (SPM) in the surface water has a direct and nonlinear effect on reflectance. SPM represents the concentration of all suspended particles, including organic and inorganic particles. Water is typically the dominating absorber in red wavelengths, leaving the red reflectance to be governed mostly by SPM concentration (via scattering). Chlorophyll does have an absorption peak at 676 nm, however, this peak falls nearly outside the red sensitivity curve of the camera. Indeed, both red and near infrared wavelengths are often used for satellite SPM algorithms [
15,
16]. Similarly, the change in reflectance associated with increasing SPM concentration can be detected in the HydroColor
Rrs red channel.
2.5. Field Tests
Field data were collected in three different campaigns. The first campaign was designed to compare HydroColor measurements to precision radiometers and turbidimeters for a wide range of water types. The second campaign was a volunteer driven HydroColor collection day, to demonstrate HydroColor as a citizen science tool. The third campaign was a brief comparison of HydroColor measurement from Android and Apple devices.
In the first campaign in 2013, field data were collected at three locations: the Columbia River mouth, the coast of Maine, USA, and the coast of Georgia, USA. Data were collected during the summer months under a variety of meteorological conditions, ranging from clear sky to fully overcast. An Apple iPhone 4, iPhone 5 or iPod touch where used to collect HydroColor measurements. Measurements were made under calm conditions where wind speed was less than 5 m s−1. The measurements were made in coastal case II waters where CDOM and mineral particles greatly influenced the water leaving radiance. Coastal Georgia measurements contained the highest amounts of mineral particles compared to the other study sites. Nearly all the field sites were influenced by freshwater input. HydroColor data were collected in parallel with an above water radiometer and a turbidimeter. The concurrent data were used to validate HydroColor’s calculation of Rrs and provide a calibration for the measurement of turbidity.
A total of 63 HydroColor measurements collected during the first campaign were accompanied by measurements with a Water Insight Spectrometer (WISP). Both HydroColor and the WISP are designed to measure Rrs. using the same method. The WISP uses three spectrometers to measure Lt, Ls and Ed. Therefore, the WISP served as a convenient instrument to determine the accuracy of HydroColor. To ensure the most accurate results, the WISP was vicariously calibrated to agree with recently calibrated Satlantic Hyper-Pro radiometers.
Rrs was calculated from WISP data using Equation (1), where E
d replaced the denominator. To compare the WISP hyperspectral
Rrs with HydroColor broadband
Rrs, the WISP spectra were averaged using the spectral sensitivity curves in
Figure 3 as weights:
where
Rrs(
λ) is the
Rrs value measured by the WISP at wavelength
λ,
wi(
λ) is the relative camera sensitivity in color channel
i at wavelength
λ (from
Figure 3), and
Rrs(
i) is the
Rrs value that would result if the WISP had the same spectral sensitivity as color channel
i.
In this study, we used turbidity measured in nephelometric turbidity units (NTU) as a proxy for SPM concentration. Turbidity was measured using a Hach 2100Q portable turbidimeter. Using turbidity simplified the methodology and was a convenient choice since it is used by many environmental monitoring agencies. The turbidity dataset is made up of 58 different measurements collected on an iPhone 5, iPhone 4 or iPod touch. The turbidity measurements were made at the same study sites as the radiance measurements.
The second field campaign consisted of HydroColor measurements collected by volunteer citizen scientists. San Francisco Bay National Estuarine Research Reserve members organized volunteers to collect HydroColor measurements and water samples on 24 July 2014. In total, 14 measurements were collected along the shores of San Francisco Bay. Volunteers were spread over a large area of the bay spanning a wide range of turbidities. It is likely the measurements also spanned a wide range of chlorophyll and CDOM concentrations. SPM concentrations of the collected water samples were measured by filtration and gravimetric analysis. Sky conditions were partly cloudy.
The third field campaign was a device comparison between Apple iOS and Android based smartphones. This comparison was conducted at several sites around the Seattle, WA, USA area on 21 May 2017. HydroColor measurements from an iPhone 4, iPhone 5, iPhone 6, HTC One M8, Nexus 5 and a Galaxy S5 where collected sequentially at five different field sites. The field sites ranged from low turbidity water in Lake Washington and Puget Sound, to moderately turbid waters of the Duwamish and Puyallup rivers. Sky conditions were clear. The same gray card was used for all measurements, unlike the previous two campaigns. The reflectance and turbidity values measured by each device were compared to ensure HydroColor results were similar between a wide range of devices and operating systems.
4. Discussion
This study has demonstrated how a digital camera can be used as an aquatic remote sensing device. Smartphones are particularly well suited for this application because they contain a multitude of additional sensors. The HydroColor application can measure Rrs in the red, green, and blue portions of the visible spectrum within 26% of a precision radiometer. Using the RGB Rrs, various water quality parameters can be inferred. This study demonstrates that turbidity can be estimated, however, users can use the RGB reflectance to develop their own regional or global algorithms. While we do not think that a global algorithm for chlorophyll can be derived from HydroColor (e.g., using the green/blue reflectance ratio), due to variability of CDOM, it may be possible to derive a local algorithm that will work at a specific time and location.
HydroColor’s ability to measure reflectance accurately will depend on environmental conditions. Sea surface roughness can have a large effect on the value of
ρ. When the surface of the water is sloped, an observer or detector is viewing a different portion of the sky than what is seen on a level surface. Currently HydroColor does not obtain any information on wind speed or sea state. Therefore, this is a known source of error in the calculation of
Rrs. The sensitivity of
ρ to wind speed is a function of sun zenith angle and sky condition. As the sun is higher in sky, the influence of wind speed on
ρ becomes greater. At a sun zenith angle of 30° and a wind speed of 15 m s
−1,
ρ can be as large as 0.05 [
12]. This can lead to substantial error in
Rrs. Therefore, it follows that HydroColor should not be used in windy conditions where the sea surface is choppy. For purposes of this study, measurements were made in calm conditions and the value of
ρ was assumed to be constant at 0.028. This is an accurate value of
ρ for wind speeds less than approximately 5 m s
−1. We observed that the most accurate data were collected under perfectly clear or homogeneously overcast skies, the cases modeled by Mobley [
12]. See
Appendix A for additional tips on using HydroColor.
It should be noted that inaccuracies in Rrs due to sky conditions and a never truly known ρ value are not unique to HydroColor measurements. We have shown that a smartphone camera is able to measure a quantity proportional to radiance. Thus, the difficulties in minimizing surface reflectance and determining a correct ρ value for the calculation of Rrs are inherent to even the most well calibrated above water radiometers systems.
Several improvements to the HydroColor application remain to be included. A large improvement to the application would be a better estimate of uncertainty. For example, examining the variability in an image, or in a series of images, could provide more information about meteorological conditions. The image variability could be an indicator of cloud cover or water surface roughness. This could be used to alert the user when conditions are not suitable for HydroColor measurements. Another improvement would be to make the sea surface reflectance factor (ρ) dynamic. This value could be adjusted based on results of image processing or weather data collected via the phone’s data connection. The use of raw camera data, instead of compressed data, would improve HydroColor’s ability to measure relative radiance. This feature will likely be implemented in the near future as new smartphone software and hardware features become available. Lastly, the HydroColor application uses a fixed number of pixels at the center of each image. Smartphones cameras have a wide variety of resolutions. Therefore, using a fixed area instead of a fixed number of pixels would help ensure the field of view of the camera is the same between devices.
HydroColor has the potential to make a large impact on both scientific and educational communities. Before the release of this application, such a simple and low cost method for measuring above water reflectance (and the derived turbidity) did not exist. The HydroColor application now allows citizen scientists to collect objective water quality data without the need for water samples, expensive instruments, or upfront time commitments. The data collected by HydroColor would complement already existing crowdsourcing efforts as well as ocean color remote sensing measurements. When coupled with Secchi Disk measurements and measurement using the Forel–Ule scale, for which mobile applications and cheap sensors exists [
24,
25,
26], HydroColor can provide a different, and human-eye independent measurement of the water quality. Since all three are dependent on slightly different water properties, together they can better constrain water optical properties such as scattering and absorption. They can be used in concert as a quality check, as we would expect blue water based on Forel–Ule scale to have a high blue reflectance in the HydroColor application.
HydroColor has the additional advantage that the measurement tool and method are standardized across the globe. Smartphones are found worldwide, and they predominately contain hardware similar to what is described in this study. Assuming HydroColor is used correctly (which can be confirmed by examining the measurement metadata), the measurement method will have a high degree of consistency.
HydroColor also has value as an educational tool. Many students already own smartphones. Therefore, the infrastructure for wide scale educational application of HydroColor is already in place. HydroColor would be well suited as a teaching tool in environmental monitoring, oceanography, limnology, optics, and remote sensing classes. HydroColor can also be used as a public outreach tool, as the application can show people how a tool as simple as their camera can help them learn about their environment.