Esempio n. 1
0
        public static int jbGetLLCorners(this JbClasser classer)
        {
            if (null == classer)
            {
                throw new ArgumentNullException("classer cannot be null.");
            }

            return(Native.DllImports.jbGetLLCorners((HandleRef)classer));
        }
Esempio n. 2
0
        public static int jbAddPage(this JbClasser classer, Pix pixs)
        {
            if (null == classer ||
                null == pixs)
            {
                throw new ArgumentNullException("classer, pixs cannot be null.");
            }

            return(Native.DllImports.jbAddPage((HandleRef)classer, (HandleRef)pixs));
        }
Esempio n. 3
0
        // Classify the pages
        public static int jbAddPages(this JbClasser classer, Sarray safiles)
        {
            if (null == classer ||
                null == safiles)
            {
                throw new ArgumentNullException("classer, safiles cannot be null.");
            }

            return(Native.DllImports.jbAddPages((HandleRef)classer, (HandleRef)safiles));
        }
Esempio n. 4
0
        // Rank hausdorff classifier
        public static int jbClassifyRankHaus(this JbClasser classer, Boxa boxa, Pixa pixas)
        {
            if (null == classer ||
                null == boxa ||
                null == pixas)
            {
                throw new ArgumentNullException("classer, boxa, pixas cannot be null.");
            }

            return(Native.DllImports.jbClassifyRankHaus((HandleRef)classer, (HandleRef)boxa, (HandleRef)pixas));
        }
Esempio n. 5
0
        public static int jbGetULCorners(this JbClasser classer, Pix pixs, Boxa boxa)
        {
            if (null == classer ||
                null == pixs ||
                null == boxa)
            {
                throw new ArgumentNullException("classer, pixs, boxa cannot be null.");
            }

            return(Native.DllImports.jbGetULCorners((HandleRef)classer, (HandleRef)pixs, (HandleRef)boxa));
        }
Esempio n. 6
0
        public static void jbClasserDestroy(this JbClasser pclasser)
        {
            if (null == pclasser)
            {
                throw new ArgumentNullException("pclasser cannot be null");
            }

            var pointer = (IntPtr)pclasser;

            Native.DllImports.jbClasserDestroy(ref pointer);
        }
Esempio n. 7
0
        public static int jbAddPageComponents(this JbClasser classer, Pix pixs, Boxa boxas, Pixa pixas)
        {
            if (null == classer ||
                null == pixs ||
                null == boxas ||
                null == pixas)
            {
                throw new ArgumentNullException("classer, pixs, boxas, pixas cannot be null.");
            }

            return(Native.DllImports.jbAddPageComponents((HandleRef)classer, (HandleRef)pixs, (HandleRef)boxas, (HandleRef)pixas));
        }
Esempio n. 8
0
        // Utility functions for Data
        public static JbData jbDataSave(this JbClasser classer)
        {
            if (null == classer)
            {
                throw new ArgumentNullException("classer cannot be null.");
            }

            var pointer = Native.DllImports.jbDataSave((HandleRef)classer);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new JbData(pointer));
            }
        }