Beispiel #1
0
 /// <summary>
 /// Add new object template.
 /// </summary>
 /// <param name="sources">Source images, one for each modality.</param>
 /// <param name="classId">Object class ID.</param>
 /// <param name="objectMask">Mask separating object from background.</param>
 /// <param name="boundingBox">Return bounding box of the extracted features.</param>
 /// <returns>Template ID, or -1 if failed to extract a valid template.</returns>
 public int AddTemplate(
     VectorOfMat sources,
     String classId,
     Mat objectMask,
     ref Rectangle boundingBox)
 {
     using (CvString csClassId = new CvString(classId))
     {
         return(LinemodInvoke.cveLinemodDetectorAddTemplate(
                    _ptr,
                    sources,
                    csClassId,
                    objectMask,
                    ref boundingBox));
     }
 }