te::rp::IHSFusion Class Reference

Fusion of a low-resolution multi-band image with a high resolution image using the IHS method. More...

#include <IHSFusion.h>

Inheritance diagram for te::rp::IHSFusion:
te::rp::Algorithm

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...
 
const std::string & getErrorMessage () const
 Return the current error message if there is any. 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::unique_ptr< te::rst::Raster > &outputRasterPtr) const
 Save resampled IHS data as RGB data to the output image. More...
 
void setErrorMessage (const std::string &newErrorMessage)
 Set the current error message. 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...
 

Detailed Description

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.

Note
This algorithm expects both images to be aligned over the same geographic region. No reprojection or crop operations are performed.
Reference: 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.
Reference: 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 56 of file IHSFusion.h.

Constructor & Destructor Documentation

◆ IHSFusion()

te::rp::IHSFusion::IHSFusion ( )

◆ ~IHSFusion()

te::rp::IHSFusion::~IHSFusion ( )

Member Function Documentation

◆ execute()

bool te::rp::IHSFusion::execute ( AlgorithmOutputParameters outputParams)
throw (te::rp::Exception
)
virtual

Executes the algorithm using the supplied parameters.

Parameters
outputParamsOutput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via Algorithm::getErrorMessage()

Implements te::rp::Algorithm.

◆ getErrorMessage()

const std::string& te::rp::Algorithm::getErrorMessage ( ) const
inherited

Return the current error message if there is any.

Returns
Return the current error message if there is any.

◆ getRGBRange()

bool te::rp::IHSFusion::getRGBRange ( double &  rgbMin,
double &  rgbMax 
) const
protected

Get the minimum and maximum values from the RGB input image.

Parameters
rgbMinRGB minimum value.
rgbMaxRGB maximum value.
Returns
true if ok, false on errors.

◆ getStatistics()

bool te::rp::IHSFusion::getStatistics ( const te::rp::Matrix< float > &  matrix,
float &  mean,
float &  variance 
) const
protected

Get statistics from the given matrix.

Parameters
matrixInput matrix.
meanMean value.
varianceVariance value.
Returns
true if ok, false on errors.

◆ initialize()

bool te::rp::IHSFusion::initialize ( const AlgorithmInputParameters inputParams)
throw (te::rp::Exception
)
virtual

Initialize the algorithm instance making it ready for execution.

Parameters
inputParamsInput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via Algorithm::getErrorMessage()

Implements te::rp::Algorithm.

◆ isInitialized()

bool te::rp::IHSFusion::isInitialized ( ) const
virtual

Returns true if the algorithm instance is initialized and ready for execution.

Returns
true if the algorithm instance is initialized and ready for execution.

Implements te::rp::Algorithm.

◆ loadIHSData()

bool te::rp::IHSFusion::loadIHSData ( const double &  rgbMin,
const double  rgbMax,
te::rp::Matrix< float > &  intensityData,
te::rp::Matrix< float > &  hueData,
te::rp::Matrix< float > &  saturationData 
) const
protected

Load resampled IHS data from the input image.

Parameters
rgbMinRGB minimum value.
rgbMaxRGB maximum value.
intensityDataIntensity channel data.
hueDataHue channel data.
saturationDataSaturation channel data.
Returns
true if ok, false on errors.
Note
IHS data with the following channels ranges: I:[0,1] H:[0,2pi] (radians) S:[0,1].

◆ reset()

void te::rp::IHSFusion::reset ( )
throw (te::rp::Exception
)
virtual

Clear all internal allocated objects and reset the algorithm to its initial state.

Reimplemented from te::rp::Algorithm.

◆ saveIHSData()

bool te::rp::IHSFusion::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::unique_ptr< te::rst::Raster > &  outputRasterPtr 
) const
protected

Save resampled IHS data as RGB data to the output image.

Parameters
rgbMinRGB minimum value.
rgbMaxRGB maximum value.
intensityDataIntensity channel data.
hueDataHue channel data.
saturationDataSaturation channel data.
Returns
true if ok, false on errors.

◆ setErrorMessage()

void te::rp::Algorithm::setErrorMessage ( const std::string &  newErrorMessage)
protectedinherited

Set the current error message.

Parameters
newErrorMessageNew error message;

◆ swapIntensity()

bool te::rp::IHSFusion::swapIntensity ( te::rp::Matrix< float > &  intensityData)
protected

Swap the intensity data by the high resolution image data.

Parameters
intensityDataIntensity channel data.
Returns
true if ok, false on errors.

Member Data Documentation

◆ m_inputParameters

InputParameters te::rp::IHSFusion::m_inputParameters
protected

Input execution parameters.

Definition at line 152 of file IHSFusion.h.

◆ m_isInitialized

bool te::rp::IHSFusion::m_isInitialized
protected

Tells if this instance is initialized.

Definition at line 154 of file IHSFusion.h.


The documentation for this class was generated from the following file: