Click here to Skip to main content
15,916,702 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 13-Sep-11 22:35pm
v3
Comments
Al Moje 9-Sep-11 3:10am    
Hi,
You mean to say that upon selecting or mouseover such image sholud be expand or zoom like magnifying
glass?. You question is not clear...
lariyahitendra 16-Sep-11 7:07am    
oh no no just select block and perform ocr

1 solution

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:
C#
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);
   }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900