提交 127bb422 编写于 作者: T Thulinma

Fixed pattern finder inaccuracies by adding rudamentary center sorter. Not...

Fixed pattern finder inaccuracies by adding rudamentary center sorter. Not exactly equal to the original in the zxing code, but close enough.
上级 8a60fcf2
......@@ -415,11 +415,14 @@ function FinderPatternFinder()
}
}
if (this.possibleCenters.Count > 3)
if (this.possibleCenters.length > 3)
{
// Throw away all but those first size candidate points we found.
//Collections.insertionSort(possibleCenters, new CenterComparator());
//SupportClass.SetCapacity(possibleCenters, 3);
this.possibleCenters.sort(function(a, b){
if (a.count > b.count){return -1;}
if (a.count < b.count){return 1;}
return 0;
});
}
return new Array( this.possibleCenters[0], this.possibleCenters[1], this.possibleCenters[2]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册