Exemplo n.º 1
0
        private static void testIsTable()
        {
            int pscore;

            Leptonica.Native.DllImports.LeptonicaDirectory = @"..\..\..\leptonica.net\lib";
            Pix  pix1   = Pix.Read(file);
            Pixa pixadb = PixaBasic.pixaCreate(0);

            PageSeg.pixDecideIfTable(pix1, null, Leptonica.Definitions.Pix.ImageOrientationFlags.L_PORTRAIT_MODE, out pscore, pixadb);
            var istable = (pscore >= 2) ? 1.0F : 0.0F;

            Console.WriteLine("Is this a table result: {0}", istable);
            pix1.pixDestroy();
            pixadb.pixaDestroy();

            Console.WriteLine("Done...");
            Console.ReadKey();
        }