瀏覽代碼

* 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 年之前
父節點
當前提交
eaad4db6f9
共有 2 個檔案被更改,包括 7 行新增1 行删除
  1. +6
    -1
      pipi/measure.c
  2. +1
    -0
      pipi/pipi.h

+ 6
- 1
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);
}


+ 1
- 0
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);


Loading…
取消
儲存