本文整理汇总了Java中com.google.zxing.oned.OneDReader类的典型用法代码示例。如果您正苦于以下问题:Java OneDReader类的具体用法?Java OneDReader怎么用?Java OneDReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OneDReader类属于com.google.zxing.oned包,在下文中一共展示了OneDReader类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseFinderValue
import com.google.zxing.oned.OneDReader; //导入依赖的package包/类
protected static int parseFinderValue(int[] counters, int[][] finderPatterns) throws
NotFoundException {
for (int value = 0; value < finderPatterns.length; value++) {
if (OneDReader.patternMatchVariance(counters, finderPatterns[value],
MAX_INDIVIDUAL_VARIANCE) < MAX_AVG_VARIANCE) {
return value;
}
}
throw NotFoundException.getNotFoundInstance();
}
示例2: testCompleteDecode
import com.google.zxing.oned.OneDReader; //导入依赖的package包/类
@Test
public void testCompleteDecode() throws Exception {
OneDReader rssExpandedReader = new RSSExpandedReader();
BinaryBitmap binaryMap = TestCaseUtil.getBinaryBitmap("src/test/resources/blackbox/rssexpandedstacked-2/1000.png");
Result result = rssExpandedReader.decode(binaryMap);
assertEquals("(01)98898765432106(3202)012345(15)991231", result.getText());
}