Java Code Examples for org.opencv.core.MatOfRect

The following are top voted examples for showing how to use org.opencv.core.MatOfRect. 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: fingerblox   File: CascadeClassifier.java   Source Code and License 6 votes vote down vote up
public  void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    detectMultiScale_0(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 2
Project: Sikulix2opencv   File: CascadeClassifier.java   Source Code and License 6 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_0(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
    
    return;
}
 
Example 3
Project: Image-Detection-Samples   File: EyesDetectionInteractorImpl.java   Source Code and License 5 votes vote down vote up
/**
 * <p>Build a template from a specific eye area previously substracted
 * uses detectMultiScale for this area, then uses minMaxLoc method to
 * detect iris from the detected eye</p>
 *
 * @param area Preformatted Area
 * @param size minimum iris size
 * @param grayMat image in gray
 * @param rgbaMat image in color
 * @param detectorEye Haar Cascade classifier
 * @return built template
 */
@NonNull
private static Mat buildTemplate(Rect area, final int size,
                                 @NonNull Mat grayMat,
                                 @NonNull Mat rgbaMat,
                                 CascadeClassifier detectorEye) {
    Mat template = new Mat();
    Mat graySubMatEye = grayMat.submat(area);
    MatOfRect eyes = new MatOfRect();
    Rect eyeTemplate;
    detectorEye.detectMultiScale(graySubMatEye, eyes, 1.15, 2,
            Objdetect.CASCADE_FIND_BIGGEST_OBJECT
                    | Objdetect.CASCADE_SCALE_IMAGE, new Size(EYE_MIN_SIZE, EYE_MIN_SIZE),
            new Size());

    Rect[] eyesArray = eyes.toArray();
    if (eyesArray.length > 0) {
        Rect e = eyesArray[0];
        e.x = area.x + e.x;
        e.y = area.y + e.y;
        Rect eyeRectangle = getEyeArea((int) e.tl().x,
                (int) (e.tl().y + e.height * 0.4),
                e.width,
                (int) (e.height * 0.6));
        graySubMatEye = grayMat.submat(eyeRectangle);
        Mat rgbaMatEye = rgbaMat.submat(eyeRectangle);


        Core.MinMaxLocResult minMaxLoc = Core.minMaxLoc(graySubMatEye);

        FaceDrawerOpenCV.drawIrisCircle(rgbaMatEye, minMaxLoc);
        Point iris = new Point();
        iris.x = minMaxLoc.minLoc.x + eyeRectangle.x;
        iris.y = minMaxLoc.minLoc.y + eyeRectangle.y;
        eyeTemplate = getEyeArea((int) iris.x - size / 2,
                (int) iris.y
                        - size / 2, size, size);
        FaceDrawerOpenCV.drawEyeRectangle(eyeTemplate, rgbaMat);
        template = (grayMat.submat(eyeTemplate)).clone();
    }
    return template;
}
 
Example 4
Project: EyeShopping   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
    
    return;
}
 
Example 5
Project: android-age-estimator   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
    
    return;
}
 
Example 6
Project: NotifyTools   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 7
Project: Checkerboard-IMU-Comparator   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 8
Project: MOAAP   File: MSER.java   Source Code and License 5 votes vote down vote up
public  void detectRegions(Mat image, List<MatOfPoint> msers, MatOfRect bboxes)
{
    Mat msers_mat = new Mat();
    Mat bboxes_mat = bboxes;
    detectRegions_0(nativeObj, image.nativeObj, msers_mat.nativeObj, bboxes_mat.nativeObj);
    Converters.Mat_to_vector_vector_Point(msers_mat, msers);
    msers_mat.release();
    return;
}
 
Example 9
Project: Image-Detection-Samples   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
    
    return;
}
 
Example 10
Project: MOAAP   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
    
    return;
}
 
Example 11
Project: MOAAP   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold, double eps)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_0(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold, eps);
    
    return;
}
 
Example 12
Project: fingerblox   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_0(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
    
    return;
}
 
Example 13
Project: fingerblox   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 14
Project: fingerblox   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold, double eps)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_0(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold, eps);
    
    return;
}
 
Example 15
Project: react-native-scan-doc   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 16
Project: Android-Code-Demos   File: MSER.java   Source Code and License 5 votes vote down vote up
public  void detectRegions(Mat image, List<MatOfPoint> msers, MatOfRect bboxes)
{
    Mat msers_mat = new Mat();
    Mat bboxes_mat = bboxes;
    detectRegions_0(nativeObj, image.nativeObj, msers_mat.nativeObj, bboxes_mat.nativeObj);
    Converters.Mat_to_vector_vector_Point(msers_mat, msers);
    msers_mat.release();
    return;
}
 
Example 17
Project: MOAAP   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 18
Project: Android-Code-Demos   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
    
    return;
}
 
Example 19
Project: Ftc2018RelicRecovery   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 20
Project: android-age-estimator   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 21
Project: Android-Code-Demos   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 22
Project: Android-Code-Demos   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_1(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj);
    
    return;
}
 
Example 23
Project: renderscript_examples   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 24
Project: Checkerboard-IMU-Comparator   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
    
    return;
}
 
Example 25
Project: MOAAP   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 26
Project: Android-Code-Demos   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 27
Project: Ftc2018RelicRecovery   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold, double eps)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_0(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold, eps);
    
    return;
}
 
Example 28
Project: Team9261-2017-2018   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 29
Project: OpenCV_Android_Plus   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);

    return;
}
 
Example 30
Project: MOAAP   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 31
Project: real_time_circle_detection_android   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 32
Project: EyeShopping   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_1(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj);
    
    return;
}
 
Example 33
Project: OpenCV   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 34
Project: MOAAP   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_1(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj);
    
    return;
}
 
Example 35
Project: MOAAP   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 36
Project: Microsphere   File: MSER.java   Source Code and License 5 votes vote down vote up
public  void detectRegions(Mat image, List<MatOfPoint> msers, MatOfRect bboxes)
{
    Mat msers_mat = new Mat();
    Mat bboxes_mat = bboxes;
    detectRegions_0(nativeObj, image.nativeObj, msers_mat.nativeObj, bboxes_mat.nativeObj);
    Converters.Mat_to_vector_vector_Point(msers_mat, msers);
    msers_mat.release();
    return;
}
 
Example 37
Project: FTC2016   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 38
Project: MOAAP   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 39
Project: Android-Crop-Receipt   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);

    return;
}
 
Example 40
Project: android-age-estimator   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    detectMultiScale_0(nativeObj, image.nativeObj, objects_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 41
Project: FaceDetectDemo   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_0(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
    
    return;
}
 
Example 42
Project: MOAAP   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
    
    return;
}
 
Example 43
Project: MOAAP   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
    
    return;
}
 
Example 44
Project: Microsphere   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 45
Project: Microsphere   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold, double eps)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_0(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold, eps);
    
    return;
}
 
Example 46
Project: Microsphere   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 47
Project: FaceDetectDemo   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_1(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj);
    
    return;
}
 
Example 48
Project: react-native-scan-doc   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 49
Project: classchecks   File: ImgprocessUtils.java   Source Code and License 5 votes vote down vote up
/**
	 * 
	* @Title: cutOutImage 
	* @Description: 以Rect坐标裁剪图片 
	* @param src
	* @param mOfRect
	* @return
	* List<Mat> 
	 */
	public static List<Mat> cutOutImage(Mat src, MatOfRect mOfRect) {
		
		List<Mat> outs = new ArrayList<Mat>();
		
		if(src.empty() || mOfRect.toArray().length <= 0) {
			return null;
		}
		
		int enlarge = 50; //  将图片的x,y坐标加大
		for(Rect r : mOfRect.toArray()) {
			int enlargeW = (r.x + enlarge) / r.x;
			int enlargeH = (r.y + enlarge) / r.y;
			r.x -= enlarge;
			r.y -= enlarge;
			r.width += (enlargeW * r.width);
			r.height += (enlargeH * r.height);
			
			// 确定人脸在图像中的整个边界,防止人脸在边框之外
			if (r.x < 0) {
				r.x = 0;
			}
			if (r.y < 0) {
				r.y = 0;
			}
			if (r.x + r.width > src.cols()) {
				r.x = src.cols() - r.width;
			}
			if (r.y + r.height > src.rows()) {
				r.y = src.rows() - r.height;
			}
		
			
			Mat cutting = new Mat(src, r); // 裁剪图片
//			System.out.println(cutting);
			outs.add(cutting);
		}
		return outs;
	}
 
Example 50
Project: Image-Detection-Samples   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 51
Project: MOAAP   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
    
    return;
}
 
Example 52
Project: DogeCV   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 53
Project: Team9261-2017-2018   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
    
    return;
}
 
Example 54
Project: MOAAP   File: MSER.java   Source Code and License 5 votes vote down vote up
public  void detectRegions(Mat image, List<MatOfPoint> msers, MatOfRect bboxes)
{
    Mat msers_mat = new Mat();
    Mat bboxes_mat = bboxes;
    detectRegions_0(nativeObj, image.nativeObj, msers_mat.nativeObj, bboxes_mat.nativeObj);
    Converters.Mat_to_vector_vector_Point(msers_mat, msers);
    msers_mat.release();
    return;
}
 
Example 55
Project: MOAAP   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_0(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
    
    return;
}
 
Example 56
Project: DNNLibrary   File: MSER.java   Source Code and License 5 votes vote down vote up
public  void detectRegions(Mat image, List<MatOfPoint> msers, MatOfRect bboxes)
{
    Mat msers_mat = new Mat();
    Mat bboxes_mat = bboxes;
    detectRegions_0(nativeObj, image.nativeObj, msers_mat.nativeObj, bboxes_mat.nativeObj);
    Converters.Mat_to_vector_vector_Point(msers_mat, msers);
    msers_mat.release();
    return;
}
 
Example 57
Project: DogeCV   File: Objdetect.java   Source Code and License 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 58
Project: android-age-estimator   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat image, MatOfRect objects)
{
    Mat objects_mat = objects;
    detectMultiScale_1(nativeObj, image.nativeObj, objects_mat.nativeObj);
    
    return;
}
 
Example 59
Project: Ftc2018RelicRecovery   File: HOGDescriptor.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj);
    
    return;
}
 
Example 60
Project: RobotIGS   File: CascadeClassifier.java   Source Code and License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_0(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
    
    return;
}