mirror of
https://github.com/zxing/zxing.git
synced 2025-02-21 02:55:27 -08:00
Issue 524
git-svn-id: https://zxing.googlecode.com/svn/trunk@1570 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
c34f284041
commit
d98d2af1ab
|
@ -374,6 +374,9 @@ public class Detector {
|
||||||
|
|
||||||
int alignmentAreaTopY = Math.max(0, estAlignmentY - allowance);
|
int alignmentAreaTopY = Math.max(0, estAlignmentY - allowance);
|
||||||
int alignmentAreaBottomY = Math.min(image.getHeight() - 1, estAlignmentY + allowance);
|
int alignmentAreaBottomY = Math.min(image.getHeight() - 1, estAlignmentY + allowance);
|
||||||
|
if (alignmentAreaBottomY - alignmentAreaTopY < overallEstModuleSize * 3) {
|
||||||
|
throw NotFoundException.getNotFoundInstance();
|
||||||
|
}
|
||||||
|
|
||||||
AlignmentPatternFinder alignmentFinder =
|
AlignmentPatternFinder alignmentFinder =
|
||||||
new AlignmentPatternFinder(
|
new AlignmentPatternFinder(
|
||||||
|
|
|
@ -273,6 +273,9 @@ Ref<AlignmentPattern> Detector::findAlignmentInRegion(float overallEstModuleSize
|
||||||
}
|
}
|
||||||
int alignmentAreaTopY = max(0, estAlignmentY - allowance);
|
int alignmentAreaTopY = max(0, estAlignmentY - allowance);
|
||||||
int alignmentAreaBottomY = min((int)(image_->getHeight() - 1), estAlignmentY + allowance);
|
int alignmentAreaBottomY = min((int)(image_->getHeight() - 1), estAlignmentY + allowance);
|
||||||
|
if (alignmentAreaBottomY - alignmentAreaTopY < overallEstModuleSize * 3) {
|
||||||
|
throw zxing::ReaderException("region too small to hold alignment pattern");
|
||||||
|
}
|
||||||
|
|
||||||
AlignmentPatternFinder alignmentFinder(image_, alignmentAreaLeftX, alignmentAreaTopY, alignmentAreaRightX
|
AlignmentPatternFinder alignmentFinder(image_, alignmentAreaLeftX, alignmentAreaTopY, alignmentAreaRightX
|
||||||
- alignmentAreaLeftX, alignmentAreaBottomY - alignmentAreaTopY, overallEstModuleSize, callback_);
|
- alignmentAreaLeftX, alignmentAreaBottomY - alignmentAreaTopY, overallEstModuleSize, callback_);
|
||||||
|
|
Loading…
Reference in a new issue