mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Add result point callback to multi QR code detector
git-svn-id: https://zxing.googlecode.com/svn/trunk@2090 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
f9244cdd30
commit
35eecdeb45
|
@ -19,6 +19,7 @@ package com.google.zxing.multi.qrcode.detector;
|
||||||
import com.google.zxing.DecodeHintType;
|
import com.google.zxing.DecodeHintType;
|
||||||
import com.google.zxing.NotFoundException;
|
import com.google.zxing.NotFoundException;
|
||||||
import com.google.zxing.ReaderException;
|
import com.google.zxing.ReaderException;
|
||||||
|
import com.google.zxing.ResultPointCallback;
|
||||||
import com.google.zxing.common.BitMatrix;
|
import com.google.zxing.common.BitMatrix;
|
||||||
import com.google.zxing.common.DetectorResult;
|
import com.google.zxing.common.DetectorResult;
|
||||||
import com.google.zxing.qrcode.detector.Detector;
|
import com.google.zxing.qrcode.detector.Detector;
|
||||||
|
@ -45,7 +46,9 @@ public final class MultiDetector extends Detector {
|
||||||
|
|
||||||
public DetectorResult[] detectMulti(Map<DecodeHintType,?> hints) throws NotFoundException {
|
public DetectorResult[] detectMulti(Map<DecodeHintType,?> hints) throws NotFoundException {
|
||||||
BitMatrix image = getImage();
|
BitMatrix image = getImage();
|
||||||
MultiFinderPatternFinder finder = new MultiFinderPatternFinder(image);
|
ResultPointCallback resultPointCallback =
|
||||||
|
hints == null ? null : (ResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);
|
||||||
|
MultiFinderPatternFinder finder = new MultiFinderPatternFinder(image, resultPointCallback);
|
||||||
FinderPatternInfo[] infos = finder.findMulti(hints);
|
FinderPatternInfo[] infos = finder.findMulti(hints);
|
||||||
|
|
||||||
if (infos.length == 0) {
|
if (infos.length == 0) {
|
||||||
|
|
Loading…
Reference in a new issue