File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1222,6 +1222,11 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
1222
1222
similarity_image = (Image * ) NULL ;
1223
1223
}
1224
1224
}
1225
+ if (metric == NormalizedCrossCorrelationErrorMetric )
1226
+ {
1227
+ distortion = 1.0 - distortion ;
1228
+ similarity_metric = 1.0 - similarity_metric ;
1229
+ }
1225
1230
if (difference_image == (Image * ) NULL )
1226
1231
status = 0 ;
1227
1232
else
@@ -1429,8 +1434,12 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
1429
1434
channel_distortion = (double * ) RelinquishMagickMemory (
1430
1435
channel_distortion );
1431
1436
if (subimage_search != MagickFalse )
1432
- (void ) FormatLocaleFile (stderr ," Offset: %.20g,%.20g\n" ,(double )
1433
- difference_image -> page .x ,(double ) difference_image -> page .y );
1437
+ {
1438
+ (void ) FormatLocaleFile (stderr ," Offset: %.20g,%.20g\n" ,(double )
1439
+ difference_image -> page .x ,(double ) difference_image -> page .y );
1440
+ (void ) FormatLocaleFile (stderr ," Similarity metric: %.*g\n" ,
1441
+ GetMagickPrecision (),similarity_metric );
1442
+ }
1434
1443
}
1435
1444
(void ) ResetImagePage (difference_image ,"0x0+0+0" );
1436
1445
if (difference_image -> next != (Image * ) NULL )
You can’t perform that action at this time.
0 commit comments