LRE
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
List overview
Download
Olena-patches
June 2010
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
olena-patches@lrde.epita.fr
9 participants
276 discussions
Start a n
N
ew thread
last-svn-commit-193-g8adc201 2009-12-15 Yann Jacquelet <jacquelet@lrde.epita.fr>
by green
Introduce clipart operators described by Millet. * green/demo/annoting/nb_color: New demonstration directory. * green/demo/annoting/nb_color/Makefile.am: New Makefile. * green/demo/annoting/nb_color/nb_color.cc: New source file. * green/demo/annoting/stddev_color: New demonstration directory. * green/demo/annoting/stddev_color/Makefile.am: New Makefile. * green/demo/annoting/stddev_color/stddev_color.cc: New source file. --- milena/sandbox/ChangeLog | 13 ++ .../demo/annoting/{bic => nb_color}/Makefile.am | 0 .../green/demo/annoting/nb_color/nb_color.cc | 101 ++++++++++++++++ .../annoting/{bic => stddev_color}/Makefile.am | 0 .../demo/annoting/stddev_color/stddev_color.cc | 124 ++++++++++++++++++++ 5 files changed, 238 insertions(+), 0 deletions(-) copy milena/sandbox/green/demo/annoting/{bic => nb_color}/Makefile.am (100%) create mode 100644 milena/sandbox/green/demo/annoting/nb_color/nb_color.cc copy milena/sandbox/green/demo/annoting/{bic => stddev_color}/Makefile.am (100%) create mode 100644 milena/sandbox/green/demo/annoting/stddev_color/stddev_color.cc diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog index 89443b8..ac48ee2 100644 --- a/milena/sandbox/ChangeLog +++ b/milena/sandbox/ChangeLog @@ -75,6 +75,19 @@ * bin/pgm_to_pbm.cc, * bin/ppm_negate.cc: New. +2009-12-15 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + + Introduce clipart operators described by Millet. + + * green/demo/annoting/nb_color: New demonstration directory. + * green/demo/annoting/nb_color/Makefile.am: New Makefile. + * green/demo/annoting/nb_color/nb_color.cc: New source file. + + * green/demo/annoting/stddev_color: New demonstration directory. + * green/demo/annoting/stddev_color/Makefile.am: New Makefile. + * green/demo/annoting/stddev_color/stddev_color.cc: New source file. + + 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> Optimize regional maxima processing for statistical counts and outputs. diff --git a/milena/sandbox/green/demo/annoting/bic/Makefile.am b/milena/sandbox/green/demo/annoting/nb_color/Makefile.am similarity index 100% copy from milena/sandbox/green/demo/annoting/bic/Makefile.am copy to milena/sandbox/green/demo/annoting/nb_color/Makefile.am diff --git a/milena/sandbox/green/demo/annoting/nb_color/nb_color.cc b/milena/sandbox/green/demo/annoting/nb_color/nb_color.cc new file mode 100644 index 0000000..9ad5666 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/nb_color/nb_color.cc @@ -0,0 +1,101 @@ +// COUNTING THE IMAGE COLORS + +#include <iostream> +#include <sstream> + +#include <mln/img_path.hh> + +#include <mln/accu/math/sum.hh> +#include <mln/accu/math/count.hh> +#include <mln/accu/stat/histo3d_rgb.hh> +#include <mln/accu/stat/mean.hh> +#include <mln/accu/stat/variance.hh> + +#include <mln/algebra/vec.hh> + +#include <mln/arith/diff_abs.hh> + +#include <mln/core/macros.hh> +#include <mln/core/alias/neighb3d.hh> +#include <mln/core/image/image2d.hh> +#include <mln/core/image/image3d.hh> +#include <mln/core/image/dmorph/image_if.hh> +#include <mln/core/routine/initialize.hh> + +#include <mln/data/compute.hh> +#include <mln/data/fill.hh> +#include <mln/data/transform.hh> + +#include <mln/fun/v2v/rgb8_to_rgbn.hh> + +#include <mln/io/pgm/load.hh> +#include <mln/io/pgm/save.hh> +#include <mln/io/ppm/load.hh> +#include <mln/io/ppm/save.hh> + +#include <mln/labeling/regional_maxima.hh> +#include <mln/labeling/mean_values.hh> +#include <mln/labeling/compute.hh> + +#include <mln/literal/colors.hh> + +#include <mln/morpho/opening/volume.hh> +#include <mln/morpho/elementary/dilation.hh> + +#include <mln/opt/at.hh> + +#include <mln/pw/cst.hh> + +#include <mln/util/array.hh> +#include <mln/util/timer.hh> + +#include <mln/value/label_8.hh> +#include <mln/value/rgb8.hh> +#include <mln/value/rgb.hh> +#include <mln/value/int_u.hh> + + +// n < 8, n is the degree of quantification +template <unsigned n> +unsigned count_image_color(const std::string& image) +{ + typedef mln::value::int_u8 t_int_u8; + typedef mln::value::rgb8 t_rgb8; + typedef mln::value::rgb<n> t_rgbn; + typedef mln::image2d<t_rgb8> t_image2d_rgb8; + typedef mln::image2d<t_rgbn> t_image2d_rgbn; + typedef mln::image3d<unsigned> t_histo3d; + typedef mln::fun::v2v::rgb8_to_rgbn<n> t_rgb8_to_rgbn; + typedef mln::accu::meta::stat::histo3d_rgb t_histo3d_fun; + typedef mln::accu::meta::math::count t_count_fun; + + t_image2d_rgb8 input_rgb8; + t_image2d_rgbn input_rgbn; + t_image2d_rgbn output_rgbn; + t_histo3d histo; + t_histo3d opened; + + mln::io::ppm::load(input_rgb8, image.c_str()); + + unsigned nb_pixel = input_rgb8.ncols() * input_rgb8.nrows(); +// unsigned min_volume = (unsigned)(nb_pixel * 0.054); + unsigned nb_color = 0; + + input_rgbn = mln::data::transform(input_rgb8, t_rgb8_to_rgbn()); + histo = mln::data::compute(t_histo3d_fun(), input_rgbn); + nb_color = mln::data::compute(t_count_fun(), + (histo | (mln::pw::value(histo) != 0)).rw()); + + return nb_color; +} + + +int main() +{ + unsigned val = count_image_color<8>(ANNOTING_PHOTO_IMG_PATH "/photo01.ppm"); + + std::cout << "nb color : " << val << std::endl; + + return 0; +} + diff --git a/milena/sandbox/green/demo/annoting/bic/Makefile.am b/milena/sandbox/green/demo/annoting/stddev_color/Makefile.am similarity index 100% copy from milena/sandbox/green/demo/annoting/bic/Makefile.am copy to milena/sandbox/green/demo/annoting/stddev_color/Makefile.am diff --git a/milena/sandbox/green/demo/annoting/stddev_color/stddev_color.cc b/milena/sandbox/green/demo/annoting/stddev_color/stddev_color.cc new file mode 100644 index 0000000..0782e9c --- /dev/null +++ b/milena/sandbox/green/demo/annoting/stddev_color/stddev_color.cc @@ -0,0 +1,124 @@ +// COMPUTING THE STDEV OF THE COLORS + +#include <iostream> +#include <sstream> + +#include <mln/img_path.hh> + +#include <mln/accu/max_site.hh> +#include <mln/accu/stat/histo1d.hh> + +#include <mln/core/macros.hh> +#include <mln/core/image/image1d.hh> +#include <mln/core/image/image2d.hh> +#include <mln/core/image/image3d.hh> + +#include <mln/debug/println.hh> + +#include <mln/data/compute.hh> +#include <mln/data/fill.hh> +#include <mln/data/transform.hh> + +#include <mln/fun/v2v/rgb8_to_int_u8.hh> + +#include <mln/io/ppm/load.hh> +#include <mln/io/pgm/save.hh> +#include <mln/io/plot/save_image_sh.hh> + +#include <mln/math/sqr.hh> + +#include <mln/opt/at.hh> + +#include <mln/value/rgb8.hh> +#include <mln/value/int_u.hh> + + +// FIXME REPARER L'ACCUMULATEUR MAX_SITE +// FIXME PENSER LA VARIANCE SUR UN HISTOGRAMME NORMALISE, VOIR LES RESULTATS + +float r(short p, unsigned histo_p, short x, unsigned histo_x) +{ + float result = mln::math::sqr(((float)histo_x / histo_p) * (x-p)); + + return result; +} + +unsigned stddev_color(const std::string& image) +{ + typedef mln::point1d t_point1d; + typedef mln::value::rgb8 t_rgb8; + typedef mln::value::int_u8 t_int_u8; + typedef mln::image2d<t_rgb8> t_image2d_rgb8; + typedef mln::image2d<t_int_u8> t_image2d_int_u8; + typedef mln::image1d<unsigned> t_histo1d; + typedef mln::fun::v2v::rgb8_to_int_u8 t_rgb8_to_int_u8; + typedef mln::accu::meta::stat::histo1d t_histo1d_fun; + typedef mln::accu::max_site<t_histo1d> t_max_site_fun; + + t_image2d_rgb8 input_rgb8; + t_image2d_int_u8 input_int_u8; + t_histo1d histo; + t_point1d max_site; + + mln::io::ppm::load(input_rgb8, image.c_str()); + input_int_u8 = mln::data::transform(input_rgb8, t_rgb8_to_int_u8()); + histo = mln::data::compute(t_histo1d_fun(), input_int_u8); + + mln::io::pgm::save(input_int_u8, "tmp.pgm"); + mln::io::plot::save_image_sh(histo, "histo.sh"); + mln::debug::println(histo); + + // Find the peak of the histogram + unsigned v_max = mln::opt::at(histo, 0); + short p_max = 0; + + mln_piter_(t_histo1d) p(histo.domain()); + + for_all(p) + { + if (v_max < histo(p)) + { + v_max = histo(p); + p_max = p.ind(); + } + } + + // Compute the specific stddev + + float stddev_low = 0.0; + float stddev_up = 0.0; + float stddev = 0.0; + + if (250 > p_max) + for (short i = p_max+1; i < p_max+6; ++i) + stddev_up += r(p_max, mln::opt::at(histo,p_max), + i, mln::opt::at(histo,i)); + + if (5 < p_max) + for (short i = p_max-1; i > p_max-6; --i) + stddev_low += r(p_max, mln::opt::at(histo,p_max), + i, mln::opt::at(histo,i)); + + stddev = (250 < p_max)? stddev_low : (5 > p_max)? stddev_up : + (stddev_low + stddev_up)/2; + + std::cout << "max_site : " << p_max << std::endl; + std::cout << "h(max_site) : " << v_max << std::endl; + std::cout << "stddev_up : " << stddev_up << std::endl; + std::cout << "stddev_low : " << stddev_low << std::endl; + std::cout << "stddev : " << stddev << std::endl; + + return 0; +} + + +int main() +{ +// unsigned val = stdev_color(ANNOTING_PHOTO_IMG_PATH "/photo01.ppm"); + unsigned val = stddev_color(ANNOTING_LOGO_IMG_PATH "/logo06.ppm"); + +// std::cout << "nb color : " << val << std::endl; + + return 0; +} + -- 1.5.6.5
14 years, 5 months
1
0
0
0
last-svn-commit-192-ge6a836c 2009-12-02 Yann Jacquelet <jacquelet@lrde.epita.fr>
by green
Optimize regional maxima processing for statistical counts and outputs. * green/demo/labeling/regional_maxima/Makefile.am: Add some compilation directives. * green/demo/labeling/regional_maxima/regional_maxima.cc (t_channel,t_labeling_rgbn,label_image,unquant,print_count2): New. * green/demo/labeling/regional_maxima/regional_maxima.cc (print_count, merge, do_demo) : Update. --- milena/sandbox/ChangeLog | 14 +- .../demo/labeling/regional_maxima/Makefile.am | 2 + .../labeling/regional_maxima/regional_maxima.cc | 661 ++++++++++++++------ 3 files changed, 471 insertions(+), 206 deletions(-) diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog index b2c3dba..89443b8 100644 --- a/milena/sandbox/ChangeLog +++ b/milena/sandbox/ChangeLog @@ -77,10 +77,22 @@ 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Optimize regional maxima processing for statistical counts and outputs. + + * green/demo/labeling/regional_maxima/Makefile.am: Add some compilation + directives. + * green/demo/labeling/regional_maxima/regional_maxima.cc + (t_channel,t_labeling_rgbn,label_image,unquant,print_count2): New. + * green/demo/labeling/regional_maxima/regional_maxima.cc + (print_count, merge, do_demo) : Update. + + +2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Test experimentation with regmax code on annoting database. * green/exp/labeling/regional_maxima/Makefile.am: New Makefile. - * green/exp/clustering/regional_maxima/regional_maxima.cc: New directory + * green/exp/labeling/regional_maxima/regional_maxima.cc: New directory oriented demonstration code. 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> diff --git a/milena/sandbox/green/demo/labeling/regional_maxima/Makefile.am b/milena/sandbox/green/demo/labeling/regional_maxima/Makefile.am index 91230b6..1dd1cfb 100644 --- a/milena/sandbox/green/demo/labeling/regional_maxima/Makefile.am +++ b/milena/sandbox/green/demo/labeling/regional_maxima/Makefile.am @@ -8,6 +8,8 @@ INCLUDES= -I$(HOME)/svn/oln/trunk/milena/sandbox/green CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) ECHO= echo RM= rm MKDIR= mkdir -p diff --git a/milena/sandbox/green/demo/labeling/regional_maxima/regional_maxima.cc b/milena/sandbox/green/demo/labeling/regional_maxima/regional_maxima.cc index 34801ed..266fbfe 100644 --- a/milena/sandbox/green/demo/labeling/regional_maxima/regional_maxima.cc +++ b/milena/sandbox/green/demo/labeling/regional_maxima/regional_maxima.cc @@ -1,66 +1,257 @@ // DEMO ON REGIONAL MAXIMA -#include <mln/clustering/kmean2d.hh> - #include <iostream> #include <sstream> #include <mln/img_path.hh> -#include <mln/pw/value.hh> -#include <mln/value/label_8.hh> -#include <mln/value/rgb8.hh> +#include <mln/accu/math/sum.hh> +#include <mln/accu/stat/histo3d_rgb.hh> +#include <mln/accu/stat/mean.hh> +#include <mln/accu/stat/variance.hh> + +#include <mln/algebra/vec.hh> + +// #include <mln/arith/revert.hh> +#include <mln/arith/diff_abs.hh> #include <mln/core/macros.hh> +#include <mln/core/alias/neighb3d.hh> #include <mln/core/image/image2d.hh> #include <mln/core/image/image3d.hh> +#include <mln/core/routine/initialize.hh> +#include <mln/data/compute.hh> +#include <mln/data/fill.hh> +// #include <mln/data/stretch.hh> #include <mln/data/transform.hh> + +// #include <mln/display/display_histo.hh> + #include <mln/fun/v2v/rgb8_to_rgbn.hh> -#include <mln/io/ppm/load.hh> #include <mln/io/pgm/load.hh> #include <mln/io/pgm/save.hh> +#include <mln/io/ppm/load.hh> #include <mln/io/ppm/save.hh> -#include <mln/io/plot/save_image_sh.hh> - -#include <mln/accu/stat/histo3d_rgb.hh> -#include <mln/data/compute.hh> +// #include <mln/io/plot/save_image_sh.hh> -#include <mln/arith/revert.hh> #include <mln/labeling/regional_maxima.hh> -#include <mln/core/alias/neighb3d.hh> -#include <mln/core/routine/initialize.hh> +#include <mln/labeling/mean_values.hh> +#include <mln/labeling/compute.hh> + #include <mln/literal/colors.hh> -#include <mln/morpho/watershed/flooding.hh> + +// #include <mln/morpho/watershed/flooding.hh> #include <mln/morpho/opening/volume.hh> #include <mln/morpho/elementary/dilation.hh> -#include <mln/data/stretch.hh> -#include <mln/display/display_histo.hh> -#include <mln/labeling/mean_values.hh> +#include <mln/opt/at.hh> + +// #include <mln/pw/value.hh> + +#include <mln/util/array.hh> +#include <mln/util/timer.hh> + +#include <mln/value/label_8.hh> +#include <mln/value/rgb8.hh> +#include <mln/value/rgb.hh> +#include <mln/value/int_u.hh> + + +template <unsigned n, unsigned ch> +struct t_channel : mln::Function_v2v< t_channel<n,ch> > +{ + typedef mln::value::rgb<n> t_rgbn; + typedef mln::value::int_u<n> t_int_un; + typedef t_rgbn argument; + typedef t_int_un result; + + result operator()(const argument& c) const + { + result tmp; + + switch(ch) + { + case 0: tmp = c.red(); break; + case 1: tmp = c.green(); break; + case 2: tmp = c.blue(); break; + } + + return tmp; + } +}; + + +// version optimisée de labeling + +template <unsigned n> +struct t_labeling_rgbn : mln::Function_v2v< t_labeling_rgbn<n> > +{ + typedef mln::value::rgb<n> t_rgbn; + typedef mln::value::label_8 t_lbl8; + typedef t_rgbn argument; + typedef t_lbl8 result; + typedef mln::image3d<t_lbl8> t_label; + + const t_label& _label; + + t_labeling_rgbn(const t_label& label) : _label(label) {} + + result operator()(const argument& c) const + { + t_lbl8 tmp = mln::opt::at(_label, c.blue(), c.red(), c.green()); + + return tmp; + } +}; + +// version non optimisée de label + +template <unsigned n> mln::image2d<mln::value::label_8> -label_image(const mln::image2d<mln::value::rgb<5> >& input, - const mln::image3d<mln::value::label_8>& label) +label_image(const mln::image2d< mln::value::rgb<n> >& input, + const mln::image3d< mln::value::label_8>& label) { - mln::image2d<mln::value::label_8> output(input.nrows(), - input.ncols()); + mln::image2d<mln::value::label_8> output; + + initialize(output, input); - mln_piter_(mln::image2d<mln::value::label_8>) po(output.domain()); - mln_piter_(mln::image2d<mln::value::rgb<5> >) pi(input.domain()); + mln_piter(mln::image2d< mln::value::label_8 >) po(output.domain()); + mln_piter(mln::image2d< mln::value::rgb<n> >) pi(input.domain()); for_all_2(po, pi) { - output(po) = label(mln::point3d(input(pi).blue(), - input(pi).red(), - input(pi).green())); + const mln::value::rgb<n>& vi = input(pi); + + output(po) = mln::opt::at(label, vi.blue(), vi.red(), vi.green()); } return output; } +template <unsigned n> +unsigned unquant(const float& value) +{ + unsigned size = pow(2,(8-n)); + unsigned result = value * size; + + return result; +} + +template <unsigned n> +void print_count2(const mln::image2d<mln::value::rgb<n> >& input_rgbn, + const mln::image3d<unsigned>& histo, + const mln::image3d<mln::value::label_8>& label, + const unsigned n_labels) +{ + typedef mln::value::label_8 t_lbl8; + typedef mln::value::rgb<n> t_rgbn; + typedef mln::value::int_u<n> t_int_un; + typedef mln::algebra::vec<3,float> t_vec3f; + typedef mln::accu::math::sum<unsigned,unsigned> t_sum; + typedef mln::accu::stat::mean<t_vec3f,t_vec3f,t_vec3f> t_mean; + typedef mln::accu::math::sum<t_vec3f,t_vec3f> t_diff; + typedef mln::accu::stat::variance<float,float,float> t_var; + typedef mln::image2d<t_lbl8> t_image2d_lbl8; + typedef mln::image2d<t_rgbn> t_image2d_rgbn; + typedef mln::image2d<t_int_un> t_image2d_int_un; + + mln::util::array<t_mean> mean((unsigned)(n_labels)+1); +// mln::util::array<t_diff> diff((unsigned)(n_labels)+1); + mln::util::array<t_var> var_red((unsigned)(n_labels)+1); + mln::util::array<t_var> var_green((unsigned)(n_labels)+1); + mln::util::array<t_var> var_blue((unsigned)(n_labels)+1); + mln::util::array<t_sum> count((unsigned)(n_labels)+1); + mln::util::array<float> abs((unsigned)(n_labels)+1); + mln::util::array<float> rel((unsigned)(n_labels)+1); + unsigned nb = 0; + + for (unsigned i = 0; i <= n_labels; ++i) + { + count(i).init(); + mean(i).init(); +// diff(i).init(); + var_red(i).init(); + var_green(i).init(); + var_blue(i).init(); + abs[i] = 0.0; + rel[i] = 0.0; + } + + mln::labeling::compute(count, histo, label, n_labels); + + for (unsigned i = 0; i <= n_labels; ++i) + { + unsigned c = count[i]; + nb += c; + } + + for (unsigned i = 0; i <= n_labels; ++i) + if (0 < count[i]) + { + abs[i] = ((float)count[i] / nb)*100.0; + rel[i] = ((float)count[i] / (nb - count[0]))*100.0; + } + + t_image2d_lbl8 label_img = mln::data::transform(input_rgbn, + t_labeling_rgbn<n>(label)); + + mln::labeling::compute(mean, input_rgbn, label_img, n_labels); + + +// t_image2d_rgbn mean_rgbn = mln::labeling::mean_values(input_rgbn, +// label_img, +// n_labels); +// t_image2d_int_un mean_red =mln::data::transform(mean_rgbn,t_channel<n>()); +// t_image2d_int_un mean_green=mln::data::transform(mean_rgbn,t_channel<n>()); +// t_image2d_int_un mean_blue =mln::data::transform(mean_rgbn,t_channel<n>()); + + t_image2d_int_un input_red =mln::data::transform(input_rgbn, + t_channel<n,0>()); + t_image2d_int_un input_green=mln::data::transform(input_rgbn, + t_channel<n,1>()); + t_image2d_int_un input_blue =mln::data::transform(input_rgbn, + t_channel<n,2>()); + +// FIXME VARIANCE NEGATIVE DANS LES RESULTATS !! + +// mln::labeling::compute(var_red, input_rgbn, label_img, n_labels); +// mln::labeling::compute(var_green, input_rgbn, label_img, n_labels); +// mln::labeling::compute(var_blue, input_rgbn, label_img, n_labels); + +// t_image2d_rgbn diff_rgbn = mln::arith::diff_abs(input_rgbn, mean_rgbn); + + std::cout << mln::labeling::compute(var_red, input_red, label_img, n_labels)(29) << std::endl; +// mln::labeling::compute(t_var(), input_red, label_img, n_labels); + mln::labeling::compute(var_green, input_green, label_img, n_labels); + mln::labeling::compute(var_blue, input_blue, label_img, n_labels); + + for (unsigned i = 0; i <= n_labels; ++i) + { + if (5.0 < abs[i] && 10.0 < rel[i]) + { + const t_vec3f& mean_v = mean[i]; +// const t_vec3f& diff_v = diff[i]; + + std::cout << i << " :[" << unquant<n>(mean_v[0]) +// << "(" << diff_v[0] + << "(" << var_red[i] + << ")," << unquant<n>(mean_v[1]) +// << "(" << diff_v[1] + << "(" << var_green[i] + << ")," << unquant<n>(mean_v[2]) +// << "(" << diff_v[2] + << "(" << var_blue[i] + << ")]- " << count[i] + << " - " << abs[i] + << " - " << rel[i] + << std::endl; + } + } +} void print_count(const mln::image3d<unsigned>& histo, const mln::image3d<mln::value::label_8>& label, @@ -70,66 +261,116 @@ void print_count(const mln::image3d<unsigned>& histo, unsigned red[255]; unsigned green[255]; unsigned blue[255]; + unsigned nb = 0; + unsigned tmp = 0; - for (unsigned i = 0; i < n_labels; ++i) + for (unsigned i = 0; i <= n_labels; ++i) { count[i] = 0; - red[i] = 0.0; - green[i] = 0.0; - blue[i] = 0.0; + red[i] = 0; + green[i] = 0; + blue[i] = 0; } - mln_piter_(mln::image3d<unsigned>) ph(histo.domain()); - mln_piter_(mln::image3d<mln::value::label_8>) pl(label.domain()); + mln_piter_(mln::image3d<unsigned>) p(histo.domain()); - for_all_2(ph, pl) + for_all(p) { - count[label(pl)] += histo(ph); - red[label(pl)] += histo(ph) * pl.row(); - green[label(pl)] += histo(ph) * pl.col(); - blue[label(pl)] += histo(ph) * pl.sli(); + count[label(p)] += histo(p); + red[label(p)] += histo(p) * p.row(); + green[label(p)] += histo(p) * p.col(); + blue[label(p)] += histo(p) * p.sli(); + nb += histo(p); + ++tmp; } std::cout << std::endl; - for (unsigned i = 0; i < n_labels; ++i) - { - red[i] = red[i] / count[i]; - green[i] = green[i] / count[i]; - blue[i] = blue[i] / count[i]; + std::cout << "nb : " << nb << std::endl; + std::cout << "tmp : " << tmp << std::endl; - std::cout << "count[" << i << "](" - << red[i] << ", " << green[i] << ", " - << blue[i] << ") = " << count[i] << std::endl; - } + std::cout << std::endl; + + for (unsigned i = 0; i <= n_labels; ++i) + if (0 < count[i]) + { + float percentage_abs = ((float)count[i] / nb)*100.0; + float percentage_rel = ((float)count[i] / (nb - count[0]))*100.0; + + red[i] = red[i] / count[i]; + green[i] = green[i] / count[i]; + blue[i] = blue[i] / count[i]; + + std::cout << "count[" << i << "](" + << red[i] << ", " << green[i] << ", " + << blue[i] << ") = " << count[i] << "(" + << percentage_abs << "%)"; + + if (0 < i) + std::cout << "[" << percentage_rel << "%]"; + + std::cout << std::endl; + } std::cout << std::endl; } -mln::image2d<mln::value::rgb<5> > -merge(const mln::image2d<mln::value::rgb<5> >& input, - const mln::image3d<mln::value::label_8>& label) +// Version optimisée de merge + +template <unsigned n> +struct t_merge_lbl8_with_rgbn : mln::Function_v2v< t_merge_lbl8_with_rgbn<n> > { - mln::image2d<mln::value::rgb<5> > output; + typedef mln::value::rgb<n> t_rgbn; + typedef mln::value::label_8 t_lbl8; + typedef t_rgbn argument; + typedef t_rgbn result; + typedef mln::image3d<t_lbl8> t_label; + + const t_label& _label; + + t_merge_lbl8_with_rgbn(const t_label& label) : _label(label) {} + + result operator()(const argument& c) const + { + t_rgbn tmp = c; + + if (0 == mln::opt::at(_label, c.blue(), c.red(), c.green())) + { + tmp = mln::literal::black; + } + + return tmp; + } +}; + +// version non optimisée de merge + +template <unsigned n> +mln::image2d< mln::value::rgb<n> > +merge(const mln::image2d< mln::value::rgb<n> >& input, + const mln::image3d< mln::value::label_8 >& label) +{ + mln::image2d<mln::value::rgb<n> > output; mln::initialize(output, input); + // mln::data::fill(output, mln::literal::green); - mln_piter_(mln::image2d<mln::value::rgb<5> >) pi(input.domain()); - mln_piter_(mln::image2d<mln::value::rgb<5> >) po(output.domain()); + mln_piter(mln::image2d< mln::value::rgb<n> >) pi(input.domain()); + mln_piter(mln::image2d< mln::value::rgb<n> >) po(output.domain()); for_all_2(pi, po) { - if (0 < label(mln::point3d(input(pi).blue(), - input(pi).red(), - input(pi).green()))) + const mln::value::rgb<n>& vi = input(pi); + mln::value::rgb<n>& vo = output(po); + + if (0 < mln::opt::at(label,vi.blue(),vi.red(),vi.green())) { - output(po).red() = input(pi).red(); - output(po).green() = input(pi).green(); - output(po).blue() = input(pi).blue(); + vo.red() = vi.red(); + vo.green() = vi.green(); + vo.blue() = vi.blue(); } else - output(po) = mln::literal::red; - //output(po) = mln::literal::black; + vo = mln::literal::black; } return output; @@ -137,78 +378,180 @@ merge(const mln::image2d<mln::value::rgb<5> >& input, // -// Regional maxima image processing chain. -// RGB8 +// Theo regional maxima image processing chain. // -void do_demo(const std::string& image) + +// FIXME C'est la dilatation qui fait apparaître des classes < min_volume. +// Une couleur se dilate au détriment du fond et des autres couleurs. + +int main2() { + const unsigned min_volume = 1000; + //const std::string& image = OLENA_IMG_PATH"/fly.ppm"; + const std::string& image = SCRIBO_PPM_IMG_PATH"/mp00082c_50p.ppm"; + //const std::string& image = OLENA_IMG_PATH"/tiny.ppm"; + typedef mln::value::label_8 t_lbl8; - typedef mln::value::int_u8 t_int_u8; typedef mln::value::rgb8 t_rgb8; typedef mln::value::rgb<5> t_rgb5; - typedef mln::image3d<t_lbl8> t_image3d_lbl8; - typedef mln::image2d<t_lbl8> t_image2d_lbl8; typedef mln::image2d<t_rgb8> t_image2d_rgb8; typedef mln::image2d<t_rgb5> t_image2d_rgb5; - typedef mln::image2d<t_int_u8> t_image2d_int_u8; - typedef mln::image3d<unsigned> t_histo3d; - typedef mln::image2d<unsigned> t_histo2d; - typedef mln::fun::v2v::rgb8_to_rgbn<5> t_rgb8_to_rgbn; + typedef mln::image3d<t_lbl8> t_image3d_lbl8; + typedef mln::image3d<unsigned> t_image3d_unsigned; + typedef mln::fun::v2v::rgb8_to_rgbn<5> t_rgb8_to_rgb5; typedef mln::accu::meta::stat::histo3d_rgb t_histo3d_fun; + typedef mln::accu::math::sum<unsigned,unsigned> t_sum; + + mln::util::timer timer; + + // START IMAGE PROCESSING CHAIN + timer.start(); t_image2d_rgb8 input_rgb8; t_image2d_rgb5 input_rgb5; - t_image2d_rgb5 output_rgb5; - t_image2d_rgb5 mean_rgb5; - t_histo3d histo; - t_image2d_int_u8 projected; - t_image2d_int_u8 filtered; - t_histo3d opened; + t_image3d_unsigned histo; + t_image3d_unsigned opened; t_image3d_lbl8 label; - t_image2d_lbl8 label_img; t_image3d_lbl8 dilated; t_lbl8 n_labels; - t_rgb5 value_rgb5; - // IMAGE LOADING PHASE - std::cout << "Image loading phase ..." << std::endl; mln::io::ppm::load(input_rgb8, image.c_str()); - input_rgb5 = mln::data::transform(input_rgb8, t_rgb8_to_rgbn()); - mln::io::ppm::save(input_rgb5, "input_rgb5.ppm"); + input_rgb5 = mln::data::transform(input_rgb8, t_rgb8_to_rgb5()); + histo = mln::data::compute(t_histo3d_fun(), input_rgb5); + opened = mln::morpho::opening::volume(histo, mln::c6(), min_volume); + label = mln::labeling::regional_maxima(opened, mln::c6(), n_labels); + dilated = mln::morpho::elementary::dilation(label, mln::c26()); + + mln::util::array<t_sum> length((unsigned)(n_labels)+1); + + for (unsigned i = 0; i <= n_labels; ++i) + length(i).init(); + mln::labeling::compute(length, histo, dilated, n_labels); - // HISTO COMPUTING PHASE - std::cout << "Histo computing phase ..." << std::endl; - histo = mln::data::compute(t_histo3d_fun(), input_rgb5); - projected = mln::display::display_histo3d_unsigned(histo); + timer.stop(); + // STOP IMAGE PROCESSING CHAIN + + std::cout << "Done in " << timer.read() << " ms" << std::endl; + std::cout << "n_labels : " << n_labels << std::endl; + + for (unsigned i = 0; i <= n_labels; ++i) + { + std::cout << "count[" << i << "] = " << length[i] << std::endl; + } + + print_count(histo,label,n_labels); - mln::io::pgm::save(projected, "histo.pgm"); //mln::io::plot::save_image_sh(histo, "histo.sh"); + //mln::io::plot::save_image_sh(histo, "opened.sh"); + //mln::io::plot::save_image_sh(label, "label.sh"); - // HISTO FILTERING PHASE - std::cout << "Histo filtering phase ..." << std::endl;; - opened = mln::morpho::opening::volume(histo, mln::c6(), 1000); - mln::io::plot::save_image_sh(opened, "opened.sh"); - filtered = mln::display::display_histo3d_unsigned(opened); - mln::io::pgm::save(filtered, "filtered.pgm"); + return 0; +} +// n < 8, n is the degree of quantification +template <unsigned n> +void demo() +{ + const unsigned min_volume = 1000; + //const std::string& image = OLENA_IMG_PATH"/fly.ppm"; + const std::string& image = SCRIBO_PPM_IMG_PATH"/mp00082c_50p.ppm"; + //const std::string& image = OLENA_IMG_PATH"/tiny.ppm"; - // HISTO LABELING PHASE - std::cout << "Histo labeling phase ..." << std::endl; - label = mln::labeling::regional_maxima(opened, mln::c6(), n_labels); - mln::io::plot::save_image_sh(label, "label.sh"); + typedef mln::value::label_8 t_lbl8; + typedef mln::value::int_u8 t_int_u8; + typedef mln::value::rgb8 t_rgb8; + typedef mln::value::rgb<n> t_rgbn; + typedef mln::image3d<t_lbl8> t_image3d_lbl8; + typedef mln::image2d<t_lbl8> t_image2d_lbl8; + typedef mln::image2d<t_rgb8> t_image2d_rgb8; + typedef mln::image2d<t_rgbn> t_image2d_rgbn; + typedef mln::image2d<t_int_u8> t_image2d_int_u8; + typedef mln::image3d<unsigned> t_histo3d; + typedef mln::image2d<unsigned> t_histo2d; + typedef mln::fun::v2v::rgb8_to_rgbn<n> t_rgb8_to_rgbn; + typedef mln::accu::meta::stat::histo3d_rgb t_histo3d_fun; + mln::util::timer timer; - // HISTO DILATING PHASE - std::cout << "Histo dilating phase ..." << std::endl; - dilated = mln::morpho::elementary::dilation(label, mln::c18()); - mln::io::plot::save_image_sh(dilated, "dilated.sh"); + // START OF IMAGE PROCESSING CHAIN + timer.start(); - // PRINTING PHASE - std::cout << "Labels : " << n_labels << std::endl; - print_count(histo, dilated, n_labels); + t_image2d_rgb8 input_rgb8; + t_image2d_rgbn input_rgbn; + t_image2d_rgbn output_rgbn; + // t_image2d_rgbn mean_rgb5; + t_histo3d histo; + // t_image2d_int_u8 projected; + // t_image2d_int_u8 filtered; + t_histo3d opened; + t_image3d_lbl8 label; + t_image2d_lbl8 label_img; + t_image3d_lbl8 dilated; + t_lbl8 n_labels; + // t_rgbn value_rgbn; + mln::io::ppm::load(input_rgb8, image.c_str()); + input_rgbn = mln::data::transform(input_rgb8, t_rgb8_to_rgbn()); + histo = mln::data::compute(t_histo3d_fun(), input_rgbn); + opened = mln::morpho::opening::volume(histo, mln::c6(), min_volume); + label = mln::labeling::regional_maxima(opened, mln::c6(), n_labels); + dilated = mln::morpho::elementary::dilation(label, mln::c26()); + + timer.stop(); + // END OF IMAGE PROCESSING CHAIN + + std::ostringstream name; + std::ostringstream name2; + std::ostringstream name3; + + name << "input_rgb" << n << ".ppm"; + name2 << "output_rgb" << n << ".ppm"; + name3 << "label_img" << n << ".pgm"; + + std::cout << "Done in : " << timer.read() << " s" << std::endl; + std::cout << "Labels : " << n_labels << std::endl; + std::cout << "Name : " << name.str() << std::endl; + + mln::io::ppm::save(input_rgbn, name.str()); + + mln::util::timer timer2; + + timer2.start(); + print_count2(input_rgbn, histo, dilated, n_labels); + timer2.stop(); + std::cout << "timer2 : " << timer2.read() << std::endl; + output_rgbn = mln::data::transform(input_rgbn, + t_merge_lbl8_with_rgbn<n>(label)); + // output_rgbn = merge<n>(input_rgbn, dilated); + mln::io::ppm::save(output_rgbn, name2.str()); + + label_img = mln::data::transform(input_rgbn, + t_labeling_rgbn<n>(label)); + // label_img = label_image<n>(input_rgbn, dilated); + mln::io::pgm::save(label_img, name3.str()); + + + // localiser les couleurs sur l'image (fond en black, le reste) + + // La dilatation englobe beaucoup plus de couleur, mais celles-ci ne + // sont pas forcément présentes dans l'image. Du coup, les classes ne + // bougent pas démeusurément. + +// mln::io::ppm::save(input_rgb5, "input_rgb5.ppm"); +// mln::io::plot::save_image_sh(input_rgb8, "input_rgb8.sh"); +// mln::io::plot::save_image_sh(input_rgb5, "input_rgb5.sh"); +// projected = mln::display::display_histo3d_unsigned(histo); +// mln::io::pgm::save(projected, "histo.pgm"); +// mln::io::plot::save_image_sh(histo, "histo.sh"); +// mln::io::plot::save_image_sh(opened, "opened.sh"); +// filtered = mln::display::display_histo3d_unsigned(opened); +// mln::io::pgm::save(filtered, "filtered.pgm"); +// mln::io::plot::save_image_sh(label, "label.sh"); + // mln::io::plot::save_image_sh(dilated, "dilated.sh"); + + /* // OUTPUT PHASE std::cout << "Output phase ..." << std::endl; output_rgb5 = merge(input_rgb5, dilated); @@ -221,113 +564,21 @@ void do_demo(const std::string& image) label_img = label_image(input_rgb5, dilated); mln::io::pgm::save(label_img, "label_img.pgm"); - // BUILDING MEAN VALUES std::cout << "Building mean values phase ..." << std::endl; mean_rgb5 = mln::labeling::mean_values(input_rgb5, label_img, n_labels); mln::io::ppm::save(mean_rgb5, "mean.ppm"); + */ } -void demo(const std::string& image = SCRIBO_PPM_IMG_PATH"/mp00082c_50p.ppm", - //const std::string& image = OLENA_IMG_PATH"/house.ppm", - const unsigned k_center = 2, - //const unsigned k_center = 3, - const unsigned n_times = 10, - const unsigned watch_dog = 10) -{ - std::cout << "----------------------------------------" << std::endl; - std::cout << "Launching the demo with these parameters" << std::endl; - std::cout << "image : " << image << std::endl; - std::cout << "k_center : " << k_center << std::endl; - std::cout << "n_times : " << n_times << std::endl; - std::cout << "watch_dog : " << watch_dog << std::endl; - std::cout << "----------------------------------------" << std::endl; - - do_demo(image); -} - -void usage(const int argc, const char *args[]) -{ - std::cout << "----------------------------------------" << std::endl; - std::cout << "argc : " << argc << std::endl; - - for (int i = 0; i < argc; ++i) - std::cout << "args[" << i << "] : " << args[i] << std::endl; - - std::cout << "----------------------------------------" << std::endl; - std::cout << "usage: kmean2d [image [k_center [n_times [watch_dog]]]]" - << std::endl; - std::cout << "pbm image (points to work with)" << std::endl; - std::cout << "unsigned k_center (number of centers)" << std::endl; - std::cout << "unsigned n_times (number of launching)" << std::endl; - std::cout << "unsigned watch_dog (convergence loop)" << std::endl; - std::cout << "----------------------------------------" << std::endl; -} - -bool char_to_unsigned(const bool status, const char *arg, unsigned& val) -{ - bool result = false; - - if (status) - { - std::istringstream arg_stream(arg); - - arg_stream >> val; - - result = !arg_stream.fail(); - } - - return result; -} - -bool char_to_string(const bool status, const char *arg, std::string& val) -{ - bool result = false; - - if (status) - { - std::istringstream arg_stream(arg); - - arg_stream >> val; - - return !arg_stream.fail(); - } - - return result; -} - -int main(const int argc, const char *args[]) +int main() { - std::string image("top"); - unsigned k_center; - unsigned watch_dog; - unsigned n_times; - bool status = true; - - switch (argc) - { - case 5: status = char_to_unsigned(status, args[4], watch_dog); - case 4: status = char_to_unsigned(status, args[3], n_times); - case 3: status = char_to_unsigned(status, args[2], k_center); - case 2: status = char_to_string(status, args[1], image); break; - case 1: status = true; break; - default: status = false; - } - - if (status) - { - switch (argc) - { - case 1: demo(); break; - case 2: demo(image); break; - case 3: demo(image, k_center); break; - case 4: demo(image, k_center, n_times); break; - case 5: demo(image, k_center, n_times, watch_dog); break; - } - } - else - usage(argc, args); - - return 0; + demo<2>(); // 2.26 s + demo<3>(); // 2.29 s + demo<4>(); // 2.29 s + demo<5>(); // 2.37 s + demo<6>(); // 3.19 s + demo<7>(); // 11.43 s + demo<8>(); // 96.19 s } -- 1.5.6.5
14 years, 5 months
1
0
0
0
last-svn-commit-191-g993461b Test experimentation with regmax code on annoting database.
by green
* green/exp/labeling/regional_maxima/Makefile.am: New Makefile. * green/exp/clustering/regional_maxima/regional_maxima.cc: New directory oriented demonstration code. --- milena/sandbox/ChangeLog | 22 ++- .../labeling/regional_maxima}/Makefile.am | 8 +- .../labeling/regional_maxima/regional_maxima.cc | 156 ++++++++++++++++++++ 3 files changed, 175 insertions(+), 11 deletions(-) copy milena/sandbox/green/{demo/annoting/rgb_64 => exp/labeling/regional_maxima}/Makefile.am (95%) create mode 100644 milena/sandbox/green/exp/labeling/regional_maxima/regional_maxima.cc diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog index 79f1a7f..b2c3dba 100644 --- a/milena/sandbox/ChangeLog +++ b/milena/sandbox/ChangeLog @@ -77,38 +77,46 @@ 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Test experimentation with regmax code on annoting database. + + * green/exp/labeling/regional_maxima/Makefile.am: New Makefile. + * green/exp/clustering/regional_maxima/regional_maxima.cc: New directory + oriented demonstration code. + +2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Transform kmean object in a big function and then a canvas. * green/mln/clustering/kmean_rgb.hh: New library source code. - * green/demo/clustering/kmean_rgb/Makefile: New Makefile. + * green/demo/clustering/kmean_rgb/Makefile.am: New Makefile. * green/demo/clustering/kmean_rgb/kmean_rgb.cc: New demo. code. 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> Benchmark on distance, preliminary work before optimizing kmean. - * green/bench/transform/distance/Makefile: New Makefile. + * green/bench/transform/distance/Makefile.am: New Makefile. * green/bench/transform/distance/distance.cc: New processing chain. 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> Works on Millet2008 descriptors. - * green/mln/demo/annoting/bic/Makefile: New Makefile. + * green/mln/demo/annoting/bic/Makefile.am: New Makefile. * green/mln/demo/annoting/bic/bic.cc: New impl. of the bic descriptor. - * green/mln/demo/annoting/lep/Makefile: New Makefile. + * green/mln/demo/annoting/lep/Makefile.am: New Makefile. * green/mln/demo/annoting/lep/lep.cc: New impl. of the lep descriptor. - * green/mln/demo/annoting/project/Makefile: New Makefile. + * green/mln/demo/annoting/project/Makefile.am: New Makefile. * green/mln/demo/annoting/project/project.cc: New impl. of the project descriptor. - * green/mln/demo/annoting/rgb_64/Makefile: New Makefile. + * green/mln/demo/annoting/rgb_64/Makefile.am: New Makefile. * green/mln/demo/annoting/rgb_64/rgb_64.cc: New impl. of the rgb_64 descriptor. - * green/mln/demo/annoting/rgb_64_9/Makefile: New Makefile. + * green/mln/demo/annoting/rgb_64_9/Makefile.am: New Makefile. * green/mln/demo/annoting/rgb_64_9/rgb_64_9.cc: New impl. of the rgb_64_9 descriptor. diff --git a/milena/sandbox/green/demo/annoting/rgb_64/Makefile.am b/milena/sandbox/green/exp/labeling/regional_maxima/Makefile.am similarity index 95% copy from milena/sandbox/green/demo/annoting/rgb_64/Makefile.am copy to milena/sandbox/green/exp/labeling/regional_maxima/Makefile.am index 96eafb4..ab76e18 100644 --- a/milena/sandbox/green/demo/annoting/rgb_64/Makefile.am +++ b/milena/sandbox/green/exp/labeling/regional_maxima/Makefile.am @@ -8,15 +8,15 @@ INCLUDES= -I$(HOME)/svn/oln/trunk/milena/sandbox/green #CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) -CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) -#CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) ECHO= echo RM= rm MKDIR= mkdir -p CP= cp -SOURCE_PATTERN= green/demo -BUILD__PATTERN= green/build/demo +SOURCE_PATTERN= green/exp +BUILD__PATTERN= green/build/exp ifeq ($(findstring $(BUILD__PATTERN),$(PWD)), $(BUILD__PATTERN)) diff --git a/milena/sandbox/green/exp/labeling/regional_maxima/regional_maxima.cc b/milena/sandbox/green/exp/labeling/regional_maxima/regional_maxima.cc new file mode 100644 index 0000000..28b6b88 --- /dev/null +++ b/milena/sandbox/green/exp/labeling/regional_maxima/regional_maxima.cc @@ -0,0 +1,156 @@ +// EXPERIMENTATION ON REGIONAL MAXIMA +// COUNTING THE IMAGE COLORS + +#include <iostream> +#include <sstream> +#include <boost/filesystem.hpp> + +#include <mln/img_path.hh> + +#include <mln/accu/math/sum.hh> +#include <mln/accu/math/count.hh> +#include <mln/accu/stat/histo3d_rgb.hh> +#include <mln/accu/stat/mean.hh> +#include <mln/accu/stat/variance.hh> + +#include <mln/algebra/vec.hh> + +#include <mln/arith/diff_abs.hh> + +#include <mln/core/macros.hh> +#include <mln/core/alias/neighb3d.hh> +#include <mln/core/image/image2d.hh> +#include <mln/core/image/image3d.hh> +#include <mln/core/image/dmorph/image_if.hh> +#include <mln/core/routine/initialize.hh> + +#include <mln/data/compute.hh> +#include <mln/data/fill.hh> +#include <mln/data/transform.hh> + +#include <mln/fun/v2v/rgb8_to_rgbn.hh> + +#include <mln/io/pgm/load.hh> +#include <mln/io/pgm/save.hh> +#include <mln/io/ppm/load.hh> +#include <mln/io/ppm/save.hh> + +#include <mln/labeling/regional_maxima.hh> +#include <mln/labeling/mean_values.hh> +#include <mln/labeling/compute.hh> + +#include <mln/literal/colors.hh> + +#include <mln/morpho/opening/volume.hh> +#include <mln/morpho/elementary/dilation.hh> + +#include <mln/opt/at.hh> + +#include <mln/pw/cst.hh> + +#include <mln/util/array.hh> +#include <mln/util/timer.hh> + +#include <mln/value/label_8.hh> +#include <mln/value/rgb8.hh> +#include <mln/value/rgb.hh> +#include <mln/value/int_u.hh> + + +// LISTER UN REPERTOIRE +// ECRIRE UN FICHIER DE SYNTHESE SUR LA CLASSE +// + + +// n < 8, n is the degree of quantification +template <unsigned n> +unsigned count_image_color(const std::string& image) +{ + typedef mln::value::label_8 t_lbl8; + typedef mln::value::int_u8 t_int_u8; + typedef mln::value::rgb8 t_rgb8; + typedef mln::value::rgb<n> t_rgbn; + typedef mln::image3d<t_lbl8> t_image3d_lbl8; + typedef mln::image2d<t_lbl8> t_image2d_lbl8; + typedef mln::image2d<t_rgb8> t_image2d_rgb8; + typedef mln::image2d<t_rgbn> t_image2d_rgbn; + typedef mln::image2d<t_int_u8> t_image2d_int_u8; + typedef mln::image3d<unsigned> t_histo3d; + typedef mln::image2d<unsigned> t_histo2d; + typedef mln::fun::v2v::rgb8_to_rgbn<n> t_rgb8_to_rgbn; + typedef mln::accu::meta::stat::histo3d_rgb t_histo3d_fun; + typedef mln::accu::meta::math::count t_count_fun; + + t_image2d_rgb8 input_rgb8; + t_image2d_rgbn input_rgbn; + t_image2d_rgbn output_rgbn; + t_histo3d histo; + t_histo3d opened; + t_image3d_lbl8 label; + t_image2d_lbl8 label_img; + t_image3d_lbl8 dilated; + t_lbl8 n_labels; + + mln::io::ppm::load(input_rgb8, image.c_str()); + + unsigned nb_pixel = input_rgb8.ncols() * input_rgb8.nrows(); + unsigned min_volume = (unsigned)(nb_pixel * 0.054); + + input_rgbn = mln::data::transform(input_rgb8, t_rgb8_to_rgbn()); + // FIXME UTILISER UN PREDICAT COMME FUN::CHESS + histo = mln::data::compute(t_histo3d_fun(), input_rgbn | mln::pw::value(0)); +// return mln::data::compute(t_count_fun(), input_rgbn); + // FIXME REALISER UN COUNT AVEC UN PREDICA SUR L'IMAGE + return nb_pixel; +// opened = mln::morpho::opening::volume(histo, mln::c6(), min_volume); +// label = mln::labeling::regional_maxima(opened, mln::c6(), n_labels); + +// return n_labels; +} + + +int main() +{ + typedef boost::filesystem::path t_path; + //typedef boost::filesystem::initial_path<t_path()> t_init_path; + typedef boost::filesystem::directory_iterator t_iter_path; + + t_path full_path(ANNOTING_TYPED_IMG_PATH); + + std::cout << "entering " << full_path << std::endl; + + if (//1 < argc && + boost::filesystem::exists(full_path) && + boost::filesystem::is_directory(full_path)) + { + boost::filesystem::system_complete(full_path); + const t_iter_path end_iter; + unsigned count = 0; + unsigned sum1 = 0; + unsigned sum2 = 0; + + for (t_iter_path dir_iter(full_path); end_iter != dir_iter; ++dir_iter) + { + unsigned val = count_image_color<5>(dir_iter->path().string()); + + ++count; + sum1 += val; + sum2 += val*val; + + std::cout << dir_iter->path().string() << " => " << val << std::endl; + // FIXME NB COULEURS BRUTES + // FIXME NB DE COULEURS + // FIXME LISTE DES COULEURS + // IMPORTANCES + } + + unsigned mean = sum1 / count; + unsigned var = sum2 / count - mean * mean; + + std::cout << "mean : " << mean << std::endl; + std::cout << "var : " << var << std::endl; + } + + return 0; +} + -- 1.5.6.5
14 years, 5 months
1
0
0
0
last-svn-commit-190-g60fefaa Transform kmean object in a big function and then a canvas.
by green
* green/mln/clustering/kmean_rgb.hh: New library source code. * green/demo/clustering/kmean_rgb/Makefile: New Makefile. * green/demo/clustering/kmean_rgb/kmean_rgb.cc: New demo. code. --- milena/sandbox/ChangeLog | 8 ++ .../histo2d => clustering/kmean_rgb}/Makefile.am | 0 .../green/demo/clustering/kmean_rgb/kmean_rgb.cc | 91 ++++++++++++++++++++ .../sandbox/green/mln/clustering/kmean_rgb.hh | 0 4 files changed, 99 insertions(+), 0 deletions(-) copy milena/sandbox/green/demo/{accu/stat/histo2d => clustering/kmean_rgb}/Makefile.am (100%) create mode 100644 milena/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc copy {scribo => milena}/sandbox/green/mln/clustering/kmean_rgb.hh (100%) diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog index 0850294..79f1a7f 100644 --- a/milena/sandbox/ChangeLog +++ b/milena/sandbox/ChangeLog @@ -77,6 +77,14 @@ 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Transform kmean object in a big function and then a canvas. + + * green/mln/clustering/kmean_rgb.hh: New library source code. + * green/demo/clustering/kmean_rgb/Makefile: New Makefile. + * green/demo/clustering/kmean_rgb/kmean_rgb.cc: New demo. code. + +2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Benchmark on distance, preliminary work before optimizing kmean. * green/bench/transform/distance/Makefile: New Makefile. diff --git a/milena/sandbox/green/demo/accu/stat/histo2d/Makefile.am b/milena/sandbox/green/demo/clustering/kmean_rgb/Makefile.am similarity index 100% copy from milena/sandbox/green/demo/accu/stat/histo2d/Makefile.am copy to milena/sandbox/green/demo/clustering/kmean_rgb/Makefile.am diff --git a/milena/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc b/milena/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc new file mode 100644 index 0000000..36641b6 --- /dev/null +++ b/milena/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc @@ -0,0 +1,91 @@ +// DEMO ON KMEAN_RGB + +#include <mln/clustering/kmean_rgb.hh> + +#include <iostream> +#include <sstream> + +#include <mln/img_path.hh> + +#include <mln/core/macros.hh> +#include <mln/core/image/image2d.hh> +//#include <mln/core/image/dmorph/image_if.hh> + +#include <mln/data/transform.hh> +#include <mln/fun/v2v/rgb8_to_rgbn.hh> + +#include <mln/io/ppm/load.hh> +//#include <mln/io/pgm/load.hh> +#include <mln/io/pgm/save.hh> +//#include <mln/io/ppm/save.hh> +//#include <mln/io/plot/save_image_sh.hh> + +//#include <mln/pw/value.hh> + +//#include <mln/value/int_u8.hh> +#include <mln/value/label_8.hh> +#include <mln/value/rgb8.hh> + +int main() +{ + const std::string& image = OLENA_IMG_PATH"/house.ppm"; + const unsigned k_center = 3; + const unsigned n_times = 10; + const unsigned watch_dog = 10; + + typedef mln::value::label_8 t_lbl8; + typedef mln::value::rgb8 t_rgb8; + typedef mln::value::rgb<5> t_rgb5; + typedef mln::image2d<t_rgb8> t_image2d_rgb8; + typedef mln::image2d<t_rgb5> t_image2d_rgb5; + typedef mln::image2d<t_lbl8> t_image2d_lbl8; + typedef mln::fun::v2v::rgb8_to_rgbn<5> t_rgb8_to_rgb5; + + t_image2d_rgb8 house_rgb8; + t_image2d_rgb5 house_rgb5; + t_image2d_lbl8 house_lbl8; + + mln::io::ppm::load(house_rgb8, image.c_str()); + house_rgb5 = mln::data::transform(house_rgb8, t_rgb8_to_rgb5()); + + mln::trace::quiet = false; + + house_lbl8 = mln::clustering::kmean_rgb<double,5>(house_rgb5, + k_center, + watch_dog, + n_times); + mln::trace::quiet = true; + + mln::io::pgm::save(house_lbl8, "label.pgm"); + /* + + + + t_kmean kmean(house_rgb5, k_center, watch_dog, n_times); + + + + //kmean.launch_one_time(); + kmean.launch_n_times(); + + // Not safe because we don't test kmean.is_valid() + + t_kmean::t_color_dbg color_img = kmean.get_color_dbg(); + t_kmean::t_mean_dbg mean_img = kmean.get_mean_dbg(); + t_kmean::t_label_dbg label_img = kmean.get_label_dbg(); + t_kmean::t_variance_cnv variance_cnv = kmean.get_variance_cnv(); + t_kmean::t_mean_cnv mean_cnv = kmean.get_mean_cnv(); + + mln::io::ppm::save(mean_img, "mean.ppm"); + mln::io::ppm::save(color_img, "color.ppm"); + mln::io::pgm::save(label_img, "label.pgm"); + + mln::io::plot::save_image_sh(mean_img, "mean.sh"); + mln::io::plot::save_image_sh(mean_cnv, "mean_cnv.sh"); + mln::io::plot::save_image_sh(variance_cnv, "variance_cnv.sh"); + + */ + + return 0; +} + diff --git a/scribo/sandbox/green/mln/clustering/kmean_rgb.hh b/milena/sandbox/green/mln/clustering/kmean_rgb.hh similarity index 100% copy from scribo/sandbox/green/mln/clustering/kmean_rgb.hh copy to milena/sandbox/green/mln/clustering/kmean_rgb.hh -- 1.5.6.5
14 years, 5 months
1
0
0
0
last-svn-commit-189-g4b0e1fb Benchmark on distance, preliminary work before optimizing kmean.
by green
* green/bench/transform/distance/Makefile: New Makefile. * green/bench/transform/distance/distance.cc: New processing chain. --- milena/sandbox/ChangeLog | 7 + .../transform/distance}/Makefile.am | 8 +- .../green/bench/transform/distance/distance.cc | 775 ++++++++++++++++++++ 3 files changed, 786 insertions(+), 4 deletions(-) copy milena/sandbox/green/{demo/annoting/project => bench/transform/distance}/Makefile.am (95%) create mode 100644 milena/sandbox/green/bench/transform/distance/distance.cc diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog index f032fcf..0850294 100644 --- a/milena/sandbox/ChangeLog +++ b/milena/sandbox/ChangeLog @@ -77,6 +77,13 @@ 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Benchmark on distance, preliminary work before optimizing kmean. + + * green/bench/transform/distance/Makefile: New Makefile. + * green/bench/transform/distance/distance.cc: New processing chain. + +2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Works on Millet2008 descriptors. * green/mln/demo/annoting/bic/Makefile: New Makefile. diff --git a/milena/sandbox/green/demo/annoting/project/Makefile.am b/milena/sandbox/green/bench/transform/distance/Makefile.am similarity index 95% copy from milena/sandbox/green/demo/annoting/project/Makefile.am copy to milena/sandbox/green/bench/transform/distance/Makefile.am index 96eafb4..115c385 100644 --- a/milena/sandbox/green/demo/annoting/project/Makefile.am +++ b/milena/sandbox/green/bench/transform/distance/Makefile.am @@ -7,16 +7,16 @@ ######### INCLUDES= -I$(HOME)/svn/oln/trunk/milena/sandbox/green -#CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) -CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) #CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) ECHO= echo RM= rm MKDIR= mkdir -p CP= cp -SOURCE_PATTERN= green/demo -BUILD__PATTERN= green/build/demo +SOURCE_PATTERN= green/bench +BUILD__PATTERN= green/build/bench ifeq ($(findstring $(BUILD__PATTERN),$(PWD)), $(BUILD__PATTERN)) diff --git a/milena/sandbox/green/bench/transform/distance/distance.cc b/milena/sandbox/green/bench/transform/distance/distance.cc new file mode 100644 index 0000000..b71b6df --- /dev/null +++ b/milena/sandbox/green/bench/transform/distance/distance.cc @@ -0,0 +1,775 @@ +// BENCH + +#include <mln/opt/at.hh> + +#include <mln/core/alias/box3d.hh> +#include <mln/core/alias/neighb2d.hh> +#include <mln/core/alias/neighb3d.hh> +#include <mln/core/alias/point3d.hh> +#include <mln/core/alias/w_window2d_int.hh> +#include <mln/core/alias/w_window3d_int.hh> +#include <mln/core/image/image2d.hh> +#include <mln/core/image/image3d.hh> +#include <mln/core/routine/initialize.hh> + +#include <mln/data/fill.hh> + +#include <mln/io/pgm/save.hh> +#include <mln/io/plot/save_image_sh.hh> + +#include <mln/literal/zero.hh> + +#include <mln/make/w_window2d_int.hh> +#include <mln/make/w_window3d_int.hh> + +#include <mln/transform/influence_zone_geodesic.hh> +#include <mln/transform/influence_zone_front.hh> + +#include <mln/util/array.hh> +#include <mln/util/timer.hh> + +#include <mln/value/label_8.hh> + + +//------------------------------------------------------------------------------ +// Build input, seeds and other tools +//------------------------------------------------------------------------------ + +mln::image2d<mln::value::label_8> build_input2d(unsigned nb_seed, unsigned size) +{ + typedef mln::value::label_8 t_lbl; + mln::image2d<t_lbl> input(mln::box2d(mln::point2d(0,0), + mln::point2d(size,size))); + + mln::data::fill(input, mln::literal::zero); + + unsigned top = size / nb_seed; + unsigned lbl = 0; + + for (unsigned i = top/2; i < size; i += top) + for (unsigned j = top/2; j < size; j += top) + input(mln::point2d(i,j)) = ++lbl; + + //mln::io::pgm::save(input, "input.pgm"); + + return input; +} + +mln::image3d<mln::value::label_8> build_input3d(unsigned nb_seed, unsigned size) +{ + typedef mln::value::label_8 t_lbl; + mln::image3d<t_lbl> input(mln::box3d(mln::point3d(0,0,0), + mln::point3d(size,size,size))); + + mln::data::fill(input, mln::literal::zero); + + unsigned top = size / nb_seed; + unsigned lbl = 0; + + for (unsigned i = top/2; i < size; i += top) + for (unsigned j = top/2; j < size; j += top) + for (unsigned k = top/2; k < size; k += top) + input(mln::point3d(k,i,j)) = ++lbl; + + //mln::io::pgm::save(input, "input.pgm"); + + return input; +} + +mln::util::array<mln::point3d> build_seed3d(unsigned nb_seed, unsigned size) +{ + mln::util::array<mln::point3d> result; + unsigned top = size / nb_seed; + + for (unsigned i = top/2; i < size; i += top) + for (unsigned j = top/2; j < size; j += top) + for (unsigned k = top/2; k < size; k += top) + result.append(mln::point3d(k,i,j)); + + // std::cout << result << std::endl; + + return result; +} + +mln::util::array<mln::point2d> build_seed2d(unsigned nb_seed, unsigned size) +{ + mln::util::array<mln::point2d> result; + unsigned top = size / nb_seed; + + for (unsigned i = top/2; i < size; i += top) + for (unsigned j = top/2; j < size; j += top) + result.append(mln::point2d(j,i)); + + // std::cout << result << std::endl; + + return result; +} + +unsigned distance(mln::point3d p1, mln::point3d p2) +{ + unsigned row2 = (p1.row() - p2.row())*(p1.row() - p2.row()); + unsigned col2 = (p1.col() - p2.col())*(p1.col() - p2.col()); + unsigned sli2 = (p1.sli() - p2.sli())*(p1.sli() - p2.sli()); + unsigned res = row2 + col2 + sli2; + + return res; +} + +unsigned distance(mln::point2d p1, mln::point2d p2) +{ + unsigned row2 = (p1.row() - p2.row())*(p1.row() - p2.row()); + unsigned col2 = (p1.col() - p2.col())*(p1.col() - p2.col()); + unsigned res = row2 + col2; + + return res; +} + + +//------------------------------------------------------------------------------ +// Bench geodesic distance +//------------------------------------------------------------------------------ + +void influence_zone_geodesic_2d(mln::util::timer& timer, + const mln::image2d<mln::value::label_8>& input, + const mln::neighb2d & neighb) +{ + mln::image2d<mln::value::label_8> output; + + timer.start(); + output = mln::transform::influence_zone_geodesic(input, neighb); + timer.stop(); + + //mln::io::pgm::save(output, "output.pgm"); +} + +void influence_zone_geodesic_3d(mln::util::timer& timer, + const mln::image3d<mln::value::label_8>& input, + const mln::neighb3d & neighb) +{ + mln::image3d<mln::value::label_8> output; + + timer.start(); + output = mln::transform::influence_zone_geodesic(input, neighb); + timer.stop(); + + //mln::io::pgm::save(output, "output.pgm"); +} + + +int test_influence_zone_geodesic_2d() +{ + mln::util::timer timer; + +// Test the label c4 + mln::image1d<float> chart_seed_c04(16*16+2); + + mln::data::fill(chart_seed_c04, mln::literal::zero); + + for (unsigned i = 1; i < 16+1; ++i) + { + influence_zone_geodesic_2d(timer,build_input2d(i,256),mln::c4()); + std::cout << "c04|256x256|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c04, i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c04, "geodesic.c04.2d.seed.sh"); + + // Test the label c8 + mln::image1d<float> chart_seed_c08(16*16+2); + + mln::data::fill(chart_seed_c08, mln::literal::zero); + + for (unsigned i = 1; i < 16+1; ++i) + { + influence_zone_geodesic_2d(timer,build_input2d(i,256),mln::c8()); + std::cout << "c08|256x256|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c08, i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c08, "geodesic.c08.2d.seed.sh"); + + // Test the size of the image + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c04(256+1); + + mln::data::fill(chart_size_c04, mln::literal::zero); + + for (unsigned i = 16; i < 256+1; ++i) + { + influence_zone_geodesic_2d(timer, build_input2d(4,i),mln::c4()); + std::cout << "c04|" << i << "x" << i << "|16 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c04, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c04, "geodesic.c04.2d.size.sh"); + + // Test the size of the image + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c08(256+1); + + mln::data::fill(chart_size_c08, mln::literal::zero); + + for (unsigned i = 16; i < 256+1; ++i) + { + influence_zone_geodesic_2d(timer, build_input2d(4,i),mln::c8()); + std::cout << "c08|" << i << "x" << i << "|16 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c08, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c08, "geodesic.c08.2d.size.sh"); + + + return 0; +} + + +void test_influence_zone_geodesic_3d() +{ + mln::util::timer timer; + + // Test the number of labels c06 + mln::image1d<float> chart_seed_c06(5*5*5+2); + + mln::data::fill(chart_seed_c06, mln::literal::zero); + + for (unsigned i = 1; i < 5+1; ++i) + { + influence_zone_geodesic_3d(timer, build_input3d(i,128), mln::c6()); + std::cout << "c06|128x128x128|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c06, i*i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c06, "geodesic.c06.3d.seed.sh"); + + // Test the number of labels c18 + mln::image1d<float> chart_seed_c18(5*5*5+2); + + mln::data::fill(chart_seed_c18, mln::literal::zero); + + for (unsigned i = 1; i < 5+1; ++i) + { + influence_zone_geodesic_3d(timer, build_input3d(i,128), mln::c18()); + std::cout << "c18|128x128x128|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c18, i*i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c18, "geodesic.c18.3d.seed.sh"); + + // Test the number of labels c26 + mln::image1d<float> chart_seed_c26(5*5*5+2); + + mln::data::fill(chart_seed_c26, mln::literal::zero); + + for (unsigned i = 1; i < 5+1; ++i) + { + influence_zone_geodesic_3d(timer, build_input3d(i,128), mln::c26()); + std::cout << "c26|128x128x128|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c26, i*i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c26, "geodesic.c26.3d.seed.sh"); + + // Test the size of the image c06 + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c06(128+1); + + mln::data::fill(chart_size_c06, mln::literal::zero); + + for (unsigned i = 6; i < 128+1; ++i) + { + influence_zone_geodesic_3d(timer, build_input3d(2,i), mln::c6()); + std::cout << "c06|" << i << "x" << i << "x" << i << "|8 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c06, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c06, "geodesic.c06.3d.size.sh"); + + // Test the size of the image c18 + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c18(128+1); + + mln::data::fill(chart_size_c18, mln::literal::zero); + + for (unsigned i = 6; i < 128+1; ++i) + { + influence_zone_geodesic_3d(timer, build_input3d(2,i), mln::c18()); + std::cout << "c18|" << i << "x" << i << "x" << i << "|8 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c18, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c18, "geodesic.c18.3d.size.sh"); + + // Test the size of the image c26 + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c26(128+1); + + mln::data::fill(chart_size_c26, mln::literal::zero); + + for (unsigned i = 6; i < 128+1; ++i) + { + influence_zone_geodesic_3d(timer, build_input3d(2,i), mln::c26()); + std::cout << "c26|" << i << "x" << i << "x" << i << "|8 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c26, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c26, "geodesic.c26.3d.size.sh"); +} + +//------------------------------------------------------------------------------ +// Bench front distance +//------------------------------------------------------------------------------ + +void influence_zone_front_2d(mln::util::timer& timer, + const mln::image2d<mln::value::label_8>& input, + const mln::neighb2d& neighb, + const mln::w_window2d_int& w2d) +{ + mln::image2d<mln::value::label_8> output; + + timer.start(); + output = mln::transform::influence_zone_front(input, neighb, w2d); + timer.stop(); + + //mln::io::pgm::save(output, "output.pgm"); +} + + +void influence_zone_front_3d(mln::util::timer& timer, + const mln::image3d<mln::value::label_8>& input, + const mln::neighb3d& neighb, + const mln::w_window3d_int& w3d) +{ + mln::image3d<mln::value::label_8> output; + + timer.start(); + output = mln::transform::influence_zone_front(input, neighb, w3d); + timer.stop(); + + //mln::io::pgm::save(output, "output.pgm"); +} + + +void test_influence_zone_front_3d() +{ + mln::util::timer timer; + + int ws_c06[] = { + // Internal slice + 0, 0, 0, + 0, 2, 0, + 0, 0, 0, + // Middle slice + 0, 2, 0, + 2, 0, 2, + 0, 2, 0, + // External slice + 0, 0, 0, + 0, 2, 0, + 0, 0, 0 }; + + int ws_c18[] = { + // Internal slice + 0, 6, 0, + 6, 4, 6, + 0, 6, 0, + // Middle slice + 6, 4, 6, + 4, 0, 4, + 6, 4, 6, + // External slice + 0, 6, 0, + 6, 4, 6, + 0, 6, 0 }; + + int ws_c26[] = { + // Internal slice + 7, 6, 7, + 6, 4, 6, + 7, 6, 7, + // Middle slice + 6, 4, 6, + 4, 0, 4, + 6, 4, 6, + // External slice + 7, 6, 7, + 6, 4, 6, + 7, 6, 7 }; + + mln::w_window3d_int w3d_c06 = mln::make::w_window3d_int(ws_c06); + mln::w_window3d_int w3d_c18 = mln::make::w_window3d_int(ws_c18); + mln::w_window3d_int w3d_c26 = mln::make::w_window3d_int(ws_c26); + + // Test the number of labels c06 + mln::image1d<float> chart_seed_c06(5*5*5+2); + + mln::data::fill(chart_seed_c06, mln::literal::zero); + + for (unsigned i = 1; i < 5+1; ++i) + { + influence_zone_front_3d(timer, build_input3d(i,128), mln::c6(), w3d_c06); + std::cout << "c06|128x128x128|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c06, i*i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c06, "front.c06.3d.seed.sh"); + + // Test the number of labels c18 + mln::image1d<float> chart_seed_c18(5*5*5+2); + + mln::data::fill(chart_seed_c18, mln::literal::zero); + + for (unsigned i = 1; i < 5+1; ++i) + { + influence_zone_front_3d(timer, build_input3d(i,128), mln::c18(), w3d_c18); + std::cout << "c18|128x128x128|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c18, i*i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c18, "front.c18.3d.seed.sh"); + + // Test the number of labels c26 + mln::image1d<float> chart_seed_c26(5*5*5+2); + + mln::data::fill(chart_seed_c26, mln::literal::zero); + + for (unsigned i = 1; i < 5+1; ++i) + { + influence_zone_front_3d(timer, build_input3d(i,128), mln::c26(), w3d_c26); + std::cout << "c26|128x128x128|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c26, i*i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c26, "front.c26.3d.seed.sh"); + + // Test the size of the image c06 + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c06(128+1); + + mln::data::fill(chart_size_c06, mln::literal::zero); + + for (unsigned i = 6; i < 128+1; ++i) + { + influence_zone_front_3d(timer, build_input3d(2,i), mln::c6(), w3d_c06); + std::cout << "c06|" << i << "x" << i << "x" << i << "|8 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c06, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c06, "front.c06.3d.size.sh"); + + // Test the size of the image c18 + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c18(128+1); + + mln::data::fill(chart_size_c18, mln::literal::zero); + + for (unsigned i = 6; i < 128+1; ++i) + { + influence_zone_front_3d(timer, build_input3d(2,i), mln::c18(), w3d_c18); + std::cout << "c18|" << i << "x" << i << "x" << i << "|8 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c18, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c18, "front.c18.3d.size.sh"); + + // Test the size of the image c26 + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c26(128+1); + + mln::data::fill(chart_size_c26, mln::literal::zero); + + for (unsigned i = 6; i < 128+1; ++i) + { + influence_zone_front_3d(timer, build_input3d(2,i), mln::c26(), w3d_c26); + std::cout << "c26|" << i << "x" << i << "x" << i << "|8 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c26, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c26, "front.c26.3d.size.sh"); +} + +void test_influence_zone_front_2d() +{ + mln::util::timer timer; + + int ws_c04[] = { + 0, 2, 0, + 2, 0, 2, + 0, 2, 0}; + + int ws_c08[] = { + 6, 4, 6, + 4, 0, 4, + 6, 4, 6}; + + mln::w_window2d_int w2d_c04 = mln::make::w_window2d_int(ws_c04); + mln::w_window2d_int w2d_c08 = mln::make::w_window2d_int(ws_c08); + + // Test the label c4 + mln::image1d<float> chart_seed_c04(16*16+2); + + mln::data::fill(chart_seed_c04, mln::literal::zero); + + for (unsigned i = 1; i < 16+1; ++i) + { + influence_zone_front_2d(timer,build_input2d(i,256),mln::c4(),w2d_c04); + std::cout << "c04|256x256|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c04, i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c04, "front.c04.2d.seed.sh"); + + // Test the label c8 + mln::image1d<float> chart_seed_c08(16*16+2); + + mln::data::fill(chart_seed_c08, mln::literal::zero); + + for (unsigned i = 1; i < 16+1; ++i) + { + influence_zone_front_2d(timer,build_input2d(i,256),mln::c8(),w2d_c08); + std::cout << "c08|256x256|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed_c08, i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed_c08, "front.c08.2d.seed.sh"); + + // Test the size of the image + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c04(256+1); + + mln::data::fill(chart_size_c04, mln::literal::zero); + + for (unsigned i = 16; i < 256+1; ++i) + { + influence_zone_front_2d(timer, build_input2d(4,i),mln::c4(),w2d_c04); + std::cout << "c04|" << i << "x" << i << "|16 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c04, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c04, "front.c04.2d.size.sh"); + + // Test the size of the image + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size_c08(256+1); + + mln::data::fill(chart_size_c08, mln::literal::zero); + + for (unsigned i = 16; i < 256+1; ++i) + { + influence_zone_front_2d(timer, build_input2d(4,i),mln::c8(),w2d_c08); + std::cout << "c08|" << i << "x" << i << "|16 = " + << timer.read() << std::endl; + mln::opt::at(chart_size_c08, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size_c08, "front.c08.2d.size.sh"); +} + + + + + + +//------------------------------------------------------------------------------ +// Bench euclidian distance +//------------------------------------------------------------------------------ + +void influence_zone_euclidian_2d(mln::util::timer& timer, + const mln::image2d<mln::value::label_8>& input, + const mln::util::array<mln::point2d>& seed) +{ + mln::image2d<mln::value::label_8> output; + + timer.start(); + + mln::initialize(output, input); + + mln_piter_(mln::image2d<mln::value::label_8>) p(output.domain()); + mln_eiter_(mln::util::array<mln::point2d>) e(seed); + + for_all(p) + { + unsigned d = 0; + unsigned min_d = mln_max(unsigned); + unsigned min_l = 0; + + for_all(e) + { + d = distance(p, seed(e.index_())); + + if (min_d > d) + { + min_d = d; + min_l = input(e); + } + } + + output(p) = min_l; + } + + timer.stop(); + + //mln::io::pgm::save(output, "output.pgm"); +} + + +void influence_zone_euclidian_3d(mln::util::timer& timer, + const mln::image3d<mln::value::label_8>& input, + const mln::util::array<mln::point3d>& seed) +{ + mln::image3d<mln::value::label_8> output; + + timer.start(); + + mln::initialize(output, input); + + mln_piter_(mln::image3d<mln::value::label_8>) p(output.domain()); + mln_eiter_(mln::util::array<mln::point3d>) e(seed); + + for_all(p) + { + unsigned d = 0; + unsigned min_d = mln_max(unsigned); + unsigned min_l = 0; + + for_all(e) + { + d = distance(p, seed(e.index_())); + + if (min_d > d) + { + min_d = d; + min_l = input(e); + } + } + + output(p) = min_l; + } + + timer.stop(); +} + +void test_influence_zone_euclidian_2d() +{ + mln::util::timer timer; +/* + // Global test + mln::image2d<float> chart(mln::box2d(mln::point2d(0,0), + mln::point2d(16*16+2,256+1))); + + mln::data::fill(chart, mln::literal::zero); + + for (unsigned i = 1; i < 256+1; ++i) // size + for (unsigned j = 1; j < i*i && j < 16+1; ++j) // seed + { + influence_zone_euclidian_2d(timer,build_input2d(j,i),build_seed2d(j,i)); + std::cout << "xxx|" << i << "x" << i << "|" << j << " = " + << timer.read() << std::endl; + mln::opt::at(chart, j*j,i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart, "chart.sh"); +*/ + + // Test the number of labels + mln::image1d<float> chart_seed(16*16+2); + + mln::data::fill(chart_seed, mln::literal::zero); + + for (unsigned i = 1; i < 16+1; ++i) + { + influence_zone_euclidian_2d(timer,build_input2d(i,256),build_seed2d(i,256)); + std::cout << "xxx|256x256|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed, i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed, "euclidian.2d.seed.sh"); + + // Test the size of the image + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size(256+1); + + mln::data::fill(chart_size, mln::literal::zero); + + for (unsigned i = 16; i < 256+1; ++i) + { + influence_zone_euclidian_2d(timer, build_input2d(4,i), build_seed2d(4,i)); + std::cout << "xxx|" << i << "x" << i << "|16 = " + << timer.read() << std::endl; + mln::opt::at(chart_size, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size, "euclidian.2d.size.sh"); +} + + +void test_influence_zone_euclidian_3d() +{ + mln::util::timer timer; + + // Test the number of labels + mln::image1d<float> chart_seed(5*5*5+2); + + mln::data::fill(chart_seed, mln::literal::zero); + + for (unsigned i = 1; i < 5+1; ++i) + { + influence_zone_euclidian_3d(timer,build_input3d(i,128),build_seed3d(i,128)); + std::cout << "xxx|128x128x128|" << i << " = " << timer.read() << std::endl; + mln::opt::at(chart_seed, i*i*i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_seed, "euclidian.3d.seed.sh"); + + // Test the size of the image + // 1, 2, 4, 8, 16, 32, 64, 128, 256 + mln::image1d<float> chart_size(128+1); + + mln::data::fill(chart_size, mln::literal::zero); + + for (unsigned i = 6; i < 128+1; ++i) + { + influence_zone_euclidian_3d(timer, build_input3d(2,i), build_seed3d(2,i)); + std::cout << "xxx|" << i << "x" << i << "x" << i << "|8 = " + << timer.read() << std::endl; + mln::opt::at(chart_size, i) = timer.read(); + } + + mln::io::plot::save_image_sh(chart_size, "euclidian.3d.size.sh"); +} + + +//------------------------------------------------------------------------------ +// Main +// +// Point de fonctionnement du système [image de taille entre 1 et 256] +// Moins de 16 labels +// +//------------------------------------------------------------------------------ + + +int main() +{ + //test_influence_zone_geodesic_3d(); + //test_influence_zone_front_3d(); + //test_influence_zone_euclidian_3d() + +/* + test_influence_zone_euclidian_2d(); + test_influence_zone_front_2d(); + test_influence_zone_geodesic_2d(); +*/ + test_influence_zone_euclidian_3d(); + //test_influence_zone_geodesic_3d(); + //test_influence_zone_front_3d(); + + return 0; +} -- 1.5.6.5
14 years, 5 months
1
0
0
0
last-svn-commit-188-g2f0e113 Works on Millet2008 descriptors.
by green
* green/mln/demo/annoting/bic/Makefile: New Makefile. * green/mln/demo/annoting/bic/bic.cc: New impl. of the bic descriptor. * green/mln/demo/annoting/lep/Makefile: New Makefile. * green/mln/demo/annoting/lep/lep.cc: New impl. of the lep descriptor. * green/mln/demo/annoting/project/Makefile: New Makefile. * green/mln/demo/annoting/project/project.cc: New impl. of the project descriptor. * green/mln/demo/annoting/rgb_64/Makefile: New Makefile. * green/mln/demo/annoting/rgb_64/rgb_64.cc: New impl. of the rgb_64 descriptor. * green/mln/demo/annoting/rgb_64_9/Makefile: New Makefile. * green/mln/demo/annoting/rgb_64_9/rgb_64_9.cc: New impl. of the rgb_64_9 descriptor. * green/mln/demo/annoting/class.txt: New notes on fax class. --- milena/sandbox/ChangeLog | 25 +++ milena/sandbox/green/demo/annoting/bic/Makefile.am | 150 ++++++++++++++ milena/sandbox/green/demo/annoting/bic/bic.cc | 87 ++++++++ milena/sandbox/green/demo/annoting/class.txt | 33 +++ milena/sandbox/green/demo/annoting/lep/Makefile.am | 150 ++++++++++++++ milena/sandbox/green/demo/annoting/lep/lep.cc | 92 +++++++++ .../green/demo/annoting/project/Makefile.am | 150 ++++++++++++++ .../sandbox/green/demo/annoting/project/project.cc | 210 ++++++++++++++++++++ .../sandbox/green/demo/annoting/rgb_64/Makefile.am | 150 ++++++++++++++ .../sandbox/green/demo/annoting/rgb_64/rgb_64.cc | 47 +++++ .../green/demo/annoting/rgb_64_9/Makefile.am | 150 ++++++++++++++ .../green/demo/annoting/rgb_64_9/rgb_64_9.cc | 97 +++++++++ 12 files changed, 1341 insertions(+), 0 deletions(-) create mode 100644 milena/sandbox/green/demo/annoting/bic/Makefile.am create mode 100644 milena/sandbox/green/demo/annoting/bic/bic.cc create mode 100644 milena/sandbox/green/demo/annoting/class.txt create mode 100644 milena/sandbox/green/demo/annoting/lep/Makefile.am create mode 100644 milena/sandbox/green/demo/annoting/lep/lep.cc create mode 100644 milena/sandbox/green/demo/annoting/project/Makefile.am create mode 100644 milena/sandbox/green/demo/annoting/project/project.cc create mode 100644 milena/sandbox/green/demo/annoting/rgb_64/Makefile.am create mode 100644 milena/sandbox/green/demo/annoting/rgb_64/rgb_64.cc create mode 100644 milena/sandbox/green/demo/annoting/rgb_64_9/Makefile.am create mode 100644 milena/sandbox/green/demo/annoting/rgb_64_9/rgb_64_9.cc diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog index 56cfd22..f032fcf 100644 --- a/milena/sandbox/ChangeLog +++ b/milena/sandbox/ChangeLog @@ -77,6 +77,31 @@ 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Works on Millet2008 descriptors. + + * green/mln/demo/annoting/bic/Makefile: New Makefile. + * green/mln/demo/annoting/bic/bic.cc: New impl. of the bic descriptor. + + * green/mln/demo/annoting/lep/Makefile: New Makefile. + * green/mln/demo/annoting/lep/lep.cc: New impl. of the lep descriptor. + + * green/mln/demo/annoting/project/Makefile: New Makefile. + * green/mln/demo/annoting/project/project.cc: New impl. of the project + descriptor. + + * green/mln/demo/annoting/rgb_64/Makefile: New Makefile. + * green/mln/demo/annoting/rgb_64/rgb_64.cc: New impl. of the rgb_64 + descriptor. + + * green/mln/demo/annoting/rgb_64_9/Makefile: New Makefile. + * green/mln/demo/annoting/rgb_64_9/rgb_64_9.cc: New impl. of the + rgb_64_9 descriptor. + + * green/mln/demo/annoting/class.txt: New notes on fax class. + + +2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + Extend the test image database. * green/mln/img_path.hh: Add annoting directories to experiment diff --git a/milena/sandbox/green/demo/annoting/bic/Makefile.am b/milena/sandbox/green/demo/annoting/bic/Makefile.am new file mode 100644 index 0000000..96eafb4 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/bic/Makefile.am @@ -0,0 +1,150 @@ +# +# Generic Makefile +# + +######### +# TOOLS # +######### + +INCLUDES= -I$(HOME)/svn/oln/trunk/milena/sandbox/green +#CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +ECHO= echo +RM= rm +MKDIR= mkdir -p +CP= cp + +SOURCE_PATTERN= green/demo +BUILD__PATTERN= green/build/demo + + +ifeq ($(findstring $(BUILD__PATTERN),$(PWD)), $(BUILD__PATTERN)) +# Case where make is done from build directory. +SOURCE_DIR= $(subst $(BUILD__PATTERN),$(SOURCE_PATTERN),$(PWD)) +BUILD__DIR= $(PWD)/ +else +# Case where make is done from source directory. +SOURCE_DIR= $(PWD)/ +BUILD__DIR= $(subst $(SOURCE_PATTERN),$(BUILD__PATTERN),$(PWD)) +endif + +SRC= $(notdir $(wildcard $(SOURCE_DIR)/*.cc)) +OLD= $(notdir $(wildcard $(SOURCE_DIR)/*~)) +OBJ= $(patsubst %.cc,%.o,$(SRC)) +SOURCE_MAKEFILE=Makefile.am +BUILD__MAKEFILE=Makefile +TARGET_FILE= $(notdir $(PWD)) +SOURCE_FILES= $(notdir $(wildcard $(SOURCE_DIR)/*.*)) +BUILD__FILES= $(filter-out $(SRC) $(SOURCE_MAKEFILE), $(SOURCE_FILES)) + +BUILD__F_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__FILES)) +SOURCE_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_FILES)) + +BUILD__M_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__MAKEFILE)) +SOURCE_M_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_MAKEFILE)) + +TARGET_F_PATH= $(addprefix $(BUILD__DIR)/,$(TARGET_FILE)) +OBJ_F_PATH= $(addprefix $(BUILD__DIR)/,$(OBJ)) +SRC_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SRC)) +OLD_F_PATH= $(addprefix $(SOURCE_DIR)/,$(OLD)) + +############# +# BOOTSTRAP # +############# + + +bootstrap: $(BUILD__DIR) $(BUILD__F_PATH) $(BUILD__M_PATH) + +# Create, if nessary, the destination directory +$(BUILD__DIR): + $(MKDIR) $(BUILD__DIR) + +# Copy, if nessary, all the files, except the Makefile.am +$(BUILD__F_PATH): $(SOURCE_F_PATH) + $(CP) $(addprefix $(SOURCE_DIR),$(@F)) $@ + +# Copy if nessary, the Makefile.am into Makefile +$(BUILD__M_PATH): $(SOURCE_M_PATH) + $(CP) $(SOURCE_M_PATH) $(BUILD__M_PATH) + + +####### +# ALL # +####### + +# We assume that the call is done from the build directory. +# With the directive vpath, hidden files are found in the source directory. + +all: $(TARGET_F_PATH) + + +$(TARGET_F_PATH): $(OBJ_F_PATH) + $(LINK.cc) $< $(LOADLIBES) $(LDLIBS) -o $@ + +$(OBJ_F_PATH):$(SRC_F_PATH) + $(COMPILE.cc) $(OUTPUT_OPTION) $< + + +######### +# CLEAN # +######### + +# Force every time the deletion +clean: clean_target clean_obj clean_dst clean_old #clean_make + + +clean_target: + -@$(RM) $(TARGET_F_PATH) &> /dev/null + +clean_obj: + -@$(RM) $(OBJ_F_PATH) &> /dev/null + +clean_dst: + -@$(RM) $(BUILD_F_PATH) &> /dev/null + +clean_make: + -@$(RM) $(BUILD_M_PATH) &> /dev/null + +clean_old: + -@$(RM) $(OLD_F_PATH) &> /dev/null + + +######### +# PRINT # +######### + +print: print_tools print_bootstrap + +print_tools: + @$(ECHO) "HOME = $(HOME)" + @$(ECHO) "INCLUDES = $(INCLUDES)" + @$(ECHO) "CXXFLAGS = $(CXXFLAGS)" + @$(ECHO) "ECHO = $(ECHO)" + @$(ECHO) "RM = $(RM)" + @$(ECHO) "MKDIR = $(MKDIR)" + @$(ECHO) "CP = $(CP)" + @$(ECHO) + +print_bootstrap: + @$(ECHO) "PWD = $(PWD)" + @$(ECHO) "SOURCE_PATTERN = $(SOURCE_PATTERN)" + @$(ECHO) "BUILD__PATTERN = $(BUILD__PATTERN)" + @$(ECHO) "SOURCE_DIR = $(SOURCE_DIR)" + @$(ECHO) "BUILD__DIR = $(BUILD__DIR)" + @$(ECHO) "SOURCE_MAKEFILE = $(SOURCE_MAKEFILE)" + @$(ECHO) "BUILD__MAKEFILE = $(BUILD__MAKEFILE)" + @$(ECHO) "TARGET_FILE = $(TARGET_FILE)" + @$(ECHO) "SOURCE_FILES = $(SOURCE_FILES)" + @$(ECHO) "SOURCE_F_PATH = $(SOURCE_F_PATH)" + @$(ECHO) "BUILD__FILES = $(BUILD__FILES)" + @$(ECHO) "BUILD__F_PATH = $(BUILD__F_PATH)" + @$(ECHO) "BUILD__M_PATH = $(BUILD__M_PATH)" + @$(ECHO) "SOURCE_M_PATH = $(SOURCE_M_PATH)" + @$(ECHO) "SRC = $(SRC)" + @$(ECHO) "OBJ = $(OBJ)" + @$(ECHO) "OLD = $(OLD)" + @$(ECHO) "SRC_F_PATH = $(SRC_F_PATH)" + @$(ECHO) "OBJ_F_PATH = $(OBJ_F_PATH)" + @$(ECHO) "OLD_F_PATH = $(OLD_F_PATH)" + @$(ECHO) diff --git a/milena/sandbox/green/demo/annoting/bic/bic.cc b/milena/sandbox/green/demo/annoting/bic/bic.cc new file mode 100644 index 0000000..7e15970 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/bic/bic.cc @@ -0,0 +1,87 @@ +// Test de l'opérateur de Millet BIC +// Composante RGB sur 6 bits, puis on distingue les points intérieurs des points +// extérieurs. Les points intérieurs ont la même couleur que leur 4-voisinage. +// Puis on construit les 2 histogrammes (intérieur/extérieur) +#include <iostream> + +#include <mln/accu/stat/histo3d_rgb.hh> + +#include <mln/core/image/image2d.hh> +#include <mln/core/alias/neighb2d.hh> +#include <mln/core/routine/initialize.hh> +#include <mln/core/var.hh> + +#include <mln/data/compute.hh> +#include <mln/data/convert.hh> +#include <mln/data/transform.hh> +#include <mln/data/fill.hh> + +#include <mln/debug/println.hh> + +#include <mln/fun/v2v/rgb8_to_rgbn.hh> + +#include <mln/img_path.hh> + +#include <mln/io/ppm/load.hh> +#include <mln/io/ppm/save.hh> +#include <mln/io/plot/save_image_sh.hh> + +#include <mln/literal/colors.hh> + +#include <mln/value/rgb.hh> +#include <mln/value/rgb8.hh> + +int main() +{ + typedef mln::value::rgb<3> t_rgb3; + typedef mln::value::rgb8 t_rgb8; + typedef mln::neighb2d t_neighb2d; + typedef mln::image2d<t_rgb3> t_image2d_rgb3; + typedef mln::image2d<t_rgb8> t_image2d_rgb8; + typedef mln::image3d<unsigned> t_histo3d; + typedef mln::fun::v2v::rgb8_to_rgbn<3> t_rgb8_to_rgb3; + typedef mln::accu::meta::stat::histo3d_rgb t_histo3d_fun; + + t_image2d_rgb8 input_rgb8; + t_image2d_rgb3 input_rgb3; + t_image2d_rgb3 interior_rgb3; + t_image2d_rgb3 exterior_rgb3; + t_histo3d histo_exterior; + t_histo3d histo_interior; + + // IMAGE LOADING PHASE + std::cout << "Image loading phase ..." << std::endl; + mln::io::ppm::load(input_rgb8, SCRIBO_PPM_IMG_PATH"/mp00082c_50p.ppm"); + input_rgb3 = mln::data::transform(input_rgb8, t_rgb8_to_rgb3()); + + mln::initialize(interior_rgb3, input_rgb3); + mln::initialize(exterior_rgb3, input_rgb3); + + mln::data::fill(interior_rgb3, mln::literal::black); + mln::data::fill(exterior_rgb3, mln::literal::black); + + mln_piter_(t_image2d_rgb3) p(input_rgb3.domain()); + mln_niter_(t_neighb2d) n(mln::c4(), p); + + for_all(p) + { + bool is_interior = true; + + for_all(n) + is_interior = is_interior && (input_rgb3(p) == input_rgb3(n)); + + if (is_interior) + interior_rgb3(p) = input_rgb3(p); + else + exterior_rgb3(p) = input_rgb3(p); + } + + histo_interior = mln::data::compute(t_histo3d_fun(), interior_rgb3); + histo_exterior = mln::data::compute(t_histo3d_fun(), exterior_rgb3); + + //mln::io::plot::save_image_sh(histo, "histo.sh"); + + // PRINTING PHASE + mln::debug::println(histo_interior); + mln::debug::println(histo_exterior); +} diff --git a/milena/sandbox/green/demo/annoting/class.txt b/milena/sandbox/green/demo/annoting/class.txt new file mode 100644 index 0000000..ec7e92e --- /dev/null +++ b/milena/sandbox/green/demo/annoting/class.txt @@ -0,0 +1,33 @@ +Dans scribo les classes de documents sont: + +- image seule (photo) +- courrier manuscrit +- courrier dactylographié +- facture ou feuille organisée sous forme de tableau +- article de journal +- document composite +- infographie (logo, carte, dessin vectoriel) +- slide (copie d'écran ou sauvegarde au format image) + + +Où se situent les faxes ? + + +Description d'un fax: +- ratio l/L assimilable à du A4 ou US Letter +- nombre de couleurs très petit, < 1000 +- plutôt du N & B, mais quelques faxes sont en couleurs +- généralement un % élevé de blanc (la page vierge) + + +Description d'un article de journal: +- nombre élevés de couleurs (> 10 000) en général +- quelques articles de conférences autour de 5000 + + +Description des photos: +- un nombre très élevé de couleurs +- ratio non A4, non US Letter + + + diff --git a/milena/sandbox/green/demo/annoting/lep/Makefile.am b/milena/sandbox/green/demo/annoting/lep/Makefile.am new file mode 100644 index 0000000..96eafb4 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/lep/Makefile.am @@ -0,0 +1,150 @@ +# +# Generic Makefile +# + +######### +# TOOLS # +######### + +INCLUDES= -I$(HOME)/svn/oln/trunk/milena/sandbox/green +#CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +ECHO= echo +RM= rm +MKDIR= mkdir -p +CP= cp + +SOURCE_PATTERN= green/demo +BUILD__PATTERN= green/build/demo + + +ifeq ($(findstring $(BUILD__PATTERN),$(PWD)), $(BUILD__PATTERN)) +# Case where make is done from build directory. +SOURCE_DIR= $(subst $(BUILD__PATTERN),$(SOURCE_PATTERN),$(PWD)) +BUILD__DIR= $(PWD)/ +else +# Case where make is done from source directory. +SOURCE_DIR= $(PWD)/ +BUILD__DIR= $(subst $(SOURCE_PATTERN),$(BUILD__PATTERN),$(PWD)) +endif + +SRC= $(notdir $(wildcard $(SOURCE_DIR)/*.cc)) +OLD= $(notdir $(wildcard $(SOURCE_DIR)/*~)) +OBJ= $(patsubst %.cc,%.o,$(SRC)) +SOURCE_MAKEFILE=Makefile.am +BUILD__MAKEFILE=Makefile +TARGET_FILE= $(notdir $(PWD)) +SOURCE_FILES= $(notdir $(wildcard $(SOURCE_DIR)/*.*)) +BUILD__FILES= $(filter-out $(SRC) $(SOURCE_MAKEFILE), $(SOURCE_FILES)) + +BUILD__F_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__FILES)) +SOURCE_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_FILES)) + +BUILD__M_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__MAKEFILE)) +SOURCE_M_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_MAKEFILE)) + +TARGET_F_PATH= $(addprefix $(BUILD__DIR)/,$(TARGET_FILE)) +OBJ_F_PATH= $(addprefix $(BUILD__DIR)/,$(OBJ)) +SRC_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SRC)) +OLD_F_PATH= $(addprefix $(SOURCE_DIR)/,$(OLD)) + +############# +# BOOTSTRAP # +############# + + +bootstrap: $(BUILD__DIR) $(BUILD__F_PATH) $(BUILD__M_PATH) + +# Create, if nessary, the destination directory +$(BUILD__DIR): + $(MKDIR) $(BUILD__DIR) + +# Copy, if nessary, all the files, except the Makefile.am +$(BUILD__F_PATH): $(SOURCE_F_PATH) + $(CP) $(addprefix $(SOURCE_DIR),$(@F)) $@ + +# Copy if nessary, the Makefile.am into Makefile +$(BUILD__M_PATH): $(SOURCE_M_PATH) + $(CP) $(SOURCE_M_PATH) $(BUILD__M_PATH) + + +####### +# ALL # +####### + +# We assume that the call is done from the build directory. +# With the directive vpath, hidden files are found in the source directory. + +all: $(TARGET_F_PATH) + + +$(TARGET_F_PATH): $(OBJ_F_PATH) + $(LINK.cc) $< $(LOADLIBES) $(LDLIBS) -o $@ + +$(OBJ_F_PATH):$(SRC_F_PATH) + $(COMPILE.cc) $(OUTPUT_OPTION) $< + + +######### +# CLEAN # +######### + +# Force every time the deletion +clean: clean_target clean_obj clean_dst clean_old #clean_make + + +clean_target: + -@$(RM) $(TARGET_F_PATH) &> /dev/null + +clean_obj: + -@$(RM) $(OBJ_F_PATH) &> /dev/null + +clean_dst: + -@$(RM) $(BUILD_F_PATH) &> /dev/null + +clean_make: + -@$(RM) $(BUILD_M_PATH) &> /dev/null + +clean_old: + -@$(RM) $(OLD_F_PATH) &> /dev/null + + +######### +# PRINT # +######### + +print: print_tools print_bootstrap + +print_tools: + @$(ECHO) "HOME = $(HOME)" + @$(ECHO) "INCLUDES = $(INCLUDES)" + @$(ECHO) "CXXFLAGS = $(CXXFLAGS)" + @$(ECHO) "ECHO = $(ECHO)" + @$(ECHO) "RM = $(RM)" + @$(ECHO) "MKDIR = $(MKDIR)" + @$(ECHO) "CP = $(CP)" + @$(ECHO) + +print_bootstrap: + @$(ECHO) "PWD = $(PWD)" + @$(ECHO) "SOURCE_PATTERN = $(SOURCE_PATTERN)" + @$(ECHO) "BUILD__PATTERN = $(BUILD__PATTERN)" + @$(ECHO) "SOURCE_DIR = $(SOURCE_DIR)" + @$(ECHO) "BUILD__DIR = $(BUILD__DIR)" + @$(ECHO) "SOURCE_MAKEFILE = $(SOURCE_MAKEFILE)" + @$(ECHO) "BUILD__MAKEFILE = $(BUILD__MAKEFILE)" + @$(ECHO) "TARGET_FILE = $(TARGET_FILE)" + @$(ECHO) "SOURCE_FILES = $(SOURCE_FILES)" + @$(ECHO) "SOURCE_F_PATH = $(SOURCE_F_PATH)" + @$(ECHO) "BUILD__FILES = $(BUILD__FILES)" + @$(ECHO) "BUILD__F_PATH = $(BUILD__F_PATH)" + @$(ECHO) "BUILD__M_PATH = $(BUILD__M_PATH)" + @$(ECHO) "SOURCE_M_PATH = $(SOURCE_M_PATH)" + @$(ECHO) "SRC = $(SRC)" + @$(ECHO) "OBJ = $(OBJ)" + @$(ECHO) "OLD = $(OLD)" + @$(ECHO) "SRC_F_PATH = $(SRC_F_PATH)" + @$(ECHO) "OBJ_F_PATH = $(OBJ_F_PATH)" + @$(ECHO) "OLD_F_PATH = $(OLD_F_PATH)" + @$(ECHO) diff --git a/milena/sandbox/green/demo/annoting/lep/lep.cc b/milena/sandbox/green/demo/annoting/lep/lep.cc new file mode 100644 index 0000000..24ee7b4 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/lep/lep.cc @@ -0,0 +1,92 @@ +// Test de l'opérateur de Millet LEP +// Composante RGB sur 6 bits, puis sobel 3x3, puis identification configuration +// L'image histogramme des configurations est la résultante + +#include <iostream> + +#include <mln/accu/stat/histo1d.hh> + +#include <mln/binarization/threshold.hh> + +#include <mln/core/alias/w_window2d_int.hh> +#include <mln/core/image/image2d.hh> + +#include <mln/data/compute.hh> +#include <mln/data/convert.hh> +#include <mln/data/transform.hh> + +#include <mln/debug/println.hh> + +#include <mln/fun/v2v/rgb8_to_rgbn.hh> + +#include <mln/img_path.hh> + +#include <mln/io/pgm/load.hh> +#include <mln/io/pgm/save.hh> +#include <mln/io/plot/save_image_sh.hh> + +#include <mln/linear/ch_convolve.hh> +#include <mln/linear/convolve.hh> +#include <mln/linear/sobel_2d.hh> + +#include <mln/make/w_window2d.hh> + +#include <mln/value/rgb.hh> +#include <mln/value/rgb8.hh> +#include <mln/value/int_u8.hh> + +#include <mln/core/var.hh> + + +int main() +{ + using namespace mln; + + typedef mln::w_window2d_int t_win2d; + typedef mln::value::int_u8 t_int_u8; + typedef mln::value::int_u<9> t_int_u9; + typedef mln::image2d<t_int_u8> t_image2d_int_u8; + typedef mln::image2d<t_int_u9> t_image2d_int_u9; + typedef mln::image2d<int> t_image2d_int; + typedef mln::image2d<unsigned> t_image2d_unsigned; + typedef mln::image2d<float> t_image2d_float; + typedef mln::image2d<double> t_image2d_double; + typedef mln::image2d<bool> t_image2d_bool; + typedef mln::image1d<unsigned> t_histo1d; + typedef mln::accu::meta::stat::histo1d t_histo1d_fun; + + t_image2d_int_u8 input_int_u8; + t_image2d_int input_int; + t_image2d_unsigned input_unsigned; + t_image2d_float sobel; + t_image2d_bool thresh_bool; + t_image2d_int_u8 thresh_int_u8; + t_image2d_float conf_float; + t_image2d_int_u9 conf_int_u9; + t_histo1d histo; + + // IMAGE LOADING PHASE + std::cout << "Image loading phase ..." << std::endl; + mln::io::pgm::load(input_int_u8,SCRIBO_PGM_IMG_PATH"/mp00082c_50p_8bits.pgm"); + + sobel = mln::linear::sobel_2d_l1_norm(input_int_u8); + + //mln::io::plot::save_image_sh(sobel, "sobel.sh"); + thresh_bool = mln::binarization::threshold(sobel, 100); + thresh_int_u8 = mln::data::convert(mln::value::int_u8(), thresh_bool); + //mln::io::plot::save_image_sh(thresh, "thresh.sh"); + + int ws[] = { 1, 2, 4, + 8, 256, 16, + 32, 64, 128 }; + + t_win2d win2d = mln::make::w_window2d(ws); + conf_float = mln::linear::convolve(thresh_int_u8, win2d); + conf_int_u9 = mln::data::convert(t_int_u9(), conf_float); + histo = mln::data::compute(t_histo1d_fun(), conf_int_u9); + + mln::io::plot::save_image_sh(histo, "histo.sh"); + + // PRINTING PHASE + mln::debug::println(histo); +} diff --git a/milena/sandbox/green/demo/annoting/project/Makefile.am b/milena/sandbox/green/demo/annoting/project/Makefile.am new file mode 100644 index 0000000..96eafb4 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/project/Makefile.am @@ -0,0 +1,150 @@ +# +# Generic Makefile +# + +######### +# TOOLS # +######### + +INCLUDES= -I$(HOME)/svn/oln/trunk/milena/sandbox/green +#CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +ECHO= echo +RM= rm +MKDIR= mkdir -p +CP= cp + +SOURCE_PATTERN= green/demo +BUILD__PATTERN= green/build/demo + + +ifeq ($(findstring $(BUILD__PATTERN),$(PWD)), $(BUILD__PATTERN)) +# Case where make is done from build directory. +SOURCE_DIR= $(subst $(BUILD__PATTERN),$(SOURCE_PATTERN),$(PWD)) +BUILD__DIR= $(PWD)/ +else +# Case where make is done from source directory. +SOURCE_DIR= $(PWD)/ +BUILD__DIR= $(subst $(SOURCE_PATTERN),$(BUILD__PATTERN),$(PWD)) +endif + +SRC= $(notdir $(wildcard $(SOURCE_DIR)/*.cc)) +OLD= $(notdir $(wildcard $(SOURCE_DIR)/*~)) +OBJ= $(patsubst %.cc,%.o,$(SRC)) +SOURCE_MAKEFILE=Makefile.am +BUILD__MAKEFILE=Makefile +TARGET_FILE= $(notdir $(PWD)) +SOURCE_FILES= $(notdir $(wildcard $(SOURCE_DIR)/*.*)) +BUILD__FILES= $(filter-out $(SRC) $(SOURCE_MAKEFILE), $(SOURCE_FILES)) + +BUILD__F_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__FILES)) +SOURCE_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_FILES)) + +BUILD__M_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__MAKEFILE)) +SOURCE_M_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_MAKEFILE)) + +TARGET_F_PATH= $(addprefix $(BUILD__DIR)/,$(TARGET_FILE)) +OBJ_F_PATH= $(addprefix $(BUILD__DIR)/,$(OBJ)) +SRC_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SRC)) +OLD_F_PATH= $(addprefix $(SOURCE_DIR)/,$(OLD)) + +############# +# BOOTSTRAP # +############# + + +bootstrap: $(BUILD__DIR) $(BUILD__F_PATH) $(BUILD__M_PATH) + +# Create, if nessary, the destination directory +$(BUILD__DIR): + $(MKDIR) $(BUILD__DIR) + +# Copy, if nessary, all the files, except the Makefile.am +$(BUILD__F_PATH): $(SOURCE_F_PATH) + $(CP) $(addprefix $(SOURCE_DIR),$(@F)) $@ + +# Copy if nessary, the Makefile.am into Makefile +$(BUILD__M_PATH): $(SOURCE_M_PATH) + $(CP) $(SOURCE_M_PATH) $(BUILD__M_PATH) + + +####### +# ALL # +####### + +# We assume that the call is done from the build directory. +# With the directive vpath, hidden files are found in the source directory. + +all: $(TARGET_F_PATH) + + +$(TARGET_F_PATH): $(OBJ_F_PATH) + $(LINK.cc) $< $(LOADLIBES) $(LDLIBS) -o $@ + +$(OBJ_F_PATH):$(SRC_F_PATH) + $(COMPILE.cc) $(OUTPUT_OPTION) $< + + +######### +# CLEAN # +######### + +# Force every time the deletion +clean: clean_target clean_obj clean_dst clean_old #clean_make + + +clean_target: + -@$(RM) $(TARGET_F_PATH) &> /dev/null + +clean_obj: + -@$(RM) $(OBJ_F_PATH) &> /dev/null + +clean_dst: + -@$(RM) $(BUILD_F_PATH) &> /dev/null + +clean_make: + -@$(RM) $(BUILD_M_PATH) &> /dev/null + +clean_old: + -@$(RM) $(OLD_F_PATH) &> /dev/null + + +######### +# PRINT # +######### + +print: print_tools print_bootstrap + +print_tools: + @$(ECHO) "HOME = $(HOME)" + @$(ECHO) "INCLUDES = $(INCLUDES)" + @$(ECHO) "CXXFLAGS = $(CXXFLAGS)" + @$(ECHO) "ECHO = $(ECHO)" + @$(ECHO) "RM = $(RM)" + @$(ECHO) "MKDIR = $(MKDIR)" + @$(ECHO) "CP = $(CP)" + @$(ECHO) + +print_bootstrap: + @$(ECHO) "PWD = $(PWD)" + @$(ECHO) "SOURCE_PATTERN = $(SOURCE_PATTERN)" + @$(ECHO) "BUILD__PATTERN = $(BUILD__PATTERN)" + @$(ECHO) "SOURCE_DIR = $(SOURCE_DIR)" + @$(ECHO) "BUILD__DIR = $(BUILD__DIR)" + @$(ECHO) "SOURCE_MAKEFILE = $(SOURCE_MAKEFILE)" + @$(ECHO) "BUILD__MAKEFILE = $(BUILD__MAKEFILE)" + @$(ECHO) "TARGET_FILE = $(TARGET_FILE)" + @$(ECHO) "SOURCE_FILES = $(SOURCE_FILES)" + @$(ECHO) "SOURCE_F_PATH = $(SOURCE_F_PATH)" + @$(ECHO) "BUILD__FILES = $(BUILD__FILES)" + @$(ECHO) "BUILD__F_PATH = $(BUILD__F_PATH)" + @$(ECHO) "BUILD__M_PATH = $(BUILD__M_PATH)" + @$(ECHO) "SOURCE_M_PATH = $(SOURCE_M_PATH)" + @$(ECHO) "SRC = $(SRC)" + @$(ECHO) "OBJ = $(OBJ)" + @$(ECHO) "OLD = $(OLD)" + @$(ECHO) "SRC_F_PATH = $(SRC_F_PATH)" + @$(ECHO) "OBJ_F_PATH = $(OBJ_F_PATH)" + @$(ECHO) "OLD_F_PATH = $(OLD_F_PATH)" + @$(ECHO) diff --git a/milena/sandbox/green/demo/annoting/project/project.cc b/milena/sandbox/green/demo/annoting/project/project.cc new file mode 100644 index 0000000..e6b25e3 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/project/project.cc @@ -0,0 +1,210 @@ +// Test de l'opérateur de Millet PROJECT +// subsampling the image sur 100x100 +// Sobel, puis seuillage à 100 +// division horizontale de l'image, puis projection verticale des pixels +// division verticale puis projection horizontale +// assemblage des 4 vecteurs de taille 100 + +#include <iostream> +#include <sstream> + +#include <mln/accu/image/init.hh> +#include <mln/accu/image/take.hh> +#include <mln/accu/image/to_result.hh> +#include <mln/accu/stat/mean.hh> + +#include <mln/binarization/threshold.hh> + +#include <mln/core/alias/box2d.hh> +#include <mln/core/alias/point2d.hh> +#include <mln/core/image/image2d.hh> +#include <mln/core/image/image1d.hh> +#include <mln/core/image/dmorph/image_if.hh> +#include <mln/core/routine/initialize.hh> +#include <mln/core/image/dmorph/unproject_image.hh> + + + +#include <mln/data/compute.hh> +#include <mln/data/convert.hh> +#include <mln/data/paste.hh> +#include <mln/data/transform.hh> + +#include <mln/debug/println.hh> + +#include <mln/fun/v2v/projection.hh> + +#include <mln/img_path.hh> + +#include <mln/io/pgm/load.hh> +#include <mln/io/pgm/save.hh> +#include <mln/io/pbm/save.hh> + +#include <mln/linear/sobel_2d.hh> + +#include <mln/opt/at.hh> + +const char *get_name(const char *base, const unsigned i, const unsigned j) +{ + std::ostringstream name; + + name << base; + name << i; + name << "_"; + name << j; + name << ".ppm"; + + return name.str().c_str(); +} + + +mln::image1d<mln::value::int_u8> +project_row(const mln::image2d<mln::value::int_u8>& img) +{ + typedef mln::accu::math::sum<mln::value::int_u8,mln::value::int_u8> t_sum; + typedef mln::fun::v2v::projection<mln::point2d,0> t_projection; + + mln::image1d<t_sum> img_accu(img.ncols()); + + mln::accu::image::init(img_accu); + + mln::accu::image::take(unproject(img_accu, + img.domain(), + t_projection()).rw(), + img); + + return mln::accu::image::to_result(img_accu); +} + +mln::image1d<mln::value::int_u8> +project_col(const mln::image2d<mln::value::int_u8>& img) +{ + typedef mln::accu::math::sum<mln::value::int_u8,mln::value::int_u8> t_sum; + typedef mln::fun::v2v::projection<mln::point2d,1> t_projection; + + mln::image1d<t_sum> img_accu(img.nrows()); + + mln::accu::image::init(img_accu); + + mln::accu::image::take(unproject(img_accu, + img.domain(), + t_projection()).rw(), + img); + + return mln::accu::image::to_result(img_accu); +} + + +int main() +{ + typedef mln::value::int_u8 t_int_u8; + typedef mln::algebra::vec<3,float> t_vec3f; + typedef mln::algebra::vec<3,unsigned> t_vec3u; + typedef mln::image2d<float> t_image2d_float; + typedef mln::image2d<bool> t_image2d_bool; + typedef mln::image2d<t_int_u8> t_image2d_int_u8; + typedef mln::accu::meta::stat::mean t_mean_fun; + typedef mln::accu::math::sum<t_int_u8,t_int_u8> t_sum; + typedef mln::image1d<t_int_u8> t_image1d_int_u8; + + t_image2d_int_u8 input_int_u8; + t_image2d_float sobel; + t_image2d_bool thresh_bool; + t_image2d_int_u8 thresh_int_u8; + + // IMAGE LOADING PHASE + std::cout << "Image loading phase ..." << std::endl; + mln::io::pgm::load(input_int_u8,SCRIBO_PGM_IMG_PATH"/mp00082c_50p_8bits.pgm"); + + + // IMAGE SPLITTING PHASE + t_image2d_int_u8 subimg_int_u8(mln::box2d(mln::point2d(0,0), + mln::point2d(100,100))); + + mln::box2d domain = input_int_u8.domain(); + mln::point2d pmin = domain.pmin(); + mln::point2d pmax = domain.pmax(); + + unsigned sz_row = (pmax.row() - pmin.row())/ 100; + unsigned sz_col = (pmax.col() - pmin.col())/ 100; + + std::cout << domain << std::endl; + + // Subsampling in 100x100 + // FIXME Test that is it a subsampling, not a upsampling! + for (unsigned i = 0; i < 100; ++i) + for (unsigned j = 0; j < 100; ++j) + { + mln::point2d min(pmin.row()+sz_row*i,pmin.col()+sz_col*j); + mln::point2d max(pmin.row()+sz_row*(i+1),pmin.col()+sz_col*(j+1)); + mln::box2d dom(min,max); + + std::cout << dom << std::endl; + + // Save it + t_image2d_int_u8 input_part_int_u8(dom); + + mln::data::paste(input_int_u8 | dom, input_part_int_u8); + //mln::io::pgm::save(input_part_int_u8, get_name("output",i,j)); + float mean = mln::data::compute(t_mean_fun(), input_part_int_u8); + t_int_u8 val = static_cast<t_int_u8>(mean); + mln::opt::at(subimg_int_u8, i,j) = val; + } + + mln::io::pgm::save(subimg_int_u8, "subimg.pgm"); + + sobel = mln::linear::sobel_2d_l1_norm(subimg_int_u8); + thresh_bool = mln::binarization::threshold(sobel, 100); + thresh_int_u8 = mln::data::convert(t_int_u8(), thresh_bool); + + mln::io::pbm::save(thresh_bool, "subimg.pbm"); + + // Define img_up, img_down, img_left, img_right + t_image2d_int_u8 img_up(mln::box2d(mln::point2d(0,0), + mln::point2d(49,99))); + + mln::data::paste(thresh_int_u8 | img_up.domain(), img_up); + + + t_image2d_int_u8 img_down(mln::box2d(mln::point2d(50,0), + mln::point2d(99,99))); + + mln::data::paste(thresh_int_u8 | img_down.domain(), img_down); + + t_image2d_int_u8 img_left(mln::box2d(mln::point2d(0,0), + mln::point2d(99,49))); + + mln::data::paste(thresh_int_u8 | img_left.domain(), img_left); + + + t_image2d_int_u8 img_right(mln::box2d(mln::point2d(0,50), + mln::point2d(99,99))); + + mln::data::paste(thresh_int_u8 | img_right.domain(), img_right); + + + // Define project_up, project_down, project_left, project_right + t_image1d_int_u8 project_up = project_row(img_up); + t_image1d_int_u8 project_down = project_row(img_down); + t_image1d_int_u8 project_left = project_col(img_left); + t_image1d_int_u8 project_right = project_col(img_right); + + mln::io::pgm::save(img_up, "up.pgm"); + mln::io::pgm::save(img_down, "down.pgm"); + mln::io::pgm::save(img_left, "left.pgm"); + mln::io::pgm::save(img_right, "right.pgm"); + + // PRINTING PHASE + + std::cout << std::endl << "UP" << std::endl; + mln::debug::println(project_up); + + std::cout << std::endl << "DOWN" << std::endl; + mln::debug::println(project_down); + + std::cout << std::endl << "LEFT" << std::endl; + mln::debug::println(project_left); + + std::cout << std::endl << "RIGHT" << std::endl; + mln::debug::println(project_right); +} diff --git a/milena/sandbox/green/demo/annoting/rgb_64/Makefile.am b/milena/sandbox/green/demo/annoting/rgb_64/Makefile.am new file mode 100644 index 0000000..96eafb4 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/rgb_64/Makefile.am @@ -0,0 +1,150 @@ +# +# Generic Makefile +# + +######### +# TOOLS # +######### + +INCLUDES= -I$(HOME)/svn/oln/trunk/milena/sandbox/green +#CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +ECHO= echo +RM= rm +MKDIR= mkdir -p +CP= cp + +SOURCE_PATTERN= green/demo +BUILD__PATTERN= green/build/demo + + +ifeq ($(findstring $(BUILD__PATTERN),$(PWD)), $(BUILD__PATTERN)) +# Case where make is done from build directory. +SOURCE_DIR= $(subst $(BUILD__PATTERN),$(SOURCE_PATTERN),$(PWD)) +BUILD__DIR= $(PWD)/ +else +# Case where make is done from source directory. +SOURCE_DIR= $(PWD)/ +BUILD__DIR= $(subst $(SOURCE_PATTERN),$(BUILD__PATTERN),$(PWD)) +endif + +SRC= $(notdir $(wildcard $(SOURCE_DIR)/*.cc)) +OLD= $(notdir $(wildcard $(SOURCE_DIR)/*~)) +OBJ= $(patsubst %.cc,%.o,$(SRC)) +SOURCE_MAKEFILE=Makefile.am +BUILD__MAKEFILE=Makefile +TARGET_FILE= $(notdir $(PWD)) +SOURCE_FILES= $(notdir $(wildcard $(SOURCE_DIR)/*.*)) +BUILD__FILES= $(filter-out $(SRC) $(SOURCE_MAKEFILE), $(SOURCE_FILES)) + +BUILD__F_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__FILES)) +SOURCE_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_FILES)) + +BUILD__M_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__MAKEFILE)) +SOURCE_M_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_MAKEFILE)) + +TARGET_F_PATH= $(addprefix $(BUILD__DIR)/,$(TARGET_FILE)) +OBJ_F_PATH= $(addprefix $(BUILD__DIR)/,$(OBJ)) +SRC_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SRC)) +OLD_F_PATH= $(addprefix $(SOURCE_DIR)/,$(OLD)) + +############# +# BOOTSTRAP # +############# + + +bootstrap: $(BUILD__DIR) $(BUILD__F_PATH) $(BUILD__M_PATH) + +# Create, if nessary, the destination directory +$(BUILD__DIR): + $(MKDIR) $(BUILD__DIR) + +# Copy, if nessary, all the files, except the Makefile.am +$(BUILD__F_PATH): $(SOURCE_F_PATH) + $(CP) $(addprefix $(SOURCE_DIR),$(@F)) $@ + +# Copy if nessary, the Makefile.am into Makefile +$(BUILD__M_PATH): $(SOURCE_M_PATH) + $(CP) $(SOURCE_M_PATH) $(BUILD__M_PATH) + + +####### +# ALL # +####### + +# We assume that the call is done from the build directory. +# With the directive vpath, hidden files are found in the source directory. + +all: $(TARGET_F_PATH) + + +$(TARGET_F_PATH): $(OBJ_F_PATH) + $(LINK.cc) $< $(LOADLIBES) $(LDLIBS) -o $@ + +$(OBJ_F_PATH):$(SRC_F_PATH) + $(COMPILE.cc) $(OUTPUT_OPTION) $< + + +######### +# CLEAN # +######### + +# Force every time the deletion +clean: clean_target clean_obj clean_dst clean_old #clean_make + + +clean_target: + -@$(RM) $(TARGET_F_PATH) &> /dev/null + +clean_obj: + -@$(RM) $(OBJ_F_PATH) &> /dev/null + +clean_dst: + -@$(RM) $(BUILD_F_PATH) &> /dev/null + +clean_make: + -@$(RM) $(BUILD_M_PATH) &> /dev/null + +clean_old: + -@$(RM) $(OLD_F_PATH) &> /dev/null + + +######### +# PRINT # +######### + +print: print_tools print_bootstrap + +print_tools: + @$(ECHO) "HOME = $(HOME)" + @$(ECHO) "INCLUDES = $(INCLUDES)" + @$(ECHO) "CXXFLAGS = $(CXXFLAGS)" + @$(ECHO) "ECHO = $(ECHO)" + @$(ECHO) "RM = $(RM)" + @$(ECHO) "MKDIR = $(MKDIR)" + @$(ECHO) "CP = $(CP)" + @$(ECHO) + +print_bootstrap: + @$(ECHO) "PWD = $(PWD)" + @$(ECHO) "SOURCE_PATTERN = $(SOURCE_PATTERN)" + @$(ECHO) "BUILD__PATTERN = $(BUILD__PATTERN)" + @$(ECHO) "SOURCE_DIR = $(SOURCE_DIR)" + @$(ECHO) "BUILD__DIR = $(BUILD__DIR)" + @$(ECHO) "SOURCE_MAKEFILE = $(SOURCE_MAKEFILE)" + @$(ECHO) "BUILD__MAKEFILE = $(BUILD__MAKEFILE)" + @$(ECHO) "TARGET_FILE = $(TARGET_FILE)" + @$(ECHO) "SOURCE_FILES = $(SOURCE_FILES)" + @$(ECHO) "SOURCE_F_PATH = $(SOURCE_F_PATH)" + @$(ECHO) "BUILD__FILES = $(BUILD__FILES)" + @$(ECHO) "BUILD__F_PATH = $(BUILD__F_PATH)" + @$(ECHO) "BUILD__M_PATH = $(BUILD__M_PATH)" + @$(ECHO) "SOURCE_M_PATH = $(SOURCE_M_PATH)" + @$(ECHO) "SRC = $(SRC)" + @$(ECHO) "OBJ = $(OBJ)" + @$(ECHO) "OLD = $(OLD)" + @$(ECHO) "SRC_F_PATH = $(SRC_F_PATH)" + @$(ECHO) "OBJ_F_PATH = $(OBJ_F_PATH)" + @$(ECHO) "OLD_F_PATH = $(OLD_F_PATH)" + @$(ECHO) diff --git a/milena/sandbox/green/demo/annoting/rgb_64/rgb_64.cc b/milena/sandbox/green/demo/annoting/rgb_64/rgb_64.cc new file mode 100644 index 0000000..9ff2300 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/rgb_64/rgb_64.cc @@ -0,0 +1,47 @@ +// Test de l'opérateur de Millet RGB-64 +// Composante RGB sur 2 bits, puis histogramme de 64 composantes +// L'image est la résultante + +#include <iostream> + +#include <mln/accu/stat/histo3d_rgb.hh> + +#include <mln/core/image/image2d.hh> + +#include <mln/data/compute.hh> +#include <mln/data/transform.hh> + +#include <mln/debug/println.hh> + +#include <mln/fun/v2v/rgb8_to_rgbn.hh> + +#include <mln/img_path.hh> + +#include <mln/io/ppm/load.hh> + +#include <mln/value/rgb.hh> +#include <mln/value/rgb8.hh> + +int main() +{ + typedef mln::fun::v2v::rgb8_to_rgbn<2> t_rgb8_to_rgb2; + typedef mln::value::rgb8 t_rgb8; + typedef mln::value::rgb<2> t_rgb2; + typedef mln::image2d<t_rgb8> t_image2d_rgb8; + typedef mln::image2d<t_rgb2> t_image2d_rgb2; + typedef mln::image3d<unsigned> t_histo3d; + typedef mln::accu::meta::stat::histo3d_rgb t_histo3d_fun; + + t_image2d_rgb8 input_rgb8; + t_image2d_rgb2 input_rgb2; + t_histo3d histo; + + // IMAGE LOADING PHASE + std::cout << "Image loading phase ..." << std::endl; + mln::io::ppm::load(input_rgb8, SCRIBO_PPM_IMG_PATH"/mp00082c_50p.ppm"); + input_rgb2 = mln::data::transform(input_rgb8, t_rgb8_to_rgb2()); + histo = mln::data::compute(t_histo3d_fun(), input_rgb2); + + // PRINTING PHASE + mln::debug::println(histo); +} diff --git a/milena/sandbox/green/demo/annoting/rgb_64_9/Makefile.am b/milena/sandbox/green/demo/annoting/rgb_64_9/Makefile.am new file mode 100644 index 0000000..96eafb4 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/rgb_64_9/Makefile.am @@ -0,0 +1,150 @@ +# +# Generic Makefile +# + +######### +# TOOLS # +######### + +INCLUDES= -I$(HOME)/svn/oln/trunk/milena/sandbox/green +#CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +#CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES) +ECHO= echo +RM= rm +MKDIR= mkdir -p +CP= cp + +SOURCE_PATTERN= green/demo +BUILD__PATTERN= green/build/demo + + +ifeq ($(findstring $(BUILD__PATTERN),$(PWD)), $(BUILD__PATTERN)) +# Case where make is done from build directory. +SOURCE_DIR= $(subst $(BUILD__PATTERN),$(SOURCE_PATTERN),$(PWD)) +BUILD__DIR= $(PWD)/ +else +# Case where make is done from source directory. +SOURCE_DIR= $(PWD)/ +BUILD__DIR= $(subst $(SOURCE_PATTERN),$(BUILD__PATTERN),$(PWD)) +endif + +SRC= $(notdir $(wildcard $(SOURCE_DIR)/*.cc)) +OLD= $(notdir $(wildcard $(SOURCE_DIR)/*~)) +OBJ= $(patsubst %.cc,%.o,$(SRC)) +SOURCE_MAKEFILE=Makefile.am +BUILD__MAKEFILE=Makefile +TARGET_FILE= $(notdir $(PWD)) +SOURCE_FILES= $(notdir $(wildcard $(SOURCE_DIR)/*.*)) +BUILD__FILES= $(filter-out $(SRC) $(SOURCE_MAKEFILE), $(SOURCE_FILES)) + +BUILD__F_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__FILES)) +SOURCE_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_FILES)) + +BUILD__M_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__MAKEFILE)) +SOURCE_M_PATH= $(addprefix $(SOURCE_DIR)/,$(SOURCE_MAKEFILE)) + +TARGET_F_PATH= $(addprefix $(BUILD__DIR)/,$(TARGET_FILE)) +OBJ_F_PATH= $(addprefix $(BUILD__DIR)/,$(OBJ)) +SRC_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SRC)) +OLD_F_PATH= $(addprefix $(SOURCE_DIR)/,$(OLD)) + +############# +# BOOTSTRAP # +############# + + +bootstrap: $(BUILD__DIR) $(BUILD__F_PATH) $(BUILD__M_PATH) + +# Create, if nessary, the destination directory +$(BUILD__DIR): + $(MKDIR) $(BUILD__DIR) + +# Copy, if nessary, all the files, except the Makefile.am +$(BUILD__F_PATH): $(SOURCE_F_PATH) + $(CP) $(addprefix $(SOURCE_DIR),$(@F)) $@ + +# Copy if nessary, the Makefile.am into Makefile +$(BUILD__M_PATH): $(SOURCE_M_PATH) + $(CP) $(SOURCE_M_PATH) $(BUILD__M_PATH) + + +####### +# ALL # +####### + +# We assume that the call is done from the build directory. +# With the directive vpath, hidden files are found in the source directory. + +all: $(TARGET_F_PATH) + + +$(TARGET_F_PATH): $(OBJ_F_PATH) + $(LINK.cc) $< $(LOADLIBES) $(LDLIBS) -o $@ + +$(OBJ_F_PATH):$(SRC_F_PATH) + $(COMPILE.cc) $(OUTPUT_OPTION) $< + + +######### +# CLEAN # +######### + +# Force every time the deletion +clean: clean_target clean_obj clean_dst clean_old #clean_make + + +clean_target: + -@$(RM) $(TARGET_F_PATH) &> /dev/null + +clean_obj: + -@$(RM) $(OBJ_F_PATH) &> /dev/null + +clean_dst: + -@$(RM) $(BUILD_F_PATH) &> /dev/null + +clean_make: + -@$(RM) $(BUILD_M_PATH) &> /dev/null + +clean_old: + -@$(RM) $(OLD_F_PATH) &> /dev/null + + +######### +# PRINT # +######### + +print: print_tools print_bootstrap + +print_tools: + @$(ECHO) "HOME = $(HOME)" + @$(ECHO) "INCLUDES = $(INCLUDES)" + @$(ECHO) "CXXFLAGS = $(CXXFLAGS)" + @$(ECHO) "ECHO = $(ECHO)" + @$(ECHO) "RM = $(RM)" + @$(ECHO) "MKDIR = $(MKDIR)" + @$(ECHO) "CP = $(CP)" + @$(ECHO) + +print_bootstrap: + @$(ECHO) "PWD = $(PWD)" + @$(ECHO) "SOURCE_PATTERN = $(SOURCE_PATTERN)" + @$(ECHO) "BUILD__PATTERN = $(BUILD__PATTERN)" + @$(ECHO) "SOURCE_DIR = $(SOURCE_DIR)" + @$(ECHO) "BUILD__DIR = $(BUILD__DIR)" + @$(ECHO) "SOURCE_MAKEFILE = $(SOURCE_MAKEFILE)" + @$(ECHO) "BUILD__MAKEFILE = $(BUILD__MAKEFILE)" + @$(ECHO) "TARGET_FILE = $(TARGET_FILE)" + @$(ECHO) "SOURCE_FILES = $(SOURCE_FILES)" + @$(ECHO) "SOURCE_F_PATH = $(SOURCE_F_PATH)" + @$(ECHO) "BUILD__FILES = $(BUILD__FILES)" + @$(ECHO) "BUILD__F_PATH = $(BUILD__F_PATH)" + @$(ECHO) "BUILD__M_PATH = $(BUILD__M_PATH)" + @$(ECHO) "SOURCE_M_PATH = $(SOURCE_M_PATH)" + @$(ECHO) "SRC = $(SRC)" + @$(ECHO) "OBJ = $(OBJ)" + @$(ECHO) "OLD = $(OLD)" + @$(ECHO) "SRC_F_PATH = $(SRC_F_PATH)" + @$(ECHO) "OBJ_F_PATH = $(OBJ_F_PATH)" + @$(ECHO) "OLD_F_PATH = $(OLD_F_PATH)" + @$(ECHO) diff --git a/milena/sandbox/green/demo/annoting/rgb_64_9/rgb_64_9.cc b/milena/sandbox/green/demo/annoting/rgb_64_9/rgb_64_9.cc new file mode 100644 index 0000000..29e90f3 --- /dev/null +++ b/milena/sandbox/green/demo/annoting/rgb_64_9/rgb_64_9.cc @@ -0,0 +1,97 @@ +// Test de l'opérateur de Millet RGB-64 +// Composante RGB sur 2 bits, puis histogramme de 64 composantes +// L'image est la résultante + +#include <iostream> +#include <sstream> + +#include <mln/accu/stat/histo3d_rgb.hh> + +#include <mln/core/alias/box2d.hh> +#include <mln/core/alias/point2d.hh> +#include <mln/core/image/image2d.hh> +#include <mln/core/image/dmorph/image_if.hh> +#include <mln/core/routine/initialize.hh> + +#include <mln/data/compute.hh> +#include <mln/data/paste.hh> +#include <mln/data/transform.hh> + +#include <mln/debug/println.hh> + +#include <mln/fun/v2v/rgb8_to_rgbn.hh> + +#include <mln/img_path.hh> + +#include <mln/io/ppm/load.hh> +#include <mln/io/ppm/save.hh> + +#include <mln/value/rgb.hh> +#include <mln/value/rgb8.hh> + +const char *get_name(const char *base, const unsigned i, const unsigned j) +{ + std::ostringstream name; + + name << base; + name << i; + name << "_"; + name << j; + name << ".ppm"; + + return name.str().c_str(); +} + +int main() +{ + typedef mln::fun::v2v::rgb8_to_rgbn<2> t_rgb8_to_rgb2; + typedef mln::value::rgb8 t_rgb8; + typedef mln::value::rgb<2> t_rgb2; + typedef mln::image2d<t_rgb8> t_image2d_rgb8; + typedef mln::image2d<t_rgb2> t_image2d_rgb2; + typedef mln::image3d<unsigned> t_histo3d; + typedef mln::accu::meta::stat::histo3d_rgb t_histo3d_fun; + + t_image2d_rgb8 input_rgb8; + t_image2d_rgb2 input_rgb2; + t_histo3d histo; + + // IMAGE LOADING PHASE + std::cout << "Image loading phase ..." << std::endl; + mln::io::ppm::load(input_rgb8, SCRIBO_PPM_IMG_PATH"/mp00082c_50p.ppm"); + + input_rgb2 = mln::data::transform(input_rgb8, t_rgb8_to_rgb2()); + + // IMAGE SPLITTING PHASE + mln::box2d domain = input_rgb2.domain(); + mln::point2d pmin = domain.pmin(); + mln::point2d pmax = domain.pmax(); + + unsigned sz_row = (pmax.row() - pmin.row())/ 3; + unsigned sz_col = (pmax.col() - pmin.col())/ 3; + + std::cout << domain << std::endl; + + // Divide the domain in nine sub-domains. + for (unsigned i = 0; i < 3; ++i) + for (unsigned j = 0; j < 3; ++j) + { + mln::point2d min(pmin.row()+sz_row*i,pmin.col()+sz_col*j); + mln::point2d max(pmin.row()+sz_row*(i+1),pmin.col()+sz_col*(j+1)); + mln::box2d dom(min,max); + + std::cout << dom << std::endl; + + // Save it + t_image2d_rgb2 input_1o9_rgb2(dom); + + mln::data::paste(input_rgb2 | dom, input_1o9_rgb2); + mln::io::ppm::save(input_1o9_rgb2, get_name("output",i,j)); + + histo = mln::data::compute(t_histo3d_fun(), input_1o9_rgb2); + + // PRINTING PHASE + mln::debug::println(histo); + } + +} -- 1.5.6.5
14 years, 5 months
1
0
0
0
last-svn-commit-187-g224e84a Extend the test image database.
by green
* green/mln/img_path.hh: Add annoting directories to experiment algorithms on fax, handwritten, typed, logo, bill, map, screenshot, slide image. --- milena/sandbox/ChangeLog | 8 ++++++++ milena/sandbox/green/mln/img_path.hh | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog index 5cb9a9c..56cfd22 100644 --- a/milena/sandbox/ChangeLog +++ b/milena/sandbox/ChangeLog @@ -75,6 +75,14 @@ * bin/pgm_to_pbm.cc, * bin/ppm_negate.cc: New. +2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + + Extend the test image database. + + * green/mln/img_path.hh: Add annoting directories to experiment + algorithms on fax, handwritten, typed, logo, bill, map, screenshot, + slide image. + 2009-11-17 Thierry Geraud <thierry.geraud(a)lrde.epita.fr> Add some bench + canvas + subsampling + browsing code. diff --git a/milena/sandbox/green/mln/img_path.hh b/milena/sandbox/green/mln/img_path.hh index 90cdb49..188b813 100644 --- a/milena/sandbox/green/mln/img_path.hh +++ b/milena/sandbox/green/mln/img_path.hh @@ -33,10 +33,24 @@ #define INIM_IMG_PATH IMG_PATH"/inim" #define INIM_FG_BG_IMG_PATH INIM_IMG_PATH"/fg_bg" #define INIM_IN_IMG_PATH INIM_IMG_PATH"/in" + #define OLENA_IMG_PATH IMG_PATH"/olena" + #define SCRIBO_IMG_PATH IMG_PATH"/scribo" #define SCRIBO_JPG_IMG_PATH SCRIBO_IMG_PATH"/jpg_50p" #define SCRIBO_PGM_IMG_PATH SCRIBO_IMG_PATH"/pgm_50p" #define SCRIBO_PPM_IMG_PATH SCRIBO_IMG_PATH"/ppm_50p" +#define ANNOTING_IMG_PATH IMG_PATH"/annoting" +#define ANNOTING_BILL_IMG_PATH ANNOTING_IMG_PATH"/bill" +#define ANNOTING_FAX_IMG_PATH ANNOTING_IMG_PATH"/fax" +#define ANNOTING_HANDWRITTEN_IMG_PATH ANNOTING_IMG_PATH"/handwritten" +#define ANNOTING_LOGO_IMG_PATH ANNOTING_IMG_PATH"/logo" +#define ANNOTING_MAP_IMG_PATH ANNOTING_IMG_PATH"/map" +#define ANNOTING_SCREENSHOT_IMG_PATH ANNOTING_IMG_PATH"/screenshot" +#define ANNOTING_SLIDE_IMG_PATH ANNOTING_IMG_PATH"/slide" +#define ANNOTING_TYPED_IMG_PATH ANNOTING_IMG_PATH"/typed" + + + #endif // ! MLN_IMG_PATH_HH -- 1.5.6.5
14 years, 5 months
1
0
0
0
last-svn-commit-186-g81d6850 Fix the outside template use case for the convolve macros.
by green
* mln/linear/ch_convolve.hh (mln_ch_convolve_, mln_ch_convolve_grad_): Define new macros to work outside templates. --- milena/ChangeLog | 8 ++++++++ milena/mln/linear/ch_convolve.hh | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index c7da59f..4f302ce 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -534,6 +534,14 @@ * mln/value/rgb.hh: Make use of the new routine to print a correct type names in dump format. +2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> + + Fix the outside template use case for the convolve macros. + + * mln/linear/ch_convolve.hh (mln_ch_convolve_, mln_ch_convolve_grad_): + Define new macros to work outside templates. + + 2009-11-18 Guillaume Lazzara <z(a)lrde.epita.fr> * doc/white_paper/white_paper.tex: Fix an invalid URL. diff --git a/milena/mln/linear/ch_convolve.hh b/milena/mln/linear/ch_convolve.hh index ef9fb42..9ea45e5 100644 --- a/milena/mln/linear/ch_convolve.hh +++ b/milena/mln/linear/ch_convolve.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -44,9 +45,15 @@ # define mln_ch_convolve(I, W) \ typename mln::linear::ch_convolve<I, W>::ret +# define mln_ch_convolve_(I, W) \ + mln::linear::ch_convolve<I, W>::ret + + # define mln_ch_convolve_grad(I, W) \ typename mln::trait::ch_value< I, algebra::vec< I::site::dim, typename mln::linear::ch_convolve<I,W>::ret::value > >::ret +# define mln_ch_convolve_grad_(I, W) \ + mln::trait::ch_value< I, algebra::vec< I::site::dim, mln::linear::ch_convolve<I,W>::ret::value > >::ret namespace mln -- 1.5.6.5
14 years, 5 months
1
0
0
0
branch exp/scribo-z updated: last-svn-commit-229-g58e82cd
by git@lrde.epita.fr
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Olena, a generic and efficient image processing platform". The branch exp/scribo-z has been updated via 58e82cd9f7d25b6aafb2085c4ace86d1819b5e1f (commit) via 218a6951a1b0d51f35faf440a0938ffc57e6fc69 (commit) via 2290b5c217d1aff34973686b4ca20ac907b088b1 (commit) via 3586ef11c3c314352893a9239f16679657d12d5f (commit) via 681f2578cf36e5d15de8744b5a7dd92bfdc4fc4c (commit) via 1307e9db8d14cfc6dff52604e561b71388e44f58 (commit) via 71f26fd56cb0b4ce501d5b268110a7cba2580c26 (commit) via ad5614ea5041d342b336310eb72fc632e85d92fe (commit) via 125df33ea1757903b9ae2078ff37cda45ab1fc0c (commit) via b9a5b97f58655d268aea57a5b3d625f8fedae6ee (commit) via d169338813844bac2932789235e76482922b0d5e (commit) via 241c2467d08dc42b87d25a93f2606c1d46d835d2 (commit) via f5c0ae5a9385033e13a8f7d639f26f7c3114854e (commit) via 7e1a2f88f9f363580adf64244448a04b2fed8588 (commit) via 31925d2882a55285b496a5efb040875eeceee85e (commit) via b15c1b6b4c6eb9cb7dda58a28bb93695feb7c463 (commit) via 288d44d51e20f1d602c0b6b2f2d3cadb5cc4ba1d (commit) via 4d87541b98ba8e496d125c80c83ad20fbfbb8fb3 (commit) via b57d26e949bf2f7993b86a1df34d12c0e27f581d (commit) via 17304c0d1e2e0f089a7fba4a319c85c401b78a71 (commit) via 5179913a9ef7ad087e49b617e185ea77bef3bd4e (commit) via 7c558b5f8ddad2675f221439e6cc05c131c41306 (commit) via fe92959d0b991dc4af32354a5aaecebe4a2496e7 (commit) via 5fa09b417ceab47852ce77832d504474b37911c0 (commit) via b4195d21051065f1793d03ac2fc8473979eb3d85 (commit) via f3987ed3d3aa9063ae36e632d59f56c0fed6ef71 (commit) via 7570d066d5b6867ec467c65577b856552eb7959f (commit) via b98887a266675d0408c9a5e206e01e8c05141350 (commit) via 07b0d845a4695de07897a0550f3cf88e90bf71ba (commit) via e9bf3efcc6957e3e0d0b37228e0060cee5315c66 (commit) via 26fd960b08963a21dcc2b55b6618bc0fb03f1721 (commit) via f8c67ca6812d33f6e758d02b52306be5337357ec (commit) via 34bcc24494086059cddc9563bfc74d7d41c92062 (commit) via 00152b7b89d4690e7e1fe0ac252096d834360917 (commit) via 53630924d3586513a4979ad9ba76ec975a7d4d6f (commit) via 65586d1b604614ab2072306198b2418b222901e6 (commit) via 8adc20194128cd40b88e9d531541067d9c07f90a (commit) via e6a836cee6c68ad1fb50e38754ac5c0a0a7c6236 (commit) via 993461bf6f0e721d96fd483df3c461a7f37c7ea5 (commit) via 60fefaa2e97f9a9dac00d2404fa4ce730cd171b0 (commit) via 4b0e1fb92f24d116e8df227786eae369f1b8f615 (commit) via 2f0e11309514214cd1be0c8c565183bd001cc1b6 (commit) via 224e84a64d1844494f71173a154fbec87927da4b (commit) via 81d685024b4321859625cf173903e176cbf6ecbe (commit) from 543d805e7b099357ba92802493be73e39a71687c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- 58e82cd Add some futur materials on regional maxima. 218a695 Implement the kmean algorithh and start to optimize it. 2290b5c Import files from milena/sandbox/green. 3586ef1 Simple integration test. 681f257 Fix the way to convert unsigned to float. 1307e9d Add milena library components. 71f26fd Work on Millet value descriptor. ad5614e Work on Millet saturation descriptor. 125df33 Work on Millet saturation descriptor. b9a5b97 Work on Millet hsv descriptors. d169338 Work on histograms view as density. 241c246 Test error quantification as a color descriptor in our database. f5c0ae5 Benchmark few descriptors. 7e1a2f8 Test on image database the achromatism descriptor. 31925d2 Turn around Millet 2008 hsv descriptors. b15c1b6 Delete BUG image file in milena/img. 288d44d Save Theo's exhaustive demonstration results. 4d87541 Fix bugs in the histogram visualization tools. b57d26e Fix last details in the image processing chain. 17304c0 Extend the histogram visualization tools for new projection concept. 5179913 Build translation table between number of pixels and percentage of 7c558b5 Split the regional maxima binary in small atomic binaries. fe92959 Write the opening volume thresholds for the scribo image mp00082c.ppm. 5fa09b4 Experiment various quantifications on regional maxima labeling. b4195d2 Experiment variation on regional maxima labeling. f3987ed Fix the right behaviour of the regmax software. 7570d06 Fix bug in the direction of projection. b98887a Fix bugs in regional_maxima routine, work with rgb8 for stats. 07b0d84 Test the local deviation operator (Millet2008) on the annotating base. e9bf3ef Introduce the local deviation operator (Millet2008) which 26fd960 Group Millet2008 documentation files. f8c67ca Correct typo into directories. 34bcc24 2009-12-15 green <jacquelet(a)lrde.epita.fr> 00152b7 2009-12-15 green <jacquelet(a)lrde.epita.fr> 5363092 2009-12-15 Yann Jacquelet <jacquelet(a)lrde.epita.fr> 65586d1 Test clipart operators described by Millet on annoting database. 8adc201 2009-12-15 Yann Jacquelet <jacquelet(a)lrde.epita.fr> e6a836c 2009-12-02 Yann Jacquelet <jacquelet(a)lrde.epita.fr> 993461b Test experimentation with regmax code on annoting database. 60fefaa Transform kmean object in a big function and then a canvas. 4b0e1fb Benchmark on distance, preliminary work before optimizing kmean. 2f0e113 Works on Millet2008 descriptors. 224e84a Extend the test image database. 81d6850 Fix the outside template use case for the convolve macros. ----------------------------------------------------------------------- Summary of changes: milena/ChangeLog | 15 + milena/img/BUG_lean_ascii.pgm.gz | Bin 75726 -> 0 bytes milena/mln/convert/from_to.hxx | 4 + milena/mln/convert/impl/from_unsigned_to_value.hh | 10 + milena/mln/linear/ch_convolve.hh | 9 +- milena/sandbox/ChangeLog | 524 +++++++++ .../green/bench/transform/distance/Makefile.am | 150 +++ .../green/bench/transform/distance/distance.cc | 775 +++++++++++++ .../sandbox/green/demo/annotating/bic/Makefile.am | 150 +++ milena/sandbox/green/demo/annotating/bic/bic.cc | 87 ++ .../sandbox/green/demo/annotating/hsv/Makefile.am | 152 +++ milena/sandbox/green/demo/annotating/hsv/hsv.cc | 607 ++++++++++ .../sandbox/green/demo/annotating/lep/Makefile.am | 150 +++ milena/sandbox/green/demo/annotating/lep/lep.cc | 92 ++ .../green/demo/annotating/nb_color/Makefile.am | 150 +++ .../green/demo/annotating/nb_color/nb_color.cc | 101 ++ .../green/demo/annotating/project/Makefile.am | 150 +++ .../green/demo/annotating/project/project.cc | 210 ++++ .../green/demo/annotating/rgb_64/Makefile.am | 150 +++ .../sandbox/green/demo/annotating/rgb_64/rgb_64.cc | 47 + .../green/demo/annotating/rgb_64_9/Makefile.am | 150 +++ .../green/demo/annotating/rgb_64_9/rgb_64_9.cc | 97 ++ .../green/demo/annotating/stddev_color/Makefile.am | 150 +++ .../demo/annotating/stddev_color/stddev_color.cc | 124 ++ .../demo/annotating/stddev_color_16/Makefile.am | 150 +++ .../annotating/stddev_color_16/stddev_color_16.cc | 178 +++ .../histo2d => clustering/kmean_rgb}/Makefile.am | 0 .../green/demo/clustering/kmean_rgb/kmean_rgb.cc | 91 ++ .../demo/labeling/regional_maxima/Makefile.am | 2 + .../labeling/regional_maxima/regional_maxima.cc | 906 +++++++++++---- .../demo/labeling/regional_maxima/thresholds.txt | 42 + milena/sandbox/green/doc/annotating/class.txt | 42 + .../green/doc/annotating/syntheseMillet2008.txt | 283 +++++ milena/sandbox/green/doc/annotating/testMillet2008 | 69 ++ .../doc/regional_maxima/cmp_method/h0_input.pgm.gz | Bin 0 -> 18078 bytes .../doc/regional_maxima/cmp_method/h2_mean.pgm.gz | Bin 0 -> 374 bytes .../doc/regional_maxima/cmp_method/h2_merge.pgm.gz | Bin 0 -> 4491 bytes .../doc/regional_maxima/cmp_method/h3_mean.pgm.gz | Bin 0 -> 391 bytes .../doc/regional_maxima/cmp_method/h3_merge.pgm.gz | Bin 0 -> 10188 bytes .../doc/regional_maxima/cmp_method/h4_mean.pgm.gz | Bin 0 -> 367 bytes .../doc/regional_maxima/cmp_method/h4_merge.pgm.gz | Bin 0 -> 18078 bytes .../doc/regional_maxima/cmp_method/h5_mean.pgm.gz | Bin 0 -> 372 bytes .../doc/regional_maxima/cmp_method/h5_merge.pgm.gz | Bin 0 -> 12777 bytes .../doc/regional_maxima/cmp_method/i2_mean.ppm.gz | Bin 0 -> 566650 bytes .../doc/regional_maxima/cmp_method/i2_merge.ppm.gz | Bin 0 -> 1586150 bytes .../doc/regional_maxima/cmp_method/i3_mean.ppm.gz | Bin 0 -> 573407 bytes .../doc/regional_maxima/cmp_method/i3_merge.ppm.gz | Bin 0 -> 3050979 bytes .../doc/regional_maxima/cmp_method/i4_mean.ppm.gz | Bin 0 -> 663621 bytes .../doc/regional_maxima/cmp_method/i4_merge.ppm.gz | Bin 0 -> 3387044 bytes .../doc/regional_maxima/cmp_method/i5_mean.ppm.gz | Bin 0 -> 653140 bytes .../doc/regional_maxima/cmp_method/i5_merge.ppm.gz | Bin 0 -> 3217839 bytes .../doc/regional_maxima/cmp_method/l2_input.pgm.gz | Bin 0 -> 423612 bytes .../doc/regional_maxima/cmp_method/l3_input.pgm.gz | Bin 0 -> 420801 bytes .../doc/regional_maxima/cmp_method/l4_input.pgm.gz | Bin 0 -> 486206 bytes .../doc/regional_maxima/cmp_method/l5_input.pgm.gz | Bin 0 -> 479055 bytes .../regional_maxima/cmp_method/reponse_theo.eml | 106 ++ .../doc/regional_maxima/cmp_method/s2_histo.txt | 31 + .../doc/regional_maxima/cmp_method/s3_histo.txt | 31 + .../doc/regional_maxima/cmp_method/s4_histo.txt | 31 + .../doc/regional_maxima/cmp_method/s5_histo.txt | 31 + .../doc/regional_maxima/cmp_method/synthese.txt | 223 ++++ .../doc/regional_maxima/cmp_quant/h0_input.pgm.gz | Bin 0 -> 18078 bytes .../regional_maxima/cmp_quant/h5_mean_q2.pgm.gz | Bin 0 -> 247 bytes .../regional_maxima/cmp_quant/h5_mean_q3.pgm.gz | Bin 0 -> 280 bytes .../regional_maxima/cmp_quant/h5_mean_q4.pgm.gz | Bin 0 -> 319 bytes .../regional_maxima/cmp_quant/h5_mean_q5.pgm.gz | Bin 0 -> 375 bytes .../regional_maxima/cmp_quant/h5_mean_q6.pgm.gz | Bin 0 -> 392 bytes .../regional_maxima/cmp_quant/h5_mean_q7.pgm.gz | Bin 0 -> 383 bytes .../regional_maxima/cmp_quant/h5_mean_q8.pgm.gz | Bin 0 -> 470 bytes .../regional_maxima/cmp_quant/h5_merge_q2.pgm.gz | Bin 0 -> 18081 bytes .../regional_maxima/cmp_quant/h5_merge_q3.pgm.gz | Bin 0 -> 18081 bytes .../regional_maxima/cmp_quant/h5_merge_q4.pgm.gz | Bin 0 -> 16358 bytes .../regional_maxima/cmp_quant/h5_merge_q5.pgm.gz | Bin 0 -> 12780 bytes .../regional_maxima/cmp_quant/h5_merge_q6.pgm.gz | Bin 0 -> 9694 bytes .../regional_maxima/cmp_quant/h5_merge_q7.pgm.gz | Bin 0 -> 6211 bytes .../regional_maxima/cmp_quant/h5_merge_q8.pgm.gz | Bin 0 -> 1564 bytes .../regional_maxima/cmp_quant/i5_mean_q2.ppm.gz | Bin 0 -> 112779 bytes .../regional_maxima/cmp_quant/i5_mean_q3.ppm.gz | Bin 0 -> 191264 bytes .../regional_maxima/cmp_quant/i5_mean_q4.ppm.gz | Bin 0 -> 298062 bytes .../regional_maxima/cmp_quant/i5_mean_q5.ppm.gz | Bin 0 -> 653143 bytes .../regional_maxima/cmp_quant/i5_mean_q6.ppm.gz | Bin 0 -> 807617 bytes .../regional_maxima/cmp_quant/i5_mean_q7.ppm.gz | Bin 0 -> 813222 bytes .../regional_maxima/cmp_quant/i5_mean_q8.ppm.gz | Bin 0 -> 861711 bytes .../regional_maxima/cmp_quant/i5_merge_q2.ppm.gz | Bin 0 -> 3387047 bytes .../regional_maxima/cmp_quant/i5_merge_q3.ppm.gz | Bin 0 -> 3387047 bytes .../regional_maxima/cmp_quant/i5_merge_q4.ppm.gz | Bin 0 -> 3355365 bytes .../regional_maxima/cmp_quant/i5_merge_q5.ppm.gz | Bin 0 -> 3217842 bytes .../regional_maxima/cmp_quant/i5_merge_q6.ppm.gz | Bin 0 -> 3033730 bytes .../regional_maxima/cmp_quant/i5_merge_q7.ppm.gz | Bin 0 -> 2295150 bytes .../regional_maxima/cmp_quant/i5_merge_q8.ppm.gz | Bin 0 -> 1319396 bytes .../regional_maxima/cmp_quant/l5_input_q2.pgm.gz | Bin 0 -> 83951 bytes .../regional_maxima/cmp_quant/l5_input_q3.pgm.gz | Bin 0 -> 143817 bytes .../regional_maxima/cmp_quant/l5_input_q4.pgm.gz | Bin 0 -> 220346 bytes .../regional_maxima/cmp_quant/l5_input_q5.pgm.gz | Bin 0 -> 479058 bytes .../regional_maxima/cmp_quant/l5_input_q6.pgm.gz | Bin 0 -> 593359 bytes .../regional_maxima/cmp_quant/l5_input_q7.pgm.gz | Bin 0 -> 600121 bytes .../regional_maxima/cmp_quant/l5_input_q8.pgm.gz | Bin 0 -> 630760 bytes .../doc/regional_maxima/cmp_quant/s5_histo_q2.txt | 3 + .../doc/regional_maxima/cmp_quant/s5_histo_q3.txt | 8 + .../doc/regional_maxima/cmp_quant/s5_histo_q4.txt | 18 + .../doc/regional_maxima/cmp_quant/s5_histo_q5.txt | 33 + .../doc/regional_maxima/cmp_quant/s5_histo_q6.txt | 33 + .../doc/regional_maxima/cmp_quant/s5_histo_q7.txt | 32 + .../doc/regional_maxima/cmp_quant/s5_histo_q8.txt | 75 ++ .../doc/regional_maxima/cmp_quant/synthese.txt | 205 ++++ .../mp00411c/colormap_all_q4.txt.gz | Bin 0 -> 187 bytes .../mp00411c/colormap_all_q5.txt.gz | Bin 0 -> 420 bytes .../mp00411c/colormap_thick_q4.txt.gz | Bin 0 -> 159 bytes .../mp00411c/colormap_thick_q5.txt.gz | Bin 0 -> 352 bytes .../mp00411c/colormap_thin_q4.txt.gz | Bin 0 -> 173 bytes .../mp00411c/colormap_thin_q5.txt.gz | Bin 0 -> 366 bytes .../regional_maxima/mp00411c/histo_all_q4.dump.gz | Bin 0 -> 1233 bytes .../regional_maxima/mp00411c/histo_all_q5.dump.gz | Bin 0 -> 4779 bytes .../mp00411c/histo_thick_q4.dump.gz | Bin 0 -> 781 bytes .../mp00411c/histo_thick_q5.dump.gz | Bin 0 -> 2532 bytes .../regional_maxima/mp00411c/histo_thin_q4.dump.gz | Bin 0 -> 901 bytes .../regional_maxima/mp00411c/histo_thin_q5.dump.gz | Bin 0 -> 2976 bytes .../doc/regional_maxima/mp00411c/iz_all_q4.dump.gz | Bin 0 -> 659040 bytes .../doc/regional_maxima/mp00411c/iz_all_q5.dump.gz | Bin 0 -> 1505619 bytes .../regional_maxima/mp00411c/iz_thick_q4.dump.gz | Bin 0 -> 482831 bytes .../regional_maxima/mp00411c/iz_thick_q5.dump.gz | Bin 0 -> 1414258 bytes .../regional_maxima/mp00411c/iz_thin_q4.dump.gz | Bin 0 -> 647722 bytes .../regional_maxima/mp00411c/iz_thin_q5.dump.gz | Bin 0 -> 1458415 bytes .../mp00411c/labeled_all_q4.dump.gz | Bin 0 -> 149 bytes .../mp00411c/labeled_all_q5.dump.gz | Bin 0 -> 343 bytes .../mp00411c/labeled_thick_q4.dump.gz | Bin 0 -> 149 bytes .../mp00411c/labeled_thick_q5.dump.gz | Bin 0 -> 309 bytes .../mp00411c/labeled_thin_q4.dump.gz | Bin 0 -> 149 bytes .../mp00411c/labeled_thin_q5.dump.gz | Bin 0 -> 308 bytes .../regional_maxima/mp00411c/mean3_all_q4.ppm.gz | Bin 0 -> 985276 bytes .../regional_maxima/mp00411c/mean3_all_q5.ppm.gz | Bin 0 -> 1961577 bytes .../regional_maxima/mp00411c/mean3_thick_q4.ppm.gz | Bin 0 -> 865034 bytes .../regional_maxima/mp00411c/mean3_thick_q5.ppm.gz | Bin 0 -> 1831699 bytes .../regional_maxima/mp00411c/mean3_thin_q4.ppm.gz | Bin 0 -> 958289 bytes .../regional_maxima/mp00411c/mean3_thin_q5.ppm.gz | Bin 0 -> 1872271 bytes .../regional_maxima/mp00411c/mean4_all_q4.ppm.gz | Bin 0 -> 772605 bytes .../regional_maxima/mp00411c/mean4_all_q5.ppm.gz | Bin 0 -> 1852455 bytes .../regional_maxima/mp00411c/mean4_thick_q4.ppm.gz | Bin 0 -> 559850 bytes .../regional_maxima/mp00411c/mean4_thick_q5.ppm.gz | Bin 0 -> 1727247 bytes .../regional_maxima/mp00411c/mean4_thin_q4.ppm.gz | Bin 0 -> 760428 bytes .../regional_maxima/mp00411c/mean4_thin_q5.ppm.gz | Bin 0 -> 1781495 bytes .../doc/regional_maxima/mp00411c/mp00411c.ppm.gz | Bin 0 -> 5316204 bytes .../doc/regional_maxima/mp00411c/mp00411c.sh.gz | Bin 0 -> 636 bytes .../regional_maxima/mp00411c/mp00411c_thick.pbm.gz | Bin 0 -> 190478 bytes .../regional_maxima/mp00411c/mp00411c_thin.pbm.gz | Bin 0 -> 248730 bytes .../regional_maxima/mp00411c/opened_all_q4.dump.gz | Bin 0 -> 1159 bytes .../regional_maxima/mp00411c/opened_all_q5.dump.gz | Bin 0 -> 4531 bytes .../mp00411c/opened_thick_q4.dump.gz | Bin 0 -> 747 bytes .../mp00411c/opened_thick_q5.dump.gz | Bin 0 -> 2351 bytes .../mp00411c/opened_thin_q4.dump.gz | Bin 0 -> 848 bytes .../mp00411c/opened_thin_q5.dump.gz | Bin 0 -> 2772 bytes .../regional_maxima/mp00411c/proj1_all_q4.pgm.gz | Bin 0 -> 343 bytes .../regional_maxima/mp00411c/proj1_all_q5.pgm.gz | Bin 0 -> 779 bytes .../regional_maxima/mp00411c/proj1_thick_q4.pgm.gz | Bin 0 -> 312 bytes .../regional_maxima/mp00411c/proj1_thick_q5.pgm.gz | Bin 0 -> 612 bytes .../regional_maxima/mp00411c/proj1_thin_q4.pgm.gz | Bin 0 -> 339 bytes .../regional_maxima/mp00411c/proj1_thin_q5.pgm.gz | Bin 0 -> 718 bytes .../regional_maxima/mp00411c/proj2_all_q4.pgm.gz | Bin 0 -> 338 bytes .../regional_maxima/mp00411c/proj2_all_q5.pgm.gz | Bin 0 -> 750 bytes .../regional_maxima/mp00411c/proj2_thick_q4.pgm.gz | Bin 0 -> 315 bytes .../regional_maxima/mp00411c/proj2_thick_q5.pgm.gz | Bin 0 -> 606 bytes .../regional_maxima/mp00411c/proj2_thin_q4.pgm.gz | Bin 0 -> 331 bytes .../regional_maxima/mp00411c/proj2_thin_q5.pgm.gz | Bin 0 -> 693 bytes .../regional_maxima/mp00411c/proj3_all_q4.ppm.gz | Bin 0 -> 230 bytes .../regional_maxima/mp00411c/proj3_all_q5.ppm.gz | Bin 0 -> 401 bytes .../regional_maxima/mp00411c/proj3_thick_q4.ppm.gz | Bin 0 -> 224 bytes .../regional_maxima/mp00411c/proj3_thick_q5.ppm.gz | Bin 0 -> 343 bytes .../regional_maxima/mp00411c/proj3_thin_q4.ppm.gz | Bin 0 -> 229 bytes .../regional_maxima/mp00411c/proj3_thin_q5.ppm.gz | Bin 0 -> 359 bytes .../regional_maxima/mp00411c/proj4_all_q4.ppm.gz | Bin 0 -> 252 bytes .../regional_maxima/mp00411c/proj4_all_q5.ppm.gz | Bin 0 -> 447 bytes .../regional_maxima/mp00411c/proj4_thick_q4.ppm.gz | Bin 0 -> 221 bytes .../regional_maxima/mp00411c/proj4_thick_q5.ppm.gz | Bin 0 -> 369 bytes .../regional_maxima/mp00411c/proj4_thin_q4.ppm.gz | Bin 0 -> 234 bytes .../regional_maxima/mp00411c/proj4_thin_q5.ppm.gz | Bin 0 -> 415 bytes .../doc/regional_maxima/mp00411c/quant_q4.ppm.gz | Bin 0 -> 2590062 bytes .../doc/regional_maxima/mp00411c/quant_q5.ppm.gz | Bin 0 -> 3775184 bytes .../regional_maxima/mp00411c/stats3_all_q4.txt.gz | Bin 0 -> 292 bytes .../regional_maxima/mp00411c/stats3_all_q5.txt.gz | Bin 0 -> 701 bytes .../mp00411c/stats3_thick_q4.txt.gz | Bin 0 -> 244 bytes .../mp00411c/stats3_thick_q5.txt.gz | Bin 0 -> 584 bytes .../regional_maxima/mp00411c/stats3_thin_q4.txt.gz | Bin 0 -> 262 bytes .../regional_maxima/mp00411c/stats3_thin_q5.txt.gz | Bin 0 -> 606 bytes .../regional_maxima/mp00411c/stats4_all_q4.txt.gz | Bin 0 -> 284 bytes .../regional_maxima/mp00411c/stats4_all_q5.txt.gz | Bin 0 -> 704 bytes .../mp00411c/stats4_thick_q4.txt.gz | Bin 0 -> 234 bytes .../mp00411c/stats4_thick_q5.txt.gz | Bin 0 -> 580 bytes .../regional_maxima/mp00411c/stats4_thin_q4.txt.gz | Bin 0 -> 255 bytes .../regional_maxima/mp00411c/stats4_thin_q5.txt.gz | Bin 0 -> 591 bytes .../doc/regional_maxima/mp00411c/synthese.txt.gz | Bin 0 -> 4062 bytes .../green/exp/annotating/achromastism/Makefile.am | 153 +++ .../exp/annotating/achromastism/achromastism.cc | 113 ++ .../exp/annotating/achromastism/text-color.txt | 15 + .../green/exp/annotating/achromastism/text-img.txt | 40 + .../exp/annotating/achromastism/text-only.txt | 8 + .../sandbox/green/exp/annotating/bench/Makefile.am | 153 +++ milena/sandbox/green/exp/annotating/bench/bench.cc | 1213 ++++++++++++++++++++ .../sandbox/green/exp/annotating/error/Makefile.am | 153 +++ milena/sandbox/green/exp/annotating/error/error.cc | 700 +++++++++++ .../sandbox/green/exp/annotating/histo/Makefile.am | 153 +++ milena/sandbox/green/exp/annotating/histo/histo.cc | 306 +++++ .../sandbox/green/exp/annotating/hsv/Makefile.am | 153 +++ milena/sandbox/green/exp/annotating/hsv/hsv.cc | 652 +++++++++++ .../sandbox/green/exp/annotating/hue/Makefile.am | 153 +++ milena/sandbox/green/exp/annotating/hue/hue.cc | 291 +++++ .../green/exp/annotating/hue/text-color.txt | 15 + .../sandbox/green/exp/annotating/hue/text-img.txt | 40 + .../sandbox/green/exp/annotating/hue/text-only.txt | 8 + .../green/exp/annotating/nb_color/Makefile.am | 151 +++ .../green/exp/annotating/nb_color/nb_color.cc | 131 +++ .../green/exp/annotating/saturation/Makefile.am | 153 +++ .../green/exp/annotating/saturation/saturation.cc | 119 ++ .../green/exp/annotating/saturation/text-color.txt | 15 + .../green/exp/annotating/saturation/text-img.txt | 40 + .../green/exp/annotating/saturation/text-only.txt | 8 + .../green/exp/annotating/stddev_color/Makefile.am | 151 +++ .../exp/annotating/stddev_color/stddev_color.cc | 153 +++ .../exp/annotating/stddev_color_16/Makefile.am | 151 +++ .../annotating/stddev_color_16/stddev_color_16.cc | 195 ++++ .../sandbox/green/exp/annotating/value/Makefile.am | 153 +++ .../green/exp/annotating/value/text-color.txt | 15 + .../green/exp/annotating/value/text-img.txt | 40 + .../green/exp/annotating/value/text-only.txt | 8 + milena/sandbox/green/exp/annotating/value/value.cc | 316 +++++ .../green/exp/labeling/regional_maxima/Makefile.am | 151 +++ .../labeling/regional_maxima/regional_maxima.cc | 156 +++ milena/sandbox/green/mln/accu/stat/histo1d.hh | 66 +- .../sandbox/green/mln/clustering/kmean_rgb.hh | 0 milena/sandbox/green/mln/display/display_histo.hh | 98 ++- milena/sandbox/green/mln/display/project_histo.hh | 443 +++++++- .../sandbox/green/mln/fun/p2b/achromatic.hh | 0 .../sandbox/green/mln/fun/p2b/component_equals.hh | 0 .../sandbox/green/mln/fun/v2v/achromatism.hh | 0 .../sandbox/green/mln/fun/v2v/hue_concentration.hh | 0 .../sandbox/green/mln/fun/v2v/rgb8_to_int_u8.hh | 0 .../green/mln/fun/v2v/rgb_to_achromatism_map.hh | 0 .../sandbox/green/mln/fun/v2v/rgb_to_hsv.hh | 0 .../sandbox/green/mln/fun/v2v/rgb_to_hue_map.hh | 0 .../green/mln/fun/v2v/rgb_to_saturation_map.hh | 0 .../sandbox/green/mln/fun/v2v/rgb_to_value_map.hh | 0 milena/sandbox/green/mln/img_path.hh | 221 ++++- {scribo => milena}/sandbox/green/mln/math/ceil.hh | 0 {scribo => milena}/sandbox/green/mln/math/floor.hh | 0 {scribo => milena}/sandbox/green/mln/value/hsv.hh | 0 .../green/tools/annotating/histo/Makefile.am | 150 +++ .../sandbox/green/tools/annotating/histo/histo.cc | 143 +++ .../sandbox/green/tools/annotating/iz/Makefile.am | 150 +++ milena/sandbox/green/tools/annotating/iz/iz.cc | 373 ++++++ .../green/tools/annotating/opening/Makefile.am | 150 +++ .../green/tools/annotating/opening/opening.cc | 111 ++ .../green/tools/annotating/regmax/Makefile.am | 150 +++ .../green/tools/annotating/regmax/regmax.cc | 328 ++++++ scribo/sandbox/green/ChangeLog | 93 ++ scribo/sandbox/green/README | 219 ++++ scribo/sandbox/green/README.green | 150 +++- .../green/bench/clustering/distance/Makefile.am | 153 +++ .../green/bench/clustering/distance/distance.cc | 842 ++++++++++++++ .../green/demo/clustering/kmean1d/Makefile.am | 153 +++ .../green/demo/clustering/kmean1d/kmean1d.cc | 258 +++++ .../green/demo/clustering/kmean2d/Makefile.am | 153 +++ .../green/demo/clustering/kmean2d/kmean2d.cc | 278 +++++ .../green/demo/clustering/kmean3d/Makefile.am | 153 +++ .../green/demo/clustering/kmean3d/kmean3d.cc | 265 +++++ .../green/demo/clustering/kmean_rgb/Makefile.am | 153 +++ .../green/demo/clustering/kmean_rgb/kmean_rgb.cc | 239 ++++ scribo/sandbox/green/mln/accu/stat/histo1d.hh | 1 - scribo/sandbox/green/mln/accu/stat/histo2d.hh | 9 +- scribo/sandbox/green/mln/accu/stat/histo3d_hsl.hh | 1 + scribo/sandbox/green/mln/accu/stat/histo3d_rgb.hh | 2 + scribo/sandbox/green/mln/clustering/k_mean.hh | 365 ++++-- scribo/sandbox/green/mln/clustering/kmean1d.hh | 194 ++-- scribo/sandbox/green/mln/clustering/kmean2d.hh | 329 +++--- scribo/sandbox/green/mln/clustering/kmean3d.hh | 246 ++-- scribo/sandbox/green/mln/clustering/kmean_rgb.hh | 87 ++- scribo/sandbox/green/mln/fun/v2v/rg_to_rgb.hh | 59 +- scribo/sandbox/green/ok/mln/accu/histo/histo1d.hh | 334 ++++++ .../sandbox/green/ok/mln/accu/histo}/histo2d.hh | 0 .../sandbox/green/ok/mln/accu/histo/histo3d.hh | 0 scribo/sandbox/green/{ => ok}/mln/img_path.hh | 0 .../sandbox/green/ok/test/accu/histo}/gaussian.sh | 0 scribo/sandbox/green/ok/test/accu/histo/histo1d | Bin 0 -> 802920 bytes scribo/sandbox/green/ok/test/accu/histo/histo1d.cc | 726 ++++++++++++ scribo/sandbox/green/test_labelling_2.cc | 342 ++++++ scribo/sandbox/green/test_labelling_3.cc | 463 ++++++++ .../green/tests/clustering/k_mean/Makefile.am | 13 +- .../green/tests/clustering/k_mean/k_mean.cc | 395 ++++--- .../sandbox/green/use/accu/stat/histo1d/histo1d.cc | 2 - .../stat/histo1d => clustering/k_mean}/Makefile.am | 0 .../sandbox/green/use/clustering/k_mean/k_mean.cc | 55 + .../histo1d => clustering/kmean1d}/Makefile.am | 0 .../green/use/clustering/kmean1d/kmean1d.cc | 50 + .../histo1d => clustering/kmean2d}/Makefile.am | 0 .../green/use/clustering/kmean2d/kmean2d.cc | 61 + .../histo1d => clustering/kmean3d}/Makefile.am | 0 .../green/use/clustering/kmean3d/kmean3d.cc | 63 + .../histo1d => clustering/kmean_rgb}/Makefile.am | 0 .../green/use/clustering/kmean_rgb/kmean_rgb.cc | 63 + .../stat/histo1d => fun/v2v/rg_to_rgb}/Makefile.am | 0 .../green/use/fun/v2v/rg_to_rgb/rg_to_rgb.cc | 68 ++ 299 files changed, 21557 insertions(+), 965 deletions(-) delete mode 100644 milena/img/BUG_lean_ascii.pgm.gz create mode 100644 milena/sandbox/green/bench/transform/distance/Makefile.am create mode 100644 milena/sandbox/green/bench/transform/distance/distance.cc create mode 100644 milena/sandbox/green/demo/annotating/bic/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/bic/bic.cc create mode 100644 milena/sandbox/green/demo/annotating/hsv/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/hsv/hsv.cc create mode 100644 milena/sandbox/green/demo/annotating/lep/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/lep/lep.cc create mode 100644 milena/sandbox/green/demo/annotating/nb_color/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/nb_color/nb_color.cc create mode 100644 milena/sandbox/green/demo/annotating/project/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/project/project.cc create mode 100644 milena/sandbox/green/demo/annotating/rgb_64/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/rgb_64/rgb_64.cc create mode 100644 milena/sandbox/green/demo/annotating/rgb_64_9/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/rgb_64_9/rgb_64_9.cc create mode 100644 milena/sandbox/green/demo/annotating/stddev_color/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/stddev_color/stddev_color.cc create mode 100644 milena/sandbox/green/demo/annotating/stddev_color_16/Makefile.am create mode 100644 milena/sandbox/green/demo/annotating/stddev_color_16/stddev_color_16.cc copy milena/sandbox/green/demo/{accu/stat/histo2d => clustering/kmean_rgb}/Makefile.am (100%) create mode 100644 milena/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc create mode 100644 milena/sandbox/green/demo/labeling/regional_maxima/thresholds.txt create mode 100644 milena/sandbox/green/doc/annotating/class.txt create mode 100644 milena/sandbox/green/doc/annotating/syntheseMillet2008.txt create mode 100644 milena/sandbox/green/doc/annotating/testMillet2008 create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h0_input.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h2_mean.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h2_merge.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h3_mean.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h3_merge.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h4_mean.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h4_merge.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h5_mean.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/h5_merge.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i2_mean.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i2_merge.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i3_mean.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i3_merge.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i4_mean.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i4_merge.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i5_mean.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/i5_merge.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/l2_input.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/l3_input.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/l4_input.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/l5_input.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/reponse_theo.eml create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/s2_histo.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/s3_histo.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/s4_histo.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/s5_histo.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_method/synthese.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h0_input.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q2.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q3.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q6.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q7.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_mean_q8.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q2.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q3.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q6.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q7.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/h5_merge_q8.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q2.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q3.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q6.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q7.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_mean_q8.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q2.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q3.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q6.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q7.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/i5_merge_q8.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q2.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q3.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q6.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q7.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/l5_input_q8.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q2.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q3.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q4.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q5.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q6.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q7.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/s5_histo_q8.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/cmp_quant/synthese.txt create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_all_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_all_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_thick_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_thick_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_thin_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/colormap_thin_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_all_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_all_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_thick_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_thick_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_thin_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/histo_thin_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_all_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_all_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_thick_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_thick_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_thin_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/iz_thin_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_all_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_all_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_thick_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_thick_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_thin_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/labeled_thin_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_all_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_all_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_thick_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_thick_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_thin_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean3_thin_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_all_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_all_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_thick_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_thick_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_thin_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mean4_thin_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mp00411c.ppm.gz create mode 100755 milena/sandbox/green/doc/regional_maxima/mp00411c/mp00411c.sh.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mp00411c_thick.pbm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/mp00411c_thin.pbm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_all_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_all_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_thick_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_thick_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_thin_q4.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/opened_thin_q5.dump.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_all_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_all_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_thick_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_thick_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_thin_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj1_thin_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_all_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_all_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_thick_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_thick_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_thin_q4.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj2_thin_q5.pgm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_all_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_all_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_thick_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_thick_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_thin_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj3_thin_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_all_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_all_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_thick_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_thick_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_thin_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/proj4_thin_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/quant_q4.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/quant_q5.ppm.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_all_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_all_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_thick_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_thick_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_thin_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats3_thin_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_all_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_all_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_thick_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_thick_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_thin_q4.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/stats4_thin_q5.txt.gz create mode 100644 milena/sandbox/green/doc/regional_maxima/mp00411c/synthese.txt.gz create mode 100644 milena/sandbox/green/exp/annotating/achromastism/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/achromastism/achromastism.cc create mode 100644 milena/sandbox/green/exp/annotating/achromastism/text-color.txt create mode 100644 milena/sandbox/green/exp/annotating/achromastism/text-img.txt create mode 100644 milena/sandbox/green/exp/annotating/achromastism/text-only.txt create mode 100644 milena/sandbox/green/exp/annotating/bench/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/bench/bench.cc create mode 100644 milena/sandbox/green/exp/annotating/error/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/error/error.cc create mode 100644 milena/sandbox/green/exp/annotating/histo/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/histo/histo.cc create mode 100644 milena/sandbox/green/exp/annotating/hsv/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/hsv/hsv.cc create mode 100644 milena/sandbox/green/exp/annotating/hue/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/hue/hue.cc create mode 100644 milena/sandbox/green/exp/annotating/hue/text-color.txt create mode 100644 milena/sandbox/green/exp/annotating/hue/text-img.txt create mode 100644 milena/sandbox/green/exp/annotating/hue/text-only.txt create mode 100644 milena/sandbox/green/exp/annotating/nb_color/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/nb_color/nb_color.cc create mode 100644 milena/sandbox/green/exp/annotating/saturation/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/saturation/saturation.cc create mode 100644 milena/sandbox/green/exp/annotating/saturation/text-color.txt create mode 100644 milena/sandbox/green/exp/annotating/saturation/text-img.txt create mode 100644 milena/sandbox/green/exp/annotating/saturation/text-only.txt create mode 100644 milena/sandbox/green/exp/annotating/stddev_color/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/stddev_color/stddev_color.cc create mode 100644 milena/sandbox/green/exp/annotating/stddev_color_16/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/stddev_color_16/stddev_color_16.cc create mode 100644 milena/sandbox/green/exp/annotating/value/Makefile.am create mode 100644 milena/sandbox/green/exp/annotating/value/text-color.txt create mode 100644 milena/sandbox/green/exp/annotating/value/text-img.txt create mode 100644 milena/sandbox/green/exp/annotating/value/text-only.txt create mode 100644 milena/sandbox/green/exp/annotating/value/value.cc create mode 100644 milena/sandbox/green/exp/labeling/regional_maxima/Makefile.am create mode 100644 milena/sandbox/green/exp/labeling/regional_maxima/regional_maxima.cc copy {scribo => milena}/sandbox/green/mln/clustering/kmean_rgb.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/p2b/achromatic.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/p2b/component_equals.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/v2v/achromatism.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/v2v/hue_concentration.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/v2v/rgb8_to_int_u8.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/v2v/rgb_to_achromatism_map.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/v2v/rgb_to_hsv.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/v2v/rgb_to_hue_map.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/v2v/rgb_to_saturation_map.hh (100%) copy {scribo => milena}/sandbox/green/mln/fun/v2v/rgb_to_value_map.hh (100%) copy {scribo => milena}/sandbox/green/mln/math/ceil.hh (100%) copy {scribo => milena}/sandbox/green/mln/math/floor.hh (100%) copy {scribo => milena}/sandbox/green/mln/value/hsv.hh (100%) create mode 100644 milena/sandbox/green/tools/annotating/histo/Makefile.am create mode 100644 milena/sandbox/green/tools/annotating/histo/histo.cc create mode 100644 milena/sandbox/green/tools/annotating/iz/Makefile.am create mode 100644 milena/sandbox/green/tools/annotating/iz/iz.cc create mode 100644 milena/sandbox/green/tools/annotating/opening/Makefile.am create mode 100644 milena/sandbox/green/tools/annotating/opening/opening.cc create mode 100644 milena/sandbox/green/tools/annotating/regmax/Makefile.am create mode 100644 milena/sandbox/green/tools/annotating/regmax/regmax.cc create mode 100644 scribo/sandbox/green/README create mode 100644 scribo/sandbox/green/bench/clustering/distance/Makefile.am create mode 100644 scribo/sandbox/green/bench/clustering/distance/distance.cc create mode 100644 scribo/sandbox/green/demo/clustering/kmean1d/Makefile.am create mode 100644 scribo/sandbox/green/demo/clustering/kmean1d/kmean1d.cc create mode 100644 scribo/sandbox/green/demo/clustering/kmean2d/Makefile.am create mode 100644 scribo/sandbox/green/demo/clustering/kmean2d/kmean2d.cc create mode 100644 scribo/sandbox/green/demo/clustering/kmean3d/Makefile.am create mode 100644 scribo/sandbox/green/demo/clustering/kmean3d/kmean3d.cc create mode 100644 scribo/sandbox/green/demo/clustering/kmean_rgb/Makefile.am create mode 100644 scribo/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc create mode 100644 scribo/sandbox/green/ok/mln/accu/histo/histo1d.hh copy {milena/sandbox/green/mln/accu/stat => scribo/sandbox/green/ok/mln/accu/histo}/histo2d.hh (100%) copy milena/sandbox/green/mln/accu/stat/histo3d_rgb.hh => scribo/sandbox/green/ok/mln/accu/histo/histo3d.hh (100%) copy scribo/sandbox/green/{ => ok}/mln/img_path.hh (100%) copy {milena/sandbox/green/tests/accu/stat/histo1d => scribo/sandbox/green/ok/test/accu/histo}/gaussian.sh (100%) create mode 100755 scribo/sandbox/green/ok/test/accu/histo/histo1d create mode 100644 scribo/sandbox/green/ok/test/accu/histo/histo1d.cc create mode 100644 scribo/sandbox/green/test_labelling_2.cc create mode 100644 scribo/sandbox/green/test_labelling_3.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/k_mean}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/k_mean/k_mean.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/kmean1d}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/kmean1d/kmean1d.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/kmean2d}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/kmean2d/kmean2d.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/kmean3d}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/kmean3d/kmean3d.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/kmean_rgb}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/kmean_rgb/kmean_rgb.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => fun/v2v/rg_to_rgb}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/fun/v2v/rg_to_rgb/rg_to_rgb.cc hooks/post-receive -- Olena, a generic and efficient image processing platform
14 years, 5 months
1
0
0
0
branch exp/green updated: last-svn-commit-48-g6db793f
by git@lrde.epita.fr
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Olena, a generic and efficient image processing platform". The branch exp/green has been updated via 6db793f7e1bba8cde5c975d2a9fb6521265f551b (commit) via 456226224a7c2fd96932e9dce71e92bf734ead9c (commit) from cfc3ef76083def2e08adf726a633919cfd86bd9d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- 6db793f Add some futur materials on regional maxima. 4562262 Implement the kmean algorithh and start to optimize it. ----------------------------------------------------------------------- Summary of changes: scribo/sandbox/green/ChangeLog | 84 ++ scribo/sandbox/green/README.green | 150 ++++- .../green/bench/clustering/distance/Makefile.am | 153 ++++ .../green/bench/clustering/distance/distance.cc | 842 ++++++++++++++++++++ .../green/demo/clustering/kmean1d/Makefile.am | 153 ++++ .../green/demo/clustering/kmean1d/kmean1d.cc | 258 ++++++ .../green/demo/clustering/kmean2d/Makefile.am | 153 ++++ .../green/demo/clustering/kmean2d/kmean2d.cc | 278 +++++++ .../green/demo/clustering/kmean3d/Makefile.am | 153 ++++ .../green/demo/clustering/kmean3d/kmean3d.cc | 265 ++++++ .../green/demo/clustering/kmean_rgb/Makefile.am | 153 ++++ .../green/demo/clustering/kmean_rgb/kmean_rgb.cc | 239 ++++++ scribo/sandbox/green/mln/clustering/k_mean.hh | 365 ++++++--- scribo/sandbox/green/mln/clustering/kmean1d.hh | 194 ++--- scribo/sandbox/green/mln/clustering/kmean2d.hh | 329 ++++---- scribo/sandbox/green/mln/clustering/kmean3d.hh | 246 +++--- scribo/sandbox/green/mln/clustering/kmean_rgb.hh | 87 ++- scribo/sandbox/green/mln/fun/v2v/rg_to_rgb.hh | 59 ++- scribo/sandbox/green/test_labelling_2.cc | 342 ++++++++ scribo/sandbox/green/test_labelling_3.cc | 463 +++++++++++ .../green/tests/clustering/k_mean/Makefile.am | 13 +- .../green/tests/clustering/k_mean/k_mean.cc | 395 ++++++---- .../stat/histo1d => clustering/k_mean}/Makefile.am | 0 .../sandbox/green/use/clustering/k_mean/k_mean.cc | 55 ++ .../histo1d => clustering/kmean1d}/Makefile.am | 0 .../green/use/clustering/kmean1d/kmean1d.cc | 50 ++ .../histo1d => clustering/kmean2d}/Makefile.am | 0 .../green/use/clustering/kmean2d/kmean2d.cc | 61 ++ .../histo1d => clustering/kmean3d}/Makefile.am | 0 .../green/use/clustering/kmean3d/kmean3d.cc | 63 ++ .../histo1d => clustering/kmean_rgb}/Makefile.am | 0 .../green/use/clustering/kmean_rgb/kmean_rgb.cc | 63 ++ .../stat/histo1d => fun/v2v/rg_to_rgb}/Makefile.am | 0 .../green/use/fun/v2v/rg_to_rgb/rg_to_rgb.cc | 68 ++ 34 files changed, 5036 insertions(+), 698 deletions(-) create mode 100644 scribo/sandbox/green/bench/clustering/distance/Makefile.am create mode 100644 scribo/sandbox/green/bench/clustering/distance/distance.cc create mode 100644 scribo/sandbox/green/demo/clustering/kmean1d/Makefile.am create mode 100644 scribo/sandbox/green/demo/clustering/kmean1d/kmean1d.cc create mode 100644 scribo/sandbox/green/demo/clustering/kmean2d/Makefile.am create mode 100644 scribo/sandbox/green/demo/clustering/kmean2d/kmean2d.cc create mode 100644 scribo/sandbox/green/demo/clustering/kmean3d/Makefile.am create mode 100644 scribo/sandbox/green/demo/clustering/kmean3d/kmean3d.cc create mode 100644 scribo/sandbox/green/demo/clustering/kmean_rgb/Makefile.am create mode 100644 scribo/sandbox/green/demo/clustering/kmean_rgb/kmean_rgb.cc create mode 100644 scribo/sandbox/green/test_labelling_2.cc create mode 100644 scribo/sandbox/green/test_labelling_3.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/k_mean}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/k_mean/k_mean.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/kmean1d}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/kmean1d/kmean1d.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/kmean2d}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/kmean2d/kmean2d.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/kmean3d}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/kmean3d/kmean3d.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => clustering/kmean_rgb}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/clustering/kmean_rgb/kmean_rgb.cc copy scribo/sandbox/green/use/{accu/stat/histo1d => fun/v2v/rg_to_rgb}/Makefile.am (100%) create mode 100644 scribo/sandbox/green/use/fun/v2v/rg_to_rgb/rg_to_rgb.cc hooks/post-receive -- Olena, a generic and efficient image processing platform
14 years, 5 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
28
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Results per page:
10
25
50
100
200