classPiiFeatureRangeLimiter
#include <PiiFeatureRangeLimiter.h>
Operation cuts features from feature-vectors by using the first one as a reference.
Inherits PiiDefaultOperation
Description
Each input is a matrix in which each row represents the features calculated for an object. The first input must be a N-by-1 matrix. Each value in this matrix is evaluated, and if the value is not within the allowed range, the row will be removed. At the same time, the corresponding rows of all other input matrices are removed as well. The truncated matrices are sent to the output.
Inputs
Outputs
// First input: PiiMatrix<int> feature0(3,1, 1, 2, 4); // three rows // Second input: PiiMatrix<float> feature1(3,2, 0.1, 0.2, 1.3, 1.4, 2.5, 3.6); // First output: PiiMatrix<int> feature0(1,1, 2); // only one row // Second output: PiiMatrix<float> feature1(1,2, 1.3, 1.4); // ditto
Properties
|
int
|
The number of inputs. |
|
double
|
Lower limit of the acceptance range. |
|
double
|
Upper limit of the acceptance range. |
Constructors and destructor
Public member functions
|
int
|
|
|
double
|
( )
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
double
|
( )
|
Protected member functions
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
int dynamicInputCount
[read, write]The number of inputs.
Must be greater than zero.
-
double lowerLimit
[read, write]Lower limit of the acceptance range.
-
double upperLimit
[read, write]Upper limit of the acceptance range.
Function details
-
PiiFeatureRangeLimiter
() -
int dynamicInputCount
() -
double lowerLimit
() -
void setDynamicInputCount
(- int cnt
-
void setLowerLimit
(- double lowerLimit
-
void setUpperLimit
(- double upperLimit
-
double upperLimit
() -
virtual void process
()[protected, virtual]Executes one round of processing.
This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.
Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().
Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns
Running.Exceptions
- PiiExecutionException
-
whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.
Reimplemented from PiiDefaultOperation.
Add a note
Not a single note added yet. Be the first, add yours.