Fisheye camera method for spatial non-uniformity corrections in luminous flux measurements with integrating spheres

This paper presents a fisheye camera method for determining spatial non-uniformity corrections in luminous flux measurements with integrating spheres. Using a fisheye camera installed into a port of an integrating sphere, the relative angular intensity distribution of the lamp under test is determined. This angular distribution is used for calculating the spatial non-uniformity correction for the lamp when combined with the spatial responsivity data of the sphere. The method was validated by comparing it to a traditional goniophotometric approach when determining spatial correction factors for 13 LED lamps with different angular spreads. The deviations between the spatial correction factors obtained using the two methods ranged from −0.15% to 0.15%. The mean magnitude of the deviations was 0.06%. For a typical LED lamp, the expanded uncertainty (k=2) for the spatial non-uniformity correction factor was evaluated to be 0.28%. The fisheye camera method removes the need for goniophotometric measurements in determining spatial non-uniformity corrections, thus resulting in considerable system simplification. Generally, no permanent modifications to existing integrating spheres are required.


Introduction
Continuous development of solid-state lamps (SSLs) necessitates accurate ways of measuring their energy efficiency, which is described in terms of luminous efficacy and measured in lumens per watt (lm W −1 ). Luminous efficacy is the ratio of the total luminous flux produced (lm) to active electrical power consumed (W) by a lighting product. Luminous flux is the total amount of visible light emitted by a light source as perceived by the human eye. It is commonly measured using an integrating sphere photometer by comparing the photometer signals produced by the device under test (DUT) and a reference light source [1][2][3][4].
In order to reach low uncertainties in luminous flux measurements with integrating spheres, a correction factor to account for the spatial non-uniformity of the sphere is required, especially for lamps with directional radiation patterns [2]. Traditionally, obtaining the spatial correction factor has involved time consuming and resource intensive goniometric measurement of the relative angular intensity distribution of the DUT. Angularly directional SSLs have increased the need for reliable spatial non-uniformity corrections. Test laboratories that lack a goniophotometer may need to omit the correction or acquire the angular data elsewhere. If the spatial This paper presents a fisheye camera method for determining spatial non-uniformity corrections in luminous flux measurements with integrating spheres. Using a fisheye camera installed into a port of an integrating sphere, the relative angular intensity distribution of the lamp under test is determined. This angular distribution is used for calculating the spatial non-uniformity correction for the lamp when combined with the spatial responsivity data of the sphere. The method was validated by comparing it to a traditional goniophotometric approach when determining spatial correction factors for 13 LED lamps with different angular spreads. The deviations between the spatial correction factors obtained using the two methods ranged from −0.15% to 0.15%. The mean magnitude of the deviations was 0.06%. For a typical LED lamp, the expanded uncertainty (k = 2) for the spatial non-uniformity correction factor was evaluated to be 0.28%. The fisheye camera method removes the need for goniophotometric measurements in determining spatial non-uniformity corrections, thus resulting in considerable system simplification. Generally, no permanent modifications to existing integrating spheres are required.
Keywords: fisheye camera, integrating sphere, luminous flux, spatial correction, angular intensity distribution, photometry, measurement uncertainty (Some figures may appear in colour only in the online journal) Original content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. correction cannot be determined, the measurement uncertainty is increased.
This paper introduces a fisheye camera method for determining the relative angular intensity distributions of lighting products. The method is validated by comparing the spatial correction factors obtained using the fisheye camera method to those obtained using a goniophotometer. The method developed in this study is intended to enable test and calibration laboratories to apply spatial non-uniformity corrections without the need for a goniophotometer or permanent modifications to their existing integrating spheres. However, if no baffled sphere ports can be temporarily vacated, the addition of an extra port may be required.
The idea of using a fisheye camera together with an integrating sphere for measuring the angular distributions of light sources was presented by Zong from National Institute of Standards and Technology (NIST) at the CIE Session held in Manchester, United Kingdom, in 2015 [5]. In his talk, Zong presented results indicating that spatial corrections could reliably be obtained using a fisheye camera if an integrating sphere with relatively low reflectance coating was used.

Spatial non-uniformity correction
The spatial non-uniformity correction factor k s requires knowledge of the spatial responsivity distribution function (SRDF) K(θ, φ) of the integrating sphere and the relative angular intensity distribution I DUT (θ, φ) of the lamp under test. Angles θ and φ are the zenith and azimuth angles of the spherical coordinate system, respectively. The SRDF can be obtained by scanning the inner surface of the sphere with a spotlight and recording the illuminance at the detector port using a photometer [2][3][4]6].
A three-dimensional model and the SRDF of the 1.65 m integrating sphere used at the Metrology Research Institute (MRI) are shown in figures 1 and 2, respectively. The spatial non-uniformity is caused by the structural elements of the sphere, contamination of the sphere surface, and uneven thickness of the reflective coating. The coating (barium sulphate, BaSO 4 ) of the integrating sphere at MRI has an approximate reflectance of 98%. In figure 2, the effect of the structural elements on the spatial responsivity of the sphere can be distinguished: the detector port at {θ = 90 • , φ = ±180 • }, the port for an external light source at {90 • , −135 • }, the auxiliary port baffle at {90 • , 0 • }, the seam of the sphere at φ = ±90 • , and the bottom lamp holder socket close to the very bottom of the sphere at φ = ±180 • . It is also evident that the responsivity of the bottom hemisphere is lower than that of the top hemisphere, which is likely to be caused by dust particle contamination.
For integrating sphere setups relying on a luminous flux standard lamp operated inside the sphere for calibrating the luminous flux responsivity of the system, the spatial correction factor can be obtained using where I std (θ, φ) is the relative angular intensity distribution of the luminous flux standard lamp. For a typical standard lamp, I std (θ, φ) can generally be assumed to be uniform without significantly increasing the measurement uncertainty [7]. For luminous flux standard lamps with distinct deviation from uniform intensity distribution, the angular data of the lamp is required.
In the case of the absolute integrating sphere method [2], the spatial correction factor can be determined using the equation where K(θ ext , φ ext ) is the spatial responsivity of the inner surface area of the integrating sphere directly illuminated by known reference luminous flux from an external light source.  The detector port is on the left, next to it is the port for an external light source, and the auxiliary port is opposite the detector port. The sphere opens up in the perpendicular direction to the cross section.

Overview of the fisheye camera method
The method determines the spatial non-uniformity correction factor k s using a fisheye camera image, captured via a baffled port of an integrating sphere, and the SRDF of the sphere. First, the image is processed to compensate for the imperfections of the measurement system. Then, the inner surface of the integrating sphere is mathematically reconstructed in order to allow for the camera perspective and the lens distortion. Next, the diffuse illumination level inside the sphere is estimated and subtracted from the data to obtain the relative angular intensity distribution I (θ, φ) of the lamp. Finally, this angular distribution and the SRDF of the sphere are used to calculate the spatial correction factor k s using equations (1) or (2), depending on the measurement setup.

Image acquisition and processing
The image of the inner surface of the sphere is obtained by averaging consecutive frames captured by the camera to reduce random noise and the effect of the typical flicker of AC operated light sources. Furthermore, this averaging is used to virtually increase the bit depth of the captured image beyond the bit depth of the camera hardware. After obtaining the image, the lamp is turned off, dark signal frames are averaged, and the result is subtracted from the previously obtained average to form the DUT image.
To maximize the utilization of the dynamic range of the image sensor, the exposure time is set to be as long as possible without overexposing the colour channels of any pixels. Due to the flicker, finding the maximum viable exposure time is an iterative process of reducing the time of exposure until none of the captured frames have overexposed pixels. Figure 3 shows a DUT image captured from inside the 1.65 m integrating sphere used at MRI. The outermost points of the image circle correspond to the areas surrounding the detector port into which the fisheye camera is installed. The image clearly displays some imperfections of the measurement system, such as the conspicuous light fall-off towards the peripheries of the image circle, and the seam and lamp holder socket at the bottom of the sphere influencing the area with the light spot. The DUT itself is behind the detector port shading baffle, faintly visible in the centre of the image. The small black area on the left is the external port of the sphere, In addition to the DUT image, a reference image needs to be taken with the sphere illuminated by a light source with an angular intensity distribution as uniform as possible. This reference image is used for the image processing stage of the DUT image to diminish the impact of imaging hardware imperfections and the spatial non-uniformity of the sphere. A reference image with an isotropic light source may also be synthetically generated using a composite image where the sphere is illuminated by a rotating sphere scanner. This is conceptually similar to the method used for producing uniform irradiance for the aperture area calibration method in [8].
To approximate the relative luminance detected by each image sensor pixel, the RGB colour channels of the DUT and reference images are combined into greyscale image matrices G and G ref . Additionally, to eliminate any effects of possible exposed sphere ports and the areas outside the image circle, the low intensity elements of G ref are excluded.
To compensate for the imperfections of the sphere and the imaging hardware, greyscale DUT image G is divided element-wise by greyscale reference image G ref , which results in matrix where indices i and j specify the pixel of the image. The operator (·) represents the element-wise multiplication of the matrices. Camera sensitivity matrices C and C ref are assumed to be related by C = αC ref , where α is a scalar, which is a function of the exposure time. Matrix S incorporates the structure and responsivity of the sphere, and in these terms resembles the SRDF. Matrices A and A ref contain the angular intensity distributions of the respective lamps, and matrices D and D ref consist of the diffuse reflected illumination inside the sphere in the respective images. Because the angular distribution of the lamp used to take the reference image is close to omnidirectional, it leads to an almost uniformly illuminated sphere when combined with the diffuse illumination inside the sphere. Thus, The outcome of the image processing routine, matrix G, for the fisheye camera photograph in figure 3 is presented in figure 4. The sphere surface outside the light spot is now more uniform when compared to the unprocessed image. The seam of the sphere and the detector port baffle are almost indistinguishable. The edge of the detector port, the areas outside the image circle, and the external port have been excluded by thresholding out the image areas with low intensity values.

Correcting image distortions
In order to mathematically reconstruct the sphere from image matrix G, to factor in the lens and perspective projection distortions, intrinsic camera parameter matrix K and the lens distortion function need to be determined using a geometric camera calibration procedure such as that described in [9] or [10]. Matrix consists of the focal length f of the camera, image sensor pixel dimensions s x and s y , pixel row/column skew coefficient γ, and the intersection of the optical axis and image sensor in the pixel coordinates (o x , o y ). In addition to these parameters, the position and orientation of the camera with respect to the sphere centre need to be known. For each element of image matrix G, the coordinates of the corresponding three-dimensional point on the surface of the sphere are calculated. The coordinates are obtained by back-projecting every pixel in the direction of the incident light beam along the distance of the sphere surface. First, the undistorted image pixel coordinates (x ui , y ui ) i,j are calculated using the intrinsic camera parameters K and the inverse of the lens distortion function [11]. Then, the three-dimensional coordinates X Y Z T i,j for each undistorted image pixel are calculated using the inverse of the intrinsic camera parameter Distance Z i,j along the optical axis of the camera is calculated using the sphere geometry. The structural details of the sphere, such as the baffles and their holders, are all assumed to be at the distance of the sphere surface in the reconstruction.
The soundness of the reconstruction was verified from the structural elements of the sphere when back-projecting an unprocessed image matrix. The geometry of the pixel positions in the reconstruction can also be validated by using images of the sphere illuminated using a sphere scanner in various orientations.

Determining the relative angular intensity distribution from the sphere reconstruction
To increase the robustness of the method to the possible residuals of the image processing algorithm, such as the seam of the sphere or any view-obstructing baffles, the median intensity value along the optical axis is used to represent the respective angle of deviation from the beam centre. This is possible for DUTs with a symmetrical radiation pattern along the optical axis of the lamp. The median is used due to its insensitivity to possibly large reflectivity changes in the areas with structural elements compared to the surrounding regions. Figure 5 shows the normalized illuminance levels inside the sphere and relative angular intensity distributions for four different DUTs. In addition to the areas of the integrating sphere exposed to direct light from a DUT, diffuse reflected light also causes other regions of the sphere surface to be illuminated. This diffuse illumination D can constitute a dominant part of the intensity levels of image matrix G, depending on the angular spread of the DUT. The magnitude of the diffuse light level is approximated with a scalar and estimated using the smallest intensity of all the angles of deviation from the beam centre, i.e. the minimum values of the illuminance level curves in figure 5. In the case of the concentrated spot type lamp in figures 3-5 (DUT 1), the diffuse illumination level is approximately 40% of the maximum recorded intensity value of the beam centre.
To obtain the angular distribution of the DUT, the estimated diffuse illumination level is subtracted from the intensity  values of all the points of the reconstruction, and the intensity values of the points which reside further from the beam centre than that with the smallest intensity level are set to zero to eliminate the impact of specular reflections.

Comparison with goniophotometer
To validate the fisheye camera method, the relative angular intensity distributions of 13 LED lamps were measured using the fisheye camera method and a near-field goniophotometer used at MRI. The goniophotometer [4] employed in this study consists of a stationary photometer and a two-axis turntable for the DUT. The determined relative angular intensity distributions and the SRDF shown in figure 2 were used to calculate the spatial correction factors for each DUT using equation (2).
To capture the reference image for the fisheye camera method, the 1.65 m integrating sphere at MRI was illuminated using an incandescent lamp with a frosted bulb. For all the measurements, the DUTs were powered by a regulated AC voltage source to ensure the stability of the luminous flux of the lamps. Additionally, before measuring each lamp with the goniophotometer, every DUT was operated for a period of one hour to reduce the drifting of the luminous flux during the measurement sequence. In the case of the fisheye camera method, no stabilization of the DUT is required due to the brief measurement procedure and simultaneous recording of intensity data for all angles.
To allow for comparison of the methods, the measured DUT orientations inside the sphere were not employed, but the optical axes were let to coincide with the bottom of the sphere for the calculation of the spatial correction factors. For the goniometrically acquired angular distribution data, the mean of the correction factors of all orientations over the azimuthal angle with a step of ∆φ = 2.5 • was used in order to compensate for the uncertainty associated with installing DUTs with misaligned optical and mechanical axes into the E27 base lamp holder inside the sphere. The uncertainty is due to the possible rotational asymmetry of goniophotometrically obtained relative angular intensity distributions for such lamps. Figure 6 shows the relative angular intensity distributions of four SSLs. The angular distributions of the SSLs shown range from the most concentrated distribution (DUT 1) to the broadest distribution (DUT 13) of all the SSLs tested. The goniophotometrically acquired data were averaged along the optical axes of the DUTs for figure 6.

Results of the validation
The effect of the differences in the determined angular intensity distributions of the DUTs on the spatial non-uniformity correction factor k s is presented in table 1. The beam angles indicate the full width at half maximum angles for each SSL and were calculated for the table using the goniophotometer data. For the absolute integrating sphere method, the 1.65 m sphere at MRI, and an isotropic light source, the spatial non-uniformity correction factor k s would be 1.0015. Essentially, the correction factor for the isotropic intensity distribution is the ratio of K(θ ext , φ ext ) to the average spatial responsivity of the sphere.
The maximum deviation in k s between the fisheye camera method and the goniophotometer was 0.15%. On the average, the differences between the methods were 0.06%. For the SSLs tested, completely omitting the spatial correction would lead to a maximum error of 2.1% in the luminous flux measured when using the 1.65 m sphere at MRI.
Generally, SSLs with a concentrated angular intensity distribution have a more prominent contrast between the primary reflection and the diffuse illumination inside the sphere, effectively increasing the signal-to-noise ratio of the measurement. On the other hand, for those types of lamps, small deviations in the determined angular intensity distribution tend to lead to a larger error in the spatial correction. The sensitivity of the spatial correction factor for deviations in the determined angular intensity distribution for different types of SSLs is evident from the angular data of DUTs 1 and 13 displayed in figure 6 and the respective spatial correction factors in table 1.
The constraint for determining the relative angular intensity distribution from a fisheye camera image is set by the ratio of the intensity values of the regions directly illuminated by the DUT and the diffuse illumination inside the sphere. For nearly omnidirectional SSLs, this diffuse illumination may  constitute over 97% of the signal from the area also exposed to direct light from the DUT. In addition, the angular non-uniformity of the lamp used for the reference image has a more severe impact on the results for lamps with wide beam angles. The effect of this angular non-uniformity can be seen from the measured distributions of bulb-type-lamp DUT 13 in figure 6. For DUTs with angular distributions this broad, employing the spatial correction for isotropic angular distribution would lead to an error of −0.14% in the spatial correction in the case of the 1.65 m integrating sphere at MRI.

Measurement uncertainty
The expanded uncertainty of spatial correction factor k s obtained using the fisheye camera method is 0.28% (k = 2). The uncertainty budget is presented in table 2. The main source of uncertainty is due to the non-uniformity of the angular distribution of the employed reference light source. The reference source directly affects the determination of the angular intensity distribution and thus the correction factor. Furthermore, it impacts the estimation of the diffuse illuminance level inside the sphere, which in turn also affects the angular distribution obtained using the method. The uncertainty caused by the reference light source was evaluated by illuminating the sphere with different types of lamps with highly omnidirectional radiation patterns and repeating the image processing routine using the captured reference images. The uncertainty due to the camera pose and geometrical camera calibration affects the accuracy of the sphere reconstruction and the matching of the obtained angular distribution with the SRDF of the sphere. The uncertainty due to the matching of the SRDF and DUT data is smaller for the fisheye camera method because, in contrast to the goniophotometer method, it is possible to determine the orientation of the optical axis of the DUT from the captured image. This can be used for reducing the uncertainty in spatial correction caused by potential deviation between the mechanical and optical axes of the lamp, as well as the possible inclination of the lamp holder.
The uncertainty components for the camera and DUT orientation were obtained using a Monte Carlo simulation with geometrical models by changing the camera model parameters and the orientation of the optical axis of the DUT. For simulating the camera pose, the orientation of the camera was altered independently along all three axes according to the normal distribution with the standard deviation of one degree. In the case of the intrinsic parameters and the lens distortion, the uncertainty values reported by the calibration routine [12] were employed.
The uncertainty due to the spectral responsivity of the camera hardware was evaluated from the colour channel responsivity curves of the camera sensor and the data of a directional SSL with angularly varying spectrum. The uncertainty due to the sensor noise was evaluated by repeated measurements of one of the DUTs. The uncertainty due to the orientation of the DUT was estimated by altering the beam centre from the bottom of the sphere by one degree in different directions and calculating the respective spatial correction factors.
For the spatial non-uniformity correction factors obtained using the goniophotometer at MRI, the expanded uncertainty is 0.22% (k = 2). The uncertainty mainly consists of the alignment of the goniophotometer setup, possible deviations from the coaxial arrangement of the optical and mechanical axes of the DUT, and the alignment of the optical axis when installing the DUT into the integrating sphere. The uncertainty of the spatial correction due to the goniophotometer measurement was estimated using a simulation of the goniophotometer used at MRI by changing the alignment of the goniometer and the DUT base independently by two degrees.
Both methods share the same uncertainty component due to scanning the SRDF of the integrating sphere. This uncertainty is caused by the alignment accuracy of the sphere scanner and the drift of the luminous flux produced by its light source. The uncertainty was evaluated from repeated scans of the sphere. Interchanging the photometer and fisheye camera may introduce uncertainty in luminous flux measurement due to photometer installation repeatability. For the integrating sphere at MRI, this uncertainty was found to be negligible.

Conclusion
This paper presented the fisheye camera method for determining spatial non-uniformity corrections in luminous flux measurements with integrating spheres. The method calculates the spatial correction factor using the SRDF of the integrating sphere and the relative angular intensity distribution of the DUT, which is determined from an image captured through a port of the sphere using a fisheye lens camera.
The method was validated by determining spatial correction factors for 13 SSLs of different types. The differences in correction factors obtained using the fisheye camera method and the goniophotometer ranged from −0.15% to 0.15%, the average magnitude of the differences being 0.06%. The expanded uncertainty (k = 2) of spatial non-uniformity correction factors obtained using the fisheye camera method was evaluated to be 0.28%. This measurement uncertainty could be reduced by virtually creating an isotropic reference light source using a sphere scanner. For the SSLs measured and the sphere used at MRI, omitting the spatial correction altogether would, at worst, lead to a 2.1% error in the total luminous flux, and correspondingly the same error in luminous efficacy. The fisheye camera method is intended to enable test and calibration laboratories to apply spatial non-uniformity corrections in luminous flux and efficacy measurements with integrating spheres. The method does not typically require any permanent modifications to the sphere, and the spatial correction factor for a DUT can be obtained in a period of minutes as opposed to hours when relying on goniophotometric measurements. Moreover, in contrast to goniometric measurements, the spatial correction factor is determined with the DUT already installed inside the sphere in the same orientation used as when measuring its total luminous flux, although the detector mounting repeatability needs to be considered in the uncertainty budget for luminous flux. Most importantly, the fisheye camera method allows integrating spheres to be used independently from goniophotometers in the luminous flux measurements of lighting products.