sharc
Perform atmospheric correction using satellite hypercube atmospheric rapid correction (SHARC)
Since R2020b
Description
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.newhcube
= sharc(hcube
)
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.
The Image Processing Toolbox Hyperspectral Imaging Library requires desktop MATLAB®, as MATLAB Online™ or MATLAB Mobile™ do not support the library.
also specifies options using one or more name-value pair arguments. Use this syntax to set
the parameter values for SHARC.newhcube
= sharc(hcube
,Name,Value
)
Examples
Perform Atmospheric Correction of Hyperspectral Data
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')
Specify Dark Pixel Location for Atmospheric Correction
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')
Input Arguments
hcube
— Input hyperspectral data
hypercube
object
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 Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: ('AtmosphericModel','Tropical')
AtmosphericModel
— Atmospheric model for calculating optical thickness
'1962 US Standard'
(default) | 'Tropical'
| 'Midlatitude Summer'
| 'Midlatitude Winter'
| 'Subarctic Summer'
| 'Subarctic Winter'
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 asAcquistionTime
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 asAcquistionTime
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 asAcquistionTime
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 asAcquistionTime
in the metadata.
DarkPixelLocation
— Location of dark pixel
1-by-2 vector of form [x
y
]
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.
AdjacencyWindow
— Window size for computing adjacency effect
5
(default) | positive integer scalar
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
newhcube
— Atmospherically corrected data
hypercube
object
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.
Version History
Introduced in R2020b
See Also
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)