当前位置: 首页>>代码示例>>Java>>正文


Java MatOfRect类代码示例

本文整理汇总了Java中org.opencv.core.MatOfRect的典型用法代码示例。如果您正苦于以下问题:Java MatOfRect类的具体用法?Java MatOfRect怎么用?Java MatOfRect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MatOfRect类属于org.opencv.core包,在下文中一共展示了MatOfRect类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: detectMultiScale

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:jorenham,项目名称:fingerblox,代码行数:8,代码来源:CascadeClassifier.java

示例2: detectMultiScale3

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:RaiMan,项目名称:Sikulix2opencv,代码行数:10,代码来源:CascadeClassifier.java

示例3: buildTemplate

import org.opencv.core.MatOfRect; //导入依赖的package包/类
/**
 * <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;
}
 
开发者ID:raulh82vlc,项目名称:Image-Detection-Samples,代码行数:54,代码来源:EyesDetectionInteractorImpl.java

示例4: detectMultiScale

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:jmpaaak,项目名称:EyeShopping,代码行数:9,代码来源:HOGDescriptor.java

示例5: detectMultiScale

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:spacejake,项目名称:android-age-estimator,代码行数:9,代码来源:HOGDescriptor.java

示例6: groupRectangles

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:9,代码来源:Objdetect.java

示例7: detectMultiScale3

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:PawelTypiak,项目名称:Checkerboard-IMU-Comparator,代码行数:10,代码来源:CascadeClassifier.java

示例8: detectRegions

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:10,代码来源:MSER.java

示例9: groupRectangles

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:9,代码来源:Objdetect.java

示例10: detectMultiScale2

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:9,代码来源:CascadeClassifier.java

示例11: detectMultiScale

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:wblgers,项目名称:OpenCV_Android_Plus,代码行数:9,代码来源:HOGDescriptor.java

示例12: detectMultiScale2

import org.opencv.core.MatOfRect; //导入依赖的package包/类
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;
}
 
开发者ID:jmpaaak,项目名称:EyeShopping,代码行数:9,代码来源:CascadeClassifier.java


注:本文中的org.opencv.core.MatOfRect类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。