Tutorial 01 - Empirical Line Calibration

Lab 1: Atmospheric Correction using Empirical Line Method

The goal of this lab is to teach students how to use the empirical line method for the atmospheric correction of UAV imagery. This set of imagery was collected in September, 2013 at Purdue Agronomy Center for Research and Education (ACRE) using an unmanned aerial vehicle (UAV). During the UAV flight, we set up ground calibration targets and measured the radiance of each target using a field spectrometer (GER 1500).

The general idea of empirical line calibration is to force spectral data to match selected field reflectance spectra. A linear regression is used for each band to equate DN and reflectance. This is equivalent to removing the solar irradiance and the atmospheric path radiance. The following equation shows how the empirical line gain and offset values are calculated.

Reflectance (field spectrum) = gain * DN (input data) + offset

Empirical line calibration requires at least one field, laboratory, or other reference spectrum.

Standard software packages for processing remote sensing images include ERDAS Imagine and ENVI (both available through Purdue). As most students taking this lab have completed the module on GIS, this lab will use the newly released image analysis toolkit in ArcMap 10.2.

1. Calculate Multispectral Reflectance from Field Spectra

a. Download the folder lab 1 from Blackboard Learn. The UAV imagery includes 4 bands: blue, green, red and near-infrared, corresponding to one of the four TIFF images in the folder. There is a naming convention for the UAV imagery, i.e., 0 is used to indicate blue band (TTC0564_0.tif), 1 for green band (TTC0564_1.tif), 2 for red band (TTC0564_2.tif), and 3 (TTC0564_3.tif) for near infrared band.

Here we only use the UAV green band (TTC0564_1.tif) as the lab example. In the folder there are also multiple visual images taken using a Nikon camera mounted on the UAV (DSC_5013.jpg, DSC_5014.jpg, and DSC_5015.jpg). You should be able to view the colorful calibration targets clearly from the RGB image as follows.

E:\Hard Drive Backup 03012014\UAV Data\UAV radiometric cal
test\DSC_5014.JPG{width="2.1770833333333335in" height="2.0589862204724407in"}

Only the green, red and blue targets (targets in the circles) will be used for the following analysis, since we found that the black and white targets were not suitably uniform in the observed spectral range.

b. The field spectrometer measures radiance for these targets, so these values must be converted to reflectance before they can be used. In this lab, the reflectance of different calibration targets in green band has already been calculated.

In the subfolder field_ref, there is an example of the raw radiance data downloaded from field spectrometer (gr090613_010.sig, which you can open using Notepad) and three different txt files of which the file names correspond to the color of different targets (red, green and blue). Open the txt files, the first column is the spectrometer wavelength (nm), and the second column is the reflectance (%).

{width="1.4791666666666667in" height="2.8528018372703414in"}

c. Open the spreadsheet Monochromatic and Filter Relative Sensetivities.xls and click the 550nm-green tab. The UAV green band does cover wavelengths from 530 nm to 570 nm but only gives one value representing the signals within the 530-570 nm range. In the 550nm-green tab, the Wavelength column lists all the wavelengths the UAV green band covers, and the Tx. (%) column lists the corresponding filter transmission values for the green band. The transmission values describe how much of the light signal is transmitted through filter at each wavelength and will be used to calculate the actual reflectance value seen by the UAV camera. To use the transmission values, we need field measurements matching the wavelengths listed in the Wavelength column. Therefore the field spectra will first need to be resampled to match the UAV image wavelengths.

{width="1.9774540682414699in" height="2.949971566054243in"}

[Question 1]{.underline}: Based on what you learned from the lecture, which one of these sensors is hyperspectral, the field spectrometer or the UAV camera? What is the spectral resolution of the hyperspectral data?

d. We do not need you to do the wavelength resample here, which mainly involves linear interpolation. Open the folder resampled_field_ref and these files are the resampled field spectra.

{width="1.7916666666666667in" height="3.1618055555555555in"}

e. Use the spreadsheet calibration.xls to calculate the multispectral reflectance in the green band of UAV imagery. This spreadsheet will use the field spectrometer data to estimate what the UAV camera should see for each target. It applies a weighted average to the field spectrometer observations using the UAV camera sensitivities.

To use the excel spreadsheet, click the multispectral_ref_cal tab, copy the resampled reflectance value of each target to the corresponding column (red shaded) and it will automatically return a value in the column with green background color, which is the calculated reflectance of each target in green band.

Save and close the spreadsheet.

{width="6.885416666666667in" height="3.7009109798775155in"}

2. Extract Image DNs

a. Start ArcMap.

b. On the Standard toolbar, click the Add Data button.

{width="6.028062117235345in" height="0.322746062992126in"}

On the Add Data dialog box, browse to the green band of the UAV image (TTC0564_1.tif) on the disk and click Add.

On the Add Data dialog box, browse to Folder Connections > the drive you store the data > downloaded folder lab 3 > TTC0654_1.tif and click Add. If you cannot find the location you need, which means that the folder is not connected, click the Catalog tab on the right side of the interface, right click Folder Connections, Connect Folder ... Select the folder you want to connect, and click OK.

Click Yes for building pyramid.

{width="3.1060793963254594in" height="2.3363363954505685in"}

The image is added as a layer in the Table of Contents.

{width="4.543307086614173in" height="3.1023622047244093in"}

Zoom in to view the targets clearly. The targets are shown as follows.

{width="5.397896981627297in" height="0.2500951443569554in"}

{width="3.271563867016623in" height="3.09in"}E:\Hard Drive Backup 03012014\UAV Data\UAV
radiometric cal
test\DSC_5014.JPG{width="3.2674825021872267in" height="3.0902362204724407in"}

c. Click the Catalog tab on the right side of the interface. Navigate to the location where you want to save your shapefile (for example, Folder Connection > N:\ > lab).

Right click on the folder, New... > Shapefile

{width="3.9015748031496065in" height="2.840551181102362in"}

The Create New Shapefile dialog pops up.

  • Enter the name of the shapefile, for example, green_target

  • Select the Feature Type as Polygon

  • Click OK.

The new shapefile green_target will be automatically added to ArcMap.

d. Click Start Editing... on the Editor toolbar.

{width="4.124072615923009in" height="0.385330271216098in"}

If you cannot find the Editor toolbar, click the Customize menu in ArcMap, and then click Toolbars > Editor.

The Create Features window pops up on the right panel. Select the shapefile you want to edit, and then the bottom side displays Construction Tools. Select Polygon and draw a polygon over the green target. Open the visual image DSC_5013.jpg to help identify the green target. The polygon doesn't have to be exactly the size of the green target.

{width="6.298449256342957in" height="3.3854166666666665in"}

When you feel the polygon is done, double click to enclose it.

Click Save Edits on the Editor toolbar.

Click Stop Editing on the Editor toolbar.

e. Open ArcToolBox,

{width="5.574803149606299in" height="1.578740157480315in"}

Click Spatial Analyst Tools > Extraction > Extract by Mask

{width="3.125in" height="2.6770833333333335in"}

The Extract by Mask dialog box pops up.

  • The Input Raster should be the loaded green band.

  • The Input raster or feature mask data should be the shapefile you just created.

  • The Output raster is the raster you will generate.

Click on the folder button to select the path you would like to store the output raster. The output raster will be automatically added to ArcMap.

f. Right click on the output raster you just created in Table of Contents, and select Open Attribute table.

{width="3.283464566929134in" height="2.188976377952756in"}

The Value column lists all the DN values within the polygon. From this window, use the tools pull down menu to select Export and save attribute table as a DBF database.

g. Now open the DBF file in Excel. The DBF file type is not recognized a default Excel file type, so you must tell Excel to look for All Files before the DBF file will be visible in the browser window.

h. Open the spreadsheet calibration.xls and click the DN_cal tab, copy all the data in the Value column from the DBF file in step (g) to the Green target column in the DN_cal tab. The average value will automatically appear in the DN column in the regression tab of the spreadsheet. That is the final DN value of the green target in green band you need.

i. Repeat b-g for the blue and red targets. Remember that you are calibrating the green band, so while you use polygons to cut out each of the three colored targets, you should only extract pixels from the green band image. If you extract the targets from the green band image than the average values for each of the three panels will form a reasonable approximation of a line in the next step. If you extract the red target from the red image, and the blue target from the blue image then you will find that your three average points form more of a triangle in the next step.

j. Save the spreadsheet and close ArcMap.

3. Complete the Calibration

After Step 1 and 2 are completed, click the regression tab of the spreadsheet.

a. Select the contents of the two columns, Insert > scatter,

A scatter plot is then generated.

b. Right click on the points, Add Trendline...

{width="3.8897637795275593in" height="2.6496062992125986in"}

  • Trend/Regression type should be Linear.

  • Check Display Equation on Chart.

  • Check Display R-squared value on Chart.

  • Click OK.

The equation displayed on the scatter plot will be used to convert the DN values to reflectance in the next step when applied to the whole image.

c. Save and close the spreadsheet.

[Question 2]{.underline}: Why did we set up targets with different colors? Is it ok for us to use targets with similar colors, such as light blue, blue, and dark blue? Can you tell much difference in the values of UAV image pixels if using similar colors? If not, how would this affect the calibration?

4. Generate Image Reflectance Data

a. Start ArcMap and add the raw green band TTC0563_1.tif to ArcMap.

b. In ArcToolBox, Spatial Analyst Tools > Map Algebra > Raster Calculator[^1]

The Raster Calculator dialog pops up.

{width="4.023757655293088in" height="2.7301235783027122in"}

Here we use the equation (y=0.0338x-1.1978) which is generated in step 3 by the TA as an example.

  • Use the Layers and variables list to select the datasets and variables to use in the expression. It should be the original UAV image with DN values. Double click to select the layer and the layer will appear in the Expression frame.

  • In the Expression, enter the equation you generated in step 2 by using the Operator buttons and Tools.

  • Output raster: choose the path where you want to store the data.

  • Click OK.

In this way, you successfully calibrate the UAV green band to reflectance.

c. Right click on the output raster in Table of Contents, Data > Export Data...

Specify the Location you want to save the exported data and Name, click Save. Format should be TIFF.

[Question 3]{.underline}: If you also do the empirical line calibration for the blue and red band, do you expect that the calibration equations for the blue and red bands are the same as that for the green band? Why?

Finish this lab and submit a word document with:

(1) Answers of Question 1 (page 2); (15%)

(2) Answers of Question 2 (page 10); (15%)

(3) Answers of Question 3 (page 11). (15%)

Also submit the following files:

(1) Shapefiles of blue, green and red targets that you generate in Step 2; (15%)

(2) Completed spread sheet calibration.xls; (20%)

(3) UAV green band image after calibration (TIFF format). (20%)

[^1]: If you get an error that the Spatial Analyst License is unavailable, then you will need to activate it by selecting "Customize" -> "Extensions" and then selecting the Spatial Analyst extension from the list in the window that opens. Once activated, it will be available to you every time you return to ArcGIS with your current account.