Fusion of a low-resolution multi-band image with a high resolution image using the IHS method. More...
#include <IHSFusion.h>
Classes | |
class | InputParameters |
IHSFusion input parameters. More... | |
class | OutputParameters |
IHSFusion output parameters. More... | |
Public Member Functions | |
bool | execute (AlgorithmOutputParameters &outputParams) throw ( te::rp::Exception ) |
Executes the algorithm using the supplied parameters. More... | |
IHSFusion () | |
bool | initialize (const AlgorithmInputParameters &inputParams) throw ( te::rp::Exception ) |
Initialize the algorithm instance making it ready for execution. More... | |
bool | isInitialized () const |
Returns true if the algorithm instance is initialized and ready for execution. More... | |
void | reset () throw ( te::rp::Exception ) |
Clear all internal allocated objects and reset the algorithm to its initial state. More... | |
~IHSFusion () | |
Protected Member Functions | |
bool | getRGBRange (double &rgbMin, double &rgbMax) const |
Get the minimum and maximum values from the RGB input image. More... | |
bool | getStatistics (const te::rp::Matrix< float > &matrix, float &mean, float &variance) const |
Get statistics from the given matrix. More... | |
bool | loadIHSData (const double &rgbMin, const double rgbMax, te::rp::Matrix< float > &intensityData, te::rp::Matrix< float > &hueData, te::rp::Matrix< float > &saturationData) const |
Load resampled IHS data from the input image. More... | |
bool | saveIHSData (const double &rgbMin, const double rgbMax, const te::rp::Matrix< float > &intensityData, const te::rp::Matrix< float > &hueData, const te::rp::Matrix< float > &saturationData, const std::string &rType, const std::map< std::string, std::string > &rInfo, std::auto_ptr< te::rst::Raster > &outputRasterPtr) const |
Save resampled IHS data as RGB data to the output image. More... | |
bool | swapIntensity (te::rp::Matrix< float > &intensityData) |
Swap the intensity data by the high resolution image data. More... | |
Protected Attributes | |
InputParameters | m_inputParameters |
Input execution parameters. More... | |
bool | m_isInitialized |
Tells if this instance is initialized. More... | |
Fusion of a low-resolution multi-band image with a high resolution image using the IHS method.
The IHS is one of the widespread image fusion methods in the remote sensing community and has been employed as a standard procedure in many commercial packages; IHS is the intrinsic method when the intensity channel is replaced by the high-resolution Pan image.
Te-Ming Tu, Shun-Chi Su, Hsuen-Chyun Shyu, Ping S. Huang, A new look at IHS-like image fusion methods, Information Fusion, Volume 2, Issue 3, September 2001, Pages 177-186, ISSN 1566-2535.
W.J. Carper, T.M. Lillesand, R.W. Kiefer, The use of intensity-hue-saturation transformations for merging SPOT panchromatic and multispectral image data Photogramm. Eng. Remote Sensing, 56 (1990), pp. 459–467.
Definition at line 54 of file IHSFusion.h.
te::rp::IHSFusion::IHSFusion | ( | ) |
Definition at line 141 of file IHSFusion.cpp.
References reset().
te::rp::IHSFusion::~IHSFusion | ( | ) |
Definition at line 146 of file IHSFusion.cpp.
|
virtual |
Executes the algorithm using the supplied parameters.
outputParams | Output parameters. |
Implements te::rp::Algorithm.
Definition at line 150 of file IHSFusion.cpp.
References getRGBRange(), loadIHSData(), te::rp::IHSFusion::InputParameters::m_enableProgress, m_inputParameters, m_isInitialized, te::rp::IHSFusion::OutputParameters::m_outputRasterPtr, te::rp::IHSFusion::OutputParameters::m_rInfo, te::rp::IHSFusion::OutputParameters::m_rType, te::rp::Matrix< TemplateElementType >::reset(), saveIHSData(), swapIntensity(), TERP_TRUE_OR_RETURN_FALSE, and TERP_TRUE_OR_THROW.
|
protected |
Get the minimum and maximum values from the RGB input image.
rgbMin | RGB minimum value. |
rgbMax | RGB maximum value. |
Definition at line 303 of file IHSFusion.cpp.
References te::rst::Raster::getBand(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getValue(), m_inputParameters, te::rp::IHSFusion::InputParameters::m_lowResRasterBlueBandIndex, te::rp::IHSFusion::InputParameters::m_lowResRasterGreenBandIndex, te::rp::IHSFusion::InputParameters::m_lowResRasterPtr, te::rp::IHSFusion::InputParameters::m_lowResRasterRedBandIndex, te::rst::BandProperty::m_noDataValue, te::rp::IHSFusion::InputParameters::m_RGBMax, and te::rp::IHSFusion::InputParameters::m_RGBMin.
Referenced by execute().
|
protected |
Get statistics from the given matrix.
matrix | Input matrix. |
mean | Mean value. |
variance | Variance value. |
Definition at line 494 of file IHSFusion.cpp.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), and te::rp::Matrix< TemplateElementType >::getLinesNumber().
Referenced by swapIntensity().
|
virtual |
Initialize the algorithm instance making it ready for execution.
inputParams | Input parameters. |
Implements te::rp::Algorithm.
Definition at line 241 of file IHSFusion.cpp.
References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getNumberOfBands(), te::rp::IHSFusion::InputParameters::m_highResRasterBand, te::rp::IHSFusion::InputParameters::m_highResRasterPtr, m_inputParameters, m_isInitialized, te::rp::IHSFusion::InputParameters::m_lowResRasterBlueBandIndex, te::rp::IHSFusion::InputParameters::m_lowResRasterGreenBandIndex, te::rp::IHSFusion::InputParameters::m_lowResRasterPtr, te::rp::IHSFusion::InputParameters::m_lowResRasterRedBandIndex, te::rp::IHSFusion::InputParameters::m_RGBMax, te::rp::IHSFusion::InputParameters::m_RGBMin, te::common::RAccess, reset(), TERP_TRUE_OR_RETURN_FALSE, and TERP_TRUE_OR_THROW.
|
virtual |
Returns true if the algorithm instance is initialized and ready for execution.
Implements te::rp::Algorithm.
Definition at line 298 of file IHSFusion.cpp.
References m_isInitialized.
|
protected |
Load resampled IHS data from the input image.
rgbMin | RGB minimum value. |
rgbMax | RGB maximum value. |
intensityData | Intensity channel data. |
hueData | Hue channel data. |
saturationData | Saturation channel data. |
Definition at line 361 of file IHSFusion.cpp.
References te::rst::Raster::getBand(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Interpolator::getValue(), te::rp::IHSFusion::InputParameters::m_highResRasterPtr, m_inputParameters, te::rp::IHSFusion::InputParameters::m_interpMethod, te::rp::IHSFusion::InputParameters::m_lowResRasterBlueBandIndex, te::rp::IHSFusion::InputParameters::m_lowResRasterGreenBandIndex, te::rp::IHSFusion::InputParameters::m_lowResRasterPtr, te::rp::IHSFusion::InputParameters::m_lowResRasterRedBandIndex, te::rst::BandProperty::m_noDataValue, M_PI, and te::rp::Matrix< TemplateElementType >::reset().
Referenced by execute().
|
virtual |
Clear all internal allocated objects and reset the algorithm to its initial state.
Implements te::rp::Algorithm.
Definition at line 235 of file IHSFusion.cpp.
References m_inputParameters, m_isInitialized, and te::rp::IHSFusion::InputParameters::reset().
Referenced by IHSFusion(), initialize(), te::rp::IHSFusion::InputParameters::InputParameters(), te::rp::IHSFusion::InputParameters::operator=(), te::rp::IHSFusion::OutputParameters::operator=(), te::rp::IHSFusion::OutputParameters::OutputParameters(), te::rp::IHSFusion::InputParameters::~InputParameters(), and te::rp::IHSFusion::OutputParameters::~OutputParameters().
|
protected |
Save resampled IHS data as RGB data to the output image.
rgbMin | RGB minimum value. |
rgbMax | RGB maximum value. |
intensityData | Intensity channel data. |
hueData | Hue channel data. |
saturationData | Saturation channel data. |
Definition at line 605 of file IHSFusion.cpp.
References te::rst::Raster::getBand(), te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rst::Grid::getExtent(), te::rst::Raster::getGrid(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Grid::getSRID(), te::rp::IHSFusion::InputParameters::m_highResRasterPtr, m_inputParameters, te::rp::IHSFusion::InputParameters::m_lowResRasterBlueBandIndex, te::rp::IHSFusion::InputParameters::m_lowResRasterGreenBandIndex, te::rp::IHSFusion::InputParameters::m_lowResRasterPtr, te::rp::IHSFusion::InputParameters::m_lowResRasterRedBandIndex, M_PI, te::rst::RasterFactory::make(), MAX, MIN, te::rst::Band::setValue(), and TERP_TRUE_OR_RETURN_FALSE.
Referenced by execute().
|
protected |
Swap the intensity data by the high resolution image data.
intensityData | Intensity channel data. |
Definition at line 537 of file IHSFusion.cpp.
References te::rst::Raster::getBand(), te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), getStatistics(), te::rst::Band::getValue(), te::rp::IHSFusion::InputParameters::m_highResRasterBand, te::rp::IHSFusion::InputParameters::m_highResRasterPtr, and m_inputParameters.
Referenced by execute().
|
protected |
Input execution parameters.
Definition at line 150 of file IHSFusion.h.
Referenced by execute(), getRGBRange(), initialize(), loadIHSData(), reset(), saveIHSData(), and swapIntensity().
|
protected |
Tells if this instance is initialized.
Definition at line 152 of file IHSFusion.h.
Referenced by execute(), initialize(), isInitialized(), and reset().