scalar = | normalizedCrossCorrelationMsr3d (inImg3d1,inImg3d2) |
measures the global Normalized Cross-Correlation between two 3D images
This algorithms computes the global Normalized Cross-Correlation (NCC) between the two input images. In opposition to the Normalized Cross-Correlation 3d algorithm which returns an image, the result of this algorithm is a a single scalar value.
The 3D NCC is calculated according to the following formula :
Where is the image domain definition.
The result belongs to , and equals 1 when the images exactly matches, -1 when the images are exactly inverted and 0 when the images are totally different from each other.
If the input images has several slices along the C or T dimensions, the result is not a scalar but a collection of ipsdk::imaproc::attr::NCCResult. This data structure stores the actual result in its Result field. The other fields can be ignored as long as they are used for the calculation.
Please, see Normalized Cross-Correlation Measure 2d for an illustration of the global NCC in 2D case.