ABBYY CLOUD OCR心得

     经过这段时间的调研发现,泰比(ABBYYOCR在中文识别方面应该是最好的,对于带有干扰线的图片,比如word里面的下划线这种,这个OCR能轻松识别出来,而且其在速率方面很快,我用它的免费的ABBYY Cloud OCR SDK测试了下,准确率跟客户端差不多,一张图片字数大概500字左右的图片,识别大概3秒左右,算非常快了,国内比较好的应该是属汉王了,汉王准确率也不错,不过还是差些,文通的感觉中规中矩的图片识别还行,稍微有点干扰就很差了,ABBYY可以支持多种语言同时识别,我在java测试过程中使用了中文和英文,识别率还不错,而且输出文本可以很多种,有docx,txt,pptx,pdf等。开源的最好的应该是谷歌的Tesseract OCR,识别率方面主要跟它训练的词库有关,对于干扰线方面的图片需要进行先预处理才能提高识别率,不过识别效率不高,识别时间需要比较久,估计差不多是ABBYY5倍时间以上吧,总得来说开源的肯定比不了商业的。下面是ABBYY java demo里面的部分代码,易用性不错。

public static void main(String[] args) {


//		ClientSettings.setupProxy();
		
		restClient = new Client();
		// replace with 'https://cloud.ocrsdk.com' to enable secure connection
		restClient.serverUrl = "http://cloud.ocrsdk.com";
		restClient.applicationId = ClientSettings.APPLICATION_ID;
		restClient.password = ClientSettings.PASSWORD;
		ProcessingSettings processingSettings = new ProcessingSettings();
		processingSettings.setLanguage("ChinesePRC,English");
		processingSettings.setOutputFormat(OutputFormat.docx);
		Task task =null;
		try {
			task= restClient.processImage("C:\\Users\\INTPLE\\Desktop\\orc03\\11.jpg", processingSettings);
//			restClient.getTaskStatus(task.Id);
			waitAndDownloadResult(task,"C:\\Users\\INTPLE\\Desktop\\orc03\\11.docx");
		} catch (Exception e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}


	}

	private static void waitAndDownloadResult(Task task, String outputPath)
			throws Exception {
		task = waitForCompletion(task);

		if (task.Status == Task.TaskStatus.Completed) {
			System.out.println("Downloading..");
			restClient.downloadResult(task, outputPath);
			System.out.println("Ready");
		} else if (task.Status == Task.TaskStatus.NotEnoughCredits) {
			System.out.println("Not enough credits to process document. "
					+ "Please add more pages to your application's account.");
		} else {
			System.out.println("Task failed");
		}

	}

你可能感兴趣的:(OCR)