public MatchResultVector(MatchResultVector other) : this(csSmartIdEnginePINVOKE.new_MatchResultVector__SWIG_1(MatchResultVector.getCPtr(other)), true)
 {
     if (csSmartIdEnginePINVOKE.SWIGPendingException.Pending)
     {
         throw csSmartIdEnginePINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public MatchResultVectorEnumerator(MatchResultVector collection)
 {
     collectionRef = collection;
     currentIndex  = -1;
     currentObject = null;
     currentSize   = collectionRef.Count;
 }
 public void SetMatchResults(MatchResultVector match_results)
 {
     csSmartIdEnginePINVOKE.RecognitionResult_SetMatchResults(swigCPtr, MatchResultVector.getCPtr(match_results));
     if (csSmartIdEnginePINVOKE.SWIGPendingException.Pending)
     {
         throw csSmartIdEnginePINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public void SetRange(int index, MatchResultVector values)
 {
     csSmartIdEnginePINVOKE.MatchResultVector_SetRange(swigCPtr, index, MatchResultVector.getCPtr(values));
     if (csSmartIdEnginePINVOKE.SWIGPendingException.Pending)
     {
         throw csSmartIdEnginePINVOKE.SWIGPendingException.Retrieve();
     }
 }
        public static MatchResultVector Repeat(MatchResult value, int count)
        {
            global::System.IntPtr cPtr = csSmartIdEnginePINVOKE.MatchResultVector_Repeat(MatchResult.getCPtr(value), count);
            MatchResultVector     ret  = (cPtr == global::System.IntPtr.Zero) ? null : new MatchResultVector(cPtr, true);

            if (csSmartIdEnginePINVOKE.SWIGPendingException.Pending)
            {
                throw csSmartIdEnginePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public MatchResultVector GetRange(int index, int count)
        {
            global::System.IntPtr cPtr = csSmartIdEnginePINVOKE.MatchResultVector_GetRange(swigCPtr, index, count);
            MatchResultVector     ret  = (cPtr == global::System.IntPtr.Zero) ? null : new MatchResultVector(cPtr, true);

            if (csSmartIdEnginePINVOKE.SWIGPendingException.Pending)
            {
                throw csSmartIdEnginePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
 public virtual void DocumentMatched(MatchResultVector match_results)
 {
     if (SwigDerivedClassHasMethod("DocumentMatched", swigMethodTypes1))
     {
         csSmartIdEnginePINVOKE.ResultReporterInterface_DocumentMatchedSwigExplicitResultReporterInterface(swigCPtr, MatchResultVector.getCPtr(match_results));
     }
     else
     {
         csSmartIdEnginePINVOKE.ResultReporterInterface_DocumentMatched(swigCPtr, MatchResultVector.getCPtr(match_results));
     }
     if (csSmartIdEnginePINVOKE.SWIGPendingException.Pending)
     {
         throw csSmartIdEnginePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #8
0
        public static void OutputRecognitionResult(se.smartid.RecognitionResult recog_result)
        {
            Console.WriteLine("Document type: {0}", recog_result.GetDocumentType());
            Console.WriteLine("Match results:");

            MatchResultVector match_results = recog_result.GetMatchResults();

            for (int i = 0; i < match_results.Count; i++)
            {
                Console.WriteLine("    Template Type = {0}", match_results[i].GetTemplateType());
                Console.WriteLine("    Zone = {{({0:0.0}, {1:0.0}), ({2:0.0}, {3:0.0}), ({4:0.0}, {5:0.0}), ({6:0.0}, {7:0.0})}}",
                                  match_results[i].GetQuadrangle().GetPoint(0).x, match_results[i].GetQuadrangle().GetPoint(0).y,
                                  match_results[i].GetQuadrangle().GetPoint(1).x, match_results[i].GetQuadrangle().GetPoint(1).y,
                                  match_results[i].GetQuadrangle().GetPoint(2).x, match_results[i].GetQuadrangle().GetPoint(2).y,
                                  match_results[i].GetQuadrangle().GetPoint(3).x, match_results[i].GetQuadrangle().GetPoint(3).y);
            }
            Console.WriteLine("String fields:");
            StringVector string_field_names = recog_result.GetStringFieldNames();

            for (int i = 0; i < string_field_names.Count; i++)
            {
                StringField     field       = recog_result.GetStringField(string_field_names[i]);
                String          is_accepted = field.IsAccepted() ? "[+]" : "[-]";
                Utf16CharVector chars       = field.GetValue().GetUtf16String();
                StringBuilder   value       = new StringBuilder();
                foreach (Char ch in chars)
                {
                    value.Append(ch);
                }
                Console.WriteLine("    {0,-15} {1} {2}",
                                  field.GetName(), is_accepted, value);
            }
            Console.WriteLine("Image fields:");
            StringVector image_field_names = recog_result.GetImageFieldNames();

            for (int i = 0; i < image_field_names.Count; i++)
            {
                ImageField field       = recog_result.GetImageField(image_field_names[i]);
                String     is_accepted = field.IsAccepted() ? "[+]" : "[-]";
                Console.WriteLine("    {0, -15} {1} W: {2} H: {3}",
                                  field.GetName(), is_accepted,
                                  field.GetValue().width, field.GetValue().height);
            }

            Console.WriteLine("Result terminal:    {0}", recog_result.IsTerminal() ? "[+]" : "[-]");
        }
Пример #9
0
 public override void DocumentMatched(MatchResultVector match_results)
 {
     Console.WriteLine("[Optional callback called]: Document matched");
 }
 public RecognitionResult(StringFieldCollection string_fields, ImageFieldCollection image_fields, string document_type, MatchResultVector match_results, SegmentationResultVector segmentation_results, bool is_terminal) : this(csSmartIdEnginePINVOKE.new_RecognitionResult__SWIG_1(StringFieldCollection.getCPtr(string_fields), ImageFieldCollection.getCPtr(image_fields), document_type, MatchResultVector.getCPtr(match_results), SegmentationResultVector.getCPtr(segmentation_results), is_terminal), true)
 {
     if (csSmartIdEnginePINVOKE.SWIGPendingException.Pending)
     {
         throw csSmartIdEnginePINVOKE.SWIGPendingException.Retrieve();
     }
 }
        public MatchResultVector GetMatchResults()
        {
            MatchResultVector ret = new MatchResultVector(csSmartIdEnginePINVOKE.RecognitionResult_GetMatchResults(swigCPtr), false);

            return(ret);
        }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MatchResultVector obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }