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


Java PerspectiveTransform类代码示例

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


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

示例1: createTransform

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
private static PerspectiveTransform createTransform(ResultPoint topLeft, ResultPoint
        topRight, ResultPoint bottomLeft, ResultPoint alignmentPattern, int dimension) {
    float bottomRightX;
    float bottomRightY;
    float sourceBottomRightX;
    float sourceBottomRightY;
    float dimMinusThree = ((float) dimension) - 3.5f;
    if (alignmentPattern != null) {
        bottomRightX = alignmentPattern.getX();
        bottomRightY = alignmentPattern.getY();
        sourceBottomRightX = dimMinusThree - IPhotoView.DEFAULT_MAX_SCALE;
        sourceBottomRightY = sourceBottomRightX;
    } else {
        bottomRightX = (topRight.getX() - topLeft.getX()) + bottomLeft.getX();
        bottomRightY = (topRight.getY() - topLeft.getY()) + bottomLeft.getY();
        sourceBottomRightX = dimMinusThree;
        sourceBottomRightY = dimMinusThree;
    }
    return PerspectiveTransform.quadrilateralToQuadrilateral(3.5f, 3.5f, dimMinusThree, 3.5f,
            sourceBottomRightX, sourceBottomRightY, 3.5f, dimMinusThree, topLeft.getX(),
            topLeft.getY(), topRight.getX(), topRight.getY(), bottomRightX, bottomRightY,
            bottomLeft.getX(), bottomLeft.getY());
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:24,代码来源:Detector.java

示例2: createTransform

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
public static PerspectiveTransform createTransform(ResultPoint resultpoint, ResultPoint resultpoint1, ResultPoint resultpoint2, ResultPoint resultpoint3, int i)
{
    float f = (float)i - 3.5F;
    float f1;
    float f2;
    float f3;
    float f4;
    if (resultpoint3 != null)
    {
        f1 = resultpoint3.getX();
        f2 = resultpoint3.getY();
        f3 = f - 3F;
        f4 = f3;
    } else
    {
        f1 = (resultpoint1.getX() - resultpoint.getX()) + resultpoint2.getX();
        f2 = (resultpoint1.getY() - resultpoint.getY()) + resultpoint2.getY();
        f3 = f;
        f4 = f;
    }
    return PerspectiveTransform.quadrilateralToQuadrilateral(3.5F, 3.5F, f, 3.5F, f4, f3, 3.5F, f, resultpoint.getX(), resultpoint.getY(), resultpoint1.getX(), resultpoint1.getY(), f1, f2, resultpoint2.getX(), resultpoint2.getY());
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:23,代码来源:Detector.java

示例3: createTransform

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
private static PerspectiveTransform createTransform(ResultPoint topLeft, ResultPoint topRight,
		ResultPoint bottomLeft, ResultPoint alignmentPattern, int dimension) {
	float dimMinusThree = (float) dimension - 3.5f;
	float bottomRightX;
	float bottomRightY;
	float sourceBottomRightX;
	float sourceBottomRightY;
	if (alignmentPattern != null) {
		bottomRightX = alignmentPattern.getX();
		bottomRightY = alignmentPattern.getY();
		sourceBottomRightX = dimMinusThree - 3.0f;
		sourceBottomRightY = sourceBottomRightX;
	} else {
		// Don't have an alignment pattern, just make up the bottom-right
		// point
		bottomRightX = (topRight.getX() - topLeft.getX()) + bottomLeft.getX();
		bottomRightY = (topRight.getY() - topLeft.getY()) + bottomLeft.getY();
		sourceBottomRightX = dimMinusThree;
		sourceBottomRightY = dimMinusThree;
	}

	return PerspectiveTransform.quadrilateralToQuadrilateral(3.5f, 3.5f, dimMinusThree, 3.5f, sourceBottomRightX,
			sourceBottomRightY, 3.5f, dimMinusThree, topLeft.getX(), topLeft.getY(), topRight.getX(),
			topRight.getY(), bottomRightX, bottomRightY, bottomLeft.getX(), bottomLeft.getY());
}
 
开发者ID:cping,项目名称:RipplePower,代码行数:26,代码来源:Detector.java

示例4: createTransform

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
public static PerspectiveTransform createTransform(ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, ResultPoint alignmentPattern,
        int dimension) {
    float dimMinusThree = (float) dimension - 3.5f;
    float bottomRightX;
    float bottomRightY;
    float sourceBottomRightX;
    float sourceBottomRightY;
    if (alignmentPattern != null) {
        bottomRightX = alignmentPattern.getX();
        bottomRightY = alignmentPattern.getY();
        sourceBottomRightX = sourceBottomRightY = dimMinusThree - 3.0f;
    } else {
        // Don't have an alignment pattern, just make up the bottom-right
        // point
        bottomRightX = (topRight.getX() - topLeft.getX()) + bottomLeft.getX();
        bottomRightY = (topRight.getY() - topLeft.getY()) + bottomLeft.getY();
        sourceBottomRightX = sourceBottomRightY = dimMinusThree;
    }

    return PerspectiveTransform.quadrilateralToQuadrilateral(3.5f, 3.5f, dimMinusThree, 3.5f, sourceBottomRightX, sourceBottomRightY, 3.5f, dimMinusThree,
            topLeft.getX(), topLeft.getY(), topRight.getX(), topRight.getY(), bottomRightX, bottomRightY, bottomLeft.getX(), bottomLeft.getY());
}
 
开发者ID:barterli,项目名称:barterli_android,代码行数:23,代码来源:Detector.java

示例5: createTransform

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
public static PerspectiveTransform createTransform(ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, ResultPoint alignmentPattern, int dimension) {
    float dimMinusThree = dimension - 3.5f;
    float bottomRightX;
    float bottomRightY;
    float sourceBottomRightX;
    float sourceBottomRightY;
    if (alignmentPattern != null) {
        bottomRightX = alignmentPattern.getX();
        bottomRightY = alignmentPattern.getY();
        sourceBottomRightX = sourceBottomRightY = dimMinusThree - 3.0f;
    } else {
        // Don't have an alignment pattern, just make up the bottom-right
        // point
        bottomRightX = (topRight.getX() - topLeft.getX()) + bottomLeft.getX();
        bottomRightY = (topRight.getY() - topLeft.getY()) + bottomLeft.getY();
        sourceBottomRightX = sourceBottomRightY = dimMinusThree;
    }

    return PerspectiveTransform.quadrilateralToQuadrilateral(3.5f, 3.5f, dimMinusThree, 3.5f, sourceBottomRightX, sourceBottomRightY, 3.5f, dimMinusThree,
            topLeft.getX(), topLeft.getY(), topRight.getX(), topRight.getY(), bottomRightX, bottomRightY, bottomLeft.getX(), bottomLeft.getY());
}
 
开发者ID:phishman3579,项目名称:android-quick-response-code,代码行数:22,代码来源:Detector.java

示例6: sampleGrid

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
private static BitMatrix sampleGrid(BitMatrix image,
                                    PerspectiveTransform transform,
                                    int dimension) throws NotFoundException {

  GridSampler sampler = GridSampler.getInstance();
  return sampler.sampleGrid(image, dimension, dimension, transform);
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:8,代码来源:Detector.java

示例7: sampleGrid

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
private static BitMatrix sampleGrid(BitMatrix image,
                                    PerspectiveTransform transform,
                                    int dimension) throws NotFoundException {

    GridSampler sampler = GridSampler.getInstance();
    return sampler.sampleGrid(image, dimension, dimension, transform);
}
 
开发者ID:Ag47,项目名称:TrueTone,代码行数:8,代码来源:Detector.java

示例8: createTransform

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
public static PerspectiveTransform createTransform(ResultPoint topLeft,
                                                   ResultPoint topRight,
                                                   ResultPoint bottomLeft,
                                                   ResultPoint alignmentPattern,
                                                   int dimension) {
  float dimMinusThree = (float) dimension - 3.5f;
  float bottomRightX;
  float bottomRightY;
  float sourceBottomRightX;
  float sourceBottomRightY;
  if (alignmentPattern != null) {
    bottomRightX = alignmentPattern.getX();
    bottomRightY = alignmentPattern.getY();
    sourceBottomRightX = sourceBottomRightY = dimMinusThree - 3.0f;
  } else {
    // Don't have an alignment pattern, just make up the bottom-right point
    bottomRightX = (topRight.getX() - topLeft.getX()) + bottomLeft.getX();
    bottomRightY = (topRight.getY() - topLeft.getY()) + bottomLeft.getY();
    sourceBottomRightX = sourceBottomRightY = dimMinusThree;
  }

  return PerspectiveTransform.quadrilateralToQuadrilateral(
      3.5f,
      3.5f,
      dimMinusThree,
      3.5f,
      sourceBottomRightX,
      sourceBottomRightY,
      3.5f,
      dimMinusThree,
      topLeft.getX(),
      topLeft.getY(),
      topRight.getX(),
      topRight.getY(),
      bottomRightX,
      bottomRightY,
      bottomLeft.getX(),
      bottomLeft.getY());
}
 
开发者ID:emdete,项目名称:Simplicissimus,代码行数:40,代码来源:Detector.java

示例9: createTransform

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
private static PerspectiveTransform createTransform(ResultPoint topLeft,
		ResultPoint topRight, ResultPoint bottomLeft,
		ResultPoint alignmentPattern, int dimension) {
	float dimMinusThree = (float) dimension - 3.5f;
	float bottomRightX;
	float bottomRightY;
	float sourceBottomRightX;
	float sourceBottomRightY;
	if (alignmentPattern != null) {
		bottomRightX = alignmentPattern.getX();
		bottomRightY = alignmentPattern.getY();
		sourceBottomRightX = dimMinusThree - 3.0f;
		sourceBottomRightY = sourceBottomRightX;
	} else {
		// Don't have an alignment pattern, just make up the bottom-right
		// point
		bottomRightX = (topRight.getX() - topLeft.getX())
				+ bottomLeft.getX();
		bottomRightY = (topRight.getY() - topLeft.getY())
				+ bottomLeft.getY();
		sourceBottomRightX = dimMinusThree;
		sourceBottomRightY = dimMinusThree;
	}

	return PerspectiveTransform.quadrilateralToQuadrilateral(3.5f, 3.5f,
               dimMinusThree, 3.5f, sourceBottomRightX, sourceBottomRightY,
               3.5f, dimMinusThree, topLeft.getX(), topLeft.getY(),
               topRight.getX(), topRight.getY(), bottomRightX, bottomRightY,
               bottomLeft.getX(), bottomLeft.getY());
}
 
开发者ID:Tinker-S,项目名称:FaceBarCodeDemo,代码行数:31,代码来源:Detector.java

示例10: sampleGrid

import com.google.zxing.common.PerspectiveTransform; //导入依赖的package包/类
private static BitMatrix sampleGrid(BitMatrix image,
		PerspectiveTransform transform, int dimension)
		throws NotFoundException {

	GridSampler sampler = GridSampler.getInstance();
	return sampler.sampleGrid(image, dimension, dimension, transform);
}
 
开发者ID:Tinker-S,项目名称:FaceBarCodeDemo,代码行数:8,代码来源:Detector.java


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