https://svn/svn/oln/prototypes/proto-1.0/olena
Index: ChangeLog
from Nicolas Widynski <nicolas.widynski(a)lrde.epita.fr>
Implementation of Image Inpainting algorithm in Olena 0.10.
* oln/convolution/laplacian_olena_0_10.hh: New. Laplacian 2d.
* oln/level/anisotropic_diffusion_olena_0_10.hh: New. Anisotropic diffusion
from Perona Malik.
* oln/morpho/gradient_morpho_olena_0_10.hh: New. Morphological gradient.
* oln/appli/inpainting/image_inpainting_olena_0_10.hh: New. Image inpainting
algorithm from Bertalmio.
appli/inpainting/image_inpainting_olena_0_10.hh | 48 ------------------------
level/anisotropic_diffusion_olena_0_10.hh | 2 -
2 files changed, 1 insertion(+), 49 deletions(-)
Index: oln/convolution/laplacian_olena_0_10.hh
Index: oln/level/anisotropic_diffusion_olena_0_10.hh
--- oln/level/anisotropic_diffusion_olena_0_10.hh (revision 406)
+++ oln/level/anisotropic_diffusion_olena_0_10.hh (working copy)
@@ -75,7 +75,7 @@
template <typename T>
double compute_capa(const image2d<T>& input)
{
- // static version of cappa (near the variance)
+ // static version of cappa (near the variance).
return 20;
}
Index: oln/morpho/gradient_morpho_olena_0_10.hh
Index: oln/appli/inpainting/image_inpainting_olena_0_10.hh
--- oln/appli/inpainting/image_inpainting_olena_0_10.hh (revision 406)
+++ oln/appli/inpainting/image_inpainting_olena_0_10.hh (working copy)
@@ -210,54 +210,6 @@
return g;
}
- template <typename T>
- std::ostream& operator<<(std::ostream& ostr, const
image2d<std::vector<T> >& ima)
- {
- for (int i = 0; i < 9; i++)
- {
- for (int j = 0; j < 9; j++)
- {
- ostr << "(" << ima(i,j)[0] << "," <<
ima(i,j)[1] << ") " << "\t";
- if ((ima(i,j)[0] == 0 or ima(i,j)[0] == 1) and
- (ima(i,j)[1] == 0 or ima(i,j)[1] == 1))
- ostr << "\t";
- }
-
- ostr << std::endl;
- }
- return ostr;
- }
-
-
- template <typename T>
- std::ostream& operator<<(std::ostream& ostr, const
image2d<T>& ima)
- {
- for (int i = 0; i < 9; i++)
- {
- for (int j = 0; j < 9; j++)
- ostr << ima(i,j) << "\t";
- ostr << std::endl;
- }
- return ostr;
- }
-
-
- template <typename T>
- void clean_ima(image2d<T>& ima)
- {
- for (int j = 0; j < ima.size().ncols(); j++)
- {
- ima(-1, j) = ima(0, j);
- ima(ima.size().nrows(), j) = ima(ima.size().nrows() - 1, j);
- }
-
- for (int j = 0; j < ima.size().nrows(); j++)
- {
- ima(j, -1) = ima(j, 0);
- ima(j, ima.size().ncols()) = ima(j, ima.size().ncols() - 1);
- }
- }
-
template <typename T, typename T2>
image2d<ntg::int_u8>