Commit f138adac authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Fix tutorial ref files.

	* doc/tutorial/figures/tuto3_rw_image-1.ppm,
	* doc/tutorial/figures/tuto3_rw_image-2.ppm,
	* doc/tutorial/figures/tuto3_rw_image-3.ppm,
	* doc/tutorial/figures/tuto4_genericity_and_algorithms-1.ppm,
	* doc/tutorial/figures/tuto4_genericity_and_algorithms-2.ppm,
	* doc/tutorial/figures/tuto4_genericity_and_algorithms-4.ppm,
	* doc/tutorial/figures/tuto4_genericity_and_algorithms-5.ppm,
	* doc/tutorial/figures/tuto4_genericity_and_algorithms-6.ppm,
	* doc/tutorial/figures/tuto4_genericity_and_algorithms-7.pgm,
	* doc/tutorial/figures/tuto4_genericity_and_algorithms-8.ppm,
	* doc/tutorial/figures/tuto4_genericity_and_algorithms-9.ppm: update.

	* doc/tutorial/figures/tuto4_genericity_and_algorithms-10.ppm: delete,
	not needed anymore.

	* doc/tutorial/samples/tuto3_rw_image.cc,
	* doc/tutorial/samples/tuto4_genericity_and_algorithms.cc: Use rgb8
	instead of rgb16.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@3200 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent fd3034fb
2009-01-23 Guillaume Lazzara <z@lrde.epita.fr>
Fix tutorial ref files.
* doc/tutorial/figures/tuto3_rw_image-1.ppm,
* doc/tutorial/figures/tuto3_rw_image-2.ppm,
* doc/tutorial/figures/tuto3_rw_image-3.ppm,
* doc/tutorial/figures/tuto4_genericity_and_algorithms-1.ppm,
* doc/tutorial/figures/tuto4_genericity_and_algorithms-2.ppm,
* doc/tutorial/figures/tuto4_genericity_and_algorithms-4.ppm,
* doc/tutorial/figures/tuto4_genericity_and_algorithms-5.ppm,
* doc/tutorial/figures/tuto4_genericity_and_algorithms-6.ppm,
* doc/tutorial/figures/tuto4_genericity_and_algorithms-7.pgm,
* doc/tutorial/figures/tuto4_genericity_and_algorithms-8.ppm,
* doc/tutorial/figures/tuto4_genericity_and_algorithms-9.ppm: update.
* doc/tutorial/figures/tuto4_genericity_and_algorithms-10.ppm: delete,
not needed anymore.
* doc/tutorial/samples/tuto3_rw_image.cc,
* doc/tutorial/samples/tuto4_genericity_and_algorithms.cc: Use rgb8
instead of rgb16.
2009-01-23 Thierry Geraud <thierry.geraud@lrde.epita.fr>
 
Allow to construct 3D neighborhoods from C arrays.
......@@ -2,5 +2,5 @@ P5
# Generated by Milena 1.0 http://olena.lrde.epita.fr
# EPITA Research and Development Laboratory (LRDE)
64 64
65535
\ No newline at end of file
255
\ No newline at end of file
......@@ -6,7 +6,7 @@ int main()
using namespace mln;
// \{
image2d<value::rgb16> ima(40, 40);
image2d<value::rgb8> ima(40, 40);
// \}
// \{
......@@ -26,10 +26,10 @@ int main()
// \}
doc::ppmsave(ima, "tuto3_rw_image");
image2d<value::rgb16> ima2 = duplicate(ima);
image2d<value::rgb8> ima2 = duplicate(ima);
// \{
image2d<value::rgb16> lena;
image2d<value::rgb8> lena;
io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
// \}
......
......@@ -6,7 +6,7 @@
struct keep_specific_colors : public mln::Function_v2b<keep_specific_colors>
{
bool operator()(const mln::value::rgb16& v) const
bool operator()(const mln::value::rgb8& v) const
{
return v.green() < 20000 && v.blue() > 10000;
}
......@@ -17,12 +17,12 @@ int main()
using namespace mln;
// \{
image2d<value::rgb16> lena;
image2d<value::rgb8> lena;
io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
// \}
image2d<value::rgb16> lena_bak = duplicate(lena);
image2d<value::rgb8> lena_bak = duplicate(lena);
// \{
box2d roi = make::box2d(20, 20, 40, 40);
// \}
......@@ -77,10 +77,10 @@ int main()
lena = duplicate(lena_bak);
// \{
image2d<bool> lena_bw = binarization::binarization(lena, keep_specific_colors());
value::label_16 nlabels;
image2d<value::label_16> label = labeling::blobs(lena_bw, c8(), nlabels);
value::label_8 nlabels;
image2d<value::label_8> label = labeling::blobs(lena_bw, c8(), nlabels);
// \}
doc::ppmsave(debug::colorize(value::rgb16(), label, nlabels), "tuto4_genericity_and_algorithms");
doc::ppmsave(debug::colorize(value::rgb8(), label, nlabels), "tuto4_genericity_and_algorithms");
// \{
data::fill((lena | (pw::value(label) == pw::cst(16u))).rw(), literal::green);
......@@ -103,10 +103,11 @@ int main()
lena = duplicate(lena_bak);
// \{
mln_VAR(object, pw::value(label) == pw::cst(3u));
mln_VAR(object, pw::value(label) == pw::cst(16u));
data::fill((extract::green(lena).rw() | object).rw(), literal::max);
// \}
doc::pgmsave(lena | object, "tuto4_genericity_and_algorithms");
//FIXME: how to display an image which is not defined on a box!?
// doc::ppmsave(lena | object, "tuto4_genericity_and_algorithms");
doc::ppmsave(lena, "tuto4_genericity_and_algorithms");
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment