package com.google.zxing.multi.qrcode.detector;\r
\r
import com.google.zxing.DecodeHintType;\r
-import com.google.zxing.BinaryBitmap;\r
import com.google.zxing.ReaderException;\r
import com.google.zxing.ResultPoint;\r
-import com.google.zxing.common.BitArray;\r
import com.google.zxing.common.Collections;\r
import com.google.zxing.common.Comparator;\r
+import com.google.zxing.common.BitMatrix;\r
import com.google.zxing.qrcode.detector.FinderPattern;\r
import com.google.zxing.qrcode.detector.FinderPatternFinder;\r
import com.google.zxing.qrcode.detector.FinderPatternInfo;\r
*\r
* @param image image to search\r
*/\r
- MultiFinderPatternFinder(BinaryBitmap image) {\r
+ MultiFinderPatternFinder(BitMatrix image) {\r
super(image);\r
}\r
\r
\r
public FinderPatternInfo[] findMulti(Hashtable hints) throws ReaderException {\r
boolean tryHarder = hints != null && hints.containsKey(DecodeHintType.TRY_HARDER);\r
- BinaryBitmap image = getImage();\r
+ BitMatrix image = getImage();\r
int maxI = image.getHeight();\r
int maxJ = image.getWidth();\r
// We are looking for black/white/black/white/black modules in\r
\r
int[] stateCount = new int[5];\r
for (int i = iSkip - 1; i < maxI; i += iSkip) {\r
- BitArray blackRow = new BitArray(maxJ);\r
-\r
// Get a row of black/white values\r
- blackRow = image.getBlackRow(i, blackRow, 0, maxJ);\r
stateCount[0] = 0;\r
stateCount[1] = 0;\r
stateCount[2] = 0;\r
stateCount[4] = 0;\r
int currentState = 0;\r
for (int j = 0; j < maxJ; j++) {\r
- if (blackRow.get(j)) {\r
+ if (image.get(j, i)) {\r
// Black pixel\r
if ((currentState & 1) == 1) { // Counting white pixels\r
currentState++;\r
if (!confirmed) {\r
do { // Advance to next black pixel\r
j++;\r
- } while (j < maxJ && !blackRow.get(j));\r
+ } while (j < maxJ && !image.get(j, i));\r
j--; // back up to that last white pixel\r
}\r
// Clear state to start looking again\r