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


Java AztecDetectorResult类代码示例

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


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

示例1: detect

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
/**
 * <p>Detects an Aztec Code in an image.</p>
 *
 * @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
 * @throws NotFoundException if no Aztec Code can be found
 */
public AztecDetectorResult detect() throws NotFoundException {

  // 1. Get the center of the aztec matrix
   Point pCenter = getMatrixCenter();

   // 2. Get the corners of the center bull's eye
   Point[] bullEyeCornerPoints = getBullEyeCornerPoints(pCenter);

   // 3. Get the size of the matrix from the bull's eye
  extractParameters(bullEyeCornerPoints);
  
  // 4. Get the corners of the matrix
  ResultPoint[] corners = getMatrixCornerPoints(bullEyeCornerPoints);
  
  // 5. Sample the grid
  BitMatrix bits = sampleGrid(image, corners[shift%4], corners[(shift+3)%4], corners[(shift+2)%4], corners[(shift+1)%4]);
  
  return new AztecDetectorResult(bits, corners, compact, nbDataBlocks, nbLayers);
}
 
开发者ID:atomsheep,项目名称:sres-app,代码行数:26,代码来源:Detector.java

示例2: detect

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
/**
 * Detects an Aztec Code in an image.
 *
 * @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
 * @throws NotFoundException if no Aztec Code can be found
 */
public AztecDetectorResult detect() throws NotFoundException {

    // 1. Get the center of the aztec matrix
    Point pCenter = getMatrixCenter();

    // 2. Get the corners of the center bull's eye
    Point[] bullEyeCornerPoints = getBullEyeCornerPoints(pCenter);

    // 3. Get the size of the matrix from the bull's eye
    extractParameters(bullEyeCornerPoints);

    // 4. Get the corners of the matrix
    ResultPoint[] corners = getMatrixCornerPoints(bullEyeCornerPoints);

    // 5. Sample the grid
    BitMatrix bits = sampleGrid(image, corners[shift % 4], corners[(shift + 3) % 4], corners[(shift + 2) % 4], corners[(shift + 1) % 4]);

    return new AztecDetectorResult(bits, corners, compact, nbDataBlocks, nbLayers);
}
 
开发者ID:yakovenkodenis,项目名称:Discounty,代码行数:26,代码来源:Detector.java

示例3: detect

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
/**
 * Detects an Aztec Code in an image.
 *
 * @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
 * @throws NotFoundException if no Aztec Code can be found
 */
public AztecDetectorResult detect() throws NotFoundException {

  // 1. Get the center of the aztec matrix
   Point pCenter = getMatrixCenter();

   // 2. Get the corners of the center bull's eye
   Point[] bullEyeCornerPoints = getBullEyeCornerPoints(pCenter);

   // 3. Get the size of the matrix from the bull's eye
  extractParameters(bullEyeCornerPoints);
  
  // 4. Get the corners of the matrix
  ResultPoint[] corners = getMatrixCornerPoints(bullEyeCornerPoints);
  
  // 5. Sample the grid
  BitMatrix bits = sampleGrid(image, corners[shift%4], corners[(shift+3)%4], corners[(shift+2)%4], corners[(shift+1)%4]);
  
  return new AztecDetectorResult(bits, corners, compact, nbDataBlocks, nbLayers);
}
 
开发者ID:yinglovezhuzhu,项目名称:ZxingCore,代码行数:26,代码来源:Detector.java

示例4: detect

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
/**
 * Detects an Aztec Code in an image.
 *
 * @param isMirror if true, image is a mirror-image of original
 * @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
 * @throws NotFoundException if no Aztec Code can be found
 */
 public AztecDetectorResult detect(boolean isMirror) throws NotFoundException {

  // 1. Get the center of the aztec matrix
  Point pCenter = getMatrixCenter();

  // 2. Get the center points of the four diagonal points just outside the bull's eye
  //  [topRight, bottomRight, bottomLeft, topLeft]
  ResultPoint[] bullsEyeCorners = getBullsEyeCorners(pCenter);

  if (isMirror) {
    ResultPoint temp = bullsEyeCorners[0];
    bullsEyeCorners[0] = bullsEyeCorners[2];
    bullsEyeCorners[2] = temp;
  }

  // 3. Get the size of the matrix and other parameters from the bull's eye
  extractParameters(bullsEyeCorners);
  
  // 4. Sample the grid
  BitMatrix bits = sampleGrid(image,
                              bullsEyeCorners[shift % 4], 
                              bullsEyeCorners[(shift + 1) % 4],
                              bullsEyeCorners[(shift + 2) % 4], 
                              bullsEyeCorners[(shift + 3) % 4]);

  // 5. Get the corners of the matrix.
  ResultPoint[] corners = getMatrixCornerPoints(bullsEyeCorners);
  
  return new AztecDetectorResult(bits, corners, compact, nbDataBlocks, nbLayers);
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:38,代码来源:Detector.java

示例5: decode

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
public DecoderResult decode(AztecDetectorResult detectorResult) throws FormatException {
  ddata = detectorResult;
  BitMatrix matrix = detectorResult.getBits();
  boolean[] rawbits = extractBits(matrix);
  boolean[] correctedBits = correctBits(rawbits);
  String result = getEncodedData(correctedBits);
  return new DecoderResult(null, result, null, null);
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:9,代码来源:Decoder.java

示例6: detect

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
public AztecDetectorResult detect(boolean isMirror) throws NotFoundException {
    ResultPoint[] bullsEyeCorners = getBullsEyeCorners(getMatrixCenter());
    if (isMirror) {
        ResultPoint temp = bullsEyeCorners[0];
        bullsEyeCorners[0] = bullsEyeCorners[2];
        bullsEyeCorners[2] = temp;
    }
    extractParameters(bullsEyeCorners);
    return new AztecDetectorResult(sampleGrid(this.image, bullsEyeCorners[this.shift % 4],
            bullsEyeCorners[(this.shift + 1) % 4], bullsEyeCorners[(this.shift + 2) % 4],
            bullsEyeCorners[(this.shift + 3) % 4]), getMatrixCornerPoints(bullsEyeCorners),
            this.compact, this.nbDataBlocks, this.nbLayers);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:14,代码来源:Detector.java

示例7: decode

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
public DecoderResult decode(AztecDetectorResult detectorResult) throws FormatException {
  ddata = detectorResult;
  BitMatrix matrix = detectorResult.getBits();
  boolean[] rawbits = extractBits(matrix);
  boolean[] correctedBits = correctBits(rawbits);
  byte[] rawBytes = convertBoolArrayToByteArray(correctedBits);
  String result = getEncodedData(correctedBits);
  return new DecoderResult(rawBytes, result, null, null);
}
 
开发者ID:xiong-it,项目名称:PortraitZXing,代码行数:10,代码来源:Decoder.java

示例8: detect

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
/**
 * Detects an Aztec Code in an image.
 *
 * @param isMirror if true, image is a mirror-image of original
 * @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
 * @throws NotFoundException if no Aztec Code can be found
 */
public AztecDetectorResult detect(boolean isMirror) throws NotFoundException {

    // 1. Get the center of the aztec matrix
    Point pCenter = getMatrixCenter();

    // 2. Get the center points of the four diagonal points just outside the bull's eye
    //  [topRight, bottomRight, bottomLeft, topLeft]
    ResultPoint[] bullsEyeCorners = getBullsEyeCorners(pCenter);

    if (isMirror) {
        ResultPoint temp = bullsEyeCorners[0];
        bullsEyeCorners[0] = bullsEyeCorners[2];
        bullsEyeCorners[2] = temp;
    }

    // 3. Get the size of the matrix and other parameters from the bull's eye
    extractParameters(bullsEyeCorners);

    // 4. Sample the grid
    BitMatrix bits = sampleGrid(image,
            bullsEyeCorners[shift % 4],
            bullsEyeCorners[(shift + 1) % 4],
            bullsEyeCorners[(shift + 2) % 4],
            bullsEyeCorners[(shift + 3) % 4]);

    // 5. Get the corners of the matrix.
    ResultPoint[] corners = getMatrixCornerPoints(bullsEyeCorners);

    return new AztecDetectorResult(bits, corners, compact, nbDataBlocks, nbLayers);
}
 
开发者ID:Ag47,项目名称:TrueTone,代码行数:38,代码来源:Detector.java

示例9: decode

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
public DecoderResult decode(AztecDetectorResult detectorResult) throws FormatException {
    ddata = detectorResult;
    BitMatrix matrix = detectorResult.getBits();
    boolean[] rawbits = extractBits(matrix);
    boolean[] correctedBits = correctBits(rawbits);
    String result = getEncodedData(correctedBits);
    return new DecoderResult(null, result, null, null);
}
 
开发者ID:Ag47,项目名称:TrueTone,代码行数:9,代码来源:Decoder.java

示例10: detect

import com.google.zxing.aztec.AztecDetectorResult; //导入依赖的package包/类
/**
 * Detects an Aztec Code in an image.
 *
 * @param isMirror if true, image is a mirror-image of original
 * @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
 * @throws com.google.zxing.NotFoundException if no Aztec Code can be found
 */
 public AztecDetectorResult detect(boolean isMirror) throws NotFoundException {

  // 1. Get the center of the aztec matrix
  Point pCenter = getMatrixCenter();

  // 2. Get the center points of the four diagonal points just outside the bull's eye
  //  [topRight, bottomRight, bottomLeft, topLeft]
  ResultPoint[] bullsEyeCorners = getBullsEyeCorners(pCenter);

  if (isMirror) {
    ResultPoint temp = bullsEyeCorners[0];
    bullsEyeCorners[0] = bullsEyeCorners[2];
    bullsEyeCorners[2] = temp;
  }

  // 3. Get the size of the matrix and other parameters from the bull's eye
  extractParameters(bullsEyeCorners);
  
  // 4. Sample the grid
  BitMatrix bits = sampleGrid(image,
                              bullsEyeCorners[shift % 4], 
                              bullsEyeCorners[(shift + 1) % 4],
                              bullsEyeCorners[(shift + 2) % 4], 
                              bullsEyeCorners[(shift + 3) % 4]);

  // 5. Get the corners of the matrix.
  ResultPoint[] corners = getMatrixCornerPoints(bullsEyeCorners);
  
  return new AztecDetectorResult(bits, corners, compact, nbDataBlocks, nbLayers);
}
 
开发者ID:bushidowallet,项目名称:bushido-android-app,代码行数:38,代码来源:Detector.java


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