Vous êtes sur la page 1sur 14

Preliminary Experiments Using a Digital Camera to Measure Commercial Light Sources Erin M. Craine International Dark-Sky Association, Inc.

Tucson, Arizona Abstract This is an introductory report on some experiments performed to explore the issues involved in using a digital camera to make images that can be used to measure the brightness of commercial light sources. Interest in these measurements is a consequence of our desire to learn more about techniques and methods for defining, measuring, and characterizing glare associated with various light sources. With development of a successful protocol, International Dark Sky Association (IDA) members should be able to collect large numbers of images of geographically distributed light sources that can be measured for brightness, as well as evaluated for glare. Experience with such a protocol is described in this report. 1. Introduction 1.1 Project Goal IDA is involved in establishing guidelines for effective lighting for both domestic and international policy. As a non-profit group, IDA is interested in enlisting lay volunteers to help with this data collection. To do so requires suitable, properly calibrated, low cost equipment. One option discussed is the use of personal digital cameras. This is a preliminary report exploring issues of using a digital camera to measure and quantify brightness of various light sources with an ultimate goal of evaluating perceived glare. The need to use a moderate cost, easy to operate, readily available digital camera for this purpose, rather than specialized photometers or luminance meters (which certainly have their own place), is driven by a desire to involve large numbers of lay-IDA members in this effort. For this purpose, digital cameras meeting suitable criteria potentially offer a more appealing and cost effective tool. In this paper we undertake a calibration of an example digital camera to determine how it can be used in quantitative light measurements. We also explore the errors associated with such measurements. Finally, using these calibration data we have conducted a blinded test of the approach to validate the premise that IDA can contemplate productive use of digital cameras for brightness and glare measurements. To achieve this goal we selected a camera that seemed to meet appropriate criteria, and used that camera to image a light source equipped with a rheostat to adjust its brightness under controlled conditions. Measurements of light intensity in these

images were calibrated against a luminance meter. In this discussion we provide an analysis of these measurements and discuss the conclusions reached to date. 1.2 Digital Camera Background It should be understood that digital cameras exist in a variety of types with many different features and functions, and many that are commonly available to the lay public are wholly inadequate for this task. Specifically, the popular point-and-shoot cameras, that often include telephoto functions, operate in an automated mode. That is, the exposure (incorporating aperture setting and shutter speed, or integration time) are not controlled or set by the photographer. Thus, holding these parameters fixed is impossible. Because useful photometric measurement of the images requires the photographer to hold fixed variables in the camera settings, it is necessary in this application to use a digital camera which allows extensive manual control. The practical result of this is that cameras most suited for this type of work are the digital single lens reflex (DSLR) cameras. These cameras allow the user to manually set focal length, focus, aperture, and shutter speed. The DSLR cameras are now quite practical for this IDA application as there are numerous suitable models on the market, and the price of good quality DSLRs is now only a few hundred dollars [1]. Nonetheless, DSLR cameras do have limitations that must be understood. In particular, common image formats (.jpg, .tif, .gif, etc.) are achieved using various image compression algorithms. For reasons beyond the scope of this paper, image compression algorithms will introduce various levels of error in photometric measurements within the images. These errors, if understood, may be completely acceptable for our purposes. For example, it has been noted that errors of ten percent are considered adequate and the result of good measurement technique; and errors of one percent are considered to be very good and usually require great care in the choice of components, techniques, and measurement standards. [2]. DSLR cameras can also be operated in a raw or native imaging format. These images enable higher photometric precision since they are not compressed, nor are they automatically altered in any way. However, these images are very large, can be difficult for the lay person to handle, and require specialized software not often used by the lay person. 2. Equipment and Tools We have used a variety of equipment and tools for this project; they are listed and described below: 1. Cannon EOS Rebel digital SLR camera 2. Bushnell digital laser rangefinder

3. 4. 5. 6. 7.

Konica Minolta LS-110 Luminance Meter Rheostat controlled incandescent globe light MaxIM DL image processing software Custom SkyView image analysis software Microsoft Excel spreadsheet software

The digital camera is a DSLR camera that accommodates interchangeable lenses and that can be operated in a fully manual mode. This camera was chosen because of its ready availability and the fact that it is very representative of the general class of camera (Figure 1). The camera was operated with a 300mm focal length lens for this project. Figure 1. Canon Rebel, a typical DSLR. Figure 2. Rheostat controlled light source

The digital laser rangefinder is used to measure the relatively long distances from the camera to the light source encountered in this project. The rangefinder reads out in yards or meters, and as a result the distance errors are typically at least +/- 3 feet. The luminance meter is used to provide a quantitative calibration of light source luminance (brightness) in cd/m2. The globe light source is a device that we built specifically for this project. It involves a fixture for an incandescent light bulb which is controlled by an electronic rheostat. It operates from a 110 vac outlet and is configured to set five repeatable brightness levels. The incandescent bulb can be shrouded with a glass globe of 5.5 inch diameter (Figure 2). MaxIM DL is an image processing program that we have used specifically for calculating and displaying line plots of intensity in the digital camera images. We have used it primarily to determine when an image is approaching or reaching saturation. SkyView is a custom image processing program that was created to specifically address the issues involved in measuring the brightness of a light source with a digital camera. We use it to calculate the average intensity over the entire light source as well as the total intensity in the image of the light source.

Microsoft Excel is used to enter the data derived from the image processing softwares as well as the luminance meter outputs. This program is used to do all the calculations and produce the associated graphical representations. 3. Data Collection Before discussing the data collection, there are some important issues regarding the use of the digital camera that must be considered. The exposure, E, of the source to the detector of the digital camera is defined by the equation: E=It Eqn 1

where I is the intensity of the light reaching the camera sensor and t is the integration time (generally expressed as a shutter speed). The intensity, I, is a function of the size of the aperture of the lens, i.e. the size of the opening in front of the detector through which the light passes. I = f (A) where A is the aperture setting. These equations are important because if we are to make useful measurements of brightness from images made with the camera it is critical that we hold some of the variables constant. Specifically, if we want to measure the intensity, I, of the light source as seen at the camera, it is important to hold the integration time, t, and the aperture, A, fixed. It is for this reason that using a point-and-shoot automatic digital camera is not suitable for brightness and glare measurements. These cameras will automatically compensate the integration time to attempt to produce a desirable exposure, E, for the scene being shot. Thus, the intensity, I, is not readily recoverable from the final images. During the course of the experiments reported here we were careful to control and record both aperture and shutter speed for all of the images made; further, we held them constant for each related set of images. We made paired images and luminance measurements of our variable light source at a range of exposures and distances. 4. Data Reduction Image measurements were first made using the software package MaxIM DL. The procedure that was applied to each image was: Open MaximDL Go to file and select open; browse the files to find the image you want to open Manipulate the window sliders to locate the light source in the image and center it Eqn 2

Go to color and select convert to monochrome Drag a box over the center of the light source in the image Go to view and select line profile Slide the vertical cursor bar to trigger y-value readings for the line profile Record the background levels beside the light source, and record the peak brightness of the light source

This measurement is very sensitive to determination of when individual pixels in the image approach and reach saturation. However, for eventual use in evaluation of glare (discussed later), it is also necessary to measure the total intensity in the image of the light source. For this task we used a customized version of SkyView software that enabled processing of the .jpg images produced by the Canon Rebel camera. SkyView allows the user to manually set a software aperture that surrounds the area of the image one desires to measure. Additional image measurements were made using SkyView, in the following way: Open SkyView Go to file and select open; browse the files to find the image you want to open Manipulate the window sliders to locate the light source in the image and center it Go to analyze and set aperture radius Select the center of the aperture Go to analyze and show results Record the average intensity and the total intensity of the area of interest

The next step was to put all these measurements, along with the luminance measurements, into an Excel worksheet. We created tables of all the collected information, including the image number, luminance measurements from the light meter of the light source and the background, data extracted from the digital camera images from both MaximDL and SkyView of the light source and the background, average intensity and total intensity, shutter speeds, and light brightness setting. The distance and the aperture were constant. With this plethora of information there were a number of graphs that could be created to help understand what exactly it was we had collected. We were particularly interested in relating the luminance and the brightness for each shutter speed, as well as the brightness and shutter speed for each light setting. We used the Excel graphing function to show these relationships, in the following way: Create table only containing the specific information to graph In first column record shutter speed In second column record luminance In the third column record brightness Highlight the information to be included in the graph

5. Results

Open the graphing function Select chart type (in this case scatter graph)

In this section we present key graphs derived from our data that describe the utility of the DSLR for luminance and brightness measurements. One of the first considerations is the functional dynamic range of the DSLR; i.e. the brightness range over which the DSLR produces meaningful images. This is a critical concept for lay IDA members to grasp if they are to use digital photography for quantitative representation of luminaire brightness. This is especially true since most photographs that are produced to demonstrate glare and objectionable brightness are actually grossly over-exposed, resulting in saturated and misleading images. An evaluation of DSLR dynamic range is suggested by Figures 3 and 4. In Figure 3 we see the effects of saturation in the images as a consequence of too great an exposure. In Figure 4 we see the opposite effect, in which the image is underexposed resulting in non-linearity at the faint end of the luminance range [cf. 3]. For the Canon Rebel DSLR it is apparent that the useful brightness is in the range of about 25 to not more than 250 dn, since these are 8-bit images (28 = 255 dn).

Figure 3. An example of a series of images, some of which are saturated. In these images the apparent luminance of the light source is too great to be on the linear part of the luminance brightness curve.

Figure 4. An example of a series of images, some of which are exceptionally faint. The faintest image behaves abnormally in the luminance brightness curve.

It should be remembered that the brightness associated with a given luminance in the image is a function of exposure, i.e. shutter speed, focal length and aperture. Thus, luminance calibration for a given image brightness must be performed for a variety of exposures depending on the apparent luminance of the luminaire. It is apparent from Figures 3 and 4 that the limited dynamic range of the DSLR is incapable of simultaneously recording the full range of luminance that may be encountered for typical light sources. A solution to this problem is demonstrated in Figures 5 and 6, in which we adjust the exposure (in this case shutter speed and f stop) and plot the resulting luminance versus total brightness. Study of Figures 5 and 6 shows that the relationships in both graphs are for the linear portion of the curve, and that a large range of luminance is displayed. Note that the luminance ranges of Figures 5 and 6 represent a continuum.

Shutter Speed 1/1000, f/5.6 Luminance [cd/m^2]

Figure 5.
4000 3000 2000 1000 0 0.00 1.00 2.00 3.00 4.00 Total Brightness [dn / 10^6] y = 1322.6x - 99.069

Luminance versus total brightness for a series of short exposures calibrating a range of low luminance.

Shutter Speed 1/250, f/14 Luminance [cd/m^2]


25000 20000 15000 10000 5000 0 0.00

Figure 6. Luminance versus total brightness for a series of long exposures calibrating a range of higher luminance.

y = 8113.5x + 4347.3

0.50

1.00

1.50

2.00

2.50

3.00

3.50

4.00

Total Brightness [dn / 10^6]

Understanding that multiple calibration curves are needed to ensure that a given luminance of the luminaire of interest produces a useable exposure in the DSLR image, we now look at some example calibration curves. In the first instance we are calibrating the images using average intensity of the light source as measured in the images. We do this for the same exposure at two different ranges for demonstration purposes. In Figure 7 the camera to luminaire distance was 60 feet; and in Figure 8 the distance was 90 feet. In both cases the exposure was determined experimentally to ensure that the luminance of our light source fell on the linear part of the calibration curve. In practice this process can involve making a large number of test images with a range of shutter speeds and apertures. With sufficient experience we found that it is possible to learn to judge a satisfactory exposure by simply visually examining the image. The difficulty is that we have become so used to looking at overexposed, saturated lighting images that a correctly exposed image looks very faint indeed. Figure 7. Luminance vs. Average Intensity at a Range of 60 Feet
Short Range Average Intensity 4500 4000 Luminance [cd/m^2] 3500 3000 2500 2000 1500 1000 500 0 0 50 100 Average Intensity [dn] 150 200 y = 26.834x - 668.77

Figure 8. Luminance vs. Average Intensity at a Range of 90 Feet


Long Range Average Intensity 2500

2000 Luminance [cd/m^2]

y = 11.002x - 202.7

1500

1000

500

0 0 50 100 Average Intensity [dn] 150 200

There is an alternative way to calibrate the images, and that is to consider total intensity in the image as opposed to average intensity. Total intensity measurements are of particular interest if we are to attempt to evaluate glare. In the case of glare determination, the physical extent of the light source relative to its background is itself an important component of glare. Total intensity can thus help capture information relevant to glare that is not provided by average intensity. A pair of calibration curves identical to Figures 7 and 8, but utilizing total intensity measurements, is shown in Figures 9 and 10. Note that in all of these graphs a linear curve fitting routine has produced an equation of the observed relationship between luminosity and average or total intensity.

Figure 9. Luminance vs. Total Intensity at a Range of 60 Feet


Short Range Total Intensity 4500 4000 Luminance [cd/m^2] 3500 3000 2500 2000 1500 1000 500 0 0 0.5 1 1.5 Total Intensity [10^6 dn] 2 2.5 3 y = 1519.6x - 262.94

Figure 10. Luminance vs. Total Intensity at a Range of 90 Feet


Long Range Total Intensity 2500

2000 Luminance [cd/m^2]

y = 1919.5x - 211.08

1500

1000

500

0 0 0.2 0.4 0.6 0.8 1 1.2 Total Intensity [10^6 dn]

6. Discussion The primary question posed by this project is whether DSLR imaging can be used to accurately measure the luminance of a luminaire of interest. The graphs above are

10

examples of calibrations to enable this type of measurement. In the first part of this discussion we will explore the errors associated with this measurement methodology. To accomplish this we made two additional image sets for each distance and exposure represented in the calibrations of Figures 3-6, with the intention of measuring average and total brightness of the light source in each image. These measurements were then inserted into the appropriate calibration equations and a calculated luminance, L(C), was determined. When we made the images we also made multiple measurements of the observed luminance, L(O), and calculated the standard deviation about the mean value of L(O). This standard deviation provides an estimate of the inherent errors in the measurement of the observed luminosity. These errors can be usefully compared to the final error in L(C). With L(C) and L(O) in hand it is possible to calculate the error associated with the calculated luminance. This error is simply: | L(O) - L(C) | / L(O), expressed as a percentage. Recall that it was noted earlier that errors of ten percent or less might be considered to be very good. These data are all summarized in Tables 1-4. We note that in each instance the errors are generally about ten percent or below, indicating that if our methodology is strictly adhered to the DSLR can produce very good results.

Table1. Average Intensity Calibration at 60 feet


distance = 60 feet calibration: average intensity y = 26.8x - 669 L StdDev I [dn] O [cd/m^2] (O) 172 70 3464 1320 105 86

L C [cd/m2] 3941 1207

|O-C| 477 113

% err 14 9

Table 2. Average Intensity Calibration at 90 feet


distance = 90 feet calibration: average intensity y = 11x - 203 L StdDev I [dn] O [cd/m^2] (O) 135 68 1372 512 56 25

L C [cd/m2] 1282 633

|O-C| 90 121

% err 7 6

11

Table 3. Total Intensity Calibration at 60 feet


distance = 60 feet calibration: total intensity y = 1520x - 263 L I [10^6 O StdDev dn] [cd/m^2] (O) 2.565 1.055 3464 1320 105 86

L C [cd/m2] 3637 1342

|O-C| 173 22

% err 5 2

Table 4. Total Intensity Calibration at 90 feet


distance =90 feet calibration: total intensity y = 1920x - 211 L I [10^6 O StdDev dn] [cd/m^2] (O) 0.776 0.398 1372 512 56 25

L C [cd/m2] 1279 553

|O-C| 93.08 41.16

% err 7 8

However, if the methodology is violated the results are far from satisfactory. One example of this is shown in Table 5. In this case the pair of sample images was made at a distance of 90 feet, but L(C) was determined using the calibration equation for a distance of 60 feet. The error is in excess of thirty percent, significantly worse than if the correct calibration curve is applied. Similarly, it can be shown that if images are analyzed using the non-linear portion of the calibration curve errors in excess of 100 percent can quickly accrue. Table 5. Example of a Mixed Distance Calibration
distance = 90 feet calibration: total intensity at 60 feet y = 1520x - 263 L L I [10^6 O StdDev C dn] [cd/m^2] (O) [cd/m2] 0.398 0.776 512 1372 25 56 343 918

|O-C| 169 454

% err 33 33

There is an additional subtlety when creating and using calibration curves that must be considered when analyzing the data. The luminance meter is calibrated for a specific field of view (FOV), in our case 1/3 degree. If the distance from the luminance meter to the light source is sufficiently short, then the luminance meter will capture photons from only a portion of the light source and will hence result in underestimating its luminance. The DSLR, with a large FOV, will conversely capture the entire light source and the total intensity recorded will be improperly calibrated.

12

A simple calculation can help avoid this problem. If we take d to be the diameter of the light source then the equation: d=r Eqn 3

where r is the distance from source to luminance meter (or DSLR) and is the angular FOV in radians of the luminance meter, can be used to calculate r, which in this case will be the minimum distance at which a proper calibration can be achieved. In summary: Looking at the assemblage of graphical data it is apparent that the digital camera reaches a non-linear response in the vicinity of 200 dns. The camera detector has 8-bits of dynamic range; total saturation occurs at 255 dn, but non-linearity can commence by 200 dn. The dynamic range of the luminance meter is much greater with a measuring range of 0.01 to 999900 cd/m2. A light source of very high luminance must be imaged by the camera with very low exposure, i.e. fast shutter speed and small aperture (high f/number). For a given setting of shutter speed and aperture, the limited dynamic range of the camera results in recording linear brightness data over only a small luminance range. A solution to this problem is to create several calibration curves with different camera settings suitable for measurement of specific corresponding ranges of luminance.

6. Conclusion We have shown that with proper care it is possible to use a DSLR to calculate accurate luminance levels of light sources of interest. Our primary conclusions are as follows: It is possible to calculate luminance of a light source with 10% or less error using calibrated DSLR photographs. Such measurement is complicated by two factors: 1) calibrations must be known for specific exposure settings of the camera, and 2) it is necessary to establish that the images do not suffer the problems exhibited at low exposure in Figure 2, nor may the images be saturated as in Figure 1. It is possible that at extremely high luminance levels the digital camera will saturate regardless of exposure settings. Families of calibration curves must be made for each discrete light source to camera distance for which images are to be made. Such distances must take into consideration the FOV of the calibrating luminance meter.

13

For lay users of this technique it is necessary for us to adopt a protocol, following the methodology described in this paper, that would enable us to measure useful data.

The protocol that we have adopted may be summarized as follows: Make a series of exposure controlled images that enable creation of a set of overlapping calibration curves. These curves will be linear over each segment of the desired luminance range. Ensure that the calibration curves encompass the entire angular extent of the calibrating light source. Ensure that there is a complete set of calibration curves for each distance at which the luminance is to be determined. Image the luminaries of interest at a distance (or distances) for which calibration curves have been determined. Use the appropriate measured brightness in the images for the calibration data that are available (i.e. average brightness or total brightness).

References 1. Staff, High Performing SLR Cameras, Consumer Reports, 72, 32-34 (2007). 2. Grum, F. and Becherer, R.J., Optical Radiation Measurements Vol. 1: Radiometry, [Academic Press: New York], p.6 (1979).

14

Vous aimerez peut-être aussi