Browse Source

* measure.c: there is now pipi_measure_msd in addition to pipi_measure_rmsd.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2650 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 years ago
parent
commit
eaad4db6f9
2 changed files with 7 additions and 1 deletions
  1. +6
    -1
      pipi/measure.c
  2. +1
    -0
      pipi/pipi.h

+ 6
- 1
pipi/measure.c View File

@@ -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);
} }



+ 1
- 0
pipi/pipi.h View File

@@ -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);


Loading…
Cancel
Save