From 094535c010320967639e8e86f974d878e80baa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 1 May 2015 16:13:57 +0200 Subject: Imported Upstream version 1.7.0 --- profile/printcal.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'profile/printcal.c') diff --git a/profile/printcal.c b/profile/printcal.c index f9107eb..38ceb9b 100644 --- a/profile/printcal.c +++ b/profile/printcal.c @@ -51,6 +51,7 @@ #include "rspl.h" #include "xicc.h" #include "plot.h" +#include "ui.h" #define RSPLFLAGS (0 /* | RSPL_2PASSSMTH | RSPL_EXTRAFIT2 */) @@ -1366,7 +1367,22 @@ int main(int argc, char *argv[]) { NULL); /* iwidth */ - if (verb > 1) { + /* Compute & show fit quality */ + if (verb > 0) { + double avgde = 0.0, maxde = 0.0; + for (i = 0; i < n_pvals[j]; i++) { + co tp; /* Test point */ + double de; + tp.p[0] = pvals[j][i].dev; + raw[j]->interp(raw[j], &tp); + de = icmLabDE(pvals[j][i].Lab, tp.v); + + avgde += de; + if (de > maxde) + maxde = de; + } + avgde /= (double)n_pvals[j]; + printf("Chan %d raw fit avg DE %f, max %f\n",j,avgde,maxde); } free(dpoints); -- cgit v1.2.3