SMARTPHONE-BASED LIGHT AND SOUND INTENSITY CALCULATION APPLICATION FOR ACCESSIBILITY MEASUREMENT

Nadiyah Johnson1, Piyush Saxena1, Drew Williams1, Ola Claire Bangole1, Md. Kamrul Hasan1, Sheikh Iqbal Ahamed1, and Roger O. Smith2, Dennis Tomashek2

Marquette University1, University of Wisconsin – Milwaukee2

ABSTRACT

Sufficient sound and lighting is necessary for maintaining good quality of life for people with disabilities. It is important for people to have the ability to evaluate these aspects of their environment. Unfortunately, many people do not have access to light meters or sound meters due to their bulky size and cost.

The goal of this project is to develop an easily accessible mobile phone based sound meter and light meter. The mobile application (app), Access Sound, acts as a sound meter which measures the sound level in quiet, moderate, and loud environments.  The measurements are determined by a mathematical model that computes the median of the collected decibel levels in the environment. In addition, the app, Access Light, measures the level of light in the ambient, task and accent settings. Here the light level is computed using an algorithm that calculates the median lux values in the tested area. This mobile application allows disabled people to measure the accessibility of the environment based on the light or sound level information and the outcome of the app. Furthermore, both apps are designed for people with visual or hearing disabilities.

INTRODUCTION

The mobile app prompts the user to choose an environment type from quiet activity, moderate activity, and loud activity.
Fig. 1: The mobile app prompts the user to choose an environment type from these three options.

The environmental accessibility of individuals with impaired vision and sound is significantly affected by the quality of lighting and sound in the environments that surround them.  Poor quality of light and sound leads to a decrease in productivity resulting in an overall decrease in the quality of life. Many studies show the negative impacts of noise and light pollution in everyday life [1][2]. For this reason, it is imperative to quantify environmental lighting and sound levels in order to improve the quality of life of such individuals. The current generation of smartphones provides a vast array of sensors that can be used to create accessibility tools that allows them to determine the suitability of an environment for a person with impaired vision or hearing.  Light Meters in today’s market are available in form of dedicated devices or software that exploits the light sensors in a smartphone. While the dedicated devices provide a higher accuracy compared to the smartphone counterparts the cost and accessibility are their primary drawbacks. Much work has been done in the recent years to improve the accuracy of both. However, there is a new medium between dedicated devices and smartphone applications that integrates a dedicated accessory with the smartphone hardware and software. Devices such and Luxi[3] and Lumu[4] are significantly cheaper than dedicated light meters and provide a more accurate lux reading compared to smartphones. These devices diffuse the incoming light providing a more accurate reading of the environmental lighting conditions. Despite the benefits, these devices add an additional cost and make the smartphone bulky. Our goal is to use a novel solution that overcomes these problems while retaining the accuracy of the measurement. Sound meters on the other hand have been dependent on smartphone hardware and software. The mobile application on smartphones today have the capability of filtering noise and providing accurate sound levels without use of external accessories. The burden of accuracy rests solely on the programming algorithms used. The projects objective is to develop a user friendly interface supported by our novel algorithm and to analyze its accuracy with industry standard dedicated sound meters.

ACCESS SOUND CONTRIBUTIONS

Algorithm 1 Sound Intensity

  • Input: Type of ambient environment.
  • Output: Sound intensity.
  1. Initialization

    a=Duration of sound analysis, b = 15% a,  c=a-b, and d=15+c

  2. For j=0 to d/a do the following
  3.    Set minimum decibel threshold
  4.   minDecibels =  - 60.0 f;
  5.   Call iOS API to capture 100 samples
  6.   For i=0 to 100 do the following
  7.     [Recorder updateMeters];
  8.     Decibels = [recorder      averagePowerChannel:0]+decibels
  9.     End For
  10.   End For
  11. Calculate the average decibels=(Decibels/100)
  12. If decibels < minDecibels Then
  13.   Level = 0.0 f
  14. Calculate the sound intensity having I = 1.8
  15. Decibels = I * (decibels + 85 ) 
  16. Based on sound level selected by the user(quiet, moderate, loud) the decibel value is multiplied by a percentage
  17. If AppDelegate.value == Quiet Then
  18.   decibels = decibels * 0.50
  19. If AppDelegate.value == Moderate Then
  20.   decibels = decibels * 0.80
  21. If AppDelegate.value == Loud Then
  22.   decibels = decibels * 0.90
  23. The decibel value is placed into an arrayappdelegate.soundArray [j+(mainInt*d/a)] = decibels ;

Technical Background

The mobile app displays the median of sound intensity. The data samples are represented  by a bar graph. The decibel values are on the y axis and the samples are on the x axis. The repeat and next button  is below the graph.
Fig. 2: The mobile app displays the median of sound intensity
Sound Level Meters (SLM) measures the sound level in an environment by calculating the frequency weighted pressure of the sound waves which travel through the air from its source. The units of the sound intensity calculated are called decibels. Electronic circuits within the sound meter amplify and filter the sound picked up from the microphone attached to it and produce accurate sound level readings. The sound intensity is calculated using a logarithm based algorithm. The sound intensity is represented by the power of 10 which is expressed as a multiple of the hearing intensity. The following is the standard equation (Eq. (1)) to calculate the sound intensity in decibels [5].

I ( db )= 10 log 10 10 , 000 I 0 I 0  = 10 6 db = 60 db (Decibels equals log based 10 times 10,000 times initial intensity divided by initial intensity). This is the equation used to calculate decibels. (Decibels equals log based 10 times 10,000 times initial intensity divided by initial intensity). (1)

Considering accuracy and reliability, we have selected iOS device for developing our mobile application and for testing the performance of algorithm. Access Sound mobile application can emulate the functionality of SLM devices using the available hardware and software in iOS devices.

ACCESS SOUND ALGORITHM

This is a graph which represents data from Access Sound and a Sound Meter. The decibel amounts are on the y axis and the numbers of trials are on the x axis.
Fig. 3: This is a graph which represents data from Access Sound and a Sound Meter.
The Access Sound app uses the front microphone to collect the sound data from the environment. Then the app calculates the sound pressure level by using IOS API which provides programming method that returns the sound level in decibel. When the user runs the Access Sound mobile application the app prompts the user to choose an environment type from these three options: quiet, moderate and loud shown in Figure 1. Their selection will play a vital role in the sound level calculation inside our algorithm. In the algorithm, we have calculated the average of 100 decibel level samples and measure the sound intensity using the following Eq.(2).

Sound   Intensity   =   1 . 8 ×( Average   Decibels   +   85 ) (2)

 This value is then multiplied by a percentage value based on the environment level selected by the user. The sound intensity is then stored in an array. The algorithm stores fifteen values into the array and displays the median of these values to the user as shown in Figure 2. The Algorithm is detailed in the following section.

Method of Testing

The Access Light app allows the user to select from  task light, ambient light or accent light. The continue button is below these three options.
Fig. 4 : The Access Light app allows the user to select task light, ambient light or accent light.
For the accuracy testing of Access Sound mobile app, we have tested the results against the outcome of professional sound meters.  We found that the sound meter testing involves playing a constant tone at a constant pitch for 8 seconds. The professional meter and the mobile app (Access Sound) were placed closer in the same location. The sampled data and calculated results are compared in this research work. In addition, we have tuned the parameters and algorithmic logic to improve its accuracy. The following are the results of comparing a professional light meter with the output of Access Sound. Currently the measurements of Access Sound have a percentage error that ranges between 0-10% when compared to the sound meter measurements. 

Results:    

Functionality

The mobile app Access Sound is unique because it not only measures the sound level in an environment but also provides the accessibility level of the environment to the user. The accessibility level indicates how useful or convenient the environment is for certain activities. For instance, if the noise level is potentially hazardous then it notifies the user that the environment is not conducive for certain activities. This is particularly helpful for people with disabilities who are not able to properly estimate the sound level in a room.

Table 1: This is a table representative of the sample data from Access Sound and a professional sound meter
1 App Results Sound Meter Results Percent error
2 42 47 10.64
3 43 47 8.51
4 43 47 8.51
5 64 64 0
5 55 64 1.55
7 5 64 1.55
8 73 70 4.29
9 74 70 5.71
10 75 70 7.14
11 79 73 8.22
12 79 73 8.22
13 79 73 8.22
14 84 79 6.33
15 84 76 10.53
16 84 76 10.53
17 84 76 10.53
18 87 79 10.13

ACCESS LIGHT CONTRIBUTION

Algorithm 2

Input:

Output:

  1. The ISO, exposure time and Brightness Value of each image is retrieved and placed into an equation which calculates the lux value displayed to the user.
  2. First the continuous auto exposure is initialized for the camera
  3. If [deviceisExposureModeSupported:AVCaptureExposureModeContinuousAutoExposure] Then
  4.   Make the focus point the center of the image
      CGPoint exposurePoint = CGPointMake(0.5f, 0.5f);
      [device setExposurePointOfInterest:exposurePoint];
  5.   [device 
  6.   setExposureMode:AVCaptureExposureModeContinuousAutoExposure];
  7. Multiple image samples are taken
  8. NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
  9. UIImage *image = [[UIImage alloc] initWithData:imageData]; UIImageWriteToSavedPhotosAlbum (image, nil, nil , nil);
  10. Set Brightness value, Exposure time and ISO values
  11. double BrightnessValue = [[dict objectForKey:@"BrightnessValue"] doubleValue];
  12. double ExposureTime = [[dict objectForKey:@"ExposureTime"] doubleValue];
  13. int ISOSpeedRatings = [[[dict objectForKey:@"ISOSpeedRatings"] objectAtIndex:0] integerValue];
  14. Calculate Lux value
  15. double luxAmount =(112*pow(1.92,BrightnessValue)/(0.0929/ExposureTime));

Technical Light Meter tools

Light meter devices calculate the lux values for any environment. Lux is the unit of illuminance and luminous emittance. Light meters can measure incident and reflected light levels within the area. Incident light is the light that an object is exposed to and it comes from the source of the light. Again, reflected light is the light that is reflected from the object. Professional light meters use a dome to capture the widest angle of light. Once the lux value is calculated a digital output is presented to the user. The standard method used for algorithm to calculate lux is given in the following [6].

E = 345 . k 2 ISO . t

Where, E is luminance in lx, k is shutter, t is shutter speed, and ISO is film speed. The mobile application (Access Light) functions to emulate professional light meters using the hardware and software provided by iOS devices.

The results screen shows the median lux values. The repeat and next button are below the results.
Fig. 5: The results screen shows the median lux values.

ACCESS LIGHT ALGORITHM

The ISO, shutter speed and aperture are the three main parameters that play a vital role in the Access Light Algorithm. The ISO speed controls sensor sensitivity to the light. The Aperture is the camera lens that controls the amount of light comes to the image sensor. Finally, the shutter speed controls the time limit of the aperture to remains open. The Access Light app allows the user to put the input selecting task light, ambient light or accent light shown in Figure 4. [7] [8]. Their selection will affect the sound level calculation in our algorithm. The algorithm uses the method of continuous auto exposure which is provided by iOS API to conjunctly use these aforementioned parameters to produce accurate lux values.  The Algorithm is described in the following section.

Testing Accuracy:

This is a graph which represents data from Access Light and a Light Meter. The lux values  amounts are on the y axis and the number of trials are on the x axis.
Fig. 6: This is a graph which represents data from Access Light and a Light Meter.
The accuracy of Access Light has been tested against professional Light meters.  The professional meters and the mobile app are kept together in the same location. The results of the app are compared to the Light meter device. The apps algorithm is then adjusted to improve its accuracy. The following results below show that the current Access Light app has a percentage error that ranges between 0-5% when compared with a professional light meter measurements.

Results:

Table 2: This is a table representative of the sample data from Access Light and a professional light meter
App actual -Light meter Percent Error
52 50 4
50 50 0
52 50 4
105 100 5
155 150 3.33
152 150 1.33
153 150 2
153.3333333 150 2.222222222
2.1 2 5
2:05 2 2.5
2:03 2 1.5
2:05 2 3
255 250 2
2.5 250 4
253 250 1.2
255 250 2.4
42.5 422 0.95
433 422 2.61
439 422 4.028435019

Functionality

Access Light provides the user with the lux values of the area. It also provides the accessibility level of the environment to the user. Calculating the lux value, mobile app warns the user based on the threshold value. The app also can alert the user on the amount of light that may not be suitable for certain activities. This is particularly helpful for visually disable people who are not able to accurately measure the light in a room.

CONCLUSION

This paper documents innovative approaches to measuring sound and light from an ambient environment. Access Sound and Access Light are mobile applications that inform the user of the accessibility of their current location by providing useful sound and light measurements. These applications are extremely useful for the users having visual and audio impairments.

REFERENCES

[1]    S. A. Stansfeld and M. P. Matheson, "Noise pollution: non-auditory effects on health," British Medical Bulletin, vol. 68, pp. 243-257, 2003 .

[2]    F. Falchia, P. Cinzanoa, C. D. Elvidgeb, D. M. Keithc and A. Haimd, "Limiting the impact of light pollution on human health, environment and stellar visibility," Journal of Environmental Management, vol. 92, p. 2714–2722, 2011.

[3]    "Extrasensory Devices," [Online]. Available: http://www.esdevices.com/products/luxi. [Accessed January 2015].

[4]    "Lumu," [Online]. Available: http://lumu.eu/lightmeter/. [Accessed January 2015].

[5]    J. Hillhouse, "Basic sound level knowledge for electric motor application," Petroleum and Chemical Industry Conference (PCIC), 2010 Record of Conference Papers Industry Applications Society 57th Annual, pp. 1-8, 2010.

[6]    A. Ismail, M. Azmi, M. Hashim, M. Ayob, M. Hashim and H. Hassrizal, "Development of a webcam based lux meter," Computers & Informatics , pp. 70-74, 2013.

[7] N. Negar, D. Williams, J. Schwartz, S. Ahamed, and R.Smith, Marquette University, University of Wisconsin - Milwaukee. "Smartphone-Based Light Intensity Calculation Application For Accessibility Measurement," RESNA, 2014.

[8] F. Rahman, C. Brien, C. Ostberg, N.Negar, D. Do, S.Ahamed, R.Smith, Marquette University, University of Wisconsin - Milwaukee, "Smartphone Based Solutions To Measure The Built Environment & Enable Participation," RESNA Annual Conference, 2013.

ACKNOWLEDGMENTS

The AR-B Project is supported in part by the Department of Education, National Institute on Disability and Rehabilitation Research (NIDRR), grant number H133G100211. The opinions contained in this proceeding do not necessarily represent the policy of the U.S. Department of Education, and you should not assume endorsement by the Federal Government. 

Audio Version PDF Version