classPiiImage::DropFunction
#include <PiiThresholding.h>
DropFunction
compares value to a threshold and outputs
either value - threshold or 0 based on
the comparison result.
Inherits Pii::BinaryFunction< T, T, U >
Description
The function "drops" gray levels above a threshold to zero. 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::DropFunction<int>(), threshold); // mat = 0 0 0 0 0 1 2 3 4
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.