WO2015066984A1 - 一种面向复杂背景的光学字符识别方法及装置 - Google Patents

一种面向复杂背景的光学字符识别方法及装置 Download PDF

Info

Publication number
WO2015066984A1
WO2015066984A1 PCT/CN2014/071731 CN2014071731W WO2015066984A1 WO 2015066984 A1 WO2015066984 A1 WO 2015066984A1 CN 2014071731 W CN2014071731 W CN 2014071731W WO 2015066984 A1 WO2015066984 A1 WO 2015066984A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
character
target
search box
processed image
Prior art date
Application number
PCT/CN2014/071731
Other languages
English (en)
French (fr)
Inventor
梁添才
陈良旭
赵邢瑜
Original Assignee
广州中智融通金融科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州中智融通金融科技有限公司 filed Critical 广州中智融通金融科技有限公司
Priority to AU2014346263A priority Critical patent/AU2014346263B2/en
Priority to EP14859485.6A priority patent/EP3067830A4/en
Priority to US15/032,167 priority patent/US9613266B2/en
Publication of WO2015066984A1 publication Critical patent/WO2015066984A1/zh
Priority to ZA2016/03037A priority patent/ZA201603037B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/20Combination of acquisition, preprocessing or recognition functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • Embodiments of the present invention relate to the field of character positioning and recognition, and in particular, to an optical character recognition method and apparatus for complex background.
  • Character positioning is the key premise of recognition, and its positioning accuracy directly affects the recognition accuracy.
  • Most of the existing methods use the image to be converted into a binary image before the target is positioned.
  • the downside of this type of approach is that the positioning accuracy depends on the effect of threshold segmentation. If the image scene is complicated, or the contrast is low, or the illumination is uneven, a target positioning error due to poor binarization may occur.
  • Figure 1 is an image of an optical character area on a banknote. Due to the long circulation time, the ticket is worn out, which seriously affects the image quality, resulting in a very complicated character background. It is difficult to extract characters from the image. After converting the image into a binary image, the characters cannot be extracted effectively. The transformed effect is shown in Figure 1.1.
  • the image can be positioned after the image is converted into a binary image.
  • the traditional method is to use the projection information of the binary image in the horizontal direction and the vertical direction to achieve the purpose of positioning.
  • the limitation of this method is that the algorithm relies on the binarization process. When the target background is complicated or the shooting effect is not good, the character breaks or sticks often occur after binarization. In this case, the projection information becomes inaccurate, thereby affecting the positioning effect.
  • Applying the projection method to Figure 1.1 will result in the results shown in Figure 1.2.
  • the curves CI and C2 in the figure are the projection curves of the figure in the horizontal direction and the vertical direction, respectively, and it can be seen that the projection method cannot effectively determine the boundary of the character.
  • the embodiment of the invention provides an optical character recognition method and device for complex background, which firstly superimposes the original image and the edge detected image, and then performs inverse and Gaussian filtering on the processed image. On this basis, By calculating the integral map for the processed image, accurate and rapid positioning and recognition of characters can be realized on the basis of effectively suppressing background noise and protruding character information.
  • the optical character recognition method for complex background includes: collecting image information to obtain a captured image;
  • the target character position is identified.
  • the step of collecting image information includes:
  • Image information is acquired using an image sensor.
  • the image sensor includes:
  • the step of extracting character edge information in the target object by using a differential method comprises: extracting character edge information in the target object by using a Prewitt operator edge detection method.
  • the step of searching for the target character position within the processed image includes: Determining a search box according to the character characteristics and the processed image;
  • the value of a point on the integrated image is the sum of gray values of all pixels in a rectangular area formed from the upper left corner of the processed image to this point.
  • the optical character recognition device for complex background includes: an acquisition module, configured to collect image information, and obtain an acquired image;
  • An obtaining module configured to acquire a target character region from the acquired image according to a character characteristic, as a target object
  • An extraction module configured to extract character edge information in the target object by using a differential method, to obtain an extracted image
  • a superimposing module configured to superimpose the target object and the extracted image to obtain a restored image
  • a processing module configured to perform inversion and Gaussian filtering processing on the restored image to obtain a processed image
  • a search module configured to search for a target character position within the processed image
  • An identification module configured to identify the target character position.
  • the search module includes:
  • a first determining submodule configured to determine a search box according to the character characteristic and the processed image
  • a first processing submodule configured to continuously slide the search box on the processed image according to a preset rule, and calculate a sum of pixel gray values in the search box, where the sum of the gray values of the pixels is maximum
  • the position at which the search box is located is determined as the target character position.
  • the search module includes:
  • a second determining subunit configured to determine a search box according to the character characteristic and the processed image
  • a conversion subunit configured to convert the processed image into an integral image
  • a second processing submodule configured to continuously slide the search box on the integral image according to a preset rule, and calculate a sum of pixel gray values in the search box, where the sum of the gray values of the pixels is maximum
  • the position at which the search box is located is determined as the target character position.
  • image information is first collected to obtain a captured image; then, a target character region is obtained from the captured image according to character characteristics as a target object; and then character edge information in the target object is extracted by using a differential method to obtain Extracting an image; then superimposing the target object and the extracted image to obtain a restored image; then performing inverse and Gaussian filtering processing on the restored image to obtain a processed image; and then searching for a target character position in the processed image; Finally, the target character position is identified.
  • the optical character recognition method and device for the complex background of the present invention superimpose the original image and the image after the edge detection, and then perform inverse and Gaussian filtering on the processed image, based on the processed image,
  • the integral map is calculated, and the integral map is used to accelerate the positioning process, which can accurately and quickly locate and identify characters based on the effective suppression of background noise and prominent character information.
  • FIG. 1 is a schematic diagram of an image of an optical character area on a dilapidated banknote in the prior art
  • FIG. 1.1 is an effect diagram of direct application of binarization to a dilapidated banknote in the prior art
  • FIG. 1.2 is an application of the old banknote in the prior art.
  • FIG. 2 is a flowchart of a first embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a second embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention
  • FIG. 3.1 is a second embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention.
  • FIG. 3.2 is a schematic diagram of a target object G i in a second embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention
  • FIG. 3.3 is a schematic diagram of a Prewitt operator direction template in a second embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention.
  • 3.4 is a schematic diagram showing a comparison of sums of pixel gray values in a second embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention
  • FIG. 3.5 is a schematic diagram showing the sum of pixel gray values calculated by the integral image method in the second embodiment of the optical character recognition method for complex background in the embodiment of the present invention.
  • 3.6 is a schematic diagram of an original image of a 20-yuan banknote in a second embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention
  • 3.7 is a schematic diagram of a target object of a 20-yuan banknote in a second embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention
  • 3.8 is a schematic diagram of an extracted image of a 20-yuan banknote in a second embodiment of an optical character recognition method for a complex background according to an embodiment of the present invention
  • 3.9 is a schematic diagram of a restored image of a 20-yuan banknote in a second embodiment of the optical character recognition method for a complex background according to an embodiment of the present invention
  • FIG. 3.10 is a schematic diagram of a processing image of a 20-yuan banknote in a second embodiment of the optical character recognition method for a complex background according to an embodiment of the present invention
  • FIG. 3.11 is a schematic diagram of an integral image of a 20-yuan banknote in a second embodiment of the optical character recognition method for a complex background according to an embodiment of the present invention
  • FIG. 3.12 is a schematic diagram of a target character position of a 20-yuan banknote in a second embodiment of the optical character recognition method for a complex background according to an embodiment of the present invention
  • FIG. 4 is a first schematic structural diagram of an embodiment of an optical character recognition apparatus for a complex background according to an embodiment of the present invention
  • FIG. 5 is a second schematic structural diagram of an embodiment of an optical character recognition apparatus for a complex background according to an embodiment of the present invention.
  • the embodiment of the invention provides an optical character recognition method and device for complex background, which firstly superimposes the original image and the edge detected image, and then performs inverse and Gaussian filtering on the processed image.
  • the integral map is calculated according to the processed image, and the integral map is used to accelerate the positioning process, and the accurate and rapid positioning and recognition of characters can be realized on the basis of effectively suppressing background noise and highlighting character information.
  • the Prewitt operator is an edge detection of a first-order differential operator.
  • the gray level difference between the upper and lower adjacent points of the pixel is used to reach the extreme value at the edge to detect the edge, and some false edges can be removed.
  • the noise has a smoothing effect.
  • the principle is to use the two-direction template to perform neighborhood convolution with the image in the image space. One of the two direction templates is used to detect the horizontal edge and the other is used to detect the vertical edge.
  • Integral image For a grayscale image, the value of any point (x, y) in the integrated image refers to the sum of the gray values of all the points in the rectangular region formed from the upper left corner of the image to this point.
  • the method and apparatus of the embodiments of the present invention can be used for positioning and recognizing various image characters, such as identification of a license plate number, identification of a banknote number, recognition of an ID number in an ID card, and various Detection of printed numbers on product packaging, etc.
  • the method and apparatus of the embodiment of the present invention will be described below by taking the identification of the banknote number as an example. Although the identification of the banknote number is taken as an example, it should not be taken as a limitation of the method and apparatus of the present invention.
  • a first embodiment of an optical character recognition method for a complex background in an embodiment of the present invention includes:
  • the image information of the item to be identified such as an ID card, a license plate number, etc.
  • the acquired image can be obtained after the acquisition.
  • the target character region is obtained from the acquired image according to character characteristics as a target object; the target character region only occupies a part of the entire captured image, and after obtaining the acquired image, the target character region may be obtained from the captured image according to the character characteristic, as a target.
  • Object Subsequent positioning analysis is based on the target object, which can greatly reduce the data processing time.
  • the differential edge method may be used to extract character edge information in the target object to obtain an extracted image.
  • the differential edge method may be used to extract character edge information in the target object to obtain an extracted image.
  • the target object and the extracted image may be superimposed to obtain a restored image.
  • the restored image may be inverted and Gaussian filtered, and the processed image is obtained.
  • the target character position can be searched within the processed image to determine the target character position for subsequent recognition of the target character.
  • the characters in the target character position can be identified to obtain the recognized character.
  • image information is first collected to obtain a captured image; then, a target character region is obtained from the acquired image according to character characteristics as a target object; then the character edge information in the target object is extracted by using a differential method to obtain an extracted image; The target object and the extracted image are superimposed to obtain a restored image; then the restored image is subjected to inverse and Gaussian filtering processing to obtain a processed image; then the target character position is searched in the processed image; and finally, the target character position is identified. Since the optical character recognition method for the complex background of the present invention is superimposed, the original image is superimposed with the image after the edge detection, and then the processed image is inverted and Gaussian filtered. On the basis of this, the integral is calculated according to the processed image. Figure, and use the integral graph to accelerate the positioning process, which can accurately and quickly locate and identify characters based on effectively suppressing background noise and highlighting character information.
  • a second embodiment of an optical character recognition method for a complex background in an example includes:
  • image information of the item to be identified such as an ID card, a license plate number, etc.
  • the acquired image ⁇ can be obtained after the acquisition is completed.
  • the above acquired image G can be acquired by the image acquisition device. It can also be obtained by acquiring image information by an image sensor. When it is an image sensor, it can be a full-frame contact image sensor. By capturing images with a full-format contact image sensor, image information can be acquired more comprehensively, thereby ensuring the content validity of the image.
  • the target object G i As the target object G i.
  • Subsequent positioning analysis is based on the target object G i , which can greatly reduce the data processing time. See Figure 3.2 for specific target objects.
  • the operator edge detection method extracts the character edge information in the target object.
  • the advantage of the differential operator is that it detects the edge while suppressing the effects of noise.
  • the first-order differential operator uses the gray-scale difference between the upper and lower adjacent points of the pixel to check the edge.
  • the principle is to use the two-direction template to perform neighborhood convolution with the image in the image space. Please refer to Figure 3.3, two One of the direction templates detects the horizontal edge and one detects the vertical edge.
  • a 2 f(i -1,7 + 1)+ f(i, 7 + 1)+ f(i + 1,7 + 1) (2-5)
  • B 2 f ⁇ i ⁇ 1, 7 -1 ) + f ⁇ i, 7 -1) + f ⁇ i + 1,7 - 1) (2-6)
  • the target object G l is processed by the differential operator to obtain the extracted image G 2 ; 2 can highlight the edge letter
  • the target object ⁇ and the extracted image G 2 can be superimposed to obtain a restored image.
  • the character edge information is enhanced, a part of the gray scale information is lost compared to the original image.
  • the superposition operation of ⁇ and ⁇ can restore the partial gray information of the original image and significantly enhance the image effect.
  • the superposition operation is defined as:
  • G 3 max(0, min(255, G, + G 2 )) 305. Inverting and Gaussian filtering the restored image to obtain a processed image; after obtaining the restored image, the restored image may be inverted and Gaussian filtered Processing, and then processing the image ⁇ .
  • the above inversion and Gaussian filtering process can not only highlight the visual effect of the character, but also reduce the noise caused by the error transmission, thereby smoothing the image.
  • the target character position can be searched within the processed image to determine the target character position for subsequent recognition of the target character.
  • the specific process of searching for the position of the target character in the processed image may be: determining the search box according to the character characteristic and the processed image; continuously sliding the search box on the processed image according to a preset rule, and calculating the gray value of the pixel in the search box. And, the position where the search box is located when the sum of the pixel gray values is maximum is determined as the target character position.
  • the search box may be first determined according to the character characteristics and the processed image, and then the search box is continuously slid on the processed image according to a preset rule, and the sum of the gray values of the pixels in the search box is calculated, and the sum of the gray values of the pixels is maximized.
  • the position of the box is determined as the target character position.
  • the time of the above process is determined by the following formula.
  • the specific process of searching for the position of the target character in the processed image may also be: determining a search box according to the character characteristic and the processed image; converting the processed image into an integral image; continuously sliding the search box on the integrated image according to a preset rule, and calculating The sum of the pixel gray values in the search box, and the position where the search box is located when the sum of the pixel gray values is the largest is determined as the target character position.
  • the value of any point in the integrated image ( X ) is the sum of the gray values of all pixels in the rectangular region formed from the upper left corner of the image to this point, ie:
  • the characters in the target character position can be identified to obtain the recognized character.
  • the original image of the 20-yuan banknote is collected, and the specific image can be collected by using the transmitted light, and the image shown in Figure 3.6 can be obtained; then the region where the target character is located is roughly located, and the region is intercepted, and specifically, the region can be determined.
  • the target object shown in Figure 3.7 is obtained; then the differential edge method is used to extract the character edge information in the target object, and the extracted image as shown in Figure 3.8 is obtained.
  • the image contains More noise; then superimpose the target object and the extracted image to obtain the restored image as shown in Figure 3.9.
  • the processed image shown in Figure 3.10 is obtained, and the image is already smoother.
  • the search position of the integrated image is used to search for the target character position and identify in the processed image. For example, a search with a width of 228 pixels and a height of 21 pixels can be selected.
  • the box searches on the processed image until the pixel When the sum of the gray values is maximum, the position of the search box is determined as the target character position.
  • the specific integral image is shown in Figure 3.11, and the target character position is shown in Figure 3.12.
  • image information is first collected to obtain a captured image; then, a target character region is obtained from the acquired image according to character characteristics as a target object; then the character edge information in the target object is extracted by using a differential method to obtain an extracted image; The target object and the extracted image are superimposed to obtain a restored image; then the restored image is subjected to inverse and Gaussian filtering processing to obtain a processed image; then the target character position is searched in the processed image; and finally, the target character position is identified. Since the optical character recognition method for the complex background of the present invention is superimposed, the original image is superimposed with the image after the edge detection, and then the processed image is inverted and Gaussian filtered. On the basis of this, the integral is calculated according to the processed image. Figure, and use the integral graph to accelerate the positioning process, which can accurately and quickly locate and identify characters based on effectively suppressing background noise and highlighting character information.
  • an optical character recognition device for a complex background including:
  • the acquiring module 401 is configured to collect image information to obtain a captured image
  • the obtaining module 402 is configured to obtain a target character region from the acquired image according to a character characteristic, as a target object;
  • the extracting module 403 is configured to extract character edge information in the target object by using a differential method, and obtain an extracted image
  • a superimposing module 404 configured to superimpose the target object and the extracted image to obtain a restored image
  • the processing module 405 is configured to perform inversion and Gaussian filtering processing on the restored image to obtain a processed image
  • a search module 406 configured to search for a target character position within the processed image
  • the identification module 407 is configured to identify the target character position.
  • the search module 406 of the embodiment of the present invention may further include: a determining submodule 4061, configured to determine a search box according to the character characteristics and the processed image; and a processing submodule 4062, configured to process the image by the search box according to a preset rule. Continuously sliding And, calculating the sum of the gray values of the pixels in the search box, and determining the position of the search box as the target character position when the sum of the gray values of the pixels is maximum.
  • the search module 406 of the embodiment of the present invention may further include: a second determining subunit 40601, configured to determine a search box according to the character characteristics and the processed image; and a converting subunit 40602, configured to convert the processed image into an integral Image
  • the second processing sub-module 40603 is configured to continuously slide the search box on the integrated image according to a preset rule, and calculate a sum of gray values of pixels in the search box, where the search box is located when the sum of the gray values of the pixels is maximum Determined as the target character position.
  • the acquisition module before the positioning and recognition of characters in the image, the acquisition module
  • the obtaining module 402 can obtain the target character area from the acquired image according to the character characteristic as the target object. Subsequent positioning analysis is based on the target object, which can greatly reduce the data processing time.
  • the extraction module 403 may extract the character edge information in the target object by using a differential method to obtain an extracted image.
  • the overlay module 404 can superimpose the target object and the extracted image to obtain a restored image.
  • the processing module 405 can perform inverse and Gaussian filtering on the restored image to obtain a processed image.
  • the search module 406 can search for the target character position within the processed image to determine the target character position for subsequent recognition of the target character.
  • the last recognition module 407 can recognize the characters in the target character position to obtain the recognized characters.
  • the searching module 406 may search for the target character position in the processed image.
  • the first determining submodule 4061 first determines the search box according to the character characteristic and the processed image.
  • the first processing submodule 4062 processes the image in the search box according to a preset rule. The slide is continuously slid, and the sum of the pixel gradation values in the search box is calculated. When the sum of the pixel gradation values is maximum, the position at which the search box is located is determined as the target character position.
  • the searching module 406 may search for the target character position in the processed image, and may further include: the second determining subunit 40601 determines the search box according to the character characteristic and the processed image; then the converting subunit 40602 converts the processed image into an integral image; Processing sub-module 40603
  • the search box is continuously slid on the integral image according to a preset rule, and the sum of the pixel gradation values in the search box is calculated, and the position at which the search frame is located when the sum of the pixel gradation values is maximum is determined as the target character position.
  • the optical character recognition device for the complex background includes: an acquisition module 401, configured to acquire image information, and obtain a captured image; and an obtaining module 402, configured to acquire a target character region from the acquired image according to the character characteristic, as a target module; an extracting module 403, configured to extract character edge information in the target object by using a differential method to obtain an extracted image; a superimposing module 404, configured to superimpose the target object and the extracted image to obtain a restored image; and a processing module 405, configured to The image is restored and the Gaussian filtering process is performed to obtain a processed image; the search module 406 is configured to search for the target character position in the processed image; and the identifying module 407 is configured to identify the target character position.
  • an acquisition module 401 configured to acquire image information, and obtain a captured image
  • an obtaining module 402 configured to acquire a target character region from the acquired image according to the character characteristic, as a target module
  • an extracting module 403, configured to extract character edge information in the target object by using a differential method
  • the present invention is directed to an optical character recognition device with a complex background
  • the original image is superimposed with the edge detected image, and then the processed image is inverted and Gaussian filtered.
  • the integral is calculated according to the processed image.
  • optical character recognition method and device for complex background provided by the present invention are described in detail above.
  • the idea of the embodiment of the present invention there will be a specific implementation manner and application range.
  • the details of the description are not to be construed as limiting the invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Character Input (AREA)
  • Image Analysis (AREA)

Abstract

一种面向复杂背景的光学字符识别方法及装置,采用先将原图与边缘检测后的图像叠加,然后对处理后的图像进行取反和高斯滤波,在此基础上,根据处理后的图像计算积分图,并利用积分图加速定位过程,能够在有效地抑制背景噪声和突出字符信息的基础上,实现字符的准确快速定位和识别。本发明的方法包括:采集图像信息,得到采集图像;根据字符特性从所述采集图像中获取目标字符区域,作为目标对象;采用微分法提取所述目标对象内的字符边缘信息,得到提取图像;将所述目标对象和所述提取图像叠加,得到恢复图像;对所述恢复图像进行取反和高斯滤波处理,得到处理图像;在所述处理图像内搜索目标字符位置;对所述目标字符位置进行识别。

Description

一种面向复杂背景的光学字符识别方法及装置 本申请要求 2013 年 11 月 08 日提交中国专利局、 申请号为 201310553984.1、 发明名称为"一种面向复杂背景的光学字符识别方法及装 置"的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明实施例涉及字符定位和识别领域, 具体涉及一种面向复杂背景 的光学字符识别方法及装置。
背景技术
实际生产和生活中, 字符定位与识别有着非常多的应用, 如车牌号码 的识别、 纸币冠字号码的识别、 身份证中身份证号码的识别, 以及各种产 品包装上印刷号码的检测等等。 由于这些字符具有重要意义或商业价值, 因此在生产和生活中自动识别它们变的越来越重要。
但受制于摄像设备、 光照条件, 以及拍摄场景等因素的限制, 所拍摄 的图像常常出现背景复杂、 目标区域不明显等情况, 难以进行有效的图像 分割。
字符定位是识别的关键前提, 其定位精度直接影响到识别正确率。 现 有各种方法中, 大部分采用的是将图像转化成二值图像后再进行目标的定 位。 这类方法的不足之处在于定位精度依赖于阈值分割的效果。 如果图像 场景复杂, 或者对比度低, 或者光照不均匀, 就会发生因二值化效果差而 导致的目标定位错误。 图 1是一张钞票上的光学字符区域图像, 由于流通 时间长导致票据残旧, 严重影响图像成像质量, 导致字符背景非常复杂, 把字符从图像中提取出来存在困难。 将图像转化成二值图像后, 不能有效 提取字符, 转化后的效果如图 1.1所示。
将图像转化成二值图像后可以对字符进行定位, 传统的方法是利用二 值图像在水平方向和竖直方向的投影信息来达到定位的目的。 该方法的局 限在于算法依赖于二值化过程, 当目标背景复杂或拍摄效果不佳时, 二值 化后常发生字符断裂或粘连现象。 在这种情况下, 投影信息变得不准确, 从而影响到定位效果。对图 1.1应用投影法,将会得到如图 1.2所示的结果, 图中曲线 CI及 C2分别是该图在水平方向和竖直方向上的投影曲线,可见 投影法并不能有效地确定字符的边界。
发明内容
本发明实施例提供了一种面向复杂背景的光学字符识别方法及装置, 采用先将原图与边缘检测后的图像叠加, 然后对处理后的图像进行取反和 高斯滤波, 在此基础上, 再对处理后的图像计算积分图的方式, 能够在有 效地抑制背景噪声和突出字符信息的基础上, 实现字符的准确快速定位和 识别。
本发明实施例提供的面向复杂背景的光学字符识别方法, 包括: 采集图像信息, 得到采集图像;
根据字符特性从所述采集图像中获取目标字符区域, 作为目标对象; 采用微分法提取所述目标对象内的字符边缘信息, 得到提取图像; 将所述目标对象和所述提取图像叠加, 得到恢复图像;
对所述恢复图像进行取反和高斯滤波处理, 得到处理图像; 在所述处理图像内搜索目标字符位置;
对所述目标字符位置进行识别。
可选地 ,
所述步骤采集图像信息包括:
利用图像传感器采集图像信息。
可选地 ,
所述图像传感器包括:
全幅面接触式图像传感器。
可选地 ,
所述步骤采用微分法提取所述目标对象内的字符边缘信息包括: 采用 Prewitt (普瑞维特 )算子边缘检测法提取所述目标对象内的字符 边缘信息。
可选地 ,
所述步骤在所述处理图像内搜索目标字符位置包括: 根据所述字符特性和所述处理图像确定搜索框;
按预设规则将所述搜索框在所述处理图像上连续滑动, 并计算搜索框 内的像素灰度值之和, 所述像素灰度值之和最大时所述搜索框所处的位置 确定为目标字符位置。
可选地 ,
所述步骤在所述处理图像内搜索目标字符位置包括:
根据所述字符特性和所述处理图像确定搜索框;
将所述处理图像转换成积分图像;
按预设规则将所述搜索框在所述积分图像上连续滑动, 并计算搜索框 内的像素灰度值之和, 所述像素灰度值之和最大时所述搜索框所处的位置 确定为目标字符位置;
所述积分图像上某一点的值为从所述处理图像的左上角到这个点所 构成的矩形区域内所有像素灰度值之和。
本发明实施例提供的面向复杂背景的光学字符识别装置, 包括: 采集模块, 用于采集图像信息, 得到采集图像;
获取模块, 用于根据字符特性从所述采集图像中获取目标字符区域, 作为目标对象;
提取模块, 用于采用微分法提取所述目标对象内的字符边缘信息, 得 到提取图像;
叠加模块,用于将所述目标对象和所述提取图像叠加,得到恢复图像; 处理模块, 用于对所述恢复图像进行取反和高斯滤波处理, 得到处理 图像;
搜索模块, 用于在所述处理图像内搜索目标字符位置;
识别模块, 用于对所述目标字符位置进行识别。
可选地,
所述搜索模块包括:
第一确定子模块, 用于根据所述字符特性和所述处理图像确定搜索 框;
第一处理子模块, 用于按预设规则将所述搜索框在所述处理图像上连 续滑动, 并计算搜索框内的像素灰度值之和, 所述像素灰度值之和最大时 所述搜索框所处的位置确定为目标字符位置。
可选地 ,
所述搜索模块包括:
第二确定子单元, 用于根据所述字符特性和所述处理图像确定搜索 框;
转换子单元, 用于将所述处理图像转换成积分图像;
第二处理子模块, 用于按预设规则将所述搜索框在所述积分图像上连 续滑动, 并计算搜索框内的像素灰度值之和, 所述像素灰度值之和最大时 所述搜索框所处的位置确定为目标字符位置。
本发明实施例中, 首先采集图像信息, 得到采集图像; 接着根据字符 特性从所述采集图像中获取目标字符区域, 作为目标对象; 然后采用微分 法提取所述目标对象内的字符边缘信息, 得到提取图像; 接着将所述目标 对象和所述提取图像叠加, 得到恢复图像; 然后对所述恢复图像进行取反 和高斯滤波处理, 得到处理图像; 接着在所述处理图像内搜索目标字符位 置; 最后对所述目标字符位置进行识别。 由于本发明面向复杂背景的光学 字符识别方法及装置, 采用先将原图与边缘检测后的图像叠加, 然后对处 理后的图像进行取反和高斯滤波, 在此基础上, 根据处理后的图像计算积 分图, 并利用积分图加速定位过程, 能够在有效地抑制背景噪声和突出字 符信息的基础上, 实现字符的准确快速定位和识别。
附图说明
图 1为现有技术中残旧钞票上的光学字符区域图像示意图; 图 1.1为现有技术中对残旧钞票直接应用二值化的效果图; 图 1.2为现有技术中对残旧钞票应用二值图像法定位的效果图; 图 2为本发明实施例中面向复杂背景的光学字符识别方法第一实施例 流程图;
图 3为本发明实施例中面向复杂背景的光学字符识别方法第二实施例 流程图;
图 3.1为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中采集图像 G的示意图;
图 3.2为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中目标对象 Gi的示意图;
图 3.3为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中 Prewitt算子方向模板的示意图;
图 3.4为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中像素灰度值之和的对比示意图;
图 3.5为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中积分图像法计算像素灰度值之和的示意图;
图 3.6为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中 20元纸币的原始图像示意图;
图 3.7为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中 20元纸币的目标对象示意图;
图 3.8为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中 20元纸币的提取图像示意图;
图 3.9为本发明实施例中面向复杂背景的光学字符识别方法第二实施 例中 20元纸币的恢复图像示意图;
图 3.10 为本发明实施例中面向复杂背景的光学字符识别方法第二实 施例中 20元纸币的处理图像示意图;
图 3.11 为本发明实施例中面向复杂背景的光学字符识别方法第二实 施例中 20元纸币的积分图像示意图;
图 3.12 为本发明实施例中面向复杂背景的光学字符识别方法第二实 施例中 20元纸币的目标字符位置示意图;
图 4为本发明实施例中面向复杂背景的光学字符识别装置实施例第一 结构示意图;
图 5为本发明实施例中面向复杂背景的光学字符识别装置实施例第二 结构示意图。
具体实施方式 本发明实施例提供了一种面向复杂背景的光学字符识别方法及装置, 采用先将原图与边缘检测后的图像叠加, 然后对处理后的图像进行取反和 高斯滤波, 在此基础上, 根据处理后的图像计算积分图, 并利用积分图加 速定位过程, 能够在有效地抑制背景噪声和突出字符信息的基础上, 实现 字符的准确快速定位和识别。
Prewitt (普瑞维特) 算子是一种一阶微分算子的边缘检测, 利用像素 点上下、 左右邻点的灰度差, 在边缘处达到极值来检测边缘, 能够去掉部 分伪边缘, 对噪声具有平滑作用。 其原理是在图像空间利用两个方向模板 与图像进行邻域卷积来完成的, 这两个方向模板一个用来检测水平边缘, 一个用来检测垂直边缘。
积分图像: 对于一幅灰度的图像, 积分图像中的任意一点 (x,y)的值是 指从图像的左上角到这个点的所构成的矩形区域内所有的点的灰度值之和 需要说明的是, 本发明实施例的方法及装置可以用于各种图像字符的 定位和识别, 例如车牌号码的识别、 纸币冠字号码的识别、 身份证中身份 证号码的识别, 以及各种产品包装上印刷号码的检测等等。 下面以纸币冠 字号码的识别为例对本发明实施例的方法及装置进行说明, 虽然仅以纸币 冠字号码的识别为例进行说明, 但是不应将此作为本发明方法及装置的限 定。
请参阅图 2, 本发明实施例中面向复杂背景的光学字符识别方法的第 一实施例包括:
201、 采集图像信息, 得到采集图像;
在对图像中的字符进行定位和识别之前, 需要先采集待识别物品, 例 如身份证、 车牌号码等的图像信息, 采集完毕后可以得到采集图像。
202、 根据字符特性从采集图像中获取目标字符区域, 作为目标对象; 目标字符区域仅占整幅采集图像的一部分, 得到采集图像之后, 可以 根据字符特性从采集图像中获取目标字符区域, 作为目标对象。 后续的定 位分析以目标对象为主, 可以大幅度降低数据处理时间。
203、 采用微分法提取目标对象内的字符边缘信息, 得到提取图像; 得到目标对象之后,可以采用微分法提取目标对象内的字符边缘信息, 得到提取图像。 204、 将目标对象和提取图像叠加, 得到恢复图像;
得到提取图像之后, 可以将目标对象和提取图像叠加, 进而得到恢复 图像。
205、 对恢复图像进行取反和高斯滤波处理, 得到处理图像; 得到恢复图像之后, 可以对恢复图像进行取反和高斯滤波处理, 进而 得到处理图像。
206、 在处理图像内搜索目标字符位置;
得到处理图像之后, 可以在处理图像内搜索目标字符位置, 从而确定 目标字符位置, 以便后续对目标字符的识别。
207、 对目标字符位置进行识别。
确定目标字符位置, 可以对目标字符位置内的字符进行识别, 从而得 到识别字符。
本发明实施例中, 首先采集图像信息, 得到采集图像; 接着根据字符 特性从采集图像中获取目标字符区域, 作为目标对象; 然后采用微分法提 取目标对象内的字符边缘信息, 得到提取图像; 接着将目标对象和提取图 像叠加, 得到恢复图像; 然后对恢复图像进行取反和高斯滤波处理, 得到 处理图像; 接着在处理图像内搜索目标字符位置; 最后对目标字符位置进 行识别。 由于本发明面向复杂背景的光学字符识别方法, 采用先将原图与 边缘检测后的图像叠加, 然后对处理后的图像进行取反和高斯滤波, 在此 基础上, 根据处理后的图像计算积分图, 并利用积分图加速定位过程, 能 够在有效地抑制背景噪声和突出字符信息的基础上, 实现字符的准确快速 定位和识别。
上面筒单介绍了本发明面向复杂背景的光学字符识别方法的第一实施 例, 下面对本发明面向复杂背景的光学字符识别方法的第二实施例进行详 细的描述, 请参阅图 3 , 本发明实施例中面向复杂背景的光学字符识别方 法第二实施例包括:
301、 采集图像信息, 得到采集图像;
在对图像中的字符进行定位和识别之前, 需要先采集待识别物品, 例 如身份证、 车牌号码等的图像信息, 采集完毕后可以得到采集图像<^。
请参阅图 3.1 ,上述采集图像 G可以通过图像采集设备采集图像信息得 到, 也可以通过图像传感器采集图像信息得到, 当为图像传感器时, 可以 为全幅面接触式图像传感器。 利用全幅面接触式图像传感器采集图像, 能 够更加全面地采集图像信息, 从而保证图像的内容有效性。
302、 根据字符特性从采集图像中获取目标字符区域, 作为目标对象; 目标字符区域仅占整幅采集图像的一部分, 得到采集图像 G之后, 可 以根据字符特性从采集图像 G中获取目标字符区域, 作为目标对象 Gi。 后 续的定位分析以目标对象 Gi为主, 可以大幅度降低数据处理时间。 具体的 目标对象请参阅图 3.2。
303、 采用微分法提取目标对象的字符边缘信息, 得到提取图像; 得到目标对象之后,可以采用微分法提取目标对象内的字符边缘信息, 得到提取图像, 具体的, 可以采用 Prewitt (普瑞维特)算子边缘检测法提 取目标对象内的字符边缘信息。
微分算子的优点是检测边缘的同时能抑制噪声的影响。 一阶微分算子 利用像素点上下、 左右邻点的灰度差来检查边缘, 其原理是在图像空间利 用两个方向模板与图像进行邻域卷积来完成的,请参阅图 3.3 , 两个方向模 板中的一个检测水平边缘, 一个检测垂直边缘。
对数字图像 (X, , 微分算子定义为:
P{i, j) =
Figure imgf000010_0001
或 P{i, j) = G{i) + G{j)
其中 与 分别由 (2-1)至 (2-6)式定义。
Figure imgf000010_0002
Αγ = f{i - \ -\)+ f{i -\ )+ f{i -\ + ] (2-2)
Βγ = f{i + 1,7 -1)+ f{i + 1, + f{i + 1,7 + 1) (2-3)
Figure imgf000010_0003
A2 = f(i -1,7 + 1)+ f(i, 7 + 1)+ f(i + 1,7 + 1) (2-5) B2 = f{i ~ 1, 7 -1)+ f{i, 7 -1)+ f{i + 1,7 - 1) (2-6) 目标对象 Gl经过微分算子处理后得到提取图像 G2 ;2可以突显边缘信
304、 将目标对象和提取图像叠加, 得到恢复图像;
得到提取图像 G2之后, 可以将目标对象^和提取图像 G2叠加, 进而得 到恢复图像 。 步骤 503的过程中, 虽然增强字符边缘信息, 但是相比于原图, 也丟 失了一部分灰度信息。 对 ^和^进行叠加运算, 可以恢复原图的部分灰度 信息的同时显著地增强图像效果, 叠加运算定义为:
G3 = max(0, min(255, G, + G2 )) 305、 对恢复图像进行取反和高斯滤波处理, 得到处理图像; 得到恢复图像 之后, 可以对恢复图像进行取反和高斯滤波处理, 进 而得到处理图像^。
上述对恢复图像 进行取反的具体过程可以包括: G' = |255 _ G| , 亦即 取反图像为 |255 _ G3 | , 再对上述的取反图像进行高斯滤波 φ( ) , 最后可以 得到处理图像 G4。 上述的取反和高斯滤波处理不但能够凸显字符的视觉效 果, 而且可以减少误差传递带来的噪声, 进而使得图像平滑。
306、 在处理图像内搜索并确定目标字符位置;
得到处理图像 G4之后, 可以在处理图像内搜索目标字符位置, 从而确 定目标字符位置, 以便后续对目标字符的识别。
上述在处理图像内搜索目标字符位置的具体过程可以为: 根据字符特 性和处理图像确定搜索框; 按预设规则将搜索框在处理图像上连续滑动, 并计算搜索框内的像素灰度值之和, 像素灰度值之和最大时搜索框所处的 位置确定为目标字符位置。 具体的:
( 1 )由于目标字符位置总是最亮的,从数学表述上来看即是该区域所 有像素灰度值之和相对周围同等大小区域的灰度之和是最大的, 请参阅图
3.4, 即:
s^ s^ s, > s^
( 2 ) 目标字符位置外接矩形的大小以及面积是相对固定, 即:
= 2 , 其中 G为常量;
因此可以先根据字符特性和处理图像确定搜索框, 然后按预设规则将 搜索框在处理图像上连续滑动, 并计算搜索框内的像素灰度值之和, 像素 灰度值之和最大时搜索框所处的位置确定为目标字符位置。 上述过程的耗 时由下式决定,
T∞N x S
其中 N为搜索次数, S正比于窗口的面积。 上述在处理图像内搜索目标字符位置的具体过程也可以为: 根据字符 特性和处理图像确定搜索框; 将处理图像转换成积分图像; 按预设规则将 搜索框在积分图像上连续滑动, 并计算搜索框内的像素灰度值之和, 像素 灰度值之和最大时搜索框所处的位置确定为目标字符位置。 具体的:
对于一幅灰度图像, 积分图像中的任一点 (X, 的值是从图像的左上角 到这个点所构成的矩形区域内所有像素点的灰度值之和, 亦即:
Figure imgf000012_0001
得到积分图像后可以快速计算图像内任意矩形区域内所有像素的灰度 和, 该值标 "^己为 。
请参阅图 3.5 , 以 (X,W为垂直矩阵的右小角坐标, w、 A为垂直矩阵的 宽度和长度, 则该区域内所有像素灰度之和为:
U = l(x, y)- l{x - w, y)- l{x, y - h)+ l(x - w, y - h) 采用这种方法搜索目标字符位置能够大幅度提高搜索效率, 降低资源 开销, 有助于保障系统实时效果。
307、 对目标字符位置进行识别。
确定目标字符位置, 可以对目标字符位置内的字符进行识别, 从而得 到识别字符。
下面以 20 元纸币的冠字号识别过程来详细说明本发明实施例的具体 工作过程:
首先采集 20元纸币的原始图像,具体的可以利用透射光进行采集,可 以得到如图 3.6所示的图像; 然后粗定位出目标字符所在区域, 并截取这 一区域, 具体的, 可以将区域定为宽度 300像素及高度 60像素, 得到如图 3.7所示的目标对象;接着采用微分法提取目标对象内的字符边缘信息,得 到如图 3.8所示的提取图像, 由图可知, 图像中含有较多的噪声; 然后将 目标对象和提取图像叠加, 得到如图 3.9所示的恢复图像, 由图可知, 背 景对图像的影响得到了很好的抑制; 接着对恢复图像进行取反和高斯滤波 处理, 得到如图 3.10所示的处理图像, 此时图像已经较为平滑; 最后利用 积分图像的搜索方式在处理图像内搜索目标字符位置并识别, 例如可以选 取宽为 228像素及高为 21像素的搜索框在处理图像上进行搜索,直到像素 灰度值之和最大时搜索框所处的位置确定为目标字符位置, 具体的积分图 像如图 3.11所示, 目标字符位置如图 3.12所示。
本发明实施例中, 首先采集图像信息, 得到采集图像; 接着根据字符 特性从采集图像中获取目标字符区域, 作为目标对象; 然后采用微分法提 取目标对象内的字符边缘信息, 得到提取图像; 接着将目标对象和提取图 像叠加, 得到恢复图像; 然后对恢复图像进行取反和高斯滤波处理, 得到 处理图像; 接着在处理图像内搜索目标字符位置; 最后对目标字符位置进 行识别。 由于本发明面向复杂背景的光学字符识别方法, 采用先将原图与 边缘检测后的图像叠加, 然后对处理后的图像进行取反和高斯滤波, 在此 基础上, 根据处理后的图像计算积分图, 并利用积分图加速定位过程, 能 够在有效地抑制背景噪声和突出字符信息的基础上, 实现字符的准确快速 定位和识别。
上面对本发明面向复杂背景的光学字符识别方法的第二实施例作了详 细描述, 特别是采用微分法提取目标对象内的字符边缘信息和在处理图像 内搜索目标字符位置的过程, 下面介绍本发明面向复杂背景的光学字符识 别装置实施例, 请参阅图 4及图 5 , 本发明实施例中面向复杂背景的光学 字符识别装置, 包括:
采集模块 401 , 用于采集图像信息, 得到采集图像;
获取模块 402, 用于根据字符特性从采集图像中获取目标字符区域, 作为目标对象;
提取模块 403 用于采用微分法提取目标对象内的字符边缘信息, 得 到提取图像;
叠加模块 404, 用于将目标对象和提取图像叠加, 得到恢复图像; 处理模块 405 用于对恢复图像进行取反和高斯滤波处理, 得到处理 图像;
搜索模块 406, 用于在处理图像内搜索目标字符位置;
识别模块 407, 用于对目标字符位置进行识别。
阅图 4, 本发明实施例的搜索模块 406进一步可以包括: 确定子模块 4061 , 用于根据字符特性和处理图像确定搜索框; 处理子模块 4062, 用于按预设规则将搜索框在处理图像上连续滑 动, 并计算搜索框内的像素灰度值之和, 像素灰度值之和最大时搜索框所 处的位置确定为目标字符位置。
可选地 ,
请参阅图 5 , 本发明实施例的搜索模块 406进一步也可以包括: 第二确定子单元 40601 , 用于根据字符特性和处理图像确定搜索框; 转换子单元 40602, 用于将处理图像转换成积分图像;
第二处理子模块 40603 , 用于按预设规则将搜索框在积分图像上连续 滑动, 并计算搜索框内的像素灰度值之和, 像素灰度值之和最大时搜索框 所处的位置确定为目标字符位置。
本发明实施例中, 在对图像中的字符进行定位和识别之前, 采集模块
401 需要先采集待识别物品, 例如身份证、 车牌号码等的图像信息, 采集 完毕后可以得到采集图像。 目标字符区域仅占整幅采集图像的一部分, 得 到采集图像之后, 获取模块 402可以根据字符特性从采集图像中获取目标 字符区域, 作为目标对象。 后续的定位分析以目标对象为主, 可以大幅度 降低数据处理时间。
得到目标对象之后, 提取模块 403可以采用微分法提取目标对象内的 字符边缘信息, 得到提取图像。 得到提取图像之后, 叠加模块 404可以将 目标对象和提取图像叠加, 进而得到恢复图像。 得到恢复图像之后, 处理 模块 405可以对恢复图像进行取反和高斯滤波处理, 进而得到处理图像。 得到处理图像之后, 搜索模块 406可以在处理图像内搜索目标字符位置, 从而确定目标字符位置, 以便后续对目标字符的识别。 最后识别模块 407 可以对目标字符位置内的字符进行识别, 从而得到识别字符。
上述搜索模块 406 可以在处理图像内搜索目标字符位置具体可以包 括: 第一确定子模块 4061首先根据字符特性和处理图像确定搜索框; 第一 处理子模块 4062按预设规则将搜索框在处理图像上连续滑动,并计算搜索 框内的像素灰度值之和, 像素灰度值之和最大时搜索框所处的位置确定为 目标字符位置。
上述搜索模块 406可以在处理图像内搜索目标字符位置具体也可以包 括: 第二确定子单元 40601根据字符特性和处理图像确定搜索框; 接着转 换子单元 40602将处理图像转换成积分图像; 最后第二处理子模块 40603 按预设规则将搜索框在积分图像上连续滑动, 并计算搜索框内的像素灰度 值之和, 像素灰度值之和最大时搜索框所处的位置确定为目标字符位置。
本发明实施例中, 面向复杂背景的光学字符识别装置, 包括: 采集模 块 401 , 用于采集图像信息, 得到采集图像; 获取模块 402, 用于根据字符 特性从采集图像中获取目标字符区域, 作为目标对象; 提取模块 403 , 用 于采用微分法提取目标对象内的字符边缘信息, 得到提取图像; 叠加模块 404, 用于将目标对象和提取图像叠加, 得到恢复图像; 处理模块 405 , 用 于对恢复图像进行取反和高斯滤波处理, 得到处理图像; 搜索模块 406, 用于在处理图像内搜索目标字符位置; 识别模块 407, 用于对目标字符位 置进行识别。 由于本发明面向复杂背景的光学字符识别装置, 采用先将原 图与边缘检测后的图像叠加, 然后对处理后的图像进行取反和高斯滤波, 在此基础上,根据处理后的图像计算积分图, 并利用积分图加速定位过程, 能够在有效地抑制背景噪声和突出字符信息的基础上, 实现字符的准确快 速定位和识别。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步 骤是可以通过程序来指令相关的硬件完成, 其中的程序可以存储于一种计 算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘等。
以上对本发明所提供的一种面向复杂背景的光学字符识别方法及装置 进行了详细介绍,对于本领域的一般技术人员,依据本发明实施例的思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容 不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种面向复杂背景的光学字符识别方法, 其特征在于, 包括: 采集图像信息, 得到采集图像;
根据字符特性从所述采集图像中获取目标字符区域, 作为目标对象; 采用微分法提取所述目标对象内的字符边缘信息, 得到提取图像; 将所述目标对象和所述提取图像叠加, 得到恢复图像;
对所述恢复图像进行取反和高斯滤波处理, 得到处理图像; 在所述处理图像内搜索目标字符位置;
对所述目标字符进行识别。
2、根据权利要求 1所述的面向复杂背景的光学字符识别方法,其特征 在于, 所述步骤采集图像信息包括:
利用图像传感器采集图像信息。
3、根据权利要求 2所述的面向复杂背景的光学字符识别方法,其特征 在于, 所述图像传感器包括:
全幅面接触式图像传感器。
4、根据权利要求 1所述的面向复杂背景的光学字符识别方法,其特征 在于, 所述步骤采用微分法提取所述目标对象内的字符边缘信息包括: 采用 Prewitt (普瑞维特)算子边缘检测法提取所述目标对象内的字符 边缘信息。
5、根据权利要求 1所述的面向复杂背景的光学字符识别方法,其特征 在于, 所述步骤在所述处理图像内搜索目标字符位置包括:
根据所述字符特性和所述处理图像确定搜索框;
按预设规则将所述搜索框在所述处理图像上连续滑动, 并计算搜索框 内的像素灰度值之和, 所述像素灰度值之和最大时所述搜索框所处的位置 确定为目标字符位置。
6、根据权利要求 1所述的面向复杂背景的光学字符识别方法,其特征 在于, 所述步骤在所述处理图像内搜索目标字符位置包括:
根据所述字符特性和所述处理图像确定搜索框;
将所述处理图像转换成积分图像;
按预设规则将所述搜索框在所述积分图像上连续滑动, 并计算搜索框 内的像素灰度值之和, 所述像素灰度值之和最大时所述搜索框所处的位置 确定为目标字符位置;
所述积分图像上某一点的值为从所述处理图像的左上角到这个点所构 成的矩形区域内所有像素灰度值之和。
7、 一种面向复杂背景的光学字符识别装置, 其特征在于, 包括: 采集模块, 用于采集图像信息, 得到采集图像;
获取模块, 用于根据字符特性从所述采集图像中获取目标字符区域, 作为目标对象;
提取模块, 用于采用微分法提取所述目标对象内的字符边缘信息, 得 到提取图像;
叠加模块,用于将所述目标对象和所述提取图像叠加,得到恢复图像; 处理模块, 用于对所述恢复图像进行取反和高斯滤波处理, 得到处理 图像;
搜索模块, 用于在所述处理图像内搜索目标字符位置;
识别模块, 用于对所述目标字符位置进行识别。
8、根据权利要求 7所述的面向复杂背景的光学字符识别装置,其特征 在于, 所述搜索模块包括:
第一确定子模块,用于根据所述字符特性和所述处理图像确定搜索框; 第一处理子模块, 用于按预设规则将所述搜索框在所述处理图像上连 续滑动, 并计算搜索框内的像素灰度值之和, 所述像素灰度值之和最大时 所述搜索框所处的位置确定为目标字符位置。
9、根据权利要求 7所述的面向复杂背景的光学字符识别装置,其特征 在于, 所述搜索模块包括:
第二确定子单元,用于根据所述字符特性和所述处理图像确定搜索框; 转换子单元, 用于将所述处理图像转换成积分图像;
第二处理子模块, 用于按预设规则将所述搜索框在所述积分图像上连 续滑动, 并计算搜索框内的像素灰度值之和, 所述像素灰度值之和最大时 所述搜索框所处的位置确定为目标字符位置。
PCT/CN2014/071731 2013-11-08 2014-01-29 一种面向复杂背景的光学字符识别方法及装置 WO2015066984A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
AU2014346263A AU2014346263B2 (en) 2013-11-08 2014-01-29 Complex background-oriented optical character recognition method and device
EP14859485.6A EP3067830A4 (en) 2013-11-08 2014-01-29 Complex background-oriented optical character recognition method and device
US15/032,167 US9613266B2 (en) 2013-11-08 2014-01-29 Complex background-oriented optical character recognition method and device
ZA2016/03037A ZA201603037B (en) 2013-11-08 2016-05-06 Complex background-oriented optical character recognition method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310553984.1 2013-11-08
CN201310553984.1A CN103544491A (zh) 2013-11-08 2013-11-08 一种面向复杂背景的光学字符识别方法及装置

Publications (1)

Publication Number Publication Date
WO2015066984A1 true WO2015066984A1 (zh) 2015-05-14

Family

ID=49967926

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/071731 WO2015066984A1 (zh) 2013-11-08 2014-01-29 一种面向复杂背景的光学字符识别方法及装置

Country Status (7)

Country Link
US (1) US9613266B2 (zh)
EP (1) EP3067830A4 (zh)
CN (1) CN103544491A (zh)
AU (1) AU2014346263B2 (zh)
CL (1) CL2016001036A1 (zh)
WO (1) WO2015066984A1 (zh)
ZA (1) ZA201603037B (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543686A (zh) * 2018-10-24 2019-03-29 重庆师范大学 基于自适应多阈值的字符识别预处理二值化方法
CN112053299A (zh) * 2020-08-27 2020-12-08 杭州安旭生物科技股份有限公司 一种基于胶体金免疫层析法的图像处理方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256526B (zh) * 2017-12-07 2022-01-18 上海理工大学 一种基于机器视觉的机动车车牌定位检测方法
CN108121991B (zh) * 2018-01-06 2022-11-15 北京航空航天大学 一种基于边缘候选区域提取的深度学习舰船目标检测方法
CN109101969A (zh) * 2018-08-23 2018-12-28 深圳市深晓科技有限公司 一种基于字符识别的图像处理方法及装置
CN109344116B (zh) * 2018-09-21 2022-03-15 福州大学 Prewitt算子的NEON加速引擎器
CN109785353B (zh) * 2019-01-15 2020-12-08 佛山市顺德区中山大学研究院 一种二维码的二次遍历二值化方法、装置和存储介质
CN110119741B (zh) * 2019-04-08 2022-09-27 浙江大学宁波理工学院 一种有背景的卡证图像信息识别方法
CN110765994B (zh) * 2019-10-10 2023-05-26 广东小天才科技有限公司 一种书本内容定位方法、装置、电子设备及存储介质
CN112766249B (zh) * 2019-11-04 2024-06-14 深圳怡化电脑股份有限公司 票据边界定位方法、装置及终端设备
CN111738247B (zh) * 2020-05-15 2023-07-25 上海望友信息科技有限公司 极性标识的识别方法、识别装置、电子设备及存储介质
CN111680688B (zh) * 2020-06-10 2023-08-08 创新奇智(成都)科技有限公司 字符识别方法及装置、电子设备、存储介质
CN113963354B (zh) * 2021-12-16 2022-04-12 深圳市活力天汇科技股份有限公司 一种获取订单编号的方法和装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030179934A1 (en) * 2002-03-22 2003-09-25 Lockheed Martin Corporation System and method for filtering and binarization of images in the presence of specular noise
CN101303803A (zh) * 2008-06-11 2008-11-12 北京中星微电子有限公司 一种车牌识别的方法和系统
US20090252434A1 (en) * 2008-04-03 2009-10-08 Hui Zhou Thresholding Gray-Scale Images To Produce Bitonal Images
CN101872416A (zh) * 2010-05-06 2010-10-27 复旦大学 对道路图像进行车牌识别的方法和系统
CN102779275A (zh) * 2012-07-04 2012-11-14 广州广电运通金融电子股份有限公司 一种纸类字符识别方法及相关装置
CN102831416A (zh) * 2012-08-15 2012-12-19 广州广电运通金融电子股份有限公司 一种字符识别方法及相关装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100371944C (zh) * 2006-03-03 2008-02-27 清华大学 基于反射或透射光强分布特性的灰度图像分割方法
CN101903907B (zh) * 2007-12-21 2012-11-14 杜比实验室特许公司 针对边缘的图像处理
CN101667289B (zh) * 2008-11-19 2011-08-24 西安电子科技大学 基于nsct特征提取和监督分类的视网膜图像分割方法
US8577145B2 (en) * 2009-12-19 2013-11-05 Pcas Patient Care Automation Services Inc. Automated dispensary for identifying embossed characters and package labeling
CN102426649B (zh) * 2011-10-13 2013-08-21 石家庄开发区冀科双实科技有限公司 一种简单的高准确率的钢印数字自动识别方法
CN102622732A (zh) * 2012-03-14 2012-08-01 上海大学 一种前扫声纳图像拼接方法
CN102915438B (zh) * 2012-08-21 2016-11-23 北京捷成世纪科技股份有限公司 一种视频字幕的提取方法及装置
CN103258198B (zh) * 2013-04-26 2015-12-23 四川大学 一种表格文档图像中字符提取方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030179934A1 (en) * 2002-03-22 2003-09-25 Lockheed Martin Corporation System and method for filtering and binarization of images in the presence of specular noise
US20090252434A1 (en) * 2008-04-03 2009-10-08 Hui Zhou Thresholding Gray-Scale Images To Produce Bitonal Images
CN101303803A (zh) * 2008-06-11 2008-11-12 北京中星微电子有限公司 一种车牌识别的方法和系统
CN101872416A (zh) * 2010-05-06 2010-10-27 复旦大学 对道路图像进行车牌识别的方法和系统
CN102779275A (zh) * 2012-07-04 2012-11-14 广州广电运通金融电子股份有限公司 一种纸类字符识别方法及相关装置
CN102831416A (zh) * 2012-08-15 2012-12-19 广州广电运通金融电子股份有限公司 一种字符识别方法及相关装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3067830A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543686A (zh) * 2018-10-24 2019-03-29 重庆师范大学 基于自适应多阈值的字符识别预处理二值化方法
CN109543686B (zh) * 2018-10-24 2023-04-25 重庆师范大学 基于自适应多阈值的字符识别预处理二值化方法
CN112053299A (zh) * 2020-08-27 2020-12-08 杭州安旭生物科技股份有限公司 一种基于胶体金免疫层析法的图像处理方法
CN112053299B (zh) * 2020-08-27 2022-07-19 杭州安旭生物科技股份有限公司 一种基于胶体金免疫层析法的图像处理方法

Also Published As

Publication number Publication date
CN103544491A (zh) 2014-01-29
US9613266B2 (en) 2017-04-04
AU2014346263B2 (en) 2016-11-17
CL2016001036A1 (es) 2016-12-02
EP3067830A4 (en) 2017-01-04
US20160259972A1 (en) 2016-09-08
ZA201603037B (en) 2017-07-26
EP3067830A1 (en) 2016-09-14

Similar Documents

Publication Publication Date Title
WO2015066984A1 (zh) 一种面向复杂背景的光学字符识别方法及装置
KR101617681B1 (ko) 히스토그램들을 갖는 다중 층 연결 요소들을 사용하는 텍스트 검출
CN107330433B (zh) 图像处理方法和装置
JP2011513809A5 (zh)
JP4987826B2 (ja) ナンバプレート認識方法およびナンバプレート認識装置
CN111738211B (zh) 基于动态背景补偿与深度学习的ptz摄像机运动目标检测与识别方法
JP2012178152A (ja) 画像処理装置、画像処理方法、プログラムおよびその記録媒体
CN111027544A (zh) 一种基于视觉显著性检测的mser车牌定位方法及系统
CN111582118A (zh) 一种人脸识别方法及装置
CN110675442B (zh) 一种结合目标识别技术的局部立体匹配方法及系统
Bai et al. A fast stroke-based method for text detection in video
Khinchi et al. A review on automatic number plate recognition technology and methods
WO2018107574A1 (zh) 一种对印防伪特征的检测方法及装置
CN111445402B (zh) 一种图像去噪方法及装置
Das et al. Evaluation of text detection and localization methods in natural images
Satish et al. Edge assisted fast binarization scheme for improved vehicle license plate recognition
Mol et al. Text recognition using poisson filtering and edge enhanced maximally stable extremal regions
CN111274858A (zh) 网络交易监管中营业执照识别方法
KR101048399B1 (ko) 문자 검출 방법 및 장치
Nor et al. Image segmentation and text extraction: application to the extraction of textual information in scene images
CN114359923A (zh) 证件字符识别方法、装置、计算机及存储介质
KR101327482B1 (ko) 이파리 영상의 잎맥 검출 및 특징 추출 방법 및 장치
Yang et al. Text detection in video images using adaptive edge detection and stroke width verification
CN108629805B (zh) 一种基于图像分层技术的显著性物体检测方法及系统
JP4812743B2 (ja) 顔認識装置、顔認識方法、顔認識プログラムおよびそのプログラムを記録した記録媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14859485

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15032167

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2014346263

Country of ref document: AU

Date of ref document: 20140129

Kind code of ref document: A

REEP Request for entry into the european phase

Ref document number: 2014859485

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014859485

Country of ref document: EP