0% found this document useful (0 votes)
81 views

Camera Calibration Updated Version4Dec2019

This laboratory involves using a standard RGB camera to estimate the temperature of a blackbody source. Students will take images of an integrating sphere illuminated by a tungsten halogen bulb at different intensities. They will then calibrate the camera by relating the digital counts in the images to measured radiances from a spectrometer. This involves interpolating the spectrometer data to match the camera's spectral response, integrating over each color channel, and performing a linear regression to derive calibration curves converting counts to radiance for each channel. Plots of the calibration curves will be produced.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Camera Calibration Updated Version4Dec2019

This laboratory involves using a standard RGB camera to estimate the temperature of a blackbody source. Students will take images of an integrating sphere illuminated by a tungsten halogen bulb at different intensities. They will then calibrate the camera by relating the digital counts in the images to measured radiances from a spectrometer. This involves interpolating the spectrometer data to match the camera's spectral response, integrating over each color channel, and performing a linear regression to derive calibration curves converting counts to radiance for each channel. Plots of the calibration curves will be produced.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Radiometry, IMGS-619 Term #: 2191

Laboratory No. 3

Utilizing Standard RGB Imagers for Scientific Purposes

In this laboratory you will utilize a standard RGB imager to estimate the temperature of a
“blackbody” source. In order to accomplish this task, you will be required to follow the
calibration procedures listed below. The described procedures outline the steps that should be
used to convert raw digital count values, to radiometric units of radiance. The outline describes a
multipoint calibration process. As the name suggests, this method utilizes multiple intensity
outputs of the integration sphere to capture a relationship between the output of the camera in
digital counts and the measured radiance. To complete this laboratory, you will be expected to
manipulate the acquired imagery, and provided data in a programming environment of your
choice. Feel free to use any language or environment that you feel most comfortable with
(Matlab, IDL, Python, C, C++), to complete the assignment.

Materials
The table below contains a list of instrumentation and materials that will be utilized during this
laboratory. Each item has a brief description.

Table 1. List of given materials and associated descriptions


DSLR camera: Broad-band sensor fitted with
D50 (Nikon) Bayer pattern. 6 mega-pixel sensor array,
producing 3008x2000 RGB imagery.
Integrating sphere: Provides uniform illumination
Helios Integrating Sphere (Labsphere) output based upon selected source(s) and aperture
diameter
Spectrometer (mounted on the Helios Integration
Sphere: Measures 0.35 to 1.00 micrometers,
Calibrated UV/VIS spectrometer (Ocean optics)
Calibration provides NIST traceable radiance
values
Illumination source: by design closely a mimics
Tungsten Halogen Bulb
black body source

Data Capture & Procedures


The following section outlines the steps that should be taken to acquire the necessary imagery to
perform system calibration of the Nikon D50.

• Before any measurements utilizing the integrating sphere are made, the sphere and associated
spectrometer should be allowed to warm up for a minimum of 45 minutes. (This task will be
handled by your TA prior to your scheduled lab time)
• Use the tungsten light source to set the parameters (exposure time and ISO) of the Nikon.
Make sure that the pixel values for the light source are not saturated by examining the
histogram of the picture captured by the camera. Once exposure time and ISO are properly

Page 1 of 7
Radiometry, IMGS-619 Term #: 2191
Laboratory No. 3
adjusted, record the parameters in Table 2 below and capture an image of the tungsten light
source.

Table 2. Camera Settings


Shutter Speed (exposure/integration time)

ISO (Sensitivity)

F/number (Aperture)

• Once you have set the camera parameters, place the Nikon in front of the sphere. Center the
camera such that the camera’s optical axis is directly in line with the center of the sphere’s
exit aperture. Adjust the camera’s position along the optical rail such that the entire field of
view of the camera is filled by the exit aperture. Once complete, focus the camera, then re-
adjust the lens such that the camera is not focused on any particular item in or around the
sphere. This can be done by focusing the Nikon on some painter’s tape across the exit
aperture of sphere when the cover is on. Do not forget to remove the tape when removing the
cover.
• Once the camera is setup. You will acquire several images at varying illumination conditions
of the sphere. The range of illumination will vary based upon the selected integration
time/exposure, aperture setting, iso… that your group selects. Using the histogram on the
Nikon, start at illumination conditions at the lower end of the linear response of the detector.
Take a picture and save the spectrum of the sphere from the spectrometer. Use at least three
illumination conditions (more points will provide a better fit).

• Place the lens cap on the Nikon and take some dark current measurements. It is
recommended that you capture several images in this configuration and average them
together to obtain an estimate of the base noise of your system.
• Make sure you have all the pictures from the camera that correspond to the spectra from the
spectrometer before you leave.

Camera Calibration
In this portion of the laboratory you will be utilizing the previously collected imagery and
spectra to perform a multi-point calibration, converting raw digital count values to radiometric
units of radiance. You will also require the spectral response functions for all three channels (red,
green, and blue) of your camera. This information can be found in the Radiometry MyCourses
web site in the Laboratories folder. Download the Nikon D70 camera information. While the

Page 2 of 7
Radiometry, IMGS-619 Term #: 2191
Laboratory No. 3
D70 is not the exact model you will be using, the sensors utilized in both camera models are the
same. Please note that the data in this file is structured such that the first column is wavelength
(nanometers), and the second, third, and fourth columns are the spectral response of the camera’s
red, green, and blue channels respectively. You will be calibrating all three channels (red, green,
and blue). Before starting please be sure that you have all of the necessary data required for you
to complete this section. This includes a set of dark current measurements (the camera images
that you took with the Nikon lens cover on); a set of images captured of the sphere at the three or
more illumination conditions that you used in your experiment; calibration files from the sphere
spectrometer; the spectral response curves of your camera’s red, green, and blue channels.

• Do the following steps for each channel (red, green, and blue). Taking the data from the
spectrometer, convert the spectral radiance measurements obtained from the integrating
sphere to integrated radiance over the relevant band associated with your camera. To do this
integrate across wavelength for each of the individual spectrometer files, to obtain a single
radiance value. Before calculating these integrals, it is recommended that you first
interpolate your radiance files to the same sample spacing and wavelength range of the
provided spectral response curve of your camera. Once you have interpolated your radiance
spectra to match, multiply the radiance spectra by the camera’s spectral response for the
specific channel that you are converting. Then use a sum function and multiply by the sample
(wavelength) spacing. The sample spacing is simply the distance in wavelengths. (Example:
if the first value is measured at 400nm, and second value at 401nm, then the sample spacing
would be 1nm). Since the units are W/(m2-sr-nm), the wavelengths must be in nanometers.

• Repeat this step for each channel in your analysis (red, green, and blue). Utilizing the
collected images from the Nikon taken of the sphere at a single illumination condition extract
the channel that you are analyzing. Then find the average DC value towards the center of the
image. Repeat this process for each of the illumination conditions as well as the dark current
measurement made with your camera with the lens cap on.

• After you have acquired an average channel image for each illumination condition, subtract
the average channel dark reference image from each. This step will be done in the analysis
of each channel (red, green, and blue).

• Next utilize the average dark subtracted images and single radiance values derived earlier for
each condition to compute a linear regression that converts digital counts to radiance. The
results of this process will be used to estimate temperature of the tungsten light source in the
following section of this laboratory.

In your laboratory analysis, plot the derived linear regression model as a function of input
(raw digital count), and output (radiance).

For further information or clarification, please view the pseudocode below to help guide
derivations of your camera’s radiometric calibration curves. Also, do not hesitate to ask your TA
for further clarification. In developing your own processing code, keep in mind that you do not

Page 3 of 7
Radiometry, IMGS-619 Term #: 2191
Laboratory No. 3
have to follow the steps outlined below identically. There are other ways to structure the code
that will still accomplish the same task.

Code Outline (for a specific channel analysis: repeat these steps for red, green, and blue
channels):
1) For each measured illumination condition:
a) Import spectral radiance measurement(s) from the Ocean Optics spectrometer, then do
the following processing steps:
i) Interpolate to match camera response
ii) Multiply each radiance spectrum by camera’s spectral response for the channel
being analyzed
iii) Integrate across all wavelengths to obtain a single radiance value
b) Import camera images and do the following processing steps:
i) Find the dark image(s) and extract the channel being analyzed. Find the average
dark signal.
ii) For this illumination condition, extract the relevant channel and average
ii) Subtract average dark signal from the relevant channel average
2) Create a regression over all of the illumination conditions between the dark subtracted digital
counts of the camera obtained in the steps outlined in 1b) and the radiance calculated in the steps
outlined in 1a)

Estimating Black Body Temperature


In this section of the laboratory, you will utilize the regression from the previous section
to convert the captured image of your tungsten source to radiance. Then you will write code to
estimate the temperature of the source.

• The first step will require you to import both your derived calibration coefficients and the set
of images that you have taken of the illumination source. Subtract your dark image from the
image of the tungsten light source and then convert the dark subtracted image to radiance
utilizing the derived calibration coefficients from the previous section. Find the average
radiance at the center of the image of the tungsten source (average over a suitable window in
the center of the image).

• The next step will be to calculate the temperature of the source. Because radiance is a
function of both wavelength and temperature the simplest method would be to calculate
temperature using Planck’s equation discussed in class. The issue, however, is that the
camera does not measure radiance at a specific wavelength. Instead it integrates over a wide
spectral range. To overcome this dilemma, the easiest approach is to generate a look up
table relating temperature to integrated radiance across the camera’s spectral range.
To accomplish this, first generate a set of radiance curves spanning 400 to 700 nanometers
across some temperature range using Planck’s equation. The equation provided below has
been simplified to eliminate multiple constants and converted so that output units are in
!
spectral radiance, i.e. # , and where input wavelengths, therefore, must be in microns.
" %& '"
Input temperature must be in °𝐾𝐾 .

Page 4 of 7
Radiometry, IMGS-619 Term #: 2191
Laboratory No. 3
𝐶𝐶1 𝑊𝑊
𝐿𝐿𝜆𝜆,𝑇𝑇 = 𝑐𝑐2 where 𝑐𝑐1 = 3.74151 × 108 𝑚𝑚2 𝜇𝜇𝜇𝜇 , 𝑐𝑐2 = 1.43879 × 104 𝜇𝜇𝜇𝜇 (1)
5
𝜆𝜆 𝜋𝜋(𝑒𝑒𝜆𝜆𝜆𝜆 −1)

• Once you have derived your spectral radiance curves from the blackbody expression
(Equation 1 above) across a range of suitable temperatures, integrate each blackbody curve
found for each temperature over the spectral range of the camera for a given channel that
you are analyzing (either red, green, or blue) to obtain a single output radiance value for each
curve corresponding to the effective blackbody radiance for the channel being analyzed.
The resulting look-up table will consist of temperature in °𝐾𝐾 vs radiance (integrated from the
!
blackbody curve) in units of # . Because you have used the response range of your
%& '" "
camera in integrating the blackbody curve at each temperature, this table can now be related
to the results of your camera calibration process for a given channel. To re-iterate, Equation
(1) above requires wavelength to be in microns, therefore, when you integrate, your
wavelengths also should be in microns.

• Find which radiance is closest to the one from your light source. Specifically, assess which
effective blackbody curve (using the approach just outlined at the previous step) is the best
match by comparing the effective blackbody radiances for each channel to those obtained
with the camera output in the same channels. In order to make the comparison, in each Forma&ed: Font: Bold
channel, you will need to divide the effective blackbody radiance by its maximum value,
and similarly divide the camera effective radiance by its maximum. That is your Forma&ed: Font: Bold
temperature estimate.

In your lab report, plot: (a) your regressions for each channel (red, green, and blue)
between camera digital counts and radiance from the spectrometer onboard the
integrating sphere, (b) the Nikon camera response functions (red, green, and blue), (c) the
family of blackbody curves, (d) the blackbody curves multiplied by the spectral response of
the Nikon camera for each channel, e) radiance as a function of temperature for your
blackbody curves. Be sure to also report the closest matching temperature and radiance
from your look-up tables obtained for the three channels (re, green, and blue) that matched
your average calibrated radiance value found in the image.

Code Outline
1) Import image of tungsten source
2) Use calibration coefficients to convert digital counts to radiance for each pixel
3) Generate a large number of blackbody curves from 1000-3000 °𝐾𝐾 between 0.4-0.7
microns
4) Multiply each blockbody curve by the spectral response of the Nikon camera for the
channel being analyzed
5) Integrate the result to obtain a single radiance value (note: be careful of your units.) over
the wavelength range of your camera response curve for the channel being analyzed
6) Find the best match between calculated radiance values in your look up table and
measured values derived from your tungsten light source (you will make this comparison
over all three channels: red, green, and blue eventually)

Page 5 of 7
Radiometry, IMGS-619 Term #: 2191
Laboratory No. 3
7) From best matched radiance select corresponding temperature (using all three channels in
the comparison of step (6))

ANALYIS
Use the following questions listed below to help guide your write-up. Be sure to answer each of
them completely to receive full credit.

• Why allow time for the integrating sphere to “warm up”?


• Why should one not place the camera directly flush with the exit aperture of the integrating
sphere or inside the sphere?
• What will happen if the camera is too far from the exit aperture of sphere?
• What is the purpose of having a multiple point calibration?
• Would one measurement be fine?
• What is the purpose of incorporating the spectral response of your camera during the
calibration process?
• Does your estimate of temperature seem reasonable?
• Are there additional parameters that could be included or modifications to either your
experimental set-up, measurements, or calculation of radiance that could be made to
improve your estimates of source temperature?

Page 6 of 7
Radiometry, IMGS-619 Term #: 2191
Laboratory No. 3
Due Date:__________________________

Name:_____________________________

Lab Partners:________________________

Lab # and Name: ____________________

CONTENT Total Possible Total


Abstract (clear concise description of lab and results) 10 ______

INTRODUCTION
(background of laboratory)
Methods/Procedures 20 ______

RESULTS/DISCUSSION
Example (calibration regression curve)
Example (black body curve)
Discussions (questions and other thoughts) 50 ______

CONCLUSION 10 ______

GENRAL FORMAT
Format (includes extraneous data, syntax, layout, spelling, etc.)
Clarity/Understanding of Material 10 ______

LATE POLICY: Please note that if your laboratory report is submitted late, a 10% deduction will
accrued per day beyond the due date. This correlates to a letter grade each day that your report is
not submitted to the designated drop box.

Late Total: ______ ______

Total: ______ ______

Page 7 of 7

You might also like