classPiiSpectralPeakDetector
#include <PiiSpectralPeakDetector.h>
Find repeating components in textures.
Inherits PiiDefaultOperation
Description
This operation uses the FFT to find repeating components in a surface texture. It computes the locations of the peaks and the wavelengths and orientations of the corresponding waves in the image.
Inputs
Outputs
Properties
|
double
|
The maximum wavelength accepted (in pixels). |
|
double
|
The minimum wavelength accepted (in pixels). |
|
double
|
Detection threshold. |
Constructors and destructor
Public member functions
|
virtual void
|
(
Checks the operation for execution. |
|
double
|
( )
|
|
double
|
( )
|
|
double
|
( )
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
Protected member functions
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
double maxWaveLength
[read, write]The maximum wavelength accepted (in pixels).
Use this and the minWaveLength property to control the range of accepted wavelengths. Frequency components outside of the accepted range will be ignored. The default value is infinity.
-
double minWaveLength
[read, write]The minimum wavelength accepted (in pixels).
Use this and the maxWaveLength property to control the range of accepted wavelengths. Frequency components outside of the accepted range will be ignored. The default value is 0.
-
double peakThreshold
[read, write]Detection threshold.
Assume
is the power spectrum
of the input image whose size is
. The threshold
is compared to the normalized square
root of the power spectrum, and a peaks must match the following
rule:
The default value is 0.4.
Function details
-
PiiSpectralPeakDetector
() -
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.
-
double maxWaveLength
() -
double minWaveLength
() -
double peakThreshold
() -
void setMaxWaveLength
(- double maxWaveLength
-
void setMinWaveLength
(- double minWaveLength
-
void setPeakThreshold
(- double peakThreshold
-
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.