Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }