oln::level::threshold< Input, Output, Exact > Class Template Reference

Threshold the value of the image. More...

#include <threshold.hh>

Inheritance diagram for oln::level::threshold< Input, Output, Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::level::threshold< Input, Output, Exact >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 threshold (const Input &threshold, const Output &min=ntg::type_traits< Output >::min(), const Output &max=ntg::type_traits< Output >::max())
Output operator() (const Input &v) const

Static Public Member Functions

std::string name ()

Detailed Description

template<class Input, class Output, class Exact = mlc::final>
class oln::level::threshold< Input, Output, Exact >

Threshold the value of the image.

#include <oln/basics2d.hh> #include <oln/level/threshold.hh> #include <ntg/all.hh> using namespace ntg; int main() { oln::image2d<int_u8> in = oln::load(IMG_IN "lena256.pgm"); int_u8 th = 127; rgb_8 low = rgb_8(100, 0, 0); rgb_8 height = rgb_8(0, 200, 255); oln::image2d<rgb_8> out = apply(oln::level::threshold<int_u8, rgb_8 >(th, low, height), in); save(out, IMG_OUT "oln_level_threshold.ppm"); }
lena256_pgm.png
=>
oln_level_threshold.png

Definition at line 65 of file threshold.hh.


Constructor & Destructor Documentation

template<class Input, class Output, class Exact = mlc::final>
oln::level::threshold< Input, Output, Exact >::threshold const Input &  threshold,
const Output &  min = ntg::type_traits< Output >::min(),
const Output &  max = ntg::type_traits< Output >::max()
[inline]
 

  • Threshold any value heigher or equal to this value will return min.
  • min Value returned if the input is smaller than threshold.
  • max Value returned if the input is greater or equal to the threshold.

Definition at line 74 of file threshold.hh.

00076                                                          :
00077         m_threshold(threshold), m_min(min), m_max(max)
00078       {}


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 20:16:30 2004 for Olena by doxygen 1.3.6-20040222