org.opencv.core.Point.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中org.opencv.core.Point.<init>()方法的一些代码示例,展示了Point.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.<init>()方法的具体详情如下:
包路径:org.opencv.core.Point
类名称:Point
方法名:<init>

Point.<init>介绍

暂无

代码示例

代码示例来源:origin: RaiMan/SikuliX2

private List<MatOfPoint> elementToPoints(Element element) {
 List<Point> points = new ArrayList<>();
 points.add(new Point(element.x, element.y));
 points.add(new Point(element.x + element.w, element.y));
 points.add(new Point(element.x + element.w, element.y + element.h));
 points.add(new Point(element.x, element.y + element.h));
 MatOfPoint mPoints = new MatOfPoint();
 mPoints.fromList(points);
 List<MatOfPoint> finalPoints = new ArrayList<MatOfPoint>();
 finalPoints.add(mPoints);
 return finalPoints;
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public MinMaxLocResult() {
    minVal=0; maxVal=0;
    minLoc=new Point();
    maxLoc=new Point();
  }
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id)
{
  pt = new Point(x, y);
  size = _size;
  angle = _angle;
  response = _response;
  octave = _octave;
  class_id = _class_id;
}

代码示例来源:origin: farkam135/GoIV

public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id)
{
  pt = new Point(x, y);
  size = _size;
  angle = _angle;
  response = _response;
  octave = _octave;
  class_id = _class_id;
}

代码示例来源:origin: farkam135/GoIV

public MinMaxLocResult() {
    minVal=0; maxVal=0;
    minLoc=new Point();
    maxLoc=new Point();
  }
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public  Point getVertex(int vertex, int[] firstEdge)
{
  double[] firstEdge_out = new double[1];
  Point retVal = new Point(getVertex_0(nativeObj, vertex, firstEdge_out));
  if(firstEdge!=null) firstEdge[0] = (int)firstEdge_out[0];
  return retVal;
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public RotatedRect() {
  this.center = new Point();
  this.size = new Size();
  this.angle = 0;
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public static Point phaseCorrelate(Mat src1, Mat src2, Mat window, double[] response)
{
  double[] response_out = new double[1];
  Point retVal = new Point(phaseCorrelate_0(src1.nativeObj, src2.nativeObj, window.nativeObj, response_out));
  if(response!=null) response[0] = (double)response_out[0];
  return retVal;
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public static Point phaseCorrelate(Mat src1, Mat src2)
{
  
  Point retVal = new Point(phaseCorrelate_1(src1.nativeObj, src2.nativeObj));
  
  return retVal;
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public  Point calculateShift(Mat img0, Mat img1)
{
  
  Point retVal = new Point(calculateShift_0(nativeObj, img0.nativeObj, img1.nativeObj));
  
  return retVal;
}

代码示例来源:origin: farkam135/GoIV

public  Point getVertex(int vertex)
{
  
  Point retVal = new Point(getVertex_1(nativeObj, vertex));
  
  return retVal;
}

代码示例来源:origin: farkam135/GoIV

public  Point calculateShift(Mat img0, Mat img1)
{
  
  Point retVal = new Point(calculateShift_0(nativeObj, img0.nativeObj, img1.nativeObj));
  
  return retVal;
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public  Point getVertex(int vertex)
{
  
  Point retVal = new Point(getVertex_1(nativeObj, vertex));
  
  return retVal;
}

代码示例来源:origin: tz28/Chinese-number-gestures-recognition

public  Point calculateShift(Mat img0, Mat img1)
{
  
  Point retVal = new Point(calculateShift_0(nativeObj, img0.nativeObj, img1.nativeObj));
  
  return retVal;
}

代码示例来源:origin: openpnp/openpnp

public FluentCv convertCirclesToPoints(List<Point> points) {
  for (int i = 0; i < mat.cols(); i++) {
    double[] circle = mat.get(0, i);
    double x = circle[0];
    double y = circle[1];
    points.add(new Point(x, y));
  }
  return this;
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public Point[] toArray() {
  int num = (int) total();
  Point[] ap = new Point[num];
  if(num == 0)
    return ap;
  float buff[] = new float[num * _channels];
  get(0, 0, buff); //TODO: check ret val!
  for(int i=0; i<num; i++)
    ap[i] = new Point(buff[i*_channels], buff[i*_channels+1]);
  return ap;
}

代码示例来源:origin: kongqw/OpenCVForAndroid

public Point[] toArray() {
  int num = (int) total();
  Point[] ap = new Point[num];
  if(num == 0)
    return ap;
  int buff[] = new int[num * _channels];
  get(0, 0, buff); //TODO: check ret val!
  for(int i=0; i<num; i++)
    ap[i] = new Point(buff[i*_channels], buff[i*_channels+1]);
  return ap;
}

代码示例来源:origin: farkam135/GoIV

public Point[] toArray() {
  int num = (int) total();
  Point[] ap = new Point[num];
  if(num == 0)
    return ap;
  int buff[] = new int[num * _channels];
  get(0, 0, buff); //TODO: check ret val!
  for(int i=0; i<num; i++)
    ap[i] = new Point(buff[i*_channels], buff[i*_channels+1]);
  return ap;
}

代码示例来源:origin: openpnp/openpnp

private void drawCircles(Mat mat, List<CvStage.Result.Circle> circles, int numToDraw, Color color) {
  Color centerColor = new HslColor(color).getComplementary();
  numToDraw = (numToDraw <= circles.size()) ? numToDraw : circles.size();
  for (int i=0; i<numToDraw; i++) {
    CvStage.Result.Circle circle = circles.get(i);
    double x = circle.x;
    double y = circle.y;
    double radius = circle.diameter / 2.0;
    Imgproc.circle(mat, new Point(x, y), (int) radius, FluentCv.colorToScalar(color), 2);
    Imgproc.circle(mat, new Point(x, y), 1, FluentCv.colorToScalar(centerColor), 2);
  }
}

代码示例来源:origin: openpnp/openpnp

public static Mat drawCircles(Mat mat, Mat circles) {
  for (int i = 0; i < circles.cols(); i++) {
    double[] circle = circles.get(0, i);
    double x = circle[0];
    double y = circle[1];
    double radius = circle[2];
    Imgproc.circle(mat, new Point(x, y), (int) radius, new Scalar(0, 0, 255, 255), 2);
    Imgproc.circle(mat, new Point(x, y), 1, new Scalar(0, 255, 0, 255), 2);
  }
  return mat;
}

相关文章