* green/mln/fun/x2v/sampler.hh : Delete obsolete library file.
* green/mln/fun/x2v : Delete directory.
---
trunk/milena/sandbox/ChangeLog | 7 ++
trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh | 107 ---------------------
2 files changed, 7 insertions(+), 107 deletions(-)
delete mode 100644 trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh
diff --git a/trunk/milena/sandbox/ChangeLog b/trunk/milena/sandbox/ChangeLog
index be92af7..41f171a 100644
--- a/trunk/milena/sandbox/ChangeLog
+++ b/trunk/milena/sandbox/ChangeLog
@@ -1,5 +1,12 @@
2009-09-11 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+ Delete obsolete sources.
+
+ * green/mln/fun/x2v/sampler.hh : Delete obsolete library file.
+ * green/mln/fun/x2v : Delete directory.
+
+2009-09-11 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+
Save work in progress for histo and hsl (interpolation part).
* green/mln/fun/x2v : New directory.
diff --git a/trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh b/trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh
deleted file mode 100644
index 10b482b..0000000
--- a/trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_X2V_SAMPLER_HH
-# define MLN_FUN_X2V_SAMPLER_HH
-
-# include <mln/core/image/image2d.hh>
-# include <mln/core/concept/function.hh>
-# include <mln/fun/internal/selector.hh>
-# include <mln/convert/to.hh>
-# include <mln/algebra/vec.hh>
-
-/// \file
-///
-/// Define a sampling process to attach real coordonnates to discrete ones.
-
-namespace mln
-{
-
- namespace fun
- {
-
- namespace x2v
- {
-
- /// Define a sampling process to attach real coordonnates to a discrete
- /// grid.
-
- // min | | | | | | | | max
- //
- // h = (max-min)/q (division reelle)
- // i = (val-min)/h (division entiere)
- //
- //
- // Hue [0,360°], q = 8 bits ==> h = 45° , 0/45/90/135/180/225/270/315/360
- // Sat [0,1] , q = 8 bits ==> h = 0.125
- // Lum [0,1] , q = 8 bits ==> h = 0.125
-
- template < typename I >
- struct sampler : public Function_v2v< sampler<I> >
- {
- typedef mln_value(I) result;
-
- sampler(const I& ima);
-
- /// Bilinear filtering on 2d images.
- template <typename T>
- mln_value(I)
- operator()(const algebra::vec<2,T>& v) const;
-
- template <typename T>
- mln_value(I)
- operator()(const algebra::vec<3,T>& v) const;
-
- const I& ima;
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename I>
- bilinear<I>::bilinear(const I& ima) : ima(ima)
- {
- mlc_bool(I::psite::dim == 3)::check();
- }
-
- template <typename I>
- template <typename T>
- mln_value(I)
- sampler<I>::operator()(const algebra::vec<3,T>& v) const
- {
-
- return convert::to<mln_value(I)>(res);
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::fun::x2v
-
- } // end of namespace mln::fun
-
-} // end of namespace mln
-
-
-#endif // ! MLN_FUN_X2V_SAMPLER_HH
--
1.5.6.5
* green/mln/fun/x2v : New directory.
* green/mln/fun/x2v/sampler.hh : New library file.
---
trunk/milena/sandbox/ChangeLog | 7 ++
trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh | 107 +++++++++++++++++++++
2 files changed, 114 insertions(+), 0 deletions(-)
create mode 100644 trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh
diff --git a/trunk/milena/sandbox/ChangeLog b/trunk/milena/sandbox/ChangeLog
index 2530228..be92af7 100644
--- a/trunk/milena/sandbox/ChangeLog
+++ b/trunk/milena/sandbox/ChangeLog
@@ -1,5 +1,12 @@
2009-09-11 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+ Save work in progress for histo and hsl (interpolation part).
+
+ * green/mln/fun/x2v : New directory.
+ * green/mln/fun/x2v/sampler.hh : New library file.
+
+2009-09-11 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+
Save work in progress for histo and hsl.
* green/mln/accu/stat/histo3d_hsl.hh : New library file.
diff --git a/trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh b/trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh
new file mode 100644
index 0000000..10b482b
--- /dev/null
+++ b/trunk/milena/sandbox/green/mln/fun/x2p/sampler.hh
@@ -0,0 +1,107 @@
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+#ifndef MLN_FUN_X2V_SAMPLER_HH
+# define MLN_FUN_X2V_SAMPLER_HH
+
+# include <mln/core/image/image2d.hh>
+# include <mln/core/concept/function.hh>
+# include <mln/fun/internal/selector.hh>
+# include <mln/convert/to.hh>
+# include <mln/algebra/vec.hh>
+
+/// \file
+///
+/// Define a sampling process to attach real coordonnates to discrete ones.
+
+namespace mln
+{
+
+ namespace fun
+ {
+
+ namespace x2v
+ {
+
+ /// Define a sampling process to attach real coordonnates to a discrete
+ /// grid.
+
+ // min | | | | | | | | max
+ //
+ // h = (max-min)/q (division reelle)
+ // i = (val-min)/h (division entiere)
+ //
+ //
+ // Hue [0,360°], q = 8 bits ==> h = 45° , 0/45/90/135/180/225/270/315/360
+ // Sat [0,1] , q = 8 bits ==> h = 0.125
+ // Lum [0,1] , q = 8 bits ==> h = 0.125
+
+ template < typename I >
+ struct sampler : public Function_v2v< sampler<I> >
+ {
+ typedef mln_value(I) result;
+
+ sampler(const I& ima);
+
+ /// Bilinear filtering on 2d images.
+ template <typename T>
+ mln_value(I)
+ operator()(const algebra::vec<2,T>& v) const;
+
+ template <typename T>
+ mln_value(I)
+ operator()(const algebra::vec<3,T>& v) const;
+
+ const I& ima;
+ };
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename I>
+ bilinear<I>::bilinear(const I& ima) : ima(ima)
+ {
+ mlc_bool(I::psite::dim == 3)::check();
+ }
+
+ template <typename I>
+ template <typename T>
+ mln_value(I)
+ sampler<I>::operator()(const algebra::vec<3,T>& v) const
+ {
+
+ return convert::to<mln_value(I)>(res);
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::fun::x2v
+
+ } // end of namespace mln::fun
+
+} // end of namespace mln
+
+
+#endif // ! MLN_FUN_X2V_SAMPLER_HH
--
1.5.6.5
* green/doc/formulae/formulae.tex : Correct file
---
trunk/milena/sandbox/ChangeLog | 6 ++++++
.../milena/sandbox/green/doc/formulae/formulae.tex | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/trunk/milena/sandbox/ChangeLog b/trunk/milena/sandbox/ChangeLog
index 923875c..8bb5ec1 100644
--- a/trunk/milena/sandbox/ChangeLog
+++ b/trunk/milena/sandbox/ChangeLog
@@ -1,5 +1,11 @@
2009-09-11 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+ Remove trailing spaces.
+
+ * green/doc/formulae/formulae.tex : Correct file.
+
+2009-09-11 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+
Correct english writing in the documentation file.
* green/doc/formulae/formulae.tex : Correct file.
diff --git a/trunk/milena/sandbox/green/doc/formulae/formulae.tex b/trunk/milena/sandbox/green/doc/formulae/formulae.tex
index 655cb1a..43bfbf5 100644
--- a/trunk/milena/sandbox/green/doc/formulae/formulae.tex
+++ b/trunk/milena/sandbox/green/doc/formulae/formulae.tex
@@ -1084,7 +1084,7 @@ $
%%=================================================================
\subsection{MCO for eigenvalues}
-In 3d, it's difficult to extract the cubic roots from the characteristic
+In 3d, it's difficult to extract the cubic roots from the characteristic
polynomia. The difficulties disappear when we find one of the three roots.
A planar regression allows us to reach the equation of the plane. From the
equation, we can determine its normal vector $\bm{w}$. It satisfies the
@@ -1096,17 +1096,17 @@ the two others eigenvalues (just solve $\lambda^2 - (trace(A) - \lambda_3)
$\lambda_2$ let us find $\bm{u}$ and $\bm{v}$ by the equations $A\bm{u} =
\lambda_1\bm{u}$ and $A\bm{v} = \lambda_2\bm{v}$.
-Let's center the points by subtracting their center of mass. Now, we have
+Let's center the points by subtracting their center of mass. Now, we have
three equivalent ways to estimate the coefficients of the plane:
\begin{itemize}
\item if not $c = 0$, then $\frac{a}{c}x + \frac{b}{c}y + z = 0$,
\item if not $b = 0$, then $\frac{a}{b}x + y + \frac{c}{b}z = 0$,
\item if not $a = 0$, then $x + \frac{b}{a}y + \frac{c}{a}z = 0$.
\end{itemize}
-As we cannot decide which way is the best, may be we have to test the three
+As we cannot decide which way is the best, may be we have to test the three
ones.
-Let's choose the linear model of the major inertia plane
+Let's choose the linear model of the major inertia plane
($ax + by + cz + d = 0$). With not $c = 0$.
\begin{tabular}{lcl}
--
1.5.6.5
#216: Color artifacts in HQx
---------------------+------------------------------------------------------
Reporter: freling | Owner: freling
Type: defect | Status: new
Priority: minor | Milestone:
Component: Milena | Version: 1.0
Keywords: |
---------------------+------------------------------------------------------
HQx algorithms have some color artifacts.
--
Ticket URL: <https://trac.lrde.org/olena/ticket/216>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
* green/doc/formulae/formulae.tex : Correct file.
---
trunk/milena/sandbox/ChangeLog | 6 +
.../milena/sandbox/green/doc/formulae/formulae.tex | 116 ++++++++++----------
2 files changed, 64 insertions(+), 58 deletions(-)
diff --git a/trunk/milena/sandbox/ChangeLog b/trunk/milena/sandbox/ChangeLog
index 6572258..923875c 100644
--- a/trunk/milena/sandbox/ChangeLog
+++ b/trunk/milena/sandbox/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-11 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+
+ Correct english writing in the documentation file.
+
+ * green/doc/formulae/formulae.tex : Correct file.
+
2009-09-10 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
Try to fix order problem between points and vectors.
diff --git a/trunk/milena/sandbox/green/doc/formulae/formulae.tex b/trunk/milena/sandbox/green/doc/formulae/formulae.tex
index 52af7a7..655cb1a 100644
--- a/trunk/milena/sandbox/green/doc/formulae/formulae.tex
+++ b/trunk/milena/sandbox/green/doc/formulae/formulae.tex
@@ -41,7 +41,7 @@
\newcommand{\fm}[1]{\mathbb{#1}}
%% \df
-%% input : the set which the dim we are intering in
+%% input : the set whose dimension we are interested in
%%
\newcommand{\df}[1]{|{\mathbb{#1}}|}
@@ -65,20 +65,20 @@ in the development.
\section{Notations}
\begin{itemize}
- \item Use lowercase and normal font for the scalar variables.
- \item Use lowercase and bold font for the vector variables.
- \item Use uppercase and normal font for the matrix variables.
- \item Use uppercase and double font for the set variables.
+ \item Use lowercase and normal font for scalar variables.
+ \item Use lowercase and bold font for vector variables.
+ \item Use uppercase and normal font for matrix variables.
+ \item Use uppercase and double font for set variables.
\end {itemize}
%=================================================================
\subsection{Sets}
-There is three particular sets that we use every time:
+There are three particular sets that we use every time:
\begin{itemize}
- \item The color space $\fm{C}$ in which the pixels take their value.
- \item The dataset $\fm{P}$ which contains every pixel we take care.
- \item The group set $\fm{G}$ that define any splitting of the dataset.
+ \item The color space $\fm{C}$ in which the pixels take their values.
+ \item The dataset $\fm{P}$ which contains every pixel we care about.
+ \item The group set $\fm{G}$ that defines any splitting of the dataset.
\end{itemize}
\begin{tabular}{|c|l|l|c|c|}
@@ -98,15 +98,15 @@ There is three particular sets that we use every time:
%=================================================================
\subsection{Color space}
-We use the euclidian distance.
+We use the Euclidian distance.
-$$
+\[
d(a,b) =
\sqrt{\sum_{i=0}^q (a_i - b_i)^2} =
\sqrt{(a_x - b_x)^2 + (a_y - b_y)^2 + (a_z - b_z)^2}
-$$
+\]
-$$
+\[
d(a,b)^2 =
\left[\begin{array}{ccc}
a_x - b_x & a_y - b_y & a_z - b_z
@@ -117,13 +117,13 @@ d(a,b)^2 =
a_y - b_y \\
a_y - b_z
\end{array}\right]
-$$
+\]
%=================================================================
\subsection{Data points in $\mathbb{R}^3$}
We present the four points of the dataset with their vector representation.
-$$
+\[
\bm{a} =
\left[\begin{array}{c}
a_x \\
@@ -143,9 +143,9 @@ $$
p_{13}
\end{array}\right]
= \bm{p}_1
-$$
+\]
-$$
+\[
\bm{b} =
\left[\begin{array}{c}
b_x \\
@@ -187,9 +187,9 @@ $$
p_{33}
\end{array}\right]
= \bm{p}_3
-$$
+\]
-$$
+\[
\mbox{\boldmath$d$} =
\left[\begin{array}{c}
d_x \\
@@ -209,11 +209,11 @@ $$
p_{43}
\end{array}\right]
= \bm{p}_4
-$$
+\]
One may group the four points in one matrix P :
-$$
+\[
P =
\left[\begin{array}{c}
\bm{a}^t \\
@@ -249,12 +249,12 @@ P =
\bm{p}_3^t \\
\bm{p}_4^t
\end{array}\right]
-$$
+\]
%=================================================================
\subsection{The group}
-We can define the group set $\fm{G}$ in thow context:
+We can define the group set $\fm{G}$ in this context:
\begin{itemize}
\item First, the group set is a partition.
\item Second, the group set if a fuzzy set.
@@ -321,7 +321,7 @@ Let's have a look to the first three moments.
%=================================================================
\subsection{The mean}
-$$
+\[
\mbox{\boldmath$m$} =
\left[\begin{array}{c}
m_x \\
@@ -353,8 +353,8 @@ $$
\mbox{\boldmath$d$})
=
\frac{1}{4}\sum_{i=1}^{4}\mbox{\boldmath$p$}_i
-$$
-$$
+\]
+\[
\mbox{\boldmath$m$} =
\frac{1}{4}
\left[\begin{array}{cccc}
@@ -382,10 +382,10 @@ $$
\end{array}\right]
=
\frac{1}{4} P^t \mbox{\boldmath$ 1$}
-$$
+\]
The mean matrix:
-$$
+\[
M =
\left[\begin{array}{c}
\mbox{\boldmath$m$}^t \\
@@ -407,10 +407,10 @@ M =
m_1 & m_2 & m_3 \\
m_1 & m_2 & m_3
\end{array}\right]
-$$
+\]
We define the difference between a point $\mbox{\boldmath$p$}_i$ and the mean:
-$$
+\[
(\mbox{\boldmath$p$}_i - \mbox{\boldmath$m$}) =
\left[\begin{array}{c}
p_{ix} - m_x \\
@@ -423,11 +423,11 @@ $$
p_{i2} - m_2 \\
p_{i3} - m_3
\end{array}\right]
-$$
+\]
And for all the dataset:
-$$
+\[
(P - M) =
\left[\begin{array}{ccc}
a_x & a_y & a_z \\
@@ -449,12 +449,12 @@ $$
c_x - m_x & c_y - m_y & c_z - m_z \\
d_x - m_x & d_y - m_y & d_z - m_z
\end{array}\right]
-$$
+\]
%=================================================================
\subsection{The variance}
-$$
+\[
\begin{array}{lcl}
V & = &
\left[\begin{array}{ccc}
@@ -501,12 +501,12 @@ V & = &
\frac{1}{4}
(P - M)^t (P - M)
\end{array}
-$$
+\]
%#################################################################
\section{Splitting into groups}
-When we study some mixed population, the total variance can be splitted in the
-the variance between the groups and in the variance whithin each group.
+When we study some mixed population, the total variance can be split in
+the variance between the groups and in the variance within each group.
We define two groups in the population. Each group owns its moments of the
second order.
@@ -514,51 +514,51 @@ second order.
%=================================================================
\subsection{Decomposing the count}
-$$
+\[
\begin{array}{lcl}
n_t & = & n_1 + n_2 \\
& = & \sum_{i=1}^{2} n_i
\end{array}
-$$
+\]
%=================================================================
\subsection{Decomposing the mean}
-$$
+\[
\begin{array}{lcl}
\mbox{\boldmath$m_t$} & = &
\frac{1}{n_t}(n_1 \mbox{\boldmath$m_1$} + n_2 \mbox{\boldmath$m_2$}) \\
& = &
\frac{1}{n_t}\sum_{i=1}^{2} n_i \mbox{\boldmath$m_i$}
\end{array}
-$$
+\]
%=================================================================
\subsection{Decomposing the variance}
-When we study some mixed population, the total variance can be splitted in the
-the variance between the groups and in the variance whithin each group.
+When we study some mixed population, the total variance can be split in
+the variance between the groups and in the variance within each group.
-$$
+\[
V_t = V_i + V_b
-$$
+\]
-$$
+\[
\begin{array}{lcl}
V_i & = & \frac{1}{n_t}(n_1 V_1 + n_2 V_2) \\
& = & \frac{1}{n_t}\sum_{i=1}^2 n_i V_i
\end{array}
-$$
+\]
-$$
+\[
\begin{array}{lcl}
V_b & = & \frac{1}{n_t}(n_1 (\mbox{\boldmath$m_1$} - \mbox{\boldmath$m_t$})^2 +
n_2 (\mbox{\boldmath$m_2$} - \mbox{\boldmath$m_t$})^2 \\
& = & \frac{1}{n_t} \sum_{i=1}^2 n_i
(\mbox{\boldmath$m_i$} - \mbox{\boldmath$m_t$})^2
\end{array}
-$$
+\]
%#################################################################
\section{Basis}
@@ -566,7 +566,7 @@ $$
%%=================================================================
\subsection{Determinant of a square matrix 3x3}
-$$
+\[
\det{V} =
\left|\begin{array}{ccc}
v_{11} & v_{12} & v_{13} \\
@@ -577,12 +577,12 @@ $$
v_{11}(v_{22}v_{33} - v_{32}v_{23})
- v_{12}(v_{21}v_{33} - v_{31}v_{23})
+ v_{13}(v_{21}v_{32} - v_{31}v_{22})
-$$
+\]
%%=================================================================
\subsection{Transpose}
-$
+\[
V^t =
\left[\begin{array}{ccc}
v_{11} & v_{12} & v_{13} \\
@@ -595,7 +595,7 @@ V^t =
v_{12} & v_{22} & v_{32} \\
v_{13} & v_{23} & v_{33}
\end{array}\right]
-$
+\]
%%=================================================================
\subsection{Inverse of a square matrix 3x3}
@@ -759,8 +759,8 @@ $$
%%=================================================================
\subsection{Eigenvalues and eigenvectors}
-We assume that we work on variance/covariance matrix which is real and symetric.
-In this case, all the three eigen values are real.
+We assume that we work on a variance/covariance matrix which is real and
+symmetric. In this case, all the three eigenvalues are real.
$$
V \bm{x} = \lambda \bm{x}
@@ -1089,14 +1089,14 @@ polynomia. The difficulties disappear when we find one of the three roots.
A planar regression allows us to reach the equation of the plane. From the
equation, we can determine its normal vector $\bm{w}$. It satisfies the
following equation $A\bm{w} = \lambda_3\bm{w}$. Thus we know $\lambda_3$.
-By the way, as far as $trace(A) = \lambda_1 + \lambda_2 + \lambda_3$ and
-$det(A) = \lambda_1 \lambda_2 \lambda_3$, then we can access to the value of
+By the way, $trace(A) = \lambda_1 + \lambda_2 + \lambda_3$ and
+$det(A) = \lambda_1 \lambda_2 \lambda_3$, then we can determine the value of
the two others eigenvalues (just solve $\lambda^2 - (trace(A) - \lambda_3)
\lambda + \frac{det(A)}{\lambda_3} = 0$). The knowledge of $\lambda_1$ and
$\lambda_2$ let us find $\bm{u}$ and $\bm{v}$ by the equations $A\bm{u} =
\lambda_1\bm{u}$ and $A\bm{v} = \lambda_2\bm{v}$.
-Let's center the points by susbtracting their center of mass. Now, we have
+Let's center the points by subtracting their center of mass. Now, we have
three equivalent ways to estimate the coefficients of the plane:
\begin{itemize}
\item if not $c = 0$, then $\frac{a}{c}x + \frac{b}{c}y + z = 0$,
--
1.5.6.5