Example usage for org.opencv.imgproc Imgproc ellipse

List of usage examples for org.opencv.imgproc Imgproc ellipse

Introduction

In this page you can find the example usage for org.opencv.imgproc Imgproc ellipse.

Prototype

public static void ellipse(Mat img, Point center, Size axes, double angle, double startAngle, double endAngle,
            Scalar color) 

Source Link

Usage

From source file:samples.LWF.java

private static void save_meshed_images(double[][] puntos, File carpetaalmacen, File image, Mat mat,
        int[][] delaunay_triangles) {
    Mat mat_copy = mat.clone();//from  ww  w  .  jav  a  2  s. c  o  m
    int radii = 1000;
    for (double[] punto : puntos) {
        Imgproc.ellipse(mat_copy, new Point(punto), new Size(radii, radii), 0, 0, 0, new Scalar(0, 255, 0));
        //            Imgproc.line(mat_copy, null, null, null);
    }
    for (int[] tri : faceTemplateTriangles) {
        Imgproc.line(mat_copy, new Point(puntos[tri[0] - 1]), new Point(puntos[tri[1] - 1]),
                new Scalar(0, 255, 0));
        Imgproc.line(mat_copy, new Point(puntos[tri[1] - 1]), new Point(puntos[tri[2] - 1]),
                new Scalar(0, 255, 0));
        Imgproc.line(mat_copy, new Point(puntos[tri[2] - 1]), new Point(puntos[tri[0] - 1]),
                new Scalar(0, 255, 0));
    }
    Imgcodecs.imwrite(carpetaalmacen.getAbsolutePath() + "\\" + image.getName(), mat_copy);
}