From 9b518922e75e1e79ca70967680c32ffce6f65df9 Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Sat, 28 Jan 2012 23:56:44 +0100
Subject: [PATCH] DOC: Dimension reduction examples improvements

---
 Code/BasicFilters/otbMNFImageFilter.h         |  8 ++---
 Examples/DimensionReduction/ICAExample.cxx    |  7 +++--
 Examples/DimensionReduction/MNFExample.cxx    | 23 +++++++++++----
 .../MaximumAutocorrelationFactor.cxx          |  2 +-
 Examples/DimensionReduction/NAPCAExample.cxx  | 29 +++++++++++++++++--
 5 files changed, 53 insertions(+), 16 deletions(-)

diff --git a/Code/BasicFilters/otbMNFImageFilter.h b/Code/BasicFilters/otbMNFImageFilter.h
index e488ce1950..13dc7add7d 100644
--- a/Code/BasicFilters/otbMNFImageFilter.h
+++ b/Code/BasicFilters/otbMNFImageFilter.h
@@ -29,15 +29,15 @@
 namespace otb {
 
 /** \class MNFImageFilter
- * \brief Performs a Minimum Noise Fraction analysis of a vector image.
+ * \brief Performs a Maximum Noise Fraction analysis of a vector image.
  *
  * The internal structure of this filter is a filter-to-filter like structure.
- * The estimation of the covariance matrix has persistent capabilities...
+ * The estimation of the covariance matrix is streamed
  *
  * The high pass filter which has to be used for the noise estimation is templated
- * for a better scalability...
+ * for a better scalability.
  *
- * TODO? Utiliser une 2e entree pour donner directement une image de bruit ??
+ * TODO? Utiliser une 2e entree pour donner directement une image de bruit ?
  *
  * \sa otbStreamingStatisticsVectorImageFilter
  * \sa PCAImageFiler
diff --git a/Examples/DimensionReduction/ICAExample.cxx b/Examples/DimensionReduction/ICAExample.cxx
index bc3d10ae2f..7aab2fe9e6 100644
--- a/Examples/DimensionReduction/ICAExample.cxx
+++ b/Examples/DimensionReduction/ICAExample.cxx
@@ -33,10 +33,13 @@
 // \doxygen{otb}{FastICAImageFilter}.
 // This filter computes a Fast Independant Components Analysis transform.
 //
-// Like Principal Components Analysis, FastICA computes a set of
+// Like Principal Components Analysis, Independent Component Analysis
+// \cite{jutten1991blind} 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,
+// stastistical independance between components.
+// 
+// In the Fast ICA algorithm \cite{hyvarinen1999fast},
 // statistical independance is mesured by evaluating non-Gaussianity
 // of the components, and the maximization is done in an iterative way.
 
diff --git a/Examples/DimensionReduction/MNFExample.cxx b/Examples/DimensionReduction/MNFExample.cxx
index 0d56269f08..466bc969f1 100644
--- a/Examples/DimensionReduction/MNFExample.cxx
+++ b/Examples/DimensionReduction/MNFExample.cxx
@@ -30,19 +30,19 @@
 // Software Guide : BeginLatex
 //
 // This example illustrates the use of the
-// \doxygen{otb}{MNFImageFilter}.  This filter computes a Minimum
-// Noise Fraction transform \cite{nielsen2011kernel} using an
+// \doxygen{otb}{MNFImageFilter}.  This filter computes a Maximum
+// Noise Fraction transform \cite{green1988transformation} 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
+// The Maximum Noise Fraction transform is a sequence of two Principal
+// Component Analysis transforms. 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.
+// The second Principal Component Analysis is then applied to the
+// noise-whitened image, giving the Maximum Noise Fraction transform.
 //
 // In this implementation, noise is estimated from a local window.
 //
@@ -106,6 +106,17 @@ int main(int argc, char* argv[])
 
   // Software Guide : BeginLatex
   //
+  // In contrast with standard Principal Component Analysis, MNF
+  // needs an estimation of the noise correlation matrix
+  // in the dataset prior to transformation.
+  //
+  // A classical approach is to use spatial gradient images
+  // and infer the noise correlation matrix from it.
+  // The method of noise estimation can be customized
+  // by templating the \doxygen{otb}{MNFImageFilter}
+  // with the desired noise estimation method.
+  //
+  // In this implementation, noise is estimated from a local window.
   // We define the type of the noise filter.
   //
   // Software Guide : EndLatex
diff --git a/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx b/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx
index 2a96ec70c1..752826e4a7 100644
--- a/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx
+++ b/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx
@@ -31,7 +31,7 @@
 // \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
+// the criterion to maximize is the spatial auto-correlation rather than the
 // variance.
 //
 // Auto-correlation is the correlation between the component and a
diff --git a/Examples/DimensionReduction/NAPCAExample.cxx b/Examples/DimensionReduction/NAPCAExample.cxx
index 448b766e91..ea61405997 100644
--- a/Examples/DimensionReduction/NAPCAExample.cxx
+++ b/Examples/DimensionReduction/NAPCAExample.cxx
@@ -30,11 +30,22 @@
 // Software Guide : BeginLatex
 //
 // This example illustrates the use of the
-// \doxygen{otb}{NAPCAImageFilter}.
-// This filter computes a Principal Component Analysis using an
+// \doxygen{otb}{NAPCAImageFilter}.  This filter computes a Noise-Adjusted
+// Principal Component Analysis transform \cite{lee1990enhancement} using an
 // efficient method based on the inner product in order to compute the
 // covariance matrix.
 //
+// The Noise-Adjusted Principal Component Analysis transform is a sequence 
+// of two Principal Component Analysis transforms. 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 Component Analysis is then applied to the
+// noise-whitened image, giving the Maximum Noise Fraction transform.
+//
+// It is basically a reformulation of the Maximum Noise Fraction algorithm.
+//
 // The first step required to use this filter is to include its header file.
 //
 // Software Guide : EndLatex
@@ -95,6 +106,17 @@ int main(int argc, char* argv[])
 
   // Software Guide : BeginLatex
   //
+  // In contrast with standard Principal Component Analysis, NA-PCA
+  // needs an estimation of the noise correlation matrix
+  // in the dataset prior to transformation.
+  //
+  // A classical approach is to use spatial gradient images
+  // and infer the noise correlation matrix from it.
+  // The method of noise estimation can be customized
+  // by templating the \doxygen{otb}{NAPCAImageFilter}
+  // with the desired noise estimation method.
+  //
+  // In this implementation, noise is estimated from a local window.
   // We define the type of the noise filter.
   //
   // Software Guide : EndLatex
@@ -107,7 +129,8 @@ int main(int argc, char* argv[])
   // Software Guide : BeginLatex
   //
   // We define the type for the filter. It is templated over the input
-  // and the output image types and also the transformation direction. The
+  // and the output image types, the noise estimation filter type,
+  // and also the transformation direction. The
   // internal structure of this filter is a filter-to-filter like structure.
   // We can now the instantiate the filter.
   //
-- 
GitLab