当前位置: 首页>>代码示例>>Java>>正文


Java WhiteRectangleDetector类代码示例

本文整理汇总了Java中com.google.zxing.common.detector.WhiteRectangleDetector的典型用法代码示例。如果您正苦于以下问题:Java WhiteRectangleDetector类的具体用法?Java WhiteRectangleDetector怎么用?Java WhiteRectangleDetector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WhiteRectangleDetector类属于com.google.zxing.common.detector包,在下文中一共展示了WhiteRectangleDetector类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Detector

import com.google.zxing.common.detector.WhiteRectangleDetector; //导入依赖的package包/类
public Detector(BitMatrix image) throws NotFoundException {
  this.image = image;
  rectangleDetector = new WhiteRectangleDetector(image);
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:5,代码来源:Detector.java

示例2: getMatrixCenter

import com.google.zxing.common.detector.WhiteRectangleDetector; //导入依赖的package包/类
private Point getMatrixCenter() {
    ResultPoint pointA;
    ResultPoint pointB;
    ResultPoint pointC;
    ResultPoint pointD;
    int cx;
    int cy;
    try {
        ResultPoint[] cornerPoints = new WhiteRectangleDetector(this.image).detect();
        pointA = cornerPoints[0];
        pointB = cornerPoints[1];
        pointC = cornerPoints[2];
        pointD = cornerPoints[3];
    } catch (NotFoundException e) {
        cx = this.image.getWidth() / 2;
        cy = this.image.getHeight() / 2;
        pointA = getFirstDifferent(new Point(cx + 7, cy - 7), false, 1, -1).toResultPoint();
        pointB = getFirstDifferent(new Point(cx + 7, cy + 7), false, 1, 1).toResultPoint();
        pointC = getFirstDifferent(new Point(cx - 7, cy + 7), false, -1, 1).toResultPoint();
        pointD = getFirstDifferent(new Point(cx - 7, cy - 7), false, -1, -1).toResultPoint();
    }
    cx = MathUtils.round((((pointA.getX() + pointD.getX()) + pointB.getX()) + pointC.getX())
            / aj.hA);
    cy = MathUtils.round((((pointA.getY() + pointD.getY()) + pointB.getY()) + pointC.getY())
            / aj.hA);
    try {
        cornerPoints = new WhiteRectangleDetector(this.image, 15, cx, cy).detect();
        pointA = cornerPoints[0];
        pointB = cornerPoints[1];
        pointC = cornerPoints[2];
        pointD = cornerPoints[3];
    } catch (NotFoundException e2) {
        pointA = getFirstDifferent(new Point(cx + 7, cy - 7), false, 1, -1).toResultPoint();
        pointB = getFirstDifferent(new Point(cx + 7, cy + 7), false, 1, 1).toResultPoint();
        pointC = getFirstDifferent(new Point(cx - 7, cy + 7), false, -1, 1).toResultPoint();
        pointD = getFirstDifferent(new Point(cx - 7, cy - 7), false, -1, -1).toResultPoint();
    }
    return new Point(MathUtils.round((((pointA.getX() + pointD.getX()) + pointB.getX()) +
            pointC.getX()) / aj.hA), MathUtils.round((((pointA.getY() + pointD.getY()) +
            pointB.getY()) + pointC.getY()) / aj.hA));
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:42,代码来源:Detector.java

示例3: Detector

import com.google.zxing.common.detector.WhiteRectangleDetector; //导入依赖的package包/类
public Detector(BitMatrix image) throws NotFoundException {
    this.image = image;
    this.rectangleDetector = new WhiteRectangleDetector(image);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:5,代码来源:Detector.java

示例4: Detector

import com.google.zxing.common.detector.WhiteRectangleDetector; //导入依赖的package包/类
public Detector(BitMatrix image) throws NotFoundException {
    this.image = image;
    rectangleDetector = new WhiteRectangleDetector(image);
}
 
开发者ID:Ag47,项目名称:TrueTone,代码行数:5,代码来源:Detector.java

示例5: a

import com.google.zxing.common.detector.WhiteRectangleDetector; //导入依赖的package包/类
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);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:49,代码来源:Detector.java

示例6: Detector

import com.google.zxing.common.detector.WhiteRectangleDetector; //导入依赖的package包/类
public Detector(BitMatrix bitmatrix)
{
    a = bitmatrix;
    b = new WhiteRectangleDetector(bitmatrix);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:6,代码来源:Detector.java

示例7: Detector

import com.google.zxing.common.detector.WhiteRectangleDetector; //导入依赖的package包/类
public Detector(BitMatrix image) throws NotFoundException {
	this.image = image;
	rectangleDetector = new WhiteRectangleDetector(image);
}
 
开发者ID:cping,项目名称:RipplePower,代码行数:5,代码来源:Detector.java


注:本文中的com.google.zxing.common.detector.WhiteRectangleDetector类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。