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

            err = HTuple.LoadNew(proc, parIndex, err, out tuple);
            obj = new HTextResult[tuple.Length];
            for (int index = 0; index < tuple.Length; ++index)
            {
                obj[index] = new HTextResult(tuple[index].IP);
            }
            return(err);
        }
예제 #2
0
        /// <summary>
        ///   Find text in an image.
        ///   Instance represents: Text model specifying the text to be segmented.
        /// </summary>
        /// <param name="image">Input image.</param>
        /// <returns>Result of the segmentation.</returns>
        public HTextResult FindText(HImage image)
        {
            IntPtr proc = HalconAPI.PreCall(417);

            this.Store(proc, 0);
            HalconAPI.Store(proc, 1, (HObjectBase)image);
            HalconAPI.InitOCT(proc, 0);
            int         err = HalconAPI.CallProcedure(proc);
            HTextResult htextResult;
            int         procResult = HTextResult.LoadNew(proc, 0, err, out htextResult);

            HalconAPI.PostCall(proc, procResult);
            GC.KeepAlive((object)this);
            GC.KeepAlive((object)image);
            return(htextResult);
        }
예제 #3
0
 internal static int LoadNew(IntPtr proc, int parIndex, int err, out HTextResult obj)
 {
     obj = new HTextResult(HTool.UNDEF);
     return(obj.Load(proc, parIndex, err));
 }