Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4836826B2 - Image processing method of character string image, program thereof and apparatus thereof - Google Patents
[go: Go Back, main page]

JP4836826B2 - Image processing method of character string image, program thereof and apparatus thereof - Google Patents

Image processing method of character string image, program thereof and apparatus thereof Download PDF

Info

Publication number
JP4836826B2
JP4836826B2 JP2007040052A JP2007040052A JP4836826B2 JP 4836826 B2 JP4836826 B2 JP 4836826B2 JP 2007040052 A JP2007040052 A JP 2007040052A JP 2007040052 A JP2007040052 A JP 2007040052A JP 4836826 B2 JP4836826 B2 JP 4836826B2
Authority
JP
Japan
Prior art keywords
image
character
column
character string
procedure
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2007040052A
Other languages
Japanese (ja)
Other versions
JP2008204203A (en
Inventor
和久 浜元
陽 岡本
康司 米田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kobe Steel Ltd
Original Assignee
Kobe Steel Ltd
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 Kobe Steel Ltd filed Critical Kobe Steel Ltd
Priority to JP2007040052A priority Critical patent/JP4836826B2/en
Publication of JP2008204203A publication Critical patent/JP2008204203A/en
Application granted granted Critical
Publication of JP4836826B2 publication Critical patent/JP4836826B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Character Input (AREA)

Description

本発明は,複数列の文字列の画像が形成された部材を撮像して得られた画像にに基づいて各文字の画像の存在領域を特定する文字列画像の画像処理方法,そのプログラム及びその装置に関するものである。   The present invention relates to a character string image image processing method for specifying an existing area of each character image based on an image obtained by imaging a member on which a plurality of character string images are formed, a program therefor, and a program therefor It relates to the device.

製造や物流の現場では,製品や中間製品等の被管理部材の表面にロット番号や製造番号等の管理情報を表す文字列(以下,検出対象文字列という)を印字し,その被管理部材をカメラにより撮像して得られる画像に基づいてコンピュータによる文字認識の画像処理を行い,その文字認識の結果に基づいて被管理部材の管理を行なう管理システムが採用されている。そのような管理システムにおいては,プリンタヘッドによって被管理部材の表面に前記検出対象文字列が直接印字されたり,或いは所定のシール部材に前記検出対象文字列が印字され,そのシール部材が被管理部材に貼付されたりする。
ところで,製造や物流の現場では,被管理部材の移動や汚れ,他の部材との接触,不十分な照明など,印字や撮像の環境が良くないことに起因し,被管理部材の撮像画像における前記検出対象文字列の画像の品質が悪い場合がある。例えば,前記検出対象文字列の画像において,複数列の文字列相互間の位置ずれや,文字画像のにじみや一部欠損(文字画像の乱れ)などが生じる場合がある。
図12は,一部の文字画像について画像品質が劣悪な2値画像の一例である。図12に示す例は,2列分の文字列からなる検出対象文字列の画像のうち,一方の列の文字列画像の品質が汚れ等によって劣悪な状態となっている例である。
被管理部材を正しく管理するためには,撮像画像における前記検出対象文字列の画像の品質が悪い場合であっても,撮像画像における各文字画像(前記検出対象文字列を構成する各文字の画像)の存在領域を正しく特定した上で,その領域の画像(文字画像)についてパターン認識等による文字認識を行う必要がある。
これに対し,例えば,特許文献1には,文字列の画像について,所定条件を満たす連続画素である文字候補の画像を抽出し,その文字候補の画像から相互間の配置が所定条件を満たすものの外接矩形から文字の切り出し領域(文字領域)を決定する方法が示されている。
また,特許文献2には,文字列の画像について,文字列方向の投影データに基づいて文字列の列サイズ(文字高さ)を求め,さらに,文字列方向に直交する方向の投影データに基づいて行サイズ(文字幅)を求め,そのようにして求めた列サイズ及び行サイズに基づいて文字の切り出し位置を特定する方法が示されている。
特開平8−339421号公報 特開平10−69523号公報
At the manufacturing and distribution sites, character strings (hereinafter referred to as detection target character strings) representing management information such as lot numbers and manufacturing numbers are printed on the surface of managed members such as products and intermediate products. A management system is employed that performs image processing for character recognition by a computer based on an image obtained by imaging with a camera, and manages a managed member based on the result of the character recognition. In such a management system, the character string to be detected is directly printed on the surface of the managed member by a printer head, or the character string to be detected is printed on a predetermined seal member, and the seal member is used as the managed member. Or affixed to
By the way, in the production and distribution sites, the image of the managed member is not good because the environment of printing and imaging is not good, such as movement and dirt of the managed member, contact with other members, insufficient lighting, etc. The quality of the image of the detection target character string may be poor. For example, in the image of the character string to be detected, there may be a positional shift between a plurality of character strings, bleeding of character images, partial loss (disturbance of character images), or the like.
FIG. 12 is an example of a binary image with poor image quality for some character images. The example shown in FIG. 12 is an example in which the quality of the character string image of one column out of the images of the character string to be detected consisting of two character strings is in a poor state due to dirt or the like.
In order to manage managed members correctly, even if the quality of the detection target character string in the captured image is poor, each character image in the captured image (the image of each character constituting the detection target character string). ) Is correctly specified, and character recognition by pattern recognition or the like is required for the image (character image) in that region.
On the other hand, for example, in Patent Document 1, a character candidate image that is a continuous pixel satisfying a predetermined condition is extracted from a character string image, and the arrangement between the character candidates is based on the character candidate image. A method for determining a character cutout region (character region) from a circumscribed rectangle is shown.
In Patent Document 2, a character string image size (character height) is obtained based on projection data in the character string direction, and further, based on projection data in a direction orthogonal to the character string direction. Thus, a method is described in which the line size (character width) is obtained and the character cutout position is specified based on the column size and the line size thus obtained.
JP-A-8-339421 Japanese Patent Laid-Open No. 10-69523

ところで,複数列の文字列からなる前記検出対象文字列の画像が被管理部材に印字される,一列分の文字列の画像相互の列方向(文字列方向)の位置ずれが大きくなる場合がある。例えば,前記検出対象文字列を印字する印字ヘッドが一列分の文字列ごとに個別に設けられている場合や,複数の工程それぞれにおいて一列分の文字列の印字が個別に印字される場合などである。
また,前記検出対象文字列を構成する文字の一部について,汚れや照明不良,他の部材との接触等の問題により,文字画像と文字画像との間の隙間(無画像の領域)が明確でない場合がある。例えば,ある文字画像が隣接する他の文字画像と連結した状態(以下,連結状態という)となっていたり,或いは本来1つの連結画素であるはずの文字画像が複数の連結画素に断裂した状態(以下,断裂状態という)となっていたりする場合がその典型例である。
そのように前記検出対象文字列の画像の品質が悪い状況下においても,各文字画像の存在領域を極力正しく特定できることが望ましい。
しかしながら,特許文献1に示される技術は,前記検出対象文字列の画像全体において,各文字画像の外接矩形(連結画素の外接矩形)相互の位置関係がほぼ予め定められた位置関係からほぼずれがないことを前提としている。このため,複数列の前記検出対象文字列における一列分の文字列それぞれの画像相互の列方向の位置ずれが大きい場合,特許文献1に示される技術では,各文字画像の存在領域を正しく特定できないという問題点があった。
また,前記検出対象文字列を構成する文字の一部について,その文字画像が前記連結状態や前記断裂状態となっている場合,即ち,1つの連結画素と1つの文字画像とが1対1に対応していない場合,連結画素の外接矩形相互の位置関係が予め定められた位置関係を満たさず,特許文献1に示される技術では,やはり各文字画像の存在領域を正しく特定できないという問題点があった。
一方,特許文献2に示される技術は,前記検出対象文字列の画像における列方向の投影データに基づいて一列分の文字列それぞれの存在範囲を特定した上で,一列分の文字列の範囲の画像それぞれについて,列方向に直交する方向の投影データに基づいて,各文字画像の領域を特定するものである。このため,複数列の前記検出対象文字列における一列分の文字列それぞれの画像相互の列方向の位置ずれが比較的大きくても,特許文献2に示される技術によれば,一列分の文字列それぞれの存在領域を正しく特定できる。
しかしながら,前記検出対象文字列を構成する文字の一部について,文字画像と文字画像との間の隙間が明確でない場合,そのような文字画像を含む列については,特許文献2に示される技術により列方向に直交する投影データに基づいて文字領域の特定を行っても,各文字画像の存在領域を正しく特定できないという問題点があった。
従って,本発明は上記事情に鑑みてなされたものであり,その目的とするところは,複数列の文字列からなる検出対象文字列の画像について各文字画像の領域を特定する場合に,一列分の文字列それぞれの画像相互の列方向の位置ずれが大きい場合や,前記検出対象文字列を構成する文字の一部について,文字画像と文字画像との間の隙間が明確でない場合であっても,各文字画像の存在領域を極力正しく特定できる文字列画像の画像処理方法,そのプログラム及びその装置を提供することにある。
By the way, the image of the detection target character string composed of a plurality of character strings is printed on the managed member, and there may be a large positional shift in the column direction (character string direction) between the images of the character string for one column. . For example, when a print head for printing the character string to be detected is provided for each character string, or when a character string for one row is printed individually in each of a plurality of processes, etc. is there.
In addition, a gap (a non-image area) between the character image and the character image is clear due to problems such as dirt, poor lighting, and contact with other members of a part of the characters constituting the detection target character string. It may not be. For example, a certain character image is connected to another adjacent character image (hereinafter referred to as a connected state), or a character image that should originally be one connected pixel is broken into a plurality of connected pixels ( A typical example is a case where it is referred to as a “ruptured state” below.
Even in such a situation where the quality of the image of the character string to be detected is poor, it is desirable that the existing area of each character image can be specified as accurately as possible.
However, in the technique disclosed in Patent Document 1, in the entire image of the character string to be detected, the circumscribed rectangles of each character image (the circumscribed rectangle of the connected pixels) are substantially deviated from the predetermined positional relationship. It is assumed that there is no. For this reason, in the case where there is a large positional shift in the column direction between the images of each of the character strings in a plurality of columns of the detection target character strings, the technique disclosed in Patent Literature 1 cannot correctly identify the existence region of each character image. There was a problem.
In addition, for a part of characters constituting the detection target character string, when the character image is in the connected state or the broken state, that is, one connected pixel and one character image are in a one-to-one relationship. If not, the positional relationship between the circumscribed rectangles of the connected pixels does not satisfy a predetermined positional relationship, and the technique disclosed in Patent Document 1 still cannot correctly identify the existence area of each character image. there were.
On the other hand, the technique disclosed in Patent Document 2 specifies the existence range of each character string based on the projection data in the column direction in the image of the detection target character string, and then determines the range of the character string for one column. For each image, the area of each character image is specified based on projection data in a direction orthogonal to the column direction. For this reason, according to the technique shown in Patent Document 2, even if the positional deviation in the column direction between the images of each of the character strings for one column in the plurality of character strings to be detected is relatively large, Each existence area can be correctly identified.
However, when a gap between a character image and a character image is not clear for a part of characters constituting the detection target character string, a column including such a character image is obtained by the technique disclosed in Patent Document 2. Even if the character area is specified based on the projection data orthogonal to the column direction, there is a problem that the existence area of each character image cannot be specified correctly.
Accordingly, the present invention has been made in view of the above circumstances, and the object of the present invention is to identify one character image area when specifying an area of each character image with respect to an image of a character string to be detected consisting of a plurality of character strings. Even when there is a large misalignment in the column direction between the images of the character strings, or when the gap between the character images is not clear for some of the characters constituting the detection target character string It is an object of the present invention to provide a character string image image processing method, a program thereof, and an apparatus thereof that can specify the existence region of each character image as accurately as possible.

上記目的を達成するために,本発明に係る文字列画像の画像処理方法は,複数列の文字列からなり文字寸法と一列の文字数及び文字間隔と列数と列間隔とが所定の(既知の)文字配置条件を満たす検出対象文字列の画像が形成された部材を撮像して得られた画像についての2値画像のデータを所定の記憶手段から読み出し,その読み出しデータに基づいて前記2値画像における前記検出対象文字列を構成する各文字の画像の存在領域を特定し,特定した各文字の画像の存在領域から文字画像を抽出する方法であり,所定のプロセッサ(コンピュータといってもよい)により,次の(1)〜(9)に示す各手順を自動的に実行する方法である。なお,本発明において検出対象となる前記検出対象文字列における文字の画像は,印字不良や汚れ,照明不良などに起因する画質の悪化がない場合,本来は連結画素からなる画像である。
(1)前記読み出しデータに基づいて,前記2値画像における連結画素のうち予め定められた文字画像の条件を満たすものを特定する第1の文字候補特定手順。
(2)前記第1の文字候補特定手順により特定された前記連結画素のうちその相対的な位置関係が,前記文字配置条件における文字相互の相対的な位置関係を所定の誤差範囲内で満たすものを特定する第2の文字候補特定手順。
(3)前記第2の文字候補特定手順により特定された前記連結画素である文字候補画像それぞれの位置及び寸法と前記文字配置条件と予め定められた文字配置の変動範囲とに基づいて,前記2値画像において前記文字候補画像の全てを含む領域であって前記検出対象文字列の画像全体を含む領域を推定する文字列包含領域推定手順。
(4)前記2値画像における前記文字列包含領域推定手順により推定された領域である文字列包含推定領域の画像について予め定められた処理を行うことにより,前記検出対象文字列を構成する一列分の文字列の画像それぞれの列方向に直交する列直交方向における存在範囲を推定する列幅範囲推定手順。
(5)前記文字列包含領域の画像における前記列幅範囲推定手順により推定された範囲それぞれの画像である列領域画像について前記列直交方向の投影データ又はその投影データについて上限値を制限する補正処理を施したデータの分布を算出する第1の列直交方向投影データ算出手順。
(6)前記第1の列直交方向投影データ算出手順による算出データに基づいて,列方向のシフト量を変数とする相互相関関数を導出する相互相関関数導出手順。
(7)前記相互相関関数導出手順により得られた前記相互相関関数に基づいて,前記列領域画像相互の列方向の位置ずれ量である列相互ずれ量を導出する列相互ずれ量導出手順。(8)複数の前記列領域画像それぞれを前記列相互ずれ量だけ位置修正した画像全体における前記列直交方向の投影データ又はその投影データについて上限値を制限する補正処理を施したデータの分布を算出する第2の列直交方向投影データ算出手順。
(9)前記第2の列直交方向投影データ算出手順による算出データに基づいて,前記列領域画像それぞれにおける前記検出対象文字列を構成する各文字の画像の存在領域の位置を特定する文字領域特定手順。
なお,前記予め定められた文字画像の条件は,例えば,連結画素の外接矩形の大きさ,連結画素の外接矩形の縦横比,連結画素の面積,連結画素とその外接矩形との面積比,及び連結画素の周囲長の2乗とその面積との比,のうちの少なくとも1つが予め定められた範囲内にあることである。
また,例えば前記プロセッサが,前記列相互ずれ量出手順において,前記相互相関関数導出手順により得られた前記相互相関関数における最大の相関値に対応する列方向のシフト量に基づいて前記列相互ずれ量を導出することが考えられる。
In order to achieve the above object, an image processing method for a character string image according to the present invention is composed of a plurality of character strings, and the character size, the number of characters in one column, the character spacing, the number of columns, and the column spacing are predetermined (known. ) Reads out binary image data of an image obtained by imaging a member on which an image of a detection target character string that satisfies the character arrangement condition is formed from a predetermined storage unit, and based on the read data, the binary image Is a method for identifying an existing area of each character image constituting the character string to be detected and extracting a character image from the identified existing image area of each character, and a predetermined processor (may be referred to as a computer) Thus, the following procedures (1) to (9) are automatically executed. The character image in the detection target character string to be detected in the present invention is originally an image composed of connected pixels when there is no deterioration in image quality due to poor printing, dirt, poor lighting, or the like.
(1) A first character candidate specifying procedure for specifying, based on the read data, a connected pixel in the binary image that satisfies a predetermined character image condition.
(2) Among the connected pixels specified by the first character candidate specifying procedure, the relative positional relationship satisfies the relative positional relationship between characters in the character arrangement condition within a predetermined error range. A second character candidate identification procedure for identifying.
(3) Based on the position and size of each character candidate image that is the connected pixel specified by the second character candidate specifying procedure, the character arrangement condition, and a predetermined character arrangement variation range, A character string inclusion region estimation procedure for estimating a region including all of the character candidate images in the value image and including the entire image of the detection target character string.
(4) By performing a predetermined process on the image of the character string inclusion estimation area, which is an area estimated by the character string inclusion area estimation procedure in the binary image, a single line constituting the detection target character string The column width range estimation procedure which estimates the existence range in the column orthogonal direction orthogonal to the column direction of each character string image.
(5) Correction processing for limiting the upper limit value of projection data in the column orthogonal direction or projection data in the column orthogonal direction with respect to a row region image that is an image of each range estimated by the row width range estimation procedure in the character string inclusion region image A first column orthogonal direction projection data calculation procedure for calculating the distribution of the data subjected to.
(6) A cross-correlation function derivation procedure for deriving a cross-correlation function with the shift amount in the column direction as a variable based on calculation data obtained by the first column orthogonal direction projection data calculation procedure.
(7) A column mutual displacement amount derivation procedure for deriving a column mutual displacement amount, which is a positional displacement amount in the column direction between the column region images, based on the cross correlation function obtained by the cross correlation function derivation procedure. (8) Calculate projection data in the column orthogonal direction in the entire image obtained by correcting the position of each of the plurality of column region images by the column mutual shift amount or a distribution of data subjected to correction processing for limiting the upper limit value of the projection data. A second column orthogonal direction projection data calculation procedure.
(9) Character area specification that specifies the position of the existence area of the image of each character constituting the detection target character string in each of the row area images based on the calculation data obtained by the second column orthogonal direction projection data calculation procedure procedure.
The predetermined character image conditions include, for example, the size of the circumscribed rectangle of the connected pixel, the aspect ratio of the circumscribed rectangle of the connected pixel, the area of the connected pixel, the area ratio of the connected pixel and its circumscribed rectangle, and That is, at least one of the ratio of the square of the perimeter of the connected pixel and its area is within a predetermined range.
Further, for example, the processor, in the column mutual displacement amount guiding out procedure, the columns each other on the basis of the shift amount in the column direction corresponding to the maximum correlation value in said cross-correlation function obtained by the cross-correlation function derived Procedure It is conceivable to derive the deviation amount.

また,本発明において,前記プロセッサが,前記列幅範囲推定手順において,例えば次の(10)及び(11)に示す各手順を実行する。
(10)前記2値画像における前記文字列包含推定領域の画像について列方向の投影データの分布を算出する列方向投影データ算出手順。
(11)前記列方向投影データ算出手順による算出データに基づいて,前記検出対象文字列を構成する一列分の文字列の画像それぞれの前記列直交方向における存在範囲を推定する範囲推定手順。
この(10)及び(11)に示す手順による処理の一例は,特許文献1に示される文字列を切り出すステップにおける処理である。
その他,一列分の文字列の画像の前記列直交方向における位置ずれをほとんど考慮しなくてよい場合には,前記プロセッサが,前記文字列包含推定領域を既知の文字列の列数で等分割することによって一列分の文字列の画像それぞれの前記列直交方向における存在範囲を推定することも考えられる。
また,本発明において,前記プロセッサが,さらに次の(12)及び(13)に示す各手順を自動的に実行することが考えられる。
(12)前記相互相関関数導出手順により得られた前記相互相関関数における複数の相関値のピーク相互の間隔と前記文字配置条件における一列の文字数とに基づいて,前記列領域画像それぞれにおける前記検出対象文字列の画像が存在する範囲の列方向の長さを算出する列長さ算出手順。
(13)前記第2の列直交方向投影データ算出手順による算出データについて,列方向における複数の基準位置それぞれを基準として前記列長さ算出手順による算出結果である列長さの範囲内の値の積算値又は平均値を算出し,その算出値が最大となるときの前記基準位置と前記列長さとに基づいて,前記列領域画像における処理対象範囲を特定する列領域画像処理対象範囲特定手順。
なお,この場合,前記プロセッサは,前記文字領域特定手順において,前記列領域画像処理対象範囲特定手順により特定された前記処理対象範囲を対象に前記検出対象文字列を構成する各文字の画像の存在領域を特定する。
In the present invention, the processor executes, for example, the following procedures (10) and (11) in the column width range estimation procedure.
(10) A column direction projection data calculation procedure for calculating a distribution of projection data in the column direction for the image of the character string inclusion estimation region in the binary image.
(11) A range estimation procedure for estimating an existence range in the column orthogonal direction of each character string image constituting the detection target character string based on calculation data obtained by the column direction projection data calculation procedure.
An example of the processing according to the procedures shown in (10) and (11) is processing in the step of cutting out the character string shown in Patent Document 1.
In addition, when there is little need to consider the positional deviation in the column orthogonal direction of the image of the character string for one column, the processor equally divides the character string inclusion estimation area by the number of columns of known character strings. Thus, it is conceivable to estimate the existence range in the column orthogonal direction of each character string image for one column.
In the present invention, it is conceivable that the processor further automatically executes the following procedures (12) and (13).
(12) The detection target in each of the row region images based on the interval between peaks of a plurality of correlation values in the cross-correlation function obtained by the cross-correlation function derivation procedure and the number of characters in one row in the character arrangement condition A column length calculation procedure for calculating a length in a column direction of a range where a character string image exists.
(13) With respect to calculation data obtained by the second column orthogonal direction projection data calculation procedure, a value within a column length range that is a calculation result obtained by the column length calculation procedure with respect to each of a plurality of reference positions in the column direction. A column region image processing target range specifying procedure for calculating an integrated value or an average value and specifying a processing target range in the column region image based on the reference position and the column length when the calculated value is maximized.
In this case, the processor, in the character region specifying procedure, includes the presence of an image of each character constituting the detection target character string for the processing target range specified by the column region image processing target range specifying procedure. Identify the area.

また,本発明は,以上に示した本発明に係る文字画像の画像処理方法における各手順を所定のプロセッサ(コンピュータといってもよい)に実行させるための文字画像の画像処理プログラムとして具現されることも考えられる。
同様に,本発明は,以上に示した本発明に係る文字画像の画像処理方法における各手順を実行する手段を備えた文字画像の画像処理装置として具現されることも考えられる。なお,所定のプログラムを実行することにより,以上に示した本発明に係る文字画像の画像処理方法における各手順を実行するコンピュータ(情報処理装置)が,本発明に係る文字画像の画像処理装置の典型例である。
The present invention is embodied as a character image image processing program for causing a predetermined processor (may be referred to as a computer) to execute each procedure in the character image image processing method according to the present invention described above. It is also possible.
Similarly, the present invention may be embodied as a character image image processing apparatus including means for executing each procedure in the character image image processing method according to the present invention described above. A computer (information processing apparatus) that executes each procedure in the above-described character image image processing method according to the present invention by executing a predetermined program is used in the character image image processing apparatus according to the present invention. This is a typical example.

本発明によれば,後述するように,複数列の文字列からなる検出対象文字列の画像について各文字画像の領域を特定する場合に,一列分の文字列それぞれの画像相互の列方向の位置ずれが大きい場合や,前記検出対象文字列を構成する文字の一部について,文字画像と文字画像との間の隙間が明確でない場合であっても,各文字画像の存在領域を極力正しく特定できる。   According to the present invention, as will be described later, when specifying the area of each character image with respect to the image of the character string to be detected consisting of a plurality of character strings, the positions of the character strings for one column in the column direction between the images. Even if the deviation is large or the gap between the character images is not clear for a part of the characters constituting the detection target character string, the existence area of each character image can be specified as accurately as possible. .

以下添付図面を参照しながら,本発明の実施の形態について説明し,本発明の理解に供する。尚,以下の実施の形態は,本発明を具体化した一例であって,本発明の技術的範囲を限定する性格のものではない。
ここに,図1は本発明の実施形態に係る文字画像の画像処理装置Zの概略構成を表すブロック図,図2は画像処理装置Zによる文字画像切出し・文字認識処理の手順を表すフローチャート,図3は画像処理装置Zによる画像処理の対象となる2値画像の一例を表す図,図4は2値画像における文字画像の候補の一例を表す図,図5は検出対象文字列における文字配置条件を模式的に表した図,図6は2値画像における文字画像の候補相互の位置関係を表した図,図7は画像処理装置Zにより特定される文字列包含推定領域の画像の一例を表す図,図8は文字列包含推定領域の画像及びその画像における列方向の投影データ分布の一例を表す図,図9は文字列包含推定領域における列領域画像及びその画像における列直交方向の投影データ分布の一例を表す図,図10は列領域画像の列直交方向の投影データを補正したデータの相互相関関数の一例を表すグラフ,図11は列領域画像の列方向の位置ずれを修正した画像及びその画像全体の列直交方向の投影データの上限を補正したデータの分布の一例を表す図,図12は一部の文字画像について画像品質が劣悪な2値画像の一例を表す図である。
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings so that the present invention can be understood. The following embodiment is an example embodying the present invention, and does not limit the technical scope of the present invention.
FIG. 1 is a block diagram showing a schematic configuration of a character image image processing apparatus Z according to an embodiment of the present invention. FIG. 2 is a flowchart showing a procedure of character image cutting and character recognition processing by the image processing apparatus Z. 3 is a diagram illustrating an example of a binary image to be subjected to image processing by the image processing device Z, FIG. 4 is a diagram illustrating an example of a character image candidate in the binary image, and FIG. 5 is a character arrangement condition in a detection target character string FIG. 6 is a diagram showing the positional relationship between character image candidates in a binary image, and FIG. 7 is an example of an image of a character string inclusion estimation region specified by the image processing device Z. FIG. 8 is a diagram showing an example of a character string inclusion estimation region image and a projection data distribution in the column direction in the image, and FIG. 9 is a column region image in the character string inclusion estimation region and projection data in the column orthogonal direction in the image. distribution FIG. 10 is a graph showing an example of a cross-correlation function of data obtained by correcting projection data in the column orthogonal direction of the row region image. FIG. 11 is an image in which the positional deviation in the row direction of the row region image is corrected, and its FIG. 12 is a diagram illustrating an example of the distribution of data obtained by correcting the upper limit of projection data in the column orthogonal direction of the entire image, and FIG. 12 is a diagram illustrating an example of a binary image with poor image quality for some character images.

まず,図1に示すブロック図を参照しつつ,本発明の実施形態に係る文字画像の画像処理装置Z(以下,画像処理装置Zという)の構成について説明する。
前記画像処理装置Zは,コンピュータであり,図1に示すように,CPU41,カメラインターフェース42,画像メモリ43,画像処理部44,表示部45,汎用メモリ46及び通信部47を備えている。
前記画像処理装置Zは,前記検出対象文字列の画像cが形成された被管理部材1をカメラ3(撮像手段)で撮像して得られた画像データに基づく2値画像のデータを前記画像メモリ43から読み出し,その読み出しデータ(2値画像のデータ)に基づいて,前記2値画像における前記検出対象文字列を構成する各文字の画像の存在領域を特定し,特定した各文字の画像の存在領域から文字画像を抽出するとともに,抽出した文字画像について文字認識処理を自動的に実行する装置である。
First, the configuration of a character image image processing apparatus Z (hereinafter referred to as an image processing apparatus Z) according to an embodiment of the present invention will be described with reference to the block diagram shown in FIG.
The image processing device Z is a computer and includes a CPU 41, a camera interface 42, an image memory 43, an image processing unit 44, a display unit 45, a general purpose memory 46, and a communication unit 47, as shown in FIG.
The image processing device Z stores binary image data based on image data obtained by imaging the managed member 1 on which the image c of the detection target character string is formed by the camera 3 (imaging means). 43, and based on the read data (binary image data), the existence region of each character image constituting the detection target character string in the binary image is specified, and the existence of the specified character image A device that extracts a character image from a region and automatically executes a character recognition process on the extracted character image.

前記カメラインターフェース42は,所定の検出対象文字列の画像cが印字された被管理部材1を撮像するカメラ3を制御するものである。具体的には,前記カメラインターフェース42は,ベルトコンベアなどの搬送手段2により搬送されてくる被管理部材1がカメラ3の正面付近に到達した最に,カメラ3のシャッターが切られるように制御するとともに,そのカメラ3による撮像画像のデータをカメラ3から取得し,前記画像メモリ43に記憶させる。
前記被管理部材1は,例えばスラブやビレットなどであり,その表面に前記検出対象文字列の画像cが印字されている。
前記検出対象文字列は,複数列の文字列からなり,文字寸法と一列の文字数及び文字間隔と列数と列間隔とが所定の文字配置条件を満たす文字列である。また,前記検出対象文字列を構成する各文字の画像は,印字不良や汚れ,照明不良などに起因する画質の悪化がない場合,本来は連結画素からなる画像である。
図5は,検出対象文字列における文字配置条件を模式的に表した図である。
前記検出対象文字列は,複数列の文字列からなり,各文字の外接矩形の高さFH及び横幅FW,一列の文字数NC及び文字間隔dFW,列数NL,列間隔dFHが既知である。図5は,一列の文字数NCが3個であり,列数NLが2列であることを表している。これらFH,FW,NC,dFW,NL,dFHの情報を含む文字配置条件の情報が,前記汎用メモリ46に予め記憶されており,前記CPU41は,その文字配置条件の情報を必要に応じて参照する。
The camera interface 42 controls the camera 3 that captures the managed member 1 on which an image c of a predetermined character string to be detected is printed. Specifically, the camera interface 42 controls the shutter of the camera 3 to be released when the managed member 1 conveyed by the conveying means 2 such as a belt conveyor reaches the vicinity of the front of the camera 3. At the same time, data of an image captured by the camera 3 is acquired from the camera 3 and stored in the image memory 43.
The managed member 1 is, for example, a slab or billet, and an image c of the detection target character string is printed on the surface thereof.
The detection target character string is composed of a plurality of character strings, and the character size, the number of characters in one column, the character interval, the number of columns, and the column interval satisfy a predetermined character arrangement condition. In addition, the image of each character constituting the detection target character string is originally an image composed of connected pixels when there is no deterioration in image quality due to poor printing, dirt, poor lighting, or the like.
FIG. 5 is a diagram schematically showing the character arrangement conditions in the detection target character string.
The character string to be detected is composed of a plurality of character strings, and the height FH and width FW of the circumscribed rectangle of each character, the number of characters NC and character spacing dFW, the number of columns NL, and the column spacing dFH are known. FIG. 5 shows that the number of characters NC in one column is 3, and the number of columns NL is 2. Information on character arrangement conditions including information on these FH, FW, NC, dFW, NL, and dFH is stored in advance in the general-purpose memory 46, and the CPU 41 refers to the information on the character arrangement conditions as necessary. To do.

前記CPU41は,前記汎用メモリ46に予め記憶されたプログラムを実行することにより,前記カメラインターフェース42,前記画像処理部44,前記表示部45及び前記通信部47を制御するプロセッサである。
前記画像メモリ43は,カメラ3による撮像画像のデータや,その2値画像のデータなど,各種の画像データを記憶する記憶手段である。
前記画像処理部44は,不図示のROMに予め記憶されたプログラムを実行するプロセッサであり,前記画像メモリ43から画像データを読み出し,読み出した画像データについて各種の画像処理(画像データの加工)を行うとともに,その画像処理後の画像データを前記画像メモリ43に記憶させる。
なお,前記CPU41及び前記画像処理部44が,本発明に係る文字画像の画像処理方法における各手順を実行するプロセッサの一例である。また,前記CPU41及び前記画像処理部44それぞれによって実行されるプログラムが,本発明に係る文字画像の画像処理プログラムの一例である。
前記表示部45は,前記画像メモリ43に記憶された画像データに基づく画像を表示するとともに,前記CPU41から引き渡される情報を画像として表示する映像表示手段である。
前記汎用メモリ46は,前記CPU41によって読み書きされる各種データや,前記CPU41によって実行されるプログラムを記憶する不揮発性メモリであり,例えばハードディスクやフラッシュメモリなどである。
前記通信部47は,前記被管理部材1に関する情報を管理するホストコンピュータと通信を行う通信手段であり,前記検出対象文字列の画像cに基づく文字認識処理によって得られた管理情報(前記検出対象文字列が表す情報)を前記ホストコンピュータに送信するものである。
The CPU 41 is a processor that controls the camera interface 42, the image processing unit 44, the display unit 45, and the communication unit 47 by executing a program stored in advance in the general-purpose memory 46.
The image memory 43 is storage means for storing various image data such as data of an image captured by the camera 3 and data of its binary image.
The image processing unit 44 is a processor that executes a program stored in advance in a ROM (not shown). The image processing unit 44 reads image data from the image memory 43 and performs various image processing (processing of image data) on the read image data. At the same time, the image memory 43 stores the image data after the image processing.
The CPU 41 and the image processing unit 44 are an example of a processor that executes each procedure in the image processing method for character images according to the present invention. The program executed by each of the CPU 41 and the image processing unit 44 is an example of a character image image processing program according to the present invention.
The display unit 45 is a video display unit that displays an image based on the image data stored in the image memory 43 and displays information delivered from the CPU 41 as an image.
The general-purpose memory 46 is a non-volatile memory that stores various data read and written by the CPU 41 and programs executed by the CPU 41, and is, for example, a hard disk or a flash memory.
The communication unit 47 is a communication unit that communicates with a host computer that manages information related to the managed member 1, and management information obtained by character recognition processing based on the image c of the detection target character string (the detection target Information represented by a character string) is transmitted to the host computer.

次に,図2に示すフローチャートを参照しつつ,画像処理装置Z(コンピュータ)により実行される文字画像切出し・文字認識処理の手順について説明する。以下に示すカメラインターフェース42,画像処理部44の処理は,CPU41からの制御指令に従って実行される。なお,以下に示すS1,S2,…は,処理手順(ステップ)の識別符号を表す。また,以下に示すステップS1〜S19の処理は,前記CPU41及び前記画像処理部44によって自動的に実行される。
[ステップS1,S2]
まず,CPU41が,不図示のセンサの検出信号に基づいてカメラ3の正面付近に被管理部材1が到達したことを検知すると,カメラインターフェース42が,カメラ3に撮像を実行させるとともにその撮像画像のデータをカメラ3から取得し,その画像データを画像メモリ43に記憶させる(S1)。
さらに,CPU41の制御指令に従って,画像処理部44が,画像メモリ43に記憶された撮像画像データに2値化処理を施し,その2値化処理により得られる2値画像のデータを画像メモリ43に記憶させる(S1)。
図3は,ステップS1で得られる2値画像(画像処理装置Zによる画像処理の対象)の一例を表す図である。
図3において,一列目の文字列"71C"及び二列目の文字列"07B"からなる2列の文字列の画像が,前記検出対象文字列の2値画像の一例である。
次に,画像処理部44は,画像メモリ43に記憶された前記2値画像のデータに基づいて,その2値画像に含まれる連結画素を抽出してラベリングを行う(S2)。
Next, a procedure of character image cutout / character recognition processing executed by the image processing device Z (computer) will be described with reference to the flowchart shown in FIG. The following processing of the camera interface 42 and the image processing unit 44 is executed according to a control command from the CPU 41. S1, S2,... Shown below represent identification codes of processing procedures (steps). Further, the processing of steps S1 to S19 shown below is automatically executed by the CPU 41 and the image processing unit 44.
[Steps S1, S2]
First, when the CPU 41 detects that the managed member 1 has arrived near the front of the camera 3 based on a detection signal of a sensor (not shown), the camera interface 42 causes the camera 3 to perform imaging and the captured image of the captured image is displayed. Data is acquired from the camera 3, and the image data is stored in the image memory 43 (S1).
Further, the image processing unit 44 performs binarization processing on the captured image data stored in the image memory 43 in accordance with the control command of the CPU 41, and the binary image data obtained by the binarization processing is stored in the image memory 43. Store (S1).
FIG. 3 is a diagram illustrating an example of a binary image (a target of image processing by the image processing device Z) obtained in step S1.
In FIG. 3, an image of two character strings including a first character string “71C” and a second character string “07B” is an example of a binary image of the detection target character string.
Next, the image processing unit 44 extracts and labels the connected pixels included in the binary image based on the binary image data stored in the image memory 43 (S2).

[ステップS3]
次に,画像処理部44が,画像メモリ43から2値画像のデータを読み出し,その2値画像のデータに基づいて,前記2値画像における連結画素それぞれについて予め定められた文字画像の条件(以下,文字画像条件という)を満たすか否かを判別し,前記2値画像における連結画素のうち前記文字画像条件を満たすものを第1文字候補の画像として特定する(S3,前記第1の文字候補特定手順の一例)。なお,特定結果は,連結画素のラベル情報(連結画素の識別情報)に対応づけられて前記画像処理部44が備える不図示のメモリに記憶される。
例えば,カメラ3と検出対象文字列の画像cとの距離がほぼ一定であることが保証される場合には,前記文字画像条件を,連結画素の外接矩形の大きさ(高さ及び横幅)が,前記文字画像条件における文字の外接矩形の高さFH及び横幅FWに対して所定の誤差範囲内であるという条件とすることや,或いは連結画素の面積(画素数)が予め定められた範囲内であるという条件とすること等が考えられる。
また,カメラ3と検出対象文字列の画像cとの距離が比較的大きく変動し得る場合には,前記文字画像条件を,連結画素の外接矩形の縦横比が,前記文字画像条件における文字の外接矩形の高さFHと横幅FWとの比(縦横比)に対して所定の誤差範囲内であるという条件とすることや,或いは連結画素とその外接矩形との面積比,又は連結画素の周囲長の2乗とその面積との比が予め定められた範囲内にあるという条件とすること等が考えられる。
また,以上に例示した各条件のうちの複数を同時に満たす連結画素を前記第1文字候補の画像として特定することも考えられる。なお,前記文字画像条件に関する情報は,予め汎用メモリ46に記憶され,画像処理部44がその情報を参照する。
図4は,図3に示した2値画像において,ステップS3の処理によって前記第1文字候補の画像として特定された連結画素ch11〜ch16についてその外接矩形を破線で表した図である。
[Step S3]
Next, the image processing unit 44 reads the binary image data from the image memory 43, and based on the binary image data, a predetermined character image condition (hereinafter referred to as “character image condition”) for each connected pixel in the binary image. , Character image condition) is satisfied, and among the connected pixels in the binary image, those that satisfy the character image condition are identified as first character candidate images (S3, first character candidate) Example of specific procedure). The identification result is stored in a memory (not shown) included in the image processing unit 44 in association with the label information of the connected pixels (identification information of the connected pixels).
For example, when it is guaranteed that the distance between the camera 3 and the image c of the detection target character string is almost constant, the character image condition is determined based on the size (height and width) of the circumscribed rectangle of the connected pixels. , A condition that the height FH and the width FW of the circumscribed rectangle of the character in the character image condition are within a predetermined error range, or the area (number of pixels) of the connected pixels is within a predetermined range. It is conceivable that the condition is
Further, when the distance between the camera 3 and the image c of the detection target character string can vary relatively greatly, the character image condition is determined based on the aspect ratio of the circumscribed rectangle of the connected pixels. The condition that the ratio is within a predetermined error range with respect to the ratio between the height FH and the width FW (aspect ratio) of the rectangle, or the area ratio between the connected pixel and its circumscribed rectangle, or the perimeter of the connected pixel It is conceivable that the ratio between the square of and the area is within a predetermined range.
It is also conceivable to specify connected pixels that simultaneously satisfy a plurality of the above-described conditions as the first character candidate image. Information on the character image condition is stored in advance in the general-purpose memory 46, and the image processing unit 44 refers to the information.
FIG. 4 is a diagram in which the circumscribed rectangles of the connected pixels ch11 to ch16 identified as the first character candidate images by the process of step S3 in the binary image shown in FIG. 3 are represented by broken lines.

このように,ステップS3(前記第1の文字候補特定手順)において,前記画像処理部44は,前記2値画像に含まれる全ての連結画素の中から,前記文字画像条件を満たすか否かを判別することにより,文字画像を表さない可能性が高いものを除外し,文字画像の候補となり得るものを特定(選択)する。このステップS3において特定される連結画素(前記第1文字候補の画像ch11〜ch16)の中には,実際には文字画像を表さないノイズ画像が含まれ得る。図4において,第1文字候補の画像ch16がそのノイズ画像に該当する。
また,複数の文字画像のうち,その画質が悪いもの(例えば,前記連結状態や前記断裂状態となっているもの)は,このステップS3において第1文字候補の画像として特定されない(候補から漏れる)場合がある。図4において,前記検出対象文字列における一列目の先頭文字"7"は,前記断裂状態となっているため文字画像の候補から漏れることになる。
In this manner, in step S3 (the first character candidate specifying procedure), the image processing unit 44 determines whether or not the character image condition is satisfied from all the connected pixels included in the binary image. By discriminating, those that are not likely to represent character images are excluded, and those that can be candidates for character images are specified (selected). The connected pixels specified in step S3 (the first character candidate images ch11 to ch16) may include noise images that do not actually represent character images. In FIG. 4, the image ch16 of the first character candidate corresponds to the noise image.
Further, among the plurality of character images, those having poor image quality (for example, those in the connected state or the broken state) are not specified as the first character candidate images in this step S3 (leak from the candidates). There is a case. In FIG. 4, the first character “7” in the first column of the detection target character string leaks from the candidate character image because it is in the broken state.

[ステップS4]
次に,画像処理部44は,ステップS3で特定した前記連結画素(前記第1文字候補の画像)のうち,その相対的な位置関係が前記文字配置条件(図5参照)における文字相互の相対的な位置関係を所定の誤差範囲内で満たすものを第2文字候補の画像として特定する(S4,前記第2の文字候補特定手順の一例)。なお,特定結果は,連結画素のラベル情報(連結画素の識別情報)に対応づけられて前記画像処理部44が備える不図示のメモリに記憶される。
より具体的には,画像処理装置4は,前記第1文字候補の画像の中から1つの候補をリーダーch1sとして順次選択し,そのリーダーch1sと他の全ての前記第1文字候補の画像ch1iそれぞれとの相対的な位置関係が,後述する(1)式で表される条件及び同(2)式で表される条件の両方(以下,文字配置許容条件という)を満たすか否かを判別し,その判別結果を画像処理部44が備えるメモリに記憶する。
そして,前記第1文字候補の画像全てについて,そのそれぞれをリーダーch1sとして上記判別処理を終了した後に,前記第1文字候補の画像の中で,いずれの前記第1文字候補の画像をリーダーch1sとした場合でも常に前記文字配置許容条件を満たすものを前記第2文字候補の画像(前記文字候補画像に相当)として特定(選択)する。
或いは,リーダーch1sを選択するごとに,そのリーダーch1sとそのリーダーch1sとの位置関係が前記文字配置許容条件を満たす他の全ての第1文字候補の画像とを1つのグループとして設定し,全ての前記第1文字候補の画像それぞれをリーダーch1sとして上記グループの設定を行った後に,そのグループに属する前記第1文字候補の画像の数(グループの要素数)が最も多いグループを選択し,そのグループに属する前記第1文字候補の画像を前記第2文字候補の画像として特定すること等も考えられる。
図6は,リーダーch1sとそのリーダーと位置比較の対象となる他の前記第1文字候補の画像ch1iとの位置関係を表した図である。
画像処理部44は,ステップS4において,リーダーch1sの外接矩形の列方向の寸法W(文字の幅)と,リーダーch1sの外接矩形の列方向に直交する方向(以下,列直交方向という)の寸法H(文字高さ)と,リーダーch1sにおける基準点P0sとそのリーダーとの比較対象となる他の前記第1文字候補の画像ch1sにおける基準点P0iとの間の列方向の位置の差分dWと,リーダーch1sの基準点P0sと他の前記第1文字候補の画像ch1sの基準点P0iとの間の列直交方向の位置の差分dHとを検出する。
なお,図6に示す例では,前記基準点P0s,P0iは,前記第1文字候補の画像(連結画素)の外接矩形における一の頂点であるが,全ての第1文字候補の画像について同じ位置条件の点であれば,他の点(例えば,外接矩形の中央の点など)が基準点であってもかまわない。
[Step S4]
Next, the image processing unit 44 determines that the relative positional relationship among the connected pixels (images of the first character candidates) identified in step S3 is relative to the character in the character arrangement condition (see FIG. 5). That satisfy a specific positional relationship within a predetermined error range is specified as a second character candidate image (S4, an example of the second character candidate specifying procedure). The identification result is stored in a memory (not shown) included in the image processing unit 44 in association with the label information of the connected pixels (identification information of the connected pixels).
More specifically, the image processing apparatus 4 sequentially selects one candidate from the first character candidate images as a leader ch1s, and each of the leader ch1s and all the other first character candidate images ch1i. And whether the relative positional relationship satisfies both of the condition expressed by the following formula (1) and the condition expressed by the formula (2) (hereinafter referred to as a character placement allowable condition). The determination result is stored in a memory included in the image processing unit 44.
Then, after all the first character candidate images are set as the leader ch1s and the discrimination process is completed, any of the first character candidate images among the first character candidate images is designated as the leader ch1s. Even in such a case, an image satisfying the character arrangement permission condition is always specified (selected) as the second character candidate image (corresponding to the character candidate image).
Alternatively, every time a leader ch1s is selected, all other first character candidate images in which the positional relationship between the leader ch1s and the leader ch1s satisfies the character placement permission conditions are set as one group, After setting the group with each of the first character candidate images as the leader ch1s, the group having the largest number of first character candidate images (number of elements in the group) belonging to the group is selected, and the group It is also conceivable to specify the image of the first character candidate belonging to as the image of the second character candidate.
FIG. 6 is a diagram showing the positional relationship between the leader ch1s and the image ch1i of the other first character candidate whose position is to be compared with the leader ch1s.
In step S4, the image processing unit 44 measures the dimension W (character width) of the circumscribed rectangle of the leader ch1s in the column direction and the dimension orthogonal to the column direction of the circumscribed rectangle of the leader ch1s (hereinafter referred to as the column orthogonal direction). A difference dW in the column direction position between H (character height) and the reference point P0s in the leader ch1s and the reference point P0i in the image ch1s of the other first character candidate to be compared with the leader; The position difference dH in the column orthogonal direction between the reference point P0s of the leader ch1s and the reference point P0i of the other image ch1s of the first character candidate is detected.
In the example shown in FIG. 6, the reference points P0s and P0i are one vertex in the circumscribed rectangle of the first character candidate image (connected pixel), but the same positions for all the first character candidate images. As long as it is a condition point, another point (for example, the center point of the circumscribed rectangle) may be the reference point.

さらに,画像処理部44は,ステップS4において,前記文字配置許容条件を表す次の(1)式及び(2)式の両方を満たすか否かを判別することにより,前記第2文字候補の画像を特定する。

Figure 0004836826
(1)式及び(2)式において,変数mは前記文字配置条件における列方向の文字数NCに対し−(NC−1)〜+(NC−1)の範囲の整数であり,変数nは前記文字配置条件における列数NLに対し−(NL−1)〜+(NL−1)の範囲の整数である。また,同式において,FW,dFW,FH,dFHは,図5に示した前記文字配置条件を表す既知の情報(寸法)である。また,同式において,定数dnは前記文字配置条件における一列の文字数NCに対応するマージン値(許容誤差)であり,定数dmは前記文字配置条件における列数NLに対応するマージン値(許容誤差)である。これらマージン値dn,dmの情報は,予め前記汎用メモリに記憶され,前記画像処理部44がその情報を参照する。なお,本実施形態における前記検出対象文字列の画像は,一列分の文字列における文字相互間の位置ずれ,及び一列分の文字列相互間の前記列直交方向における位置ずれはほとんど生じない一方,一列文の文字列相互間の列方向における位置ずれは大きくなり得る。このため,定数dnに比べて定数dmの方が大きな値が設定される。
この(1)式及び(2)式は,ステップS3で特定した前記第1文字候補の画像(連結画素)の中から,その相対的な位置関係が前記文字配置条件における文字相互の相対的な位置関係(前記検出対象文字列における文字相互の相対的な位置関係)を所定の誤差範囲内で満たすか否かを判別するための条件式の一例である。 Further, in step S4, the image processing unit 44 determines whether or not both of the following expressions (1) and (2) representing the character placement permission condition are satisfied, thereby determining the image of the second character candidate. Is identified.
Figure 0004836826
In the equations (1) and (2), the variable m is an integer in the range of-(NC-1) to + (NC-1) with respect to the number of characters NC in the column direction in the character arrangement condition, and the variable n is It is an integer in the range of-(NL-1) to + (NL-1) with respect to the number of columns NL in the character arrangement condition. In the above equation, FW, dFW, FH, and dFH are known information (dimensions) representing the character arrangement conditions shown in FIG. In the above equation, the constant dn is a margin value (allowable error) corresponding to the number of characters NC in one column in the character arrangement condition, and the constant dm is a margin value (allowable error) corresponding to the number of columns NL in the character arrangement condition. It is. Information on these margin values dn and dm is stored in advance in the general-purpose memory, and the image processing unit 44 refers to the information. In the image of the detection target character string in the present embodiment, the positional deviation between characters in the character string for one column and the positional deviation in the column orthogonal direction between the character strings for one column hardly occur. The positional deviation in the column direction between character strings in a single column sentence can be large. For this reason, the constant dm is set to a larger value than the constant dn.
The expressions (1) and (2) are obtained by comparing the relative positional relationship between the characters in the character arrangement condition among the images (concatenated pixels) of the first character candidate specified in step S3. It is an example of a conditional expression for determining whether or not a positional relationship (relative positional relationship between characters in the detection target character string) is satisfied within a predetermined error range.

以上に示したように,ステップS4において,画像処理部44は,ステップS3で特定した前記第1文字候補の画像(連結画素)の中から,その相対的な位置関係が(1)式及び(2)式を満たすか否かを判別することにより,さらに,文字画像を表さない可能性が高いものを除外し,文字画像の候補となり得るもの(前記第2文字候補の画像)を特定(選択)する。これにより,連結画素のうち,前記検出対象文字列の画像の位置から明らかに離れた位置にあるノイズ画像を文字画像の候補から除外できる。ステップS4の処理により,例えば,図4において,(1)式及び(2)式を相互に満たす第1文字候補の画像ch11〜ch15は,前記第2文字候補の画像として特定されるが,ノイズ画像である第1文字候補の画像ch16は,前記第2文字候補の画像として特定されない。
このように,ステップS3及びステップS4において,連結画素単体の条件(前記文字画像条件)と,複数の連結画素相互間の配置条件との両方を判別し,文字画像の候補を特定する条件を厳しくすることにより,前記第2文字候補の画像それぞれは,ほぼ確実に前記検出対象文字列を構成する文字の画像であるといえる状態となる。但し,文字画像の候補を特定する条件を厳しくすればするほど,実際は文字画像を表す連結画素が,その画質や位置の乱れによって文字画像の候補から漏れることはあり得る。
As described above, in step S4, the image processing unit 44 determines that the relative positional relationship among the images (concatenated pixels) of the first character candidate specified in step S3 is the expression (1) and ( 2) By determining whether or not the expression is satisfied, those that are not likely to represent character images are excluded, and those that can be character image candidates (images of the second character candidates) are specified ( select. As a result, a noise image at a position clearly distant from the position of the image of the detection target character string among the connected pixels can be excluded from the character image candidates. By the process of step S4, for example, in FIG. 4, the first character candidate images ch11 to ch15 satisfying the expressions (1) and (2) are specified as the second character candidate images. The image ch16 of the first character candidate that is an image is not specified as the image of the second character candidate.
As described above, in step S3 and step S4, both the condition of the connected pixel alone (the character image condition) and the arrangement condition between the plurality of connected pixels are discriminated, and the condition for specifying the character image candidate is strict. As a result, each of the images of the second character candidates is in a state that can be said to be an image of a character constituting the detection target character string almost certainly. However, the stricter the conditions for specifying a character image candidate, the more likely that connected pixels representing the character image will leak out of the character image candidate due to its image quality and position disturbance.

[ステップS5]
次に,画像処理部44は,ステップS4で特定した連結画素である前記第2文字候補の画像(前記文字候補画像に相当)それぞれの位置(前記基準点の位置)及び寸法(W,H)と前記文字配置条件と予め定められた文字配置の変動範囲とに基づいて,前記2値画像において前記第2文字候補の画像全てを含む領域であって前記検出対象文字列の画像全体を含む領域を推定する(S5,前記文字列包含領域推定手順の一例)。このステップS5で推定される領域を,以下,文字列包含推定領域という。また,ステップS5の処理による推定結果(前記文字列包含推定領域を表す座標情報)は,画像処理部44が備える不図示のメモリに記憶される。
図7は,ステップS5で特定される前記文字列包含推定領域A1の画像の一例を表す図である。例えば,画像処理部44は,以下の手順で前記文字包含推定領域A1を推定する。
まず,画像処理部44は,前記第2文字候補の画像の全体の外接矩形の領域A0の中心点Q0の位置を算出する。
さらに,画像処理部44は,前記第2文字候補の画像の前記基準点P0iそれぞれの列方向の間隔dWの平均値と,前記文字配置条件における一列の文字数NCと,列方向の前記変動範囲を表す所定の係数(1より大きい値の係数)とを乗算して得られる値を前記文字列包含推定領域A1の列方向の長さLa1として算出する。
さらに,画像処理部44は,前記第2文字候補の画像の前記基準点P0iそれぞれの前記列直交方向の間隔dHの平均値と,前記文字配置条件における列数NLと,前記列直交方向の前記変動範囲を表す所定の係数(1より大きい値の係数)とを乗算して得られる値を前記文字列包含推定領域A1の列直交の幅Wa1として算出する。
そして,画像処理部44は,前記中心点Q0を中心として,列方向における長さLa1の範囲及び列直交方向における幅Wa1の範囲を,前記文字列包含推定領域A1とする。
[Step S5]
Next, the image processing unit 44 determines the position (position of the reference point) and the size (W, H) of each of the second character candidate images (corresponding to the character candidate images) that are the connected pixels identified in step S4. And an area including all the images of the second character candidate in the binary image, based on the character arrangement condition and a predetermined variation range of the character arrangement, and including the entire image of the detection target character string (S5, an example of the character string inclusion region estimation procedure). The area estimated in step S5 is hereinafter referred to as a character string inclusion estimation area. Further, the estimation result (coordinate information representing the character string inclusion estimation area) by the process of step S5 is stored in a memory (not shown) provided in the image processing unit 44.
FIG. 7 is a diagram illustrating an example of an image of the character string inclusion estimation area A1 specified in step S5. For example, the image processing unit 44 estimates the character inclusion estimation area A1 according to the following procedure.
First, the image processing unit 44 calculates the position of the center point Q0 of the circumscribed rectangular area A0 of the entire image of the second character candidate.
Further, the image processing unit 44 calculates the average value of the interval dW in the column direction of each of the reference points P0i of the image of the second character candidate, the number of characters NC in one column in the character arrangement condition, and the variation range in the column direction. A value obtained by multiplying a predetermined coefficient (a coefficient greater than 1) is calculated as the length La1 in the column direction of the character string inclusion estimation area A1.
Further, the image processing unit 44 calculates an average value of the interval dH in the column orthogonal direction of each reference point P0i of the second character candidate image, the number of columns NL in the character arrangement condition, and the column orthogonal direction in the column orthogonal direction. A value obtained by multiplying by a predetermined coefficient (coefficient greater than 1) representing the fluctuation range is calculated as a column orthogonal width Wa1 of the character string inclusion estimation area A1.
Then, the image processing unit 44 sets the range of the length La1 in the column direction and the range of the width Wa1 in the column orthogonal direction centered on the center point Q0 as the character string inclusion estimation region A1.

前述したように,ステップS4で特定された前記第2文字候補の画像は,その全てがほぼ確実に前記検出対象文字列を構成する文字画像であるといえる状態となる。
従って,前記第2文字候補の画像の位置及び寸法と前記文字配置条件と予め定められた文字配置の変動範囲とに基づく領域推定を行えば,前記検出対象文字列を構成する全ての文字の画像をほぼ確実に含む前記文字列包含推定領域A1を推定(特定)できる。その文字列包含推定領域A1を特定する処理がステップS5の処理である。
図7に示すように,前記文字列包含推定領域A1の画像は,ステップS3及びS4において文字候補の画像として特定されなかった文字"7"の画像も包含する。但し,前記文字列包含推定領域A1は,前記検出対象文字列の画像の実際の存在領域に対し,前記予め定められた文字配置の変動範囲の分だけ余分な領域を含んでいる。
以下,画像処理部44は,前記文字列包含推定領域A1の画像について,文字画像の存在領域の特定処理を実行する。
As described above, all of the images of the second character candidates identified in step S4 are in a state where it can be said that all of them are character images that constitute the detection target character string almost certainly.
Therefore, if region estimation is performed based on the position and size of the image of the second character candidate, the character placement condition, and the predetermined variation range of the character placement, the images of all the characters constituting the detection target character string. Can be estimated (specified). The process of specifying the character string inclusion estimation area A1 is the process of step S5.
As shown in FIG. 7, the image of the character string inclusion estimation area A1 also includes an image of the character “7” that has not been specified as the character candidate image in steps S3 and S4. However, the character string inclusion estimation area A1 includes an extra area corresponding to the predetermined variation range of the character arrangement with respect to the actual existence area of the image of the detection target character string.
Thereafter, the image processing unit 44 executes a character image existing area specifying process for the image of the character string inclusion estimation area A1.

[ステップS6,S7]
次に,画像処理部44は,前記2値画像における前記文字列包含推定領域A1の画像について,以下に示すステップS6及びS7の処理(予め定められた処理の一例)を行うことにより,前記検出対象文字列を構成する一列分の文字列の画像それぞれの列方向に直交する列直交方向における存在範囲を推定する(S6,S7:前記列幅範囲推定手順の一例)。
即ち,画像処理部44は,まず,前記2値画像における前記文字列包含推定領域A1の画像について,列方向の投影データの分布を算出する(S6,前記列方向投影データ算出手順の一例)。
次に,画像処理部44は,ステップS6での算出データ(列方向の投影データの分布)に基づいて,前記検出対象文字列を構成する一列分の文字列の画像それぞれの前記列直交方向における存在範囲(以下,列範囲という)を推定する(S7,前記範囲推定手順の一例)。なお,ステップS6の処理による算出結果(列方向の位置と対応づけられた投影データ)と,ステップS7の処理による推定結果(前記列範囲を表す座標情報)は,画像処理部44が備える不図示のメモリに記憶される。
図8は,前記文字列包含推定領域A1の画像及びその画像における列方向の投影データIxの分布の一例を表す図である。
図8からわかるように,文字列の画像が存在する列直交方向の範囲(文字高さの範囲)において,列方向の投影データIxの値が高くなり,文字列の列間(隙間)の範囲において,列方向の投影データIxの値が低くなる。
画像処理部44は,列方向の投影データIxの分布において谷を形成する部分の位置(列直交方向の位置)を特定し,その位置を一列分の文字列の画像それぞれの区切り位置ymとすることにより前記列範囲それぞれを特定(推定)する。
図8に示す例は,列方向の投影データIxの分布において,投影データが所定のしきい値Ixsを下回る範囲(y1〜y2の間の範囲)の中央の位置を,複数の前記列範囲A11,A12それぞれの区切り位置ymとする例である。なお,前記しきい値Ixsは,例えば,列方向の投影データIxの平均値に所定の係数(0より大きく1より小さい係数)を乗算して得られる値,或いは予め定められた定数などである。
また,特許文献1において文字列を切り出すステップとして示される処理を,このステップS7において実行してもよい。
その他,一列分の文字列の画像の前記列直交方向における位置ずれをほとんど考慮しなくてよい場合には,前記文字列包含推定領域A1を既知の文字列の列数NLで等分割することにより,前記列範囲A11,A12(一列分の文字列の画像それぞれの前記列直交方向における存在範囲)を推定することも考えられる。
[Steps S6 and S7]
Next, the image processing unit 44 performs the processing of steps S6 and S7 described below (an example of a predetermined processing) on the image of the character string inclusion estimation area A1 in the binary image, thereby performing the detection. The existence range in the column orthogonal direction orthogonal to the column direction of each of the character string images constituting the target character string is estimated (S6, S7: an example of the column width range estimation procedure).
That is, the image processing unit 44 first calculates the distribution of projection data in the column direction for the image of the character string inclusion estimation area A1 in the binary image (S6, an example of the column direction projection data calculation procedure).
Next, the image processing unit 44, based on the calculation data in step S6 (distribution of projection data in the column direction), the image of the character string for one column that constitutes the detection target character string in each column orthogonal direction. An existence range (hereinafter referred to as a column range) is estimated (S7, an example of the range estimation procedure). Note that the calculation result (projection data associated with the position in the column direction) by the process in step S6 and the estimation result (coordinate information representing the column range) by the process in step S7 are not shown in the image processing unit 44. Stored in the memory.
FIG. 8 is a diagram illustrating an example of the image of the character string inclusion estimation area A1 and the distribution of the projection data Ix in the column direction in the image.
As can be seen from FIG. 8, in the range in the column orthogonal direction (character height range) where the image of the character string exists, the value of the projection data Ix in the column direction becomes high, and the range between the character string columns (gap) , The value of the projection data Ix in the column direction becomes low.
The image processing unit 44 identifies the position (position in the column orthogonal direction) that forms the valley in the distribution of projection data Ix in the column direction, and sets that position as the delimiter position ym for each character string image for one column. Thus, each column range is specified (estimated).
In the example shown in FIG. 8, in the distribution of the projection data Ix in the column direction, the center position of the range where the projection data falls below a predetermined threshold value Ixs (the range between y1 and y2) is defined as a plurality of the column ranges A11. , A12. The threshold value Ixs is, for example, a value obtained by multiplying the average value of the projection data Ix in the column direction by a predetermined coefficient (coefficient greater than 0 and smaller than 1), or a predetermined constant. .
Moreover, you may perform the process shown as a step which cuts out a character string in patent document 1 in this step S7.
In addition, when there is little need to consider the positional deviation in the column orthogonal direction of the image of the character string for one column, the character string inclusion estimation area A1 is equally divided by the number NL of known character strings. It is also conceivable to estimate the column ranges A11, A12 (existing ranges in the column orthogonal direction of the image of one column of character strings).

[ステップS8]
次に,画像処理部44は,前記文字列包含領域A1の画像における前記列範囲A11,A12の画像(以下,列領域画像g11,g12という)それぞれについて,列直交方向の投影データの分布を算出する(S8)。このステップS8の処理による算出結果(列直交方向の位置と対応づけられた投影データ)は,画像処理部44が備える不図示のメモリに記憶される。
図9は,前記文字列包含推定領域A1における列領域画像g11,g12及びその画像における列直交方向の投影データIy1,Iy2(以下,第1投影データという)の分布の一例を表す図である。
図9からわかるように,列領域画像g11,g12それぞれについて,文字画像が存在する列方向の範囲(文字幅の範囲)において,前記第1投影データIy1,Iy2の値が高く(山に)なり,文字間(隙間)の範囲において,前記第1投影データIy1,Iy2の値が低く(谷に)なる。また,列方向における文字画像の幅及び間隔がほぼ一定であるので,文字列の画像が存在する範囲においては,前記第1投影データIy1,Iy2の山の幅及びピッチがほぼ一定である。
一方,ノイズ画像が存在する場合には,そのノイズ画像が存在する範囲についても,前記第1投影データIy1,Iy2の値が高く(山に)なる。但し,通常は,文字画像とノイズ画像とでは,その画像に対応する前記第1投影データIy1,Iy2の山のピッチが異なる。
[Step S8]
Next, the image processing unit 44 calculates the distribution of projection data in the column orthogonal direction for each of the images in the column ranges A11 and A12 (hereinafter referred to as column region images g11 and g12) in the image of the character string inclusion region A1. (S8). The calculation result (projection data associated with the position in the column orthogonal direction) by the processing in step S8 is stored in a memory (not shown) provided in the image processing unit 44.
FIG. 9 is a diagram illustrating an example of the distribution of the column area images g11 and g12 in the character string inclusion estimation area A1 and the projection data Iy1 and Iy2 (hereinafter referred to as first projection data) in the column orthogonal direction in the image.
As can be seen from FIG. 9, the values of the first projection data Iy1 and Iy2 are high (in peaks) in the column direction range (character width range) where the character image exists for each of the column area images g11 and g12. , The values of the first projection data Iy1 and Iy2 are low (at valleys) in the range between the characters (gap). Further, since the width and interval of the character image in the column direction are substantially constant, the width and pitch of the peaks of the first projection data Iy1 and Iy2 are substantially constant in the range where the character string image exists.
On the other hand, when a noise image exists, the values of the first projection data Iy1 and Iy2 become high (in a mountain) also in the range where the noise image exists. However, normally, the pitch of the peaks of the first projection data Iy1 and Iy2 corresponding to the image differs between the character image and the noise image.

[ステップS9]
次に,画像処理部44は,ステップS8で算出した前記第1投影データIy1,Iy2(列直交方向の投影データ)それぞれについて,上限値を制限する補正処理を施し,補正後のデータ(以下,補正第1投影データIy1’,Iy2’という)を算出する(S9)。このステップS9の処理による算出結果(列直交方向の位置と対応づけられた補正後の投影データ)は,画像処理部44が備える不図示のメモリに記憶される。なお,ステップS8及びS9が,前記第1の列直交方向投影データ算出手順の一例である。
例えば,画像処理部44は,次の(3)式に基づいて,前記第1投影データIy1,Iy2から前記補正第1投影データIy1’,Iy2’を算出する。

Figure 0004836826
なお,(3)式において,添え字iは,前記列領域画像g11,g12の識別番号を表し,Iyi(x)は,列方向の位置xにおける前記第1投影データの値,Iy1’(x)及びIy2’(x)は,列方向の位置xにおける前記補正第1投影データの値,Iyimaxは,i番目の前記列領域画像における前記第1投影データのピークレベルの指標値,αは予め定められた係数(0より大きく1未満の定数)である。ここで,ピークレベルの指標値Iyimaxは,例えば,i番目の前記列領域画像における前記第1投影データの最大値や,或いは同データにおける最も値の大きいものから所定個数分のデータの平均値などである。
図9には,(3)式に基づく補正処理後の前記補正第1投影データIy1’,Iy2’の分布のグラフ(黒塗りグラフ)も示されている。
この補正により,文字画像に対応する前記補正第1投影データIy1’,Iy2’が,文字画像それぞれの形状の違いに起因する値の変化が少ないデータとなり,文字画像が存在する範囲であるか否かを2値的に表すデータとなる。
本実施形態では,移行の処理において,列直交方向の投影データについて,その上限を制限する補正処理を施したデータを用いて文字画像領域の特定処理を行う。しかしながら,その補正を行わずに列直交方向の投影データそのものを用いて以降に示す文字画像領域の特定処理を実行することも考えられる。但し,上限を制限する補正処理を施したデータを用いた方が,文字画像領域をより正確に特定する上で好適である。 [Step S9]
Next, the image processing unit 44 performs a correction process for limiting the upper limit value for each of the first projection data Iy1 and Iy2 (projection data in the column orthogonal direction) calculated in step S8, and the corrected data (hereinafter, referred to as “correction data”). The corrected first projection data Iy1 ′ and Iy2 ′ are calculated (S9). The calculation result (corrected projection data associated with the position in the column orthogonal direction) by the processing in step S9 is stored in a memory (not shown) provided in the image processing unit 44. Steps S8 and S9 are an example of the first column orthogonal direction projection data calculation procedure.
For example, the image processing unit 44 calculates the corrected first projection data Iy1 ′, Iy2 ′ from the first projection data Iy1, Iy2 based on the following equation (3).
Figure 0004836826
In equation (3), the subscript i represents the identification number of the row region images g11 and g12, Iyi (x) is the value of the first projection data at the position x in the row direction, Iy1 ′ (x ) And Iy2 ′ (x) are values of the corrected first projection data at the position x in the column direction, Iyimax is an index value of the peak level of the first projection data in the i-th column region image, and α is previously A predetermined coefficient (a constant greater than 0 and less than 1). Here, the peak level index value Iyimax is, for example, the maximum value of the first projection data in the i-th row area image, or the average value of a predetermined number of pieces of data from the largest value of the data. It is.
FIG. 9 also shows a distribution graph (black graph) of the corrected first projection data Iy1 ′ and Iy2 ′ after the correction processing based on the expression (3).
By this correction, the corrected first projection data Iy1 ′ and Iy2 ′ corresponding to the character image become data with little change in value due to the difference in the shape of each character image, and whether or not the character image exists in the range. This is binary data.
In the present embodiment, in the transition process, the character image region specifying process is performed using the data subjected to the correction process for limiting the upper limit of the projection data in the column orthogonal direction. However, it is also conceivable to execute the character image region specifying process described below using the projection data itself in the column orthogonal direction without performing the correction. However, it is preferable to use data that has been subjected to correction processing for limiting the upper limit in order to more accurately identify the character image area.

[ステップS10,S11]
次に,CPU41が,ステップS9で算出した前記補正第1投影データIy1’,Iy2’(ステップS8の処理で算出された前記第1投影データについて上限値を制限する補正処理を施したデータ)に基づいて,列方向のシフト量kを変数とする相互相関関数を導出する(S10,前記相互相関関数導出手順の一例)。なお,列方向のシフト量kは,列方向の位置のずらし量或いは列方向の位置のオフセット量と同義である。
このステップS10において,CPU41は,複数の前記列領域画像g11,g12の中から基準とする1つの列領域画像を選択し,その基準とする列画像領域についての前記補正第1投影データと,その他の全ての列画像領域それぞれについての前記補正第1投影データとの間の相互相関関数R(k)を導出する。
図10は,前記列領域画像の前記補正第1投影データ(列直交方向の投影データを補正したデータ)の相互相関関数R(k)の一例を表すグラフである。
図10からわかるように,前記補正第1投影データの相互相関関数R(k)は,あるシフト量kpで最大の相関値Rmaxを頂点とするピーク(山)と,そのピークを中心とするほぼ左右対称の位置(シフト量kを座標とする位置)において生じる相対的に高さが低いピークとが形成される値分布を有する。
文字画像の寸法及び一列分の文字列における文字画像の間隔が概ね一定であれば,前記相互相関関数R(k)において,そのシフト量kが一列分の文字列の画像(前記列領域画像)相互の列方向のずれ量と一致するときに最も相関値Rが高くなる。また,その現象は,一部の文字画像の画質の乱れの影響を受けにくい。
そこで,CPU41は,次のステップS11において,前記相互相関関数R(k)それぞれについて最大相関値Rmaxに対応するシフト量kpを検出(導出)し,そのシフト量kpを,基準とする列領域画像とその他の列領域画像それぞれとの間の(相互の)列方向の位置ずれ量Δxi(以下,列相互ずれ量という)として設定する(S9,前記列相互ずれ量導出手順の一例)。設定結果Δxi(=kp)は前記汎用メモリ46に記憶される。
なお,基準とする列領域画像についての前記列相互ずれ量はゼロである。
[Steps S10 and S11]
Next, the CPU 41 applies the corrected first projection data Iy1 ′ and Iy2 ′ calculated in step S9 (data subjected to correction processing for limiting the upper limit value for the first projection data calculated in step S8). Based on this, a cross-correlation function with the column-direction shift amount k as a variable is derived (S10, an example of the cross-correlation function deriving procedure). The column-direction shift amount k is synonymous with the column-direction position shift amount or the column-direction position offset amount.
In this step S10, the CPU 41 selects one reference row area image from among the plurality of row area images g11, g12, the corrected first projection data for the reference row image area, and the like. The cross-correlation function R (k) between the corrected first projection data for each of all the column image regions is derived.
FIG. 10 is a graph showing an example of the cross-correlation function R (k) of the corrected first projection data (data obtained by correcting the projection data in the column orthogonal direction) of the row area image.
As can be seen from FIG. 10, the cross-correlation function R (k) of the corrected first projection data has a peak (mountain) whose peak is the maximum correlation value Rmax with a certain shift amount kp, and almost the center of the peak. It has a value distribution in which a relatively low peak that occurs at a symmetrical position (a position with the shift amount k as a coordinate) is formed.
If the size of the character image and the interval between the character images in the character string for one column are substantially constant, the shift amount k is an image of the character string for one column (the column region image) in the cross-correlation function R (k). The correlation value R becomes the highest when it matches the mutual shift amount in the column direction. In addition, this phenomenon is not easily affected by disturbances in the image quality of some character images.
Therefore, in the next step S11, the CPU 41 detects (derived) a shift amount kp corresponding to the maximum correlation value Rmax for each of the cross-correlation functions R (k), and uses the shift amount kp as a reference row region image. Is set as a (mutual) column-direction positional shift amount Δxi (hereinafter referred to as a column mutual shift amount) between each of the other column region images (S9, an example of the column mutual shift amount derivation procedure). The setting result Δxi (= kp) is stored in the general-purpose memory 46.
Note that the column mutual shift amount for the reference column region image is zero.

[ステップS12]
次に,CPU41は,ステップS10の処理により得られた前記相互相関関数R(k)における相関値のピーク相互の間隔wk(図10参照)と,前記文字配置条件における一列の文字数NCとに基づいて,前記列領域画像g11,g12それぞれにおける前記検出対象文字列の画像が存在する範囲の列方向の長さL(以下,列長さという)を算出する(S12,前記列長さ算出手順の一例)。
例えば,CPU41は,複数の前記相互相関関数R(k)それぞれについて,最大の相関値Rmaxを頂点とするピークとそれに隣接するピークとの間隔wk(以下,ピーク間隔という)を検出し,それらピーク間隔wkの平均値を算出する。
さらに,CPU41は,前記ピーク間隔wkの平均値と一列の文字数NCとを乗算して得られる値,或いはその値に所定の余裕率β(1より大きい定数)を乗算して得られる値を,前記列長さLとして算出する。或いは,前記ピーク間隔wkの最大値と一列の文字数NCとを乗算して得られる値を前記列長さLとして算出することも考えられる。
文字画像の寸法及び一列分の文字列における文字画像の間隔が概ね一定であれば,前記相互相関関数R(k)における前記ピーク間隔wkは,文字画像のピッチに相当する。従って,前記ピーク間隔wkに文字数NCを乗算することにより,前記列長さL(一列分の文字列の画像の列方向の長さ)を算出できる。
[Step S12]
Next, the CPU 41 is based on the inter-peak correlation interval wk (see FIG. 10) of the correlation value in the cross-correlation function R (k) obtained by the process of step S10, and the number of characters NC in one row in the character arrangement condition. Then, the length L in the column direction (hereinafter referred to as column length) of the range where the image of the detection target character string exists in each of the column area images g11 and g12 is calculated (S12, of the column length calculation procedure). One case).
For example, the CPU 41 detects, for each of the plurality of cross-correlation functions R (k), an interval wk (hereinafter referred to as peak interval) between a peak having the maximum correlation value Rmax as a vertex and a peak adjacent thereto. An average value of the interval wk is calculated.
Further, the CPU 41 calculates a value obtained by multiplying the average value of the peak interval wk and the number of characters NC in one row, or a value obtained by multiplying the value by a predetermined margin rate β (a constant greater than 1), The column length L is calculated. Alternatively, a value obtained by multiplying the maximum value of the peak interval wk and the number of characters NC in one column may be calculated as the column length L.
If the size of the character image and the character image interval in one character string are substantially constant, the peak interval wk in the cross-correlation function R (k) corresponds to the pitch of the character image. Therefore, by multiplying the peak interval wk by the number of characters NC, the column length L (length in the column direction of the image of the character string for one column) can be calculated.

[ステップS13,S14]
次に,画像処理部44が,ステップS9で算出した前記補正第1投影データIy1’,Iy2’それぞれを列方向に前記相互ずれ量Δxiだけシフト(位置修正)する(S13)。以下,前記補正第1投影データIy1’,Iy2’をΔxiだけシフトしたデータをシフト後補正第1投影データIy1”,Iy2”という。
さらに,画像処理部44は,シフト後補正第1投影データIy1”,Iy2”を列直交方向に積算(列方向の位置ごとに積算)し,積算後のデータを画像処理部44が備えるメモリ(不図示)に記憶させる(S14)。
このステップS14で算出される積算後のデータは,複数の前記列領域画像g11,g12それぞれを前記列相互ずれ量Δxiだけ位置修正(シフト)した画像全体における列直交方向の投影データについて上限値を制限する補正処理を施したデータの分布に相当する。このステップS14で算出される積算後のデータを,以下,補正第2投影データIyt’という。なお,ステップS14が,前記第2の列直交方向投影データ算出手順の一例である。
図11は,列領域画像g11,g12の列方向の位置ずれを修正(Δxiだけシフト)した画像g21,g22及びその画像全体の列直交方向の投影データの上限を補正したデータ(前記補正第2投影データIyt’)の分布の一例を表す図である。
図11に示すように,列方向の位置ずれ修正後の画像g21,g22からなる位置ずれ修正後の全体画像g2は,各列における文字画像の配列位置が列直交方向においてほぼ同じ位置に揃った画像となる。また,前記補正第2投影データIyt’において値の山が形成される位置と位置ずれ修正後の全体画像g2における文字画像の位置とが一致する。
このように,前記検出対象文字列において,文字寸法及び一列分の文字列における文字間隔が概ね一定であれば,列方向の位置ずれが修正された後の前記列領域画像g21,g22は,そのいずれにおいても文字画像と文字画像との間の隙間の位置(文字区切りの位置)が概ね一致する。従って,列方向の位置ずれが修正された複数の前記列領域画像全体g2における列直交方向の投影データに基づいて,列方向の位置ずれが修正された複数の列領域画像g21,g22について共通の文字画像の区切り位置を特定できる。
[Steps S13 and S14]
Next, the image processing unit 44 shifts (corrects the position) the corrected first projection data Iy1 ′ and Iy2 ′ calculated in step S9 by the mutual shift amount Δxi in the column direction (S13). Hereinafter, data obtained by shifting the corrected first projection data Iy1 ′ and Iy2 ′ by Δxi is referred to as post-shift corrected first projection data Iy1 ″ and Iy2 ″.
Further, the image processing unit 44 integrates the post-shift corrected first projection data Iy1 ″, Iy2 ″ in the column orthogonal direction (integration for each position in the column direction), and the image processing unit 44 includes the data after the integration ( (S14).
The post-integration data calculated in step S14 has an upper limit value for projection data in the column orthogonal direction in the entire image obtained by correcting (shifting) the position of each of the plurality of column region images g11 and g12 by the column shift amount Δxi. This corresponds to the distribution of data subjected to the limiting correction process. The data after integration calculated in step S14 is hereinafter referred to as corrected second projection data Iyt ′. Note that step S14 is an example of the second column orthogonal direction projection data calculation procedure.
FIG. 11 shows data g21 and g22 in which the positional deviation in the column direction of the column region images g11 and g12 is corrected (shifted by Δxi) and data obtained by correcting the upper limit of projection data in the column orthogonal direction of the entire image (the correction second It is a figure showing an example of distribution of projection data Iyt ').
As shown in FIG. 11, in the entire image g2 after misalignment correction composed of the images g21 and g22 after misalignment correction in the column direction, the arrangement positions of the character images in each column are substantially the same in the column orthogonal direction. It becomes an image. Further, the position where the peak of the value is formed in the corrected second projection data Iyt ′ coincides with the position of the character image in the entire image g2 after the positional deviation correction.
In this way, in the detection target character string, if the character size and the character spacing in the character string for one column are substantially constant, the column region images g21 and g22 after the correction of the positional deviation in the column direction are In any case, the position of the gap between the character image and the character image (character delimiter position) is almost the same. Accordingly, the plurality of column region images g21 and g22 whose column direction misalignment is corrected are based on the projection data in the column orthogonal direction in the plurality of column region images g2 whose column direction misalignment is corrected. It is possible to specify the position where character images are separated.

[ステップS15]
次に,画像処理部44は,ステップS14の処理による算出データ(前記補正第2投影データ)について,列方向の基準位置を変化させながらその基準位置を基準にして前記列長さLを移動平均区間とする移動平均値を算出する(S15)。即ち,画像処理部44は,前記補正第2投影データについて,列方向における複数の基準位置それぞれを基準として前記列長さLの範囲内の値平均値を算出する。
例えば,画像処理部44は,前記列領域画像g11,g12の左端位置(列方向の一方の端部位置)を基準位置の始点とし,基準位置を順次右方向へシフトする(例えば1画素分ずつシフトする)ごとに,その基準位置から右方向(列方向)へ前記列長さLの区間における前記補正第2投影データの平均値(即ち,移動平均値)を算出する。
ここで,ノイズ画像が文字画像をしのぐほど大きい状態でない限り,通常は,前記移動平均値の平均区間に全ての文字画像が含まれるときに,その区間におけるデータの平均値(前記移動平均値)や積算値が最大となる。
そこで,画像処理部44は,前記移動平均値(前記列長さLの区間の平均値)が最大となるときの基準位置と前記列長さLとに基づいて,前記列領域画像g11,g12それぞれにおける処理対象範囲(文字画像の存在領域と特定する処理の対象とする範囲)を特定する(S15,前記列領域画像処理対象範囲特定手順の一例)。
例えば,画像処理部44は,前記移動平均値が最大となるときの前記基準位置xkから右方向(列方向)へ前記列長さLの範囲を前記処理対象範囲Wxとして特定する(図11参照)。そして,ステップS14及びS15の処理結果は,画像処理部44が備える不図示のメモリに記憶される。
このステップS15において特定される処理対象範囲Wxは,ステップS5において推定された前記文字列包含推定領域A1から,列方向における余分な領域(文字画像が存在しない領域)が除かれた範囲である。
なお,ステップS14及びS15における「平均値」を「積算値」に置き換えてもよく,そのように置き換えても結果は同じである。
[Step S15]
Next, the image processing unit 44 calculates the moving average of the column length L based on the reference position while changing the reference position in the column direction with respect to the calculation data (the corrected second projection data) obtained in step S14. A moving average value for the section is calculated (S15). That is, the image processing unit 44 calculates an average value within the column length L with respect to each of the plurality of reference positions in the column direction for the corrected second projection data.
For example, the image processing unit 44 uses the left end position (one end position in the column direction) of the row area images g11 and g12 as the start point of the reference position, and sequentially shifts the reference position to the right (for example, one pixel at a time). Every time (shift), the average value (that is, the moving average value) of the corrected second projection data in the section of the column length L is calculated from the reference position in the right direction (column direction).
Here, unless the noise image is so large as to exceed the character image, normally, when all the character images are included in the average interval of the moving average value, the average value of the data in the interval (the moving average value) And the integrated value is maximized.
Therefore, the image processing unit 44 uses the column region images g11, g12 based on the reference position and the column length L when the moving average value (average value of the section having the column length L) is maximized. A processing target range (a range to be specified as a character image existing area) is specified in each of them (S15, an example of the row area image processing target range specifying procedure).
For example, the image processing unit 44 specifies the range of the column length L from the reference position xk when the moving average value is maximized in the right direction (column direction) as the processing target range Wx (see FIG. 11). ). The processing results of steps S14 and S15 are stored in a memory (not shown) provided in the image processing unit 44.
The processing target range Wx specified in step S15 is a range obtained by removing an extra region in the column direction (a region where no character image exists) from the character string inclusion estimation region A1 estimated in step S5.
It should be noted that “average value” in steps S14 and S15 may be replaced with “integrated value”, and the result is the same even if such replacement is performed.

[ステップS16]
次に,画像処理部44は,ステップS14の処理で算出した前記補正第2投影データIyt’に基づいて,前記列領域画像g11,g12それぞれにおける前記検出対象文字列を構成する各文字画像の存在領域の位置を特定する(S16,前記文字領域特定手順の一例)。その特定結果は,画像処理部44が備える不図示のメモリに記憶される。その際,画像処理部44は,ステップS15の処理により特定された前記処理対象範囲Wxを対象に前記検出対象文字列を構成する各文字画像の存在領域を特定する。
図11からわかるように,文字列画像が存在する列方向の範囲(文字幅の範囲)において,前記補正第2投影データIyt’の値が高くなり,文字画像と文字画像との間(隙間)の範囲において,前記補正第2投影データIyt’の値が低くなる。そこで,画像処理部44は,ステップS16において,前記補正第2投影データIyt’において谷を形成する部分の位置(列方向の位置)を特定し,その位置を各列における文字画像それぞれの区切り位置とすることにより文字画像それぞれの存在領域を特定する。なお,画像処理部44は,前記列画像領域g11,g12それぞれの列直交方向における範囲(ステップS7で推定した範囲)を,各文字画像の列直交方向の範囲として特定する。
図11において符号A3で示す各領域が,ステップS16において特定される各文字画像の存在領域の一例を表す。図11に示すように,ステップS16において特定される各文字画像の存在領域A3には,ステップS3及びS4において文字候補の画像として特定されなかった文字"7"の画像が存在する領域も含まれる。このように,本発明によれば,画像に乱れがある文字画像についても,その存在領域を正しく特定できる。
以上に示したように,位置ずれが修正された複数の列領域画像g21,g22全体についての列直交方向の投影データに基づいて列方向の文字区切りの位置を特定する処理を行えば,前記検出対象文字列の画像cにおける一部の文字画像に乱れがある場合に,前記列領域画像g11,g12それぞれについて個別に文字画像領域の特定を行う処理に比べ,一部の文字画像の乱れの影響が小さくなる結果,文字画像の区切り位置をより正しく特定できる。
[Step S16]
Next, the image processing unit 44, based on the corrected second projection data Iyt 'calculated in the process of step S14, the presence of each character image constituting the detection target character string in each of the column area images g11 and g12. The position of the area is specified (S16, an example of the character area specifying procedure). The identification result is stored in a memory (not shown) provided in the image processing unit 44. At that time, the image processing unit 44 specifies the existence area of each character image constituting the detection target character string with respect to the processing target range Wx specified by the process of step S15.
As can be seen from FIG. 11, in the range in the column direction (character width range) where the character string image exists, the value of the corrected second projection data Iyt ′ increases, and the character image and the character image (gap) In this range, the value of the corrected second projection data Iyt ′ becomes low. Therefore, in step S16, the image processing unit 44 specifies the position (column direction position) of the portion forming the valley in the corrected second projection data Iyt ', and determines the position as the delimiter position of each character image in each column. Thus, the existence area of each character image is specified. The image processing unit 44 specifies the range in the column orthogonal direction of each of the column image regions g11 and g12 (the range estimated in step S7) as the range in the column orthogonal direction of each character image.
In FIG. 11, each area indicated by reference numeral A3 represents an example of the existence area of each character image specified in step S16. As shown in FIG. 11, the existence area A3 of each character image specified in step S16 includes an area in which an image of the character “7” not specified as the character candidate image in steps S3 and S4 exists. . As described above, according to the present invention, it is possible to correctly specify the existence area of a character image having a disordered image.
As described above, if the process of specifying the position of the character delimiter in the column direction is performed based on the projection data in the column orthogonal direction for the entire plurality of column region images g21 and g22 whose positional deviation is corrected, the detection is performed. When some character images in the image c of the target character string are disturbed, the influence of the disturbance of some character images compared to the process of specifying the character image area individually for each of the row area images g11 and g12. As a result, the character image delimiter position can be specified more correctly.

[ステップS17,S18]
次に,画像処理部44は,ステップS16で特定した文字画像の存在領域A3それぞれから文字画像を切り出す処理(文字画像の抽出処理)を実行する(S17)。切出された(抽出された)文字画像は,前記画像メモリ43に記憶される。
次に,CPU41が,ステップS17で切出された文字画像それぞれについて,予め定められた文字候補の画像とのパターン認識処理を実行することにより,切出された文字画像がいずれの文字を表す画像であるかを特定する文字認識処理を実行する(S18)。
このステップS18において,画像処理部44は,例えば,予め定められた文字候補の画像のデータを教師データとして学習されたニューラルネットワークに対し,ステップS17で切出された文字画像のデータを入力させることにより,前記文字認識処理を実行する。なお,前記ニューラルネットワークを規定する情報は,前記汎用メモリ46に予め記憶されているものとする。
その他,前記汎用メモリ46に文字候補の画像のデータが予め記憶され,その画像データそれぞれとステップS17で切出された文字画像のデータとのパターンマッチング処理を行う前記文字認識処理も考えられる。
[Steps S17 and S18]
Next, the image processing unit 44 executes a process (character image extraction process) of cutting out a character image from each of the character image existence areas A3 specified in step S16 (S17). The extracted (extracted) character image is stored in the image memory 43.
Next, the CPU 41 executes a pattern recognition process with a predetermined character candidate image for each of the character images cut out in step S17, so that the cut-out character image represents any character. A character recognition process is performed to identify whether or not (S18).
In step S18, for example, the image processing unit 44 causes the neural network learned using the predetermined character candidate image data as teacher data to input the character image data extracted in step S17. Thus, the character recognition process is executed. It is assumed that information defining the neural network is stored in advance in the general-purpose memory 46.
In addition, the character recognition processing may be considered in which character candidate image data is stored in advance in the general-purpose memory 46, and pattern matching processing is performed between each of the image data and the character image data cut out in step S17.

[ステップS19]
最後に,CPU41は,ステップS19の文字認識処理の結果の出力処理を実行する(S19)。例えば,CPU41は,文字認識処理の結果を前記通信部47を通じて前記ホストコンピュータに送信(出力)したり,或いは前記表示部45に表示させる(出力する)処理,或いは前記汎用メモリ46に記録(出力)する処理等を実行する。
以上に示した処理(文字画像の画像処理方法)によれば,複数列の文字列からなる検出対象文字列の画像について各文字画像の領域を特定する場合に,一列分の文字列それぞれの画像相互の列方向の位置ずれが大きい場合や,前記検出対象文字列を構成する文字の一部について,文字画像と文字画像との間の隙間が明確でない場合(例えば,図12に示すような2値画像である場合)であっても,各文字画像の存在領域を極力正しく特定できる。
[Step S19]
Finally, the CPU 41 executes an output process of the result of the character recognition process in step S19 (S19). For example, the CPU 41 transmits (outputs) the result of character recognition processing to the host computer through the communication unit 47, displays (outputs) the result on the display unit 45, or records (outputs) it in the general-purpose memory 46. ) Is executed.
According to the above processing (character image image processing method), when specifying the area of each character image for the image of the detection target character string made up of a plurality of character strings, the image of each character string for one column When the mutual displacement in the column direction is large, or when the gap between the character image is not clear for some of the characters constituting the detection target character string (for example, 2 as shown in FIG. 12 Even in the case of a value image, the existence area of each character image can be specified as accurately as possible.

本発明は,文字画像の画像処理に利用可能である。     The present invention can be used for image processing of character images.

本発明の実施形態に係る文字画像の画像処理装置Zの概略構成を表すブロック図。The block diagram showing the schematic structure of the image processing apparatus Z of the character image which concerns on embodiment of this invention. 画像処理装置Zによる文字画像切出し・文字認識処理の手順を表すフローチャート。5 is a flowchart showing a procedure of character image cutout / character recognition processing by the image processing apparatus Z. 画像処理装置Zによる画像処理の対象となる2値画像の一例を表す図。FIG. 3 is a diagram illustrating an example of a binary image that is an object of image processing by the image processing apparatus Z. 2値画像における文字画像の候補の一例を表す図。The figure showing an example of the candidate of the character image in a binary image. 検出対象文字列における文字配置条件を模式的に表した図。The figure which represented typically the character arrangement conditions in a detection object character string. 2値画像における文字画像の候補相互の位置関係を表した図。The figure showing the positional relationship between character image candidates in a binary image. 画像処理装置Zにより特定される文字列包含推定領域の画像の一例を表す図。The figure showing an example of the image of the character string inclusion estimation area specified by the image processing device Z. 文字列包含推定領域の画像及びその画像における列方向の投影データ分布の一例を表す図。The figure showing an example of the image of a character string inclusion estimation area | region, and the projection data distribution of the column direction in the image. 文字列包含推定領域における列領域画像及びその画像における列直交方向の投影データ分布の一例を表す図。The figure showing an example of the line area image in a character string inclusion estimation area, and the projection data distribution of the line orthogonal direction in the image. 列領域画像の列直交方向の投影データを補正したデータの相互相関関数の一例を表すグラフ。The graph showing an example of the cross correlation function of the data which correct | amended the projection data of the row orthogonal direction of the row | line | column area | region image. 列領域画像の列方向の位置ずれを修正した画像及びその画像全体の列直交方向の投影データの上限を補正したデータの分布の一例を表す図。The figure showing an example of distribution of the data which correct | amended the upper limit of the projection data of the row orthogonal direction of the image which corrected the position shift of the row direction of a row | line | column area | region image, and the whole image. 一部の文字画像について画像品質が劣悪な2値画像の一例を表す図。The figure showing an example of a binary image with inferior image quality about a part of character image.

符号の説明Explanation of symbols

Z :文字画像の画像処理装置
c :検出対象文字列の画像
1 :被管理部材
2 :搬送手段
3 :カメラ
41:CPU
42:カメラインターフェース
43:画像メモリ
44:画像処理部
45:表示部
46:汎用メモリ
47:通信部
A1:文字列包含推定領域
A11,A12:列範囲
g1,g2:列領域画像
Z: Image processing device for character image c: Image of character string to be detected 1: Managed member 2: Conveying means 3: Camera 41: CPU
42: Camera interface 43: Image memory 44: Image processing unit 45: Display unit 46: General-purpose memory 47: Communication unit A1: Character string inclusion estimation area A11, A12: Column range g1, g2: Column area image

Claims (7)

複数列の文字列からなり文字寸法と一列の文字数及び文字間隔と列数と列間隔とが所定の文字配置条件を満たす検出対象文字列の画像が形成された部材を撮像して得られた画像についての2値画像のデータを所定の記憶手段から読み出し,その読み出しデータに基づいて前記2値画像における前記検出対象文字列を構成する各文字の画像の存在領域を特定し,特定した各文字の画像の存在領域から文字画像を抽出する文字列画像の画像処理方法であって,
所定のプロセッサにより,
前記読み出しデータに基づいて,前記2値画像における連結画素のうち予め定められた文字画像の条件を満たすものを特定する第1の文字候補特定手順と,
前記第1の文字候補特定手順により特定された前記連結画素のうちその相対的な位置関係が,前記文字配置条件における文字相互の相対的な位置関係を所定の誤差範囲内で満たすものを特定する第2の文字候補特定手順と,
前記第2の文字候補特定手順により特定された前記連結画素である文字候補画像それぞれの位置及び寸法と前記文字配置条件と予め定められた文字配置の変動範囲とに基づいて,前記2値画像において前記文字候補画像の全てを含む領域であって前記検出対象文字列の画像全体を含む領域を推定する文字列包含領域推定手順と,
前記2値画像における前記文字列包含領域推定手順により推定された領域である文字列包含推定領域の画像について予め定められた処理を行うことにより,前記検出対象文字列を構成する一列分の文字列の画像それぞれの列方向に直交する列直交方向における存在範囲を推定する列幅範囲推定手順と,
前記文字列包含領域の画像における前記列幅範囲推定手順により推定された範囲それぞれの画像である列領域画像について前記列直交方向の投影データ又はその投影データについて上限値を制限する補正処理を施したデータの分布を算出する第1の列直交方向投影データ算出手順と,
前記第1の列直交方向投影データ算出手順による算出データに基づいて,列方向のシフト量を変数とする相互相関関数を導出する相互相関関数導出手順と,
前記相互相関関数導出手順により得られた前記相互相関関数に基づいて,前記列領域画像相互の列方向の位置ずれ量である列相互ずれ量を導出する列相互ずれ量導出手順と,
複数の前記列領域画像それぞれを前記列相互ずれ量だけ位置修正した画像全体における前記列直交方向の投影データ又はその投影データについて上限値を制限する補正処理を施したデータの分布を算出する第2の列直交方向投影データ算出手順と,
前記第2の列直交方向投影データ算出手順による算出データに基づいて,前記列領域画像それぞれにおける前記検出対象文字列を構成する各文字の画像の存在領域の位置を特定する文字領域特定手順と,
を自動的に実行することを特徴とする文字列画像の画像処理方法。
An image obtained by imaging a member composed of a plurality of character strings, on which an image of a character string to be detected, in which the character size, the number of characters in one row, the character interval, the number of columns, and the column interval satisfy a predetermined character arrangement condition, is formed. The binary image data of the character string is read out from a predetermined storage means, and based on the read data, the existence area of each character image constituting the detection target character string in the binary image is specified, and An image processing method for a character string image that extracts a character image from an existing area of the image,
With a given processor
A first character candidate specifying procedure for specifying, based on the read data, a connected pixel in the binary image that satisfies a predetermined character image condition;
Among the connected pixels specified by the first character candidate specifying procedure, specify those whose relative positional relationship satisfies the relative positional relationship between characters in the character arrangement condition within a predetermined error range. A second character candidate identification procedure;
In the binary image, based on the position and size of each of the character candidate images that are the connected pixels specified by the second character candidate specifying procedure, the character arrangement condition, and a predetermined variation range of the character arrangement. A character string inclusion region estimation procedure for estimating a region including all of the character candidate images and including the entire image of the detection target character string;
By performing a predetermined process on the image of the character string inclusion estimation region that is the region estimated by the character string inclusion region estimation procedure in the binary image, a character string for one column that constitutes the detection target character string Column width range estimation procedure for estimating the existence range in the column orthogonal direction orthogonal to the column direction of each of the images of
A correction process for limiting the upper limit value of the projection data in the column orthogonal direction or the projection data in the column orthogonal direction is performed on the column area image that is an image of each range estimated by the column width range estimation procedure in the image of the character string inclusion region A first column orthogonal direction projection data calculation procedure for calculating a distribution of data;
A cross-correlation function derivation procedure for deriving a cross-correlation function having a shift amount in the column direction as a variable, based on calculation data obtained by the first column orthogonal direction projection data calculation procedure;
A column cross-shift amount derivation procedure for deriving a column cross-shift amount that is a position shift amount in the column direction between the column region images based on the cross-correlation function obtained by the cross-correlation function derivation procedure;
Calculating the distribution of the projection data in the column orthogonal direction in the entire image obtained by correcting the position of each of the plurality of column region images by the column mutual shift amount or the distribution of the data subjected to the correction process for limiting the upper limit value of the projection data; Column orthogonal direction projection data calculation procedure,
A character region specifying procedure for specifying a position of an existing region of each character image constituting the detection target character string in each of the column region images, based on calculation data obtained by the second column orthogonal direction projection data calculating procedure;
A character string image processing method characterized by automatically executing
前記列幅範囲推定手順が,
前記2値画像における前記文字列包含推定領域の画像について列方向の投影データの分布を算出する列方向投影データ算出手順と,
前記列方向投影データ算出手順による算出データに基づいて,前記検出対象文字列を構成する一列分の文字列の画像それぞれの前記列直交方向における存在範囲を推定する範囲推定手順と,
を有してなる請求項1に記載の文字列画像の画像処理方法。
The column width range estimation procedure includes:
A column direction projection data calculation procedure for calculating a distribution of projection data in the column direction for the image of the character string inclusion estimation region in the binary image;
A range estimation procedure for estimating the existence range in the column orthogonal direction of each of the character string images constituting the detection target character string based on the calculation data by the column direction projection data calculation procedure;
The image processing method for a character string image according to claim 1, comprising:
前記プロセッサが,
前記相互相関関数導出手順により得られた前記相互相関関数における複数の相関値のピーク相互の間隔と前記文字配置条件における一列の文字数とに基づいて,前記列領域画像それぞれにおける前記検出対象文字列の画像が存在する範囲の列方向の長さを算出する列長さ算出手順と,
前記第2の列直交方向投影データ算出手順による算出データについて,列方向における複数の基準位置それぞれを基準として前記列長さ算出手順による算出結果である列長さの範囲内の値の積算値又は平均値を算出し,その算出値が最大となるときの前記基準位置と前記列長さとに基づいて,前記列領域画像における処理対象範囲を特定する列領域画像処理対象範囲特定手順と,を自動的に実行し,
前記文字領域特定手順において,前記列領域画像処理対象範囲特定手順により特定された前記処理対象範囲を対象に前記検出対象文字列を構成する各文字の画像の存在領域を特定してなる請求項1又は2のいずれかに記載の文字列画像の画像処理方法。
The processor is
Based on the interval between peaks of a plurality of correlation values in the cross-correlation function obtained by the cross-correlation function derivation procedure and the number of characters in one row in the character arrangement condition, the detection target character string in each of the row region images A column length calculation procedure for calculating the length in the column direction of the range where the image exists,
For the calculation data by the second column orthogonal direction projection data calculation procedure, the integrated value of the values within the range of the column length, which is the calculation result by the column length calculation procedure with respect to each of a plurality of reference positions in the column direction, or A column region image processing target range specifying procedure for automatically calculating a mean value and specifying a processing target range in the column region image based on the reference position and the column length when the calculated value is maximized. Run
2. The character region specifying procedure specifies an existence region of an image of each character constituting the detection target character string for the processing target range specified by the column region image processing target range specifying procedure. The image processing method of the character string image in any one of 2 or 2.
前記列相互ずれ量出手順において,前記相互相関関数導出手順により得られた前記相互相関関数における最大の相関値に対応する列方向のシフト量に基づいて前記列相互ずれ量を導出してなる請求項1〜3のいずれかに記載の文字列画像の画像処理方法。 In the column cross-deviation amount guiding out procedure will derive the column cross-deviation amount on the basis of the shift amount in the column direction corresponding to the maximum correlation value in said cross-correlation function deriving procedure the cross-correlation function obtained by The image processing method of the character string image in any one of Claims 1-3. 前記予め定められた文字画像の条件が,連結画素の外接矩形の大きさ,連結画素の外接矩形の縦横比,連結画素の面積,連結画素とその外接矩形との面積比,及び連結画素の周囲長の2乗とその面積との比,のうちの少なくとも1つが予め定められた範囲内にあることである請求項1〜4のいずれかに記載の文字列画像の画像処理方法。   The predetermined character image conditions are the size of the circumscribed rectangle of the connected pixel, the aspect ratio of the circumscribed rectangle of the connected pixel, the area of the connected pixel, the area ratio of the connected pixel and its circumscribed rectangle, and the surrounding of the connected pixel. The image processing method for a character string image according to any one of claims 1 to 4, wherein at least one of the ratio of the square of the length and the area thereof is within a predetermined range. 複数列の文字列からなり文字寸法と一列の文字数及び文字間隔と列数と列間隔とが所定の文字配置条件を満たす検出対象文字列の画像が形成された部材を撮像して得られた画像についての2値画像のデータを所定の記憶手段から読み出し,その読み出しデータに基づいて前記2値画像における前記検出対象文字列を構成する各文字の画像の存在領域を特定し,特定した各文字の画像の存在領域から文字画像を抽出する手順を所定のプロセッサに実行させるための文字列画像の画像処理プログラムであって,
前記読み出しデータに基づいて,前記2値画像における連結画素のうち予め定められた文字画像の条件を満たすものを特定する第1の文字候補特定手順と,
前記第1の文字候補特定手順により特定された前記連結画素のうちその相対的な位置関係が,前記文字配置条件における文字相互の相対的な位置関係を所定の誤差範囲内で満たすものを特定する第2の文字候補特定手順と,
前記第2の文字候補特定手順により特定された前記連結画素である文字候補画像それぞれの位置及び寸法と前記文字配置条件と予め定められた文字配置の変動範囲とに基づいて,前記2値画像において前記文字候補画像の全てを含む領域であって前記検出対象文字列の画像全体を含む領域を推定する文字列包含領域推定手順と,
前記2値画像における前記文字列包含領域推定手順により推定された領域である文字列包含推定領域の画像について予め定められた処理を行うことにより,前記検出対象文字列を構成する一列分の文字列の画像それぞれの列方向に直交する列直交方向における存在範囲を推定する列幅範囲推定手順と,
前記文字列包含領域の画像における前記列幅範囲推定手順により推定された範囲それぞれの画像である列領域画像について前記列直交方向の投影データ又はその投影データについて上限値を制限する補正処理を施したデータの分布を算出する第1の列直交方向投影データ算出手順と,
前記第1の列直交方向投影データ算出手順による算出データに基づいて,列方向のシフト量を変数とする相互相関関数を導出する相互相関関数導出手順と,
前記相互相関関数導出手順により得られた前記相互相関関数に基づいて,前記列領域画像相互の列方向の位置ずれ量である列相互ずれ量を算出する列相互ずれ量算出手順と,
複数の前記列領域画像それぞれを前記列相互ずれ量だけ位置修正した画像全体における前記列直交方向の投影データ又はその投影データについて上限値を制限する補正処理を施したデータの分布を算出する第2の列直交方向投影データ算出手順と,
前記第2の列直交方向投影データ算出手順による算出データに基づいて,前記列領域画像それぞれにおける前記検出対象文字列を構成する各文字の画像の存在領域の位置を特定する文字領域特定手順と,
を所定のプロセッサに実行させるための文字列画像の画像処理プログラム。
An image obtained by imaging a member composed of a plurality of character strings, on which an image of a character string to be detected, in which the character size, the number of characters in one row, the character interval, the number of columns, and the column interval satisfy a predetermined character arrangement condition, is formed. The binary image data of the character string is read out from a predetermined storage means, and based on the read data, the existence area of each character image constituting the detection target character string in the binary image is specified, and A character string image image processing program for causing a predetermined processor to execute a procedure for extracting a character image from an existing area of an image,
A first character candidate specifying procedure for specifying, based on the read data, a connected pixel in the binary image that satisfies a predetermined character image condition;
Among the connected pixels specified by the first character candidate specifying procedure, specify those whose relative positional relationship satisfies the relative positional relationship between characters in the character arrangement condition within a predetermined error range. A second character candidate identification procedure;
In the binary image, based on the position and size of each of the character candidate images that are the connected pixels specified by the second character candidate specifying procedure, the character arrangement condition, and a predetermined variation range of the character arrangement. A character string inclusion region estimation procedure for estimating a region including all of the character candidate images and including the entire image of the detection target character string;
By performing a predetermined process on the image of the character string inclusion estimation region that is the region estimated by the character string inclusion region estimation procedure in the binary image, a character string for one column that constitutes the detection target character string Column width range estimation procedure for estimating the existence range in the column orthogonal direction orthogonal to the column direction of each of the images of
A correction process for limiting the upper limit value of the projection data in the column orthogonal direction or the projection data in the column orthogonal direction is performed on the column area image that is an image of each range estimated by the column width range estimation procedure in the image of the character string inclusion region A first column orthogonal direction projection data calculation procedure for calculating a distribution of data;
A cross-correlation function derivation procedure for deriving a cross-correlation function having a shift amount in the column direction as a variable, based on calculation data obtained by the first column orthogonal direction projection data calculation procedure;
Based on the cross-correlation function obtained by the cross-correlation function derivation procedure, a column cross-shift amount calculation procedure for calculating a column cross-shift amount that is a position shift amount in the column direction between the column region images;
Calculating the distribution of the projection data in the column orthogonal direction in the entire image obtained by correcting the position of each of the plurality of column region images by the column mutual shift amount or the distribution of the data subjected to the correction process for limiting the upper limit value of the projection data; Column orthogonal direction projection data calculation procedure,
A character region specifying procedure for specifying a position of an existing region of each character image constituting the detection target character string in each of the column region images, based on calculation data obtained by the second column orthogonal direction projection data calculating procedure;
A character string image image processing program for causing a predetermined processor to execute.
複数列の文字列からなり文字寸法と一列の文字数及び文字間隔と列数と列間隔とが所定の文字配置条件を満たす検出対象文字列の画像が形成された部材を撮像して得られた画像についての2値画像のデータを所定の記憶手段から読み出し,その読み出しデータに基づいて前記2値画像における前記検出対象文字列を構成する各文字の画像の存在領域を特定し,特定した各文字の画像の存在領域から文字画像を抽出する文字列画像の画像処理装置であって,
前記読み出しデータに基づいて,前記2値画像における連結画素のうち予め定められた文字画像の条件を満たすものを特定する第1の文字候補特定手段と,
前記第1の文字候補特定手段により特定された前記連結画素のうちその相対的な位置関係が,前記文字配置条件における文字相互の相対的な位置関係を所定の誤差範囲内で満たすものを特定する第2の文字候補特定手段と,
前記第2の文字候補特定手段により特定された前記連結画素である文字候補画像それぞれの位置及び寸法と前記文字配置条件と予め定められた文字配置の変動範囲とに基づいて,前記2値画像において前記文字候補画像の全てを含む領域であって前記検出対象文字列の画像全体を含む領域を推定する文字列包含領域推定手段と,
前記2値画像における前記文字列包含領域推定手段により推定された領域である文字列包含推定領域の画像について予め定められた処理を行うことにより,前記検出対象文字列を構成する一列分の文字列の画像それぞれの列方向に直交する列直交方向における存在範囲を推定する列幅範囲推定手段と,
前記文字列包含領域の画像における前記列幅範囲推定手段により推定された範囲それぞれの画像である列領域画像について前記列直交方向の投影データ又はその投影データについて上限値を制限する補正処理を施したデータの分布を算出する第1の列直交方向投影データ算出手段と,
前記第1の列直交方向投影データ算出手段による算出データに基づいて,列方向のシフト量を変数とする相互相関関数を導出する相互相関関数導出手段と,
前記相互相関関数導出手段により得られた前記相互相関関数に基づいて,前記列領域画像相互の列方向の位置ずれ量である列相互ずれ量を算出する列相互ずれ量算出手段と,
複数の前記列領域画像それぞれを前記列相互ずれ量だけ位置修正した画像全体における前記列直交方向の投影データ又はその投影データについて上限値を制限する補正処理を施したデータの分布を算出する第2の列直交方向投影データ算出手段と,
前記第2の列直交方向投影データ算出手段による算出データに基づいて,前記列領域画像それぞれにおける前記検出対象文字列を構成する各文字の画像の存在領域の位置を特定する文字領域特定手段と,
を具備してなることを特徴とする文字列画像の画像処理装置。
An image obtained by imaging a member composed of a plurality of character strings, on which an image of a character string to be detected, in which the character size, the number of characters in one row, the character interval, the number of columns, and the column interval satisfy a predetermined character arrangement condition, is formed. The binary image data of the character string is read out from a predetermined storage means, and based on the read data, the existence area of each character image constituting the detection target character string in the binary image is specified, and An image processing device for a character string image that extracts a character image from an existing area of the image,
First character candidate specifying means for specifying, based on the read data, a connected pixel in the binary image that satisfies a predetermined character image condition;
Among the connected pixels specified by the first character candidate specifying means, specify those whose relative positional relationship satisfies the relative positional relationship between characters in the character arrangement condition within a predetermined error range. A second character candidate specifying means;
In the binary image, based on the position and size of each of the character candidate images that are the connected pixels specified by the second character candidate specifying means, the character arrangement conditions, and a predetermined variation range of the character arrangement. A character string inclusion region estimation means for estimating a region including all of the character candidate images and including the entire image of the detection target character string;
By performing a predetermined process on the image of the character string inclusion estimation area, which is an area estimated by the character string inclusion area estimation means in the binary image, a character string for one column constituting the detection target character string Column width range estimation means for estimating the existence range in the column orthogonal direction orthogonal to the column direction of each of the images of
A correction process is performed to limit the upper limit value of projection data in the column orthogonal direction or projection data in the column orthogonal direction with respect to the row area image that is an image of each range estimated by the row width range estimation unit in the image of the character string inclusion region. First column orthogonal direction projection data calculation means for calculating data distribution;
Cross-correlation function deriving means for deriving a cross-correlation function having the shift amount in the column direction as a variable based on the calculation data by the first column orthogonal direction projection data calculating means;
A column cross-shift amount calculating unit that calculates a column cross-shift amount that is a position shift amount in the column direction between the column region images based on the cross-correlation function obtained by the cross-correlation function deriving unit;
Calculating the distribution of the projection data in the column orthogonal direction in the entire image obtained by correcting the position of each of the plurality of column region images by the column mutual shift amount or the distribution of the data subjected to the correction process for limiting the upper limit value of the projection data; Column orthogonal direction projection data calculation means,
A character area specifying means for specifying a position of an existing area of each character image constituting the detection target character string in each of the row area images based on calculation data by the second column orthogonal direction projection data calculating means;
An image processing apparatus for character string images, comprising:
JP2007040052A 2007-02-20 2007-02-20 Image processing method of character string image, program thereof and apparatus thereof Active JP4836826B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007040052A JP4836826B2 (en) 2007-02-20 2007-02-20 Image processing method of character string image, program thereof and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007040052A JP4836826B2 (en) 2007-02-20 2007-02-20 Image processing method of character string image, program thereof and apparatus thereof

Publications (2)

Publication Number Publication Date
JP2008204203A JP2008204203A (en) 2008-09-04
JP4836826B2 true JP4836826B2 (en) 2011-12-14

Family

ID=39781641

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007040052A Active JP4836826B2 (en) 2007-02-20 2007-02-20 Image processing method of character string image, program thereof and apparatus thereof

Country Status (1)

Country Link
JP (1) JP4836826B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5280337B2 (en) * 2009-11-18 2013-09-04 株式会社神戸製鋼所 Character recognition method and character recognition device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6394385A (en) * 1986-10-08 1988-04-25 Tokyo Keiki Co Ltd Printed character pitch detection device
JPH0490083A (en) * 1990-08-03 1992-03-24 Canon Inc character recognition device
JPH06348893A (en) * 1993-06-02 1994-12-22 Kawasaki Steel Corp Character cutting method
JPH07282196A (en) * 1994-04-05 1995-10-27 Yamaha Motor Co Ltd Pattern confirmation method
JPH08339421A (en) * 1995-06-13 1996-12-24 Kobe Steel Ltd Character area determining method for image
JPH1069524A (en) * 1996-08-28 1998-03-10 Sumitomo Metal Ind Ltd Character extraction method
JP2006338578A (en) * 2005-06-06 2006-12-14 Mitsubishi Electric Corp Character recognition device

Also Published As

Publication number Publication date
JP2008204203A (en) 2008-09-04

Similar Documents

Publication Publication Date Title
JP5624671B2 (en) Character string cutting method and character string cutting device
US9189694B2 (en) Image processing device and image processing method
EP3079101A1 (en) Image processing apparatus, image processing method and computer-readable storage medium
JP6952094B2 (en) Image processing device and image processing method
WO2019172059A1 (en) Lane marker recognition device
US6327385B1 (en) Character segmentation device and character segmentation system
US9858477B2 (en) Character segmenting apparatus, character recognition apparatus, and character segmenting method
JP2018055255A (en) Information processing apparatus, information processing method, and program
US20200320331A1 (en) System and method for object recognition using local binarization
US20150071546A1 (en) Character-recognition method and character-recognition device and program using said method
EP0750415A2 (en) Image processing method and apparatus
US20190057276A1 (en) Image analysis apparatus, image analysis method, and non-transitory computer readable medium
JP6030917B2 (en) Character cutting device, character cutting method, and character recognition device
JP4836826B2 (en) Image processing method of character string image, program thereof and apparatus thereof
US8989485B2 (en) Detecting a junction in a text line of CJK characters
CN109299718B (en) Character recognition method and device
EP4036871B1 (en) Image processing apparatus, image processing method, program and storage medium
CN112784830B (en) Character recognition method and device
CN120656178A (en) OCR (optical character recognition) method and system for low-quality image
JP7809809B2 (en) Draft measurement system and method based on image processing using artificial intelligence technology
US7680329B2 (en) Character recognition apparatus and character recognition method
US11003902B2 (en) Image identification apparatus and non-transitory computer readable medium
CN118297983A (en) A moving target tracking method and system
CN118262362A (en) A high-precision character segmentation method and system
JP5248074B2 (en) Music score recognition apparatus, music score recognition method, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090929

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20110318

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20110318

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20110324

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110526

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110531

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110615

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110927

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110927

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141007

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4836826

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150