4387: extract/primitive/objects.hh: use blobs_and_compute.

--- scribo/ChangeLog | 4 ++++ scribo/extract/primitive/objects.hh | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 3ab33cd..a1ffa34 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,9 @@ 2009-08-24 Guillaume Lazzara <lazzara@lrde.epita.fr> + * extract/primitive/objects.hh: use blobs_and_compute. + +2009-08-24 Guillaume Lazzara <lazzara@lrde.epita.fr> + Move example files. * src/Makefile.am: update. diff --git a/scribo/extract/primitive/objects.hh b/scribo/extract/primitive/objects.hh index 29bde29..a4110e2 100644 --- a/scribo/extract/primitive/objects.hh +++ b/scribo/extract/primitive/objects.hh @@ -34,7 +34,9 @@ # include <mln/core/concept/neighborhood.hh> # include <mln/core/site_set/box.hh> -# include <mln/labeling/blobs.hh> +# include <mln/accu/shape/bbox.hh> + +# include <mln/labeling/blobs_and_compute.hh> # include <mln/labeling/compute.hh> # include <mln/util/array.hh> @@ -109,9 +111,15 @@ namespace scribo internal::objects_tests(input, nbh, nobjects); - mln_ch_value(I,V) objects = labeling::blobs(input, nbh, nobjects); + typedef mln_ch_value(I,V) L; + typedef accu::shape::bbox<mln_psite(I)> accu_bbox; + + util::couple<L, util::array<mln_box(I)> > + results = labeling::blobs_and_compute(input, nbh, nobjects, + accu_bbox()); - object_image(mln_ch_value(I,V)) output(objects, nobjects); + object_image(L) + output(results.first(), nobjects, results.second()); trace::exiting("scribo::objects"); return output; -- 1.5.6.5
participants (1)
-
Guillaume Lazzara