Beispiel #1
0
        // recogident.c (1327, 1)
        // rchExtract(rch, pindex, pscore, ptext, psample, pxloc, pyloc, pwidth) as int
        // rchExtract(L_RCH *, l_int32 *, l_float32 *, char **, l_int32 *, l_int32 *, l_int32 *, l_int32 *) as l_ok
        ///  <summary>
        /// rchExtract()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/rchExtract/*"/>
        ///  <param name="rch">[in] - </param>
        ///  <param name="pindex">[out][optional] - index of best template</param>
        ///  <param name="pscore">[out][optional] - correlation score of best template</param>
        ///  <param name="ptext">[out][optional] - character string of best template</param>
        ///  <param name="psample">[out][optional] - index of best sample</param>
        ///  <param name="pxloc">[out][optional] - x-location of template</param>
        ///  <param name="pyloc">[out][optional] - y-location of template</param>
        ///  <param name="pwidth">[out][optional] - width of best template</param>
        ///   <returns>0 if OK, 1 on error</returns>
        public static int rchExtract(
            L_Rch rch,
            out int pindex,
            out Single pscore,
            out String[] ptext,
            out int psample,
            out int pxloc,
            out int pyloc,
            out int pwidth)
        {
            if (rch == null)
            {
                throw new ArgumentNullException("rch cannot be Nothing");
            }

            IntPtr ptextPtr = IntPtr.Zero;
            int    _Result  = Natives.rchExtract(rch.Pointer, out pindex, out pscore, out ptextPtr, out psample, out pxloc, out pyloc, out pwidth);

            if (ptextPtr == null)
            {
                ptext = null;
            }
            else
            {
                ptext = null;
            };

            return(_Result);
        }
Beispiel #2
0
        // recogident.c (1242, 1)
        // rchDestroy(prch) as Object
        // rchDestroy(L_RCH **) as void
        ///  <summary>
        /// rchDestroy()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/rchDestroy/*"/>
        ///  <param name="prch">[in,out] - to be nulled</param>
        public static void rchDestroy(
            ref L_Rch prch)
        {
            IntPtr prchPtr = IntPtr.Zero;   if (prch != null)

            {
                prchPtr = prch.Pointer;
            }

            Natives.rchDestroy(ref prchPtr);
            if (prchPtr == IntPtr.Zero)
            {
                prch = null;
            }
            else
            {
                prch = new L_Rch(prchPtr);
            };
        }