Reduce spectral smile effect in hyperspectral data cube
reduces the spectral smile effect in the hyperspectral data
correctedData = reduceSmile(
averaging the pixel values of each band along the spectral dimension with a window of size
3. The function averages the pixel values of each band with the
corresponding pixel values of the previous band and the next band. The spectral smile effect
occurs only in the data captured using push-broom hyperspectral sensors, such as the
Hyperion EO-1 and the SEBASS.
specifies the block size for block processing of the hyperspectral data cube by using the
name-value pair argument
correctedData = reduceSmile(
'BlockSize'. You can specify the
'BlockSize' name-value pair argument in addition to the input arguments
in the previous syntaxes.
The function divides the input image into distinct blocks,
processes each block, and then concatenates the processed output of each block to form the
output matrix. Hyperspectral images are multi-dimensional data sets that can be too large to fit
in system memory in their entirety. This can cause the system to run out of memory while running
reduceSmile function. If you encounter such an issue, perform block
processing by using this syntax.
reduceSmile(hcube,'BlockSize',[50 50]) divides the input
image into non-overlapping blocks of size 50-by-50 and then performs smile correction on
To perform block processing by specifying the
pair argument, you must have MATLAB® R2021a or a
specifies options using one or more name-value arguments in addition to the input arguments
in the previous syntaxes. For example,
correctedData = reduceSmile(___,
'Method','MNF' specifies to
perform smile correction using the maximum noise fraction (MNF) transform-based
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.
Read hyperspectral data from the Hyperion EO-1 sensor into the workspace.
hCube = hypercube('EO1H0440342002212110PY_cropped.dat');
Typically, Oxygen molecules have strong absorption features at 762 nm wavelength and causes spectral smile. In the Hyperion EO-1 sensor, 762 nm wavelength corresponds to band 41. The spectral smile effect in band 41 also affects the bands 40 and 42. Hence, calculate the absolute difference between the pixel values of bands 40 and 42.
originalData = hCube.DataCube; band40 = originalData(:,:,40); band42 = originalData(:,:,42); bandDiffBeforeCorr = imabsdiff(band40,band42);
Display the difference image of bands 40 and 42. The spectral smile effect appears as a brightness gradient from left to right in the difference image.
imagesc(bandDiffBeforeCorr) axis image off title('Difference of Bands 40 and 42 Before Correction') colorbar
Specify the size of the averaging window to use along the spectral dimension.
window = 5;
Perform spectral smile reduction.
correctedHcube = reduceSmile(hCube,'SpectralWindow',window);
Calculate and display the absolute difference of the corrected bands 40 and 42. There is no gradient in the difference image after smile correction.
correctedData = correctedHcube.DataCube; corrBand40 = correctedData(:,:,40); corrBand42 = correctedData(:,:,42); bandDiffAfterCorr = imabsdiff(corrBand40,corrBand42); imagesc(bandDiffAfterCorr) axis image off title('Difference of Bands 40 and 42 After Smile Correction') colorbar
hcube— Input hyperspectral data
Input hyperspectral data, specified as a
DataCube property of the
object stores the hyperspectral data cube.
blocksize— Size of data blocks
Size of the data blocks, specified as a 2-element vector of positive integers. The elements of the vector correspond to the number of rows and columns in each block, respectively. The size of the data blocks must be less than the size of the input image. Dividing the hyperspectral images into smaller blocks enables you process large data sets without running out of memory.
blocksize value is too small, the memory usage
of the function reduces at the cost of increased execution time.
blocksize value is large or equal to the input
image size, the execution time reduces at the cost of increased memory
'BlockSize',[20 20] specifies the size of each data block
comma-separated pairs of
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
Method— Spectral smile correction method
Spectral smile correction method, specified as
'SpectralSmoothing' — Perform smile reduction using the
spectral smoothing method.
'MNF' — Perform smile reduction using the maximum noise
fraction (MNF) transform-based method.
SpectralWindow— Size of averaging window
3(default) | positive integer
Size of the averaging window along the spectral dimension, specified as a positive
integer that is less than or equal to the number of hyperspectral bands in the
inputData. Increasing the window size can
further reduce the smile effect, but using an averaging window greater than
9 can result in the loss of fine atmospheric absorption spectral
features. To specify this argument, you must specify the
correctedData— Corrected hyperspectral data
Corrected hyperspectral data, returned as a
hypercube object of the
size same as the input data
hcube. If the input data is of type
double, then the corrected hyperspectral data is of type
double. Otherwise, the data type of the corrected hyperspectral
 Perkins, Timothy, Steven M. Adler-Golden, Michael W. Matthew, Alexander Berk, Lawrence S. Bernstein, Jasmine Lee, and Marsha E. Fox. "Speed and Accuracy Improvements in FLAASH Atmospheric Correction of Hyperspectral Imagery." Optical Engineering 51, no. 11 (June 13, 2012): 111707, https://doi.org/10.1117/1.OE.51.11.111707.
 Yokoya, Naoto, Norihide Miyamura, and Akira Iwasaki. “Detection and Correction of Spectral and Spatial Misregistrations for Hyperspectral Data Using Phase Correlation Method.” Applied Optics 49, no. 24 (August 20, 2010): 4568. https://doi.org/10.1364/AO.49.004568.