00001 #ifndef vepl1_threshold_h_ 00002 #define vepl1_threshold_h_ 00003 //: 00004 // \file 00005 // \brief set pixel to given value if above/below certain threshold 00006 // 00007 // This class actually implements two threshold operations, namely the 00008 // `classical' single threshold mapping where pixel values not larger than 00009 // T are mapped to L, values larger than T to H; and the `clipping' 00010 // operation where only pixel values below T are mapped to L, the others 00011 // left unchanged. 00012 // 00013 // For the first version, the constructor must be given three parameters: 00014 // T, L and H. For the second version, two parameters: T and L. 00015 // In the second situation, there clearly must be an implicit conversion 00016 // from DataIn to DataOut. Note that this is not necessary in the 00017 // first situation, because all output pixels will be either L or H. 00018 // 00019 // Note that the input image data type must support "operator<=()"; thus 00020 // thresholding of colour images makes no sense (unless you define a 00021 // sensible "<=" for RGB triples). 00022 // 00023 // \author Peter Vanroose, K.U.Leuven (ESAT/PSI) 00024 // \date 28 April 2001 00025 00026 #include <vil1/vil1_image.h> 00027 00028 //: set pixel to given value if above/below certain threshold 00029 vil1_image vepl1_threshold(vil1_image const& , double threshold=128.0, double below=1.0, double above=0.0); 00030 00031 #endif // vepl1_threshold_h_