Fix issue #72 by changing test criteria in test_neighbours
This commit is contained in:
parent
cbf911edf0
commit
0de34fb6ca
1 changed files with 3 additions and 2 deletions
|
@ -1003,10 +1003,11 @@ static void test_neighbours(struct quirc *q, int i,
|
|||
for (k = 0; k < vlist->count; k++) {
|
||||
const struct neighbour *hn = &hlist->n[j];
|
||||
const struct neighbour *vn = &vlist->n[k];
|
||||
double score = fabs(1.0 - hn->distance / vn->distance);
|
||||
double squareness = fabs(1.0 - hn->distance / vn->distance);
|
||||
|
||||
if (score > 2.5)
|
||||
if (squareness > 0.2)
|
||||
continue;
|
||||
double score = hn->distance;
|
||||
|
||||
if (best_h < 0 || score < best_score) {
|
||||
best_h = hn->index;
|
||||
|
|
Loading…
Reference in a new issue