JP6144892B2 - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP6144892B2
JP6144892B2 JP2012220214A JP2012220214A JP6144892B2 JP 6144892 B2 JP6144892 B2 JP 6144892B2 JP 2012220214 A JP2012220214 A JP 2012220214A JP 2012220214 A JP2012220214 A JP 2012220214A JP 6144892 B2 JP6144892 B2 JP 6144892B2
Authority
JP
Japan
Prior art keywords
image
characters
character
region
determination unit
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
JP2012220214A
Other languages
Japanese (ja)
Other versions
JP2014071866A (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.)
Nidec Sankyo Corp
Original Assignee
Nidec Sankyo Corp
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 Nidec Sankyo Corp filed Critical Nidec Sankyo Corp
Priority to JP2012220214A priority Critical patent/JP6144892B2/en
Publication of JP2014071866A publication Critical patent/JP2014071866A/en
Application granted granted Critical
Publication of JP6144892B2 publication Critical patent/JP6144892B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、画像処理装置、画像処理方法及びプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program.

従来、キャッシュカード、従業者証、社員証、会員証、学生証、外国人登録証及び各種運転免許証等の証明書からOCR(Optical Character Recognition)等により記載事項を画像データとして読み取り、証明書の画像の方向を判定する画像処理装置や記載事項の文字認識等の画像処理を行う画像処理装置がある(特許文献1参照)。
特許文献1に示す運転免許証画像処理装置および方法は、運転免許証画像の特定の位置における画素の階調値を用いて、処理対象である面の画像であるかを判定する技術が提案されている。具体的には、運転免許証の有効期限領域(a領域)と、その領域が運転免許証を上下、左右または表裏に反転した場合に位置する領域(b領域)とを予め設定しておき、有効期限領域内の青色を示す階調値に属する画素の数が、有効期限領域内の全画素数に対して占める割合を各領域ごとに計算し、a領域とb領域での計算結果を比較することによって、読み取った画像が正立画像か倒立画像かまたは反転画像かを判別している。
Conventionally, items such as cash cards, employee ID cards, employee ID cards, membership cards, student ID cards, alien registration cards and various driver's licenses are read as image data by OCR (Optical Character Recognition), etc. There is an image processing apparatus that determines the direction of the image and an image processing apparatus that performs image processing such as character recognition of described items (see Patent Document 1).
The driver's license image processing apparatus and method shown in Patent Document 1 have proposed a technique for determining whether or not an image of a surface to be processed using a gradation value of a pixel at a specific position of the driver's license image. ing. Specifically, the expiry date region (a region) of the driver's license and the region (b region) where the region is located when the driver's license is flipped up and down, left and right or front and back are set in advance, The ratio of the number of pixels belonging to the gradation value indicating blue in the expiration date region to the total number of pixels in the expiration date region is calculated for each region, and the calculation results in the a region and the b region are compared. Thus, it is determined whether the read image is an upright image, an inverted image, or an inverted image.

特開平07−065118号公報Japanese Patent Application Laid-Open No. 07-065118

しかしながら、特許文献1に記載の技術では、複数の領域間で画素数の計数結果を比較するため、例えば、運転免許証の画像データを入力する際、運転免許証を照明する光源のムラや運転免許証が色あせている等の影響を受けやすいという問題がある。
これにより、これらの複数の領域において色合いが似通っていて、有効期限領域の青色である階調値の画素数が、青色でない領域の階調値とほとんど同じであるような場合には正しい判定ができない場合があるという問題がある。
本発明は上述した背景に鑑みてなされたものであり、証明書等を読み取る際に、照明ムラ等の影響を受けにくい画像処理装置、画像処理方法及びプログラムを提供することを目的とする。
However, in the technique described in Patent Document 1, in order to compare the counting results of the number of pixels between a plurality of regions, for example, when inputting image data of a driver's license, unevenness of a light source that illuminates the driver's license or driving There is a problem that the driver's license is easily affected by fading.
As a result, the correct determination is made when the shades are similar in the plurality of regions, and the number of pixels of the gradation value that is blue in the expiration date region is almost the same as the gradation value of the region that is not blue. There is a problem that it may not be possible.
The present invention has been made in view of the above-described background, and an object thereof is to provide an image processing apparatus, an image processing method, and a program that are not easily affected by illumination unevenness or the like when reading a certificate or the like.

上記課題を解決するため、本発明は、各々に一意に割り当てられた識別文字列が記された証明書の画像を、当該証明書に照射される光の反射光に基づいて読み取る画像入力部と、前記画像入力部により読み取られた画像において、前記識別文字列が記されているべき領域からの反射光の分布を検出する検出部と、前記検出部により検出された反射光の分布に従って、前記領域内にある文字の数が予め定められた数であるか否かを判定する文字数判定部と、前記領域内にある文字の数が予め定められた数であると前記文字数判定部によって判定された場合には、前記証明書の画像の方向が正立方向であると判定する画像方向判定部とを具備し、前記文字数判定部は、前記検出された反射光の分布に従って、前記領域内において各文字の中心位置のそれぞれを起点として予め定められた方向に文字の端部を検出するための走査を行うことにより、各中心位置から予め定められた範囲内に文字の端部が含まれるか否かを判定し、当該判定結果に従って、当該領域内にある文字の数が予め定められた数であるかを判定することを特徴とする画像処理装置を提供する。この装置によれば、運転免許証等の証明書を読み取る際に、証明書の画像の方向が正立方向かを判定することができる。 In order to solve the above problems, the present invention provides an image input unit that reads an image of a certificate in which an identification character string uniquely assigned to each certificate is written based on reflected light of light irradiated on the certificate; In the image read by the image input unit, according to the detection unit that detects the distribution of reflected light from the region where the identification character string should be written, and the distribution of the reflected light detected by the detection unit, The number-of-characters determination unit that determines whether or not the number of characters in the area is a predetermined number, and the number-of-characters determination unit determines that the number of characters in the area is a predetermined number. An image direction determination unit that determines that the image direction of the certificate is an erect direction, and the number-of-characters determination unit is arranged in the area according to the distribution of the detected reflected light. Center position of each character By performing scanning to detect the end of the character in a predetermined direction starting from each, it is determined whether or not the end of the character is included within a predetermined range from each center position, In accordance with the determination result, an image processing apparatus is provided that determines whether the number of characters in the area is a predetermined number . According to this apparatus, when a certificate such as a driver's license is read, it can be determined whether the image direction of the certificate is an upright direction.

本発明の好ましい態様において、前記文字数判定部は、前記領域内に等間隔で配置されている文字の数が前記予め定められた数であるか否かを判定してもよい。この装置によれば、運転免許証等の証明書を読み取る際に、証明書の画像の方向が正立方向かを判定することができる。   In a preferred aspect of the present invention, the character number determination unit may determine whether or not the number of characters arranged at equal intervals in the region is the predetermined number. According to this apparatus, when a certificate such as a driver's license is read, it can be determined whether the image direction of the certificate is an upright direction.

本発明の更に好ましい態様において、前記領域内にある文字の数が予め定められた数ではないと前記文字数判定部によって判定された場合には、前記画像入力部により読み取られた画像内の前記領域とは異なる第2の領域について、前記検出部が前記検出を行うとともに、前記文字数判定部が前記判定を行い、前記画像方向判定部は、前記第2の領域内にある文字の数が予め定められた数であると前記文字数判定部によって判定された場合には、前記証明書の画像の方向が倒立方向であると判定してもよい。この装置によれば、運転免許証等の証明書を読み取る際に、証明書の画像の方向が倒立方向かを判定することができる。   In a further preferred aspect of the present invention, when the number-of-characters determination unit determines that the number of characters in the region is not a predetermined number, the region in the image read by the image input unit The detection unit performs the detection for the second region different from the first region, the character number determination unit performs the determination, and the image direction determination unit determines in advance the number of characters in the second region. If the number of characters is determined by the character number determination unit to be the determined number, it may be determined that the direction of the image of the certificate is the inverted direction. According to this apparatus, when a certificate such as a driver's license is read, it can be determined whether the direction of the image of the certificate is an inverted direction.

本発明の更に好ましい態様において、前記画像方向判定部は、前記領域内にある文字の数が予め定められた数でないと前記文字数判定部によって判定され、かつ、前記第2の領域内にある文字の数が予め定められた数でないと前記文字数判定部によって判定された場合には、前記証明書の画像が処理不能画像であると判定してもよい。この装置によれば、運転免許証等の証明書を読み取る際に、証明書の画像が裏面の画像であるかを判定することができる。   In a further preferred aspect of the present invention, the image direction determination unit determines that the number of characters in the area is not a predetermined number, and the character number determination unit determines that the number of characters in the second area. If the number of characters is not a predetermined number, the character number determination unit may determine that the certificate image is an unprocessable image. According to this apparatus, when a certificate such as a driver's license is read, it can be determined whether the image of the certificate is an image on the back side.

また、本発明は、各々に一意に割り当てられた識別文字列が記された証明書の画像を、当該証明書に照射される光の反射光に基づいて読み取る画像入力部を備えるコンピュータが実行する画像方向判別方法であって、前記画像入力部により読み取られた画像において、前記識別文字列が記されているべき領域からの反射光の分布を検出する検出ステップと、前記検出ステップにおいて検出された反射光の分布に従って、前記領域内にある文字の数が予め定められた数であるか否かを判定する文字数判定ステップと、前記領域内にある文字の数が予め定められた数であると前記文字数判定ステップにおいて判定された場合には、前記証明書の画像の方向が正立方向であると判定する画像方向判定ステップとを備え、前記文字数判定ステップにおいては、前記検出された反射光の分布に従って、前記領域内において各文字の中心位置のそれぞれを起点として予め定められた方向に文字の端部を検出するための走査を行うことにより、各中心位置から予め定められた範囲内に文字の端部が含まれるか否かを判定し、当該判定結果に従って、当該領域内にある文字の数が予め定められた数であるかを判定することを特徴とする画像方向判定方法を提供する。この方法によれば、運転免許証等の証明書を読み取る際に、証明書の画像の方向が正立方向かを判定することができる。 Further, the present invention is executed by a computer including an image input unit that reads an image of a certificate in which an identification character string uniquely assigned to each certificate is written based on reflected light of light irradiated on the certificate. An image direction determination method, wherein a detection step of detecting a distribution of reflected light from a region where the identification character string is to be written in an image read by the image input unit, and detection in the detection step According to the distribution of reflected light, a character number determining step for determining whether or not the number of characters in the area is a predetermined number, and the number of characters in the area is a predetermined number If it is determined in said character determination step, the direction of the certificates of the image and an image direction determination step of determining that the erecting direction, contact the character determination step In accordance with the distribution of the detected reflected light, each center is scanned by detecting the end of the character in a predetermined direction starting from each of the center positions of the characters in the region. determines whether include end of characters within a predetermined range from the position, Rukoto be determined in accordance with the determination result, whether the number of characters in the area is a predetermined number An image direction determination method characterized by the above is provided. According to this method, when a certificate such as a driver's license is read, it can be determined whether the image direction of the certificate is an upright direction.

また、本発明は、各々に一意に割り当てられた識別文字列が記された証明書の画像を、当該証明書に照射される光の反射光に基づいて読み取る画像入力部を備えたコンピュータを、前記画像入力部により読み取られた画像において、前記識別文字列が記されているべき領域からの反射光の分布を検出する検出部と、前記検出部により検出された反射光の分布に従って、前記領域内にある文字の数が予め定められた数であるか否かを判定する文字数判定部と、前記領域内にある文字の数が予め定められた数であると前記文字数判定部によって判定された場合には、前記証明書の画像の方向が正立方向であると判定する画像方向判定部として機能させるためのプログラムであって、前記文字数判定部は、前記検出された反射光の分布に従って、前記領域内において各文字の中心位置のそれぞれを起点として予め定められた方向に文字の端部を検出するための走査を行うことにより、各中心位置から予め定められた範囲内に文字の端部が含まれるか否かを判定し、当該判定結果に従って、当該領域内にある文字の数が予め定められた数であるかを判定するプログラムを提供する。このプログラムによれば、運転免許証等の証明書を読み取る際に、証明書の画像の方向が正立方向かを判定することができる。 Further, the present invention provides a computer including an image input unit that reads an image of a certificate in which an identification character string uniquely assigned to each certificate is written based on reflected light of light irradiated on the certificate. In the image read by the image input unit, a detection unit that detects a distribution of reflected light from a region where the identification character string is to be written, and the region according to the distribution of reflected light detected by the detection unit The number-of-characters determination unit that determines whether or not the number of characters in the number is a predetermined number, and the number-of-characters determination unit determines that the number of characters in the region is a predetermined number In this case, the program is a program for causing the certificate image direction to function as an image direction determination unit that determines that the image direction is an erect direction, and the number-of-characters determination unit is configured according to the distribution of the detected reflected light. Previous By performing scanning for detecting the end of the character in a predetermined direction starting from each of the center positions of each character in the region, the end of the character is within a predetermined range from each center position. There is provided a program for determining whether or not a character is included and determining whether or not the number of characters in the area is a predetermined number according to the determination result . According to this program, when a certificate such as a driver's license is read, it can be determined whether the image direction of the certificate is an upright direction.

本発明によれば、運転免許証等の証明書を読み取る際に、証明書の画像の方向を判定することができる。   According to the present invention, when reading a certificate such as a driver's license, the direction of the certificate image can be determined.

実施形態に係る情報処理システムの全体構成を示すブロック図である。It is a block diagram showing the whole information processing system composition concerning an embodiment. 運転免許証の画像の一例を示す図である。It is a figure which shows an example of the image of a driver's license. 情報処理装置のプログラム構成を示すブロック図である。It is a block diagram which shows the program structure of information processing apparatus. CPUによって実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process performed by CPU. CPUによって実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process performed by CPU. 運転免許証の画像の方向が正立方向である場合を説明するための図である。It is a figure for demonstrating the case where the direction of the image of a driver's license is an erect direction. 運転免許証の画像の方向が倒立方向である場合を説明するための図である。It is a figure for demonstrating the case where the direction of the image of a driver's license is an inverted direction. CPUによって実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process performed by CPU. CPUによって実行される処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process performed by CPU. 運転免許証番号の文字列とその文字列の画像から計算される射影パターンの一例を示す図である。It is a figure which shows an example of the projection pattern calculated from the character string of a driver's license number, and the image of the character string. 運転免許証の画像の方向が倒立方向である場合を説明するための図である。It is a figure for demonstrating the case where the direction of the image of a driver's license is an inverted direction. 運転免許証番号の画像の一例を示す図である。It is a figure which shows an example of the image of a driver's license number. 変形例6に係る機能構成の一例を示すブロック図である。10 is a block diagram illustrating an example of a functional configuration according to Modification 6. FIG. 運転免許証番号の文字列の画像から計算される射影パターンの一例を示す図である。It is a figure which shows an example of the projection pattern calculated from the image of the character string of a driver's license number. 斜線除去処理が施された運転免許証番号の画像の一例を示す図である。It is a figure which shows an example of the image of the driver's license number in which the oblique line removal process was performed.

[実施形態]
[構成]
図1は、本実施の形態における(運転免許証)画像処理を実行する画像処理装置100の構成を示すブロック図である。図1において、1は画像の方向判定処理、文字認識処理などを行う画像処理部であり、2は画像を入力するスキャナ等の画像入力部、3は処理後の画像を表示する画像表示部である。
[Embodiment]
[Constitution]
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus 100 that executes (driver's license) image processing according to the present embodiment. In FIG. 1, 1 is an image processing unit that performs image direction determination processing, character recognition processing, and the like, 2 is an image input unit such as a scanner that inputs an image, and 3 is an image display unit that displays the processed image. is there.

画像処理部1において、4は画像入力部2から入力される画像データを記憶する画像メモリ、5は画像入力部2から供給される信号に従って画像データを生成する制御部であり、CPU等からなる。6は画像データを記憶する記憶部である。記憶部6は、RAM(Random Access Memory)、ROM(Read Only Memory)、HDD(Hard Disk Drive)等である。記憶部6には、氏名、住所、運転免許証番号等の項目毎に各領域の画像を抽出するための各領域を示す情報(以下「画像情報抽出情報」という)が格納されている。また、記憶部6には、どの項目の画像情報(画像データ)を抽出するかを選択するための情報(以下「項目選択情報」という)が格納されている。   In the image processing unit 1, 4 is an image memory that stores image data input from the image input unit 2, and 5 is a control unit that generates image data according to a signal supplied from the image input unit 2, and includes a CPU and the like. . A storage unit 6 stores image data. The storage unit 6 is a random access memory (RAM), a read only memory (ROM), a hard disk drive (HDD), or the like. The storage unit 6 stores information (hereinafter referred to as “image information extraction information”) indicating each region for extracting an image of each region for each item such as name, address, and driver's license number. The storage unit 6 stores information for selecting which item of image information (image data) is to be extracted (hereinafter referred to as “item selection information”).

8は文字領域として抽出された領域に対し、文字認識処理を行う文字認識部、9は画像入力部2によって読み取られた画像の方向を判定する画像方向判定部、10は画像表示部3とのインターフェースとなる出力インターフェース(I/F)部である(文字認識部8と画像方向判定部9の処理は制御部5が記憶部6に記憶されているコンピュータプログラムを実行することによって実現されてもよい)。   8 is a character recognition unit that performs character recognition processing on the extracted region, 9 is an image direction determination unit that determines the direction of an image read by the image input unit 2, and 10 is an image display unit 3. An output interface (I / F) unit serving as an interface (the processing of the character recognition unit 8 and the image direction determination unit 9 may be realized by the control unit 5 executing a computer program stored in the storage unit 6. Good).

画像入力部2は運転免許証40に対して照射される光の反射光に基づいて画像読取を行う。画像入力部2は、光電変換して、反射した光量をアナログ電気信号に変換するCCDラインセンサ等の密着型の1次元撮像素子(図示略)と、アナログの信号を256階調の多値(デジタル)画像データに変換するA/D変換器(図示略)と、ノイズ除去、画像の平滑化(画素ごとの濃度値の細かい変動を取り除き、滑らかな画像とする処理)、画像の鮮鋭化(画像の濃度値の変化を強調する処理)などの前処理を行う前処理部(図示略)とを有する。画像表示部3は、ディスプレー等の表示パネルを備える。なお、画像表示部3は、表示パネルに代えてプリンタ等を備える構成であってもよい。   The image input unit 2 performs image reading based on the reflected light of the light emitted to the driver's license 40. The image input unit 2 photoelectrically converts a reflected light amount into an analog electric signal, a close contact type one-dimensional image pickup device (not shown) such as a CCD line sensor, and the analog signal is converted into 256-level multi-value ( Digital) A / D converter (not shown) that converts to image data, noise removal, image smoothing (processing that removes fine fluctuations in density value for each pixel to make a smooth image), image sharpening ( And a preprocessing unit (not shown) for performing preprocessing such as processing for emphasizing a change in density value of an image. The image display unit 3 includes a display panel such as a display. Note that the image display unit 3 may be configured to include a printer or the like instead of the display panel.

図2は、運転免許証40の画像の一例を示す図である。図示のように、運転免許証40には、利用者の氏名や住所、生年月日等の各種情報が枠線f1内に記載されているとともに、識別番号(識別文字列)である運転免許証番号が記載されている。   FIG. 2 is a diagram illustrating an example of an image of the driver's license 40. As shown in the figure, the driver's license 40 includes various information such as the user's name, address, date of birth, etc. in the frame f1, and a driver's license that is an identification number (identification character string). The number is written.

図3は、(運転免許証)画像処理部1の機能構成を示すブロック図である。図において、画像方向判定部9は、画像入力部2によって読み取られた運転免許証の画像が処理可能な画像(処理対象となる面の画像)か否かを判定する。情報記録領域設定部91は、住所、氏名、免許証番号等を記載するための領域(以下「情報記録領域」という)を設定する。射影計算部92は、情報記録領域を示す枠線f1を、水平方向及び垂直方向における濃度ヒストグラムを算出して検出する。なお、射影計算部92は、枠線f1がない場合には運転免許証の端を検出してもよい。また、搬送時の搬送手段のガイド面(運転免許証40を搭載する面)に色等をつけて運転免許証との境界位置を明確にしてもよい。射影計算部92は、識別文字列が記されているべき領域からの反射光の分布を検出する検出部の一例である。   FIG. 3 is a block diagram showing a functional configuration of the (driver's license) image processing unit 1. In the figure, the image direction determination unit 9 determines whether or not the driver's license image read by the image input unit 2 is a processable image (image of a surface to be processed). The information recording area setting unit 91 sets an area (hereinafter referred to as “information recording area”) for describing an address, name, license number, and the like. The projection calculation unit 92 detects the frame line f1 indicating the information recording area by calculating density histograms in the horizontal direction and the vertical direction. The projection calculation unit 92 may detect the end of the driver's license when there is no frame line f1. Further, the boundary position with the driver's license may be clarified by coloring the guide surface (surface on which the driver's license 40 is mounted) of the conveying means at the time of conveyance. The projection calculation unit 92 is an example of a detection unit that detects a distribution of reflected light from a region where an identification character string is to be written.

画像情報抽出部93は、予め設定されている領域P1又は領域P2の画像情報(画像データ)を画像メモリ4から抽出する。画像情報抽出部93は、射影計算部92によって検出された枠線f1(の画素位置)を基準として、領域P1(又は領域P2)の四隅の画素の位置等を指定する。   The image information extraction unit 93 extracts the image information (image data) of the preset region P1 or region P2 from the image memory 4. The image information extraction unit 93 specifies the positions of the pixels at the four corners of the region P1 (or region P2) with reference to the frame line f1 (pixel position thereof) detected by the projection calculation unit 92.

外形矩形領域設定部94は、高さ方向の位置を切り出す。外形矩形領域設定部94は、画像情報抽出部93によって算出された濃度ヒストグラムを用いて領域P1(又は領域P2)から免許証番号(文字列)の両端の位置を切り出す。具体的には、外形矩形領域設定部94は、水平方向に配列した各画素の垂直方向における濃度ヒストグラムから検出する。画像情報抽出部93は、領域P1(または領域P2)に該当する画像メモリ4の画像情報(画像データ)について算出する。これに対し、射影計算部92は、運転免許証40の外形と情報記録領域を示す枠線f1(及びその近傍)までの範囲を算出する。換言すると、射影計算部92は、画像メモリ4に取り込まれた運転免許証40全体の画像情報(画像データ)については射影を行わない。   The outline rectangular area setting unit 94 cuts out a position in the height direction. The outline rectangular area setting unit 94 cuts out the positions of both ends of the license number (character string) from the area P1 (or area P2) using the density histogram calculated by the image information extraction unit 93. Specifically, the outline rectangular area setting unit 94 detects from the density histogram in the vertical direction of each pixel arranged in the horizontal direction. The image information extraction unit 93 calculates the image information (image data) in the image memory 4 corresponding to the region P1 (or region P2). On the other hand, the projection calculation unit 92 calculates the range up to the outline f1 of the driver's license 40 and the frame line f1 (and the vicinity thereof) indicating the information recording area. In other words, the projection calculation unit 92 does not perform projection on the image information (image data) of the entire driving license 40 taken into the image memory 4.

両端文字抽出部95は、両端の文字を抽出する。両端の各文字の中心位置検出部96は、両端の各文字の中心位置を検出する。全文字中心位置検出部97は、左端文字の中心位置と右端文字の中心位置との差を求め、その差を11等分する(12文字であるため。)各文字両端位置検出部98は、左から2番目の文字から右端の1つ手前の文字までの各文字について、各文字の両端位置を検出する。文字数計数部99は、文字の両端位置が所定の範囲(文字幅)に入っているのかどうかを判定する。   The both-end character extraction unit 95 extracts characters at both ends. The center position detector 96 of each character at both ends detects the center position of each character at both ends. The all character center position detection unit 97 obtains the difference between the center position of the leftmost character and the center position of the rightmost character, and divides the difference into 11 equal parts (since it is 12 characters). For each character from the second character from the left to the character immediately before the right end, both end positions of each character are detected. The character count unit 99 determines whether or not both end positions of the characters are within a predetermined range (character width).

文字数判定部89は、切り出された文字に従って、識別文字列が記されているべき領域内にある文字の数が予め定められた数であるか否かを判定する。文字数判定部89は、識別文字列が記されているべき領域内にある文字の数が予め定められた数であると文字数判定部によって判定された場合には、証明書の画像の方向が正立方向であると判定する。   The number-of-characters determination unit 89 determines whether the number of characters in the area where the identification character string is to be written is a predetermined number according to the cut out characters. The character number determination unit 89 determines that the orientation of the certificate image is correct when the character number determination unit determines that the number of characters in the area where the identification character string is to be written is a predetermined number. It is determined that the direction is vertical.

文字認識部8は、画像入力部2によって読み取られた画像から文字を認識する(なお、詳細は、特開2008−250754号公報参照)。文字認識部8では、まず、2値化が行われる。より具体的には、文字認識部8の文字列切り出し部81は、記憶部6に記憶された項目選択情報に従って項目を選択するとともに、記憶部6に記憶された画像情報抽出情報に従って、選択した項目に対応する領域を特定する。文字列切り出し部81は、特定した領域に対応する画像データを画像メモリ(図示略)から読み出して、その画像データが多階調の濃淡画像である場合には、白黒2値の画像に変換を行う。なお、この画像メモリは、RAM、SDRAM、DDRSDRAM、RDRAMなど、画像データを記憶しうるものであれば如何なるものであってもよい。また、2値化するにあたっては、適当な方法によって閾値を求めるものとする。さらに、今後の処理では、この白黒2値化画像を用いることとする。文字列切り出し部81は、画像入力部2により読み取られた画像において、識別文字列が記されているべき領域からの反射光の分布を検出することによって文字列の画像データを検出する。文字列切り出し部81は本発明に係る検出部の一例である。   The character recognition unit 8 recognizes a character from the image read by the image input unit 2 (for details, refer to JP 2008-250754 A). In the character recognition unit 8, first, binarization is performed. More specifically, the character string cutout unit 81 of the character recognition unit 8 selects an item according to the item selection information stored in the storage unit 6 and selects it according to the image information extraction information stored in the storage unit 6. Identify the area corresponding to the item. The character string cutout unit 81 reads image data corresponding to the specified area from an image memory (not shown), and converts the image data into a monochrome binary image when the image data is a multi-tone grayscale image. Do. The image memory may be any memory such as RAM, SDRAM, DDRSDRAM, and RDRAM as long as it can store image data. Further, when binarizing, the threshold value is obtained by an appropriate method. Further, this black and white binarized image will be used in future processing. The character string cutout unit 81 detects the image data of the character string by detecting the distribution of reflected light from the region where the identification character string should be written in the image read by the image input unit 2. The character string cutout unit 81 is an example of a detection unit according to the present invention.

次いで、文字切り出しが行われる。より具体的には、文字切り出し部82は、文字列切り出し部81によって検出された文字列の画像データについて、垂直方向に射影計算を行う。そして、求められた垂直射影プロファイルを用いて、文字と文字との間のスペースを識別し、文字の切り出しを行う。なお、詳細については後述する。この処理により、認識対象となっている文字の外接矩形領域(上下左右の座標値)が求められる。   Next, character segmentation is performed. More specifically, the character cutout unit 82 performs projection calculation in the vertical direction on the image data of the character string detected by the character string cutout unit 81. Then, using the obtained vertical projection profile, the space between the characters is identified, and the characters are cut out. Details will be described later. By this process, a circumscribed rectangular area (up / down / left / right coordinate values) of the character to be recognized is obtained.

次いで、特徴抽出が行われる。より具体的には、特徴抽出部83は、上述した外接矩形領域を任意のサブ領域に分割(例えば、1個の外接矩形領域を5×5の領域に分割し、そのうち1個の領域をサブ領域とする)し、各サブ領域において、サブ領域内の全画素数に占める黒画素数の割合を求め、それらを要素とする特徴ベクトルを生成する。   Next, feature extraction is performed. More specifically, the feature extraction unit 83 divides the circumscribed rectangular area described above into arbitrary sub areas (for example, divides one circumscribed rectangular area into 5 × 5 areas, and subdivides one area into sub areas. In each sub-region, the ratio of the number of black pixels to the total number of pixels in the sub-region is obtained, and a feature vector having these as elements is generated.

次いで、特徴比較が行われる。より具体的には、特徴比較部84は、特徴抽出部83で求められた特徴ベクトルを、あらかじめこの媒体で使用される全文字について求めておいた基準特徴ベクトルと比較して、類似度(例えば正規化相関係数)が最も高いものをその文字が該当する候補文字に設定する。なお、基準特徴ベクトルは、予め特徴辞書格納部85に格納されているものであって、特徴比較が行われる際に、特徴辞書格納部85から類似度が高い文字のデータが読み出され、特徴比較が行われる。   A feature comparison is then performed. More specifically, the feature comparison unit 84 compares the feature vector obtained by the feature extraction unit 83 with the reference feature vector obtained in advance for all characters used in the medium, and compares the similarity (for example, A character having the highest normalized correlation coefficient is set as a candidate character corresponding to the character. The reference feature vector is stored in advance in the feature dictionary storage unit 85. When feature comparison is performed, character data having a high similarity is read from the feature dictionary storage unit 85, and the feature feature vector is read. A comparison is made.

最後に、文字認識が行われる。より具体的には、類似文字認識部86は、特徴比較部84によって設定された候補文字を、媒体に用いられた文字として認識する。なお、類似度が一定値を超える候補文字が複数個存在する場合には、文字認識を行うことができないので、類似文字認識部86において、特徴ベクトルから導き出せる2次的な特徴量を利用して、類似文字の判別を行う。例えば、任意に分割したサブ領域を左側半分と右側半分との2領域の左右線対称に分けて、部分特徴ベクトルを構成してそれらの間の類似性を調べたり、同様に上半分と下半分との2領域の上下線対称に分けて、類似性を調べたりしてもよい。また、左右線対称や上下線対称と同様に点対称で類似性を調べてもよい。   Finally, character recognition is performed. More specifically, the similar character recognition unit 86 recognizes the candidate character set by the feature comparison unit 84 as a character used for the medium. Note that when there are a plurality of candidate characters whose similarity exceeds a certain value, character recognition cannot be performed. Therefore, the similar character recognition unit 86 uses secondary feature amounts that can be derived from feature vectors. Then, similar characters are discriminated. For example, arbitrarily divided sub-regions are divided into left and right half symmetry of the left half and right half, and partial feature vectors are constructed to examine the similarity between them, and similarly the upper half and lower half It is also possible to investigate the similarity by dividing the two areas into the vertical line symmetry. Similarity may be examined by point symmetry similar to left-right line symmetry and vertical line symmetry.

[動作]
次に、本実施形態の動作について図面を参照しつつ説明する。4は、画像処理部1及び画像入力部2が行う処理の手順を示すフローチャートである。画像処理部1は、運転免許証に記載されている12文字の運転免許証番号を読み取り、文字コードに変換し文字認識を行うことを主な処理としている。この処理は、図1に示す画像入力部2に運転免許証40が差し込まれることを契機として開始される。画像入力部2は運転免許証40が差し込まれる差込口(図示略)を有しており、利用者によって運転免許証40が画像入力部2に差し込まれると、差し込まれた運転免許証40は、媒体搬送機構(図示略)の搬送ガイドに沿って搬送され、撮像素子(図示略)を通過することによって、その画像データが光電変換され、A(analog)/D(digital)変換された後、画素毎に多階調(例えば、256階調)の輝度値が画像メモリ(図示略)に取り込まれる。これにより、読み取られた画像に含まれる各画素の輝度値が画像メモリ(図示略)に記憶される(ステップS1)。
[Operation]
Next, the operation of this embodiment will be described with reference to the drawings. 4 is a flowchart illustrating a procedure of processes performed by the image processing unit 1 and the image input unit 2. The image processing unit 1 mainly reads a 12-character driver's license number written on the driver's license, converts it into a character code, and performs character recognition. This process is started when the driver's license 40 is inserted into the image input unit 2 shown in FIG. The image input unit 2 has an insertion port (not shown) into which the driver's license 40 is inserted. When the driver's license 40 is inserted into the image input unit 2 by the user, the inserted driver's license 40 is After being transported along a transport guide of a medium transport mechanism (not shown) and passing through an image sensor (not shown), the image data is photoelectrically converted and A (analog) / D (digital) converted. The luminance values of multiple gradations (for example, 256 gradations) are taken into the image memory (not shown) for each pixel. Thereby, the luminance value of each pixel included in the read image is stored in the image memory (not shown) (step S1).

画像方向判定部9は、画像入力部2によって読み取られた運転免許証40画像全体の画像データについて全体の射影を検出し、X方向(水平方向)射影、Y方向(垂直方向)射影を求め、運転免許証のエッジを検出することによって、運転免許証40の画像の領域を特定する。   The image direction determination unit 9 detects the overall projection of the image data of the entire driver's license 40 image read by the image input unit 2, and obtains an X direction (horizontal direction) projection and a Y direction (vertical direction) projection, By detecting the edge of the driver's license, the region of the image of the driver's license 40 is specified.

次いで、画像方向判定部9は、画像入力部2に差し込まれた運転免許証40の画像の方向(すなわち差し込まれた運転免許証40の画像の方向が正立方向であるか、倒立方向であるか、又は画像が裏面画像であるか)を判定する(ステップS2)。
方向を判定する所定の領域P1またはP2は、運転免許証の運転免許証番号が記載されている領域である。図2に示すように、運転免許証番号は、0〜9までの数字の12文字(12桁数)で構成されている。例えば、図2に示す運転免許証40では、第 123456789030 号で運転免許証番号が表されている。なお、説明する上で、最右端の数字「0」を1桁目の数字として、c(1)とし、最左端の数字「1」を12桁目の数字として、c(12)とし、その間の数字を、右端から、c(2)、c(3)・・・・・c(11)とする。この実施形態では、図2に示すような、領域P1に運転免許証番号が存在するような画像の方向を「正立方向」と呼び、一方、画像が180度回転した状態で運転免許証番号が領域P2に位置するような画像の方向を「倒立方向」と呼ぶ。
画像方向判定部9は、領域P1及び領域P2に運転免許証番号に相当する文字がない(文字数がない)場合には、取得した画像データは運転免許証40の裏面または運転免許とは異なる媒体であると判定する。
Next, the image direction determination unit 9 has the direction of the image of the driving license 40 inserted into the image input unit 2 (that is, the direction of the image of the inserted driving license 40 is an upright direction or an inverted direction). Or whether the image is a back image) (step S2).
The predetermined area P1 or P2 for determining the direction is an area where the driver's license number of the driver's license is written. As shown in FIG. 2, the driver's license number is composed of 12 characters (number of 12 digits) from 0 to 9. For example, in the driver's license 40 shown in FIG. 2, the driver's license number is represented by No. 123456789030. In the description, the rightmost digit “0” is the first digit, c (1), the leftmost digit “1” is the twelfth digit, c (12), From the right end are designated as c (2), c (3)... C (11). In this embodiment, the direction of the image where the driver's license number exists in the region P1 as shown in FIG. 2 is referred to as the “upright direction”, while the driver's license number is rotated 180 degrees. The direction of the image where is located in the region P2 is referred to as the “inverted direction”.
When there is no character corresponding to the driver's license number in the area P1 and the area P2 (there is no number of characters), the image direction determination unit 9 obtains the acquired image data on the back of the driver's license 40 or a medium different from the driver's license. It is determined that

文字認識部8は、画像方向判定部9の判定結果に従って文字認識を行う(ステップS3)。より具体的には、例えば、文字認識部8は、運転免許証40に記載された運転免許証番号を読み取り、読み取った運転免許証番号を用いて各種の認証処理を行ったり、利用者の登録処理を行ったりといった処理を行う。
文字認識部8は、認識した文字を画像表示部3に表示する(ステップS4)等、各種の処理を実行する。
The character recognition unit 8 performs character recognition according to the determination result of the image direction determination unit 9 (step S3). More specifically, for example, the character recognition unit 8 reads the driver's license number written on the driver's license 40, performs various authentication processes using the read driver's license number, or registers the user. Processes such as processing.
The character recognizing unit 8 executes various processes such as displaying the recognized character on the image display unit 3 (step S4).

次いで、図4のステップS2に示した画像方向判定処理の詳細について、図5乃至図9を参照しつつ説明する。
図5は、図4のステップS2に示した画像方向判定処理の手順を示すフローチャートである。
図5において、まず、画像方向判定部9の情報記録領域設定部91が、運転免許証40の画像の方向が正立方向であると仮定し(ステップS11)、射影計算部92が、読み取られた画像の特定の領域P1(図2参照)に運転免許証番号があるか否かを判定する(ステップS12)。
運転免許証において運転免許証番号が記載されている位置はほぼ一定であるから、この実施形態では、運転免許証番号が記載されているであろう領域P1の四隅のx,y座標(図2参照)を予め設定しておく。このx,y座標は、ROMまたは記憶部6に記憶されており、画像方向判定部9は、このx,y座標によって示される領域P1内に運転免許証番号があるか否かを判定することによって運転免許証の方向を判定する。
Next, details of the image direction determination process shown in step S2 of FIG. 4 will be described with reference to FIGS.
FIG. 5 is a flowchart showing the procedure of the image direction determination process shown in step S2 of FIG.
In FIG. 5, first, the information recording area setting unit 91 of the image direction determination unit 9 assumes that the direction of the image of the driver's license 40 is an erect direction (step S11), and the projection calculation unit 92 is read. It is determined whether there is a driver's license number in a specific area P1 (see FIG. 2) of the image (step S12).
Since the position where the driver's license number is written in the driver's license is almost constant, in this embodiment, the x and y coordinates of the four corners of the region P1 where the driver's license number will be written (FIG. 2). Reference) is set in advance. The x and y coordinates are stored in the ROM or the storage unit 6, and the image direction determination unit 9 determines whether or not there is a driver's license number in the area P1 indicated by the x and y coordinates. Determine the direction of your driver's license.

図6は、運転免許証40の画像の方向が正立方向である場合を説明するための図であり、図7は運転免許証40の画像の方向が倒立方向である場合を説明するための図である。
図示のように、運転免許証の画像の方向が正立方向である場合には領域P1に運転免許証番号が記載されている一方、運転免許証の画像の方向が倒立方向である場合には、領域P1には運転免許証番号ではなく他の情報に関する画像が描画されている。
6 is a diagram for explaining a case where the direction of the image of the driver's license 40 is an upright direction, and FIG. 7 is a diagram for explaining a case where the direction of the image of the driver's license 40 is an inverted direction. FIG.
As shown in the figure, when the direction of the image of the driver's license is an upright direction, the driver's license number is written in the area P1, while when the direction of the image of the driver's license is an inverted direction In the area P1, an image related to other information is drawn instead of the driver's license number.

ここで、図5のステップS12に示す運転免許証番号の有無の判定処理について、図8に示すフローチャートを参照しつつ説明する。
画像情報抽出部93は、画像メモリに記憶されている運転免許証の画像データから、運転免許証番号が記載されている矩形状の領域P1の画像データを切り出す(ステップS21)。文字数計数部99は、領域P1に対応する各画素ごとの輝度値を求め、切り出した矩形状した画像の各画素の輝度値(多階調)の二値化を行う。文字数計数部99は、得られた二値化画像を用いて、矩形領域内に等間隔で配置されている文字の数をカウントする(ステップS22)。
運転免許証の場合は運転免許証番号は12桁と決められているので、文字の個数が12個であれば運転免許証番号が存在すると判定する。
文字数計数部99は、ステップS22の判定結果を参照して、文字の数が予め定められた数(この実施形態では「12」)であるか否かを判定し(ステップS23)、判定結果が肯定的である場合には(ステップS23;YES)、領域P1または領域P2には、運転免許証番号があると判定する(ステップS24)。
一方、判定結果が否定的である場合には(ステップS23;NO)、領域P1及び領域P2には、運転免許証番号がないと判定する(ステップS25)。
Here, the determination process of the presence or absence of the driver's license number shown in step S12 of FIG. 5 will be described with reference to the flowchart shown in FIG.
The image information extraction unit 93 cuts out the image data of the rectangular area P1 in which the driver's license number is written from the driver's license image data stored in the image memory (step S21). The character number counting unit 99 obtains a luminance value for each pixel corresponding to the region P1, and binarizes the luminance value (multi-gradation) of each pixel of the cut-out rectangular image. The character count unit 99 counts the number of characters arranged at equal intervals in the rectangular area using the obtained binarized image (step S22).
In the case of a driver's license, the driver's license number is determined to be 12 digits. Therefore, if the number of characters is 12, it is determined that the driver's license number exists.
The character count unit 99 refers to the determination result of step S22 to determine whether or not the number of characters is a predetermined number (in this embodiment, “12”) (step S23). If it is affirmative (step S23; YES), it is determined that there is a driving license number in the region P1 or the region P2 (step S24).
On the other hand, when the determination result is negative (step S23; NO), it is determined that there is no driving license number in the region P1 and the region P2 (step S25).

ここで、図8のステップS22に示す文字数のカウント処理の詳細について、図9に示すフローチャートを参照しつつ説明する。
まず、画像情報抽出部93及び外形矩形領域設定部94は、切り出された領域P1又は領域P2の矩形画像に含まれる各画素のX軸(図2参照)に対する射影P(x)を計算して、ヒストグラムを生成する(ステップS31)。
図10は、このようにして生成されたヒストグラムの一例を示している。図10において、横軸はX軸方向の(画像メモリ上の画素)位置を示し、縦軸はX軸方向の各座標における画素値の度数を示す。つまり、度数は、それぞれのX座標の画素値である「1」または「0」を合算した値である。この例では、黒色の画素値を「0」とし、白色の画素値を「1」としているため、図示のように、X軸方向において文字が記載されている位置は度数が低い一方、文字が記載されていない位置は度数が高くなっている。
Details of the character count process shown in step S22 of FIG. 8 will be described with reference to the flowchart shown in FIG.
First, the image information extraction unit 93 and the outer rectangular region setting unit 94 calculate a projection P (x) on the X axis (see FIG. 2) of each pixel included in the extracted region P1 or the rectangular image of the region P2. Then, a histogram is generated (step S31).
FIG. 10 shows an example of the histogram generated in this way. In FIG. 10, the horizontal axis indicates the position in the X-axis direction (pixel on the image memory), and the vertical axis indicates the frequency of the pixel value at each coordinate in the X-axis direction. That is, the frequency is a value obtained by adding up “1” or “0” which is the pixel value of each X coordinate. In this example, the black pixel value is set to “0” and the white pixel value is set to “1”. Therefore, as shown in FIG. Locations not listed have higher frequencies.

外形矩形領域設定部94は、P(x)を左方からスキャンして運転免許証番号の左端位置Xslを求める(ステップS32)。
より具体的には、外形矩形領域設定部94は、射影P(x)を左方からスキャンしていき度数が予め定められた閾値より小さくなる位置であって左方から2番面の位置を検出する。
図10に示す例では、左方からスキャンした場合に、運転免許証番号の左側に「第」の文字が記載されており、この文字の位置でも度数が閾値よりも低くなるため、外形矩形領域設定部94は、度数が閾値よりも小さくなる位置であって左方から2番目の位置を運転免許証番号の左端位置として検出する。図10の最左端の数字c(12)「1」の左端位置をXsLとしている。
Outline the rectangular area setting unit 94 scans P a (x) from the left determine the left end position Xs l of driver's license number (step S32).
More specifically, the outline rectangular area setting unit 94 scans the projection P (x) from the left, and the position of the second surface from the left is a position where the frequency becomes smaller than a predetermined threshold. To detect.
In the example shown in FIG. 10, when scanning from the left, the “first” character is written on the left side of the driver's license number, and the frequency is lower than the threshold even at the position of this character. The setting unit 94 detects the position where the frequency is smaller than the threshold and the second position from the left as the left end position of the driver's license number. The left end of the leftmost digit c (12) "1" in FIG. 10 is set to Xs L.

ここで、図9に示す処理において用いられる閾値の決定処理の一例について説明する。
図2、図10に示すように、運転免許証番号の5桁目の数字c(5)=「5」から8桁目の数字c(8)=「8」は、文字に斜線がかかっており、この斜線がかかった箇所は反射光の強度が低いため、閾値によっては斜線の箇所も文字として検出されてしまい、文字の検出が適切になされない場合がある。そのため、文字の検出を適切に行うべく、画像情報抽出部93が以下の処理を行って閾値を決定してもよい。
まず、画像情報抽出部93は、仮の閾値bthを定め、P(x)が閾値bthよりも高い区間を空白区間と判定する。
次いで、画像情報抽出部93は、空白区間におけるP(x)の最小値を求め、この最小値を閾値として用いる。
この態様によれば、斜線がかけられている箇所を含む区間におけるP(x)の最小値が閾値として用いられるため、斜線がかけられている箇所は確実に閾値を上回る。そのため、斜線がかけられている箇所が文字区間として検出されることがない。
Here, an example of threshold value determination processing used in the processing shown in FIG. 9 will be described.
As shown in FIG. 2 and FIG. 10, the fifth digit of the driver's license number c (5) = “5” to the eighth digit c (8) = “8” are hatched. Since the intensity of the reflected light is low at the shaded portion, the shaded portion is also detected as a character depending on the threshold, and the character may not be detected properly. Therefore, the image information extraction unit 93 may determine the threshold value by performing the following processing in order to appropriately detect characters.
First, the image information extraction unit 93 determines a provisional threshold value bth, and determines a section where P (x) is higher than the threshold value bth as a blank section.
Next, the image information extraction unit 93 obtains the minimum value of P (x) in the blank section and uses this minimum value as a threshold value.
According to this aspect, since the minimum value of P (x) in the section including the hatched portion is used as the threshold value, the hatched portion surely exceeds the threshold value. Therefore, a hatched portion is not detected as a character section.

図9の説明に戻る。ステップS32の処理を終えると、次いで、両端文字抽出部95は、位置Xslを開始点として射影P(x)をスキャンし最上位桁数字の右端位置Xsrを求める(ステップS33)。最上位桁数字は、図10に示す運転免許証番号の中で最左端の数字c(12)=「1」を示している。
より具体的には、例えば、両端文字抽出部95は、位置XsLを開始点として射影P(x)をスキャンし、度数が予め定められた閾値以上となる位置を右端位置XsRとする。
Returning to the description of FIG. After execution of step S32, then, both end character extraction unit 95 scans the projection P (x) the position Xs l as a starting point determining the right end position Xs r the uppermost digit (step S33). The most significant digit indicates the leftmost digit c (12) = “1” in the driver's license number shown in FIG.
More specifically, for example, the both-end character extraction unit 95 scans the projection P (x) using the position Xs L as a starting point, and sets the position where the frequency is equal to or greater than a predetermined threshold as the right end position Xs R.

次いで、各文字の中心位置検出部96は、以下の式(1)を用いて最上位桁数字の中央位置Xc(12)を求める(ステップS34)。   Next, the center position detector 96 of each character obtains the center position Xc (12) of the most significant digit using the following equation (1) (step S34).

[数1]
Xc(12)=(XsL+XsR)/2 …(1)
[Equation 1]
Xc (12) = (Xs L + Xs R ) / 2 (1)

次いで、外形矩形領域設定部94は、以下の式(2)を用いて、運転免許証番号の概略右端位置Xerを求める(ステップS35)。
式(2)において、Dxは運転免許証番号の12桁の文字列のX軸方向の幅を表す値であり、予め設定された値である。
Then, outer rectangular area setting unit 94, using the following equation (2), obtaining the schematic right end position Xe r of driver's license number (step S35).
In Expression (2), Dx is a value that represents the width in the X-axis direction of the 12-digit character string of the driver's license number, and is a preset value.

[数2]
XeR=XsL+Dx …(2)
[Equation 2]
Xe R = Xs L + Dx (2)

次いで、両端文字抽出部95は、位置XeRを開始点として射影P(x)を右方からスキャンして最下位桁数字の左端位置XeLを求める(ステップS36)。
最下位桁数字は、図10に示す運転免許証番号の中で最右端の数字c(1)=「0」を示している。
この処理は、具体的には、例えば、両端文字抽出部95は、XeRを開始点として射影P(x)を右方からスキャンし、度数が予め定められた閾値以上となる位置を左端位置XeLとする。
次いで、各文字の中心位置検出部96は、以下の式(3)を用いて最下位桁数字の中央位置Xcを求める(ステップS37)。
Next, the both-end character extraction unit 95 obtains the left end position Xe L of the least significant digit by scanning the projection P (x) from the right starting from the position Xe R (step S36).
The least significant digit indicates the rightmost digit c (1) = “0” in the driver's license number shown in FIG.
Specifically, for example, the double-ended character extraction unit 95 scans the projection P (x) from the right starting from Xe R, and sets the position where the frequency is equal to or greater than a predetermined threshold to the left end position. Let Xe L.
Next, the center position detector 96 of each character obtains the center position Xc of the least significant digit using the following equation (3) (step S37).

[数3]
Xc(1)=(XeL+XeR)/2 …(3)
[Equation 3]
Xc (1) = (Xe L + Xe R ) / 2 (3)

更に、全文字中心位置検出部97は、以下の式(4)を用いて、文字間隔の現実値Dcを求める(ステップS38)。   Further, the all character center position detection unit 97 obtains the actual value Dc of the character spacing using the following equation (4) (step S38).

[数4]
Dc=(Xc(1)−Xc(12))/11 …(4)
[Equation 4]
Dc = (Xc (1) -Xc (12)) / 11 (4)

次いで、全文字中心位置検出部97は、2から11桁の各文字の中央位置Xc(k)を、以下の式(5)を用いて算出する(ステップS39)。
ただし、以下の式(5)においてk=2,…11とする。
Next, the all character center position detection unit 97 calculates the center position Xc (k) of each character of 2 to 11 digits using the following equation (5) (step S39).
However, in the following equation (5), k = 2,...

[数5]
Xc(k)=Xc(1)−(k−1)*Dc …(5)
[Equation 5]
Xc (k) = Xc (1)-(k-1) * Dc (5)

次いで、全文字中心位置検出部97は、各文字のそれぞれについて、文字の中央位置Xc(k)から文字の端の位置までの最大許容距離を設定する(ステップS40)。
この実施形態では、全文字中心位置検出部97は、最大許容距離としてDcを設定する。
Next, the all character center position detection unit 97 sets the maximum allowable distance from the character center position Xc (k) to the position of the end of the character for each character (step S40).
In this embodiment, the all character center position detection unit 97 sets Dc as the maximum allowable distance.

次いで、各文字両端位置検出部98及び文字数計数部99は、ステップS41からステップS48の処理を行うことによって、領域P1にある文字の数が12であるか否かを判定する。
ステップS41からステップS48において、カウンタは左から何番目の文字かを示すカウンタであり、エラーカウンタはエラーの回数を示すカウンタである。また、最大許容距離は、文字の中央位置から文字の右端位置までの許容される最大の距離を示す。
まず、文字数計数部99は、カウンタに1を設定するとともに、エラーカウンタにゼロを設定する(ステップS41)。
次いで、各文字両端位置検出部98は、カウンタによって示される文字の中央位置Xc(カウンタ)から射影P(x)を右方向に最大許容距離までスキャンし、度数が予め定められた閾値以上となる位置を検出することによって、カウンタによって示される文字の右端位置を検出する(ステップS42)。
ステップS42の処理において、最大許容距離の範囲内に文字の右端位置が検出されなかった場合は(ステップS43;NO)、文字数計数部99は、エラーカウンタをインクリメントする(ステップS44)。
Next, each character end position detection unit 98 and character number counting unit 99 determine whether or not the number of characters in the region P1 is 12 by performing the processing from step S41 to step S48.
In step S41 to step S48, the counter is a counter indicating the number of characters from the left, and the error counter is a counter indicating the number of errors. The maximum allowable distance indicates the maximum allowable distance from the center position of the character to the right end position of the character.
First, the character number counting unit 99 sets 1 in the counter and zero in the error counter (step S41).
Next, each character end position detection unit 98 scans the projection P (x) from the character center position Xc (counter) indicated by the counter to the maximum allowable distance in the right direction, and the frequency becomes equal to or greater than a predetermined threshold. By detecting the position, the right end position of the character indicated by the counter is detected (step S42).
In the process of step S42, when the right end position of the character is not detected within the range of the maximum allowable distance (step S43; NO), the character number counting unit 99 increments the error counter (step S44).

また、各文字両端位置検出部98は、カウンタによって示される文字の中央位置Xc(カウンタ)から射影P(x)を左方向に最大許容距離までスキャンし、度数が予め定められた閾値以上となる位置を検出することによって、カウンタによって示される文字の左端位置を検出する(ステップS45)。ステップS45の処理において、最大許容距離の範囲内に文字の左端位置が検出されなかった場合は(ステップS46;NO)、文字数計数部99は、エラーカウンタをインクリメントする(ステップS47)。次いで、文字数計数部99は、カウンタの値が12であるか否かを判定し(ステップS48)、判定結果が否定的である場合には(ステップS48;NO)、カウンタをインクリメントし(ステップS49)、ステップS42の処理に戻る。   Each character end position detector 98 scans the projection P (x) from the center position Xc (counter) of the character indicated by the counter in the left direction to the maximum allowable distance, and the frequency becomes equal to or greater than a predetermined threshold. By detecting the position, the left end position of the character indicated by the counter is detected (step S45). In the process of step S45, when the left end position of the character is not detected within the range of the maximum allowable distance (step S46; NO), the character number counting unit 99 increments the error counter (step S47). Next, the character number counting unit 99 determines whether or not the value of the counter is 12 (step S48). If the determination result is negative (step S48; NO), the counter is incremented (step S49). ), The process returns to step S42.

一方、ステップS48において判定結果が肯定的である場合には(ステップS48;YES)、文字数計数部99は、エラーカウンタがゼロであるか否かを判定し(ステップS50)、エラーカウンタがゼロである場合には(ステップS50;YES)、文字数は12であると判定する(ステップS51)一方、エラーカウンタがゼロでない場合には(ステップS50;NO)、文字数は12でないと判定する(ステップS52)。   On the other hand, if the determination result is affirmative in step S48 (step S48; YES), the character number counting unit 99 determines whether or not the error counter is zero (step S50), and the error counter is zero. If there is (step S50; YES), it is determined that the number of characters is 12 (step S51). On the other hand, if the error counter is not zero (step S50; NO), it is determined that the number of characters is not 12 (step S52). ).

図5の説明に戻る。文字数判定部89は、ステップS12の判定結果を参照して、運転免許証番号があるかを判定する(ステップS13)。文字数判定部89は、運転免許証番号があると判定された場合は(ステップS13;YES)、画像の方向が正立方向、すなわち読み取った画像が処理可能画像であると判定する(ステップS14)一方、運転免許証番号がないと判定された場合は(ステップS13;NO)、画像情報抽出部93等がステップS15以降の処理を行って、読み取られた画像の方向が倒立方向であるかを判定する。   Returning to the description of FIG. The number-of-characters determination unit 89 determines whether there is a driver's license number with reference to the determination result of step S12 (step S13). When it is determined that there is a driver's license number (step S13; YES), the character number determination unit 89 determines that the image direction is the upright direction, that is, the read image is a processable image (step S14). On the other hand, when it is determined that there is no driver's license number (step S13; NO), the image information extraction unit 93 or the like performs the processing from step S15 onward to determine whether the direction of the read image is the inverted direction. judge.

ステップS15において、画像情報抽出部93は、読み取られた画像の方向が倒立方向画像であると仮定し、領域P2(図2参照)を特定する(ステップS15)。領域P2は、運転免許証40の画像の方向が倒立方向である場合に、運転免許証番号が記載されている領域である。射影計算部92は、領域P2に運転免許証番号があるかどうかを判定する(ステップS16)。このステップS16の処理はステップS12の処理(すなわち図8に示す画像方向判定処理)と同様であり、ここではその詳細な説明を省略する。すなわち、領域P1内にある文字の数が予め定められた数ではないと文字数判定部89によって判定された場合には、領域P1とは異なる領域P2について、射影計算部92が上記検出を行うとともに、文字数判定部89が上記判定を行い、領域P2内にある文字の数が予め定められた数であると判定された場合には、運転免許証40の画像の方向が倒立方向であると判定する。図11は、運転免許証40の画像の方向が倒立方向である場合を説明するための図である。図示のように、運転免許証40の画像の方向が倒立方向である場合は、領域P2に運転免許証番号が記載されているため、領域P2に対して文字数の判定処理を行うことによって運転免許証番号の文字数が判定される。   In step S15, the image information extraction unit 93 specifies the region P2 (see FIG. 2) assuming that the direction of the read image is an inverted image (step S15). The region P2 is a region where the driver's license number is written when the direction of the image of the driver's license 40 is the inverted direction. The projection calculation unit 92 determines whether or not there is a driver's license number in the region P2 (step S16). The processing in step S16 is the same as the processing in step S12 (that is, the image direction determination processing shown in FIG. 8), and detailed description thereof is omitted here. That is, when the number-of-characters determination unit 89 determines that the number of characters in the region P1 is not a predetermined number, the projection calculation unit 92 performs the above detection for the region P2 different from the region P1. The character number determination unit 89 makes the above determination, and when it is determined that the number of characters in the region P2 is a predetermined number, it is determined that the direction of the image of the driver's license 40 is the inverted direction. To do. FIG. 11 is a diagram for explaining a case where the direction of the image of the driver's license 40 is the inverted direction. As shown in the figure, when the direction of the image of the driver's license 40 is the inverted direction, the driver's license number is written in the area P2, so that the driver's license is obtained by performing the character number determination process for the area P2. The number of characters in the identification number is determined.

文字数判定部89は、ステップS16の判定結果を参照して、運転免許証番号があるかを判定する(ステップS17)。文字数判定部89は、運転免許証番号があると判定された場合には(ステップS17;YES)、画像の方向が倒立方向である、すなわち読み取った画像が処理可能画像であると判定する(ステップS14)一方、運転免許証番号がないと判定された場合は(ステップS17;NO)、処理不能画像であると判定する(ステップS18)。ステップS17において運転免許証番号がないと判定された場合には、運転免許証番号が正立方向の場合の位置にも倒立方向の位置にもないため、文字数判定部89は、表裏が反転して読み取られた画像であると判定する。すなわち、文字数判定部89は、領域P1内にある文字の数が予め定められた数でないと判定され、かつ、領域P2内にある文字の数が予め定められた数でないと判定された場合には、読み取った画像が処理不能画像であると判定する。この場合は、文字数判定部89は、「運転免許証が裏面の可能性があります。向きを確認してください。」といったメッセージや、「運転免許証を裏返してもう一度差し込んでください」といったメッセージを出力してもよい。また、文字数判定部89は、「運転免許証ではないものが挿入されている可能性があります。確認してください。」といったメッセージを出力してもよい。   The character number determination unit 89 refers to the determination result of step S16 to determine whether there is a driver's license number (step S17). When it is determined that there is a driver's license number (step S17; YES), the character number determination unit 89 determines that the direction of the image is the inverted direction, that is, the read image is a processable image (step). S14) On the other hand, if it is determined that there is no driver's license number (step S17; NO), it is determined that the image cannot be processed (step S18). If it is determined in step S17 that there is no driver's license number, the character number determining unit 89 reverses the front and back because the driver's license number is neither in the upright position nor in the inverted direction. It is determined that the image has been read. That is, the character number determination unit 89 determines that the number of characters in the area P1 is not a predetermined number and the number of characters in the area P2 is not a predetermined number. Determines that the read image is an unprocessable image. In this case, the number-of-characters determination unit 89 outputs a message such as “There is a possibility that the driver's license is on the reverse side. Check the direction.” Or a message such as “Please turn over the driver's license and insert it again”. May be. Further, the character number determination unit 89 may output a message such as “There is a possibility that a non-driver's license has been inserted. Please check”.

以上のような処理を行って、画像方向判定部9は、運転免許証の画像の方向を判定する。文字認識部8は、画像方向判定部9の判定結果を参照して、読み取られた画像に対して画像認識処理を行う。具体的には、例えば、文字認識部8は、特定された領域についてOCR処理等の文字認識処理等を行う。すなわち、画像処理部1は、文字認識処理等の処理負荷の高い処理を実行する前に、特定の領域において文字の数を判定することによって画像の方向の判定処理を実行する。このようにすることにより、画像方向の判定処理を低い処理負荷で行うことができる。   By performing the processing as described above, the image direction determination unit 9 determines the direction of the image of the driver's license. The character recognition unit 8 performs image recognition processing on the read image with reference to the determination result of the image direction determination unit 9. Specifically, for example, the character recognition unit 8 performs character recognition processing such as OCR processing on the specified area. That is, the image processing unit 1 executes the image direction determination process by determining the number of characters in a specific area before executing a process with a high processing load such as a character recognition process. In this way, the image direction determination process can be performed with a low processing load.

このように本実施形態では、運転免許証から特定の領域に記載された運転免許証番号の文字の数を判定し、この判定結果に基づいて画像の方向を判定する。このようにすることで、読み取った画像の方向の判定を行うことができる。
また、画像処理部1の文字認識部8が運転免許証番号の文字の領域に対してOCR処理等の文字認識処理を施す場合には、上述した文字数判定部89が行った文字数の判定結果を文字認識処理に用いることができる。例えばOCR処理等の文字認識処理では、文字を判別する前の段階で、文字の区切り位置を把握してどこからどこまでの領域に文字が存在しているかを調べる必要があるが、上記実施形態では、上述の文字数の判定処理によって文字の区切り位置が把握されるため、文字認識部8は、この区切り位置を、その後に行う文字認識処理に流用することができる。そのため、文字認識部8が、後段の文字認識処理において文字の区切り位置の認識処理を行う必要がなく、全体としての処理時間を短縮することができる。
Thus, in this embodiment, the number of characters of the driver's license number written in the specific area is determined from the driver's license, and the direction of the image is determined based on the determination result. In this way, the direction of the read image can be determined.
In addition, when the character recognition unit 8 of the image processing unit 1 performs character recognition processing such as OCR processing on the character region of the driver's license number, the determination result of the number of characters performed by the character number determination unit 89 described above is used. It can be used for character recognition processing. For example, in character recognition processing such as OCR processing, it is necessary to grasp the character separation position and check where the character exists in the area before determining the character. Since the character delimiter position is grasped by the character number determination process described above, the character recognition unit 8 can divert this delimiter position to the character recognition process to be performed later. Therefore, it is not necessary for the character recognition unit 8 to perform the character separation position recognition processing in the subsequent character recognition processing, and the overall processing time can be shortened.

[変形例]
上述した実施形態は、本発明の実施の一例に過ぎず、以下のように変形させてもよい。また、上述した実施形態及び以下に示す各変形例は、必要に応じて組み合わせて実施してもよい。
[変形例1]
上述の実施形態では、証明書として運転免許証を用いたが、証明書は運転免許証に限定されるものではなく、例えば、パスポートや、社員証、健康保険証、スポーツジム等の会員証等であってもよく、識別文字列(識別番号を含む)が一意に割り当てられた証明書であればどのようなものであってもよい。例えば、パスポートの場合は、パスポートの画像において旅券番号が記載された領域を、画像の方向が正立方向である場合と倒立方向である場合のそれぞれについて予め特定しておき、画像方向判定部9が、特定された領域に旅券番号があるか否かを判定することによって画像の方向を判定するようにしてもよい。要は、証明書に一意に割り当てられた識別文字列が記されているべき領域を、証明書の画像の方向が正立方向である場合と倒立方向である場合とのそれぞれの場合において予め特定しておき、画像方向判定部9が、特定された領域に識別文字列があるか否かを判定することによって、証明書の画像の方向を判定すればよい。
[Modification]
The above-described embodiment is merely an example of implementation of the present invention, and may be modified as follows. Moreover, you may implement combining embodiment mentioned above and each modification shown below as needed.
[Modification 1]
In the above embodiment, a driver's license is used as a certificate. However, the certificate is not limited to a driver's license. For example, a passport, an employee ID card, a health insurance card, a membership card such as a sports gym, etc. Any certificate may be used as long as it is a certificate to which an identification character string (including an identification number) is uniquely assigned. For example, in the case of a passport, the area where the passport number is described in the passport image is specified in advance for each of the case where the image direction is the upright direction and the case where the image direction is the inverted direction. However, you may make it determine the direction of an image by determining whether there exists a passport number in the specified area | region. In short, the area where the identification character string uniquely assigned to the certificate should be specified is specified in advance in each of the case where the direction of the certificate image is the upright direction and the case of the inverted direction. In addition, the image orientation determination unit 9 may determine the orientation of the certificate image by determining whether or not there is an identification character string in the specified area.

[変形例2]
上述の実施形態では、1次元撮像素子と媒体搬送機構を有する画像入力部2を用いたが、画像入力部の構成はこれに限定されるものではなく、例えば2次元CCDやCMOSイメージャなどのエリアセンサと被写体支持機構とを有する読取装置を用いてもよい。
[Modification 2]
In the above-described embodiment, the image input unit 2 having a one-dimensional image sensor and a medium transport mechanism is used. However, the configuration of the image input unit is not limited to this, and for example, an area such as a two-dimensional CCD or a CMOS imager. A reading device having a sensor and a subject support mechanism may be used.

[変形例3]
上述の実施形態では、画像方向判定部9は、特定の領域(領域P1又はP2)内に等間隔で配置されている文字の数が予め定められた数であるか否かを判定したが、文字数の判定の態様は上述した実施形態で示したものに限定されるものではなく、他の態様であってもよい。例えば、画像方向判定部9が、射影P(x)を左方からスキャンしていき、ヒストグラムの度数と予め定められた閾値とを比較することによって度数のピークを検出し、このピークの数を文字数として検出するようにしてもよい。要は、画像方向判定部9は、検出された反射光の分布に従って、特定の領域内にある文字の数が予め定められた数であるか否かを判定するものであればどのようなものであってもよい。
[Modification 3]
In the above-described embodiment, the image direction determination unit 9 determines whether or not the number of characters arranged at equal intervals in a specific region (region P1 or P2) is a predetermined number. The mode of determining the number of characters is not limited to that shown in the above-described embodiment, and may be another mode. For example, the image direction determination unit 9 scans the projection P (x) from the left, detects the frequency peak by comparing the frequency of the histogram with a predetermined threshold, and calculates the number of peaks. It may be detected as the number of characters. In short, the image direction determination unit 9 may be any device that determines whether or not the number of characters in a specific area is a predetermined number in accordance with the detected distribution of reflected light. It may be.

[変形例4]
上述の実施形態では、図9のステップS50に示したように、エラーカウンタがゼロでない場合、すなわち一度でもエラーが出た場合は、画像方向判定部9は、文字数が予め定められた数でないと判定するようにしたが、判定の態様はこれに限らず、例えば、ある一定の条件を満たす場合にはエラーとみなさないような判定を行ってもよい。すなわち、画像方向判定部9は、文字数が予め定められた数であると判定された領域がある場合には、その領域に対応する方向を読み取った画像の方向として判定する一方、文字数が予め定められた数であると判定された領域がない場合には、その判定結果が予め定められた条件を満たす領域がある場合に該領域に対応する読取方向を読み取った画像の方向として判定してもよい。この予め定められた条件としては、例えば、判定結果と予め定められた文字数との差分が所定の範囲内であることを条件としてもよい。このようにすることによって、例えば識別文字列の記載領域に汚れやゴミが付着していることによって識別文字列を正確に読み取れない場合であっても、画像の方向を推定することができる。
また、文字数の判定処理においてエラーが発生した場合に、画像方向判定部9が、ヒストグラムの度数の判定に用いた閾値の値を変更して、再度判定処理を行うようにしてもよい。
[Modification 4]
In the above-described embodiment, as shown in step S50 of FIG. 9, when the error counter is not zero, that is, when an error has occurred even once, the image direction determination unit 9 must determine that the number of characters is not a predetermined number. Although the determination is made, the determination mode is not limited to this. For example, when a certain condition is satisfied, it may be determined that the error is not considered. That is, if there is an area where the number of characters is determined to be a predetermined number, the image direction determination unit 9 determines the direction corresponding to that area as the direction of the read image, while the number of characters is determined in advance. If there is no area determined to be the determined number, if there is an area whose determination result satisfies a predetermined condition, the reading direction corresponding to the area may be determined as the direction of the read image. Good. As this predetermined condition, for example, the difference between the determination result and the predetermined number of characters may be within a predetermined range. By doing so, the direction of the image can be estimated even when the identification character string cannot be read accurately due to dirt or dust adhering to the description region of the identification character string, for example.
When an error occurs in the character number determination process, the image direction determination unit 9 may change the threshold value used for determining the frequency of the histogram and perform the determination process again.

[変形例5]
上述の実施形態では、画像方向判定部9は、文字の中央位置を算定し、算定した中央位置を基準として、その左右端が予め定められた最大許容距離内にあるかを判定したが、これに限らず、文字の中央位置に代えて右端(又は左端)を検出する構成とし、検出した右端(又は左端)から予め定められた最大許容距離内に反対側の端があるかを判定してもよい。
[Modification 5]
In the above-described embodiment, the image direction determination unit 9 calculates the center position of the character, and determines whether the left and right ends are within a predetermined maximum allowable distance based on the calculated center position. In addition to the above, the right end (or left end) is detected instead of the center position of the character, and it is determined whether the opposite end is within a predetermined maximum allowable distance from the detected right end (or left end). Also good.

[変形例6]
上述の実施形態において、画像方向判定部9が、外形矩形領域設定部94に係る処理を実行した後に、運転免許証番号の文字にかかった斜線部分を取り除く処理を行うようにしてもよい。この場合の処理の内容について、図12乃至図15を参照しつつ説明する。
図12は、運転免許証番号の画像の一例を示す図である。図12に示すように、免許証番号は3文字目から8文字目に斜線が施されている。この斜線を除去して文字を取り出す二値化処理について以下に説明する。
[Modification 6]
In the above-described embodiment, the image direction determination unit 9 may perform the process of removing the hatched portion applied to the characters of the driver's license number after executing the process related to the outline rectangular area setting unit 94. The contents of the processing in this case will be described with reference to FIGS.
FIG. 12 is a diagram illustrating an example of an image of a driver's license number. As shown in FIG. 12, the license number is hatched from the third character to the eighth character. A binarization process for removing the oblique lines and extracting characters will be described below.

図13は、本変形例に係る機能構成の一例を示すブロック図である。図において、射影算出部101は、初めに切り出された画像(以下、「文字領域画像」という)についてX射影を求める。ここでX射影は通常のX射影ではなく、特別な射影計算を行う。すなわち、射影算出部101は、文字領域画像をS(i,j)と表すとき、smin(X)=min(S(i,X))を求める。これは直線x=iにおける、最小画素値である。Smin(X)を図14に示す。   FIG. 13 is a block diagram illustrating an example of a functional configuration according to this modification. In the figure, a projection calculation unit 101 obtains an X projection for an image cut out first (hereinafter referred to as a “character area image”). Here, the X projection is not a normal X projection, but a special projection calculation is performed. That is, the projection calculation unit 101 obtains smin (X) = min (S (i, X)) when the character region image is represented as S (i, j). This is the minimum pixel value on the straight line x = i. Smin (X) is shown in FIG.

二値化閾値決定部102は、smin(X)に基づいて、二値化閾値を求める。二値化閾値決定部102は、まず、仮の閾値bthを定める。例えばbth=50とする(図14参照)。二値化閾値決定部102は、smin(X)において、関数値がbthを下回ればその区間を文字区間Bと判定し、上回ればその区間を空白区間Wと判定する。ここで、斜線とsmin(X)との関係に注目すると、斜線は5文字目から8文字目にかけて施されており、これは図14における空白区間のうち、斜線がかかる部分の関数値はそうでない部分よりも小さいことがわかる。この斜線がかかる5個の連続する空白区間(図14の影をつけた部分)についてsmin(X)の最小画素値を求め、これを二値化閾値BinThreshとする。図14の例ではBinThresh=52となる。   The binarization threshold value determination unit 102 obtains a binarization threshold value based on smin (X). First, the binarization threshold value determination unit 102 determines a temporary threshold value bth. For example, bth = 50 (see FIG. 14). The binarization threshold value determination unit 102 determines the section as the character section B if the function value is lower than bth in smin (X), and determines the section as the blank section W if it exceeds the function value. Here, paying attention to the relationship between the slanted line and smin (X), the slanted line is given from the fifth character to the eighth character, and this is the function value of the part where the slanted line in the blank section in FIG. It turns out that it is smaller than the part which is not. The minimum pixel value of smin (X) is obtained for the five consecutive blank sections (shaded portions in FIG. 14) with the diagonal lines, and this is used as the binarization threshold BinThresh. In the example of FIG. 14, BinThresh = 52.

二値化実行部103は、このBinThreshを用いて文字領域画像の二値化を行う。その結果、図15に示す画像が得られる。図15に示すように、二値化によってもとの文字領域画像の斜線が除去されていることがわかる。この方式では、斜線の存在する部分の最小画素値を求め、これを二値化の閾値としているため、斜線の部分は確実に閾値を上回ることが保証されている。したがって二値化によって斜線画素が黒領域にマップされることはないので、文字認識にとって望ましい二値化を行うことができる。   The binarization execution unit 103 binarizes the character area image using this BinThresh. As a result, the image shown in FIG. 15 is obtained. As shown in FIG. 15, it can be seen that the diagonal lines of the original character area image are removed by binarization. In this method, since the minimum pixel value of the portion where the oblique line exists is obtained and this is used as a threshold value for binarization, it is guaranteed that the oblique line portion surely exceeds the threshold value. Accordingly, since binarization does not map the hatched pixels to the black area, binarization desirable for character recognition can be performed.

[変形例7]
上述の実施形態において、文字認識部8と画像方向判定部9は、制御部5が記憶部6等の記憶媒体に記憶されたコンピュータプログラムを読み出して実行することによって実現されてもよい。この場合、このコンピュータプログラムは、磁気記録媒体(磁気テープ、磁気ディスク(HDD(Hard Disk Drive)、FD(Flexible Disk))など)、光記録媒体(光ディスクなど)、光磁気記録媒体、半導体メモリなどのコンピュータ読取可能な記録媒体に記憶した状態で提供し得る。また、インターネット等の通信回線を介して画像処理装置100にダウンロードさせてもよい。
[Modification 7]
In the above-described embodiment, the character recognition unit 8 and the image direction determination unit 9 may be realized by the control unit 5 reading and executing a computer program stored in a storage medium such as the storage unit 6. In this case, the computer program includes a magnetic recording medium (magnetic tape, magnetic disk (HDD (Hard Disk Drive), FD (Flexible Disk), etc.)), optical recording medium (optical disk, etc.), magneto-optical recording medium, semiconductor memory, etc. It can be provided in a state stored in a computer-readable recording medium. Further, it may be downloaded to the image processing apparatus 100 via a communication line such as the Internet.

1…画像処理部、2…画像入力部、3…画像表示部、4…画像メモリ、5…制御部、6…記憶部、8…文字認識部、9…画像方向判定部、10…出力インターフェース部、40…運転免許証、81…文字列切り出し部、82…文字切り出し部、83…特徴抽出部、84…特徴比較部、85…特徴辞書格納部、86…類似文字認識部、89…文字数判定部、91…情報記録領域設定部、92…射影計算部、93…画像情報抽出部、94…外形矩形領域設定部、95…両端文字抽出部、96…各文字の中心位置検出部、97…全文字中心位置検出部、98…各文字両端位置検出部、99…文字数計数部、100…画像処理装置、101…射影算出部、102…二値化閾値決定部、103…二値化実行部。 DESCRIPTION OF SYMBOLS 1 ... Image processing part, 2 ... Image input part, 3 ... Image display part, 4 ... Image memory, 5 ... Control part, 6 ... Memory | storage part, 8 ... Character recognition part, 9 ... Image direction determination part, 10 ... Output interface , 40 ... Driver's license, 81 ... Character string cutout unit, 82 ... Character cutout unit, 83 ... Feature extraction unit, 84 ... Feature comparison unit, 85 ... Feature dictionary storage unit, 86 ... Similar character recognition unit, 89 ... Number of characters Determination unit 91... Information recording region setting unit 92. Projection calculation unit 93. Image information extraction unit 94. Outline rectangular region setting unit 95 95 Character extraction unit 96 96 Center position detection unit 97 for each character ... all character center position detection unit, 98 ... each character end position detection unit, 99 ... character number counting unit, 100 ... image processing device, 101 ... projection calculation unit, 102 ... binarization threshold value determination unit, 103 ... binarization execution Department.

Claims (6)

各々に一意に割り当てられた識別文字列が記された証明書の画像を、当該証明書に照射される光の反射光に基づいて読み取る画像入力部と、
前記画像入力部により読み取られた画像において、前記識別文字列が記されているべき領域からの反射光の分布を検出する検出部と、
前記検出部により検出された反射光の分布に従って、前記領域内にある文字の数が予め定められた数であるか否かを判定する文字数判定部と、
前記領域内にある文字の数が予め定められた数であると前記文字数判定部によって判定された場合には、前記証明書の画像の方向が正立方向であると判定する画像方向判定部と
を具備し、
前記文字数判定部は、前記検出された反射光の分布に従って、前記領域内において各文字の中心位置のそれぞれを起点として予め定められた方向に文字の端部を検出するための走査を行うことにより、各中心位置から予め定められた範囲内に文字の端部が含まれるか否かを判定し、当該判定結果に従って、当該領域内にある文字の数が予め定められた数であるかを判定する
ことを特徴とする画像処理装置。
An image input unit that reads an image of a certificate in which an identification character string uniquely assigned to each is recorded based on reflected light of light irradiated on the certificate;
In the image read by the image input unit, a detection unit for detecting a distribution of reflected light from a region where the identification character string is to be written;
A number-of-characters determination unit that determines whether the number of characters in the region is a predetermined number according to the distribution of reflected light detected by the detection unit;
An image direction determination unit that determines that the direction of the image of the certificate is an upright direction when the number of characters determination unit determines that the number of characters in the area is a predetermined number; equipped with,
The number-of-characters determination unit performs scanning for detecting an end portion of the character in a predetermined direction starting from each of the center positions of the characters in the region in accordance with the detected reflected light distribution. , Whether or not the end of the character is included within a predetermined range from each center position, and according to the determination result, determine whether the number of characters in the area is a predetermined number An image processing apparatus.
前記文字数判定部は、前記領域内に等間隔で配置されている文字の数が前記予め定められた数であるか否かを判定する
ことを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the character number determination unit determines whether or not the number of characters arranged at equal intervals in the region is the predetermined number.
前記領域内にある文字の数が予め定められた数ではないと前記文字数判定部によって判定された場合には、
前記画像入力部により読み取られた画像内の前記領域とは異なる第2の領域について、前記検出部が前記検出を行うとともに、前記文字数判定部が前記判定を行い、
前記画像方向判定部は、前記第2の領域内にある文字の数が予め定められた数であると前記文字数判定部によって判定された場合には、前記証明書の画像の方向が倒立方向であると判定する
ことを特徴とする請求項1又は2に記載の画像処理装置。
If the character number determination unit determines that the number of characters in the area is not a predetermined number,
For the second region different from the region in the image read by the image input unit, the detection unit performs the detection, the character number determination unit performs the determination,
The image direction determination unit determines that the direction of the image of the certificate is an inverted direction when the number of characters determination unit determines that the number of characters in the second area is a predetermined number. The image processing apparatus according to claim 1, wherein the image processing apparatus is determined to be present.
前記画像方向判定部は、前記領域内にある文字の数が予め定められた数でないと前記文字数判定部によって判定され、かつ、前記第2の領域内にある文字の数が予め定められた数でないと前記文字数判定部によって判定された場合には、前記証明書の画像が処理不能画像であると判定する
ことを特徴とする請求項3に記載の画像処理装置。
The image direction determination unit determines that the number of characters in the area is not a predetermined number and the number of characters determination unit determines that the number of characters in the second area is a predetermined number. The image processing apparatus according to claim 3, wherein if it is determined by the character number determination unit, the certificate image is determined to be an unprocessable image.
各々に一意に割り当てられた識別文字列が記された証明書の画像を、当該証明書に照射される光の反射光に基づいて読み取る画像入力部を備えるコンピュータが実行する画像方向判別方法であって、
前記画像入力部により読み取られた画像において、前記識別文字列が記されているべき領域からの反射光の分布を検出する検出ステップと、
前記検出ステップにおいて検出された反射光の分布に従って、前記領域内にある文字の数が予め定められた数であるか否かを判定する文字数判定ステップと、
前記領域内にある文字の数が予め定められた数であると前記文字数判定ステップにおいて判定された場合には、前記証明書の画像の方向が正立方向であると判定する画像方向判定ステップと
を備え
前記文字数判定ステップにおいては、前記検出された反射光の分布に従って、前記領域内において各文字の中心位置のそれぞれを起点として予め定められた方向に文字の端部を検出するための走査を行うことにより、各中心位置から予め定められた範囲内に文字の端部が含まれるか否かを判定し、当該判定結果に従って、当該領域内にある文字の数が予め定められた数であるかを判定す
ことを特徴とする画像処理方法。
An image orientation determination method executed by a computer having an image input unit that reads an image of a certificate in which an identification character string uniquely assigned to each certificate is written based on reflected light of light irradiated on the certificate. And
A detection step of detecting a distribution of reflected light from a region where the identification character string is to be written in the image read by the image input unit;
A number-of-characters determining step for determining whether the number of characters in the region is a predetermined number according to the distribution of reflected light detected in the detecting step;
An image direction determining step for determining that the image direction of the certificate is an erect direction when it is determined in the character number determining step that the number of characters in the area is a predetermined number; equipped with a,
In the number-of-characters determination step, scanning is performed to detect the end of the character in a predetermined direction starting from each center position of each character in the region in accordance with the detected reflected light distribution. To determine whether the end of the character is included within a predetermined range from each center position, and according to the determination result, whether the number of characters in the area is a predetermined number image processing method, wherein you determined.
各々に一意に割り当てられた識別文字列が記された証明書の画像を、当該証明書に照射される光の反射光に基づいて読み取る画像入力部を備えたコンピュータを、
前記画像入力部により読み取られた画像において、前記識別文字列が記されているべき領域からの反射光の分布を検出する検出部と、
前記検出部により検出された反射光の分布に従って、前記領域内にある文字の数が予め定められた数であるか否かを判定する文字数判定部と、
前記領域内にある文字の数が予め定められた数であると前記文字数判定部によって判定
された場合には、前記証明書の画像の方向が正立方向であると判定する画像方向判定部と
して機能させるためのプログラムであって、
前記文字数判定部は、前記検出された反射光の分布に従って、前記領域内において各文字の中心位置のそれぞれを起点として予め定められた方向に文字の端部を検出するための走査を行うことにより、各中心位置から予め定められた範囲内に文字の端部が含まれるか否かを判定し、当該判定結果に従って、当該領域内にある文字の数が予め定められた数であるかを判定する
プログラム
A computer including an image input unit that reads an image of a certificate in which an identification character string uniquely assigned to each certificate is written based on reflected light of light irradiated on the certificate,
In the image read by the image input unit, a detection unit for detecting a distribution of reflected light from a region where the identification character string is to be written;
A number-of-characters determination unit that determines whether the number of characters in the region is a predetermined number according to the distribution of reflected light detected by the detection unit;
An image direction determination unit that determines that the direction of the image of the certificate is an upright direction when the number of characters determination unit determines that the number of characters in the area is a predetermined number; A program to make it function ,
The number-of-characters determination unit performs scanning for detecting an end portion of the character in a predetermined direction starting from each of the center positions of the characters in the region in accordance with the detected reflected light distribution. , Whether or not the end of the character is included within a predetermined range from each center position, and according to the determination result, determine whether the number of characters in the area is a predetermined number Do
Program .
JP2012220214A 2012-10-02 2012-10-02 Image processing apparatus, image processing method, and program Active JP6144892B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012220214A JP6144892B2 (en) 2012-10-02 2012-10-02 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012220214A JP6144892B2 (en) 2012-10-02 2012-10-02 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2014071866A JP2014071866A (en) 2014-04-21
JP6144892B2 true JP6144892B2 (en) 2017-06-07

Family

ID=50746952

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012220214A Active JP6144892B2 (en) 2012-10-02 2012-10-02 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP6144892B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017175501A (en) * 2016-03-25 2017-09-28 京セラドキュメントソリューションズ株式会社 Image forming device and specific information collection program
JP6697829B2 (en) * 2016-08-24 2020-05-27 株式会社Pfu Mobile terminal, image processing method, and program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01270184A (en) * 1988-04-21 1989-10-27 Toshiba Corp Character reader for document
JPH04372085A (en) * 1991-06-21 1992-12-25 Fuji Electric Co Ltd Character reading method
JPH0765118A (en) * 1993-08-24 1995-03-10 Matsushita Electric Ind Co Ltd Device and method for driver's license image processing
JP2000187706A (en) * 1998-12-21 2000-07-04 Toshiba Corp Paper sheets reader
JP4377589B2 (en) * 2003-01-08 2009-12-02 グローリー株式会社 Bill serial number reading device and bill serial number reading method
JP2006184146A (en) * 2004-12-28 2006-07-13 Konica Minolta Photo Imaging Inc Card surface image processing system

Also Published As

Publication number Publication date
JP2014071866A (en) 2014-04-21

Similar Documents

Publication Publication Date Title
JP6080259B2 (en) Character cutting device and character cutting method
JP5591578B2 (en) Character string recognition apparatus and character string recognition method
JP3904840B2 (en) Ruled line extraction device for extracting ruled lines from multi-valued images
JP5334042B2 (en) Character string recognition method and character string recognition apparatus
US8559748B2 (en) Edge detection
JP4658848B2 (en) Character string recognition method and character string recognition apparatus
US9349237B2 (en) Method of authenticating a printed document
JP6268023B2 (en) Character recognition device and character cutout method thereof
US9171224B2 (en) Method of improving contrast for text extraction and recognition applications
JP2008198157A (en) Table recognition program, method, and device
US9251430B2 (en) Apparatus, method, and program for character recognition using minimum intensity curve of image data
JP4062987B2 (en) Image area dividing method, image area dividing apparatus, and image area dividing program
JP6144892B2 (en) Image processing apparatus, image processing method, and program
JP5630689B2 (en) Character recognition method and character recognition device
US8200016B2 (en) Method and apparatus for character string recognition
JP2898562B2 (en) License plate determination method
KR102094234B1 (en) Serial number recognition Apparatus and method for paper money
KR101635804B1 (en) CHT based automatic go recording system and the method
JPH10222587A (en) Method and device for automatically discriminating slip or the like
CN112215783B (en) Image noise point identification method, device, storage medium and equipment
KR101070051B1 (en) recognition method of unchangeability field in dotpattern.
JP3756660B2 (en) Image recognition method, apparatus and recording medium
JP6493559B2 (en) Character recognition device and character recognition method
JP5527523B2 (en) Image processing apparatus, image processing program, and image forming apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150907

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160809

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160920

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161118

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: 20170425

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170512

R150 Certificate of patent or registration of utility model

Ref document number: 6144892

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150