From cc9b60f0409c7f2eb5ea8d13bfef189040677f27 Mon Sep 17 00:00:00 2001
From: Manuel Grizonnet <manuel.grizonnet@gmail.com>
Date: Tue, 29 Jun 2010 18:15:47 +0200
Subject: [PATCH] DOC:modify texture formula table in software guide

---
 Examples/FeatureExtraction/TextureExample.cxx | 48 +++++++++++--------
 1 file changed, 27 insertions(+), 21 deletions(-)

diff --git a/Examples/FeatureExtraction/TextureExample.cxx b/Examples/FeatureExtraction/TextureExample.cxx
index d678bbc6e2..4972cc9f59 100644
--- a/Examples/FeatureExtraction/TextureExample.cxx
+++ b/Examples/FeatureExtraction/TextureExample.cxx
@@ -45,30 +45,36 @@
 // \doxygen{otb}{ScalarImageToTexturesFilter},
 // which compute the standard Haralick's textural features presented in table~\ref{tab:haralickStandardFeatures}.
 //
+// \begin{table}
 // \begin{tabular}{|c|c|}
-// Energy & $ = f_1 = \sum_{i,j}g(i, j)^2 $ \\
-//
-// Entropy & $ = f_2 = -\sum_{i,j}g(i, j) \log_2 g(i, j)$, or 0 if $g(i, j) = 0$ \\
-//
-// Correlation & $ = f_3 = \sum_{i,j}rac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} $ \\
-//
-// Difference Moment &  $= f_4 = \sum_{i,j}rac{1}{1 + (i - j)^2}g(i, j) $ \\
-//
-// Inertia (a.k.a. Contrast) & $ = f_5 = \sum_{i,j}(i - j)^2g(i, j) $ \\
-//
-// Cluster Shade & $ = f_6 = \sum_{i,j}((i - \mu) + (j - \mu))^3 g(i, j) $ \\
-//
-// Cluster Prominence & $ = f_7 = \sum_{i,j}((i - \mu) + (j - \mu))^4 g(i, j) $ \\
-//
-// Haralick's Correlation & $ = f_8 = rac{\sum_{i,j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} $ \\
+// \hline
+// Energy & $ f_1 = \sum_{i,j}g(i, j)^2 $ \\
+// \hline
+// Entropy & $ f_2 = -\sum_{i,j}g(i, j) \log_2 g(i, j)$, or 0 if $g(i, j) = 0$ \\
+// \hline
+// Correlation & $ f_3 = \sum_{i,j}\frac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} $ \\
+// \hline
+// Difference Moment &  $f_4 = \sum_{i,j}\frac{1}{1 + (i - j)^2}g(i, j) $ \\
+// \hline
+// Inertia (a.k.a. Contrast) & $ f_5 = \sum_{i,j}(i - j)^2g(i, j) $ \\
+// \hline
+// Cluster Shade & $ f_6 = \sum_{i,j}((i - \mu) + (j - \mu))^3 g(i, j) $ \\
+// \hline
+// Cluster Prominence & $ f_7 = \sum_{i,j}((i - \mu) + (j - \mu))^4 g(i, j) $ \\
+// \hline
+// Haralick's Correlation & $ f_8 = \frac{\sum_{i,j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} $ \\
+// \hline
+// \end{tabular}
+// \itkcaption[Haralick features available in] {\doxygen{otb}{ScalarImageToTexturesFilter}}
 //
-// \caption{Haralick features available in \doxygen{otb}{ScalarImageToTexturesFilter} ($\mu_t$ and $\sigma_t$ are the mean and standard deviation of the row
-// (or column, due to symmetry) sums, $ \mu =  $ (weighted pixel average) $ = \sum_{i,j}i \cdot g(i, j) =
-// \sum_{i,j}j \cdot g(i, j) $ due to matrix summetry, and $ \sigma =  $ (weighted pixel variance) $ = \sum_{i,j}(i - \mu)^2 \cdot g(i, j) =
-// \sum_{i,j}(j - \mu)^2 \cdot g(i, j)  $  due to matrix summetry}
 // \label{tab:haralickStandardFeatures}
-// \end{tabular}
-
+// \end{table}
+// where $\mu_t$ and $\sigma_t$ are the mean and standard deviation of the row
+// (or column, due to symmetry) sums, $ \mu =  $ (weighted pixel average) 
+// $ = \sum_{i,j}i \cdot g(i, j) =\sum_{i,j}j \cdot g(i, j) $ due to matrix summetry, and 
+// $ \sigma =  $ (weighted pixel variance) $ = \sum_{i,j}(i - \mu)^2 \cdot g(i, j) =\sum_{i,j}(j - \mu)^2 \cdot g(i, j)  $  
+// due to matrix symmetry
+//
 // More features are available in \doxygen{otb}{ScalarImageToAdvancedTexturesFilter}.
 // \relatedClasses
 // \begin{itemize}
-- 
GitLab