title: OpenCV DescriptorMatcher radiusMatch and knnMatch result format
body: <p>Does anyone happen to know why the OpenCV 2 <code>DescriptorMatcher::radiusMatch()</code> and <code>knnMatch()</code> take a <code>vector&lt;vector&lt;DMatch&gt;&gt;&amp; matches</code>? I'm a bit confused about why it wouldn't just a vector, since it's just a single array of points in the scene that correspond to the training image, right?</p>
  
  <p>I've got something like this:</p>
  
  <pre><code>void getMatchingPoints(
      const vector&lt;vector&lt;cv::DMatch&gt; &gt;&amp; matches,
      const vector&lt;cv::KeyPoint&gt;&amp; keyPtsTemplates,
      const vector&lt;cv::KeyPoint&gt;&amp; keyPtsScene,
      vector&lt;Vec2f&gt;&amp; ptsTemplate,
      vector&lt;Vec2f&gt;&amp; ptsScene
      )
  {
      ptsTemplate.clear();
      ptsScene.clear();
  
      for (size_t k = 0; k &lt; matches.size(); k++)
      {
          for (size_t i = 0; i &lt; matches[k].size(); i++)
          {
              const cv::DMatch&amp; match = matches[k][i];
              ptsScene.push_back(fromOcv(keyPtsScene[match.queryIdx].pt));
              ptsTemplate.push_back(fromOcv(keyPtsTemplates[match.trainIdx].pt));
          }
      }
  }
  </code></pre>
  
  <p>but I'm a bit confused about how to actually map the approx. location of the object once I have them all in <code>ptsScene</code>. The points seem scattered to me when I just draw them, so I think I'm missing what the nested vectors represent.</p>