package com.google.zxing.qrcode.detector;
+import com.google.zxing.DecodeHintType;
import com.google.zxing.ReaderException;
import com.google.zxing.ResultPoint;
+import com.google.zxing.ResultPointCallback;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.DetectorResult;
import com.google.zxing.common.GridSampler;
public class Detector {
private final BitMatrix image;
+ private ResultPointCallback resultPointCallback;
public Detector(BitMatrix image) {
this.image = image;
*/
public DetectorResult detect(Hashtable hints) throws ReaderException {
- FinderPatternFinder finder = new FinderPatternFinder(image);
+ resultPointCallback = hints == null ? null :
+ (ResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);
+
+ FinderPatternFinder finder = new FinderPatternFinder(image, resultPointCallback);
FinderPatternInfo info = finder.find(hints);
return processFinderPatternInfo(info);
alignmentAreaTopY,
alignmentAreaRightX - alignmentAreaLeftX,
alignmentAreaBottomY - alignmentAreaTopY,
- overallEstModuleSize);
+ overallEstModuleSize,
+ resultPointCallback);
return alignmentFinder.find();
}