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(); }
@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()); }