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

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

            HalconAPI.Store(proc, 1, (HObjectBase)image);
            HalconAPI.Store(proc, 0, (HTool)textModel);
            HalconAPI.InitOCT(proc, 0);
            int err        = HalconAPI.CallProcedure(proc);
            int procResult = this.Load(proc, 0, err);

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