Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have you looked at OpenCV's <a href="https://code.ros.org/svn/opencv/trunk/opencv/samples/cpp/descriptor_extractor_matcher.cpp" rel="nofollow">descriptor_extractor_matcher.cpp</a> sample? This sample uses RANSAC to detect the homography between the two input images. I assume when you say wrap you actually mean warp? If you would like to warp the image with the homography matrix you detect, have a look at the <a href="http://opencv.itseez.com/modules/imgproc/doc/geometric_transformations.html?highlight=warpperspective#void%20warpPerspective%28InputArray%20src,%20OutputArray%20dst,%20InputArray%20M,%20Size%20dsize,%20int%20flags,%20int%20borderMode,%20const%20Scalar&amp;%20borderValue%29" rel="nofollow">warpPerspective</a> function. Finally, <a href="http://opencv.itseez.com/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html" rel="nofollow">here</a> are some good tutorials using the different feature detectors in OpenCV.</p> <p><strong>EDIT :</strong> You may not have SURF features, but you certainly have feature points with different classes. Feature based matching is generally split into two phases: feature detection (which you have already done), and extraction which you need for matching. So, you might try converting your features into a <a href="http://opencv.itseez.com/modules/features2d/doc/common_interfaces_of_feature_detectors.html#keypoint" rel="nofollow">KeyPoint</a> and then doing the feature extraction and matching. Here is a little code snippet of how you might go about this:</p> <pre><code>typedef int RED_TYPE = 1; typedef int GREEN_TYPE = 2; typedef int BLUE_TYPE = 3; typedef int PURPLE_TYPE = 4; struct BenFeature { Point2f pt; int classId; }; vector&lt;BenFeature&gt; benFeatures; // Detect the features as you normally would in addition setting the class ID vector&lt;KeyPoint&gt; keypoints; for(int i = 0; i &lt; benFeatures.size(); i++) { BenFeature bf = benFeatures[i]; KeyPoint kp(bf.pt, 10.0, // feature neighborhood diameter (you'll probaby need to tune it) -1.0, // (angle) -1 == not applicable 500.0, // feature response strength (set to the same unless you have a metric describing strength) 1, // octave level, (ditto as above) bf.classId // RED, GREEN, BLUE, or PURPLE. ); keypoints.push_back(kp); } // now proceed with extraction and matching... </code></pre> <p>You may need to tune the response strength such that it doesn't get thresholded out by the extraction phase. But, hopefully that's illustrative of what you might try to do.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload