Example usage for org.opencv.core Core norm

List of usage examples for org.opencv.core Core norm

Introduction

In this page you can find the example usage for org.opencv.core Core norm.

Prototype

public static double norm(Mat src1) 

Source Link

Usage

From source file:com.android.cts.verifier.sensors.RVCVXCheckAnalyzer.java

License:Apache License

private static Mat rodr2quat(Mat rodr) {
    double t = Core.norm(rodr);
    double[] r = new double[3];
    rodr.get(0, 0, r);//w w w  .ja va2  s. c  om

    double[] quat = { Math.cos(t / 2), Math.sin(t / 2) * r[0] / t, Math.sin(t / 2) * r[1] / t,
            Math.sin(t / 2) * r[2] / t };
    Mat quatm = new Mat(4, 1, CvType.CV_64F);
    quatm.put(0, 0, quat);
    return quatm;
}