Java Code Examples for org.opencv.utils.Converters#Mat_to_vector_vector_DMatch

The following examples show how to use org.opencv.utils.Converters#Mat_to_vector_vector_DMatch . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DescriptorMatcher.java    From MOAAP with MIT License 5 votes vote down vote up
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;
}
 
Example 2
Source File: DescriptorMatcher.java    From MOAAP with MIT License 5 votes vote down vote up
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;
}
 
Example 3
Source File: DescriptorMatcher.java    From FtcSamples with MIT License 5 votes vote down vote up
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;
}
 
Example 4
Source File: DescriptorMatcher.java    From MOAAP with MIT License 5 votes vote down vote up
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;
}
 
Example 5
Source File: DescriptorMatcher.java    From opencv-documentscanner-android with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 6
Source File: DescriptorMatcher.java    From MOAAP with MIT License 5 votes vote down vote up
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;
}
 
Example 7
Source File: DescriptorMatcher.java    From OpenCV-android with Apache License 2.0 5 votes vote down vote up
public  void knnMatch(Mat queryDescriptors, List<MatOfDMatch> matches, int k, List<Mat> masks, boolean compactResult)
{
    Mat matches_mat = new Mat();
    Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
    knnMatch_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, k, masks_mat.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 8
Source File: DescriptorMatcher.java    From pasm-yolov3-Android with GNU General Public License v3.0 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_5(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 9
Source File: DescriptorMatcher.java    From VIA-AI with MIT License 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_2(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 10
Source File: DescriptorMatcher.java    From MOAAP with MIT License 5 votes vote down vote up
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;
}
 
Example 11
Source File: DescriptorMatcher.java    From Form-N-Fun with MIT License 5 votes vote down vote up
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;
}
 
Example 12
Source File: DescriptorMatcher.java    From sudokufx with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 13
Source File: DescriptorMatcher.java    From LPR with Apache License 2.0 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_2(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 14
Source File: GenericDescriptorMatcher.java    From marvel with MIT License 3 votes vote down vote up
/**
* <p>Finds the <code>k</code> best matches for each query keypoint.</p>
*
* <p>The methods are extended variants of <code>GenericDescriptorMatch.match</code>.
* The parameters are similar, and the semantics is similar to <code>DescriptorMatcher.knnMatch</code>.
* But this class does not require explicitly computed keypoint descriptors.</p>
*
* @param queryImage a queryImage
* @param queryKeypoints a queryKeypoints
* @param trainImage a trainImage
* @param trainKeypoints a trainKeypoints
* @param matches a matches
* @param k a k
* @param mask a mask
* @param compactResult a compactResult
*
* @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.html#genericdescriptormatcher-knnmatch">org.opencv.features2d.GenericDescriptorMatcher.knnMatch</a>
*/
   public  void knnMatch(Mat queryImage, MatOfKeyPoint queryKeypoints, Mat trainImage, MatOfKeyPoint trainKeypoints, List<MatOfDMatch> matches, int k, Mat mask, boolean compactResult)
   {
       Mat queryKeypoints_mat = queryKeypoints;
       Mat trainKeypoints_mat = trainKeypoints;
       Mat matches_mat = new Mat();
       knnMatch_0(nativeObj, queryImage.nativeObj, queryKeypoints_mat.nativeObj, trainImage.nativeObj, trainKeypoints_mat.nativeObj, matches_mat.nativeObj, k, mask.nativeObj, compactResult);
       Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
       return;
   }
 
Example 15
Source File: DescriptorMatcher.java    From effective_android_sample with Apache License 2.0 3 votes vote down vote up
/**
* <p>For each query descriptor, finds the training descriptors not farther than
* the specified distance.</p>
*
* <p>For each query descriptor, the methods find such training descriptors that
* the distance between the query descriptor and the training descriptor is
* equal or smaller than <code>maxDistance</code>. Found matches are returned in
* the distance increasing order.</p>
*
* @param queryDescriptors Query set of descriptors.
* @param trainDescriptors Train set of descriptors. This set is not added to
* the train descriptors collection stored in the class object.
* @param matches Found matches.
* @param maxDistance Threshold for the distance between matched descriptors.
* Distance means here metric distance (e.g. Hamming distance), not the distance
* between coordinates (which is measured in Pixels)!
*
* @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_descriptor_matchers.html#descriptormatcher-radiusmatch">org.opencv.features2d.DescriptorMatcher.radiusMatch</a>
*/
   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);
       return;
   }
 
Example 16
Source File: DescriptorMatcher.java    From android-object-distance with Apache License 2.0 3 votes vote down vote up
/**
* <p>For each query descriptor, finds the training descriptors not farther than
* the specified distance.</p>
*
* <p>For each query descriptor, the methods find such training descriptors that
* the distance between the query descriptor and the training descriptor is
* equal or smaller than <code>maxDistance</code>. Found matches are returned in
* the distance increasing order.</p>
*
* @param queryDescriptors Query set of descriptors.
* @param matches Found matches.
* @param maxDistance Threshold for the distance between matched descriptors.
* Distance means here metric distance (e.g. Hamming distance), not the distance
* between coordinates (which is measured in Pixels)!
* @param masks Set of masks. Each <code>masks[i]</code> specifies permissible
* matches between the input query descriptors and stored train descriptors from
* the i-th image <code>trainDescCollection[i]</code>.
* @param compactResult Parameter used when the mask (or masks) is not empty. If
* <code>compactResult</code> is false, the <code>matches</code> vector has the
* same size as <code>queryDescriptors</code> rows. If <code>compactResult</code>
* is true, the <code>matches</code> vector does not contain matches for fully
* masked-out query descriptors.
*
* @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_descriptor_matchers.html#descriptormatcher-radiusmatch">org.opencv.features2d.DescriptorMatcher.radiusMatch</a>
*/
   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);
       return;
   }
 
Example 17
Source File: GenericDescriptorMatcher.java    From SoftwarePilot with MIT License 3 votes vote down vote up
/**
* <p>For each query keypoint, finds the training keypoints not farther than the
* specified distance.</p>
*
* <p>The methods are similar to <code>DescriptorMatcher.radius</code>. But this
* class does not require explicitly computed keypoint descriptors.</p>
*
* @param queryImage a queryImage
* @param queryKeypoints a queryKeypoints
* @param trainImage a trainImage
* @param trainKeypoints a trainKeypoints
* @param matches a matches
* @param maxDistance a maxDistance
*
* @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.html#genericdescriptormatcher-radiusmatch">org.opencv.features2d.GenericDescriptorMatcher.radiusMatch</a>
*/
   public  void radiusMatch(Mat queryImage, MatOfKeyPoint queryKeypoints, Mat trainImage, MatOfKeyPoint trainKeypoints, List<MatOfDMatch> matches, float maxDistance)
   {
       Mat queryKeypoints_mat = queryKeypoints;
       Mat trainKeypoints_mat = trainKeypoints;
       Mat matches_mat = new Mat();
       radiusMatch_1(nativeObj, queryImage.nativeObj, queryKeypoints_mat.nativeObj, trainImage.nativeObj, trainKeypoints_mat.nativeObj, matches_mat.nativeObj, maxDistance);
       Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
       return;
   }
 
Example 18
Source File: DescriptorMatcher.java    From Android-Car-duino with GNU General Public License v2.0 3 votes vote down vote up
/**
* <p>For each query descriptor, finds the training descriptors not farther than
* the specified distance.</p>
*
* <p>For each query descriptor, the methods find such training descriptors that
* the distance between the query descriptor and the training descriptor is
* equal or smaller than <code>maxDistance</code>. Found matches are returned in
* the distance increasing order.</p>
*
* @param queryDescriptors Query set of descriptors.
* @param trainDescriptors Train set of descriptors. This set is not added to
* the train descriptors collection stored in the class object.
* @param matches Found matches.
* @param maxDistance Threshold for the distance between matched descriptors.
* Distance means here metric distance (e.g. Hamming distance), not the distance
* between coordinates (which is measured in Pixels)!
*
* @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_descriptor_matchers.html#descriptormatcher-radiusmatch">org.opencv.features2d.DescriptorMatcher.radiusMatch</a>
*/
   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);
       return;
   }
 
Example 19
Source File: GenericDescriptorMatcher.java    From marvel with MIT License 3 votes vote down vote up
/**
* <p>For each query keypoint, finds the training keypoints not farther than the
* specified distance.</p>
*
* <p>The methods are similar to <code>DescriptorMatcher.radius</code>. But this
* class does not require explicitly computed keypoint descriptors.</p>
*
* @param queryImage a queryImage
* @param queryKeypoints a queryKeypoints
* @param matches a matches
* @param maxDistance a maxDistance
*
* @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.html#genericdescriptormatcher-radiusmatch">org.opencv.features2d.GenericDescriptorMatcher.radiusMatch</a>
*/
   public  void radiusMatch(Mat queryImage, MatOfKeyPoint queryKeypoints, List<MatOfDMatch> matches, float maxDistance)
   {
       Mat queryKeypoints_mat = queryKeypoints;
       Mat matches_mat = new Mat();
       radiusMatch_3(nativeObj, queryImage.nativeObj, queryKeypoints_mat.nativeObj, matches_mat.nativeObj, maxDistance);
       Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
       return;
   }
 
Example 20
Source File: DescriptorMatcher.java    From Android-Car-duino with GNU General Public License v2.0 3 votes vote down vote up
/**
* <p>For each query descriptor, finds the training descriptors not farther than
* the specified distance.</p>
*
* <p>For each query descriptor, the methods find such training descriptors that
* the distance between the query descriptor and the training descriptor is
* equal or smaller than <code>maxDistance</code>. Found matches are returned in
* the distance increasing order.</p>
*
* @param queryDescriptors Query set of descriptors.
* @param trainDescriptors Train set of descriptors. This set is not added to
* the train descriptors collection stored in the class object.
* @param matches Found matches.
* @param maxDistance Threshold for the distance between matched descriptors.
* Distance means here metric distance (e.g. Hamming distance), not the distance
* between coordinates (which is measured in Pixels)!
* @param mask Mask specifying permissible matches between an input query and
* train matrices of descriptors.
* @param compactResult Parameter used when the mask (or masks) is not empty. If
* <code>compactResult</code> is false, the <code>matches</code> vector has the
* same size as <code>queryDescriptors</code> rows. If <code>compactResult</code>
* is true, the <code>matches</code> vector does not contain matches for fully
* masked-out query descriptors.
*
* @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_descriptor_matchers.html#descriptormatcher-radiusmatch">org.opencv.features2d.DescriptorMatcher.radiusMatch</a>
*/
   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);
       return;
   }