Main Content

sharc

Perform atmospheric correction using satellite hypercube atmospheric rapid correction (SHARC)

Description

example

newhcube = sharc(hcube) returns an atmospherically corrected data cube by computing the surface radiance or surface reflectance values from the input hyperspectral data. The function implements the SHARC algorithm to compute the atmospherically corrected hyperspectral data.

The input must be radiometrically corrected hyperspectral data. The pixel values of the input data cube must be either top of atmosphere (TOA) radiance or TOA reflectance values. For better results, use TOA reflectance values.

Note

This function requires the Image Processing Toolbox™ Hyperspectral Imaging Library. You can install the Image Processing Toolbox Hyperspectral Imaging Library from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

example

newhcube = sharc(hcube,Name,Value) also specifies options using one or more name-value pair arguments. Use this syntax to set the parameter values for SHARC.

Examples

collapse all

Read a hyperspectral data cube into the workspace.

input = hypercube('EO1H0440342002212110PY_cropped.dat');

Determine the bad spectral band numbers using the BadBands parameter in the metadata.

bandNumber = find(~input.Metadata.BadBands);

Remove the bad spectral bands from the data cube.

input = removeBands(input,'BandNumber',bandNumber);

Convert the digital numbers to radiance values by using the dn2radiance function.

hcube = dn2radiance(input);

Convert the radiance values to reflectance values by using the radiance2Reflectance function.

hcube = radiance2Reflectance(hcube);

Compute atmospherically corrected data by using the sharc function.

newhcube = sharc(hcube);

Estimate RGB images of the input and the atmospherically corrected output data. Increase the image contrast by applying contrast stretching.

inputImg = colorize(hcube,'Method','rgb','ContrastStretching',true);
outputImg = colorize(newhcube,'Method','rgb','ContrastStretching',true);

Display the contrast-stretched RGB images of the input and the atmospherically corrected output data.

figure('Position',[0 0 700 400])
subplot('Position',[0.1 0 0.3 0.9])
imagesc(inputImg)
title('Input Radiometrically Calibrated Image')
axis off
subplot('Position',[0.5 0 0.3 0.9])
imagesc(outputImg)
axis off
title('Output Atmospherically Corrected Image')

Figure contains 2 axes. Axes 1 with title Input Radiometrically Calibrated Image contains an object of type image. Axes 2 with title Output Atmospherically Corrected Image contains an object of type image.

Read a hyperspectral data cube into the workspace.

input = hypercube('EO1H0440342002212110PY_cropped.dat');

Determine the bad spectral band numbers using the BadBands parameter in the metadata.

bandNumber = find(~input.Metadata.BadBands);

Remove the bad spectral bands from the data cube.

input = removeBands(input,'BandNumber',bandNumber);

Convert the digital numbers to radiance values by using the dn2radiance function.

hcube = dn2radiance(input);

Convert the radiance values to reflectance values by using the radiance2Reflectance function.

hcube = radiance2Reflectance(hcube);

Compute atmospherically corrected data by using the sharc function. Specify the dark pixel location for computing the adjacency effect and the initial atmospheric parameters. The choice of the dark pixel affects the atmospheric correction results.

newhcube = sharc(hcube,'DarkPixelLocation',[217 7]);

Estimate RGB images of the input and the atmospherically corrected output data. Increase the image contrast by applying contrast stretching.

inputImg = colorize(hcube,'Method','rgb','ContrastStretching',true);
outputImg = colorize(newhcube,'Method','rgb','ContrastStretching',true);

Display the contrast-stretched RGB images of the input and the atmospherically corrected output data.

figure('Position',[0 0 700 400])
subplot('Position',[0.1 0 0.3 0.9])
imagesc(inputImg)
title('Input Radiometrically Calibrated Image')
axis off
subplot('Position',[0.5 0 0.3 0.9])
imagesc(outputImg)
axis off
title('Output Atmospherically Corrected Image')

Figure contains 2 axes. Axes 1 with title Input Radiometrically Calibrated Image contains an object of type image. Axes 2 with title Output Atmospherically Corrected Image contains an object of type image.

Input Arguments

collapse all

Input hyperspectral data, specified as a hypercube object. The DataCube property of the hypercube object contains the hyperspectral data cube. The pixel values of the data cube must signify either the TOA radiance or TOA reflectance values.

If the pixel values are digital numbers, use the dn2radiance and dn2reflectance functions for computing the TOA radiance and reflectance values, respectively. You can also use the radiance2Reflectance function for directly computing TOA reflectance values from the radiance values.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: ('AtmosphericModel','Tropical')

Atmospheric model for calculating the optical thickness of the total atmosphere, specified as the comma-separated pair consisting of 'AtmosphericModel' and one of these values:

  • '1962 US Standard' — Standard atmospheric parameters that are defined for Earth's atmosphere over a wide range of temperature and pressure. This is a generic model and can be used for atmospheric correction of hyperspectral data acquired at different latitudes and seasons.

  • 'Tropical' — Atmospheric parameters of regions in the tropical zone. The latitude range of the tropical zone is [-23° 45', 23° 45']. Use this model if the hyperspectral data is collected from the tropical zone.

  • 'Midlatitude Summer' — Atmospheric parameters of regions in a midlatitude zone during the summer season. The latitude ranges for midlatitude zones are [23° 45', 66° 55'] and [-66° 55', -23° 45']. Use this model if the hyperspectral data is collected from mid-latitude zones during summer. You can determine the season from the acquisition date stored as AcquistionTime in the metadata.

  • 'Midlatitude Winter' — Atmospheric parameters of regions in a midlatitude zone during the winter season. The latitude ranges for midlatitude zones are [23° 45', 66° 55'] and [-66° 55', 23° 45']. Use this model if the hyperspectral data is collected from mid-latitude zones during winter. You can determine the season from the acquisition date stored as AcquistionTime in the metadata.

  • 'Subarctic Summer' — Atmospheric parameters of regions in a subarctic zone during the summer season. The latitude ranges for subarctic zones are [66° 55' ,90°] and [-90°, -66° 55'] degrees. Use this model if the hyperspectral data is collected from subarctic zones during summer. You can determine the season from the acquisition date stored as AcquistionTime in the metadata.

  • 'Subarctic Winter' — Atmospheric parameters of regions in a subarctic zone during the winter season. The latitude ranges for subarctic zones are [66° 55' ,90°] and [-90°, -66° 55'] degrees. Use this model if the hyperspectral data is collected from subarctic zones during winter. You can determine the season from the acquisition date stored as AcquistionTime in the metadata.

Location of the dark pixel, specified as the comma-separated pair consisting of 'DarkPixelLocation' and a 1-by-2 vector of form [x y]. x and y are the spatial coordinates of the dark pixel to be selected from the blue-green band. The dark pixel has the lowest TOA reflectance value, and the sharc function uses it for computing the spectral illuminance of the surface.

By default, the sharc function chooses the pixel with the minimum blue-green band value as the dark pixel. Typically the wavelength range (in micrometers) for the blue-green band is [0.45, 0.57]. The TOA reflectance values in the blue-green band are most affected by atmospheric haze. Hence, the dark pixel from blue-green band is generally selected as the candidate pixel for estimating the atmospheric effects on the hyperspectral data.

Window size for computing the adjacency effect, specified as the comma-separated pair consisting of 'AdjacencyWindow' and a positive integer scalar. The value signifies the size of the window centered around the dark pixel. The sharc function uses all the pixels that lie inside this window for estimating the adjacency effect.

The window size must be less than the spatial dimension of the input hyperspectral data cube.

Output Arguments

collapse all

Atmospherically corrected data, returned as a hypercube object. The DataCube property of the hypercube object contains the hyperspectral data cube. The pixel values of the output data cube are surface radiance or surface reflectance values depending on the input.

  • If the pixel values of the input data cube are TOA radiances, the pixel values of the atmospherically corrected data at the output are surface radiance values.

  • If the pixel values of the input data cube are TOA reflectances, the pixel values of the atmospherically corrected data at the output contains surface reflectance values.

References

[1] Katkovsky, Leonid, Anton Martinov, Volha Siliuk, Dimitry Ivanov, and Alexander Kokhanovsky. “Fast Atmospheric Correction Method for Hyperspectral Data.” Remote Sensing 10, no. 11 (October 28, 2018): 1698. https://doi.org/10.3390/rs10111698.

Introduced in R2020b