Example usage for org.opencv.imgproc Imgproc linearPolar

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

Introduction

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

Prototype

public static void linearPolar(Mat src, Mat dst, Point center, double maxRadius, int flags) 

Source Link

Usage

From source file:OCV_LinearPolar.java

License:Open Source License

@Override
public void run(ImageProcessor ip) {
    // srcdst//  ww  w  . j a va 2  s. c om
    int imw = ip.getWidth();
    int imh = ip.getHeight();
    byte[] srcdst_ar = (byte[]) ip.getPixels();

    // mat
    Mat src_mat = new Mat(imh, imw, CvType.CV_8UC1);
    Mat dst_mat = new Mat(imh, imw, CvType.CV_8UC1);

    // run
    src_mat.put(0, 0, srcdst_ar);
    Imgproc.linearPolar(src_mat, dst_mat, new Point(cx, cy), (double) rmax, TYPE_INT[type_ind]);
    dst_mat.get(0, 0, srcdst_ar);
}