Commit 8d79014f authored by Andreas Schwarzkopf's avatar Andreas Schwarzkopf

[FIX #371] Completed the validation classes that were used for the Lari/Habib 2014 approach

 *  - Just completed and fixed up things
 *  - Fixed bug contained in "Point groups - Transform". Originally there was a
 *    performance trouble during processing point data with very many groups.
parent 15deb769
......@@ -86,14 +86,10 @@ void WGroupEdit::mergeGroupSet( boost::shared_ptr< WDataSetPointsGrouped > point
if( isValidGroupID( groupID ) )
{
double currentSize = m_groupSizes.size();
size_t currentSize = m_groupSizes.size();
if( groupID >= currentSize )
{
m_groupSizes.reserve( groupID + 1 );
m_groupSizes.resize( groupID + 1 );
for( size_t newGroup = currentSize; newGroup <= groupID; newGroup++ )
m_groupSizes[newGroup] = 0;
}
m_groupSizes.push_back( 0 );
m_groupSizes[groupID] = m_groupSizes[groupID] + 1;
}
}
......
......@@ -223,14 +223,15 @@ void WPointSaver::save()
const char* path = tmp.c_str();
remove( path );
stream.open( path );
stream.precision( 16 );
size_t pointCount = m_verts->size() / 3;
for( size_t index = 0; index < pointCount; index++ )
{
//TODO(aschwarzkopf): This saving method is unprecise because saved points have not the full resolution of double values.
stream.precision( 16 );
stream << m_verts->at( index * 3 + 0 ) << "\t";
stream << m_verts->at( index * 3 + 1 ) << "\t";
stream.precision( 6 );
stream << m_verts->at( index * 3 + 2 ) << "\t";
stream << m_colors->at( index * 3 + 0 ) << "\t";
stream << m_colors->at( index * 3 + 1 ) << "\t";
......
......@@ -124,18 +124,19 @@ void WMPointGroupsTransform::properties()
"whole render process took.", 0.0 );
m_infoInputPointCount = m_infoProperties->addProperty( "Input points: ", "", 0 );
m_infoLastGroupID = m_infoProperties->addProperty( "Last group ID: ", "", 0 );
m_infoBoundingBoxMin.push_back( m_infoProperties->addProperty( "X min: ", "", 0 ) );
m_infoBoundingBoxMax.push_back( m_infoProperties->addProperty( "X max: ", "", 0 ) );
m_infoBoundingBoxMin.push_back( m_infoProperties->addProperty( "Y min: ", "", 0 ) );
m_infoBoundingBoxMax.push_back( m_infoProperties->addProperty( "Y max: ", "", 0 ) );
m_infoBoundingBoxMin.push_back( m_infoProperties->addProperty( "Z min: ", "", 0 ) );
m_infoBoundingBoxMax.push_back( m_infoProperties->addProperty( "Z max: ", "", 0 ) );
m_infoBoundingBoxMin.push_back( m_infoProperties->addProperty( "X min: ", "", 0.0 ) );
m_infoBoundingBoxMax.push_back( m_infoProperties->addProperty( "X max: ", "", 0.0 ) );
m_infoBoundingBoxMin.push_back( m_infoProperties->addProperty( "Y min: ", "", 0.0 ) );
m_infoBoundingBoxMax.push_back( m_infoProperties->addProperty( "Y max: ", "", 0.0 ) );
m_infoBoundingBoxMin.push_back( m_infoProperties->addProperty( "Z min: ", "", 0.0 ) );
m_infoBoundingBoxMax.push_back( m_infoProperties->addProperty( "Z max: ", "", 0.0 ) );
m_pointsCropGroup = m_properties->addPropertyGroup( "Point set cropping",
"Options to crop the point set" );
m_pointSubtractionRadius = m_pointsCropGroup->addProperty( "Subtr. r.: ", "Radius of subtracted coordinates "
"(most right input connector)", 0.0, m_propCondition );
m_invertSubtraction = m_pointsCropGroup->addProperty( "Invert: ", "Inverts point subtraction.", false, m_propCondition );
m_outlinerGroup = m_properties->addPropertyGroup( "Group outlining",
......@@ -322,8 +323,8 @@ void WMPointGroupsTransform::addTransformedPoints()
isGroupSelected = true;
m_groupIDInOriginalPointSet->set( m_groupEditor.getOldGroupID( index ) );
}
if( isGroupSelected && m_groupEditor.isPointCollected( index )
&& !m_pointSubtraction.pointsExistNearCoordinate( *point ) )
bool remainsAfterSubtraction = m_pointSubtraction.pointsExistNearCoordinate( *point ) == m_invertSubtraction->get();
if( isGroupSelected && m_groupEditor.isPointCollected( index ) && remainsAfterSubtraction )
{
for( size_t item = 0; item < 3; item++ )
{
......@@ -354,13 +355,11 @@ void WMPointGroupsTransform::addTransformedPoints()
void WMPointGroupsTransform::onFileLoad()
{
cout << endl << endl << "WMGroupsTransform::onFileLoad() - Start" << endl;
m_pointInputFile.setFilePath( m_inputFile->get().c_str() );
if( m_reloadPointsTrigger->get( true ) )
m_pointInputFile.loadWDataSetPointsGrouped();
if( m_pointInputFile.containsData() )
{
cout << "WMGroupsTransform::onFileLoad() - File detected" << endl;
boost::shared_ptr< WDataSetPointsGrouped > outputGroups(
new WDataSetPointsGrouped( m_pointInputFile.getVertices(),
m_pointInputFile.getColors(), m_pointInputFile.getGroups() ) );
......
......@@ -256,12 +256,12 @@ private:
/**
* Information about minimal X/Y/Z values.
*/
vector<WPropInt> m_infoBoundingBoxMin;
vector<WPropDouble> m_infoBoundingBoxMin;
/**
* Information about minimal X/Y/Z values.
*/
vector<WPropInt> m_infoBoundingBoxMax;
vector<WPropDouble> m_infoBoundingBoxMax;
/**
* Options that are relevant for point removal
......@@ -274,6 +274,11 @@ private:
*/
WPropDouble m_pointSubtractionRadius;
/**
* Inverts the selection based on cropping and point subtraction.
*/
WPropBool m_invertSubtraction;
/**
......
......@@ -120,12 +120,18 @@ void WExportCSV::writeCumulatedGroupInfoToFile()
{
cout << "WExportCSV::writeCumulatedGroupInfoToFile() - Start" << endl;
*m_fileOutputStream <<
"Assigned groups" << TAB <<
"Range from" << TAB <<
"Range to" << TAB <<
"Reference groups" << TAB <<
"Point count from" << TAB <<
//"Range to" << TAB <<
"Certainly detected %" << TAB <<
"Certain groups by completeness %" << TAB <<
"Certain groups by area completeness %" << TAB <<
"Certain groups by correctness %" << TAB <<
"Point completeness %" << TAB <<
"Point correctness %" << TAB <<
"Area point completeness %" << endl;
"Area point completeness %" << TAB <<
"Point correctness %" << endl;
vector<WCumulatedGroupInfo*>* cumulatedGroups = generateCumulatedGroups();
cout << "WExportCSV::writeCumulatedGroupInfoToFile() - Cumulated groups generated" << endl;
......@@ -138,10 +144,16 @@ void WExportCSV::writeCumulatedGroupInfoToFile()
*m_fileOutputStream <<
group->getGroupCount() << TAB <<
group->getRangeMinPointCount() << TAB <<
group->getRangeMaxPointCount() << TAB <<
group->getPointCompleteness() << TAB <<
group->getPointCorrectness() << TAB <<
group->getAreaPointCorrectness() << endl;
//group->getRangeMaxPointCount() * 100.0 << TAB <<
group->getCertainlyDetectedGroupsAmount() * 100.0 << TAB <<
group->getCertainGroupsAmountByCompleteness() * 100.0 << TAB <<
group->getCertainGroupsAmountByAreaCompleteness() * 100.0 << TAB <<
group->getCertainGroupsAmountByCorrectness() * 100.0 << TAB <<
group->getPointCompleteness() * 100.0 << TAB <<
group->getAreaPointCorrectness() * 100.0 << TAB <<
group->getPointCorrectness() * 100.0 << endl;
}
}
delete cumulatedGroups;
......@@ -154,29 +166,34 @@ void WExportCSV::writeInfoToFileForAllGroups()
"Validated group" << TAB <<
"Ref. group points" << TAB <<
"Val. group points" << TAB <<
"Points correctly detected" << TAB <<
"Points of missing areas" << TAB <<
"In false group" << TAB <<
"Correctness %" << TAB <<
"Completeness %" << TAB <<
"Points of missing areas" << TAB <<
"Areas completeness %" << endl;
"Areas completeness %" << TAB <<
"Correctness %" << endl;
for( size_t index = 0; index < m_groupInfo->size(); index++ )
{
WGroupInfo* group = m_groupInfo->at( index );
if( group->getReferenceGroupPointCount() > 0 )
{
m_fileOutputStream->precision( 16 );
*m_fileOutputStream <<
group->getReferenceGroupID() << TAB <<
group->getValidatedGroupID() << TAB <<
group->getReferenceGroupPointCount() << TAB <<
( group->getCorrectlyDetectedPointCount() + group->getUncorrectlyDetectedPointCount() ) << TAB <<
group->getCorrectlyDetectedPointCount() << TAB <<
group->getAreaMissingPointCount() << TAB <<
group->getUncorrectlyDetectedPointCount() << TAB <<
group->getCorrectness() * 100.0 << TAB <<
group->getCompletess() * 100.0 << TAB <<
group->getAreaMissingPointCount() << TAB <<
group->getAreaCompleteness() * 100.0 << endl;
group->getAreaCompleteness() * 100.0 << TAB <<
group->getCorrectness() * 100.0 << endl;
}
}
}
......
......@@ -76,11 +76,27 @@ void WGroupValidator::setCoordinateAccuracy( double maxEuclideanDeviance )
m_coordinateAccuracy = maxEuclideanDeviance;
}
void WGroupValidator::setAreaTestingPointRadius( double areaTestingPointRadius )
void WGroupValidator::setPointAreaRadius( double pointAreaRadius )
{
m_areaTestingPointRadius = areaTestingPointRadius;
m_pointAreaRadius = pointAreaRadius;
}
void WGroupValidator::setMinimalPointCompleteness( double minPointCompleteness )
{
m_minimalPointCompleteness = minPointCompleteness;
}
void WGroupValidator::setMinimalpointAreaCompleteness( double minPointAreaCompleteness )
{
m_minimalPointAreaCompleteness = minPointAreaCompleteness;
}
void WGroupValidator::setMinimalPointCorrectness( double minPointCorrectness )
{
m_minimalPointCorrectness = minPointCorrectness;
}
void WGroupValidator::validateGroups(
boost::shared_ptr< WDataSetPointsGrouped > referenceGroups, boost::shared_ptr< WDataSetPointsGrouped > validatedGroups )
{
......@@ -154,7 +170,7 @@ void WGroupValidator::validateGroup( size_t referenceGroupID, size_t validatedGr
WPointSubtactionHelper validatedSearcher;
validatedSearcher.initSubtraction( validatedGroup, m_coordinateAccuracy );
WPointSubtactionHelper validatedAreaSearcher;
validatedAreaSearcher.initSubtraction( validatedGroup, m_areaTestingPointRadius );
validatedAreaSearcher.initSubtraction( validatedGroup, m_pointAreaRadius * 2.0 );
cout << "WGroupValidator::validateGroup() - Calculating completeness";
size_t completenessPointCount = 0;
......@@ -169,7 +185,7 @@ void WGroupValidator::validateGroup( size_t referenceGroupID, size_t validatedGr
pointCountOfMissingAreas++;
for( size_t dimension = 0; dimension < 3; dimension++ )
m_pointsOfNotSegmentedAreasVertices->push_back( referenceVertices->at( index * 3 + dimension ) );
m_pointsOfNotSegmentedAreasColors->push_back( 0.55 );
m_pointsOfNotSegmentedAreasColors->push_back( 0.65 );
m_pointsOfNotSegmentedAreasColors->push_back( 0.0 );
m_pointsOfNotSegmentedAreasColors->push_back( 1.0 );
}
......@@ -192,25 +208,37 @@ void WGroupValidator::validateGroup( size_t referenceGroupID, size_t validatedGr
vector<double> validatedCoord = WVectorMaths::new3dVector( validatedVertices->at( index * 3 + 0 ),
validatedVertices->at( index * 3 + 1 ), validatedVertices->at( index * 3 + 2 ) );
if( !referenceSearcher.pointsExistNearCoordinate( validatedCoord ) )
{
uncorrectPoints++;
for( size_t dimension = 0; dimension < 3; dimension++ )
m_falseSegmentedVertices->push_back( validatedVertices->at( index * 3 + dimension ) );
m_falseSegmentedColors->push_back( 1.0 );
m_falseSegmentedColors->push_back( 0.0 );
m_falseSegmentedColors->push_back( 0.0 );
}
}
while( m_groupInfo->size() <= referenceGroupID )
m_groupInfo->push_back( new WGroupInfo() );
m_groupInfo->at( referenceGroupID )->setReferenceGroupID( referenceGroupID );
m_groupInfo->at( referenceGroupID )->setValidatedGroupID( validatedGroupID );
m_groupInfo->at( referenceGroupID )->setReferenceGroupPointCount( referenceVertices->size() / 3 );
m_groupInfo->at( referenceGroupID )->setCorrectlyDetectedPointCount( completenessPointCount );
m_groupInfo->at( referenceGroupID )->setUncorrectlyDetectedPointCount( uncorrectPoints );
m_groupInfo->at( referenceGroupID )->setPointCountOfMissingAreas( pointCountOfMissingAreas );
WGroupInfo* newGroup = m_groupInfo->at( referenceGroupID );
newGroup->setReferenceGroupID( referenceGroupID );
newGroup->setValidatedGroupID( validatedGroupID );
newGroup->setReferenceGroupPointCount( referenceVertices->size() / 3 );
newGroup->setCorrectlyDetectedPointCount( completenessPointCount );
newGroup->setUncorrectlyDetectedPointCount( uncorrectPoints );
newGroup->setPointCountOfMissingAreas( pointCountOfMissingAreas );
newGroup->setMinimalPointCompleteness( m_minimalPointCompleteness );
newGroup->setMinimalPointAreaCompleteness( m_minimalPointAreaCompleteness );
newGroup->setMinimalPointCorrectness( m_minimalPointCorrectness );
if( newGroup->isCertainlyDetected() )
for( size_t index = 0; index < validatedVertices->size() / 3; index++ )
{
vector<double> validatedCoord = WVectorMaths::new3dVector( validatedVertices->at( index * 3 + 0 ),
validatedVertices->at( index * 3 + 1 ), validatedVertices->at( index * 3 + 2 ) );
if( !referenceSearcher.pointsExistNearCoordinate( validatedCoord ) )
{
for( size_t dimension = 0; dimension < 3; dimension++ )
m_falseSegmentedVertices->push_back( validatedVertices->at( index * 3 + dimension ) );
m_falseSegmentedColors->push_back( 1.0 );
m_falseSegmentedColors->push_back( 0.0 );
m_falseSegmentedColors->push_back( 0.0 );
}
}
}
void WGroupValidator::identifyNotSegmentedGroupPoints()
......
......@@ -93,14 +93,13 @@ public:
void setCoordinateAccuracy( double maxEuclideanDeviance );
/**
* Radius contraint for point area testing. E. g. correctly segmented area reference
* points are segmented by searching them using validated group point coordinates by
* the set radius. So it can be distinguished between sporadeously not segmented
* points and missing areas.
* \param areaTestingPointRadius Area point search radius along from group points to
* Radius contraint for point area testing. Points with the distance of a double
* radius share their area. So it can be distinguished between sporadeously not
* segmented points and missing areas.
* \param pointAreaRadius Area point search radius along from group points to
* be validated.
*/
void setAreaTestingPointRadius( double areaTestingPointRadius );
void setPointAreaRadius( double pointAreaRadius );
/**
* Starts to validate groups using a reference point group set.
......@@ -110,6 +109,54 @@ public:
void validateGroups( boost::shared_ptr< WDataSetPointsGrouped > referenceGroups,
boost::shared_ptr< WDataSetPointsGrouped > validatedGroups );
/**
* Point completeness threshold that is related to detect whether a point group is
* certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False negatives: Point count of the reference group that are not covered by the
* group to be validated.
* \param minPointCompleteness Minimal point completeness of a group to be
* validated (0.0 - 1.0).
*/
void setMinimalPointCompleteness( double minPointCompleteness );
/**
* Point area completeness threshold that is related to detect whether a point group
* is certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False negatives: Count of points of the reference group that is farer away from
* all points of the group to be validated than by a threshold
* distance.
* \param minPointAreaCompleteness Minimal point area completeness of a group to be
* validated (0.0 - 1.0).
*/
void setMinimalpointAreaCompleteness( double minPointAreaCompleteness );
/**
* Point segmentation correctness threshold that is related to detect whether a
* point group is certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False positives: Count of points of the group to be validated that arer not
* covered by the reference group..
* \param minPointCorrectness Minimal point correctness of the group to be validated
* (0.0 - 1.0).
*/
void setMinimalPointCorrectness( double minPointCorrectness );
......@@ -166,12 +213,11 @@ private:
double m_coordinateAccuracy;
/**
* Radius contraint for point area testing. E. g. correctly segmented area reference
* points are segmented by searching them using validated group point coordinates by
* the set radius. So it can be distinguished between sporadeously not segmented
* points and missing areas.
* Radius contraint for point area testing. Points with the distance of a double
* radius share their area. So it can be distinguished between sporadeously not
* segmented points and missing areas.
*/
double m_areaTestingPointRadius;
double m_pointAreaRadius;
/**
* Information about groups to be evaluated that is generated in that class.
......@@ -276,6 +322,49 @@ private:
* correctly segmented points.
*/
WDataSetPoints::ColorArray m_pointsOfNotSegmentedAreasColors;
/**
* Point completeness threshold that is related to detect whether a point group is
* certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False negatives: Point count of the reference group that are not covered by the
* group to be validated.
*/
double m_minimalPointCompleteness;
/**
* Point area completeness threshold that is related to detect whether a point group
* is certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False negatives: Count of points of the reference group that is farer away from
* all points of the group to be validated than by a threshold
* distance.
*/
double m_minimalPointAreaCompleteness;
/**
* Point segmentation correctness threshold that is related to detect whether a
* point group is certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False positives: Count of points of the group to be validated that arer not
* covered by the reference group..
*/
double m_minimalPointCorrectness;
};
#endif // WGROUPVALIDATOR_H
......@@ -108,15 +108,29 @@ void WMPointGroupsValidator::properties()
m_coordinateAccuracy = m_accuracyGroup->addProperty( "Point accuracy: ",
"Distanse on which validated points may vary from reference points by coordinate.", 0.0, m_propCondition );
m_coordinateAccuracy->setMin( 0.0 );
m_coordinateAccuracy->setMax( 1.0 );
m_coordinateAccuracy->setMax( 0.1 );
m_detectionCertaintyGroup = m_properties->addPropertyGroup( "Properties of certainly detected surfaces",
"Settings relevant to decide whether a point group was detected certainly." );
m_pointAreaRadius = m_detectionCertaintyGroup->addProperty( "Point area radius: ",
"Minimal distance from all detected points to be detected as not detected area.", 0.0, m_propCondition );
m_pointAreaRadius->setMin( 0.0 );
m_pointAreaRadius->setMax( 0.75 );
m_minimalPointCompleteness = m_detectionCertaintyGroup->addProperty( "Min. completeness: ", "", 0.3, m_propCondition );
m_minimalPointCompleteness->setMin( 0.0 );
m_minimalPointCompleteness->setMax( 1.0 );
m_minimalAreaPointCompleteness = m_detectionCertaintyGroup->addProperty( "Min. area compl.: ", "Matching type that is "
"applied to figure out the amount of minimal positives.", 0.0, m_propCondition );
m_minimalAreaPointCompleteness->setMin( 0.0 );
m_minimalAreaPointCompleteness->setMax( 1.0 );
m_minimalPointCorectness = m_detectionCertaintyGroup->addProperty( "Min. correctness: ", "", 0.0, m_propCondition );
m_minimalPointCorectness->setMin( 0.0 );
m_minimalPointCorectness->setMax( 1.0 );
m_evaluationGroup = m_properties->addPropertyGroup( "Group evaluation settings",
"Main evaluation settings." );
m_areaTestingPointRadius = m_evaluationGroup->addProperty( "Area testing: ",
"Minimal distance from all detected points to be detected as not detected area.", 0.0, m_propCondition );
m_areaTestingPointRadius->setMin( 0.0 );
m_areaTestingPointRadius->setMax( 1.0 );
m_cumulateGroups = m_evaluationGroup->addProperty( "Cumulate groups: ",
"Merge group results with a simular group size.", true );
m_outputFileCSV = m_evaluationGroup->addProperty( "CSV table: ", "", WPathHelper::getAppPath() );
......@@ -155,7 +169,10 @@ void WMPointGroupsValidator::moduleMain()
setProgressSettings( 10 );
m_groupValidator.setCoordinateAccuracy( m_coordinateAccuracy->get() );
m_groupValidator.setAreaTestingPointRadius( m_areaTestingPointRadius->get() );
m_groupValidator.setPointAreaRadius( m_pointAreaRadius->get() );
m_groupValidator.setMinimalPointCompleteness( m_minimalPointCompleteness->get() );
m_groupValidator.setMinimalpointAreaCompleteness( m_minimalAreaPointCompleteness->get() );
m_groupValidator.setMinimalPointCorrectness( m_minimalPointCorectness->get() );
m_groupValidator.validateGroups( referenceGroups, validatedPoints );
m_outputNotSegmented->updateData( m_groupValidator.getOutlineNotSegmentedPoints() );
......
......@@ -211,16 +211,68 @@ private:
WPropDouble m_coordinateAccuracy;
/**
* Settings that deal with point group evaluation itself.
* Setting parameter group that is relevant to thresholds which determine which
* minimal point completeness, point area completeness and point correctness is
* necessary to classify a group as certainly detected.
*/
WPropGroup m_evaluationGroup;
WPropGroup m_detectionCertaintyGroup;
/**
* Setting that delas with finding not segmented area points. These points are found
* by taking points of a corresponding reference group that can not be reached by
* correctly segmented points regarding this euclideanradius around them.
*/
WPropDouble m_areaTestingPointRadius;
WPropDouble m_pointAreaRadius;
/**
* Point completeness threshold that is related to detect whether a point group is
* certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False negatives: Point count of the reference group that are not covered by the
* group to be validated.
*/
WPropDouble m_minimalPointCompleteness;
/**
* Point area completeness threshold that is related to detect whether a point group
* is certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False negatives: Count of points of the reference group that is farer away from
* all points of the group to be validated than by a threshold
* distance.
*/
WPropDouble m_minimalAreaPointCompleteness;
/**
* Point segmentation correctness threshold that is related to detect whether a
* point group is certainly detected or not.
* It relies on the following formula of Lari/Habib 2014.
* Completeness = true positives / ( true positives + false negatives )
*
* In the implementation:
* True positives: Reference group count that matches to points of the group to ge
* validated.
* False positives: Count of points of the group to be validated that arer not
* covered by the reference group..
*/
WPropDouble m_minimalPointCorectness;
/**
* Settings that deal with point group evaluation itself.
*/
WPropGroup m_evaluationGroup;
/**
* Cumulate groups with similar reference group point counts.
......
......@@ -28,12 +28,16 @@
WCumulatedGroupInfo::WCumulatedGroupInfo()
{
m_cumulatedGroupCount = 0;
m_certainlyDetectedGroupCount = 0;
m_notDetectedGroupCount = 0;
m_pointCorrectnessCumulated = 0.0;
m_pointCompletenessCumulated = 0.0;
m_areaPointCompletenessCumulated = 0.0;
m_groupsRangeMinPointCount = 1;
m_groupsRangeMaxPointCount = 0;
m_countCertainCompleteness = 0;
m_countCertainAreaCompleteness = 0;
m_countCertainCorrectness = 0;
}
WCumulatedGroupInfo::~WCumulatedGroupInfo()
......@@ -52,31 +56,42 @@ bool WCumulatedGroupInfo::cumulateGroup( WGroupInfo* group )
if( !canBeCumulated( group ) )
return false;
m_cumulatedGroupCount++;
m_pointCorrectnessCumulated += group->getCorrectness();
m_pointCompletenessCumulated += group->getCompletess();
m_areaPointCompletenessCumulated += group->getAreaCompleteness();
m_countCertainCompleteness += group->isCertainlyDetectedByCompleteness() ?1 :0;
m_countCertainAreaCompleteness += group->isCertainlyDetectedByPointAreaCompleteness() ?1 :0;
m_countCertainCorrectness += group->isCertainlyDetectedByCorectness() ?1 :0;
if( group->isCertainlyDetected() )
{
m_certainlyDetectedGroupCount++;
m_pointCorrectnessCumulated += group->getCorrectness();
m_pointCompletenessCumulated += group->getCompletess();
m_areaPointCompletenessCumulated += group->getAreaCompleteness();
}
else
{
m_notDetectedGroupCount++;
}
return true;
}
size_t WCumulatedGroupInfo::getGroupCount()
{
return m_cumulatedGroupCount;
return m_certainlyDetectedGroupCount + m_notDetectedGroupCount;