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


Java Mat.release方法代码示例

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


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

示例1: Mat_to_vector_vector_Point

import org.opencv.core.Mat; //导入方法依赖的package包/类
public static void Mat_to_vector_vector_Point(Mat m, List<MatOfPoint> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint pt = new MatOfPoint(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:17,代码来源:Converters.java

示例2: Mat_to_vector_vector_Point3f

import org.opencv.core.Mat; //导入方法依赖的package包/类
public static void Mat_to_vector_vector_Point3f(Mat m, List<MatOfPoint3f> pts) {
    if (pts == null)
        throw new java.lang.IllegalArgumentException("Output List can't be null");

    if (m == null)
        throw new java.lang.IllegalArgumentException("Input Mat can't be null");

    List<Mat> mats = new ArrayList<Mat>(m.rows());
    Mat_to_vector_Mat(m, mats);
    for (Mat mi : mats) {
        MatOfPoint3f pt = new MatOfPoint3f(mi);
        pts.add(pt);
        mi.release();
    }
    mats.clear();
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:17,代码来源:Converters.java

示例3: loadResource

import org.opencv.core.Mat; //导入方法依赖的package包/类
public static Mat loadResource(Context context, int resourceId, int flags) throws IOException
{
    InputStream is = context.getResources().openRawResource(resourceId);
    ByteArrayOutputStream os = new ByteArrayOutputStream(is.available());

    byte[] buffer = new byte[4096];
    int bytesRead;
    while ((bytesRead = is.read(buffer)) != -1) {
        os.write(buffer, 0, bytesRead);
    }
    is.close();

    Mat encoded = new Mat(1, os.size(), CvType.CV_8U);
    encoded.put(0, 0, os.toByteArray());
    os.close();

    Mat decoded = Imgcodecs.imdecode(encoded, flags);
    encoded.release();

    return decoded;
}
 
开发者ID:jorenham,项目名称:fingerblox,代码行数:22,代码来源:Utils.java

示例4: findContours

import org.opencv.core.Mat; //导入方法依赖的package包/类
public static void findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method)
{
    Mat contours_mat = new Mat();
    findContours_1(image.nativeObj, contours_mat.nativeObj, hierarchy.nativeObj, mode, method);
    Converters.Mat_to_vector_vector_Point(contours_mat, contours);
    contours_mat.release();
    return;
}
 
开发者ID:InnoFang,项目名称:Android-Code-Demos,代码行数:9,代码来源:Imgproc.java

示例5: knnMatch

import org.opencv.core.Mat; //导入方法依赖的package包/类
public  void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k, Mat mask, boolean compactResult)
{
    Mat matches_mat = new Mat();
    knnMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k, mask.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
开发者ID:typer9527,项目名称:FaceDetectDemo,代码行数:9,代码来源:DescriptorMatcher.java

示例6: detectRegions

import org.opencv.core.Mat; //导入方法依赖的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

示例7: radiusMatch

import org.opencv.core.Mat; //导入方法依赖的package包/类
public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance, List<Mat> masks, boolean compactResult)
{
    Mat matches_mat = new Mat();
    Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
    radiusMatch_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, masks_mat.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:10,代码来源:DescriptorMatcher.java

示例8: calibrate

import org.opencv.core.Mat; //导入方法依赖的package包/类
public static double calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs, int flags)
{
    Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
    Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
    Mat rvecs_mat = new Mat();
    Mat tvecs_mat = new Mat();
    double retVal = calibrate_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
    Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
    rvecs_mat.release();
    Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
    tvecs_mat.release();
    return retVal;
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:14,代码来源:Calib3d.java

示例9: detect

import org.opencv.core.Mat; //导入方法依赖的package包/类
public  void detect(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> masks)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat keypoints_mat = new Mat();
    Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
    detect_2(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, masks_mat.nativeObj);
    Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
    keypoints_mat.release();
    return;
}
 
开发者ID:linzuzeng,项目名称:Microsphere,代码行数:11,代码来源:Feature2D.java

示例10: calibrateCamera

import org.opencv.core.Mat; //导入方法依赖的package包/类
public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, int flags)
{
    Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
    Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
    Mat rvecs_mat = new Mat();
    Mat tvecs_mat = new Mat();
    double retVal = calibrateCamera_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags);
    Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
    rvecs_mat.release();
    Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
    tvecs_mat.release();
    return retVal;
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:14,代码来源:Calib3d.java

示例11: radiusMatch

import org.opencv.core.Mat; //导入方法依赖的package包/类
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance, Mat mask, boolean compactResult)
{
    Mat matches_mat = new Mat();
    radiusMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, mask.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
开发者ID:ykarim,项目名称:FTC2016,代码行数:9,代码来源:DescriptorMatcher.java

示例12: calibrateCameraExtended

import org.opencv.core.Mat; //导入方法依赖的package包/类
public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors)
{
    Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
    Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
    Mat rvecs_mat = new Mat();
    Mat tvecs_mat = new Mat();
    double retVal = calibrateCameraExtended_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj);
    Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
    rvecs_mat.release();
    Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
    tvecs_mat.release();
    return retVal;
}
 
开发者ID:beast,项目名称:react-native-scan-doc,代码行数:14,代码来源:Calib3d.java

示例13: calibrateCameraExtended

import org.opencv.core.Mat; //导入方法依赖的package包/类
public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags)
{
    Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
    Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
    Mat rvecs_mat = new Mat();
    Mat tvecs_mat = new Mat();
    double retVal = calibrateCameraExtended_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj, flags);
    Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
    rvecs_mat.release();
    Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
    tvecs_mat.release();
    return retVal;
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:14,代码来源:Calib3d.java

示例14: compute

import org.opencv.core.Mat; //导入方法依赖的package包/类
public  void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    List<Mat> keypoints_tmplm = new ArrayList<Mat>((keypoints != null) ? keypoints.size() : 0);
    Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm);
    Mat descriptors_mat = new Mat();
    compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj);
    Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
    keypoints_mat.release();
    Converters.Mat_to_vector_Mat(descriptors_mat, descriptors);
    descriptors_mat.release();
    return;
}
 
开发者ID:ravindu1024,项目名称:android-imaging-utils,代码行数:14,代码来源:Feature2D.java

示例15: radiusMatch

import org.opencv.core.Mat; //导入方法依赖的package包/类
public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
开发者ID:InnoFang,项目名称:Android-Code-Demos,代码行数:9,代码来源:DescriptorMatcher.java


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