classPiiImage::ZeroBelowFunction
#include <PiiThresholding.h>
ZeroBelowFunction
compares value to a threshold and outputs
either value or 0 based on the comparison result.
Inherits Pii::BinaryFunction< T, T, U >
Description
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::ZeroBelowFunction<int>(), threshold); // mat = 0 0 0 0 5 6 7 8 9
Public member functions
|
U
|
(
|
Function details
-
U operator()
(- T value
- T threshold
[inline]
Add a note
Not a single note added yet. Be the first, add yours.