classPiiBoundaryFinderOperation
#include <PiiBoundaryFinderOperation.h>
Extracts boundaries of connected objects in images.
Inherits PiiDefaultOperation
Description
Inputs
Outputs
image input.
limits will be
the 1-by-2 matrix (120, 210).
Properties
|
int
|
The maximum number of connected pixels allowed to form a boundary. |
|
int
|
The minimum number of connected pixels required to form a boundary. |
|
double
|
A static threshold for binarizing a gray-level input image. |
Constructors and destructor
Protected member functions
|
int
|
( )
|
|
int
|
( )
|
|
virtual void
|
( )
Executes one round of processing. |
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
double
|
( )
|
Property details
-
int maxLength
[read, write]The maximum number of connected pixels allowed to form a boundary.
If a detected boundary has more pixels, it will be discarded.
-
int minLength
[read, write]The minimum number of connected pixels required to form a boundary.
If a detected boundary has less pixels, it will be discarded.
-
double threshold
[read, write]A static threshold for binarizing a gray-level input image.
Every pixel in the image whose gray level is higher than
thresholdis taken to be part of an object. The default value is zero, which assumes a pre-binarized or labeled input image. Setting this value to a non-zero value may be useful in avoiding a separate thresholding step.
Function details
-
PiiBoundaryFinderOperation
() -
int maxLength
()[protected] -
int minLength
()[protected] -
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.
-
void setMaxLength
(- int maxLength
[protected] -
void setMinLength
(- int minLength
[protected] -
void setThreshold
(- double threshold
[protected] -
double threshold
()[protected]
Add a note
Not a single note added yet. Be the first, add yours.