Log in

View Full Version : processing image with letters/numbers


fenomeno83
17th December 2010, 10:33
hello, I need an help..
I have these images
http://img824.imageshack.us/img824/9322/demo42.jpg

http://img707.imageshack.us/img707/4443/demo57.jpg

So, I use an OCR to identify numbers..

I'd like make a preprocessing to these images to have a clear image to inalize by ocr algorithm

in particular give more focus to letters, sharp, maybe scaling for better resolution, reduce noise and if is possibile delete major noise like black in the border (because this cause problems on recognize)
NB: letters or numbers can be also in the borders

so, I'd like have a white and black image (or also cleared grey for background and black for text) to give a more cleared input for ocr recognizer

how can I move?

thanks

fenomeno83
18th December 2010, 14:13
any help?

StainlessS
18th December 2010, 16:15
Your images are not the same size so would need to do them separately.

but maybe try out something like this.

S=100
E=100
OUTW=800
OUTH=600
ImageSource("D:\AVS\demo%03d.jpg",start=S,end=E,fps=25.0)
GreyScale()
#levels(32,0.1,200,0,255)
levels(100,0.1,192,0,255)
nnedi2_rpow2(rfactor=4,cshift="Spline64Resize",fwidth=OUTW,fheight=OUTH)
#levels(0,2.0,255,0,255)
return Last

The above makes the text a little clearer but does not do everything that you
desire. Sounds like you need OCR capabilities to remove non characters whilst
keeping the characters, ie your requirements are a little recursive.

fenomeno83
20th December 2010, 09:55
thanks..is better use a denoiser before resize?

fenomeno83
21st December 2010, 13:04
I tried this and works very well

ImageSource("test\2.jpg",0,0)
ConvertToYV12()
ColorYUV(autogain = true) // need to make text more black
OUTW=800
OUTH=600
GreyScale()
levels(100,0.1,140,0,255)
nnedi2_rpow2(rfactor=4,cshift="Spline64Resize",fwidth=OUTW,fheight=OUTH)
ConvertToRGB()
levels(100,0.1,120,0,255)
ImageWriter("C:\ale\",0,0,"jpg")

these are results
http://img704.imageshack.us/img704/3115/42191049.jpg
http://img543.imageshack.us/img543/872/61284003.jpg

So, what Can I apply after to have contours more linear or curve (now are too much like a wave)

fenomeno83
22nd December 2010, 10:47
help! :)