diff --git a/Examples/DimensionReduction/ICAExample.cxx b/Examples/DimensionReduction/ICAExample.cxx index 7277842d8065968cb2d0f8cc8d592e935e7c6aac..5078a9793f1881f4bb8e1fb758e3be56b7adda58 100644 --- a/Examples/DimensionReduction/ICAExample.cxx +++ b/Examples/DimensionReduction/ICAExample.cxx @@ -31,10 +31,15 @@ // // This example illustrates the use of the // \doxygen{otb}{FastICAImageFilter}. -// This filter computes a Principal Component Analysis using an -// efficient method based on the inner product in order to compute the -// covariance matrix. +// This filter computes a Fast Independant Components Analysis transform. // +// Like Principal Components Analysis, FastICA computes a set of +// orthogonal linear combinations, but the criterion of Fast ICA is +// different: instead of maximizing variance, it tries to maximize +// stastistical independance between components. In Fast ICA, +// statistical independance is mesured by evaluating non-Gaussianity +// of the components, and the maximization is done in an iterative way. + // The first step required to use this filter is to include its header file. // // Software Guide : EndLatex @@ -144,7 +149,7 @@ int main(int argc, char* argv[]) // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // - // We finally plug the pipeline and trigger the PCA computation with + // We finally plug the pipeline and trigger the ICA computation with // the method \code{Update()} of the writer. // // Software Guide : EndLatex @@ -159,7 +164,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginLatex // // \doxygen{otb}{FastICAImageFilter} allows also to compute inverse - // transformation from PCA coefficients. In reverse mode, the + // transformation from ICA coefficients. In reverse mode, the // covariance matrix or the transformation matrix // (which may not be square) has to be given. // @@ -173,7 +178,8 @@ int main(int argc, char* argv[]) invFilter->SetMeanValues( FastICAfilter->GetMeanValues() ); invFilter->SetStdDevValues( FastICAfilter->GetStdDevValues() ); invFilter->SetTransformationMatrix( FastICAfilter->GetTransformationMatrix() ); - invFilter->SetPCATransformationMatrix( FastICAfilter->GetPCATransformationMatrix() ); + invFilter->SetPCATransformationMatrix( + FastICAfilter->GetPCATransformationMatrix() ); invFilter->SetInput(FastICAfilter->GetOutput()); WriterType::Pointer invWriter = WriterType::New(); diff --git a/Examples/DimensionReduction/MNFExample.cxx b/Examples/DimensionReduction/MNFExample.cxx index 8977d85bdb74c7b16cbc9ffc86ed02ed0d362d85..bc4d6df8500e3ab770ef42749d9050fbe48272ed 100644 --- a/Examples/DimensionReduction/MNFExample.cxx +++ b/Examples/DimensionReduction/MNFExample.cxx @@ -30,11 +30,22 @@ // Software Guide : BeginLatex // // This example illustrates the use of the -// \doxygen{otb}{MNFImageFilter}. -// This filter computes a Principal Component Analysis using an +// \doxygen{otb}{MNFImageFilter}. This filter computes a Minimum +// Noise Fraction transform \cite{nielsen2011kernel} using an // efficient method based on the inner product in order to compute the // covariance matrix. // +// The Minimum Noise Fraction transform is a sequence of two Principal +// Components Analysis transform. The first transform is based on an +// estimated covariance matrix of the noise, and intends to whiten the +// input image (noise with unit variance and no correlation between +// bands). +// +// The second Principal Components Analysis is then applied to the +// noise-whitened image, giving the Minimum Noise Fraction transform. +// +// In this implementation, noise is estimated from a local window. +// // The first step required to use this filter is to include its header file. // // Software Guide : EndLatex @@ -100,7 +111,7 @@ int main(int argc, char* argv[]) // Software Guide : EndLatex // SoftwareGuide : BeginCodeSnippet - typedef otb::LocalActivityVectorImageFilter< ImageType, ImageType > NoiseFilterType; + typedef otb::LocalActivityVectorImageFilter NoiseFilterType; // SoftwareGuide : EndCodeSnippet @@ -167,7 +178,7 @@ int main(int argc, char* argv[]) // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // - // We finally plug the pipeline and trigger the PCA computation with + // We finally plug the pipeline and trigger the MNF computation with // the method \code{Update()} of the writer. // // Software Guide : EndLatex @@ -182,7 +193,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginLatex // // \doxygen{otb}{MNFImageFilter} allows also to compute inverse - // transformation from PCA coefficients. In reverse mode, the + // transformation from MNF coefficients. In reverse mode, the // covariance matrix or the transformation matrix // (which may not be square) has to be given. // diff --git a/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx b/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx index ffd26e2538a462ff95c442349c6e4d79c1487587..6dd258860a20ba5981a94e8f6b9a87b37a1f801f 100644 --- a/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx +++ b/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx @@ -28,7 +28,16 @@ // Software Guide : BeginLatex // This example illustrates the class -// \doxygen{otb}{MaximumAutocorrelationFactorImageFilter} ... +// \doxygen{otb}{MaximumAutocorrelationFactorImageFilter}, which +// performs a Maximum Autocorrelation Factor transform \cite{nielsen2011kernel}. Like +// PCA, MAF tries to find a set of orthogonal linear transform, but +// the criterion to maximize is the auto-correlation rather than the +// variance. +// +// Auto-correlation is the correlation between the component and a +// unitary shifted version of the component. +// +// Please note that the inverse transform is not implemented yet. // // We start by including the corresponding header file. // diff --git a/Examples/DimensionReduction/NAPCAExample.cxx b/Examples/DimensionReduction/NAPCAExample.cxx index cf24000d18553a33bc2c87ce0b6bc32f94820464..6ecc58b916ab2c1da849393ba0b6217da1f3efa3 100644 --- a/Examples/DimensionReduction/NAPCAExample.cxx +++ b/Examples/DimensionReduction/NAPCAExample.cxx @@ -100,7 +100,7 @@ int main(int argc, char* argv[]) // Software Guide : EndLatex // SoftwareGuide : BeginCodeSnippet - typedef otb::LocalActivityVectorImageFilter< ImageType, ImageType > NoiseFilterType; + typedef otb::LocalActivityVectorImageFilter NoiseFilterType; // SoftwareGuide : EndCodeSnippet @@ -167,7 +167,7 @@ int main(int argc, char* argv[]) // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // - // We finally plug the pipeline and trigger the PCA computation with + // We finally plug the pipeline and trigger the NA-PCA computation with // the method \code{Update()} of the writer. // // Software Guide : EndLatex @@ -182,7 +182,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginLatex // // \doxygen{otb}{NAPCAImageFilter} allows also to compute inverse - // transformation from PCA coefficients. In reverse mode, the + // transformation from NA-PCA coefficients. In reverse mode, the // covariance matrix or the transformation matrix // (which may not be square) has to be given. // @@ -209,7 +209,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginLatex // Figure~\ref{fig:NAPCA_FILTER} shows the result of applying forward - // and reverse NAPCA transformation to a 8 bands Wordlview2 image. + // and reverse NA-PCA transformation to a 8 bands Wordlview2 image. // \begin{figure} // \center // \includegraphics[width=0.32\textwidth]{napca-input-pretty.eps}