Bsoft function
img_one_correlation_coefficient
Source:
src/img/img_combine.c
Description:
Calculates correlation coefficient between two images.
Algorithm:
The correlation between two images is calculated and normalized as:
sum((image1 - avg1)*(image2 - avg2))
CC = -------------------------------------------------
sqrt(sum(image1 - avg1)^2 * sum(image2 - avg2)^2)
.
Both images are converted to floating point.
Only the first image is used.
Arguments:
| Bimage* p1 | first image.
|
| Bimage* p2 | second image.
|
Returns:
double correlation coefficient, -1 if not run.
Prototype:
double img_one_correlation_coefficient(Bimage* p1, Bimage* p2)
Functions used:
balloc
bfree
Other objects included:
struct Bimage
Generated by bdoc.pl on Mon Jun 15 11:47:33 2009
Back to the Bsoft home