26 #include <mln/core/image/image2d.hh>
27 #include <mln/core/image/imorph/labeled_image.hh>
28 #include <mln/core/routine/duplicate.hh>
29 #include <mln/make/image.hh>
30 #include <mln/make/box2d.hh>
31 #include <mln/value/label_8.hh>
32 #include <mln/accu/pair.hh>
33 #include <mln/accu/center.hh>
34 #include <mln/accu/shape/bbox.hh>
37 # include <mln/debug/println.hh>
39 static const unsigned bboxes_1[][9] = { { 1,1, 1,1 },
50 static const unsigned bboxes_2[][4] = { { 1,1, 1,1 },
60 template <
typename I,
unsigned n>
62 const unsigned bboxes[][n])
67 for (
unsigned i = 1; i <= lbl_i.
nlabels(); ++i, ++j)
68 if (lbl_i.
bbox(i).is_valid())
71 bboxes[j][2], bboxes[j][3]));
75 mln_assertion(k == 4);
89 label_8 lbl_values[][3] = { { 9, 9, 0 },
97 mln_assertion(lbl_i.nlabels() == 9);
109 mln_assertion(lbl_i.nlabels() == 4);