customSpectralIndex
Syntax
Description
Custom spectral indices can ease workflows where standard hyperspectral indices are not applicable. You can use a custom spectral index to define and compute an index specific to your application. You can also use a custom spectral index to fine-tune commonly used spectral indices to your specific hyperspectral data.
computes a custom spectral index using the custom formula specified by the function handle
indexImage
= customSpectralIndex(hCube
,wavelengths
,func
)func
. The formula uses the specified wavelengths,
wavelengths
, in the hyperspectral data cube
hCube
.
specifies the block size, indexImage
= customSpectralIndex(hCube
,wavelengths
,func
,BlockSize=blocksize
)blocksize
, for block processing of the
hyperspectral data cube. The function divides the input image into distinct blocks,
processes each block, and then concatenates the processed output of the blocks to form the
final output.
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™ or MATLAB Mobile™ do not support the library.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2023a