Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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));
 }