Into

Modules

Documentation

classPiiGrayFeatureOperation

#include <PiiGrayFeatureOperation.h>

Extracts a configurable set of simple gray-level features from images.

Inherits PiiDefaultOperation

Description

Inputs

imageinput image. Any gray-level image.

Outputs

featuresextracted features. (1xN PiiMatrix<float>)

Classes

class
class
class
class
class
class
class
class
class

Properties

Enabled features.

double

Reference gray value.

Constructors and destructor

Public member functions

virtual void
(
  • bool reset
)

Checks the operation for execution.

QList< int >
double
void
( )
void
(
  • double reference
)

Protected member functions

virtual void

Executes one round of processing.

Property details

  • QStringList features

    [read, write]

    Enabled features.

    List here all features you want to enable. Average, Minimum, and Maximum are enabled by default. If the list is empty, Minimum will be used.

    • Minimum - minimum gray level

    • Maximum - maximum gray level

    • Average - average gray level

    • Contrast - difference between maximum and minimum

    • MaxDiff - maximum absolute difference to the reference value (reference).

    • Variance - variance

    • Deviation - standard deviation

    • HighAverage - average of gray levels over the mean

    • LowAverage - average of gray levels below the mean

     pGrayFeatures->setProperty("features", QStringList() << "Average" << "Contrast");
    

    Independent of the order of feature names in this list, the order of features in the feature vector will be that listed above. If the list contains "MaxDiff" and "Minimum", in this order, the order of features in the resulting feature vector will be just the opposite.

  • double reference

    [read, write]

    Reference gray value.

    Maximum absolute difference is calculated by subtracting this value from each pixel. The default value is 127.

Function details

  • PiiGrayFeatureOperation

    ()
  • ~PiiGrayFeatureOperation

    ()
  • virtual void check

    (
    • bool reset
    )
    [virtual]

    Checks the operation for execution.

    This function creates a suitable flow controller by calling createFlowController(). It then sets the flow controller to the active processor and sets the processor as the input controller for all inputs.

    If you change socket groupings in your overridden implementation, please call PiiDefaultOperation::check() after that. Otherwise, your new groupings will not be in effect.

    Reimplemented from PiiDefaultOperation.

  • QList< int > enabledFeatures

    ()
  • QStringList features

    ()
  • double reference

    ()
  • void setFeatures

    ( )
  • void setReference

    (
    • double reference
    )
  • 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.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.