13 #ifndef IMAGE_THRESHOLD_HPP
14 #define IMAGE_THRESHOLD_HPP
30 virtual double get(
int i,
int j,
int k)
const
32 if (
L->
get(i, j, k) > value)
38 virtual void tweak(
int a,
int v)
40 if (a == 0) value += 0.001 * v;
43 virtual void doc(std::ostream& out)
const
45 out <<
"threshold " << value;
virtual double get(int i, int j, int k) const =0
Return the value of the sample at row i, column j, channel k.
image * L
Left child.
Definition: image.hpp:117
Base class for all image sources, filters, and operators.
Definition: image.hpp:20
threshold(double value, image *L)
Compare the values of each sample of image L with value. Give 1 where L is greater than value and 0 e...
Definition: image_threshold.hpp:28
virtual void tweak(int a, int v)
Tweak image parameter a, changing the value by a factor of v.
Definition: image_threshold.hpp:38
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_threshold.hpp:43
Threshold filter.
Definition: image_threshold.hpp:20