Java Code Examples for org.opencv.core.MatOfFloat

The following are top voted examples for showing how to use org.opencv.core.MatOfFloat. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: opencv-documentscanner-android   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_0(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj, accumulate);
    
    return;
}
 
Example 2
Project: OpenCV_Android_Plus   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors)
{
    Mat descriptors_mat = descriptors;
    compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj);

    return;
}
 
Example 3
Project: android-imaging-utils   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors)
{
    Mat descriptors_mat = descriptors;
    compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj);
    
    return;
}
 
Example 4
Project: android-age-estimator   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel);
    
    return;
}
 
Example 5
Project: MOAAP   File: PCTSignatures.java   View source code 5 votes vote down vote up
public  void setTranslations(MatOfFloat translations)
{
    Mat translations_mat = translations;
    setTranslations_0(nativeObj, translations_mat.nativeObj);
    
    return;
}
 
Example 6
Project: android-imaging-utils   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel);
    
    return;
}
 
Example 7
Project: FaceDetectDemo   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria, int flags, double minEigThreshold)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_0(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon, flags, minEigThreshold);
    
    return;
}
 
Example 8
Project: Image-Detection-Samples   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_1(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj);
    
    return;
}
 
Example 9
Project: MOAAP   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
{
    Mat descriptors_mat = descriptors;
    Mat locations_mat = locations;
    compute_0(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);
    
    return;
}
 
Example 10
Project: DNNLibrary   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors)
{
    Mat descriptors_mat = descriptors;
    compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj);
    
    return;
}
 
Example 11
Project: opencv-documentscanner-android   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria, int flags, double minEigThreshold)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_0(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon, flags, minEigThreshold);
    
    return;
}
 
Example 12
Project: android-things-drawbot   File: Contrib.java   View source code 5 votes vote down vote up
public static int chamerMatching(Mat img, Mat templ, List<MatOfPoint> results, MatOfFloat cost)
{
    Mat results_mat = new Mat();
    Mat cost_mat = cost;
    int retVal = chamerMatching_1(img.nativeObj, templ.nativeObj, results_mat.nativeObj, cost_mat.nativeObj);
    Converters.Mat_to_vector_vector_Point(results_mat, results);
    results_mat.release();
    return retVal;
}
 
Example 13
Project: MOAAP   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors)
{
    Mat descriptors_mat = descriptors;
    compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj);
    
    return;
}
 
Example 14
Project: NotifyTools   File: Dnn.java   View source code 5 votes vote down vote up
public static void NMSBoxes(MatOfRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
{
    Mat bboxes_mat = bboxes;
    Mat scores_mat = scores;
    Mat indices_mat = indices;
    NMSBoxes_1(bboxes_mat.nativeObj, scores_mat.nativeObj, score_threshold, nms_threshold, indices_mat.nativeObj);
    
    return;
}
 
Example 15
Project: MOAAP   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_0(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj, accumulate);
    
    return;
}
 
Example 16
Project: android-imaging-utils   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
{
    Mat descriptors_mat = descriptors;
    Mat locations_mat = locations;
    compute_0(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);
    
    return;
}
 
Example 17
Project: NotifyTools   File: Photo.java   View source code 5 votes vote down vote up
public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h, int templateWindowSize, int searchWindowSize, int normType)
{
    Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
    Mat h_mat = h;
    fastNlMeansDenoisingMulti_2(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj, templateWindowSize, searchWindowSize, normType);
    
    return;
}
 
Example 18
Project: MOAAP   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
{
    Mat descriptors_mat = descriptors;
    Mat locations_mat = locations;
    compute_0(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);
    
    return;
}
 
Example 19
Project: NotifyTools   File: BRISK.java   View source code 5 votes vote down vote up
public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
{
    Mat radiusList_mat = radiusList;
    Mat numberList_mat = numberList;
    Mat indexChange_mat = indexChange;
    BRISK retVal = new BRISK(create_0(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
    
    return retVal;
}
 
Example 20
Project: NotifyTools   File: BRISK.java   View source code 5 votes vote down vote up
public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList)
{
    Mat radiusList_mat = radiusList;
    Mat numberList_mat = numberList;
    BRISK retVal = new BRISK(create_1(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj));
    
    return retVal;
}
 
Example 21
Project: Team9261-2017-2018   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_2(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj);
    
    return;
}
 
Example 22
Project: Checkerboard-IMU-Comparator   File: Photo.java   View source code 5 votes vote down vote up
public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h, int templateWindowSize, int searchWindowSize, int normType)
{
    Mat h_mat = h;
    fastNlMeansDenoising_2(src.nativeObj, dst.nativeObj, h_mat.nativeObj, templateWindowSize, searchWindowSize, normType);
    
    return;
}
 
Example 23
Project: android-imaging-utils   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat ranges_mat = ranges;
    calcBackProject_0(images_mat.nativeObj, channels_mat.nativeObj, hist.nativeObj, dst.nativeObj, ranges_mat.nativeObj, scale);
    
    return;
}
 
Example 24
Project: android-things-drawbot   File: LineAlgorithm.java   View source code 5 votes vote down vote up
public static int getMedian(Mat mat) {

        ArrayList<Mat> listOfMat = new ArrayList<>();
        listOfMat.add(mat);
        MatOfInt channels = new MatOfInt(0);
        Mat mask = new Mat();
        Mat hist = new Mat(256, 1, CvType.CV_8UC1);
        MatOfInt histSize = new MatOfInt(256);
        MatOfFloat ranges = new MatOfFloat(0, 256);

        Imgproc.calcHist(listOfMat, channels, mask, hist, histSize, ranges);

        double t = mat.rows() * mat.cols() / 2;
        double total = 0;
        int med = -1;
        for (int row = 0; row < hist.rows(); row++) {
            double val = hist.get(row, 0)[0];
            if ((total <= t) && (total + val >= t)) {
                med = row;
                break;
            }
            total += val;
        }

//        Log.d(TAG, String.format("getMedian() = %d", med));

        return med;
    }
 
Example 25
Project: mao-android   File: Photo.java   View source code 5 votes vote down vote up
public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h, int templateWindowSize, int searchWindowSize, int normType)
{
    Mat h_mat = h;
    fastNlMeansDenoising_2(src.nativeObj, dst.nativeObj, h_mat.nativeObj, templateWindowSize, searchWindowSize, normType);
    
    return;
}
 
Example 26
Project: Image-Detection-Samples   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors)
{
    Mat descriptors_mat = descriptors;
    compute_1(nativeObj, img.nativeObj, descriptors_mat.nativeObj);
    
    return;
}
 
Example 27
Project: MOAAP   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_2(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj);
    
    return;
}
 
Example 28
Project: react-native-scan-doc   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat ranges_mat = ranges;
    calcBackProject_0(images_mat.nativeObj, channels_mat.nativeObj, hist.nativeObj, dst.nativeObj, ranges_mat.nativeObj, scale);
    
    return;
}
 
Example 29
Project: Team9261-2017-2018   File: Photo.java   View source code 5 votes vote down vote up
public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h)
{
    Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
    Mat h_mat = h;
    fastNlMeansDenoisingMulti_3(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj);
    
    return;
}
 
Example 30
Project: mao-android   File: BRISK.java   View source code 5 votes vote down vote up
public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
{
    Mat radiusList_mat = radiusList;
    Mat numberList_mat = numberList;
    Mat indexChange_mat = indexChange;
    BRISK retVal = new BRISK(create_2(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
    
    return retVal;
}
 
Example 31
Project: Checkerboard-IMU-Comparator   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat ranges_mat = ranges;
    calcBackProject_0(images_mat.nativeObj, channels_mat.nativeObj, hist.nativeObj, dst.nativeObj, ranges_mat.nativeObj, scale);
    
    return;
}
 
Example 32
Project: MOAAP   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel);
    
    return;
}
 
Example 33
Project: fingerblox   File: Photo.java   View source code 5 votes vote down vote up
public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h)
{
    Mat h_mat = h;
    fastNlMeansDenoising_3(src.nativeObj, dst.nativeObj, h_mat.nativeObj);
    
    return;
}
 
Example 34
Project: android-imaging-utils   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria, int flags, double minEigThreshold)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_0(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon, flags, minEigThreshold);
    
    return;
}
 
Example 35
Project: FaceDetectDemo   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_2(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj);
    
    return;
}
 
Example 36
Project: MOAAP   File: Video.java   View source code 5 votes vote down vote up
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel)
{
    Mat prevPts_mat = prevPts;
    Mat nextPts_mat = nextPts;
    Mat status_mat = status;
    Mat err_mat = err;
    calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel);
    
    return;
}
 
Example 37
Project: Image-Detection-Samples   File: HOGDescriptor.java   View source code 5 votes vote down vote up
public  void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
{
    Mat descriptors_mat = descriptors;
    Mat locations_mat = locations;
    compute_0(nativeObj, img.nativeObj, descriptors_mat.nativeObj, winStride.width, winStride.height, padding.width, padding.height, locations_mat.nativeObj);
    
    return;
}
 
Example 38
Project: android-imaging-utils   File: Photo.java   View source code 5 votes vote down vote up
public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h)
{
    Mat h_mat = h;
    fastNlMeansDenoising_3(src.nativeObj, dst.nativeObj, h_mat.nativeObj);
    
    return;
}
 
Example 39
Project: EyeShopping   File: Photo.java   View source code 5 votes vote down vote up
public static void fastNlMeansDenoising(Mat src, Mat dst, MatOfFloat h)
{
    Mat h_mat = h;
    fastNlMeansDenoising_3(src.nativeObj, dst.nativeObj, h_mat.nativeObj);
    
    return;
}
 
Example 40
Project: MOAAP   File: PCTSignaturesSQFD.java   View source code 5 votes vote down vote up
public  void computeQuadraticFormDistances(Mat sourceSignature, List<Mat> imageSignatures, MatOfFloat distances)
{
    Mat imageSignatures_mat = Converters.vector_Mat_to_Mat(imageSignatures);
    Mat distances_mat = distances;
    computeQuadraticFormDistances_0(nativeObj, sourceSignature.nativeObj, imageSignatures_mat.nativeObj, distances_mat.nativeObj);
    
    return;
}