Java 类com.google.zxing.aztec.AztecDetectorResult 实例源码

项目:sres-app    文件:Detector.java   
/**
 * <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);
}
项目:Discounty    文件:Detector.java   
/**
 * 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);
}
项目:reacteu-app    文件:Detector.java   
/**
 * <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);
}
项目:CordovaDemo    文件:Detector.java   
/**
 * <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);
}
项目:ng-cordova-demo    文件:Detector.java   
/**
 * <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);
}
项目:ngCordova-demo    文件:Detector.java   
/**
 * <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);
}
项目:CordovaW8BarcodeDemo    文件:Detector.java   
/**
 * <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);
}
项目:cordova-template    文件:Detector.java   
/**
 * <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);
}
项目:oxPush    文件:Detector.java   
/**
 * <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);
}
项目:hive-ios    文件:Detector.java   
/**
 * <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);
}
项目:dev    文件:Detector.java   
/**
 * <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);
}
项目:ZxingCore    文件:Detector.java   
/**
 * 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);
}
项目:BibSearch    文件:Detector.java   
/**
 * <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);
}
项目:weex-3d-map    文件:Detector.java   
/**
 * 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);
}
项目:weex-3d-map    文件:Decoder.java   
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);
}
项目:boohee_v5.6    文件:Detector.java   
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);
}
项目:PortraitZXing    文件:Detector.java   
/**
 * 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);
}
项目:PortraitZXing    文件:Decoder.java   
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);
}
项目:PortraitZXing    文件:Detector.java   
/**
 * 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);
}
项目:PortraitZXing    文件:Decoder.java   
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);
}
项目:ZXing-Orient    文件:Detector.java   
/**
 * 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);
}
项目:ZXing-Orient    文件:Decoder.java   
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);
}
项目:event-app    文件:Detector.java   
/**
 * 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);
}
项目:event-app    文件:Decoder.java   
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);
}
项目:weex-analyzer-android    文件:Detector.java   
/**
 * 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);
}
项目:weex-analyzer-android    文件:Decoder.java   
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);
}
项目:weex-3d-map    文件:Detector.java   
/**
 * 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);
}
项目:weex-3d-map    文件:Decoder.java   
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);
}
项目:Weex-TestDemo    文件:Detector.java   
/**
 * 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);
}
项目:Weex-TestDemo    文件:Decoder.java   
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);
}
项目:QrScan_Demo    文件:Detector.java   
/**
 * 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);
}
项目:QrScan_Demo    文件:Decoder.java   
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);
}
项目:weex    文件:Detector.java   
/**
 * 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);
}
项目:weex    文件:Decoder.java   
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);
}
项目:TrueTone    文件:Detector.java   
/**
 * 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);
}
项目:TrueTone    文件:Decoder.java   
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);
}
项目:bushido-android-app    文件:Detector.java   
/**
 * 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);
}
项目:bushido-android-app    文件:Decoder.java   
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);
}
项目:Android-Birdcopy-Application    文件:Detector.java   
/**
 * 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);
}
项目:Android-Birdcopy-Application    文件:Decoder.java   
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);
}