git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2650 92316355-f0b4-4df1-b90c-862c8a59935fremotes/tiles
@@ -25,6 +25,11 @@ | |||||
#include "pipi_internals.h" | #include "pipi_internals.h" | ||||
double pipi_measure_rmsd(pipi_image_t *i1, pipi_image_t *i2) | 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; | pipi_format_t f1, f2; | ||||
double ret = 0.0; | double ret = 0.0; | ||||
@@ -57,6 +62,6 @@ double pipi_measure_rmsd(pipi_image_t *i1, pipi_image_t *i2) | |||||
i1->last_modified = f1; | i1->last_modified = f1; | ||||
i2->last_modified = f2; | i2->last_modified = f2; | ||||
return sqrt(ret / (w * h)); | |||||
return ret / (w * 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 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 double pipi_measure_rmsd(pipi_image_t *, pipi_image_t *); | ||||
extern pipi_image_t *pipi_resize(pipi_image_t *, int, int); | extern pipi_image_t *pipi_resize(pipi_image_t *, int, int); | ||||