25 #ifndef __TERRALIB_RP_INTERNAL_SEGMENTERREGIONGROWINGSTRATEGY_H
26 #define __TERRALIB_RP_INTERNAL_SEGMENTERREGIONGROWINGSTRATEGY_H
90 void reset() throw( te::rp::Exception );
93 AbstractParameters* clone() const;
103 throw( te::rp::Exception );
111 const te::rst::Raster& inputRaster,
112 const std::vector<
unsigned int >& inputRasterBands,
113 const std::vector<
double >& inputRasterGains,
114 const std::vector<
double >& inputRasterOffsets,
115 te::rst::Raster& outputRaster,
116 const
unsigned int outputRasterBand,
117 const
bool enableProgressInterface ) throw( te::rp::Exception );
120 double getMemUsageEstimation( const
unsigned int bandsToProcess,
121 const
unsigned int pixelsNumber ) const;
124 unsigned int getOptimalBlocksOverlapSize() const;
174 virtual ~SegmentFeatures();
181 virtual SegmentFeatures* clone()
const = 0;
243 SegmenterSegmentsBlock::SegmentIdDataType, Segment* >
397 virtual double getDissimilarityIndex(
409 Segment const *
const segment2Ptr,
415 virtual void update() = 0;
441 double getDissimilarityIndex(
448 Segment const *
const segmen2tPtr,
471 BaatzMerger(
const double& colorWeight,
const double& compactnessWeight,
472 const std::vector< double >& bandsWeights,
479 double getDissimilarityIndex(
486 Segment const *
const segmen2tPtr,
546 const std::vector< unsigned int >& inputRasterBands,
547 const std::vector< double >& inputRasterGains,
548 const std::vector< double >& inputRasterOffsets,
562 unsigned int mergeSegments(
563 const double similarityThreshold,
566 const bool enablelocalMutualBestFitting,
580 unsigned int mergeSmallSegments(
581 const unsigned int minSegmentSize,
593 bool normto8bits,
const std::string& fileName );
609 const unsigned int& xStart,
const unsigned int& yStart,
610 const unsigned int& xBound,
const unsigned int& yBound,
613 unsigned int& edgeLength1,
614 unsigned int& edgeLength2 );
639 #endif // __TERRALIB_RP_INTERNAL_ALGORITHM_H
double m_compactnessWeight
The weight given to the compactness component, deafult:0.5, valid range: [0,1].
std::vector< double > m_allSegsStdDevGain
The gains applied to normalize the standard deviation value.
Raster segmenter strategy parameters base class.
SegmentFeatures(const SegmenterRegionGrowingStrategy::SegmentFeatures &)
Baatz based segment features.
Raster region growing segmenter strategy.
A segment based on Baatz features values.
unsigned int m_xBound
Segment lower bound X coordinate box over the label image.
Segmenter segments block description class.
A segment based on pixel mean values.
SegmenterSegmentsPool & m_segmentsPool
unsigned int SegmentIdDataType
double m_compactnessWeight
The weight given to the compactness component, deafult:0.5, valid range: [0,1].
SegmenterSegmentsBlock::SegmentIdDataType m_id
Segment ID.
double m_allSegsSmoothnessGain
The gains applied to normalize the smoothness value.
std::vector< double > m_squaresSum
The sum of squares of pixel values (for each band).
double m_colorWeight
The weight given to the color component, deafult:0.5, valid range: [0,1].
MeanBasedSegment::SegmentFeatures m_features
std::vector< double > m_allSegsStdDevOffsets
The offsets applied to normalize the standard deviation value.
SegmenterSegmentsPool m_segmentsPool
A pool of segments that can be reused on each strategy execution.
std::list< Segment * > m_neighborSegments
Neighborhood segments.
unsigned int m_yStart
Segment upper Y coordinate box over the label image.
Internal segments indexer.
double m_allSegsCompactnessOffset
The offsets applied to normalize the compactness value.
double m_smoothness
Smoothness of the current segment.
const Segment & operator=(const Segment &other)
Mean based segment features.
Segmenter segments IDs manager.
unsigned int m_segmentsSimIncreaseSteps
The maximum number of steps to increment the similarity threshold value for the cases where no segmen...
SegmenterRegionGrowingStrategy::SegmentFeatures * getFeatures()
Returns the current segment internal features.
Segmenter segment base class.
The Baatz based features will be used - Reference: Baatz, M.; Schape, A. Multiresolution segmentation...
const SegmentFeatures & operator=(const SegmentFeatures &other)
SegmenterRegionGrowingStrategy::SegmentFeatures * getFeatures()
Returns the current segment internal features.
Segmenter segment base class.
bool m_isInitialized
true if this instance is initialized.
unsigned int m_size
Segment area (pixels number).
double m_colorWeight
The weight given to the color component, deafult:0.5, valid range: [0,1].
Segmenter Strategy Parameters.
const SegmenterRegionGrowingStrategy::SegmentsIndexer & m_segments
A reference to an external valid structure where each all segments are indexed.
const Merger & operator=(const Merger &other)
Raster segmenter strategy base class.
double m_allSegsSmoothnessOffset
The offsets applied to normalize the smoothness value.
double m_compactness
Compactness of the current segment.
std::vector< double > m_stdDev
Standard deviation of segment pixel velues.
Raster segmenter strategy factory base class.
double m_allSegsCompactnessGain
The gains applied to normalize the compactness value.
std::vector< double > m_bandsWeights
The weight given to each band, when applicable (note: the bands weights sum must always be 1) or an e...
unsigned int m_minSegmentSize
A positive minimum segment size (pixels number - default: 100).
Raster segmenter strategy base class.
Configuration flags for the Raster Processing module of TerraLib.
SegmentFeaturesType m_segmentFeatures
What segment features will be used on the segmentation process (default:InvalidFeaturesType).
SegmentsIdsMatrixT m_segmentsIdsMatrix
A internal segments IDs matrix that can be reused on each strategy execution.
SegmenterRegionGrowingStrategy::SegmentFeatures const * getFeatures() const
Returns the current segment internal features.
A generic template matrix.
const SegmentFeatures & operator=(const SegmentFeatures &other)
double m_segmentsSimilarityThreshold
Segments similarity treshold - Segments with similarity values below this value will be merged; valid...
SegmenterRegionGrowingStrategy::SegmentFeatures const * getFeatures() const
Returns the current segment internal features.
Segment features base class.
const SegmentsIdsMatrixT & m_segmentsIds
A reference to an external valid structure where each all segments IDs are stored.
void update()
Update the internal state.
An abstract class for raster data strucutures.
std::vector< double > m_bandsWeights
A vector where each bands weight are stored.
Raster segmenter strategy factory base class.
std::vector< double > m_means
Segment mean values (for each band), normalized between 0 and 1.
The mean of segments pixel values will be used - Reference: S. A. Bins, L. M. G. Fonseca, G. J. Erthal e F. M. Ii, "Satellite Imagery segmentation: a region growing approach", VIII Simposio Brasileiro de Sensoriamento Remoto, Salvador, BA, 14-19 abril 1996.
SegmenterRegionGrowingStrategy::Parameters m_parameters
Internal execution parameters.
BaatzBasedSegment::SegmentFeatures m_features
SegmentFeatures(const SegmentFeatures &)
Raster region growing segmenter strategy factory.
Baatz based Segments merger.
std::vector< double > m_sums
Segment sum of segment pixel velues.
unsigned int m_xStart
Segment left X coordinate box over the label image.
SegmentFeatures(const SegmentFeatures &)
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
unsigned int m_edgeLength
Segment edge length.
Mean based Segments merger.
unsigned int m_yBound
Segment lower bound Y coordinate box over the label image.