X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2Fsig-cmp-gen.h;h=0c88768eeb2dbaca4d0b9d5c4a0ce26c4016dcbf;hb=91c499892f07ad6494351a1c1985a0d3e2600a25;hp=e488734a6f1a0cd0996d52111522ceb1042d1c1a;hpb=80f276ef1ace66fd73181c9078d024ec8e9446e4;p=libucw.git diff --git a/images/sig-cmp-gen.h b/images/sig-cmp-gen.h index e488734a..0c88768e 100644 --- a/images/sig-cmp-gen.h +++ b/images/sig-cmp-gen.h @@ -70,7 +70,7 @@ image_signatures_dist_integrated_explain(struct image_signature *sig1, struct im dt += image_sig_cmp_features_weights[i] * isqr((int)reg1->f[i] - (int)reg2->f[i]); for (uns i = 0; i < 3; i++) ds += image_sig_cmp_features_weights[IMAGE_VEC_F + i] * isqr((int)reg1->h[i] - (int)reg2->h[i]); - for (uns i = 3; i < 4; i++) + for (uns i = 3; i < 5; i++) dp += image_sig_cmp_features_weights[IMAGE_VEC_F + i] * isqr((int)reg1->h[i] - (int)reg2->h[i]); #if 0 int x1, y1, x2, y2; @@ -107,7 +107,7 @@ image_signatures_dist_integrated_explain(struct image_signature *sig1, struct im d = dt; if (ds < 1000) d = d * 4; - else if (ds < 3000) + else if (ds < 4000) d = d * 6 + 8; else if (ds < 10000) d = d * 8 + 20; @@ -351,7 +351,7 @@ image_signatures_dist_average_explain(struct image_signature *sig1, struct image uns dist = 0; for (uns i = 0; i < IMAGE_VEC_F; i++) { - uns d = image_sig_cmp_features_weights[0] * isqr((int)sig1->vec.f[i] - (int)sig2->vec.f[i]); + uns d = image_sig_cmp_features_weights[0] * isqr((int)sig1->vec.f[i] - (int)sig2->vec.f[i]); MSGL("feature %u: d=%u (%u %u)", i, d, sig1->vec.f[i], sig2->vec.f[i]); dist += d; }