Пример #1
0
  /**
   * @param source
   * @param size
   * @param delta
   * @return Mat
   */
  public static Mat Laplacian(Mat source, int size, int delta) {

    int ddepth = CvType.CV_16S;
    Mat abs_dst, dst;
    Imgproc.GaussianBlur(source, source, new Size(3.0, 3.0), 0);
    Imgproc.GaussianBlur(source, source, new Size(3, 3), 0, 0, Imgproc.BORDER_DEFAULT);
    // cvtColor( src, gray, CV_RGB2GRAY );
    /// Apply Laplace function
    Imgproc.Laplacian(source, source, CvType.CV_16S, size, 1, delta, Imgproc.BORDER_DEFAULT);
    return source;
  }