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... | |
| 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... | |
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.
Definition at line 56 of file IHSFusion.h.
| te::rp::IHSFusion::IHSFusion | ( | ) |
Definition at line 141 of file src/terralib/rp/IHSFusion.cpp.
References te::rp::IHSFusion::InputParameters::reset(), and ~IHSFusion().
|
default |
Referenced by IHSFusion().
|
virtual | ||||||||||||||
Executes the algorithm using the supplied parameters.
| outputParams | Output parameters. |
Implements te::rp::Algorithm.
Definition at line 148 of file src/terralib/rp/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_INSTANCE_TRUE_OR_RETURN_FALSE, and TERP_TRUE_OR_THROW.
Referenced by BOOST_AUTO_TEST_SUITE(), te::qt::widgets::FusionWizard::executeIHS(), and IHSFusion().
|
inherited |
Return the current error message if there is any.
Definition at line 44 of file rp/Algorithm.cpp.
References te::rp::Algorithm::m_errorMessage.
Referenced by te::qt::widgets::FilterDialogForm::applyPreview(), te::qt::widgets::PostClassificationWidget::execute(), te::qt::widgets::ClassifierWizard::execute(), te::qt::widgets::MixtureModelWizard::execute(), te::qt::widgets::ContrastDialogForm::execute(), te::qt::widgets::FilterDialogForm::execute(), te::qt::widgets::ArithmeticOpDialogForm::execute(), te::qt::widgets::MosaicWizard::executeGeoMosaic(), te::qt::widgets::FusionWizard::executeIHS(), te::qt::widgets::FusionWizard::executePCA(), te::qt::widgets::MosaicWizard::executeSequenceMosaic(), te::qt::widgets::MosaicWizard::executeTiePointMosaic(), and te::qt::widgets::FusionWizard::executeWisper().
|
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 src/terralib/rp/IHSFusion.cpp.
References col, 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, te::rp::IHSFusion::InputParameters::m_RGBMin, and nCols.
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 src/terralib/rp/IHSFusion.cpp.
References col, te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), and nCols.
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 src/terralib/rp/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, te::rp::IHSFusion::InputParameters::reset(), TERP_INSTANCE_TRUE_OR_RETURN_FALSE, and TERP_TRUE_OR_THROW.
Referenced by BOOST_AUTO_TEST_SUITE(), te::qt::widgets::FusionWizard::executeIHS(), and IHSFusion().
|
virtual |
Returns true if the algorithm instance is initialized and ready for execution.
Implements te::rp::Algorithm.
Definition at line 298 of file src/terralib/rp/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 src/terralib/rp/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.
Reimplemented from te::rp::Algorithm.
Definition at line 233 of file src/terralib/rp/IHSFusion.cpp.
References m_inputParameters, m_isInitialized, te::rp::Algorithm::reset(), and te::rp::IHSFusion::InputParameters::reset().
|
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 604 of file src/terralib/rp/IHSFusion.cpp.
References col, te::rst::Raster::getBand(), te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rst::Raster::getGrid(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::sa::Grid, 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, nCols, te::rst::Band::setValue(), and TERP_TRUE_OR_RETURN_FALSE.
Referenced by execute().
|
protectedinherited |
Set the current error message.
| newErrorMessage | New error message; |
Definition at line 49 of file rp/Algorithm.cpp.
References te::rp::Algorithm::m_errorMessage.
|
protected |
Swap the intensity data by the high resolution image data.
| intensityData | Intensity channel data. |
Definition at line 537 of file src/terralib/rp/IHSFusion.cpp.
References band, col, 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, m_inputParameters, and nCols.
Referenced by execute().
|
protected |
Input execution parameters.
Definition at line 152 of file IHSFusion.h.
Referenced by execute(), getRGBRange(), initialize(), loadIHSData(), reset(), saveIHSData(), and swapIntensity().
|
protected |
Tells if this instance is initialized.
Definition at line 154 of file IHSFusion.h.
Referenced by execute(), initialize(), isInitialized(), and reset().