Bsoft function
img_correlate_within_radii
Source:
src/img/img_combine.c
Description:
Calculates a correlation image and a correlation coefficient between
two images, only within the given radii.
Algorithm:
The correlation between two images is calculated and normalized as:
sum((image1 - basis1)*(image2 - basis2))
CC = -------------------------------------------------
sqrt(sum(image1 - avg1)^2 * sum(image2 - avg2)^2)
The basis values can be anything, but is typically either the
average or the background in an image.
Both images are converted to floating point.
Arguments:
| Bimage* p1 | first image (modified).
|
| Bimage* p2 | second image.
|
| float bas1 | basis value for first image.
|
| float bas2 | basis value for second image.
|
| float minr | minimum radius (pixel units).
|
| float maxr | maximum radius (pixel units).
|
Returns:
double correlation coefficient, -1 if error.
Prototype:
double img_correlate_within_radii(Bimage* p1, Bimage* p2,
float bas1, float bas2, float minr, float maxr)
Functions used:
bfree
error_show
img_check_if_same_size
img_rescale_to_avg_std
Other objects included:
struct Bimage
struct Bmarker
Generated by bdoc.pl on Mon Jun 15 11:47:34 2009
Back to the Bsoft home