本文介绍了改善图像预处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在进行OCR程序之前制作图像处理算法。



由于OCR失败。我需要进行预处理以获得更好的准确性。



我提供此处使用的示例代码以及输入和结果图像。









如果你仔细观察点缀区域就是问题。



你能告诉我如何优化图像处理吗?需要哪些程序来改善OCR输出?



我尝试过:



这是我的解决方案



I am trying to make image processing algorithm before proceeding to an OCR procedure.

Since the OCR fails. I needed to make a preprocessing in order to get better accuracy.

I am providing sample code used here and also the input and result image.

input image
result image

If you look close the dotted area is the problem.

Could you give me advise how to optimize the image processing? What kinds of procedures are needed to improve the OCR output?

What I have tried:

Here is my solution

Mat image = imread("address2.jpg");

Mat gray_image;
cvtColor(image, gray_image, CV_BGR2GRAY);

Mat bluredImage;
GaussianBlur(gray_image, bluredImage, Size(1, 1), 0);

Mat threshImage;
threshold(bluredImage, threshImage, 0, 255, THRESH_OTSU);

imwrite("result.jpg", asd);

推荐答案


这篇关于改善图像预处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 23:34
查看更多