Classes | |
class | buffer |
Buffer used for MD5 data type abstraction. More... | |
struct | hist_traits |
Traits for oln::utils::abstract::histogram hierarchy. More... | |
struct | hist_traits< histogram< T, CPT, V2P, Exact > > |
Traits for oln::utils::abstract::histogram hierarchy. More... | |
class | histogram |
struct | hist_traits< histogram_minmax< T, CPT, V2P, Exact > > |
class | histogram_minmax |
struct | hist_traits< histogram_min< T, CPT, V2P, Exact > > |
class | histogram_min |
struct | hist_traits< histogram_max< T, CPT, V2P, Exact > > |
class | histogram_max |
struct | select_distrib_sort |
struct | select_distrib_sort< true > |
class | key |
16 bytes key More... | |
class | MD5 |
Class used to compute a MD5 digest. More... | |
class | se_stat |
Compute the variance and the mean within a window. More... | |
struct | f_minmax |
Unary function that stores the min and the max. More... | |
struct | f_moments |
Computes the mean, the variance and store the min, the max. More... | |
class | timer |
Functions | |
template<class T> mlc::exact< T >::ret::value_type | min (const abstract::histogram< T > &hist) |
template<class T> mlc::exact< T >::ret::value_type | max (const abstract::histogram< T > &hist) |
template<typename T, typename CPT, class V2P, class Exact> T | min (histogram_minmax< T, CPT, V2P, Exact > &hist) |
Minimum non-zero value of an histogram. | |
template<typename T, typename CPT, class V2P, class Exact> T | min (histogram_min< T, CPT, V2P, Exact > &hist) |
Minimum non-zero value of an histogram. | |
template<typename T, typename CPT, class V2P, class Exact> T | max (histogram_minmax< T, CPT, V2P, Exact > &hist) |
Maximum non-zero value of an histogram. | |
template<typename T, typename CPT, class V2P, class Exact> T | max (histogram_max< T, CPT, V2P, Exact > &hist) |
Maximum non-zero value of an histogram. | |
template<class I> void | distrib_sort (const oln::abstract::image< I > &im, std::vector< typename mlc::exact< I >::ret::point_type > &v) |
template<class I> void | distrib_sort_inv (const oln::abstract::image< I > &im, std::vector< typename mlc::exact< I >::ret::point_type > &v) |
template<class I> key | md5 (const oln::abstract::non_vectorial_image< I > &im) |
Compute The Md5 value of an image. | |
template<class I> key | md5 (const oln::abstract::vectorial_image< I > &im) |
Compute The Md5 value of an image. |
|
Sort the values of an image, and store the result in a vector This sort is efficient.
Definition at line 676 of file histogram.hh. References oln::abstract::image< Exact >::npoints().
00678 { 00679 typedef oln_value_type(I) val; 00680 00681 typedef typename ntg_is_a(val, ntg::non_vectorial)::ensure_type 00682 ensure_type; 00683 00684 // check the size 00685 precondition(v.size() == im.npoints()); 00686 00687 // calculate the histogram of the image 00688 utils::histogram<val> histo(im); 00689 00690 // Initialize the array of pointer to the point in the result. 00691 // With the histogram the number of each color can be deduced and 00692 // then it calculates an array of pointer for quick access to each 00693 // value of the image. 00694 const ntg_cumul_type(val) card = ntg_max_val(val) 00695 - ntg_min_val(val) + 1; 00696 std::vector<oln_point_type(I)* > ptr(card); 00697 ptr[0] = &(v[0]); 00698 for (ntg_cumul_type(val) i = 1; i < card; ++i) 00699 ptr[i] = ptr[i - 1] + histo[i - 1 + ntg_min_val(val)]; 00700 00701 // Now iterate on the image to sort point in the order of their 00702 // level 00703 oln_iter_type(I) p(im); 00704 for_all(p) 00705 *(ptr[unsigned(im[p] - ntg_min_val(val))]++) = p; 00706 } |
|
Inverted sort of the values of an image, and store the result in a vector This sort is efficient.
Definition at line 719 of file histogram.hh. References oln::abstract::image< Exact >::npoints().
00721 { 00722 typedef oln_value_type(I) val; 00723 00724 typedef typename ntg_is_a(val, ntg::non_vectorial)::ensure_type 00725 ensure_type; 00726 00727 precondition(v.size() == im.npoints()); 00728 00729 utils::histogram<val> histo(im); 00730 00731 const ntg_cumul_type(val) card = ntg_max_val(val) 00732 - ntg_min_val(val) + 1; 00733 std::vector<oln_point_type(I)* > ptr(card); 00734 ptr[card - 1] = &(v[0]); 00735 00736 for (ntg_signed_cumul_type(val) i = card - 2; i >= 0; --i) 00737 ptr[i] = ptr[i + 1] + histo[i + 1 + ntg_min_val(val)]; 00738 00739 oln_iter_type(I) p(im); 00740 for_all(p) 00741 *(ptr[unsigned(im[p] - ntg_min_val(val))]++) = p; 00742 } |
|
Maximum value of an histogram. Return the higher value within the image used to build the histogram.
Definition at line 330 of file histogram.hh.
00331 { 00332 typedef typename ntg_is_a(oln_value_type(T), 00333 ntg::non_vectorial)::ensure_type ensure_type; 00334 00335 oln_value_type(T) i; 00336 for (i = ntg_max_val(oln_value_type(T)); 00337 i != ntg_min_val(oln_value_type(T)); 00338 i = ntg::pred(i)) 00339 if (hist[i] > ntg_zero_val(oln_cpt_type(T))) 00340 break; 00341 return i; 00342 } |
|
Compute The Md5 value of an image.
|
|
Compute The Md5 value of an image.
|
|
Minimum value of an histogram. Return the smaller value within the image used to build the histogram.
Definition at line 305 of file histogram.hh.
00306 { 00307 typedef typename ntg_is_a(oln_value_type(T), 00308 ntg::non_vectorial)::ensure_type ensure_type; 00309 00310 oln_value_type(T) i; 00311 for (i = ntg_min_val(oln_value_type(T)); 00312 i != ntg_max_val(oln_value_type(T)); 00313 i = ntg::succ(i)) 00314 if (hist[i] > ntg_zero_val(oln_cpt_type(T))) 00315 break; 00316 return i; 00317 } |