RegionSimilarity
Computes similarity values between the regions from two label images.
Access to parameter description
This algorithm allows the comparison of a segmented image with a ground truth in order to assess the accuracy of a segmentation process; for instance, a classification by machine learning. It outputs three statistical indicators for each label value:
Access to parameter description
This algorithm allows the comparison of a segmented image with a ground truth in order to assess the accuracy of a segmentation process; for instance, a classification by machine learning. It outputs three statistical indicators for each label value:
- The sensitivity, which measures the proportion of actual positives that are correctly identified as such (true positive rate, TP)
- The specificity, which measures the proportion of actual negatives that are correctly identified as such (true negative rate, TN)
- The dice coefficient, which is a statistic used for comparing the similarity of two samples (S rensen Dice coefficient)
- FP is the false positive rate (that is, the proportion of positives that are not defined as such in the ground truth).
- FN is the false negative rate (that is, the proportion of negatives that are actually positive in the ground truth).
Function Syntax
This function returns outputMeasurement.
// Function prototype
RegionSimilarityMsr::Ptr regionSimilarity( std::shared_ptr< iolink::ImageView > inputLabelImage, std::shared_ptr< iolink::ImageView > inputReferenceImage, RegionSimilarityMsr::Ptr outputMeasurement = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputLabelImage |
The segmented image to assess. | Image | Label | nullptr |
![]() |
inputReferenceImage |
The ground truth image. This image must have same dimensions and type as the main input image. | Image | Label | nullptr |
![]() |
outputMeasurement |
The similarity results. | RegionSimilarityMsr | nullptr |
Object Examples
auto polystyrene_sep_label = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep_label.vip" ); RegionSimilarity regionSimilarityAlgo; regionSimilarityAlgo.setInputLabelImage( polystyrene_sep_label ); regionSimilarityAlgo.setInputReferenceImage( polystyrene_sep_label ); regionSimilarityAlgo.execute(); std::cout << "sensitivity: " << regionSimilarityAlgo.outputMeasurement()->sensitivity( 0 ) ;
Function Examples
auto polystyrene_sep_label = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep_label.vip" ); auto result = regionSimilarity( polystyrene_sep_label, polystyrene_sep_label ); std::cout << "sensitivity: " << result->sensitivity( 0 ) ;