| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes
TePDIParaSegBaatzStrategy Class Reference
Algorithm strategies.

Multi-threaded image segmenter Region Growing strategy. More...

`#include <TePDIParaSegBaatzStrategy.hpp>`

Inheritance diagram for TePDIParaSegBaatzStrategy:

List of all members.

## Public Member Functions

| TePDIParaSegBaatzStrategy (const TePDIParaSegStrategyParams &params)
| ~TePDIParaSegBaatzStrategy ()
bool | execute (const RasterDataVecT &rasterDataVector, TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT &outSegsMatrix)
| Execute segmentation following the supplied strategy specific parameters.
bool | setParameters (const TePDIParameters &params)
| Set the specific strategy parameters.
bool | mergeSegments (TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT &centerMatrix, TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT *topMatrixPtr, TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT *leftMatrixPtr)
| Merge adjacent matrix border segments.
double | getMemUsageFactor () const
| Returns a positive memory use weight factor.

## Protected Attributes

TePDITypes::TePDIRasterPtrType | inputRasterPtr_
TePDITypes::TePDIRasterPtrType | outputRasterPtr_
TePDIParameters | segParams_
TePDIBaatz | segmenter_
double | eucTreshold_

## Detailed Description

Multi-threaded image segmenter Region Growing strategy.

Author:
  Thales Sehn Korting <tkorting@dpi.inpe.br>.

Note:
  The strategy name that must be used to construct an instance of this class is "Baatz".
  The general required parameters :

Parameters:

  scale | (float) Parameter scale is > 0 (Has direct influence over the generated segments size).
  compactness | (float) Parameter compactness is > 0 and <= 1 ( compactness = perimeter / sqrt( area ) ).
  color | (float) Parameter color is > 0 and <= 1 (the relative ratio between spacial components and spectral components).
  input_weights | (std::vector<float>) one weight for each input image channel
  euc_treshold | (double) - Maximum eclidean distance between each segment (This parameter is used to merge adjacent segments from adjacent image blocks).

## Constructor & Destructor Documentation

TePDIParaSegBaatzStrategy::TePDIParaSegBaatzStrategy | ( | const TePDIParaSegStrategyParams & | params | ) |

TePDIParaSegBaatzStrategy::~TePDIParaSegBaatzStrategy | ( |  | ) |

## Member Function Documentation

bool TePDIParaSegBaatzStrategy::execute | ( | const RasterDataVecT & | rasterDataVector,
|  | TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT & | outSegsMatrix
| ) |  | `[virtual]`

Execute segmentation following the supplied strategy specific parameters.

This method will be called many times as required to the same strategy instance to execute segmentation on each image block.

Parameters:

  rasterDataVector | The input raster data vector (each vector element represents one raster band/channel).
  outSegsMatrix | The generated output segments matrix.

Returns:
  true if OK, false on errors.

Note:
  The generated segments IDs must be acquired by using the TePDIParaSegStrategy::acquireNewSegID() method.
  The generated segments reference counters must be initiated with value 1.

Implements TePDIParaSegStrategy.

double TePDIParaSegBaatzStrategy::getMemUsageFactor | ( |  | ) | const`[inline, virtual]`

Returns a positive memory use weight factor.

This parameter is used by the parallel segmenter to guess the sub-image blocks size.

Returns:
  A memory use weight factor (default:1,0).

Implements TePDIParaSegStrategy.

bool TePDIParaSegBaatzStrategy::mergeSegments | ( | TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT & | centerMatrix,
|  | TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT * | topMatrixPtr,
|  | TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT * | leftMatrixPtr
| ) |  | `[virtual]`

Merge adjacent matrix border segments.

This method will be called many times as required to the same strategy instance to merge the entire label image incrementally; on each call references to 3 adjacent image segments blocks will be passed as shown ahead.

              ________________________________
              |     |     |      |     |     |
              ________________________________
              |     |     |top   |     |     |
              ________________________________
              |     |left |center|     |     |
              _______________________________
              |     |     |      |     |     |
              ________________________________

Parameters:

  centerMatrix | A reference to the image block matrix located at the merging region center.
  topMatrixPtr | A pointer to the image block matrix located at the merging region top or null if this block does not exists.
  leftMatrixPtr | A pointer to the image block matrix located at the merging region left or null if this block does not exists.

Returns:
  true if OK, false on errors.

Implements TePDIParaSegStrategy.

bool TePDIParaSegBaatzStrategy::setParameters | ( | const TePDIParameters & | params | ) | `[virtual]`

Set the specific strategy parameters.

This method will be called once for each strategy instance created.

Parameters:

  params | A reference to the new parameters.

Returns:
  true if OK, false on errors.

Implements TePDIParaSegStrategy.

## Member Data Documentation

double TePDIParaSegBaatzStrategy::eucTreshold_`[protected]`

Maximum allowed euclidean distance parameter

TePDITypes::TePDIRasterPtrType TePDIParaSegBaatzStrategy::inputRasterPtr_`[protected]`

A raster generated from the input raster data vector.

TePDITypes::TePDIRasterPtrType TePDIParaSegBaatzStrategy::outputRasterPtr_`[protected]`

A raster generated from the segmentation.

TePDIBaatz TePDIParaSegBaatzStrategy::segmenter_`[protected]`

Segmenter instance

TePDIParameters TePDIParaSegBaatzStrategy::segParams_`[protected]`

Segmentation algorithm parameters

The documentation for this class was generated from the following files:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIParaSegBaatzStrategy.hpp
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIParaSegBaatzStrategy.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines