subtractDarkPixel
Syntax
Description
subtracts the minimum pixel value of each band from all pixels in that band of the
hyperspectral or multispectral data, correctedData
= subtractDarkPixel(inputData
)inputData
. The pixels with minimum
intensity values are the dark pixels of the spectral data.
subtracts the specified value, correctedData
= subtractDarkPixel(inputData
,darkPixels
)darkPixels
, from each spectral band. You
can specify a single value to subtract across all bands of the data cube, a separate value
for each band, or separate values for each pixel in each band. After subtraction, the
function sets all negative pixel values to 0
.
specifies the block size for block processing of the spectral data. (since R2021a)correctedData
= subtractDarkPixel(___,BlockSize=blocksize
)
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. Spectral 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
the subtractDarkPixel
function. If you encounter such an issue, perform block
processing by using this syntax.
For example, subtractDarkPixel(inputData,darkPixels,BlockSize=[50
50])
divides the input image into non-overlapping blocks of size 50-by-50 and
then performs dark pixel subtraction on each block.
Note
This function requires the Hyperspectral Imaging Library for Image Processing Toolbox™. You can install the Hyperspectral Imaging Library for Image Processing Toolbox from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.
The Hyperspectral Imaging Library for Image Processing Toolbox requires desktop MATLAB®, as MATLAB Online™ and MATLAB Mobile™ do not support the library.
Examples
Input Arguments
Output Arguments
References
[1] Souri, A. H. and M. A. Sharifi. "Evaluation of Scene-Based Empirical Approaches for Atmospheric Correction of Hyperspectral Imagery." Paper presented at the 33rd Asian Conference on Remote Sensing, Pattaya, Thailand, November 2012.
Version History
Introduced in R2020bSee Also
hypercube
| multicube
| iarr
| flatField
| logResiduals
| empiricalLine
| reduceSmile
| sharc