
* doc/mln/labeling/labeling.dox: New. Introduce labeling module. * mln/labeling/background.hh, * mln/labeling/colorize.hh, * mln/labeling/compute.hh, * mln/labeling/compute_image.hh, * mln/labeling/flat_zones.hh, * mln/labeling/foreground.hh, * mln/labeling/mean_values.hh, * mln/labeling/pack.hh, * mln/labeling/regional_maxima.hh, * mln/labeling/regional_minima.hh, * mln/labeling/relabel.hh, * mln/labeling/superpose.hh, * mln/labeling/value.hh, * mln/labeling/value_and_compute.hh, * mln/labeling/wrap.hh: Set documentation as part of the labeling group. --- milena/ChangeLog | 23 +++++++ milena/doc/mln/labeling/labeling.dox | 6 ++ milena/mln/labeling/background.hh | 4 +- milena/mln/labeling/colorize.hh | 42 ++++++++----- milena/mln/labeling/compute.hh | 100 ++++++++++++++++------------- milena/mln/labeling/compute_image.hh | 74 ++++++++++++---------- milena/mln/labeling/flat_zones.hh | 18 +++--- milena/mln/labeling/foreground.hh | 8 ++- milena/mln/labeling/mean_values.hh | 11 +++- milena/mln/labeling/pack.hh | 34 +++++++--- milena/mln/labeling/regional_maxima.hh | 19 +++--- milena/mln/labeling/regional_minima.hh | 19 +++--- milena/mln/labeling/relabel.hh | 71 ++++++++++++--------- milena/mln/labeling/superpose.hh | 5 +- milena/mln/labeling/value.hh | 24 ++++--- milena/mln/labeling/value_and_compute.hh | 22 ++++--- milena/mln/labeling/wrap.hh | 35 ++++++---- 17 files changed, 314 insertions(+), 201 deletions(-) create mode 100644 milena/doc/mln/labeling/labeling.dox diff --git a/milena/ChangeLog b/milena/ChangeLog index 706b503..3275cd1 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,28 @@ 2013-04-17 Guillaume Lazzara <z@lrde.epita.fr> + Add labeling module in documentation. + + * doc/mln/labeling/labeling.dox: New. Introduce labeling module. + + * mln/labeling/background.hh, + * mln/labeling/colorize.hh, + * mln/labeling/compute.hh, + * mln/labeling/compute_image.hh, + * mln/labeling/flat_zones.hh, + * mln/labeling/foreground.hh, + * mln/labeling/mean_values.hh, + * mln/labeling/pack.hh, + * mln/labeling/regional_maxima.hh, + * mln/labeling/regional_minima.hh, + * mln/labeling/relabel.hh, + * mln/labeling/superpose.hh, + * mln/labeling/value.hh, + * mln/labeling/value_and_compute.hh, + * mln/labeling/wrap.hh: Set documentation as part of the labeling + group. + +2013-04-17 Guillaume Lazzara <z@lrde.epita.fr> + Add documentation for mln_concrete and mln_ch_value. * mln/trait/ch_value.hh, diff --git a/milena/doc/mln/labeling/labeling.dox b/milena/doc/mln/labeling/labeling.dox new file mode 100644 index 0000000..c0b09c4 --- /dev/null +++ b/milena/doc/mln/labeling/labeling.dox @@ -0,0 +1,6 @@ +/*! \defgroup labeling Image Labeling + * + * \brief All labeling routines provided in Milena. + * + * \ingroup modroutines + */ diff --git a/milena/mln/labeling/background.hh b/milena/mln/labeling/background.hh index 7441504..b60dbb2 100644 --- a/milena/mln/labeling/background.hh +++ b/milena/mln/labeling/background.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -54,6 +55,7 @@ namespace mln * value set to \c false. * * \see mln::labeling::value + * \ingroup labeling */ template <typename I, typename N, typename L> mln_ch_value(I, L) diff --git a/milena/mln/labeling/colorize.hh b/milena/mln/labeling/colorize.hh index 52a76fd..1e39e78 100644 --- a/milena/mln/labeling/colorize.hh +++ b/milena/mln/labeling/colorize.hh @@ -57,17 +57,19 @@ namespace mln } - /// Create a new color image from a labeled image and fill each component - /// with a random color. - /*! - * litera::black is used for component 0, e.g. the background. - * Min and max values for RGB values can be set through the global - * variables mln::labeling::colorize_::min_value and - * mln::labeling::colorize_::max_value. - * - * \param[in] value value type used in the returned image. - * \param[in] labeled_image A labeled image (\sa labeling::blobs). - * \param[in] nlabels Number of labels. + /*! \brief Create a new color image from a labeled image and fill each component + with a random color. + + litera::black is used for component 0, e.g. the background. + Min and max values for RGB values can be set through the global + variables mln::labeling::colorize_::min_value and + mln::labeling::colorize_::max_value. + + \param[in] value value type used in the returned image. + \param[in] labeled_image A labeled image (\sa labeling::blobs). + \param[in] nlabels Number of labels. + + \ingroup labeling */ template <typename V, typename L> mln_ch_value(L, V) @@ -76,16 +78,26 @@ namespace mln const mln_value(L)& nlabels); - /// \overload - // + /*! \overload + The number of labels is re-computed. + + \warning Computing the number of labels shall add extra + computation time. + + \ingroup labeling + */ template <typename V, typename L> mln_ch_value(L, V) colorize(const V& value, const Image<L>& labeled_image); - /// \overload - // + /*! \overload + + Colorize labeled image with value::rgb8. + + \ingroup labeling + */ template <typename L> mln_ch_value(L, mln::value::rgb8) colorize(const Image<L>& input, diff --git a/milena/mln/labeling/compute.hh b/milena/mln/labeling/compute.hh index cc4c234..cd7d727 100644 --- a/milena/mln/labeling/compute.hh +++ b/milena/mln/labeling/compute.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2008, 2009, 2010, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2008, 2009, 2010, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -60,15 +60,17 @@ namespace mln namespace labeling { - /// Compute an accumulator onto the pixel values of the image \p input. - /// for each component of the image \p label. - /// - /// \param[in] a An accumulator. - /// \param[in] input The input image. - /// \param[in] label The labeled image. - /// \param[in] nlabels The number of labels in \p label. - /// \return A util::array of accumulator result (one result per label). - // + /*! \brief Compute an accumulator onto the pixel values of the image \p input. + for each component of the image \p label. + + \param[in] a An accumulator. + \param[in] input The input image. + \param[in] label The labeled image. + \param[in] nlabels The number of labels in \p label. + \return A util::array of accumulator result (one result per label). + + \ingroup labeling + */ template <typename A, typename I, typename L> util::array<mln_result(A)> compute(const Accumulator<A>& a, @@ -77,15 +79,17 @@ namespace mln const mln_value(L)& nlabels); - /// Compute an accumulator onto the pixel values of the image \p input. - /// for each component of the image \p label. - /// - /// \param[in] a A meta-accumulator. - /// \param[in] input The input image. - /// \param[in] label The labeled image. - /// \param[in] nlabels The number of labels in \p label. - /// \return A util::array of accumulator result (one result per label). - // + /*! \brief Compute an accumulator onto the pixel values of the image \p input. + for each component of the image \p label. + + \param[in] a A meta-accumulator. + \param[in] input The input image. + \param[in] label The labeled image. + \param[in] nlabels The number of labels in \p label. + \return A util::array of accumulator result (one result per label). + + \ingroup labeling + */ template <typename A, typename I, typename L> util::array<mln_meta_accu_result(A, mln_value(I))> compute(const Meta_Accumulator<A>& a, @@ -94,14 +98,16 @@ namespace mln const mln_value(L)& nlabels); - /// Compute an accumulator onto the pixel sites of each component domain of - /// \p label. - /// - /// \param[in] a An accumulator. - /// \param[in] label The labeled image. - /// \param[in] nlabels The number of labels in \p label. - /// \return A util::array of accumulator result (one result per label). - // + /*! Compute an accumulator onto the pixel sites of each component domain of + \p label. + + \param[in] a An accumulator. + \param[in] label The labeled image. + \param[in] nlabels The number of labels in \p label. + \return A util::array of accumulator result (one result per label). + + \ingroup labeling + */ template <typename A, typename L> util::array<mln_result(A)> compute(const Accumulator<A>& a, @@ -109,14 +115,16 @@ namespace mln const mln_value(L)& nlabels); - /// Compute an accumulator onto the pixel sites of each component domain of - /// \p label. - /// - /// \param[in] a A meta-accumulator. - /// \param[in] label The labeled image. - /// \param[in] nlabels The number of labels in \p label. - /// \return A util::array of accumulator result (one result per label). - // + /*! \brief Compute an accumulator onto the pixel sites of each component domain of + \p label. + + \param[in] a A meta-accumulator. + \param[in] label The labeled image. + \param[in] nlabels The number of labels in \p label. + \return A util::array of accumulator result (one result per label). + + \ingroup labeling + */ template <typename A, typename L> util::array<mln_meta_accu_result(A, mln_psite(L))> compute(const Meta_Accumulator<A>& a, @@ -124,15 +132,17 @@ namespace mln const mln_value(L)& nlabels); - /// Compute an accumulator onto the pixel values of the image \p input. - /// for each component of the image \p label. - /// - /// \param[in] a An array of accumulator. - /// \param[in] input The input image. - /// \param[in] label The labeled image. - /// \param[in] nlabels The number of labels in \p label. - /// \return A util::array of accumulator result (one result per label). - // + /*! \brief Compute an accumulator onto the pixel values of the image \p input. + for each component of the image \p label. + + \param[in] a An array of accumulator. + \param[in] input The input image. + \param[in] label The labeled image. + \param[in] nlabels The number of labels in \p label. + \return A util::array of accumulator result (one result per label). + + \ingroup labeling + */ template <typename A, typename I, typename L> util::array<mln_result(A)> compute(util::array<A>& a, diff --git a/milena/mln/labeling/compute_image.hh b/milena/mln/labeling/compute_image.hh index 4baea29..6de1d88 100644 --- a/milena/mln/labeling/compute_image.hh +++ b/milena/mln/labeling/compute_image.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -49,16 +50,19 @@ namespace mln namespace labeling { - /// Compute an accumulator onto the pixel values of the image \p input. - /// for each component of the image \p label. - /// - /// \param[in] a The mln::p_array of accumulator result. - /// \param[in] input The input image (values). - /// \param[in] labels The label image. - /// \param[in] nlabels The count of labels. - /// - /// \return The image where labels are replaced by the result of - /// the accumulator. + /*! Compute an accumulator onto the pixel values of the image \p input. + for each component of the image \p label. + + \param[in] a The mln::p_array of accumulator result. + \param[in] input The input image (values). + \param[in] labels The label image. + \param[in] nlabels The count of labels. + + \return The image where labels are replaced by the result of + the accumulator. + + \ingroup labeling + */ template <typename A, typename I, typename L> mln_ch_value(L, mln_result(A)) compute_image(const util::array<mln_result(A)>& a, @@ -66,17 +70,19 @@ namespace mln const Image<L>& labels, const mln_value(L)& nlabels); - /// Compute an accumulator onto the pixel values of the image \p input. - /// for each component of the image \p label. - /// - /// \param[in] accu The accumulator. - /// \param[in] input The input image (values). - /// \param[in] labels The label image. - /// \param[in] nlabels The count of labels. - /// - /// \return The image where labels are replaced by the result of - /// the accumulator. - /// + /*! \brief Compute an accumulator onto the pixel values of the + image \p input. for each component of the image \p label. + + \param[in] accu The accumulator. + \param[in] input The input image (values). + \param[in] labels The label image. + \param[in] nlabels The count of labels. + + \return The image where labels are replaced by the result of + the accumulator. + + \ingroup labeling + */ template <typename A, typename I, typename L> inline mln_ch_value(L, mln_result(A)) @@ -86,17 +92,19 @@ namespace mln const mln_value(L)& nlabels); - /// Compute an accumulator onto the pixel values of the image \p input. - /// for each component of the image \p label. - /// - /// \param[in] accu The meta-accumulator. - /// \param[in] input The input image (values). - /// \param[in] labels The label image. - /// \param[in] nlabels The count of labels. - /// - /// \return The image where labels are replaced by the result of - /// the accumulator. - /// + /*! \brief Compute an accumulator onto the pixel values of the + image \p input. for each component of the image \p label. + + \param[in] accu The meta-accumulator. + \param[in] input The input image (values). + \param[in] labels The label image. + \param[in] nlabels The count of labels. + + \return The image where labels are replaced by the result of + the accumulator. + + \ingroup labeling + */ template <typename A, typename I, typename L> inline mln_ch_value(L, mln_meta_accu_result(A, mln_value(I))) diff --git a/milena/mln/labeling/flat_zones.hh b/milena/mln/labeling/flat_zones.hh index 683a17d..2d32eb4 100644 --- a/milena/mln/labeling/flat_zones.hh +++ b/milena/mln/labeling/flat_zones.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and +// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2013 EPITA Research and // Development Laboratory (LRDE) // // This file is part of Olena. @@ -42,13 +42,15 @@ namespace mln namespace labeling { - /// Connected component labeling of the flat zones of an image. - /// - /// \param[in] input The input image. - /// \param[in] nbh The connexity of the flat zones. - /// \param[out] nlabels The number of labels. - /// \return The label image. - /// + /*! \brief Connected component labeling of the flat zones of an image. + + \param[in] input The input image. + \param[in] nbh The connexity of the flat zones. + \param[out] nlabels The number of labels. + \return The label image. + + \ingroup labeling + */ template <typename I, typename N, typename L> mln_ch_value(I, L) flat_zones(const Image<I>& input, const Neighborhood<N>& nbh, diff --git a/milena/mln/labeling/foreground.hh b/milena/mln/labeling/foreground.hh index cb9c891..06bc148 100644 --- a/milena/mln/labeling/foreground.hh +++ b/milena/mln/labeling/foreground.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -40,8 +41,8 @@ namespace mln namespace labeling { - /*! Connected component labeling of the object part in a binary - * image. + /*! \brief Connected component labeling of the object part in a + * binary image. * * \param[in] input The input image. * \param[in] nbh The connexity of the foreground. @@ -54,6 +55,7 @@ namespace mln * value set to \c true. * * \see mln::labeling::value + * \ingroup labeling */ template <typename I, typename N, typename L> mln_ch_value(I, L) diff --git a/milena/mln/labeling/mean_values.hh b/milena/mln/labeling/mean_values.hh index b8cef49..6bb4cd0 100644 --- a/milena/mln/labeling/mean_values.hh +++ b/milena/mln/labeling/mean_values.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -60,6 +61,14 @@ namespace mln namespace labeling { + /*! \brief Construct an image of mean values from a labeled image. + + \param[in] input An image. + \param[in] lbl A labeled image. + \param[in] nlabels The number of computed labels. + + \ingroup labeling + */ template <typename I, typename L> mln_concrete(I) mean_colors(const Image<I>& input, diff --git a/milena/mln/labeling/pack.hh b/milena/mln/labeling/pack.hh index 999f129..1f10ef8 100644 --- a/milena/mln/labeling/pack.hh +++ b/milena/mln/labeling/pack.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -48,21 +49,34 @@ namespace mln namespace labeling { - /// Relabel a labeled image in order to have a contiguous labeling. - /// - /// \param[in] label The labeled image. - /// \param[out] new_nlabels The number of labels after relabeling. - /// \param[out] repack_fun The function used to repack the labels. - /// - /// \return The relabeled image. - // + /*! \brief Relabel a labeled image in order to have a contiguous + labeling. + + \param[in] label The labeled image. + \param[out] new_nlabels The number of labels after relabeling. + \param[out] repack_fun The function used to repack the labels. + + \return The relabeled image. + + \ingroup labeling + */ template <typename I> mln_concrete(I) pack(const Image<I>& label, mln_value(I)& new_nlabels, fun::i2v::array<mln_value(I)>& repack_fun); - /// \overload + /*! \overload + + Rely on a default relabeling function that guaranty contiguous + labeling. + + \warning Don't expect any label from \p label to be preserved. + + \sa make::relabelfun + + \ingroup labeling + */ template <typename I> mln_concrete(I) pack(const Image<I>& label, mln_value(I)& new_nlabels); diff --git a/milena/mln/labeling/regional_maxima.hh b/milena/mln/labeling/regional_maxima.hh index 568fde8..da2a4c3 100644 --- a/milena/mln/labeling/regional_maxima.hh +++ b/milena/mln/labeling/regional_maxima.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -44,14 +44,15 @@ namespace mln namespace labeling { - /*! Connected component labeling of the regional maxima of an - * image. - * - * \param[in] input The input image. - * \param[in] nbh The connexity of the regional maxima. - * \param[out] nlabels The number of labeled regions. - * \return The label image. - * + /*! \brief Connected component labeling of the regional maxima of an + image. + + \param[in] input The input image. + \param[in] nbh The connexity of the regional maxima. + \param[out] nlabels The number of labeled regions. + \return The label image. + + \ingroup labeling */ template <typename I, typename N, typename L> mln_ch_value(I, L) diff --git a/milena/mln/labeling/regional_minima.hh b/milena/mln/labeling/regional_minima.hh index 5a6271e..ffc4de6 100644 --- a/milena/mln/labeling/regional_minima.hh +++ b/milena/mln/labeling/regional_minima.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -44,14 +44,15 @@ namespace mln namespace labeling { - /*! Connected component labeling of the regional minima of an - * image. - * - * \param[in] input The input image. - * \param[in] nbh The connexity of the regional minima. - * \param[out] nlabels The number of labeled regions. - * \return The label image. - * + /*! \brief Connected component labeling of the regional minima of + an image. + + \param[in] input The input image. + \param[in] nbh The connexity of the regional minima. + \param[out] nlabels The number of labeled regions. + \return The label image. + + \ingroup labeling */ template <typename I, typename N, typename L> mln_ch_value(I, L) diff --git a/milena/mln/labeling/relabel.hh b/milena/mln/labeling/relabel.hh index 7f304ee..1683e7d 100644 --- a/milena/mln/labeling/relabel.hh +++ b/milena/mln/labeling/relabel.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2008, 2009, 2010 EPITA Research and Development +// Copyright (C) 2008, 2009, 2010, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -47,15 +47,18 @@ namespace mln namespace labeling { - /// Remove components and relabel a labeled image. - /// \param[in] label the labeled image. - /// \param[in] nlabels the number of labels in \p label. - /// \param[out] new_nlabels the number of labels after relabeling. - /// \param[in] fv2b function returning whether a label must be replaced - /// by the background. - /// - /// \return the relabeled image. - // + /*! \brief Remove components and relabel a labeled image. + + \param[in] label the labeled image. + \param[in] nlabels the number of labels in \p label. + \param[out] new_nlabels the number of labels after relabeling. + \param[in] fv2b function returning whether a label must be replaced + by the background. + + \return the relabeled image. + + \ingroup labeling + */ template <typename I, typename F> mln_concrete(I) relabel(const Image<I>& label, @@ -64,14 +67,16 @@ namespace mln const Function_v2b<F>& fv2b); - /// Remove components and relabel a labeled image. - /// \param[in] label the labeled image. - /// \param[in] nlabels the number of labels in \p label. - /// \param[in] fv2v function returning the new component id for each pixel - /// value. - /// - /// \return the relabeled image. - // + /*! \brief Remove components and relabel a labeled image. + + \param[in] label the labeled image. + \param[in] nlabels the number of labels in \p label. + \param[in] fv2v function returning the new component id for each pixel + value. + + \return the relabeled image. + \ingroup labeling + */ template <typename I, typename F> mln_concrete(I) relabel(const Image<I>& label, @@ -79,12 +84,15 @@ namespace mln const Function_v2v<F>& fv2v); - /// Remove components and relabel a labeled image inplace. - /// \param[in, out] label the labeled image. - /// \param[in] nlabels the number of labels in \p label. - /// \param[in] fv2b function returning whether a label must be replaced - /// by the background. - // + /*! \brief Remove components and relabel a labeled image inplace. + + \param[in, out] label the labeled image. + \param[in] nlabels the number of labels in \p label. + \param[in] fv2b function returning whether a label must be replaced + by the background. + + \ingroup labeling + */ template <typename I, typename F> void relabel_inplace(Image<I>& label, @@ -92,12 +100,15 @@ namespace mln const Function_v2b<F>& fv2b); - /// Remove components and relabel a labeled image inplace. - /// \param[in, out] label the labeled image. - /// \param[in] nlabels the number of labels in \p label. - /// \param[in] fv2v function returning the new component id for each - /// pixel value. - // + /*! \brief Remove components and relabel a labeled image inplace. + + \param[in, out] label the labeled image. + \param[in] nlabels the number of labels in \p label. + \param[in] fv2v function returning the new component id for each + pixel value. + + \ingroup labeling + */ template <typename I, typename F> void relabel_inplace(Image<I>& label, diff --git a/milena/mln/labeling/superpose.hh b/milena/mln/labeling/superpose.hh index 641b4bb..2b4a7d7 100644 --- a/milena/mln/labeling/superpose.hh +++ b/milena/mln/labeling/superpose.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2009, 2010, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -66,6 +66,7 @@ namespace mln @pre \p rhs and lhs must have the same domain. @pre \p The value type of rhs must be convertible towards lhs's. + \ingroup labeling */ template <typename I, typename J> mln_concrete(I) diff --git a/milena/mln/labeling/value.hh b/milena/mln/labeling/value.hh index 069b2a1..6a60ee5 100644 --- a/milena/mln/labeling/value.hh +++ b/milena/mln/labeling/value.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2010, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -44,15 +44,17 @@ namespace mln namespace labeling { - /// \brief Connected component labeling of the image sites at a given - /// value. - /// - /// \param[in] input The input image. - /// \param[in] val The value to consider. - /// \param[in] nbh The connectivity of components. - /// \param[out] nlabels The number of labels. - /// \return The label image. - // + /*! \brief Connected component labeling of the image sites at a + given value. + + \param[in] input The input image. + \param[in] val The value to consider. + \param[in] nbh The connectivity of components. + \param[out] nlabels The number of labels. + \return The label image. + + \ingroup labeling + */ template <typename I, typename N, typename L> mln_ch_value(I, L) value(const Image<I>& input, const mln_value(I)& val, diff --git a/milena/mln/labeling/value_and_compute.hh b/milena/mln/labeling/value_and_compute.hh index 4619e1a..913d571 100644 --- a/milena/mln/labeling/value_and_compute.hh +++ b/milena/mln/labeling/value_and_compute.hh @@ -46,16 +46,18 @@ namespace mln namespace labeling { - /// \brief Connected component labeling of the image sites at a given - /// value. - /// - /// \param[in] input The input image. - /// \param[in] val The value to consider. - /// \param[in] nbh The connectivity of components. - /// \param[out] nlabels The number of labels. - /// \param[in] accu The accumulator to be computed. - /// \return The label image. - // + /*! \brief Connected component labeling of the image sites at a given + value. + + \param[in] input The input image. + \param[in] val The value to consider. + \param[in] nbh The connectivity of components. + \param[out] nlabels The number of labels. + \param[in] accu The accumulator to be computed. + \return The label image. + + \ingroup labeling + */ template <typename I, typename N, typename L, typename A> util::couple<mln_ch_value(I,L), util::couple<util::array<mln_result(A)>, diff --git a/milena/mln/labeling/wrap.hh b/milena/mln/labeling/wrap.hh index 76426f2..1c5b64f 100644 --- a/milena/mln/labeling/wrap.hh +++ b/milena/mln/labeling/wrap.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -45,23 +46,29 @@ namespace mln namespace labeling { - /// Wrap labels such as 0 -> 0 and [1, lmax] maps to [1, - /// Lmax] (using modulus). - /// - /// \param[in] value_type The type used to wrap the label type. - /// \param[in] input The label image. - /// - /// \return A new image with values wrapped with type V. + /*! \brief Wrap labels such as 0 -> 0 and [1, lmax] maps to [1, + Lmax] (using modulus). + + \param[in] value_type The type used to wrap the label type. + \param[in] input The label image. + + \return A new image with values wrapped with type V. + + \ingroup labeling + */ template <typename V, typename I> mln_ch_value(I,V) wrap(const V& value_type, const Image<I>& input); - /// Wrap labels such as 0 -> 0 and [1, lmax] maps to [1, - /// Lmax] (using modulus). Use label_8 as label type. - /// - /// \param[in] input The label image. - /// - /// \return A new image with values wrapped with type label_8. + /*! \brief Wrap labels such as 0 -> 0 and [1, lmax] maps to [1, + Lmax] (using modulus). Use label_8 as label type. + + \param[in] input The label image. + + \return A new image with values wrapped with type label_8. + + \ingroup labeling + */ template <typename I> mln_ch_value(I, mln::value::label_8) wrap(const Image<I>& input); -- 1.7.2.5