Baatz based Segments merger. More...
#include <SegmenterRegionGrowingStrategy.h>
Public Member Functions | |
BaatzMerger (const double &colorWeight, const double &compactnessWeight, const std::vector< double > &bandsWeights, const SegmentsIdsMatrixT &segmentsIds) | |
Default constructor. More... | |
SegmenterRegionGrowingSegment::FeatureType | getDissimilarity (SegmenterRegionGrowingSegment const *const segment1Ptr, SegmenterRegionGrowingSegment const *const segment2Ptr, SegmenterRegionGrowingSegment *const mergePreviewSegPtr) const |
Returns a dimilarity index between this and the other segment. More... | |
unsigned int | getSegmentFeaturesSize () const |
Return the required segments features vector size (numer of elements). More... | |
void | mergeFeatures (SegmenterRegionGrowingSegment *const segment1Ptr, SegmenterRegionGrowingSegment const *const segment2Ptr, SegmenterRegionGrowingSegment const *const mergePreviewSegPtr) const |
Merge specific segment features from both segments into the first segment. More... | |
void | update (SegmenterRegionGrowingSegment *const actSegsListHeadPtr) |
Update the internal state. More... | |
~BaatzMerger () | |
Baatz based Segments merger.
Definition at line 257 of file SegmenterRegionGrowingStrategy.h.
te::rp::SegmenterRegionGrowingStrategy::BaatzMerger::BaatzMerger | ( | const double & | colorWeight, |
const double & | compactnessWeight, | ||
const std::vector< double > & | bandsWeights, | ||
const SegmentsIdsMatrixT & | segmentsIds | ||
) |
Default constructor.
bandsWeights | A reference to an external valid structure where each bands weight are stored. |
segmentsIds | //!< A reference to an external valid structure where all segments IDs are stored. |
segmentsMatrix | //!< A reference to an external valid segments matrix. |
colorWeight | //!< The weight given to the color component, deafult:0.5, valid range: [0,1]. |
compactnessWeight | //!< The weight given to the compactness component, deafult:0.5, valid range: [0,1]. |
Definition at line 234 of file SegmenterRegionGrowingStrategy.cpp.
References m_bandsNumber, and m_bandsWeights.
te::rp::SegmenterRegionGrowingStrategy::BaatzMerger::~BaatzMerger | ( | ) |
Definition at line 258 of file SegmenterRegionGrowingStrategy.cpp.
|
virtual |
Returns a dimilarity index between this and the other segment.
segment1Ptr | A pointer to the first segment. |
segment2Ptr | A pointer to the second segment. |
mergePreviewSegPtr | A pointer to a valid segment where the merged features values will be stored (when aplicable). |
Implements te::rp::SegmenterRegionGrowingStrategy::Merger.
Definition at line 262 of file SegmenterRegionGrowingStrategy.cpp.
References BAATZ_CO, BAATZ_EL, BAATZ_SM, BAATZ_SS, BAATZ_ST, BAATZ_SU, te::rp::SegmenterRegionGrowingStrategy::getTouchingEdgeLength(), te::rp::SegmenterRegionGrowingSegment::m_features, te::rp::SegmenterRegionGrowingSegment::m_id, te::rp::SegmenterRegionGrowingSegment::m_size, te::rp::SegmenterRegionGrowingSegment::m_xBound, te::rp::SegmenterRegionGrowingSegment::m_xStart, te::rp::SegmenterRegionGrowingSegment::m_yBound, te::rp::SegmenterRegionGrowingSegment::m_yStart, and TERP_DEBUG_TRUE_OR_THROW.
|
inlinevirtual |
Return the required segments features vector size (numer of elements).
Implements te::rp::SegmenterRegionGrowingStrategy::Merger.
Definition at line 291 of file SegmenterRegionGrowingStrategy.h.
|
virtual |
Merge specific segment features from both segments into the first segment.
segment1Ptr | The first segment. |
segment2Ptr | A pointer to the second segment. |
mergePreviewSegPtr | A pointer to a valid segment where the merged features values were be stored by calling getDissimilarityIndex (when aplicable). |
Implements te::rp::SegmenterRegionGrowingStrategy::Merger.
Definition at line 554 of file SegmenterRegionGrowingStrategy.cpp.
References te::rp::SegmenterRegionGrowingSegment::m_features, te::rp::SegmenterRegionGrowingSegment::m_size, te::rp::SegmenterRegionGrowingSegment::m_xBound, te::rp::SegmenterRegionGrowingSegment::m_xStart, te::rp::SegmenterRegionGrowingSegment::m_yBound, and te::rp::SegmenterRegionGrowingSegment::m_yStart.
|
virtual |
Update the internal state.
actSegsListHeadPtr | A pointer the the active segments list head. |
Implements te::rp::SegmenterRegionGrowingStrategy::Merger.
Definition at line 579 of file SegmenterRegionGrowingStrategy.cpp.
References BAATZ_CO, BAATZ_SM, BAATZ_STSTARTPTR, and te::rp::SegmenterRegionGrowingSegment::m_features.
|
protected |
The gains applied to normalize the compactness value.
Definition at line 301 of file SegmenterRegionGrowingStrategy.h.
|
protected |
The offsets applied to normalize the compactness value.
Definition at line 299 of file SegmenterRegionGrowingStrategy.h.
|
protected |
The gains applied to normalize the smoothness value.
Definition at line 305 of file SegmenterRegionGrowingStrategy.h.
|
protected |
The offsets applied to normalize the smoothness value.
Definition at line 303 of file SegmenterRegionGrowingStrategy.h.
|
protected |
The gains applied to normalize the standard deviation value.
Definition at line 309 of file SegmenterRegionGrowingStrategy.h.
|
protected |
The offsets applied to normalize the standard deviation value.
Definition at line 307 of file SegmenterRegionGrowingStrategy.h.
|
protected |
The number of features (bands).
Definition at line 297 of file SegmenterRegionGrowingStrategy.h.
Referenced by BaatzMerger().
|
protected |
A vector where each bands weight are stored.
Definition at line 315 of file SegmenterRegionGrowingStrategy.h.
Referenced by BaatzMerger().
|
protected |
The weight given to the color component, deafult:0.5, valid range: [0,1].
Definition at line 311 of file SegmenterRegionGrowingStrategy.h.
|
protected |
The weight given to the compactness component, deafult:0.5, valid range: [0,1].
Definition at line 313 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 326 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 323 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 325 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 324 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 329 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 319 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 320 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 318 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 328 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 330 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 331 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 327 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 321 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 322 of file SegmenterRegionGrowingStrategy.h.
|
protected |
A reference to an external valid structure where each all segments IDs are stored.
Definition at line 291 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 342 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 335 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 334 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 341 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 340 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 337 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 336 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 339 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 338 of file SegmenterRegionGrowingStrategy.h.
|
mutableprotected |
Definition at line 343 of file SegmenterRegionGrowingStrategy.h.