Search in sources :

Example 71 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class Core method hconcat.

// 
// C++:  void hconcat(vector_Mat src, Mat& dst)
// 
// javadoc: hconcat(src, dst)
public static void hconcat(List<Mat> src, Mat dst) {
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    hconcat_0(src_mat.nativeObj, dst.nativeObj);
    return;
}
Also used : Mat(org.opencv.core.Mat)

Example 72 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class FeatureDetector method detect.

// javadoc: javaFeatureDetector::detect(image, keypoints)
public void detect(Mat image, MatOfKeyPoint keypoints) {
    Mat keypoints_mat = keypoints;
    detect_1(nativeObj, image.nativeObj, keypoints_mat.nativeObj);
    return;
}
Also used : Mat(org.opencv.core.Mat)

Example 73 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class FeatureDetector method detect.

// javadoc: javaFeatureDetector::detect(images, keypoints)
public void detect(List<Mat> images, List<MatOfKeyPoint> keypoints) {
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat keypoints_mat = new Mat();
    detect_3(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj);
    Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
    keypoints_mat.release();
    return;
}
Also used : Mat(org.opencv.core.Mat)

Example 74 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class Features2d method drawKeypoints.

// 
// C++:  void drawKeypoints(Mat image, vector_KeyPoint keypoints, Mat& outImage, Scalar color = Scalar::all(-1), int flags = DrawMatchesFlags::DEFAULT)
// 
// javadoc: drawKeypoints(image, keypoints, outImage, color, flags)
public static void drawKeypoints(Mat image, MatOfKeyPoint keypoints, Mat outImage, Scalar color, int flags) {
    Mat keypoints_mat = keypoints;
    drawKeypoints_0(image.nativeObj, keypoints_mat.nativeObj, outImage.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], flags);
    return;
}
Also used : Mat(org.opencv.core.Mat)

Example 75 with Mat

use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.

the class Features2d method drawMatches2.

// 
// C++:  void drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_vector_DMatch matches1to2, Mat outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_vector_char matchesMask = std::vector<std::vector<char> >(), int flags = 0)
// 
// javadoc: drawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg, matchColor, singlePointColor, matchesMask, flags)
public static void drawMatches2(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List<MatOfByte> matchesMask, int flags) {
    Mat keypoints1_mat = keypoints1;
    Mat keypoints2_mat = keypoints2;
    List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
    Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
    List<Mat> matchesMask_tmplm = new ArrayList<Mat>((matchesMask != null) ? matchesMask.size() : 0);
    Mat matchesMask_mat = Converters.vector_vector_char_to_Mat(matchesMask, matchesMask_tmplm);
    drawMatches2_0(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj, flags);
    return;
}
Also used : Mat(org.opencv.core.Mat) ArrayList(java.util.ArrayList)

Aggregations

Mat (org.opencv.core.Mat)239 ArrayList (java.util.ArrayList)34 Point (org.opencv.core.Point)33 MatOfPoint (org.opencv.core.MatOfPoint)27 MatOfKeyPoint (org.opencv.core.MatOfKeyPoint)19 KeyPoint (org.opencv.core.KeyPoint)18 Size (org.opencv.core.Size)17 Rect (org.opencv.core.Rect)15 Scalar (org.opencv.core.Scalar)9 File (java.io.File)7 BufferedImage (java.awt.image.BufferedImage)5 FilterContext (de.serviceflow.frankenstein.plugin.api.FilterContext)4 SegmentVideoFilter (de.serviceflow.frankenstein.plugin.api.SegmentVideoFilter)4 DefaultFilterContext (de.serviceflow.frankenstein.vf.DefaultFilterContext)4 VideoFilter (de.serviceflow.frankenstein.vf.VideoFilter)4 DataBufferByte (java.awt.image.DataBufferByte)4 FilterElement (de.serviceflow.frankenstein.vf.FilterElement)3 IOException (java.io.IOException)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)3 ImageNotFoundException (org.getopentest.exceptions.ImageNotFoundException)3