JP2010198475A - Character recognition device - Google Patents
Character recognition device Download PDFInfo
- Publication number
- JP2010198475A JP2010198475A JP2009044496A JP2009044496A JP2010198475A JP 2010198475 A JP2010198475 A JP 2010198475A JP 2009044496 A JP2009044496 A JP 2009044496A JP 2009044496 A JP2009044496 A JP 2009044496A JP 2010198475 A JP2010198475 A JP 2010198475A
- Authority
- JP
- Japan
- Prior art keywords
- character
- image
- image processing
- display
- processing means
- 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.)
- Pending
Links
Images
Landscapes
- Character Input (AREA)
Abstract
Description
本発明は、物体の表面に表示された文字を認識するための文字認識装置に係り、特に、鋼材の表面に表示された文字を光学的に読み出して認識する文字認識装置に関する。 The present invention relates to a character recognition device for recognizing characters displayed on the surface of an object, and more particularly to a character recognition device that optically reads and recognizes characters displayed on the surface of a steel material.
従来、文字表示部をカメラにて撮像し、このカメラから入力した映像信号をデジタル化して入力画像を作成した後、背景差分画像作成処理、二値化処理、ノイズ除去処理及び文字切り出し処理をこの順に行って、記載された文字を認識する文字認識方法及び文字認識装置が知られている(例えば、特許文献1参照。)。また、文字認識を行った後のテキストデータの取り扱いに関しては、認識可能ならば表示部に認識されたテキストデータを表示し、認識不可能ならば表示部に警告表示を行うものが知られている(例えば、特許文献2参照。)。 Conventionally, after a character display unit is imaged with a camera and an input image is created by digitizing a video signal input from the camera, background difference image creation processing, binarization processing, noise removal processing, and character segmentation processing are performed. A character recognition method and a character recognition device are known that perform the processing in order and recognize the described characters (see, for example, Patent Document 1). In addition, regarding the handling of text data after character recognition is performed, the recognized text data is displayed on the display unit if it can be recognized, and a warning is displayed on the display unit if it cannot be recognized. (For example, refer to Patent Document 2).
特許文献1に記載の発明によると、背景差分画像作成処理において、背景差分画像の濃度ヒストグラムを基に文字を白、背景を黒にする最適な二値化しきい値を算出して、背景差分画像を二値化画像に変換するので、ある程度入力画像の背景に濃度むらや汚れがある場合にも、文字情報を正確に認識することができる。
According to the invention described in
ところで、鋼材のメーカーやその流通業界においては、鋼材の端面に刻印又はペイントなどで表示された文字を読み取ることによって個々の鋼材を管理することが行われており、この文字を正確に認識可能な文字認識装置が求められている。 By the way, in the steel manufacturer and its distribution industry, individual steel materials are managed by reading the characters displayed on the end surfaces of the steel materials by engraving or painting, and these characters can be accurately recognized. There is a need for a character recognition device.
しかしながら、鋼材は、紙等の情報伝達媒体とは異なり、さびの発生具合によって表面の状態が著しく変化するので、比較的軽度の濃度むらや汚れしか生じないことを前提とする従来の文字認識装置をそのまま適用しても、文字を正確に認識することが困難である。また、鋼材は、保持部材に対する鋼材の載置状態によって、鋼材に表示された文字の向きが変化するので、文字の向きを考慮しない従来の文字認識装置をそのまま適用しても、文字を正確に認識することが困難である。さらに、鋼材に付される文字は、鋼材の種類によって桁数や表示位置が決まっているので、これらを考慮しない従来の文字認識装置をそのまま適用しても、文字情報を正確に認識することが困難である。 However, unlike information transmission media such as paper, the surface of the steel material changes significantly due to the occurrence of rust. Therefore, the conventional character recognition device is based on the premise that only relatively slight density unevenness and dirt are generated. Even if is applied as it is, it is difficult to accurately recognize characters. In addition, the direction of characters displayed on the steel material changes depending on the mounting state of the steel material with respect to the holding member. Therefore, even if a conventional character recognition device that does not consider the direction of the character is applied as it is, the character is accurately displayed. It is difficult to recognize. Furthermore, since the number of characters and the display position of the characters attached to the steel material are determined depending on the type of the steel material, even if a conventional character recognition device that does not consider these is applied as it is, the character information can be recognized accurately. Have difficulty.
本発明は、かかる従来技術の問題を解決するためになされたものであり、その目的は、鋼材に表示された文字を正確に読み取って認識することが可能な文字認識装置を提供することにある。 The present invention has been made to solve the problems of the prior art, and an object thereof is to provide a character recognition device capable of accurately reading and recognizing characters displayed on a steel material. .
本発明は、前記課題を解決するため、第1に、鋼材の文字表示部を撮像してカラー画像信号を出力する撮像手段と、この撮像手段から入力したカラー画像信号に所要のデジタル画像処理を施して、前記文字表示部に表示された文字の認識を行う画像処理手段と、この画像処理手段による前記文字の認識結果を表示する表示手段とを備え、前記画像処理手段は、前記カラー画像信号から前記文字表示部のカラー画像を作成した後、このカラー画像を赤色チャンネル画像、緑色チャンネル画像及び青色チャンネル画像の各チャンネル画像に分解し、前記緑色チャンネル画像と予め前記画像処理手段に記憶された基準文字画像とを対比してこれら両画像の一致度合いを評価し、両画像の一致度合いが予め設定された所定値以上である場合には、文字が認識されたものと判定して、その文字を前記表示手段に表示し、前記両画像の一致度合いが前記所定値未満である場合には、前記表示手段に認定不可の表示を行うという構成にした。 In order to solve the above-mentioned problems, the present invention firstly, an image pickup means for picking up an image of a character display portion of a steel material and outputting a color image signal, and a digital image processing required for the color image signal inputted from the image pickup means. Image processing means for recognizing the character displayed on the character display section, and display means for displaying the recognition result of the character by the image processing means, the image processing means comprising the color image signal After creating a color image of the character display unit from the color image, the color image is decomposed into channel images of a red channel image, a green channel image, and a blue channel image, and the green channel image and the image processing means are stored in advance. The degree of coincidence between these images is evaluated by comparing with the reference character image. If the degree of coincidence between both images is equal to or greater than a predetermined value, the character It is determined that the character has been recognized, and the character is displayed on the display unit. When the degree of coincidence between the two images is less than the predetermined value, the display unit displays an unacceptable display. .
鋼材には赤さびが発生するので、赤さびの発生具合によっては、単に撮像手段から得られたカラー画像ファイルを利用しても鋼材に表示された文字を正確に抽出することができず、基準文字画像との対比が不可能であるか、著しく困難になる。特に、刻印によって鋼材に文字が表されている場合には、文字の内部にもその背景部分にも赤さびが発生するので、赤さびの発生具合によっては、文字の抽出が全く不可能になる。これに対して、カラー画像ファイルから分解された緑色チャンネル画像を用いると、このような場合にも、赤さびによる影響を除去することができて、鋼材に表示された文字の抽出が可能になるので、基準文字画像との比較による文字の認識を可能にすることができる。 Since red rust is generated in steel materials, characters displayed on the steel materials cannot be accurately extracted depending on how red rust is generated even if a color image file obtained from the imaging means is used. Comparison with is impossible or extremely difficult. In particular, when a character is represented on a steel material by engraving, red rust is generated in the character as well as in the background portion, so that it is impossible to extract the character depending on how the red rust is generated. On the other hand, if the green channel image decomposed from the color image file is used, the influence of red rust can be removed in such a case, and the characters displayed on the steel can be extracted. The character can be recognized by comparison with the reference character image.
本発明は第2に、前記第1の文字認識装置において、前記画像処理手段は、前記緑色チャンネル画像の回転と前記基準文字画像との対比を繰り返し、これら両画像の一致度合いの評価を行うという構成にした。 According to the second aspect of the present invention, in the first character recognition device, the image processing unit repeatedly compares the rotation of the green channel image and the reference character image, and evaluates the degree of coincidence of the two images. Made the configuration.
基準文字画像は、正立の状態、即ち、表示手段に表示したときに起立した人間の目に上向きで見える状態で記憶される。これに対して、鋼材は、その断面形状と撮像時における保持部材に対する鋼材の載置状態とによって、表示手段に正立の状態で表示されない場合が生じ得る。例えば、鋼材の断面形状が四角形である場合には、保持部材に対する鋼材の載置状態によっては、文字の向きが上向き、右向き、左向き又は下向きのいずれかになる。従って、カラー画像ファイルから分解された緑色チャンネル画像をそのまま利用した場合には、最大25パーセントの確率でしか鋼材に表示された文字を認識することができない。これに対して、緑色チャンネル画像の回転と基準文字画像との対比を繰り返す場合には、回転を繰り返すうちに必ず緑色チャンネル画像が正立状態になるので、基準文字画像との対比が可能となり、最大100パーセントの確率で鋼材に表示された文字を認識することが可能となる。鋼材の断面形状が円形の場合、三角形の場合、四角形以外の多角形の場合及びその他の形状である場合も同様である。 The reference character image is stored in an upright state, that is, in a state in which the reference character image can be seen upward by the standing human eyes when displayed on the display means. On the other hand, the steel material may not be displayed in an upright state on the display means depending on the cross-sectional shape and the mounting state of the steel material on the holding member at the time of imaging. For example, when the cross-sectional shape of the steel material is a quadrangle, the direction of the characters is upward, rightward, leftward, or downward depending on how the steel material is placed on the holding member. Therefore, when the green channel image decomposed from the color image file is used as it is, the characters displayed on the steel material can be recognized only with a probability of a maximum of 25%. In contrast, when the rotation of the green channel image and the comparison of the reference character image are repeated, the green channel image is always in an upright state as the rotation is repeated, so that the comparison with the reference character image is possible. Characters displayed on the steel material can be recognized with a probability of up to 100%. The same applies to the case where the cross-sectional shape of the steel material is a circle, a triangle, a polygon other than a quadrangle, and other shapes.
本発明は第3に、前記第1の文字認識装置において、前記画像処理手段は、前記鋼材に表示された複数の文字のそれぞれにつき、各文字の表示位置毎に、前記緑色チャンネル画像と前記基準文字画像とを対比して、これら両画像の一致度合いの評価を行うという構成にした。 Thirdly, according to the present invention, in the first character recognition device, the image processing means includes the green channel image and the reference for each of the display positions of each of the plurality of characters displayed on the steel material. In contrast to the character image, the degree of coincidence between these images is evaluated.
鋼材には、予め定められた数の文字が予め定められた配列で表示されている。従って、各文字の認識を各文字の表示位置毎に行わなくては、鋼材に表示された文字の認識を正確に行うことができない。例えば、鋼材に「1,2,3,4,5」の文字がこの順に配列されている場合において、第1桁目の「1」が認識不可で、「2,3,4,5」という文字列が読み出された場合、どの桁の文字が認識不可であったのかを判定できないので、読み出された文字列全体が無意味な文字の羅列になる。これに対して、鋼材に表示された複数の文字のそれぞれについて、各文字の表示位置毎に、画像の一致度合いの評価を行うと、仮に第1桁目の「1」が認識不可である場合には、「?,2,3,4,5」(?は認識不可であることを示す表示)という文字列を表示手段に表示することが可能になるので、第2桁目〜第5桁の文字列については信頼を置くことができ、鋼材の管理を容易なものにすることができる。 A predetermined number of characters are displayed in a predetermined arrangement on the steel material. Therefore, the characters displayed on the steel cannot be accurately recognized unless the characters are recognized for each character display position. For example, when the characters “1, 2, 3, 4, 5” are arranged in this order on the steel material, “1” in the first digit is unrecognizable, “2, 3, 4, 5”. When a character string is read, it is impossible to determine which number of characters was unrecognizable, so the entire read character string becomes a list of meaningless characters. On the other hand, for each of a plurality of characters displayed on the steel material, if the degree of coincidence of the images is evaluated for each character display position, the first digit “1” cannot be recognized. Since the character string “?, 2, 3, 4, 5” (display indicating that “?” Cannot be recognized) can be displayed on the display means, the second to fifth digits are displayed. This string can be trusted, and the management of steel materials can be facilitated.
本発明は第3に、前記第1の文字認識装置において、前記画像処理手段は、前記デジタル画像処理として、前記緑色チャンネル画像に対し、ホールの埋め処理、円形要素での浸食処理、相対位置による並び替え処理を行うという構成にした。 Thirdly, according to the present invention, in the first character recognition device, the image processing means performs, as the digital image processing, a hole filling process, an erosion process with a circular element, and a relative position for the green channel image. It was configured to perform sorting processing.
鋼材の表面には比較的大きな凹凸が形成されているので、紙などに表示された文字を読み取る場合に比べて、文字及び背景に欠陥を生じやすい。従って、緑色チャンネル画像に対してホールの埋め処理及び円形要素での浸食処理を行うと、文字及び背景に生じた欠陥を修復することができるので、鋼材に表示された文字の抽出精度を高めることができる。また、鋼材の表面に刻印にて文字を表示する場合には、文字列が一直線状に整列されず、上下左右にずれやすくなるが、相対位置による並び替え処理を行うと、鋼材の表面に文字列が一直線状に表示されない場合にも、文字の抽出精度を高めることができる。 Since relatively large irregularities are formed on the surface of the steel material, the characters and the background are likely to be defective as compared with the case of reading the characters displayed on paper or the like. Therefore, if the hole filling process and the erosion process with a circular element are performed on the green channel image, it is possible to repair the defects generated in the characters and the background, so that the accuracy of extracting the characters displayed on the steel material is improved. Can do. In addition, when characters are displayed on the surface of the steel material by engraving, the character strings are not aligned in a straight line and are liable to shift vertically and horizontally, but if the sorting process based on the relative position is performed, the characters are displayed on the surface of the steel material. Even when the columns are not displayed in a straight line, the character extraction accuracy can be increased.
本発明の文字認識装置は、カラー画像ファイルから分解された緑色チャンネル画像を用いて鋼材に表示された文字の抽出を行い、この抽出された文字と基準文字画像とを対比することにより鋼材に表示された文字の認識を行うので、鋼材に赤さびが発生している場合にも、その悪影響を受けにくく、文字を正確に認識することができる。 The character recognition device of the present invention extracts characters displayed on a steel material using a green channel image decomposed from a color image file, and compares the extracted characters with a reference character image to display on the steel material. Therefore, even when red rust is generated in the steel material, it is difficult to be adversely affected and the character can be accurately recognized.
以下、本発明に係る文字認識装置の一実施形態につき、図を用いて説明する。本例の文字認識装置は、図1に示すように、読み取り対象物である鋼材Aの文字表示部Bに照明光を照射する照明手段1と、鋼材の文字表示部Bを撮像する撮像手段2と、撮像手段2から入力したカラー画像信号に所要のデジタル画像処理を施して、鋼材Aの文字表示部Bに表示された文字の認識を行う画像処理手段3とから主に構成されている。
Hereinafter, an embodiment of a character recognition device according to the present invention will be described with reference to the drawings. As shown in FIG. 1, the character recognition device of this example includes an illuminating
照明手段1としては、例えば電球、蛍光灯、発光ダイオード、エレクトロルミネッセンスなど、公知に属する任意のものを用いることができるが、鋼材Aの文字表示部Bを均一に照明するため、図1に示すように、例えば枠形に組合わせるなどの工夫をすることが特に望ましい。 As the illuminating means 1, for example, an arbitrary one belonging to publicly known such as a light bulb, a fluorescent lamp, a light emitting diode, and electroluminescence can be used. In order to uniformly illuminate the character display portion B of the steel material A, it is shown in FIG. Thus, it is particularly desirable to devise, for example, a combination with a frame shape.
撮像手段2としては、CCDカメラやCMOSカメラなどのデジタル方式のカメラであって、カラー画像信号を出力するものが用いられる。 As the image pickup means 2, a digital camera such as a CCD camera or a CMOS camera that outputs a color image signal is used.
画像処理手段3は、図2に示すように、撮像手段2との間のデータ通信を行うカメラインタフェース11と、カメラインタフェース11を介して撮像手段2から入力したカラー画像信号を文字表示部Bのカラー画像ファイルとして格納する画像ファイル部12と、文字表示部Bから読み出された文字の評価基準となる基準文字画像を格納する基準文字画像記憶部13と、画像ファイル部12に格納された画像ファイルと基準文字画像記憶部13に格納された基準文字画像を対比して、文字表示部Bから読み出された文字の認識を行う文字認識部14と、文字認識部14で実行する文字認識処理に必要な各種のパラメータが格納された初期設定ファイル15と、画像処理用の各種のアプリケーションソフトウエアが格納された画像処理ライブラリ16と、文字認識部14によって求められた文字認識結果を格納する認識結果ファイル17とを備えている。なお、本例の画像処理手段3においては、基準文字画像記憶部13に0〜9までの数字が記憶されており、初期設定ファイル15に、評価すべき文字列(数列)の桁数と、文字認識部14において文字を認識したと評価するための、画像ファイルから抽出された文字と基準文字画像との一致率である評価率と、文字の高さ、幅、面積などの1文字ごとの領域に分解するための値である特徴量とが記憶されている。
As shown in FIG. 2, the
また、この画像処理手段3には、読み取り対象物である鋼材Aの文字表示部Bに応じたパラメータを初期設定ファイル15から文字認識部14に読み出すと共に、読み取り対象物である鋼材Aの文字表示部Bに応じたアプリケーションソフトウエアを画像処理ライブラリ16から文字認識部14に読み出すための入力手段18が備えられる。なお、図2の例においては、入力手段18としてキーボート21及びマウス22が挙げられているが、本発明の要旨はこれに限定されるものではなく、公知に属するその他任意の入力装置を用いることができる。
Further, the image processing means 3 reads out parameters corresponding to the character display part B of the steel material A, which is the reading object, from the
さらに、この画像処理手段3には、文字認識部14で認識された文字や、文字認識部14で文字が認識されなかった場合のエラーマークなどを表示する表示手段19が備えられる。この表示手段19としては、液晶ディスプレイ、プラズマディスプレイ、有機ELディスプレイ及びLEDディスプレイなどの公知に属する任意の表示装置を用いることができる。
Further, the image processing means 3 is provided with a display means 19 for displaying a character recognized by the
なお、図2の例では、入力手段18及び表示手段19が画像処理手段3に内蔵されているが、本発明の要旨はこれに限定されるものではなく、入力手段18及び表示手段19のいずれか一方又は双方を、画像処理手段3に対して外付けする構成とすることもできる。
In the example of FIG. 2, the
以下、画像処理手段3において実行される文字認識処理のアルゴリズムを、図3乃至図8に基づいて説明する。 Hereinafter, the algorithm of the character recognition process performed in the image processing means 3 will be described with reference to FIGS.
図3は、前処理のアルゴリズムで、画像ファイル部12に記憶されたログファイルの初期化(ステップS1)、画像ファイル部12に記憶する画像ファイル名の作成(ステップS2)、画像ファイル部12からの1枚目の画像ファイルの読み込みと、表示手段19に表示する画像の縦横比の決定(ステップS3)、システムの再起動(ステップS4)及び必要なルックアップテーブルの変更(ステップS5)をこの順に行って、図4に示す処理(1)に移行する。
FIG. 3 shows a preprocessing algorithm for initializing a log file stored in the image file unit 12 (step S1), creating an image file name stored in the image file unit 12 (step S2), and from the
図4に示す処理(1)は、文字認識アルゴリズムの前半部分であり、図3の処理が終了した後に各画像ファイル毎のループを開始する(ステップS6)。各画像ファイルの文字認識に当たっては、基準文字画像の配列及び認識文字領域の配列を初期化(ステップS7)した後、画像ファイル部12から1枚分の画像ファイルを読み込んで(ステップS8)、当該1枚分の画像ファイルを赤色チャンネル画像(R)、緑色チャンネル画像(G)及び青色チャンネル画像(B)の各チャンネル画像に分解し、緑色チャンネル画像を使用して文字の切り出しを行う(ステップS9)。このように、緑色チャンネル画像を使用することにより、鋼材Aに赤さびが生じた場合にも、その影響を除くことができて、文字の切り出しを容易に行うことができる。 The process (1) shown in FIG. 4 is the first half of the character recognition algorithm, and a loop for each image file is started after the process of FIG. 3 is completed (step S6). In character recognition of each image file, after initializing the arrangement of the reference character image and the arrangement of the recognized character area (step S7), one image file is read from the image file section 12 (step S8), One image file is decomposed into channel images of a red channel image (R), a green channel image (G), and a blue channel image (B), and characters are cut out using the green channel image (step S9). ). In this way, by using the green channel image, even when red rust is generated in the steel material A, the influence can be eliminated and the character can be easily cut out.
次いで、入力手段18を操作することによって初期設定ファイル15から選択された画像ファイルの回転角度に従い、緑色チャンネル画像の回転を繰り返す(ステップS10)。例えば、鋼材Aが四角形である場合には、90°刻みで0°から270°まで、4回緑色チャンネル画像の回転を行う。これにより、文字列分布の判定及び文字の向きの判定を行うことができる。そして、文字列分布及び文字の向きが規準画像記憶部13に記憶された文字列分布及び文字の向きと一致したと判定された段階で、ステップS11に移行し、各画像単位毎の動的閾値の判定処理を実行する。この動的閾値の判定処理は、入力手段18を操作することによって初期設定ファイル15から選択された二値化閾値の開始閾値から終了閾値までを用いて、緑色チャンネル画像の2値化を繰り返すことにより行われる。しかる後に、図5に示す処理(2)に移行する。
Next, the green channel image is repeatedly rotated according to the rotation angle of the image file selected from the
図5に示す処理(2)においては、ステップS10で判定された文字列分布及び文字の向きに従って緑色チャンネル画像の回転を行い(ステップS12)、次いで文字の微少な傾き補正を行った後(ステップS13)、ステップS11で判定された画像単位の動的閾値に従って緑色チャンネル画像を2値化する(ステップS14)。管理対象物である鋼材Aの表面には比較的大きな凹凸があるので、ステップS14で生成された画像には、文字欠けやノイズが表れやすい。そこで、領域の特徴量でのホール(文字のエッジ部分や文字内の欠けた部分)の埋め処理(ステップS15)及び円形要素での浸食処理(ステップS16)を行い、ホールの補間及びノイズの除去を行う。 In the process (2) shown in FIG. 5, the green channel image is rotated according to the character string distribution and the character orientation determined in step S10 (step S12), and then the character is subjected to slight inclination correction (step S12). S13), the green channel image is binarized according to the dynamic threshold of the image unit determined in step S11 (step S14). Since there are relatively large irregularities on the surface of the steel material A, which is the management object, missing characters and noise are likely to appear in the image generated in step S14. Therefore, hole filling (step S15) and erosion processing with a circular element (step S16) are performed by the feature amount of the region (step S15) and circular elements are eliminated, and noise is removed. I do.
なお、「領域の特徴量」とは、ホールを補間するための特徴量であり、一例としては面積、楕円の短径及び長径、内接円、外接円などの最小値と最大値であって、初期設定ファイル15に格納されており、入力手段18を操作することによって選択される。ステップS15の埋め処理を施すことにより、図6(a)に示すように、文字21内にホール22が表れた場合にも、予め選択された領域の特徴量の最小値と最大値の間のサイズのホール22が埋められ、抽出された文字21がより確からしいものになる。図6(a)は、領域の特徴量として、面積の最小値1.0mm2、面積の最大値10.0mm2が選択され、文字21内に表れた5.0mm2のホール22が埋め処理された状態を示している。
The “region feature amount” is a feature amount for interpolating a hole, and as an example, it is a minimum value and a maximum value such as area, ellipse minor axis and major axis, inscribed circle, circumscribed circle, etc. Are stored in the
また、「円形要素」とは、ノイズを除去するための特徴量であり、一例としては円の半径であって、初期設定ファイル15に格納されており、入力手段18を操作することによって選択される。ステップS16の浸食処理を行うことにより、図6(b)に示すように、文字21の背景部分にノイズ23が表れた場合にも、予め選択された円形要素のサイズよりも小さなノイズが除去され、抽出された文字21がより確からしいものになる。図6(b)は、円形要素として、半径2.0mmが選択され、文字21内に表れた半径1.5mmのノイズが除去された状態を示している。なお、半径3.0mmの画像については、文字の一部である可能性が高いので、そのまま放置する。
The “circular element” is a feature amount for removing noise. For example, the “circular element” is a radius of a circle, which is stored in the
次いで、ステップS17に移行し、領域の連結成分を計算する。これにより、図6(c)に示すように、画像ファイル中の各文字が抽出される。 Next, the process proceeds to step S17, and the connected components of the region are calculated. Thereby, as shown in FIG.6 (c), each character in an image file is extracted.
次いで、ステップS18に移行し、文字の形状特徴量に基づいて領域を選択する。ここで「文字の形状特徴量」とは、文字に幅と高さとを指定するものであって、初期設定ファイル15に格納されており、入力手段18を操作することによって選択される。例えば、図6(d)に示すように、「文字の形状特徴量」として、幅の最小値が5mm、幅の最大値が10mm、高さの最小値が15mm、高さの最大値が20mmが選択されている場合においては、幅が3mmで高さが10mmの文字及び幅が5mmで高さが10mmの文字は無視され、所定サイズの文字のみが抽出される。
Next, the process proceeds to step S18, and a region is selected based on the character shape feature amount. Here, the “character shape feature amount” designates the width and height of the character, is stored in the
次いで、円形要素を用いた再度の浸食処理(ステップS19)と、領域の連結成分の計算(ステップS20)を行った後、図6(e)に示すように、文字部分の領域と画像全体の領域との公差領域を計算する(ステップS21)。また、前述の形状特徴量に基づいて文字の領域を選択し(ステップS22)、文字の領域をその相対位置によって並び替える(ステップS23)。例えば、図6(f)に示すように、文字の表示位置に高低がある場合、各文字領域の左上隅の位置を比較し、各文字領域の高さ位置が一列に揃うように文字の領域を並び替える。これにより、基準文字列との比較が容易になる。鋼材Aにポンチなどを用いて刻印文字を表示する場合には、文字列を一列に揃えて鋼材Aに表示することが困難であるので、この並べ替え処理は、特に有効である。 Next, after performing the erosion process again using the circular element (step S19) and the calculation of the connected components of the area (step S20), as shown in FIG. A tolerance area with the area is calculated (step S21). Further, a character region is selected based on the above-described shape feature amount (step S22), and the character region is rearranged according to its relative position (step S23). For example, as shown in FIG. 6F, when the character display position is high or low, the positions of the upper left corners of the character areas are compared, and the character areas are arranged so that the height positions of the character areas are aligned. Sort by. This facilitates comparison with the reference character string. In the case where the stamped characters are displayed on the steel material A using a punch or the like, it is difficult to display the characters on the steel material A by aligning the character strings in one line, so this rearrangement process is particularly effective.
しかる後に、ステップS24に移行して文字認識を行い、認識された文字データを文字認識部14内のデータ記憶部(図示省略)に格納する。ステップS12からステップS25までの処理は、ステップS11の2値化閾値ループが完了したとステップS26で判定されるまで、及びステップS10の回転角度毎のループが完了したとステップS27で判定されるまで繰り返され、ステップS26及びステップS27でそれぞれループが完了したと判定された場合には、図7に示す処理(3)に移行する。
Thereafter, the process proceeds to step S24, character recognition is performed, and the recognized character data is stored in a data storage unit (not shown) in the
図7に示す処理(3)は、文字認識アルゴリズムの後半部分であり、図5及び図6の処理が終了した後に、認識文字領域の配列毎のループを開始する(ステップS28)。次いで、ステップS29に移行し、各認識文字領域の配列毎の認識数、即ち、認識文字領域における文字の桁数をチェックする。これにより、文字列を構成する文字の桁数を考慮した文字の認識の認識が可能になり、認識した文字列の信頼性を高めることができる。なお、本例においては、認識文字領域の配列毎の認識数を「8」、「9」、「10」、「7」、「6」、「5」、「4」、「3」、「2」、「1」の順でループする。このような順で各認識文字領域の配列毎の認識数を検出するのは、鋼材Aに表示される文字数は8桁、9桁、10桁及び7桁が多いためである。この処理は、認識文字領域の平均評価率が最小平均評価率になるまで、繰り返される(ステップS30及びステップS31)。 The process (3) shown in FIG. 7 is the latter half of the character recognition algorithm. After the processes in FIGS. 5 and 6 are completed, a loop for each arrangement of recognized character areas is started (step S28). Next, the process proceeds to step S29, where the number of recognized characters for each recognized character area, that is, the number of characters in the recognized character area is checked. Thereby, the recognition of the character recognition in consideration of the number of digits of the characters constituting the character string can be performed, and the reliability of the recognized character string can be improved. In this example, the recognition number for each arrangement of the recognized character area is set to “8”, “9”, “10”, “7”, “6”, “5”, “4”, “3”, “ Loop in the order of “2” and “1”. The reason why the recognition number for each arrangement of the recognized character areas is detected in this order is that the number of characters displayed on the steel material A is large in 8 digits, 9 digits, 10 digits, and 7 digits. This process is repeated until the average evaluation rate of the recognized character area reaches the minimum average evaluation rate (steps S30 and S31).
ステップS30で、認識文字領域の平均評価率が最小平均評価率よりも大きいと判定された場合には、ステップS32に移行して、文字データのチェックフラグをONにする(ステップS32)。そして、ステップS29における文字の桁数のチェックが終了した後は、ステップS33に移行し、チェックフラグがONであるか否かが判定される。チェックフラグが、ONでない場合には、ステップS34に移行して、ステップS28の認識文字の領域配列毎のループが終了したか否かの判定を行い、チェックフラグがONである場合には、ステップS35に移行して、抽出するデータがあるか否かの判定を行う。ステップS34で認識文字の領域配列毎のループが終了したと判定した場合も同様である。 If it is determined in step S30 that the average evaluation rate of the recognized character area is larger than the minimum average evaluation rate, the process proceeds to step S32, and the check flag for character data is turned ON (step S32). After the check of the number of characters in step S29 is completed, the process proceeds to step S33, and it is determined whether or not the check flag is ON. If the check flag is not ON, the process proceeds to step S34 to determine whether or not the loop for each recognized character area array in step S28 is completed. If the check flag is ON, step S34 is performed. The process proceeds to S35 to determine whether there is data to be extracted. The same applies to the case where it is determined in step S34 that the loop for each recognized character area array has been completed.
ステップS35で、抽出するデータがあると判定した場合は、ステップS36に移行し、基準文字画像記憶部13からの基準文字の取得と、図示しないデータ記憶部に格納された文字データからの抽出すべき文字認識領域の取得(ステップS37)と、これらを対比しての文字認識(ステップS38)とを行う。なお、ステップS35で、抽出するデータがないと判定した場合は、図4のステップS6に戻る。
If it is determined in step S35 that there is data to be extracted, the process proceeds to step S36, where reference characters are acquired from the reference character
図8に示す処理(4)は、文字認識アルゴリズムの後半部分であり、まず認識した文字データをその文字数だけループしながら(ステップS39)、各文字データについて、評価率、即ち、認識した文字データと基準文字画像との一致度合いを評価する(ステップS40)。ステップS40で、評価率が、初期設定ファイル15に格納され、入力手段18を操作することによって選択された最小評価率よりも大きいと判定した場合は、文字認識領域から各桁毎の文字を選択して(ステップS41)、その文字を最終の文字認識領域配列に追加する(ステップS42)。ステップS40で、評価率が最小評価率よりも小さいと判定した場合は、ステップS43で文字データのループが終了したと判定するまで、ステップS39以降の処理を繰り返す。
The process (4) shown in FIG. 8 is the latter half of the character recognition algorithm. First, while the recognized character data is looped by the number of characters (step S39), the evaluation rate, that is, the recognized character data is obtained for each character data. And the matching degree of the reference character image are evaluated (step S40). If it is determined in step S40 that the evaluation rate is greater than the minimum evaluation rate stored in the
ステップS43で、全ての文字データについてのループが終了したと判定した場合は、ステップS44に移行して最終の文字領域配列で文字認識を行い、ステップS45で、チェックフラグがOFFであるか否かを判定する。ステップS45で、チェックフラグがOFFでないと判定した場合は、認識結果を表示手段19に表示すると共に、図示しない文字認識部14内のデータ記憶部に格納する(ステップS46)。ステップS45でチェックフラグがONであると判定した場合、及びステップS47で全ての画像ファイルについてのループが終了していないと判定した場合は、図4のステップS6に戻る。 If it is determined in step S43 that the loop for all character data has been completed, the process proceeds to step S44, where character recognition is performed with the final character area array, and whether or not the check flag is OFF in step S45. Determine. If it is determined in step S45 that the check flag is not OFF, the recognition result is displayed on the display means 19 and stored in a data storage unit in the character recognition unit 14 (not shown) (step S46). If it is determined in step S45 that the check flag is ON, and if it is determined in step S47 that the loop for all image files has not ended, the process returns to step S6 in FIG.
鋼材Aの文字表示部Bに合計8桁の文字が3段に分けて表示されており、第1段目が5桁、第2段目が2桁、第3段目が1桁であるとした場合、全ての文字が認識できたときには、図2(a)に示すように、表示手段19には、第1桁〜第8桁の文字が3段に分けて表示される。また、各段に含まれる各桁の文字のうち、認識できなかったものについては、図2(b)に示すように、認識できなかったことを示すマーク「?」が、該当する段の該当する桁に表示される。このようにすることにより、他の認識できた文字についての信頼度を高めることができる。 The character display part B of the steel material A is displayed with a total of 8 digits divided into 3 levels, the first level is 5 digits, the second level is 2 digits, and the third level is 1 digit In this case, when all the characters are recognized, as shown in FIG. 2 (a), the display means 19 displays the first to eighth digit characters in three stages. In addition, as shown in FIG. 2 (b), the mark “?” Indicating that the character was not recognized among the characters of each digit included in each step is indicated by the corresponding step. It is displayed in the digit. By doing so, the reliability of other recognized characters can be increased.
本例の文字認識装置は、かかる構成を有するので、赤さびや表面の凹凸に影響されることなく、鋼材Aに表示された文字を正確に認識することができる。 Since the character recognition device of this example has such a configuration, it is possible to accurately recognize the characters displayed on the steel material A without being affected by red rust or surface irregularities.
本発明は、鋼材に表示された刻印文字などを認識するのに特に適した文字認識装置に利用できる。 INDUSTRIAL APPLICABILITY The present invention can be used for a character recognition device particularly suitable for recognizing stamped characters displayed on steel materials.
1 照明手段
2 撮像手段
3 画像処理手段
11 カメラインタフェース
12 画像ファイル部
13 基準文字画像記憶部
14 文字認識部
15 初期設定ファイル
16 画像処理ライブラリ
17 認識結果ファイル
18 入力手段
19 表示手段
A 鋼材
B 文字表示部
DESCRIPTION OF
Claims (4)
前記画像処理手段は、前記カラー画像信号から前記文字表示部のカラー画像を作成した後、このカラー画像を赤色チャンネル画像、緑色チャンネル画像及び青色チャンネル画像の各チャンネル画像に分解し、前記緑色チャンネル画像と予め前記画像処理手段に記憶された基準文字画像とを対比してこれら両画像の一致度合いを評価し、両画像の一致度合いが予め設定された所定値以上である場合には、文字が認識されたものと判定して、その文字を前記表示手段に表示し、前記両画像の一致度合いが前記所定値未満である場合には、前記表示手段に認定不可の表示を行うことを特徴とする文字認識装置。 An image pickup means for picking up an image of a steel character display section and outputting a color image signal; and a color image signal input from the image pickup means is subjected to necessary digital image processing to recognize a character displayed on the character display section. Image processing means for performing, and display means for displaying the recognition result of the character by the image processing means,
The image processing unit generates a color image of the character display unit from the color image signal, and then decomposes the color image into channel images of a red channel image, a green channel image, and a blue channel image, and the green channel image And a reference character image stored in advance in the image processing means to evaluate the degree of coincidence between these images. If the degree of coincidence between both images is equal to or greater than a predetermined value, the character is recognized. The character is displayed on the display means, and if the degree of coincidence between the two images is less than the predetermined value, the display means displays an unacceptable display. Character recognition device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009044496A JP2010198475A (en) | 2009-02-26 | 2009-02-26 | Character recognition device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009044496A JP2010198475A (en) | 2009-02-26 | 2009-02-26 | Character recognition device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010198475A true JP2010198475A (en) | 2010-09-09 |
Family
ID=42823117
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009044496A Pending JP2010198475A (en) | 2009-02-26 | 2009-02-26 | Character recognition device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010198475A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019203489A1 (en) * | 2018-04-19 | 2019-10-24 | 넷마블 주식회사 | Image preprocessing apparatus and method for character recognition |
KR20190122178A (en) * | 2018-04-19 | 2019-10-29 | 넷마블 주식회사 | Method and apparatus for preprocessing image for recognition of character |
-
2009
- 2009-02-26 JP JP2009044496A patent/JP2010198475A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019203489A1 (en) * | 2018-04-19 | 2019-10-24 | 넷마블 주식회사 | Image preprocessing apparatus and method for character recognition |
KR20190122178A (en) * | 2018-04-19 | 2019-10-29 | 넷마블 주식회사 | Method and apparatus for preprocessing image for recognition of character |
KR102102394B1 (en) | 2018-04-19 | 2020-04-27 | 넷마블 주식회사 | Method and apparatus for preprocessing image for recognition of character |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2007317184A (en) | Two-dimensional bar code, and encoding and decoding method thereof | |
CN110175997B (en) | Display screen dead pixel detection method and device, computer equipment and storage medium | |
TW201432576A (en) | Two-dimensional code, system for creation of two-dimensional code, and analysis program | |
TWI501159B (en) | QR code | |
US7333656B2 (en) | Image processing method and image processing apparatus | |
WO2015002719A1 (en) | Method of improving contrast for text extraction and recognition applications | |
JP2010198475A (en) | Character recognition device | |
JP5609433B2 (en) | Inspection method for cylindrical containers | |
WO2023108545A1 (en) | Method for constructing defect detection model of micro led array panel, apparatures for dectectig pixel defect and devices | |
JP4392907B2 (en) | Character extraction method | |
CN1074302A (en) | Apparatus for reading marks and information | |
JP2004280334A (en) | Image reading device | |
JP2005165387A (en) | Method and device for detecting stripe defective of picture and display device | |
JP4867903B2 (en) | Image processing program and image processing apparatus | |
JP2010225047A (en) | Noise component removing device, and medium with noise component removing program recorded thereon | |
KR20150107581A (en) | Image processing apparatus and image processing method | |
JP5264956B2 (en) | Two-dimensional code reading apparatus and method | |
WO2013111834A1 (en) | Method for specifying sealed cell of honeycomb filter, manufacturing method, sealed cell-specifying device, manufacturing device, program and recording medium therefor | |
JP5073523B2 (en) | Storage structure of inspection program file for automatic inspection equipment | |
JP2011170882A (en) | Two dimensional code reader and its method | |
JP2010219858A (en) | Noise component removing device, and medium having noise component removing program recorded thereon | |
US20120033889A1 (en) | Image determination apparatus, computer readable medium storing program, and method | |
JP2005339180A (en) | Image processing method | |
JP4986797B2 (en) | Image processing apparatus and image processing method | |
JP2010250408A (en) | Optical information reader |