Camera Calibration Curves for Luminance Data Acquisition using Matlab

DOI : 10.17577/IJERTV3IS030909

Download Full-Text PDF Cite this Publication

Text Only Version

Camera Calibration Curves for Luminance Data Acquisition using Matlab

  1. S. Sudheer Kumar

    Dept. of E&EE, M.I.T Manipal, India

    Nithya Merin Jacob Dept. of E&EE, M.I.T Manipal, India

    Dr. Ciji Pearl Kurian Dept. of E&EE, M.I.T Manipal, India

    Dr. Kumara Shama Dept. of E&C, M.I.T Manipal, India

    AbstractDigital Camera is calibrated for absolute luminance measurements from high dynamic range image at a particular lighting condition using Macbeth colour checker chart. Luminance is extracted from the curves generated for different exposure values depending on lighting condition using MATLAB. Comparison of errors with existing methods show higher accuracy for the method developed. As automated systems have taken a lead role in energy conservation and management, this luminance based analysis is of great importance in daylight- artificial light integrated buildings. The method proposed can be applied to zone – lighting control, glare & uniformity analysis in buildings and also for photometric testing and measurement. This paper also discusses the procedure for selecting a particular camera for HDRI applications using X-rite PULSE ColorElite software. The software is used for obtaining profiles of different cameras, and Nikon D5100 is selected from them for HDRI application of luminance measurement. In order to ensure that camera based photometric measurement will become the preferred option in this era, it is necessary to establish algorithms, methodology, software tools and to transfer this idea to design professionals and industry.

    Keywords calibration; exposure Value (ev); high dynamic range (hdr); low dynamic range (ldr); luminance; profiling

    1. INTRODUCTION

      Increasing the dynamic range of images using multiple exposure of a scene has been examined in some of the papers. Instead of assuming linear response for the capturing device as in [1, 2, 3], Paul E. Debevec and Jitendra Malik [4] determined the response function of the camera. The potential, limitations and applicability of High Dynamic Range photography technique for luminance measurement are evaluated by Inanici [5]. The above author concluded that the HDR Imaging provides a measurement capability with the advantage of collecting high resolution luminance data within a large field of view quickly and efficiently, which is not possible to achieve with a luminance meter. The decreasing cost of present digital cameras and self-calibration algorithm in photosphere are additional advantages of HDRI when used for luminance measurements.

      With HDRI, images of the real world can be accurately captured, stored and displayed and these images directly describe the luminance of the objects [6, 7]. Even though error percentage may go up to 10, HDRI gives a quick and practical method for luminance measurements of a non-uniform

      luminance scene. Lighting professionals have used HDRI as a tool for light measurements for lighting control applications.

      Two cameras of same type may produce different colors for the same scenario. This may be due to various reasons such as function of manufacturing tolerances, device aging and so on. By obtaining camera profiles for various cameras, one will be able to understand and select cameras to be used for any specific use especially when colors are to be identified and measured. Such values can be used for calculations of luminance, knowing the calibration factor for the camera.

      X-rite PULSE ColorElite system is highly accurate and is a portable solution that enables professionals to color manage devices like digital cameras, scanners and printers [8]. Profiles of various cameras for a particular setting can be obtained using the above software and be compared to select the camera to be used for that particular application.

      Among the seven types of known HDR imaging techniques, the sequential exposure change technique is the most popular one [9, 10]. Photomatix or photosphere software can form HDR image, fusing the low dynamic images with different exposure values to cover the entire dynamic range of the scene [10]. The camera location and the aperture are fixed during measurements to reduce noise [5, 6, 10] and shutter speed is varied manually or via computer program such as DSLR remote pro, Digisnap or HDRcap OSX. To avoid shake and for better sequential exposure manipulation, remote control software usage is advised instead of manual operation. Out of a variety of techniques for creating a luminance standard [11], integrating sphere method gives a port image of uniform luminance which can be used as a flat field for calibrating cameras.

      As mentioned in [12], when the brightness of the scene was reduced, it was seen that the calibration curve had the same shape but shifted by a factor. The actual luminance of a scene depend on exposure value (EV) which depends on shutter time t and f-number N given by, EV= log2 (N2/t). Considering the change in current exposure value to the exposure value of calibration, along with the pixel values, the scene luminance can be determined. The pixel value luminance is found by the R, G and B values of each pixel approximated to CIE XYZ color space.

      This paper aims in developing a procedure for camera calibration to measure absolute luminance measurement using MATLAB.

    2. EQUIPMENT AND SOFTWARE

      • Camera: Digital Camera Nikon DSLR D5100 with 35mm f/1.8 G prime lens was selected after studying the profiles of three cameras.

      • Color checker chart: GretagMacbeth color checker chart with 140 color patches.

      • Luminance meter: Konica Minolta LS100 (1 degree FoV) is used for luminance measurement.

      • Artificial light source: Florescent tube light and CFL(23 watt 2nos.,45W)

      • Camera tripod stand: To avoid shake and for overall accuracy and ease of operation tripod camera stand is used.

      • Software used

        • X-rite PULSE ColorElite software is used for obtaining profiles of the cameras.

        • MATLAB Version 8.1.0.604 (R2013a) Image processing toolbox

        • Photosphere software (MAC OS)

    3. EXPERIMENTAL SETUP AND PROCEDURE

      1. Camera Profiling

        Profiles of digital camera can be created by shooting a reflective input target using the same lighting conditions that are used to capture images. Here profiles for cameras are formed and studied with the help of X-rite PULSE ColorElite software. The scene one desires to shoot has to be set up placing the target at the central location within the scene, so that it is parallel to the cameras film back. The scene has to be illuminated at 45° angle from both sidesso that the target is evenly lit. All lights of the same colour temperature have to be used. Options for colour manipulation are to be turned off in the camera software. The correct exposure has to be set to obtain the fully filled histogram with details.

        1. Creating Input Profiles: Procedure: With white balance setting, adjust the focus to fill the viewfinder fully by the input target and capture the image in TIFF format. Recompose the scene within the viewfinder as desired with the input target removed. After recomposing the scene, the histogram has to be without highlight or shadow clipping and capture the image in TIFF format. The TIFF image of input target is opened in Adobe Photoshop or other imaging application. Use the

          Nearest Neighbor resample method if the target is resized in Adobe Photoshop. Resize the image by cropping the edges of input target to result in 4 MB TIFF file.

        2. Input Targt: PULSE ColorElite supports three targets for profiling digital cameras:

        • GretagMacbeth ColorChecker (24)

        • GretagMacbeth ColorChecker DC

        • GretagMacbeth ColorChecker SG (Semi Gloss)

        The GretagMacbeth ColorChecker SG (Semi Gloss) was developed specifically for digital cameras and it consists of 140-patches all the patches in the standard ColorChecker target including the memory colour patches, such as, human skin tones, foliage, and blue sky.

        Camera profiling is done for Nikon D5100, for which the least values 0.67 and 0.27 for average delta E all and average delta E are obtained for a given setup. In the gamut Nikon D5100 can sense 8,75,000 colors. Minimum values for average delta E all and average delta E and sensing maximum number of colors are the criteria used for selecting Nikon D5100 for luminance measurement. Selecting the appropriate camera by profiling gives the accurate values for R, G and B which can be used for further calculation and analysis.

      2. Camera calibration for luminance measurement

        Nikon DSLR D5100, digital camera was initialized with the parameter settings as shown in Table I. The photographs were taken at fixed aperture and varying shutter speeds [5].

        Multiple exposure bracketed images of the color checker chart shown in fig. 1 was taken with exposure compensation mode of the digital camera and a set of eleven images were taken. This process was repeated for different exposure values (EV) by using different arrangement of light sources like fluorescent tube light and CFLs since it was found that as the lighting condition increased the exposure value also increased.

        Parameter

        Setting

        Flash

        OFF

        White Balance

        Auto

        ISO

        100

        Picture Control (Post Processing)

        Neutral

        Active D-Lighting

        OFF

        Metering

        Matrix

        Auto Bracketing

        OFF

        Image Quality

        Fine

        Image Size

        Small

        Exposure Delay Mode

        ON

        Release Mode

        Quick response

        Remote

        Fig. 1. Macbeth Color Checker Chart TABLE I. CAMERA SETTINGS

        The approach developed by Devebec and Malik [13], is used by MATLAB for the radiance-reconstruction process to determine the inverse of the camera response function. MATLAB has developed a function makehdr which is based on this concept which requires multiple exposure images as input and the output is an HDR 3-dimensional image matrix and has three sets of values with the same dimension as the original image. Each set represents the HDR pixel values of red, green and blue color respectively.

        These eleven images at a particular EV are given as input to makehdr in MATLAB to get the HDR matrix from which R, G and B values are extracted. The output data of digital camera are in sRGB color space which needs to be converted to CIE Y value which is similar to the spectral luminious efficiency of human eye for photopic vision. The R, G and B values are then converted to luminance value Y by the equation (1) which is termed as the software luminance [12]. This software luminance is found for all those pixel coordinates for which the actual values of the region are measured by luminance meter.

        Y = 0.2126 * R + 0.7152 * G + 0.0722 * B (1)

        The process is repeated for random EVs 5.39, 6.59, 8.9, 9.87, 10.29 and 11.29 by adjusting the lighting conditions to obtain the software luminance and the actual luminance values for 110 color patches which are measured by using the luminance meter in all the cases.

        The fig. 2 shows the plots obtained for software verses actual luminance of those points measured for all cases of EV. When applying basic fitting to these curves, it is seen that the curves are all cubic in nature. To get the equation of any curve, the curve fitting tool is used and the software luminance is substituted in this equation to get the actual luminance for that particular EV.

        Exposure value EV for the set of images is calculated by equation (2) where shutter speed t and f-number N is calculated from the images itself from the MATLAB program while these images are read into the program.

        measured

        actual

        EV= log2 (N2/t) (2)

        Trial and error method for selecting reference EV: In order to develop a system which can calculate the actual value of a scene irrespective of the lighting condition or exposure value, other than the calibration process, some changes are to be made to a new EV case. As the exposure value increased, a shift in curves by a small factor was observed earlier. Considering one EV case as reference and generating the equation for other EV is possible, where the factor to be multiplied to reference equation should be calculated. Assuming the EV considered during calibration as EVold and that during verification is EVnew, the factor to be multiplied with the calibrated luminance Lcalib equation (3) is shown below. In this case the ISO SISO is considered same for both calibration and verification where the scene is stationary.

        Lnew=Lcalib*2(EVnew-EVold)*(SISOcalib/SISOnew) (3)

        On considering 9.87 EV curve as reference, a cubic equation is designed which best fits the plot software and actual luminance. With this reference equation the factor 2^(EVnew-EVold) is multiplied to get a new equation for EVnew. On combining the two plots of developed curves and the actual curves, the variation in luminance can be noticed.

        While comparing all cases with reference 9.87, 10.29 and 11.29, EV= 10.29 showed minimum error as seen from fig. 3. Therefore EV=10.29 is considered as the reference from which other curves are developed for different EVs. Flow chart for calibration is shown in below fig. 4 and flow chart for luminance calculation is as shown in fig 5.

    4. EXPERIMENTAL RESULTS

      During the process of calibration, a set of images with EV=10.29 is given as input to the system as shown in fig. 6 along with the actual luminance measurements at calibration points considered. The color chart images are placed in order of EV steps -5,-4,-3,-2,-1,0,+1,+2,+3,+4,+5 in the subplots and the final image is the intensity image (0-1 range) at Exposure bias equal to 0step.

      EV=11.29 EV=10.29 EV=9.87

      EV=8.9

      EV=6.59 EV=5.39

      3000

      2500

      Actual Luminance (cd/m2)

      2000

      1500

      1000

      500

      3000

      2500

      Actual luminance measured by luminance meter(cd/m2)

      2000

      1500

      1000

      500

      EV=11.29

      EV=10.29

      EV=9.87

      EV=8.9

      0

      0 100 200 300 400

      software luminance(cd/m2)

      EV=6.59 EV=5.39

      0

      0 50 100 150 200 250 300 350 400

      software luminance from HDR image(cd/m2)

      Fig. 2. Software Vs Actual for all Exposure Values Fig. 3. Measured and actual luminance curves at reference EV=10.29

      Fig. 4. Flow chart for calibration

      The fig. 7 shows the actual plot for which curve fitting is done to get the reference equation for calculating the actual luminance. The actual curve plotted shows the cubic nature from its basic fitting equation. When software values at each point is put in this equation; we get the measured value from the reference which is the calibrated luminance.

      For verification, a different set of color chart images with EV=9.87 as in fig. 8 is given as input for which new equation for finding the actual luminance is calculated by multiplying the reference equation with the small term (equation (3)), to compensate for the EV considered during calibration and that during verification. Substitute the software luminance of new image pixels in this new equaion to get the actual luminance of the image pixels termed as measured luminance as in fig. 9. Difference between this measured and actual luminance (luminance meter) is considered for calculating percentage error.

      Fig. 5. Flow chart for luminance calculation

      Fig 6. Eleven images and intensity image at exposure value 10.29

      In-order to verify this approach of calibration and measurement of luminance through MATLAB, the same set of color chart images with EV=9.87 is given as input to photosphere software. Photosphere is HDR open software, operating in MAC with display mapping capabilities. It works with every kind of HDR file format and deals with absolute luminance calibration, hence suitable for analytical applications. The Table II shows the error calculated from photosphere and MATLAB measurements. It is seen that the error is comparable to that of photosphere.

      1600

      1400

      Actual luminance measured by luminance meter(cd/m2)

      1200

      Actual

      cubic fit

      1000

      800

      600

      400

      200

      y = – 4.6e-06*x3

      + 0.0066*x2

      + 2*x + 2.3

      TABLE II. COMPARISON TABLE

      SL.

      No.

      Actual luminance (Cd/m2)

      Measured luminance (Cd/m2)

      Matlab

      %

      Error

      Photo- sphere Luminance

      (Cd/m2)

      Photo- sphere

      %Error

      1

      16

      15.91

      0.57

      17.4

      -8.75

      2

      79

      88.83

      -12.44

      88.2

      -11.65

      3

      134

      145.64

      -8.69

      145

      -8.21

      4

      146

      146.30

      -0.20

      166

      -13.70

      5

      210

      211.07

      -0.51

      218

      -3.81

      6

      260

      284.40

      -9.38

      306

      -17.69

      7

      321

      328.00

      -2.18

      353

      -9.97

      8

      362

      388.11

      -7.21

      396

      -9.39

      9

      568

      620.28

      -9.21

      629

      -10.74

      10

      749

      826.52

      -10.35

      819

      -9.35

      0

      0 100 200 300 400

      software luminance from HDR image(cd/m2)

      Fig 7: Reference curve for calibration

      Fig 8: Eleven images and intensity image at exposure value 9.87

      EV old EV new

      1200

      1000

      Actual luminance (cd/m2)

      800

      600

      400

      200

      0

      0 50 100 150 200 250 300 350

      Software luminance (cd/m2)

      Fig. 9. Curves for EVnew=9.87 and EVold=10.29

    5. OBSERVATION

      The following observations are made during the experimental study:

        • As the lighting conditions increase the exposure value (EV) also increases.

        • Minimum error in luminance calculation is seen for reference EV=10.29 compared to all other EVs.

        • Percentage error when compared with the measured luminance (Matlab) and actual luminance (luminance meter) is less than 12.5%.

        • When the Matlab derived values are compared with photosphere software which is the standard software for luminance calculation measurements, the errors are comparatively less.

    6. CONCLUSION

Selecting camera by profiling using the X-rite PULSE ColorElite software gives more accuracy for HDRI application. The camera selected can be used for an extensive photometric analysis of the scene. During luminance calibration and verification, errors can be reduced if region tool is used for calculation of mean luminance over a small region as in luminance meter. Finally, if the pixel resolution of the image is reduced it is easy for manipulation and display. With the increased application of luminance scale in lighting analysis, this method can be applied for glare and uniformity analysis, blind control and lighting control.

REFERENCES

  1. Brian C. Madden, Extended Intensity Range Imaging, Technical Report, GRASP Laboratory, University of Pennsylvania, 1993

  2. Kousuke Moriwaki, Adaptive exposure image input system for obtaining high quality color information, Systems and Computers in Japan, July 1994, 25(8):51-60.

  3. Kelichi Yamada, Tomoaki Nakada, and Shin Yamamoto, Wide dynamic range vision for vehicles, IEEE International Conference on

    Vehicle Navigation and Information Systems, August 31- September 2 1994, pages 405-408.

  4. Paul E. Debevec and Jitendra Malik,Recovering high dynamic range radiance maps from photographs, SIGGRAPH 97 Conference Proceedings, August 3-8 1997, pages 369-378.

  5. MN Inanici, Evaluation of high dynamic range photography as a luminance data acquisition system, Lighting Research and Technology, Vol.38, no.2, 2006, pp. 123- 136.

  6. Reinhard E, Ward G, Pattanaik S, Debevec P., High Dynamic Range Imaging: Acquisition, Display, and Image-Based Lighting, San Francisco, CA: Morgan Kaufmann, 2005.

  7. Jacobs A., High Dynamic Range Imaging and its application in Building Research, Advances in Building Energy Research, 2007:1, 177-202.

  8. Les Walkling, Calibrating and Profiling Hasselblad H System Cameras, 2011.

  9. Nayar SK, Branzoi V., Adaptive dynamic range imaging: Optical control of pixel exposures over space and time, Proceedings of the Ninth IEEE International Conference on Computer Vision, Nice, France, IEEE 2003.

  10. H Cai Ph.D., T M Chung Ph.D., Improving the Quality of high dynamic range images,Lighting Research and Technology, CIBSE, UK, Vol.43,2011, pp 87-102.

  11. Peter.D.Hiscocks,Integrating sphere for Luminance Calibration, Syscomp electronic design Limited, March 24, 2012.

  12. Dietmar Wüller, Helke Gabele, The usage of digital cameras as luminance meters , Proceedings of the SPIE-IS&T Electronic Imaging, Germany, SPIE Vol. 6502, 65020U.

  13. Rendering High Dynamic Range Images on the Web, www.mathworks.com

Leave a Reply