2

我想检测网格上写的数字,然后使用iPhone相机处理它们。我发现,直到又是像一些很好的例子:检测数字并处理它们?

http://blog.damiles.com/?p=93

http://cmgresearch.blogspot.com/2010/01/augmented-reality-on-iphone-how-to_01.html

虽然我能够在覆盖视图的数字得出一个良好的程度,但仍无法检测一下这些编号是。

编辑

嗨,大家好,我发现我从哪里下载的代码,并开始测试上http://github.com/nolanbrown/Tesseract-iPhone-Demo一个链接,但只跑了一次,但没有给任何输出,从那时起它的崩溃给我下面的错误日志:

#0 0x0007b718 in TessBaseAPI::HistogramRect() 
#1 0x0007bc04 in TessBaseAPI::OtsuThreshold() 
#2 0x0007c4a8 in TessBaseAPI::CopyImageToTesseract() 
#3 0x0007cd8c in TessBaseAPI::TesseractRect() 
#4 0x0006cdb4 in -[OCRDemoViewController ocrImage:] (self=0x31ec40, _cmd=0x201ba7, uiImage=0x34ed00) at /Users/madhup/Tesseract-iPhone-Demo/OCRDemo/Classes/OCRDemoViewController.mm:131 
#5 0x0006c6d0 in -[OCRDemoViewController imagePickerController:didFinishPickingImage:editingInfo:] (self=0x31ec40, _cmd=0x334fcf80, picker=0x348ba0, image=0x35c470, editingInfo=0x0) at /Users/ngamacbook/Tesseract-iPhone-Demo/OCRDemo/Classes/OCRDemoViewController.mm:213 
#6 0x32d103ec in -[UIImagePickerController _imagePickerDidCompleteWithInfo:]() 
#7 0x3296ceac in PLNotifyImagePickerOfImageAvailability() 
#8 0x3297e49e in -[PLUICameraViewController cameraView:photoSaved:]() 
#9 0x3294d134 in -[PLCameraView cropOverlay:didFinishSaving:]() 
#10 0x3294d344 in -[PLCameraView cropOverlayWasOKed:]() 
#11 0x3295dfb2 in -[PLCropOverlay cropOverlayBottomBarDoneButtonClicked:]() 
#12 0x329801e0 in -[PLCropOverlayBottomBar doneButtonClicked:]() 
#13 0x32569ee4 in -[NSObject performSelector:withObject:withObject:]() 
#14 0x32ba2064 in -[UIApplication sendAction:to:from:forEvent:]() 
#15 0x32ba2004 in -[UIApplication sendAction:toTarget:fromSender:forEvent:]() 
#16 0x32ba1fd6 in -[UIControl sendAction:to:forEvent:]() 
#17 0x32ba1d30 in -[UIControl(Internal) _sendActionsForEvents:withEvent:]() 
#18 0x32ba2644 in -[UIControl touchesEnded:withEvent:]() 
#19 0x32ba165c in -[UIWindow _sendTouchesForEvent:]() 
#20 0x32ba1038 in -[UIWindow sendEvent:]() 
#21 0x32b9d92e in -[UIApplication sendEvent:]() 
#22 0x32b9d3a6 in _UIApplicationHandleEvent() 
#23 0x32913b78 in PurpleEventCallback() 
#24 0x32567c2c in CFRunLoopRunSpecific() 
#25 0x3256735c in CFRunLoopRunInMode() 
#26 0x32912cbe in GSEventRunModal() 
#27 0x32912d6a in GSEventRun() 
#28 0x32b6276e in -[UIApplication _run]() 
#29 0x32b61472 in UIApplicationMain() 
#30 0x0006c2cc in main (argc=1, argv=0x2ffff5dc) at /Users/madhup/Tesseract-iPhone-Demo/OCRDemo/main.mm:14 

现在要去上线131,我觉得

char* text = tess->TesseractRect(imageData,(int)bytes_per_pixel,(int)bytes_per_line, 0, 0,(int) imageSize.height,(int) imageSize.width); 

,但我不能能够介入或找到解决问题的任何方式,任何机构知道这一点,请帮助。我在过去的4天里进了这个,并没有提前一步。

感谢, Madhup

回答

1

可以使用非常漂亮的Tesseract开源OCR引擎。只要做你的图像处理提取东西,你猜是数字,并将它们提供给tesseract。 Tesseract应该在iPhone上编译,但应该已经有一些预编译的二进制文件了。我不知道它是如何执行手写的东西,但数字可能是好的。不过,我认为你总是会遇到麻烦,例如, 2和7 ...

+0

请参阅我的编辑和评论,如果你可以帮助它 – 2010-06-20 08:53:37

相关问题