// Path: cv4j/src/main/java/com/cv4j/core/datamodel/Point.java
// public class Point {
// 
//     public int x;
//     public int y;
// 
//     public Point() {
//     }
// 
//     public Point(int x, int y) {
//         this.x = x;
//         this.y = y;
//     }
// 
// }


import java.util.StringTokenizer;
import java.util.Vector;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import androidx.annotation.NonNull;
import com.cv4j.core.datamodel.Point;
import com.cv4j.core.datamodel.Rect;
import java.io.BufferedReader;
import java.io.StringReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
        double[] minAndMax = new double[2];
        minAndMax[0] = min;
        minAndMax[1] = max;
        return minAndMax;
    }

    public static double[] getMinMax(final float[] a) {
        double min = Double.MAX_VALUE;
        double max = -Double.MAX_VALUE;
        double value;
        for (float anA : a) {
            value = anA;
            if (value < min)
                min = value;
            if (value > max)
                max = value;
        }
        double[] minAndMax = new double[2];
        minAndMax[0] = min;
        minAndMax[1] = max;
        return minAndMax;
    }

    /**
     * 获取图中最大与最小值的位置信息， 0 - 最小值位置， 1 - 最大值位置
     * @param a
     * @param width
     * @param height
     * @return
     */
// Path: cv4j/src/main/java/com/cv4j/core/datamodel/Point.java
// public class Point {
// 
//     public int x;
//     public int y;
// 
//     public Point() {
//     }
// 
//     public Point(int x, int y) {
//         this.x = x;
//         this.y = y;
//     }
// 
// }


// Path: cv4j/src/main/java/com/cv4j/image/util/Tools.java
import java.util.StringTokenizer;
import java.util.Vector;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import androidx.annotation.NonNull;
import com.cv4j.core.datamodel.Point;
import com.cv4j.core.datamodel.Rect;
import java.io.BufferedReader;
import java.io.StringReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

        double[] minAndMax = new double[2];
        minAndMax[0] = min;
        minAndMax[1] = max;
        return minAndMax;
    }

    public static double[] getMinMax(final float[] a) {
        double min = Double.MAX_VALUE;
        double max = -Double.MAX_VALUE;
        double value;
        for (float anA : a) {
            value = anA;
            if (value < min)
                min = value;
            if (value > max)
                max = value;
        }
        double[] minAndMax = new double[2];
        minAndMax[0] = min;
        minAndMax[1] = max;
        return minAndMax;
    }

    /**
     * 获取图中最大与最小值的位置信息， 0 - 最小值位置， 1 - 最大值位置
     * @param a
     * @param width
     * @param height
     * @return
     */
    public static Point[] getMinMaxLoc(final float[] a, int width, int height) {