Into

Modules

Documentation

classPiiColorCorrelogramOperation

#include <PiiColorCorrelogramOperation.h>

Calculate the color autocorrelogram of an image.

Inherits PiiDefaultOperation

Description

See PiiColors::autoCorrelogram() for details.

Inputs

imageany color image or an indexed image. If a color image is received, it will be converted to an indexed image. See levels.

Outputs

correlogramthe autocorrelogram. A PiiMatrix<float>.

Properties

QVariantList

The distances for which the color correlogram will be calculated.

int

The number of quantization levels per each color channel for color indexing.

bool

A flag that controls quantization of color channels input.

Constructors and destructor

Public member functions

virtual void
(
  • bool reset
)

Checks the operation for execution.

QVariantList
int
( )
bool
void
(
  • const QVariantList & distances
)
void
(
  • int levels
)
void
(
  • bool quantize
)

Protected member functions

virtual void

Executes one round of processing.

Property details

  • QVariantList distances

    [read, write]

    The distances for which the color correlogram will be calculated.

    The default is 1,3,5,7.

  • int levels

    [read, write]

    The number of quantization levels per each color channel for color indexing.

    Color indices for RGB images are calculated as specified in PiiColors::toIndexed(). The default value is 4. If the quantize flag is true, color channels are quantized to this many levels before calculating the correlogram. If the quantize flag is false, color channel values greater than or equal to levels will be ignored.

  • bool quantize

    [read, write]

    A flag that controls quantization of color channels input.

    If this flag is true (the default), color channels will be quantized to the specified number of discrete levels. If the flag is false, color channels are assumed to be quantized beforehand to the specified number of levels.

Function details

  • PiiColorCorrelogramOperation

    ()
  • ~PiiColorCorrelogramOperation

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

  • QVariantList distances

    ()
  • int levels

    ()
  • bool quantize

    ()
  • void setDistances

    (
    • const QVariantList & distances
    )
  • void setLevels

    (
    • int levels
    )
  • void setQuantize

    (
    • bool quantize
    )
  • 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.