Bsoft function
img_correlation_coefficient_radial
Source:
src/img/img_combine.c
Author:
David Belnap
Description:
Calculates the correlation coefficient between two images and
applies a radial filter.
Algorithm:
Calculates correlation coefficient between two images using the
equation:
Sum(Ai*Bi) - [Sum(Ai)*Sum(Bi)]/n
CC = -----------------------------------------------------------------
SQRT[Sum(Ai^2) - (Sum(Ai))^2/n] * SQRT[Sum(Bi^2) - (Sum(Bi))^2/n]
where Ai and Bi are pixel values of images A and B, respectively,
and n is the total number of pixels sampled.
A radial filter is applied. The center of the image is needed and
is read from the pA Bimage structure. The two images must have the
same center (apply a translation shift if necessary). The program
tests that each pixel is within the radii range. If the pixel is
within the range, then it is included in the CC calculation.
Arguments:
| Bimage* pA | first image.
|
| Bimage* pB | second image.
|
| float radius_min | minimum radius for CC calculation, in pixels
|
| float radius_max | maximum radius for CC calculation, in pixels
|
Returns:
float correlation coefficient.
Prototype:
float img_correlation_coefficient_radial(Bimage* pA, Bimage* pB, float radius_min, float radius_max)
Functions used:
balloc
Other objects included:
struct Bimage
Generated by bdoc.pl on Mon Jun 15 11:47:34 2009
Back to the Bsoft home