Esempio n. 1
0
 /// <summary>
 /// Detect objects by template matching. Matches globally at the lowest pyramid level, then refines locally stepping up the pyramid.
 /// </summary>
 /// <param name="sources">Source images, one for each modality.</param>
 /// <param name="threshold">Similarity threshold, a percentage between 0 and 100.</param>
 /// <param name="matches">Template matches, sorted by similarity score.</param>
 /// <param name="classIds">If non-empty, only search for the desired object classes.</param>
 /// <param name="quantizedImages">Optionally return vector&lt;Mat&gt; of quantized images.</param>
 /// <param name="masks">The masks for consideration during matching. The masks should be CV_8UC1 where 255 represents a valid pixel. If non-empty, the vector must be the same size as sources. Each element must be empty or the same size as its corresponding source.</param>
 public void Match(
     VectorOfMat sources,
     float threshold,
     VectorOfLinemodMatch matches,
     VectorOfCvString classIds            = null,
     IOutputArrayOfArrays quantizedImages = null,
     VectorOfMat masks = null)
 {
     using (OutputArray oaQuantizedImages =
                quantizedImages == null ? OutputArray.GetEmpty() : quantizedImages.GetOutputArray())
     {
         LinemodInvoke.cveLinemodDetectorMatch(
             _ptr,
             sources,
             threshold,
             matches,
             classIds,
             oaQuantizedImages,
             masks
             );
     }
 }