classPiiImage::InverseThresholdFunction
#include <PiiThresholding.h>
InverseThresholdFunction compares two values and outputs either 0 or 1 based on the comparison result.
Inherits Pii::BinaryFunction< T, T, U >
Description
Works analogously to ThresholdFunction,
but outputs one if value is smaller than or equal to
threshold. You can use this struct for example with
PiiMatrix<T>::binaryOp():
int threshold = 5; PiiMatrix<int> mat(1,9,1,2,3,4,5,6,7,8,9); mat.binaryOp(PiiImage::InverseThresholdFunction<int>(), threshold); // mat = 1 1 1 1 0 0 0 0 0
Constructors and destructor
|
(
|
Public member functions
|
U
|
(
|
Function details
-
InverseThresholdFunction
(- U value = 1
[inline] -
U operator()
(- T value
- T threshold
[inline]
Add a note
Not a single note added yet. Be the first, add yours.