本文整理汇总了Java中org.opencv.core.MatOfDMatch类的典型用法代码示例。如果您正苦于以下问题:Java MatOfDMatch类的具体用法?Java MatOfDMatch怎么用?Java MatOfDMatch使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MatOfDMatch类属于org.opencv.core包,在下文中一共展示了MatOfDMatch类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Mat_to_vector_vector_DMatch
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public static void Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) {
if (lvdm == 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);
lvdm.clear();
for (Mat mi : mats) {
MatOfDMatch vdm = new MatOfDMatch(mi);
lvdm.add(vdm);
mi.release();
}
mats.clear();
}
示例2: knnMatch
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k)
{
Mat matches_mat = new Mat();
knnMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k);
Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
matches_mat.release();
return;
}
示例3: radiusMatch
import org.opencv.core.MatOfDMatch; //导入依赖的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;
}
示例4: match
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public void match(Mat queryDescriptors, MatOfDMatch matches)
{
Mat matches_mat = matches;
match_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj);
return;
}
示例5: drawMatches
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, MatOfByte matchesMask, int flags)
{
Mat keypoints1_mat = keypoints1;
Mat keypoints2_mat = keypoints2;
Mat matches1to2_mat = matches1to2;
Mat matchesMask_mat = matchesMask;
drawMatches_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;
}
示例6: match
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches, Mat mask)
{
Mat matches_mat = matches;
match_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, mask.nativeObj);
return;
}
示例7: drawMatches
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg)
{
Mat keypoints1_mat = keypoints1;
Mat keypoints2_mat = keypoints2;
Mat matches1to2_mat = matches1to2;
drawMatches_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
return;
}
示例8: knnMatch
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public void knnMatch(Mat queryDescriptors, List<MatOfDMatch> matches, int k)
{
Mat matches_mat = new Mat();
knnMatch_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, k);
Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
matches_mat.release();
return;
}
示例9: radiusMatch
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
Mat matches_mat = new Mat();
radiusMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
matches_mat.release();
return;
}
示例10: analyzeScene
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
/**
* Analyzes a scene for a target object.
*
* @param scene The scene to be analyzed as a GRAYSCALE matrix
* @param analysis The target object's analysis from analyzeObject
* @return A complete scene analysis
*/
public SceneAnalysis analyzeScene(Mat scene, ObjectAnalysis analysis) throws IllegalArgumentException {
MatOfKeyPoint keypointsScene = new MatOfKeyPoint();
//DETECT KEYPOINTS in scene
detector.detect(scene, keypointsScene);
//EXTRACT KEYPOINT INFO from scene
Mat descriptorsScene = new Mat();
extractor.compute(scene, keypointsScene, descriptorsScene);
if (analysis == null) {
throw new IllegalArgumentException("Analysis must not be null!");
}
if (analysis.descriptors.cols() != descriptorsScene.cols() || analysis.descriptors.type() != descriptorsScene.type()) {
throw new IllegalArgumentException("Object and scene descriptors do not match in cols() or type().");
}
MatOfDMatch matches = new MatOfDMatch();
matcher.match(analysis.descriptors, descriptorsScene, matches);
//FILTER KEYPOINTS
/*double max_dist = 0, min_dist = 100;
for(int i = 0; i < objectAnalysis.descriptors.rows(); i++) {
double dist = matches.get;
if(dist < )
}*/
//STORE SCENE ANALYSIS
return new SceneAnalysis(keypointsScene, descriptorsScene, matches, scene);
}
示例11: drawMatchesKnn
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public static void drawMatchesKnn(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);
drawMatchesKnn_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;
}
示例12: drawMatchesKnn
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg)
{
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);
drawMatchesKnn_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
return;
}
示例13: drawMatches2
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public static void drawMatches2(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg)
{
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);
drawMatches2_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
return;
}
示例14: knnMatch
import org.opencv.core.MatOfDMatch; //导入依赖的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;
}
示例15: match
import org.opencv.core.MatOfDMatch; //导入依赖的package包/类
public void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches)
{
Mat matches_mat = matches;
match_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj);
return;
}