com.google.zxing.common.detector.WhiteRectangleDetector Java Examples

The following examples show how to use com.google.zxing.common.detector.WhiteRectangleDetector. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Detector.java    From ZXing-Orient with Apache License 2.0 4 votes vote down vote up
public Detector(BitMatrix image) throws NotFoundException {
  this.image = image;
  rectangleDetector = new WhiteRectangleDetector(image);
}
 
Example #2
Source File: Detector.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 4 votes vote down vote up
public Detector(BitMatrix image) throws NotFoundException {
  this.image = image;
  rectangleDetector = new WhiteRectangleDetector(image);
}
 
Example #3
Source File: Detector.java    From weex with Apache License 2.0 4 votes vote down vote up
public Detector(BitMatrix image) throws NotFoundException {
  this.image = image;
  rectangleDetector = new WhiteRectangleDetector(image);
}
 
Example #4
Source File: Detector.java    From barcodescanner-lib-aar with MIT License 4 votes vote down vote up
public Detector(BitMatrix image) throws NotFoundException {
  this.image = image;
  rectangleDetector = new WhiteRectangleDetector(image);
}
 
Example #5
Source File: Detector.java    From reacteu-app with MIT License 4 votes vote down vote up
public Detector(BitMatrix image) throws NotFoundException {
  this.image = image;
  rectangleDetector = new WhiteRectangleDetector(image);
}
 
Example #6
Source File: Detector.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
private b a()
{
    ResultPoint resultpoint;
    ResultPoint resultpoint1;
    ResultPoint resultpoint2;
    ResultPoint resultpoint3;
    int k;
    int l;
    ResultPoint resultpoint4;
    ResultPoint resultpoint5;
    ResultPoint resultpoint6;
    ResultPoint resultpoint7;
    try
    {
        ResultPoint aresultpoint1[] = (new WhiteRectangleDetector(a)).detect();
        resultpoint = aresultpoint1[0];
        resultpoint1 = aresultpoint1[1];
        resultpoint2 = aresultpoint1[2];
        resultpoint3 = aresultpoint1[3];
    }
    catch (NotFoundException notfoundexception)
    {
        int i = a.getWidth() / 2;
        int j = a.getHeight() / 2;
        resultpoint = a(new b(i + 7, j - 7, null), false, 1, -1).a();
        resultpoint1 = a(new b(i + 7, j + 7, null), false, 1, 1).a();
        resultpoint2 = a(new b(i - 7, j + 7, null), false, -1, 1).a();
        resultpoint3 = a(new b(i - 7, j - 7, null), false, -1, -1).a();
    }
    k = a((resultpoint.getX() + resultpoint3.getX() + resultpoint1.getX() + resultpoint2.getX()) / 4F);
    l = a((resultpoint.getY() + resultpoint3.getY() + resultpoint1.getY() + resultpoint2.getY()) / 4F);
    try
    {
        ResultPoint aresultpoint[] = (new WhiteRectangleDetector(a, 15, k, l)).detect();
        resultpoint4 = aresultpoint[0];
        resultpoint5 = aresultpoint[1];
        resultpoint6 = aresultpoint[2];
        resultpoint7 = aresultpoint[3];
    }
    catch (NotFoundException notfoundexception1)
    {
        resultpoint4 = a(new b(k + 7, l - 7, null), false, 1, -1).a();
        resultpoint5 = a(new b(k + 7, l + 7, null), false, 1, 1).a();
        resultpoint6 = a(new b(k - 7, l + 7, null), false, -1, 1).a();
        resultpoint7 = a(new b(k - 7, l - 7, null), false, -1, -1).a();
    }
    return new b(a((resultpoint4.getX() + resultpoint7.getX() + resultpoint5.getX() + resultpoint6.getX()) / 4F), a((resultpoint4.getY() + resultpoint7.getY() + resultpoint5.getY() + resultpoint6.getY()) / 4F), null);
}
 
Example #7
Source File: Detector.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public Detector(BitMatrix bitmatrix)
{
    a = bitmatrix;
    b = new WhiteRectangleDetector(bitmatrix);
}
 
Example #8
Source File: Detector.java    From RipplePower with Apache License 2.0 4 votes vote down vote up
public Detector(BitMatrix image) throws NotFoundException {
	this.image = image;
	rectangleDetector = new WhiteRectangleDetector(image);
}