Namespace of image processing routines related to pixel data. More...
Namespaces | |
| namespace | approx |
Namespace of image processing routines related to pixel levels with approximation. | |
| namespace | impl |
Implementation namespace of data namespace. | |
| namespace | internal |
| namespace | naive |
Namespace of image processing routines related to pixel levels with naive approach. | |
Functions | |
| template<typename I , typename O > | |
| void | abs (const Image< I > &input, Image< O > &output) |
| template<typename I > | |
| void | abs_inplace (Image< I > &input) |
| template<typename I , typename F > | |
| void | apply (Image< I > &input, const Function_v2v< F > &f) |
| template<typename A , typename I > | |
| A::result | compute (const Accumulator< A > &a, const Image< I > &input) |
Compute an accumulator onto the pixel values of the image input. | |
| template<typename V , typename I > | |
| mln::trait::ch_value< I, V >::ret | convert (const V &v, const Image< I > &input) |
Convert the image input by changing the value type. | |
| template<typename I , typename W , typename O > | |
| void | fast_median (const Image< I > &input, const Window< W > &win, Image< O > &output) |
| template<typename I , typename D > | |
| void | fill (Image< I > &ima, const D &data) |
| template<typename I , typename J > | |
| void | fill_with_image (Image< I > &ima, const Image< J > &data) |
Fill the image ima with the values of the image data. | |
| template<typename I , typename W > | |
| mln::trait::concrete< I >::ret | median (const Image< I > &input, const Window< W > &win) |
| template<typename Pd , typename Ps > | |
| void | memcpy_ (Generalized_Pixel< Pd > &dest, const Generalized_Pixel< Ps > &src, std::size_t n) |
| template<typename P > | |
| void | memset_ (Generalized_Pixel< P > &pix, const typename P::value &v, std::size_t n) |
| template<typename I > | |
| void | memset_ (I &input, const typename I::psite &p, const typename I::value &v, std::size_t n) |
| template<typename A , typename I > | |
| mln_meta_accu_result (A, typename I::value) compute(const Meta_Accumulator< A > &a | |
Compute an accumulator onto the pixel values of the image input. | |
| template<typename I , typename J > | |
| void | paste (const Image< I > &input, Image< J > &output) |
Paste the contents of image input into the image output. | |
| template<typename I , typename J > | |
| void | paste_without_localization (const Image< I > &input, Image< J > &output) |
Paste the contents of image input into the image output without taking into account the localization of sites. | |
| template<typename I > | |
| void | replace (Image< I > &input, const typename I::value &old_value, const typename I::value &new_value) |
| template<typename V , typename I > | |
| mln::trait::ch_value< I, V >::ret | saturate (V v, const Image< I > &input) |
| template<typename I , typename V > | |
| mln::trait::ch_value< I, V >::ret | saturate (const Image< I > &input, const V &min, const V &max) |
| template<typename I > | |
| void | saturate_inplace (Image< I > &input, const typename I::value &min, const typename I::value &max) |
| template<typename I > | |
| util::array< unsigned > | sort_offsets_decreasing (const Image< I > &input) |
| template<typename I > | |
| util::array< unsigned > | sort_offsets_increasing (const Image< I > &input) |
Sort pixel offsets of the image input wrt increasing pixel values. | |
| template<typename I > | |
| p_array< typename I::psite > | sort_psites_decreasing (const Image< I > &input) |
| template<typename I > | |
| p_array< typename I::psite > | sort_psites_increasing (const Image< I > &input) |
| template<typename V , typename I > | |
| mln::trait::ch_value< I, V >::ret | stretch (const V &v, const Image< I > &input) |
| template<typename I , typename O > | |
| void | to_enc (const Image< I > &input, Image< O > &output) |
| template<typename I1 , typename I2 , typename F > | |
| mln::trait::ch_value< I1, typename F::result >::ret | transform (const Image< I1 > &input1, const Image< I2 > &input2, const Function_vv2v< F > &f) |
| template<typename I , typename F > | |
| mln::trait::ch_value< I, typename F::result >::ret | transform (const Image< I > &input, const Function_v2v< F > &f) |
| template<typename I1 , typename I2 , typename F > | |
| void | transform_inplace (Image< I1 > &ima, const Image< I2 > &aux, const Function_vv2v< F > &f) |
| template<typename I , typename F > | |
| void | transform_inplace (Image< I > &ima, const Function_v2v< F > &f) |
| template<typename A , typename I > | |
| A::result | update (Accumulator< A > &a, const Image< I > &input) |
| template<typename I , typename V > | |
| void | fill_with_value (Image< I > &ima, const V &val) |
Fill the whole image ima with the single value v. | |
Variables | |
| const Image< I > & | input |
Namespace of image processing routines related to pixel data.
| void mln::data::abs | ( | const Image< I > & | input, | |
| Image< O > & | output | |||
| ) | [inline] |
Apply the absolute value (abs) function to image pixel values.
| [in] | input | The input image. |
| [out] | output | The output image. |
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and transform().
| void mln::data::abs_inplace | ( | Image< I > & | input | ) | [inline] |
Apply the absolute value (abs) function to image pixel values.
| [in,out] | input | The input image. |
References apply(), mln::trace::entering(), mln::exact(), and mln::trace::exiting().
| void mln::data::apply | ( | Image< I > & | input, | |
| const Function_v2v< F > & | f | |||
| ) | [inline] |
Apply a function-object to the image input.
| [in,out] | input | The input image. |
| [in] | f | The function-object. |
This routine runs:
for all p of input, input(p) = f( input(p) )
This routine is equivalent to data::tranform(input, f, input) but it is faster since a single iterator is required.
References mln::trace::entering(), mln::exact(), and mln::trace::exiting().
Referenced by abs_inplace(), mln::chck(), and saturate_inplace().
| A::result mln::data::compute | ( | const Accumulator< A > & | a, | |
| const Image< I > & | input | |||
| ) | [inline] |
Compute an accumulator onto the pixel values of the image input.
| [in] | a | An accumulator. |
| [in] | input | The input image. |
It fully relies on data::update.
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::data::internal::update_dispatch(), and mln::data::internal::update_tests().
Referenced by mln::chk1d(), mln::chk2d(), mln::chk3d(), mln::labeled_image< I >::init_(), mln::estim::mean(), mln::estim::min_max(), mln::data::impl::sort_offsets_decreasing_radix(), mln::data::impl::sort_offsets_increasing_radix(), mln::data::impl::sort_psites_decreasing_(), mln::data::impl::sort_psites_increasing_(), and mln::estim::sum().
| mln::trait::ch_value< I, V >::ret mln::data::convert | ( | const V & | v, | |
| const Image< I > & | input | |||
| ) | [inline] |
Convert the image input by changing the value type.
| [in] | v | A value of the destination type. |
| [in] | input | The input image. |
References mln::data::internal::convert_dispatch(), mln::data::internal::convert_tests(), mln::trace::entering(), and mln::trace::exiting().
Referenced by mln::data::internal::convert_dispatch(), mln::world::binary_2d::subsample(), mln::morpho::watershed::superpose(), and mln::debug::superpose().
| void mln::data::fast_median | ( | const Image< I > & | input, | |
| const Window< W > & | win, | |||
| Image< O > & | output | |||
| ) | [inline] |
Compute in output the median filter of image input by the window win.
| [in] | input | The image to be filtered. |
| [in] | win | The window. |
| [in,out] | output | The output image. |
input and output have to be initialized. References mln::exact(), and mln::data::impl::fast_median().
| void mln::data::fill | ( | Image< I > & | ima, | |
| const D & | data | |||
| ) | [inline] |
Fill the whole image ima with the data provided by aux.
| [in,out] | ima | The image to be filled. |
| [in] | data | The auxiliary data to fill the image ima. |
ima has to be initialized. References mln::trace::entering(), mln::trace::exiting(), mln::data::internal::fill_dispatch(), and mln::data::internal::fill_tests().
Referenced by mln::canvas::morpho::impl::generic::attribute_filter(), mln::canvas::morpho::impl::attribute_filter_fastest(), mln::labeling::impl::generic::blobs_(), mln::chck(), mln::util::internal::adjacency_matrix_impl_selector< V, Q >::clear(), mln::morpho::tree::internal::compute_attribute_image(), mln::morpho::tree::impl::generic::compute_parent(), mln::topo::skeleton::crest(), mln::topo::detach(), mln::util::display_branch(), mln::world::inter_pixel::display_edge(), mln::util::impl::display_set(), mln::registration::display_sites_used_in_icp(), mln::transform::distance_and_closest_point_geodesic(), mln::canvas::impl::generic::distance_front(), mln::canvas::impl::distance_front_fastest(), mln::canvas::impl::generic::distance_geodesic(), mln::canvas::impl::distance_geodesic_fastest(), mln::registration::draw_last_run(), mln::duplicate(), mln::labeling::fill_holes(), mln::morpho::tree::filter::filter(), mln::morpho::watershed::impl::generic::flooding(), mln::morpho::watershed::impl::flooding_fastest(), mln::convert::impl::from_site_set_to_image(), mln::morpho::elementary::impl::gradient_on_set(), mln::morpho::impl::generic::hit_or_miss(), mln::transform::hough(), mln::registration::icp(), mln::labeling::impl::regional_minima_functor< I >::init(), mln::labeling::impl::regional_maxima_functor< I >::init(), mln::registration::closest_point_with_map< P >::init(), mln::transform::internal::closest_point_functor_with_sites< I >::init(), mln::transform::internal::closest_point_functor_with_indexes< I >::init(), mln::old_canvas::labeling< F >::init(), mln::labeling::impl::regional_minima_functor< I >::init_(), mln::labeling::impl::regional_maxima_functor< I >::init_(), mln::graph::labeling(), mln::canvas::impl::generic::labeling(), mln::canvas::impl::labeling_sorted_fastest(), mln::canvas::impl::labeling_video_fastest(), mln::morpho::laplacian(), mln::morpho::elementary::impl::generic::like_ero_set(), mln::morpho::elementary::impl::like_ero_set_fastest(), mln::make_debug_graph_image(), mln::world::inter_pixel::dim2::make_edge_image(), mln::morpho::tree::filter::max(), mln::geom::mesh_corner_point_area(), mln::geom::mesh_normal(), mln::morpho::meyer_wst(), mln::morpho::tree::filter::min(), mln::my_algorithm(), mln::world::binary_2d::projected_histo(), mln::morpho::tree::internal::propagate_if(), mln::make::impl::generic::rag_and_labeled_wsl(), mln::morpho::impl::Rd< I, N >::Rd(), mln::registration::remove_too_far_sites(), mln::registration::remove_too_far_sites_debug(), mln::data::impl::generic::replace_(), mln::morpho::skeleton_constrained(), mln::debug::slices_2d(), mln::morpho::watershed::superpose(), mln::debug::superpose(), mln::morpho::reconstruction::by_erosion::impl::generic::union_find(), and mln::morpho::reconstruction::by_dilation::impl::generic::union_find().
| void mln::data::fill_with_image | ( | Image< I > & | ima, | |
| const Image< J > & | data | |||
| ) | [inline] |
Fill the image ima with the values of the image data.
| [in,out] | ima | The image to be filled. |
| [in] | data | The image. |
ima has to be included in the one of data.ima.domain <= data.domain. References mln::trace::entering(), and mln::trace::exiting().
Referenced by mln::data::internal::fill_dispatch_overload().
| void mln::data::fill_with_value | ( | Image< I > & | ima, | |
| const V & | val | |||
| ) | [inline] |
Fill the whole image ima with the single value v.
| [in,out] | ima | The image to be filled. |
| [in] | val | The value to assign to all sites. |
ima has to be initialized. References mln::trace::entering(), mln::trace::exiting(), and mln::data::internal::fill_with_value_tests().
Referenced by mln::p_image< I >::clear(), and mln::data::internal::fill_dispatch_overload().
| mln::trait::concrete< I >::ret mln::data::median | ( | const Image< I > & | input, | |
| const Window< W > & | win | |||
| ) |
Compute in output the median filter of image input by the window win.
| [in] | input | The image to be filtered. |
| [in] | win | The window. |
input have to be initialized. References mln::trace::entering(), mln::trace::exiting(), mln::data::internal::median_dispatch(), and mln::data::internal::median_tests().
Referenced by mln::data::internal::median_dispatch_wrt_win().
| void mln::data::memcpy_ | ( | Generalized_Pixel< Pd > & | dest, | |
| const Generalized_Pixel< Ps > & | src, | |||
| std::size_t | n | |||
| ) | [inline] |
Copy n pixels starting from pixel src to destination starting from pixel dest.
| [in,out] | dest | The destination pixel (to set values). |
| [in] | src | The source pixel (to get values). |
| [in] | n | The number of pixels to copy. |
src has to be initialized. dest has to be initialized. src and dest image values have to own the same sizeof. dest pixel has to be on dest image domain. src pixel has to be on src image domain. dest + n has to be on dest image domain. src + n has to be on src image domain. References mln::opt::element(), mln::data::impl::memcpy__(), and mln::opt::nelements().
| void mln::data::memset_ | ( | Generalized_Pixel< P > & | pix, | |
| const typename P::value & | v, | |||
| std::size_t | n | |||
| ) | [inline] |
Set n pixels at value v starting from pixel p.
| [in,out] | pix | The first pixel to set. |
| [in] | v | The value to set pixels with. |
| [in] | n | The number of pixels to set. |
pix image has to be initialized. pix has to be on pix image domain. pix + n has to be on pix image domain. References mln::trace::entering(), mln::trace::exiting(), mln::data::impl::memset__(), and mln::opt::nelements().
| void mln::data::memset_ | ( | I & | input, | |
| const typename I::psite & | p, | |||
| const typename I::value & | v, | |||
| std::size_t | n | |||
| ) | [inline] |
Set n points of image ima at value v starting from point p.
| [in,out] | input | The image. |
| [in] | p | The first point to set. |
| [in] | v | The value to set to points. |
| [in] | n | The number of points to set. |
input image has to be initialized. input has to own p. p + n is <= input size. References mln::trace::entering(), mln::trace::exiting(), mln::data::impl::memset__(), and mln::opt::nelements().
| mln::data::mln_meta_accu_result | ( | A | , | |
| typename I::value | ||||
| ) | const [inline] |
Compute an accumulator onto the pixel values of the image input.
| [in] | a | A meta-accumulator. |
| [in] | input | The input image. |
| void mln::data::paste | ( | const Image< I > & | input, | |
| Image< J > & | output | |||
| ) | [inline] |
Paste the contents of image input into the image output.
| [in] | input | The input image providing pixels values. |
| [in,out] | output | The image in which values are assigned. |
This routine runs:
for all p of input, output(p) = input(p).
input has to be included in the one of output; so using mln::safe_image does not make pasting outside the output domain work.input.domain <= output.domain References mln::trace::entering(), mln::trace::exiting(), and mln::data::internal::paste_tests().
Referenced by mln::linear::gaussian::impl::generic_filter_common_(), mln::linear::impl::generic_filter_common_(), mln::make::image3d(), mln::draw::line(), mln::draw::plot(), mln::geom::rotate(), and mln::debug::slices_2d().
| void mln::data::paste_without_localization | ( | const Image< I > & | input, | |
| Image< J > & | output | |||
| ) | [inline] |
Paste the contents of image input into the image output without taking into account the localization of sites.
| [in] | input | The input image providing pixels values. |
| [in,out] | output | The image in which values are assigned. |
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and input.
Referenced by mln::world::inter_pixel::full2image(), and mln::world::inter_pixel::immerse().
| void mln::data::replace | ( | Image< I > & | input, | |
| const typename I::value & | old_value, | |||
| const typename I::value & | new_value | |||
| ) |
Replace old_value by new_value in the image input
| [in] | input | The input image. |
| [in] | old_value | The value to be replaced... |
| [in] | new_value | ...by this one. |
References mln::trace::entering(), mln::exact(), and mln::trace::exiting().
| mln::trait::ch_value< I, V >::ret mln::data::saturate | ( | const Image< I > & | input, | |
| const V & | min, | |||
| const V & | max | |||
| ) | [inline] |
Apply the saturate function to image pixel values.
| [in] | input | The input image. |
| [in] | min | The minimum output value. |
| [in] | max | The maximum output value. |
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and transform().
| mln::trait::ch_value< I, V >::ret mln::data::saturate | ( | V | v, | |
| const Image< I > & | input | |||
| ) | [inline] |
Apply the saturate function to image pixel values.
| [in] | v | A value of the output type. |
| [in] | input | The input image. |
The saturation is based on the min and max values of the output value type. This assumes that the range of values in the input image is larger than the one of the output image.
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and transform().
| void mln::data::saturate_inplace | ( | Image< I > & | input, | |
| const typename I::value & | min, | |||
| const typename I::value & | max | |||
| ) | [inline] |
Apply the saturate function to image pixel values.
| [in,out] | input | The input image. |
| [in] | min | The minimum output value. |
| [in] | max | The maximum output value |
References apply(), mln::trace::entering(), mln::exact(), and mln::trace::exiting().
| util::array<unsigned> mln::data::sort_offsets_decreasing | ( | const Image< I > & | input | ) | [inline] |
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::data::internal::sort_offsets_decreasing_dispatch().
Referenced by mln::canvas::morpho::internal::attribute_filter_dispatch(), mln::canvas::internal::labeling_sorted_dispatch(), and mln::data::internal::sort_offsets_decreasing_dispatch().
| util::array< unsigned > mln::data::sort_offsets_increasing | ( | const Image< I > & | input | ) | [inline] |
Sort pixel offsets of the image input wrt increasing pixel values.
References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::data::internal::sort_offsets_increasing_dispatch().
Referenced by mln::canvas::morpho::internal::attribute_filter_dispatch(), mln::canvas::internal::labeling_sorted_dispatch(), and mln::data::internal::sort_offsets_increasing_dispatch().
| p_array< typename I::psite > mln::data::sort_psites_decreasing | ( | const Image< I > & | input | ) | [inline] |
Sort psites the image input through a function f to set the output image in decreasing way.
| [in] | input | The input image. |
input.is_valid References mln::exact(), and mln::data::impl::sort_psites_decreasing_().
Referenced by mln::canvas::morpho::internal::attribute_filter_dispatch(), mln::canvas::internal::labeling_sorted_dispatch(), and mln::morpho::reconstruction::by_dilation::impl::generic::union_find().
| p_array< typename I::psite > mln::data::sort_psites_increasing | ( | const Image< I > & | input | ) | [inline] |
Sort psites the image input through a function f to set the output image in increasing way.
| [in] | input | The input image. |
input.is_valid References mln::exact(), and mln::data::impl::sort_psites_increasing_().
Referenced by mln::canvas::morpho::internal::attribute_filter_dispatch(), mln::canvas::internal::labeling_sorted_dispatch(), mln::morpho::tree::max(), and mln::morpho::reconstruction::by_erosion::impl::generic::union_find().
| mln::trait::ch_value< I, V >::ret mln::data::stretch | ( | const V & | v, | |
| const Image< I > & | input | |||
| ) | [inline] |
Stretch the values of input so that they can be stored in output.
| [in] | v | A value to set the output value type. |
| [in] | input | The input image. |
v.References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::data::impl::stretch().
Referenced by mln::chck(), mln::linear::gaussian::impl::generic_filter_common_(), and mln::linear::impl::generic_filter_common_().
| void mln::data::to_enc | ( | const Image< I > & | input, | |
| Image< O > & | output | |||
| ) | [inline] |
Set the output image with the encoding values of the image input pixels.
| [in] | input | The input image. |
| [out] | output | The result image. |
output.domain >= input.domain References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and transform().
| mln::trait::ch_value< I, typename F::result >::ret mln::data::transform | ( | const Image< I > & | input, | |
| const Function_v2v< F > & | f | |||
| ) | [inline] |
Transform the image input through a function f.
| [in] | input | The input image. |
| [in] | f | The function. |
This routine runs:
for all p of input, output(p) = f( input(p) ).
References mln::trace::entering(), mln::trace::exiting(), and mln::data::internal::transform_tests().
Referenced by abs(), mln::logical::and_(), mln::logical::and_not(), mln::binarization::impl::binarization_(), mln::chck(), mln::labeling::colorize(), mln::arith::diff_abs(), mln::world::binary_2d::impl::do_enlarge_bool(), mln::labeling::impl::generic::mean_values(), mln::labeling::impl::mean_values_rgb(), mln::linear::mln_ch_convolve(), mln::linear::mln_ch_convolve_grad(), mln::logical::not_(), mln::logical::or_(), mln::labeling::pack(), mln::labeling::pack_inplace(), mln::labeling::relabel(), saturate(), mln::data::impl::stretch(), to_enc(), mln::labeling::wrap(), and mln::logical::xor_().
| mln::trait::ch_value< I1, typename F::result >::ret mln::data::transform | ( | const Image< I1 > & | input1, | |
| const Image< I2 > & | input2, | |||
| const Function_vv2v< F > & | f | |||
| ) | [inline] |
Transform two images input1 input2 through a function f.
| [in] | input1 | The 1st input image. |
| [in] | input2 | The 2nd input image. |
| [in] | f | The function. |
This routine runs:
for all p of input, output(p) = f( input1(p), input2(p) ).
References mln::trace::entering(), mln::trace::exiting(), and mln::data::internal::transform_tests().
| void mln::data::transform_inplace | ( | Image< I > & | ima, | |
| const Function_v2v< F > & | f | |||
| ) |
Transform inplace the image ima through a function f.
| [in,out] | ima | The image to be transformed. |
| [in] | f | The function. |
This routine runs:
for all p of ima, ima(p) = f( ima(p) ).
References mln::trace::entering(), mln::trace::exiting(), mln::data::internal::transform_inplace_dispatch(), and mln::data::internal::transform_inplace_tests().
Referenced by mln::logical::and_inplace(), mln::logical::and_not_inplace(), mln::logical::not_inplace(), mln::logical::or_inplace(), mln::labeling::relabel_inplace(), mln::data::internal::transform_inplace_dispatch(), and mln::logical::xor_inplace().
| void mln::data::transform_inplace | ( | Image< I1 > & | ima, | |
| const Image< I2 > & | aux, | |||
| const Function_vv2v< F > & | f | |||
| ) |
Transform inplace the image ima with the image aux through a function f.
| [in] | ima | The image to be transformed. |
| [in] | aux | The auxiliary image. |
| [in] | f | The function. |
This routine runs:
for all p of ima, ima(p) = f( ima(p), aux(p) ).
References mln::trace::entering(), mln::trace::exiting(), mln::data::internal::transform_inplace_dispatch(), and mln::data::internal::transform_inplace_tests().
| A::result mln::data::update | ( | Accumulator< A > & | a, | |
| const Image< I > & | input | |||
| ) | [inline] |
Update an accumulator with the pixel values of the image input.
| [in] | a | The accumulator. |
| [in] | input | The input image. |
References mln::trace::entering(), mln::trace::exiting(), mln::data::internal::update_dispatch(), and mln::data::internal::update_tests().
Referenced by mln::data::internal::update_dispatch().
| const Image<I>& mln::data::input |
Referenced by mln::data::impl::generic::apply_(), mln::data::impl::generic::paste(), paste_without_localization(), mln::data::impl::generic::sort_offsets_decreasing(), mln::data::impl::sort_offsets_decreasing_radix(), mln::data::impl::generic::sort_offsets_increasing(), mln::data::impl::sort_offsets_increasing_radix(), mln::data::impl::sort_psites_decreasing_(), mln::data::impl::sort_psites_increasing_(), mln::data::impl::generic::transform(), mln::data::impl::transform_inplace_fastest_lowq(), mln::data::impl::transform_inplace_lowq(), mln::data::impl::transform_inplace_singleton(), mln::data::impl::transform_inplace_taken(), and mln::data::impl::generic::update().
1.7.1