Classes | |
struct | bound |
struct | cast |
struct | convoutput |
struct | force |
struct | f_nrgb_to_xyz |
struct | f_xyz_to_nrgb |
struct | f_rgb_to_hsi |
struct | f_hsi_to_rgb |
struct | f_rgb_to_hsl |
struct | f_hsl_to_rgb |
struct | f_rgb_to_hsv |
struct | f_hsv_to_rgb |
struct | f_rgb_to_nrgb |
struct | f_nrgb_to_rgb |
struct | f_rgb_to_xyz |
struct | f_xyz_to_rgb |
struct | f_rgb_to_yiq |
struct | f_yiq_to_rgb |
struct | f_rgb_to_yuv |
struct | f_yuv_to_rgb |
struct | stretch |
struct | value_to_point |
struct | value_to_point::doit_binary |
Convert a binary to a point. More... | |
struct | value_to_point::doit_not_binary |
Convert a non vectorial to a point. More... | |
struct | value_to_point< ntg::color< 3, Qbits, S >, Exact > |
Functions | |
template<class C, class B, class UF> internal::compconv1_< C, UF > | compconv1 (const abstract::conversion< C, B > &conv, const UF &func) |
template<class C, class B, class BF> internal::compconv2_< C, BF > | compconv2 (const abstract::conversion< C, B > &conv, const BF &func) |
template<class C, class B, class I> mute< I, typename convoutput< C, B, typename mlc::exact< I >::ret::value_type >::ret >::ret | apply (const abstract::conversion< C, B > &conv, const oln::abstract::image< I > &input) |
template<class N> oln::abstract::neighborhood< N >::win_type | ng_to_se (const oln::abstract::neighborhood< N > &Ng) |
template<class N> oln::abstract::neighborhood< N >::win_type | ng_to_cse (const oln::abstract::neighborhood< N > &Ng) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, xyz_traits > | nrgb_to_xyz (const color< 3, inbits, nrgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, nrgb_traits > | xyz_to_nrgb (const color< 3, inbits, xyz_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, hsi_traits > | rgb_to_hsi (const color< 3, inbits, rgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, rgb_traits > | hsi_to_rgb (const color< 3, inbits, hsi_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, inbits, hsl_traits > | rgb_to_hsl (const color< 3, outbits, rgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, rgb_traits > | hsl_to_rgb (const color< 3, inbits, hsl_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, hsv_traits > | rgb_to_hsv (const color< 3, inbits, rgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, rgb_traits > | hsv_to_rgb (const color< 3, inbits, hsv_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, nrgb_traits > | rgb_to_nrgb (const color< 3, inbits, rgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, rgb_traits > | nrgb_to_rgb (const color< 3, inbits, nrgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, xyz_traits > | rgb_to_xyz (const color< 3, inbits, rgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, rgb_traits > | xyz_to_rgb (const color< 3, outbits, xyz_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, yiq_traits > | rgb_to_yiq (const color< 3, inbits, rgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, rgb_traits > | yiq_to_rgb (const color< 3, inbits, yiq_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, yuv_traits > | rgb_to_yuv (const color< 3, inbits, rgb_traits > &v) |
template<unsigned inbits, unsigned outbits> color< 3, outbits, rgb_traits > | yuv_to_rgb (const color< 3, inbits, yuv_traits > &v) |
template<class DestValue, class I> mute< I, DestValue >::ret | stretch_balance (const oln::abstract::non_vectorial_image< I > &in, const typename mlc::exact< I >::ret::value_type &min_in=ntg::type_traits< typename mlc::exact< I >::ret::value_type >::min(), const typename mlc::exact< I >::ret::value_type &max_in=ntg::type_traits< typename mlc::exact< I >::ret::value_type >::max(), const DestValue &min_out=ntg::type_traits< DestValue >::min(), const DestValue &max_out=ntg::type_traits< DestValue >::max()) |
Variables | |
const float | sqrt3_3 = sqrt(3) / 3 |
const float | inv_sqrt6 = 1 / sqrt(6) |
const float | inv_sqrt2 = 1 / sqrt(2) |
|
Apply function that retrive the result type within the conversion class. The core oln::apply function, cannot apply all conversion function, because they do not all define result_type. So we define another apply function here, to apply conversions. Definition at line 141 of file conversion.hh. References compconv1().
|
|
Friendly procedure that build an internal::compconv1_ with type deduction. Definition at line 119 of file conversion.hh. Referenced by apply().
00120 {
00121 return internal::compconv1_<C, UF>(conv.exact(), func);
00122 }
|
|
Likewise for compconv2_. Definition at line 127 of file conversion.hh.
00128 {
00129 return internal::compconv2_<C, BF>(conv.exact(), func);
00130 }
|
|
Conversion from HSI to RGB color space.
Definition at line 143 of file rgbhsi.hh.
00144 {
00145 f_hsi_to_rgb<inbits, outbits> f;
00146
00147 return f(v);
00148 }
|
|
Conversion from HSL to RGB color space.
Definition at line 217 of file rgbhsl.hh.
00218 {
00219 f_hsl_to_rgb<inbits, outbits> f;
00220 return f(v);
00221 }
|
|
Conversion from HSV to RGB.
Definition at line 195 of file rgbhsv.hh.
00196 {
00197 f_hsv_to_rgb<inbits, outbits> f;
00198 return f(v);
00199 }
|
|
Convert a neighborhood to a window and add the center.
Definition at line 64 of file conversion_ng_se.hh. References oln::abstract::neighborhood< Exact >::add().
00065 { 00066 typename oln::abstract::neighborhood<N>::win_type output; 00067 oln_iter_type(N) p(Ng); 00068 for_all(p) 00069 output.add(p); 00070 oln_dpoint_type(N) zero; 00071 for (unsigned size = 0; size < N::dim; ++size) 00072 zero.nth(size) = 0; 00073 output.add(zero); 00074 return output; 00075 } |
|
Convert a neighborhood to a window.
Definition at line 49 of file conversion_ng_se.hh. References oln::abstract::neighborhood< Exact >::add().
00050 { 00051 typename oln::abstract::neighborhood<N>::win_type output; 00052 oln_iter_type(N) p(Ng); 00053 for_all(p) 00054 output.add(p); 00055 return output; 00056 } |
|
Conversion from N-RGB to RGB.
Definition at line 135 of file rgbnrgb.hh.
00136 {
00137 f_nrgb_to_rgb<inbits, outbits> f;
00138
00139 return f(v);
00140 }
|
|
Conversion from N-RGB to XYZ color space.
Definition at line 121 of file nrgbxyz.hh.
00122 {
00123 f_nrgb_to_xyz<inbits, outbits> f;
00124
00125 return f(v);
00126 }
|
|
Conversion from RGB to HSI color space.
Definition at line 98 of file rgbhsi.hh.
00099 {
00100 f_rgb_to_hsi<inbits, outbits> f;
00101
00102 return f(v);
00103 }
|
|
Conversion from RGB to HSL color space.
Definition at line 142 of file rgbhsl.hh.
00143 {
00144 f_rgb_to_hsl<inbits, outbits> f;
00145 return f(v);
00146 }
|
|
Conversion from RGB to HSV.
Definition at line 111 of file rgbhsv.hh.
00112 {
00113 f_rgb_to_hsv<inbits, outbits> f;
00114 return f(v);
00115 }
|
|
Conversion from RGB to N-RGB.
Definition at line 90 of file rgbnrgb.hh.
00091 {
00092 f_rgb_to_nrgb<inbits, outbits> f;
00093
00094 return f(v);
00095 }
|
|
Stretch the value of an image. This function stretches values between min_in and max_in of an image in, to a range that goes from min_out to max_out.
This function is useful to stretch images of label:
![]() ![]() ![]() Definition at line 166 of file stretch.hh. References oln::abstract::image< Exact >::size().
00173 { 00174 typedef typename 00175 ntg_is_a(DestValue, ntg::non_vectorial)::ensure_type ensure_type; 00176 00177 typename mute<I, DestValue>::ret out(in.size()); 00178 00179 //FIXME: I would like to remove the static_cast. 00180 std::vector<ntg_cumul_type(DestValue)> 00181 tab(static_cast<int>(max_in - min_in + 1)); 00182 typedef typename std::set<oln_value_type(I)> set_type; 00183 set_type s; 00184 oln_iter_type(I) it(in); 00185 00186 for_all(it) 00187 if (in[it] <= max_in && in[it] >= min_in) 00188 s.insert(in[it]); 00189 if (s.size() == 1) 00190 { 00191 for_all(it) 00192 out[it] = ntg_zero_val(DestValue); 00193 return out; 00194 } 00195 { 00196 unsigned cpt = 0; 00197 for (typename set_type::const_iterator it(s.begin()); 00198 it != s.end(); ++it, ++cpt) 00199 tab[*it - min_in] = cpt * (max_out - min_out) / (s.size() - 1); 00200 } 00201 for_all(it) 00202 if (min_in <= in[it]) 00203 { 00204 if (in[it] <= max_in) 00205 out[it] = tab[in[it] - min_in] + min_out; 00206 else 00207 out[it] = max_out; 00208 } 00209 else 00210 out[it] = min_out; 00211 return out; 00212 } |
|
Conversion from XYZ to N-RGB color space.
Definition at line 171 of file nrgbxyz.hh.
00172 {
00173 f_xyz_to_nrgb<inbits, outbits> f;
00174
00175 return f(v);
00176 }
|