Functions | |
template<class I, class I2, class N> oln::mute< I >::ret | minima_imposition (const abstract::non_vectorial_image< I > &input, const abstract::non_vectorial_image< I2 > &minima_map, const abstract::neighborhood< N > &Ng) |
Perform a minima imposition. | |
template<class I, class N> mute< I, ntg::bin >::ret | regional_minima (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng) |
Extract regional minima. | |
template<class I1, class I2, class N> oln::mute< I1 >::ret | geodesic_reconstruction_dilation (const abstract::non_vectorial_image< I1 > &marker, const abstract::non_vectorial_image< I2 > &mask, const abstract::neighborhood< N > &Ng) |
Perform a geodesic reconstruction dilation. | |
template<class I1, class I2, class N> oln::mute< I1 >::ret | geodesic_reconstruction_erosion (const abstract::non_vectorial_image< I1 > &marker, const abstract::non_vectorial_image< I2 > &mask, const abstract::neighborhood< N > &Ng) |
Perform a geodesic reconstruction erosion. |
|
Perform a geodesic reconstruction dilation. Compute the reconstruction by dilation of marker with respect to the mask image using se as structuring element. Soille p.160. The algorithm used is the one defined as hybrid in Vincent(1993), Morphological grayscale reconstruction in image analysis: applications and efficient algorithms, itip, 2(2), 176--201.
![]() ![]() Definition at line 284 of file reconstruction.hh. References oln::abstract::image< Exact >::clone(), oln::abstract::neighborhood< Exact >::delta(), oln::morpho::get_minus_se_p(), oln::morpho::get_plus_se_p(), and oln::abstract::image< Exact >::size().
00287 { 00288 mlc::eq<I1::dim, I2::dim>::ensure(); 00289 mlc::eq<I1::dim, N::dim>::ensure(); 00290 00291 precondition(marker.size() == mask.size()); 00292 precondition(level::is_greater_or_equal(mask, marker)); 00293 00294 oln_concrete_type(I1) output = marker.clone(); 00295 output.border_adapt_copy(Ng.delta()); 00296 { 00297 typedef typename abstract::neighborhood<N>::win_type E; 00298 E Ng_plus = get_plus_se_p(convert::ng_to_cse(Ng)); 00299 E Ng_minus = get_minus_se_p(convert::ng_to_cse(Ng)); 00300 typename I1::fwd_iter_type fwd_p(output); 00301 typename I1::bkd_iter_type bkd_p(output); 00302 for_all (fwd_p) 00303 output[fwd_p] = ntg::min(morpho::max(output, fwd_p, Ng_plus), 00304 mask[fwd_p]); 00305 00306 std::queue<oln_point_type(I1) > fifo; 00307 for_all (bkd_p) 00308 { 00309 output[bkd_p] = ntg::min(morpho::max(output, bkd_p, Ng_minus), 00310 mask[bkd_p]); 00311 if (internal::exist_init_dilation(bkd_p.cur(), output, mask, Ng_minus)) 00312 fifo.push(bkd_p); 00313 } 00314 // Propagation Step 00315 while (!fifo.empty()) 00316 { 00317 oln_point_type(I1) p = fifo.front(); 00318 fifo.pop(); 00319 oln_neighb_type(N) q(Ng, p); 00320 for_all (q) if (output.hold(q)) 00321 { 00322 if ((output[q] < output[p]) && (mask[q] != output[q])) 00323 { 00324 output[q] = ntg::min(output[p], mask[q]); 00325 fifo.push(q); 00326 } 00327 } 00328 } 00329 } 00330 return output; 00331 } |
|
Perform a geodesic reconstruction erosion. Compute the reconstruction by erosion of marker with respect to the mask mask image using se as structuring element. Soille p.160. The algorithm used is the one defined as hybrid in Vincent(1993), Morphological grayscale reconstruction in image analysis: applications and efficient algorithms, itip, 2(2), 176--201.
![]() ![]() Definition at line 574 of file reconstruction.hh. References oln::abstract::neighborhood< Exact >::delta(), oln::morpho::get_minus_se_p(), oln::morpho::get_plus_se_p(), and oln::abstract::image< Exact >::size().
00577 { 00578 mlc::eq<I1::dim, I2::dim>::ensure(); 00579 mlc::eq<I1::dim, N::dim>::ensure(); 00580 00581 precondition(marker.size() == mask.size()); 00582 precondition(level::is_greater_or_equal(marker, mask)); 00583 00584 oln_concrete_type(I1) output = marker.clone(); 00585 output.border_adapt_copy(Ng.delta()); 00586 { 00587 typedef typename abstract::neighborhood<N>::win_type E; 00588 E Ng_plus = get_plus_se_p(convert::ng_to_cse(Ng)); 00589 E Ng_minus = get_minus_se_p(convert::ng_to_cse(Ng)); 00590 typename I1::fwd_iter_type fwd_p(output); 00591 typename I1::bkd_iter_type bkd_p(output); 00592 for_all (fwd_p) 00593 output[fwd_p] = ntg::max(morpho::min(output, fwd_p, Ng_plus), 00594 mask[fwd_p]); 00595 00596 std::queue<oln_point_type(I1) > fifo; 00597 for_all (bkd_p) 00598 { 00599 output[bkd_p] = ntg::max(morpho::min(output, bkd_p, Ng_minus), 00600 mask[bkd_p]); 00601 if (internal::exist_init_erosion(bkd_p.cur(), output, mask, Ng_minus)) 00602 fifo.push(bkd_p); 00603 } 00604 // Propagation Step 00605 while (!fifo.empty()) 00606 { 00607 oln_point_type(I1) p = fifo.front(); 00608 fifo.pop(); 00609 oln_neighb_type(N) q(Ng, p); 00610 for_all (q) if (output.hold(q)) 00611 { 00612 if ((output[q] > output[p]) && (mask[q] != output[q])) 00613 { 00614 output[q] = ntg::max(output[p], mask[q]); 00615 fifo.push(q); 00616 } 00617 } 00618 } 00619 } 00620 return output; 00621 } |
|
Perform a minima imposition. Impose minima defined by minima_map on input using Ng as neighborhood. minima_map must be a bin image (true for a minimum, false for a non minimum). Soille p.172.
![]() ![]() ![]() Definition at line 547 of file extrema.hh. |
|
Extract regional minima.
![]() ![]() Definition at line 599 of file extrema.hh. |