嗨,我与ocr一起工作,可以很好地读取图像,但是我需要读取块读取,我的意思是我要在选择图像的垂直部分时读取图像,我该怎么办或采取任何其他解决方案 [英] hi i m work with ocr i m fine reading images but i need to read block reading i mean i want to read images when i select a pertoicular part of images how can i do or any other solution

查看:60
本文介绍了嗨,我与ocr一起工作,可以很好地读取图像,但是我需要读取块读取,我的意思是我要在选择图像的垂直部分时读取图像,我该怎么办或采取任何其他解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与ocr一起工作,可以很好地读取图像,但是我需要读取块读取,我的意思是我要在选择图像的垂直部分或其他解决方案时读取图像


例子


条码无签名

mp-104-055/2 lariya



总价
120522

我正在扫描此文件并创建jpeg文件
并想阅读
1.条码编号
2.签名
3.总价

thanx to all

hi i m work with ocr i m fine reading images but i need to read block reading i mean i want to read images when i select a pertoicular part of images how can i do or any other solution


example that


barcode no signature

mp-104-055/2 lariya



total price
120522

i m scanning this file and create jpeg file
and want to read
1. barcode no
2. signature
3. total price

thanx to all

推荐答案

要处理图像的一部分,请创建一个新的Bitmap对象,获取其Graphics上下文,然后从原始图像.这将从原始图像中的点(100,100)绘制图像的30x30像素部分:
To work with a section of an image, you create a new Bitmap object, get it''s Graphics context, and draw into it from the original image. This draws a 30x30 pixel section of an image from the point (100,100) in the original image:
System.Drawing.Bitmap bmp = new Bitmap(30, 30);
Image myPic=System.Drawing.Image.FromFile(@"F:\Temp\MyPic.jpg");
using (Graphics g = bpm.CreateGraphics())
   {
   g.DrawImage(myPic, new Rectangle(0,0, 30, 30), new Rectangle(100,100, 30, 30), GraphicsUnit.Pixel);
   }


这篇关于嗨,我与ocr一起工作,可以很好地读取图像,但是我需要读取块读取,我的意思是我要在选择图像的垂直部分时读取图像,我该怎么办或采取任何其他解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆