java类org.opencv.core.Rect的实例源码

Video.java 文件源码 项目:fingerblox 阅读 18 收藏 0 点赞 0 评论 0
public static int meanShift(Mat probImage, Rect window, TermCriteria criteria)
{
    double[] window_out = new double[4];
    int retVal = meanShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon);
    if(window!=null){ window.x = (int)window_out[0]; window.y = (int)window_out[1]; window.width = (int)window_out[2]; window.height = (int)window_out[3]; } 
    return retVal;
}
Video.java 文件源码 项目:MOAAP 阅读 23 收藏 0 点赞 0 评论 0
public static int meanShift(Mat probImage, Rect window, TermCriteria criteria)
{
    double[] window_out = new double[4];
    int retVal = meanShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon);
    if(window!=null){ window.x = (int)window_out[0]; window.y = (int)window_out[1]; window.width = (int)window_out[2]; window.height = (int)window_out[3]; } 
    return retVal;
}
Imgproc.java 文件源码 项目:renderscript_examples 阅读 22 收藏 0 点赞 0 评论 0
public static Rect boundingRect(MatOfPoint points)
{
    Mat points_mat = points;
    Rect retVal = new Rect(boundingRect_0(points_mat.nativeObj));

    return retVal;
}
Camera.java 文件源码 项目:Face-detection-and-recognition-desktop-application 阅读 20 收藏 0 点赞 0 评论 0
@Override
public void run() {
    synchronized (this) {
        while (runnable) {
            if (webSource.grab()) {
                try {
                    webSource.retrieve(fm);
                    Graphics g = jPanel1.getGraphics();
                    faceDetector.detectMultiScale(fm, faceDetections);
                    for (Rect rect : faceDetections.toArray()) {
                        Imgproc.rectangle(fm, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0, 255, 0));
                    }
                    Highgui.imencode(".bmp", fm, mem);
                    Image im = ImageIO.read(new ByteArrayInputStream(mem.toArray()));
                    BufferedImage buff = (BufferedImage) im;
                    if (g.drawImage(buff, 0, 0, getWidth(), getHeight(), 0, 0, buff.getWidth(), buff.getHeight(), null)) {
                        if (runnable == false) {
                            System.out.println("Paused ..... ");
                            this.wait();
                        }
                    }
                } catch (Exception ex) {
                    System.out.println("Error");
                }
            }
        }
    }
}
ColorFinder.java 文件源码 项目:Auto.js 阅读 37 收藏 0 点赞 0 评论 0
public static Point findColor(ImageWrapper imageWrapper, int color, int threshold, Rect region) {
    Point[] points = findAllColors(imageWrapper, color, threshold, region);
    if (points.length == 0) {
        return null;
    }
    return points[0];
}
Converters.java 文件源码 项目:Microsphere 阅读 23 收藏 0 点赞 0 评论 0
public static void Mat_to_vector_Rect(Mat m, List<Rect> rs) {
    if (rs == null)
        throw new java.lang.IllegalArgumentException("rs == null");
    int count = m.rows();
    if (CvType.CV_32SC4 != m.type() || m.cols() != 1)
        throw new java.lang.IllegalArgumentException(
                "CvType.CV_32SC4 != m.type() ||  m.rows()!=1\n" + m);

    rs.clear();
    int[] buff = new int[4 * count];
    m.get(0, 0, buff);
    for (int i = 0; i < count; i++) {
        rs.add(new Rect(buff[4 * i], buff[4 * i + 1], buff[4 * i + 2], buff[4 * i + 3]));
    }
}
Video.java 文件源码 项目:android-imaging-utils 阅读 21 收藏 0 点赞 0 评论 0
public static int meanShift(Mat probImage, Rect window, TermCriteria criteria)
{
    double[] window_out = new double[4];
    int retVal = meanShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon);
    if(window!=null){ window.x = (int)window_out[0]; window.y = (int)window_out[1]; window.width = (int)window_out[2]; window.height = (int)window_out[3]; } 
    return retVal;
}
Imgproc.java 文件源码 项目:FTC2016 阅读 23 收藏 0 点赞 0 评论 0
public static Rect boundingRect(MatOfPoint points)
{
    Mat points_mat = points;
    Rect retVal = new Rect(boundingRect_0(points_mat.nativeObj));

    return retVal;
}
Video.java 文件源码 项目:react-native-scan-doc 阅读 29 收藏 0 点赞 0 评论 0
public static int meanShift(Mat probImage, Rect window, TermCriteria criteria)
{
    double[] window_out = new double[4];
    int retVal = meanShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon);
    if(window!=null){ window.x = (int)window_out[0]; window.y = (int)window_out[1]; window.width = (int)window_out[2]; window.height = (int)window_out[3]; } 
    return retVal;
}
Imgproc.java 文件源码 项目:Checkerboard-IMU-Comparator 阅读 20 收藏 0 点赞 0 评论 0
public static Rect boundingRect(MatOfPoint points)
{
    Mat points_mat = points;
    Rect retVal = new Rect(boundingRect_0(points_mat.nativeObj));

    return retVal;
}


问题


面经


文章

微信
公众号

扫码关注公众号