public async Task <string> GetText(InputImage inputImage)
        {
            IntPtr pString = ITessApiSignatures.APIRect(handle, inputImage.imageBuf, inputImage.bytesPerPixel, inputImage.pitchBytes, 0, 0, inputImage.width, inputImage.height);
            var    strRes  = Marshal.PtrToStringAnsi(pString);

            GetBoxes(inputImage);


            return(strRes);
        }
        public async Task <List <SKRectI> > GetBoxes(InputImage inputImage)
        {
            int            x0, y0, x1, y1;
            List <SKRectI> boxesList = new List <SKRectI>();
            int            res       = 0;

            while (res == 0)
            {
                res = ITessApiSignatures.PageIteratorBoundingBox(handle, PageIteratorLevel.Symbol, out x0, out y0, out x1, out y1);
                SKRectI rect = new SKRectI(x0, y0, x1, y1);
                boxesList.Add(rect);
            }
            return(boxesList);
        }
        public async Task <string> GetText(InputImage inputImage)
        {
            ImageProperties imgPropOut = new ImageProperties();

            imgPropOut.outAllocatedSize = inputImage.pitchBytes * inputImage.height;
            IOpenCVComputeAPI.GetOutBuf(OpenCVComputeAPIhandle.handle, inputImage.imageBuf, imgPropOut.outAllocatedSize, ref imgPropOut.outRealSize, ref imgPropOut.compressionType, ref imgPropOut.subCompressionType,
                                        ref imgPropOut.width, ref imgPropOut.height, ref imgPropOut.bitDepth);
            IntPtr pString = ITessApiSignatures.APIRect(handle, inputImage.imageBuf, inputImage.bytesPerPixel, inputImage.pitchBytes, 0, 0, inputImage.width, inputImage.height);
            var    strRes  = Marshal.PtrToStringAnsi(pString);

            //var b = new SharpDX.DXGI.Surface();
            //var a = new SharpDX.Direct2D1.RenderTarget(,,);
            //GetBoxes(inputImage);
            // SkiaSharp.SKRectI rect = new SKRectI(0,0,100,100);
            return(strRes);
        }
 public WindowsSignalProcess()
 {
     handle = ITessApiSignatures.BaseApiCreate();
     res    = ITessApiSignatures.BaseApiInit3(handle, Constants.TesseractDataSetPath, "eng");
 }