From: Pavel Charvat Date: Sat, 16 Sep 2006 09:39:39 +0000 (+0200) Subject: changes in IMAGESIM explain X-Git-Tag: holmes-import~543 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=50502db00a2a2f38a0cf8c0a18d733575da4e0a6;p=libucw.git changes in IMAGESIM explain --- diff --git a/images/sig-cmp-gen.h b/images/sig-cmp-gen.h index 8248904f..e95d9422 100644 --- a/images/sig-cmp-gen.h +++ b/images/sig-cmp-gen.h @@ -83,7 +83,7 @@ image_signatures_dist_integrated_explain(struct image_signature *sig1, struct im else dt *= 16; dist[n++] = (dt << 8) + i + (j << 4); -#ifdef CONFIG_EXPLAIN +#ifdef CONFIG_EXPLAIN MSG("[%u, %u] dt=%u ds=%u df=(%d", i, j, dt, ds, (int)reg1->f[0] - (int)reg2->f[0]); for (uns i = 1; i < IMAGE_VEC_F; i++) MSG(" %d", (int)reg1->f[i] - (int)reg2->f[i]); @@ -106,7 +106,7 @@ image_signatures_dist_integrated_explain(struct image_signature *sig1, struct im image_sig_cmp_features_weights[4] * isqr((int)reg1->f[4] - (int)reg2->f[4]) + image_sig_cmp_features_weights[5] * isqr((int)reg1->f[5] - (int)reg2->f[5]); dist[n++] = (dt << 12) + i + (j << 4); -#ifdef CONFIG_EXPLAIN +#ifdef CONFIG_EXPLAIN MSG("[%u, %u] dt=%u df=(%d", i, j, dt, (int)reg1->f[0] - (int)reg2->f[0]); for (uns i = 1; i < IMAGE_VEC_F; i++) MSG(" %d", (int)reg1->f[i] - (int)reg2->f[i]); @@ -149,7 +149,18 @@ image_signatures_dist_integrated_explain(struct image_signature *sig1, struct im } l -= s; sum += s * d; - MSGL("[%u, %u] s=%u d=%u", i, j, s, d); +#ifdef CONFIG_EXPLAIN + MSG("[%u, %u] d=%u d=%u df=(%d", i, j, s, d, (int)reg1->f[0] - (int)reg2->f[0]); + for (uns i = 1; i < IMAGE_VEC_F; i++) + MSG(" %d", (int)reg1->f[i] - (int)reg2->f[i]); + if (!((sig1->flags | sig2->flags) & IMAGE_SIG_TEXTURED)) + { + MSG(") dh=(%d", (int)reg1->h[0] - (int)reg2->h[0]); + for (uns i = 1; i < IMAGE_REG_H; i++) + MSG(" %d", (int)reg1->h[i] - (int)reg2->h[i]); + } + MSGL(")"); +#endif } return sum; @@ -247,6 +258,7 @@ image_signatures_dist_fuzzy_explain(struct image_signature *sig1, struct image_s MSG("%.4f", (double)lf[i] / 0x10000); } MSGL(")"); + MSG("Lh=("); for (uns i = 0; i < cnt1 + cnt2; i++) { if (i)