Description Usage Arguments Value Note Examples
View source: R/image_similarity.R
Compute Image Similarity Metrics
1 2  | image_similarity(image1, image2, image1_mask = NULL,
  image2_mask = NULL, ...)
 | 
image1 | 
 Object of class   | 
image2 | 
 Object of class   | 
image1_mask | 
 Mask for first image (optional)  | 
image2_mask | 
 Mask for second image (optional)  | 
... | 
 Additional arguments to pass to
  | 
A numeric value
Not all metrics are symmetric.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  | library(ANTsRCore)
library(extrantsr)
x =  getANTsRData( 'r16' )
y =  getANTsRData( 'r30' )
image_similarity(x,y, type="MeanSquares")
image_similarity(y,x, type="MeanSquares")
image_similarity(x,y, type="Correlation")
image_similarity(y,x, type="Correlation")
# NOT SYMMETRIC
image_similarity(x,y, type="MattesMutualInformation")
image_similarity(y,x, type="MattesMutualInformation")
# NOT SYMMETRIC
mutual_information(x, y)
mutual_information(y, x)
image_similarity(x,y, type="ANTSNeighborhoodCorrelation")
image_similarity(y,x, type="ANTSNeighborhoodCorrelation")
image_similarity(x,y, type="JointHistogramMutualInformation")
image_similarity(y,x, type="JointHistogramMutualInformation")
image_similarity(x,y, type="Demons")
image_similarity(y,x, type="Demons")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.