diff --git a/pipi/measure.c b/pipi/measure.c index c094e64..4ebd35d 100644 --- a/pipi/measure.c +++ b/pipi/measure.c @@ -25,6 +25,11 @@ #include "pipi_internals.h" double pipi_measure_rmsd(pipi_image_t *i1, pipi_image_t *i2) +{ + return sqrt(pipi_measure_msd(i1, i2)); +} + +double pipi_measure_msd(pipi_image_t *i1, pipi_image_t *i2) { pipi_format_t f1, f2; double ret = 0.0; @@ -57,6 +62,6 @@ double pipi_measure_rmsd(pipi_image_t *i1, pipi_image_t *i2) i1->last_modified = f1; i2->last_modified = f2; - return sqrt(ret / (w * h)); + return ret / (w * h); } diff --git a/pipi/pipi.h b/pipi/pipi.h index 6642569..f06e982 100644 --- a/pipi/pipi.h +++ b/pipi/pipi.h @@ -59,6 +59,7 @@ extern void pipi_save(pipi_image_t *, const char *); extern pipi_pixels_t *pipi_getpixels(pipi_image_t *, pipi_format_t); +extern double pipi_measure_msd(pipi_image_t *, pipi_image_t *); extern double pipi_measure_rmsd(pipi_image_t *, pipi_image_t *); extern pipi_image_t *pipi_resize(pipi_image_t *, int, int);