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...
 
struct  LoadUpsampledIHSDataThreadParameters
 
class  OutputParameters
 IHSFusion output parameters. More...
 
struct  SaveRGBDataThreadParameters
 
struct  SwapIntensityThreadParameters
 

Public Member Functions

bool execute (AlgorithmOutputParameters &outputParams)
 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)
 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 ()
 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::rst::Raster &inputRaster, const unsigned int inputRasterBand, double &mean, double &stdDev, double &min, double &max) const
 Get statistics from the given raster band. More...
 
bool loadUpsampledIHSData (const te::rst::Grid &upsampledGrid, const double &rgbMin, const double rgbMax, std::unique_ptr< te::rst::Raster > &ihsRasterPtr) const
 Load resampled IHS data from the lower resolution input image. More...
 
bool saveRGBData (const double &rgbMin, const double &rgbMax, const std::string &rType, const std::map< std::string, std::string > &rInfo, std::unique_ptr< te::rst::Raster > &outputRasterPtr, const te::rst::Raster &ihsRaster)
 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 (const te::rst::Raster &highResRaster, const unsigned int highResRasterBand, te::rst::Raster &ihsRaster)
 Swap the intensity data by the high resolution image data. More...
 

Static Protected Member Functions

static void loadUpsampledIHSDataThreadEntry (LoadUpsampledIHSDataThreadParameters *paramsPtr)
 
static void saveRGBDataThreadEntry (SaveRGBDataThreadParameters *paramsPtr)
 
static void swapIntensityThreadEntry (SwapIntensityThreadParameters *paramsPtr)
 

Protected Attributes

InputParameters m_inputParameters
 Input execution parameters. More...
 
bool m_isInitialized
 Tells if this instance is initialized. More...
 

Private Attributes

std::string m_errorMessage
 Current error message. 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 59 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)
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::rst::Raster inputRaster,
const unsigned int  inputRasterBand,
double &  mean,
double &  stdDev,
double &  min,
double &  max 
) const
protected

Get statistics from the given raster band.

Parameters
inputRasterInput raster.
inputRasterBandInput raster band index.
meanMean value.
varianceVariance value.
maxMaximum value.
minMinimum value.
Returns
true if ok, false on errors.

◆ initialize()

bool te::rp::IHSFusion::initialize ( const AlgorithmInputParameters inputParams)
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.

◆ loadUpsampledIHSData()

bool te::rp::IHSFusion::loadUpsampledIHSData ( const te::rst::Grid upsampledGrid,
const double &  rgbMin,
const double  rgbMax,
std::unique_ptr< te::rst::Raster > &  ihsRasterPtr 
) const
protected

Load resampled IHS data from the lower resolution input image.

Parameters
upsampledGridTarget upsampled grid.
rgbMinRGB minimum value.
rgbMaxRGB maximum value.
ihsRasterPtrOutput raster (3 bands - IHS).
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].

◆ loadUpsampledIHSDataThreadEntry()

static void te::rp::IHSFusion::loadUpsampledIHSDataThreadEntry ( LoadUpsampledIHSDataThreadParameters paramsPtr)
staticprotected

◆ reset()

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

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

Reimplemented from te::rp::Algorithm.

◆ saveRGBData()

bool te::rp::IHSFusion::saveRGBData ( const double &  rgbMin,
const double &  rgbMax,
const std::string &  rType,
const std::map< std::string, std::string > &  rInfo,
std::unique_ptr< te::rst::Raster > &  outputRasterPtr,
const te::rst::Raster ihsRaster 
)
protected

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

Parameters
rgbMinRGB minimum value.
rgbMaxRGB maximum value.
rTypeOutput raster driver type.
rInfoOutput raster info.
ihsRasterIHS raster.
outputRasterPtrOutput raster pointer.
Returns
true if ok, false on errors.

◆ saveRGBDataThreadEntry()

static void te::rp::IHSFusion::saveRGBDataThreadEntry ( SaveRGBDataThreadParameters paramsPtr)
staticprotected

◆ 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 ( const te::rst::Raster highResRaster,
const unsigned int  highResRasterBand,
te::rst::Raster ihsRaster 
)
protected

Swap the intensity data by the high resolution image data.

Parameters
highResRasterHigh resolution raster.
highResRasterBandHight resolution raster band.
ihsRasterIHS raster.
Returns
true if ok, false on errors.

◆ swapIntensityThreadEntry()

static void te::rp::IHSFusion::swapIntensityThreadEntry ( SwapIntensityThreadParameters paramsPtr)
staticprotected

Member Data Documentation

◆ m_errorMessage

std::string te::rp::Algorithm::m_errorMessage
privateinherited

Current error message.

Definition at line 104 of file Algorithm.h.

◆ m_inputParameters

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

Input execution parameters.

Definition at line 235 of file IHSFusion.h.

◆ m_isInitialized

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

Tells if this instance is initialized.

Definition at line 237 of file IHSFusion.h.


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