Image processing method and system for OCR image recognition

文档序号:1379195 发布日期:2020-08-14 浏览:6次 中文

阅读说明:本技术 一种ocr图像识别的图像处理方法及系统 (Image processing method and system for OCR image recognition ) 是由 宋国梁 颜长华 于 2020-04-26 设计创作,主要内容包括:本发明公开了一种OCR图像识别的图像处理方法,包括S1.对待识别图像进行预处理,以输出符合预设规范的图像数据;S2.对预处理后的图像进行再处理以确定图像位置并进行图像上的字符定位;S3.进行文字识别、校正,并在字符识别、校正过程中进行反馈式重复识别,以获得最终的OCR识别结果。本方法和系统主要针对机打发票、各种表格、单证进行识别,识别精度高,识别速度快,适应性强,通过图像预处理校正和字符定位,增强OCR中的抗干扰能力,并基于理解度的反馈算法(即反馈模型)可以提高OCR的准确率,对于部分信息缺失以及识别错误有很强的纠正能力;能够相对传统OCR识别技术的识别效果,大大提升识别准确度。(The invention discloses an image processing method for OCR image recognition, which comprises the following steps of S1, preprocessing an image to be recognized to output image data which accords with a preset specification; s2, reprocessing the preprocessed image to determine the position of the image and positioning characters on the image; and S3, performing character recognition and correction, and performing feedback type repeated recognition in the character recognition and correction processes to obtain a final OCR recognition result. The method and the system mainly aim at identifying machine-issued tickets, various forms and documents, have high identification precision, high identification speed and strong adaptability, enhance the anti-interference capability in OCR through image preprocessing correction and character positioning, improve the accuracy of OCR through a feedback algorithm (namely a feedback model) based on comprehension degree, and have strong correction capability on partial information loss and identification errors; compared with the recognition effect of the traditional OCR recognition technology, the recognition accuracy is greatly improved.)

1. An image processing method of OCR image recognition, characterized by: comprises that

S1, preprocessing an image to be recognized to output image data meeting preset specifications;

and S2, reprocessing the preprocessed image to determine the position of the image and positioning characters on the image.

2. An image processing method of OCR image recognition according to claim 1, characterized in that: the image to be recognized is preprocessed by image correction, and the image correction comprises three stages:

in the image preliminary processing stage, correcting an image to be recognized to a standard form;

in the initial character recognition feedback stage, the target function is added, and the image to be recognized is corrected again according to the information fed back in the character recognition process;

and in the character recognition and understanding feedback stage, the image to be recognized is corrected again according to the information fed back in the process of checking the character recognition information by additionally arranging the target function.

3. An image processing method of OCR image recognition according to claim 2, characterized in that: the processing of the pre-processed image to determine the image position and perform character positioning on the image comprises

Removing interference information of an image to be identified, and then binarizing the image;

blurring the image to be identified to obtain a fully blurred image;

the center position of the character to be recognized on the image is recognized, the centers are serialized, and the neural network sliding window processing is carried out on the periphery of the centers to obtain the character position of the image.

4. An image processing method of OCR image recognition according to claim 3, characterized in that: the step of processing the pre-processed image to determine the position of the image and to position the characters on the image also comprises

Merging the corresponding positions of the merging centers meeting the serialization requirement;

after the serialization treatment, the sliding window treatment is additionally added for two times at the head and the tail of the continuous sequence;

and if the feedback information in the character recognition and character correction processes is received, performing sliding window processing on the image data to be recognized again according to the feedback information.

5. An image processing method of OCR image recognition according to claim 4, characterized in that: and further comprising the following steps of performing character recognition and correction, and performing feedback type repeated recognition in the character recognition and correction process to obtain a final OCR recognition result:

carrying out subsequent character recognition on the image information subjected to character positioning;

performing character correction on the character recognition result;

and a feedback model is constructed for feedback type repeated identification.

6. An image processing method of OCR image recognition according to claim 5, characterized in that: the feedback model is constructed for feedback type repeated recognition, and the method comprises the following steps

1) During character recognition, generating feedback information according to a recognition result, transferring to a primary character recognition feedback stage, repeating preprocessing and character positioning again, and then performing character recognition;

2) during character recognition, generating feedback information according to a recognition result, and transferring to the step S2 to perform character repositioning;

3) when the characters are corrected, if the image data aimed at by the characters do not reach the correction standard, feedback confirmation information is generated, the characters are returned to the character recognition and feedback understanding stage, and the integral correction of the optimized images is readjusted;

4) during character correction, generating feedback information according to a verification result and returning to the step S2, and carrying out character repositioning;

5) and when the characters are corrected, feeding back search information according to a verification result, returning to the character recognition step, and requiring to re-verify the wrong characters.

7. A system for OCR image recognition, comprising: the character recognition system comprises an image correction module, a character positioning module, a character recognition module and a character correction module; wherein

The image correction module is used for preprocessing and correcting the acquired image to be recognized to obtain image data which accords with a preset specification;

and the character positioning module is used for processing the image data output by the image correction module to determine the image position and positioning the characters on the image.

8. An OCR image recognition system according to claim 7 and wherein: the image correction module comprises a three-stage working program:

in the image preliminary processing stage, correcting an image to be recognized to a standard form;

in the initial character recognition feedback stage, the target function is added, and the image to be recognized is corrected again according to the information fed back by the character recognition module;

and in the character recognition and understanding feedback stage, the image to be recognized is corrected again according to the information fed back by the character correction module by additionally arranging the target function.

9. An OCR image recognition system as recited in claim 8, wherein: the working steps of the character positioning module comprise

Removing interference information of an image to be identified, and then binarizing the image;

blurring the image to be identified to obtain a fully blurred image;

identifying the center positions of characters to be identified on the image, carrying out serialization processing on the centers, and carrying out neural network sliding window processing on the periphery of the centers to obtain the character positions of the image;

merging the corresponding positions of the merging centers meeting the serialization requirement;

after the serialization treatment, the sliding window treatment is additionally added for two times at the head and the tail of the continuous sequence;

and if the feedback information in the character recognition and character correction processes is received, performing sliding window processing on the image data to be recognized again according to the feedback information.

10. An OCR image recognition system according to claim 9 and wherein: also includes a character recognition module and a character correction module, wherein the working steps of the character correction module include

When the characters are corrected, if the image data aimed at by the characters do not reach the correction standard, feedback confirmation information is generated, the feedback confirmation information is returned to the image correction module for character recognition and understanding of the feedback stage, and the image overall correction is readjusted and optimized;

during character correction, generating feedback information according to a verification result and returning the feedback information to the character positioning module to perform character repositioning;

and when the characters are corrected, feeding back search information according to a verification result, returning the search information to the character recognition module, and requiring to re-verify the wrong characters.

Technical Field

The invention relates to the technical field of Chinese character recognition, in particular to an OCR image recognition method and system.

Background

The OCR (Optical Character Recognition) technology is a computer input technology that converts characters of various bills, newspapers, books, manuscripts and other printed matters into image information by an Optical input method such as scanning, and then converts the image information into usable image information by using a Character Recognition technology.

With the continuous development of image sensors, particularly the exponential increase of the number of various mobile phones and professional (such as security) cameras, the image data of a computer is rapidly increased; but the image quality is relatively reduced compared with the traditional scanner or various professional cameras; the traditional Chinese character OCR technology has the problems that the quality of source image data is not high, and the recognition rate is severely reduced when the pollution is serious.

The recognition of the content of Chinese characters (OCR) of computer images is a difficult problem in image recognition, and compared with English character recognition, the number of Chinese characters is large, the similarity of basic characters is high, the recognition is easy to interfere, and the recognition is difficult. The bills are also severely affected by various bills shading, printing positions, printing definition and covering pollutants (seals). According to the relevant market research in 2018, the test effect of a plurality of traditional OCR manufacturers on the market is not ideal for various bills photographed by a mobile phone, although the new generation end-to-end OCR scheme based on the deep neural network has a good effect in the field of Western character OCR, because the cardinal number of Chinese characters is huge, the required training data set exceeds thousands of times of that of the Western character set (conservative estimation), so that the Chinese character OCR on the open AI platform is not ideal on poor images, and the end-to-end deep neural network has natural misrecognition and is easy to attack.

In view of the above, the present invention is particularly proposed.

Disclosure of Invention

Aiming at the defects in the prior art, the invention provides an image processing method and system for OCR image recognition, so as to improve the accuracy of OCR.

In order to achieve the purpose, the technical scheme of the invention is as follows:

an image processing method for OCR image recognition comprises

S1, preprocessing an image to be recognized to output image data meeting preset specifications;

s2, reprocessing the preprocessed image to determine the position of the image and positioning characters on the image;

and S3, performing character recognition and correction, and performing feedback type repeated recognition in the character recognition and correction processes to obtain a final OCR recognition result.

Further, in the image processing method for OCR image recognition, the preprocessing the image to be recognized includes image correction, and the image correction includes three stages:

in the image preliminary processing stage, correcting an image to be recognized to a standard form;

in the initial character recognition feedback stage, the target function is added, and the image to be recognized is corrected again according to the information fed back in the character recognition process;

and in the character recognition and understanding feedback stage, the image to be recognized is corrected again according to the information fed back in the process of checking the character recognition information by additionally arranging the target function.

Further, in the above-mentioned image processing method for OCR image recognition, the processing the preprocessed image to determine the image position and perform character positioning on the image includes

Removing interference information of an image to be identified, and then binarizing the image;

blurring the image to be identified to obtain a fully blurred image;

the center position of the character to be recognized on the image is recognized, the centers are serialized, and the neural network sliding window processing is carried out on the periphery of the centers to obtain the character position of the image.

Further, in the above-mentioned image processing method for OCR image recognition, the processing the preprocessed image to determine the image position and perform character positioning on the image further includes

Merging the corresponding positions of the merging centers meeting the serialization requirement;

after the serialization treatment, the sliding window treatment is additionally added for two times at the head and the tail of the continuous sequence;

and if the feedback information in the character recognition and character correction processes is received, performing sliding window processing on the image data to be recognized again according to the feedback information.

Further, in the image processing method of OCR image recognition, the base performs character recognition and correction, and performs feedback type repeated recognition in the character recognition and correction process to obtain a final OCR recognition result, including

Carrying out subsequent character recognition on the image information subjected to character positioning;

performing character correction on the character recognition result;

and a feedback model is constructed for feedback type repeated identification.

Further, in the image processing method of OCR image recognition, the constructing a feedback model for performing feedback type repetitive recognition includes

1) During character recognition, generating feedback information according to a recognition result, transferring to a primary character recognition feedback stage, repeating preprocessing and character positioning again, and then performing character recognition;

2) during character recognition, generating feedback information according to a recognition result, and transferring to the step S2 to perform character repositioning;

3) when the characters are corrected, if the image data aimed at by the characters do not reach the correction standard, feedback confirmation information is generated, the characters are returned to the character recognition and feedback understanding stage, and the integral correction of the optimized images is readjusted;

4) during character correction, generating feedback information according to a verification result and returning to the step S2, and carrying out character repositioning;

5) and when the characters are corrected, feeding back search information according to a verification result, returning to the character recognition step, and requiring to re-verify the wrong characters.

An OCR image recognition system comprises an image correction module, a character positioning module, a character recognition module and a character correction module; wherein

The image correction module is used for preprocessing and correcting the acquired image to be recognized to obtain image data which accords with a preset specification;

the character positioning module is used for processing the image data output by the image correction module to determine the position of the image and positioning characters on the image;

the character recognition module is used for carrying out character recognition on the character data positioned by the character positioning module and outputting recognition information to the character correction module and/or outputting feedback information to the image correction module;

the character correction module is used for performing character understanding on the characters identified by the character identification module and outputting a correction result; and feeding back correction information to the image correction module.

Further, in the OCR image recognition system, the image correction module includes a three-stage working procedure:

in the image preliminary processing stage, correcting an image to be recognized to a standard form;

in the initial character recognition feedback stage, the target function is added, and the image to be recognized is corrected again according to the information fed back by the character recognition module;

and in the character recognition and understanding feedback stage, the image to be recognized is corrected again according to the information fed back by the character correction module by additionally arranging the target function.

Further, in the above OCR image recognition system, the character locating module includes a working step of

Removing interference information of an image to be identified, and then binarizing the image;

blurring the image to be identified to obtain a fully blurred image;

identifying the center positions of characters to be identified on the image, carrying out serialization processing on the centers, and carrying out neural network sliding window processing on the periphery of the centers to obtain the character positions of the image;

merging the corresponding positions of the merging centers meeting the serialization requirement;

after the serialization treatment, the sliding window treatment is additionally added for two times at the head and the tail of the continuous sequence;

and if the feedback information in the character recognition and character correction processes is received, performing sliding window processing on the image data to be recognized again according to the feedback information.

Further, in the above OCR image recognition system, the working steps of the character correction module include

When the characters are corrected, if the image data aimed at by the characters do not reach the correction standard, feedback confirmation information is generated, the feedback confirmation information is returned to the image correction module for character recognition and understanding of the feedback stage, and the image overall correction is readjusted and optimized;

during character correction, generating feedback information according to a verification result and returning the feedback information to the character positioning module to perform character repositioning;

and when the characters are corrected, feeding back search information according to a verification result, returning the search information to the character recognition module, and requiring to re-verify the wrong characters.

Compared with the prior art, the invention has the beneficial effects that:

the method and the system mainly aim at identifying machine-issued tickets, various forms and documents, have high identification precision, high identification speed and strong adaptability, and particularly enhance the anti-interference capability in OCR through image preprocessing correction and character positioning when the image quality is low and the printing errors are serious (missing lines, pollution, smear and serial), and improve the accuracy of OCR through a feedback algorithm (namely a feedback model) based on comprehension degree, and have strong correction capability on partial information loss and identification errors; compared with the recognition effect of the traditional OCR recognition technology, the recognition accuracy is greatly improved.

Drawings

In order to more clearly illustrate the detailed description of the invention or the technical solutions in the prior art, the drawings that are needed in the detailed description of the invention or the prior art will be briefly described below. Throughout the drawings, like elements or portions are generally identified by like reference numerals. In the drawings, elements or portions are not necessarily drawn to scale.

FIG. 1 is a flow chart of an embodiment of an OCR image recognition image processing method of the present invention;

FIG. 2 is a logical block diagram of the OCR image recognition system of the present invention.

Detailed Description

Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.

It is to be noted that, unless otherwise specified, technical or scientific terms used herein shall have the ordinary meaning as understood by those skilled in the art to which the invention pertains.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于深度神经网络的文本检测目标提取关系的端到端方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!