Beispiel #1
0
        internal static int LoadNew(IntPtr proc, int parIndex, int err, out HDlClassifierResult[] obj)
        {
            HTuple tuple;

            err = HTuple.LoadNew(proc, parIndex, err, out tuple);
            obj = new HDlClassifierResult[tuple.Length];
            for (int index = 0; index < tuple.Length; ++index)
            {
                obj[index] = new HDlClassifierResult(tuple[index].IP);
            }
            return(err);
        }
Beispiel #2
0
        /// <summary>
        ///   Infer the class affiliations for a set of images using the  deep-learning-based classifier.
        ///   Instance represents: Handle of the deep-learning-based classifier.
        /// </summary>
        /// <param name="images">Tuple of input images.</param>
        /// <returns>Handle of the deep learning classification  results.</returns>
        public HDlClassifierResult ApplyDlClassifier(HImage images)
        {
            IntPtr proc = HalconAPI.PreCall(2102);

            this.Store(proc, 0);
            HalconAPI.Store(proc, 1, (HObjectBase)images);
            HalconAPI.InitOCT(proc, 0);
            int err = HalconAPI.CallProcedure(proc);
            HDlClassifierResult classifierResult;
            int procResult = HDlClassifierResult.LoadNew(proc, 0, err, out classifierResult);

            HalconAPI.PostCall(proc, procResult);
            GC.KeepAlive((object)this);
            GC.KeepAlive((object)images);
            return(classifierResult);
        }
Beispiel #3
0
 internal static int LoadNew(IntPtr proc, int parIndex, int err, out HDlClassifierResult obj)
 {
     obj = new HDlClassifierResult(HTool.UNDEF);
     return(obj.Load(proc, parIndex, err));
 }