Good night,
I am currently starting to develop with olena/milena and I was following
the tutorial when I found something that puzzled me:
63 image2d<value::rgb8> lena;
64 io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
65
66 std::cout << geom::min_row(lena) << ' ' << geom::max_row(lena) <<
'\n';
67 std::cout << geom::min_col(lena) << ' ' << geom::max_col(lena) <<
'\n';
68
69 for (def::coord row = geom::min_row(lena); row <
geom::max_row(lena); ++row)
70 for (def::coord col = geom::min_row(lena); col <
geom::max_col(lena); ++col)
71 if (((row + col) % 2) == 0)
72 opt::at(lena, row, col) = literal::green;
73
74 io::ppm::save(lena, "./lena_chess.ppm");
The definition of geom::min/max_row/col its that it gives you the image
limits, so I should get lena's image in a chess pattern.
Strangely as it may look, it happens to not fill the right and bottom edges
as you can see in the picture:
[image: image.png]
I think there is something wrong in the tutorial as the loop should have as
upper limit row/col *<=* geom::max_row/col instead of *=*
http://www.lrde.epita.fr/dload/olena/2.0/doc/milena/user-refman-html/d3/dfe…
The thing is that in all the tutorials the limit is set as =, so it is
either a bug in milena's function or in the tutorial (or in my computer ;) )
Best regards
--
Cristián Canivell Gutiérrez
UPM Facultad de Informática
Hello,
I forward your message to olena mailing-list for the record and I
prepare an answer for you.
Guillaume
-------- Original Message --------
Subject: Re: [Olena] Problem make Scribo
Date: Tue, 29 Nov 2011 10:26:28 +0100
From: Mikado Mikado <mikados.mikados(a)gmail.com>
To: Guillaume Lazzara <lazzara(a)lrde.epita.fr>
Hi, thanks for reply.
I use your fix, and now give me this error:
I try:
~olena-2.0/_build/scribo $ make
And get this:
/*In file included from
../../../../scribo/scribo/toolchain/internal/content_in_doc_functor.hh:65:0,
from ../../../../scribo/demo/viewer/process.hh:22,
from ../../../../scribo/demo/viewer/runner.cc:26:
../../../../scribo/scribo/text/recognition.hh: En la función ‘void
scribo::text::recognition(scribo::line_set<L>&, const char*)’:
../../../../scribo/scribo/text/recognition.hh:112:7: error:
‘TessBaseAPI’ no se ha declarado
../../../../scribo/scribo/text/recognition.hh:174:12: error:
‘TessBaseAPI’ no se ha declarado
../../../../scribo/scribo/text/recognition.hh: En la función ‘void
scribo::text::recognition(const mln::Image<I>&, const char*, const
string&)’:
../../../../scribo/scribo/text/recognition.hh:220:7: error:
‘TessBaseAPI’ no se ha declarado
../../../../scribo/scribo/text/recognition.hh:248:17: error:
‘TessBaseAPI’ no se ha declarado
make[3]: *** [scribo_viewer-runner.o] Error 1
make[3]: se sale del directorio
«/home/user/Descargas/olena-2.0/_build/scribo/demo/viewer»
make[2]: *** [all] Error 2
make[2]: se sale del directorio
«/home/user/Descargas/olena-2.0/_build/scribo/demo/viewer»
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio
«/home/user/Descargas/olena-2.0/_build/scribo/demo»
make: *** [all-recursive] Error 1*/
Is other error, i try find error documentation and forums...but nothing,
i use Ubuntu 11.10 and g++ 4.6.1
Any idea?
Thanks
2011/11/25 Guillaume Lazzara <lazzara(a)lrde.epita.fr
<mailto:lazzara@lrde.epita.fr>>
Hi,
On 24/11/2011 17:58, Mikado Mikado wrote:
With this code in terminal:
olena2.0/_build$ ./configure --enable-scribo
olena2.0/_build$ make
For install Scribo module, but i get this error:
../../../../milena/mln/canvas/browsing/snake_generic.hh:76:14: nota:
‘const struct mln::canvas::browsing::snake_generic_t’ no tiene
constructor por defecto proporcionado por el usuario
make[1]: *** [pgm_global_threshold_auto.o] Error 1
make: *** [all-recursive] Error 1
I have Ubuntu 11.10 32 bits.
Anyone can help me?
Thanks for your report.
Ubuntu 11.10 provides g++ 4.6.1 which changed few things about
initialization of global structures/classes.
This is a known issue which can be avoided easily.
I have just added a "known issues" section in the download page
explaining the workaround.
You can find it below.
Thanks for your interest in Scribo and Olena.
Sincerely,
Guillaume
-------------
Compilation issues may be encountered with g++ 4.6.0 and 4.6.1
(especially on Ubuntu 11.10).
Here is an example of the possible error :
../../../../olena/milena/mln/canvas/browsing/snake_generic.hh:90:29:
error: uninitialized const ‘mln::canvas::browsing::snake_generic’
[-fpermissive]
../../../../olena/milena/mln/canvas/browsing/snake_generic.hh:76:14:
note: ‘const struct mln::canvas::browsing::snake_generic_t’ has no
user-provided default constructor
Many non-relevant warnings may also arise.
A simple solution is to add CXXFLAGS to configure script with the
following argument :
%begin bash%
./configure CXXFLAGS="-fpermissive -Wunused-but-set-variable"
%end%
Otherwise, using a different version of g++ would also fix this
issue without specifying anything to configure.
On 28/11/2011 10:48, Guillaume Lazzara wrote:
>
> This bug is now referenced here : https://trac.lrde.org/olena/ticket/247
>
Bug fixed with patch 7876a2ce362a03e89fc494def140d0bb0c6d654f. It is now
integrated in the 'next' branch.
Regards,
Guillaume
Hi David,
On 25/11/2011 16:09, David Coeurjolly wrote:
> Is there a hidden (and undocumented AFAIK) requirement on the template parameter to be "unsigned scalar" ?
Actually, it seems to be a wrong behavior in Olena, your example is
correct.
accu::stat::max accumulator is initialized using mln_min(double) in your
case. However, it seems that instead of returning the effective negative
minimum double value, it returns the minimum positive double value which
is not expected.
This bug is now referenced here : https://trac.lrde.org/olena/ticket/247
We are running the tests to check if it breaks anything.
Thanks for your report.
Regards,
Guillaume
hi,
I'm having issues with the stat::max accumulator. Is it the correct way to it ? :
int main()
{
mln::accu::stat::max<double> mm;
mm.init();
mm.take(-0.02);
mm.take(-0.92);
mm.take(-0.03);
std::cout<<" max= "<<mm.to_result()<<std::endl;
}
In many situations (w/o init, w/o 'to_result() method in the ostream), I always get a wrong value (2.22^-308, which seems to be min_val for positive double).
Is there a hidden (and undocumented AFAIK) requirement on the template parameter to be "unsigned scalar" ?
regards
dav
----------------
David Coeurjolly - Directeur de recherche CNRS
CNRS, LIRIS-UMR 5205
Université de Lyon
Batiment Nautibus
43 boulevard du 11 novembre 1918, 69622 Villeurbanne cedex, France
Tel : (+33) [0]4.72.44.82.40 Fax : (+33) [0]4.72.43.15.36
http://liris.cnrs.fr/david.coeurjolly
Hi,
On 24/11/2011 17:58, Mikado Mikado wrote:
> With this code in terminal:
>
> olena2.0/_build$ ./configure --enable-scribo
> olena2.0/_build$ make
>
> For install Scribo module, but i get this error:
> ../../../../milena/mln/canvas/browsing/snake_generic.hh:76:14: nota:
> ‘const struct mln::canvas::browsing::snake_generic_t’ no tiene
> constructor por defecto proporcionado por el usuario
> make[1]: *** [pgm_global_threshold_auto.o] Error 1
> make: *** [all-recursive] Error 1
>
> I have Ubuntu 11.10 32 bits.
>
> Anyone can help me?
Thanks for your report.
Ubuntu 11.10 provides g++ 4.6.1 which changed few things about
initialization of global structures/classes.
This is a known issue which can be avoided easily.
I have just added a "known issues" section in the download page
explaining the workaround.
You can find it below.
Thanks for your interest in Scribo and Olena.
Sincerely,
Guillaume
-------------
Compilation issues may be encountered with g++ 4.6.0 and 4.6.1
(especially on Ubuntu 11.10).
Here is an example of the possible error :
../../../../olena/milena/mln/canvas/browsing/snake_generic.hh:90:29:
error: uninitialized const ‘mln::canvas::browsing::snake_generic’
[-fpermissive]
../../../../olena/milena/mln/canvas/browsing/snake_generic.hh:76:14:
note: ‘const struct mln::canvas::browsing::snake_generic_t’ has no
user-provided default constructor
Many non-relevant warnings may also arise.
A simple solution is to add CXXFLAGS to configure script with the
following argument :
%begin bash%
./configure CXXFLAGS="-fpermissive -Wunused-but-set-variable"
%end%
Otherwise, using a different version of g++ would also fix this issue
without specifying anything to configure.
Hi,
i follow this instructions:
http://www.lrde.epita.fr/dload/olena/2.0/README-2.0
With this code in terminal:
olena2.0/_build$ ./configure --enable-scribo
olena2.0/_build$ make
For install Scribo module, but i get this error:
../../../../milena/mln/canvas/browsing/snake_generic.hh:76:14: nota: ‘const
struct mln::canvas::browsing::snake_generic_t’ no tiene constructor por
defecto proporcionado por el usuario
make[1]: *** [pgm_global_threshold_auto.o] Error 1
make: *** [all-recursive] Error 1
I have Ubuntu 11.10 32 bits.
Anyone can help me?
Thanks