JP6319974B2 - Form reader and program - Google Patents

Form reader and program Download PDF

Info

Publication number
JP6319974B2
JP6319974B2 JP2013186996A JP2013186996A JP6319974B2 JP 6319974 B2 JP6319974 B2 JP 6319974B2 JP 2013186996 A JP2013186996 A JP 2013186996A JP 2013186996 A JP2013186996 A JP 2013186996A JP 6319974 B2 JP6319974 B2 JP 6319974B2
Authority
JP
Japan
Prior art keywords
image
unit
line
correction
average value
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.)
Expired - Fee Related
Application number
JP2013186996A
Other languages
Japanese (ja)
Other versions
JP2015055890A (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.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Digital Solutions 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 Toshiba Corp, Toshiba Digital Solutions Corp filed Critical Toshiba Corp
Priority to JP2013186996A priority Critical patent/JP6319974B2/en
Publication of JP2015055890A publication Critical patent/JP2015055890A/en
Application granted granted Critical
Publication of JP6319974B2 publication Critical patent/JP6319974B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明の実施形態は、帳票の画像の歪みを補正しその画像から帳票の文字を読み取る帳票読取装置およびプログラムに関する。   Embodiments described herein relate generally to a form reading apparatus and a program for correcting distortion of a form image and reading the form characters from the image.

例えばコンピュータなどの帳票読取装置では、デジタルカメラなどで取得した帳票の画像(デジタル写真など)を、文字認識アプリケーションソフトウェア(以下「OCRソフト」と称す)を利用して文字認識する技術が知られている。   For example, in a form reading apparatus such as a computer, a technique for recognizing a form image (digital photograph or the like) obtained by a digital camera or the like using character recognition application software (hereinafter referred to as “OCR software”) is known. Yes.

通常、デジタルカメラで撮影された写真には帳票が歪んで写っているため、従来の画像処理装置では、帳票の部分画像の外形(エッジ)を使って画像を補正した上で文字認識を行うことが行われている。   Normally, a photo taken with a digital camera shows the form in a distorted manner, so in a conventional image processing device, character recognition is performed after correcting the image using the outline (edge) of the partial image of the form. Has been done.

昨今、上記OCRソフトの機能をスマートフォン、タブレット等のカメラ付き携帯端末に搭載し、自動車の車検証などの特殊な帳票の読み取りに利用したいという要望がある。   Recently, there is a demand to install the above-described OCR software function in a mobile terminal with a camera such as a smartphone or a tablet, and to use it for reading a special form such as a car verification of an automobile.

特開平2002−74351号公報Japanese Patent Laid-Open No. 2002-74351

車検証などの帳票は、車両のコンソールボックス等に保管されることから、多くの場合、車検証入れなどの帳票フォルダに入れて二つ折りなどにして保管されている。   Forms such as car verification are stored in a console box of a vehicle, and are often stored in a form folder such as a car verification box and folded in half.

このような状態で保管されている車検証を車検証入れから取り出して携帯端末で撮影した場合、車検証入れの保管形状で車検証に二つ折りなどの型が付いて凹凸しているため、これを撮影しても印字内容が歪んだ帳票の画像になる。   If the car verification stored in such a state is taken out from the car verification case and photographed with a mobile terminal, the car verification has a storage shape of the car verification case and has a concave and convex shape such as a double fold. Even if an image is taken, the printed image is distorted.

この場合、画像内の車検証の外形が直線状(一定の形状)にはならないため、上記OCRソフトでは画像がうまく補正できないという問題がある。   In this case, since the vehicle verification outer shape in the image does not become linear (constant shape), there is a problem that the image cannot be corrected well by the OCR software.

また、仮に帳票の外形を利用して何らかの補正ができたとしても、この際の補正には帳票全体が含まれる画像が必要なことから、画像内の帳票に記載されている文字が小さく写り、かつ帳票の線がゆがんでいて色も薄いため帳票の外形基準では十分な認識精度が出ないことが多い。   In addition, even if some correction can be made using the outline of the form, since the image including the entire form is necessary for the correction at this time, the characters described in the form in the image are shown small, In addition, since the line of the form is distorted and the color is light, sufficient recognition accuracy is often not obtained with the form outline standard.

本発明が解決しようとする課題は、たわんだ状態で撮影された帳票の部分画像から文字を高精度に認識することができる帳票読取装置およびプログラムを提供することにある。   The problem to be solved by the present invention is to provide a form reading apparatus and a program capable of recognizing characters with high accuracy from partial images of a form taken in a bent state.

実施形態の帳票読取装置は、撮像部、タッチパネル、横線検出部、調整部、縦座標平均値算出部、画像補正部、文字認識部を具備する。前記撮像部は帳票の一部の読取対象部分を撮像する。前記タッチパネルは前記撮像部により撮像された前記帳票の一部の読取対象部分の画像を表示するとともにタッチ操作が可能である。前記横線検出部は撮像された前記帳票の一部の読取対象部位の画像の端から黒画素が連続する一つ以上の横線を検出する。前記調整部は検出された一つ以上の横線それぞれに対応した線の形状で前記タッチパネルに表示され、タッチ操作で線の形状を調整可能な修正用曲線を表示する。前記縦座標平均値算出部はタッチ操作で線の形状を前記横線に合わせるように調整した前記修正用曲線が直線になるように前記修正用曲線の縦方向の座標の平均値を算出する。前記画像補正部は前記縦方向の座標の平均値の位置に前記横線を配置するように画像を拡大または縮小して前記帳票の画像を補正する。前記文字認識部は前記画像補正部により補正された前記帳票の画像に対して文字認識する。 The form reading apparatus according to the embodiment includes an imaging unit, a touch panel, a horizontal line detection unit , an adjustment unit , an ordinate average value calculation unit, an image correction unit, and a character recognition unit. The imaging unit images a part of the form to be read . The touch panel displays an image of a part to be read of the form imaged by the imaging unit and allows a touch operation. The horizontal line detection unit detects one or more horizontal lines in which black pixels are continuous from an end of an image of a part to be read of the captured form. The adjustment unit displays a correction curve that is displayed on the touch panel in a line shape corresponding to each of the detected one or more horizontal lines, and the line shape can be adjusted by a touch operation . The ordinate average value calculation unit calculates an average value of the coordinates in the vertical direction of the correction curve so that the correction curve adjusted to match the shape of the line with the horizontal line by a touch operation becomes a straight line . The image correction unit corrects the image of the form by enlarging or reducing the image so that the horizontal line is arranged at the position of the average value of the vertical coordinates. The character recognition unit recognizes characters with respect to the image of the form corrected by the image correction unit.

帳票読取装置の一つの実施形態のタブレット端末の構成を示す図である。It is a figure which shows the structure of the tablet terminal of one embodiment of a form reading apparatus. 車検証の一例を示す図である。It is a figure which shows an example of vehicle verification. タブレット端末の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a tablet terminal. 車検証の一部をタブレット端末のタッチパネルに表示した様子を示す図である。It is a figure which shows a mode that a part of vehicle verification was displayed on the touch panel of a tablet terminal. 検出した横線に対応する補助線をタッチパネルに表示した様子を示す図である。It is a figure which shows a mode that the auxiliary line corresponding to the detected horizontal line was displayed on the touch panel. 補助線を縦方向にドラッグして上下の揺らぎを少なくする様子を示す図である。It is a figure which shows a mode that an auxiliary line is dragged to the vertical direction and an up-and-down fluctuation is decreased. 分離した補助線を横方向になぞって繋ぐ様子を示す図である。It is a figure which shows a mode that the separated auxiliary line is traced and connected in the horizontal direction. (a)は調整した補助線が表示された状態を示す図である。(b)は各補助線の縦方向の座標の平均値で線を模式的に描いた様子を示す図である。(A) is a figure showing the state where the adjusted auxiliary line was displayed. (B) is a figure which shows a mode that the line was typically drawn with the average value of the coordinate of the vertical direction of each auxiliary line. 車検証画像の一部を縦方向に切り出した画像を引き伸ばしまたは縮小する様子を示す図である。It is a figure which shows a mode that the image which cut out a part of vehicle verification image to the vertical direction is expanded or reduced. 補正された車検証の画像を示す図である。It is a figure which shows the image of the corrected vehicle verification.

以下、図面を参照して実施形態を詳細に説明する。図1は帳票読取装置の一つの実施形態であるタブレット端末の構成を示す図である。   Hereinafter, embodiments will be described in detail with reference to the drawings. FIG. 1 is a diagram showing a configuration of a tablet terminal which is one embodiment of a form reading apparatus.

図1に示すように、この実施形態のタブレット端末1は、例えばCPU、メモリ、SSDなどの記録媒体などを有する例えば、コンピュータである。タブレット端末1では、記録媒体にインストールされた制御ソフトウェアをCPUがメモリ上に読み出し、そのソフトウェアの処理を実行することで、タブレット端末1が帳票読取装置として機能する。   As shown in FIG. 1, the tablet terminal 1 of this embodiment is, for example, a computer having a recording medium such as a CPU, a memory, and an SSD. In the tablet terminal 1, the CPU reads the control software installed in the recording medium onto the memory and executes processing of the software, whereby the tablet terminal 1 functions as a form reading device.

タブレット端末は、撮像部としてのカメラ11、メモリ12、横線調整部13、縦座標平均値算出部14、画像補正部15、文字認識部16、表示&操作部としてのタッチパネル17を備える。   The tablet terminal includes a camera 11 as an imaging unit, a memory 12, a horizontal line adjustment unit 13, an ordinate average value calculation unit 14, an image correction unit 15, a character recognition unit 16, and a touch panel 17 as a display & operation unit.

カメラ11は、例えばCCDカメラなどであり、図2に示すように、文字読取対象の帳票としての車検証Aを撮像し、撮像した画像(イメージデータ)(以下これを「車検証画像21」(図4参照)という)をメモリ12に記憶する。車検証画像21は例えばモノクロイメージなどの画像である。   The camera 11 is, for example, a CCD camera or the like, and as shown in FIG. 2, the vehicle verification A as a character-reading form is imaged, and the captured image (image data) (hereinafter referred to as “vehicle verification image 21” ( (See FIG. 4)) is stored in the memory 12. The vehicle verification image 21 is an image such as a monochrome image.

つまりカメラ11は、車検証Aを光学的に読み取り、読み取った車検証画像21をメモリ12に記憶する。つまり撮像部としては、端末に内蔵されたカメラ11の他、例えば外部接続したCCDセンサなどを備えたデジタルカメラであってもよい。   That is, the camera 11 optically reads the vehicle verification A and stores the read vehicle verification image 21 in the memory 12. That is, as the imaging unit, in addition to the camera 11 built in the terminal, for example, a digital camera including an externally connected CCD sensor or the like may be used.

メモリ12には車検証画像21が記憶される。またメモリ12には、文字認識用の辞書などが記憶されている。メモリ12は各部により画像処理が行われる際の作業領域として機能する。   A vehicle verification image 21 is stored in the memory 12. The memory 12 stores a dictionary for character recognition. The memory 12 functions as a work area when image processing is performed by each unit.

横線調整部13は車検証画像21から黒画素が連続する横線を検出する。つまり横線調整部13は撮像された車検証画像21から一つ以上の横線を検出する横線検出部として機能する。   The horizontal line adjustment unit 13 detects a horizontal line with continuous black pixels from the vehicle verification image 21. That is, the horizontal line adjustment unit 13 functions as a horizontal line detection unit that detects one or more horizontal lines from the captured vehicle verification image 21.

横線調整部13は検出した横線に対応する画面上の位置に線調整用の補助線23a〜23r(図5参照)を表示する。より詳細には、横線調整部13は検出された一つ以上の横線に対応して線の位置を調整するための補助線23a〜23rをタッチパネル17に表示し、タッチ操作による補助線23a〜23rの調整操作に伴い補助線23a〜23rを調整する補助線調整部として機能する。   The horizontal line adjustment unit 13 displays auxiliary lines 23a to 23r for line adjustment (see FIG. 5) at positions on the screen corresponding to the detected horizontal line. More specifically, the horizontal line adjusting unit 13 displays auxiliary lines 23a to 23r for adjusting the positions of the lines corresponding to one or more detected horizontal lines on the touch panel 17, and auxiliary lines 23a to 23r by touch operation. It functions as an auxiliary line adjustment unit that adjusts the auxiliary lines 23a to 23r with the adjustment operation.

縦座標平均値算出部14は検出された横線について各画素単位に縦方向の座標の平均値を算出しメモリ12に記憶する。
画像補正部15は縦方向の座標の平均値の位置に横線の黒画素が配置されるように画像を拡大(引き伸ばし)または縮小して画像を補正(整形)する。
The ordinate average value calculator 14 calculates the average value of the coordinates in the vertical direction for each detected pixel on the horizontal line and stores it in the memory 12.
The image correction unit 15 corrects (shapes) the image by enlarging (stretching) or reducing the image so that the horizontal black pixels are arranged at the position of the average value of the vertical coordinates.

文字認識部16は画像補正部15により補正(整形)された車検証画像21に対して文字認識することで車検証Aの横線の間隔に記載または印字されている横書きの文字を読み取りテキストデータを得る。   The character recognizing unit 16 recognizes characters with respect to the vehicle verification image 21 corrected (shaped) by the image correcting unit 15 to read horizontal characters written or printed in the interval of the horizontal line of the vehicle verification A and read the text data. obtain.

文字認識部16は画像補正部15により補正されたメモリ12の車検証画像21を読み出し車検証画像21に対してレイアウト解析を行うことで、読み取り元の車検証Aの文書構造(画像のどの位置に文字または文字列が記載されているかなど)を得る。   The character recognition unit 16 reads out the vehicle verification image 21 in the memory 12 corrected by the image correction unit 15 and performs layout analysis on the vehicle verification image 21, so that the document structure (the position of the image in the vehicle verification A) Character or character string is described in

文字認識部16はレイアウト解析により解析された文書構造に従い車検証画像21を文字列の単位および文字の単位に切り出し、予めメモリ12に設定された文字認識用の辞書を参照して車検証Aの文字を認識する。   The character recognition unit 16 cuts out the vehicle verification image 21 into character string units and character units in accordance with the document structure analyzed by the layout analysis, and refers to a character recognition dictionary set in the memory 12 in advance, so that the vehicle verification A Recognize characters.

メモリ12には、文字認識部16により文字認識された結果の文字(テキスト)とこの文字に対応する文字画像とが対応して記憶される。   The memory 12 stores a character (text) as a result of character recognition by the character recognition unit 16 and a character image corresponding to the character.

タッチパネル17は情報の表示と入力の2つの機能を備えており、カメラ11で撮像した車検証画像21を液晶画面に表示すると共に、操作者が液晶画面に表示された画像(絵や写真など)の点または領域に手で触れることにより、触れられた画面位置の情報を感知して操作情報(信号)として出力する。すなわちタッチパネル17はカメラ11により撮像された車検証画像21を表示するとともにタッチ操作が可能なものである。   The touch panel 17 has two functions of information display and input. The vehicle verification image 21 captured by the camera 11 is displayed on the liquid crystal screen, and an image (picture or photograph) displayed on the liquid crystal screen by the operator. By touching the point or area with the hand, information on the touched screen position is sensed and output as operation information (signal). That is, the touch panel 17 displays a vehicle verification image 21 captured by the camera 11 and can be touched.

以下、図3乃至図10を参照してこの実施形態のタブレット端末1の動作を説明する。
このタブレット端末1では、車検証入れなどから取り出したよれた車検証Aを机などに広げる。そして、図2に示す車検証Aのうち、文字認識対象の文字が記載されている部分(文字認識に必要な一部の面)をカメラ11で撮影する。
Hereinafter, the operation of the tablet terminal 1 of this embodiment will be described with reference to FIGS. 3 to 10.
In the tablet terminal 1, the vehicle verification A that has been taken out from the vehicle verification slot or the like is spread on a desk or the like. Then, a portion of the vehicle verification A shown in FIG. 2 on which the character recognition target character is written (a part of the surface necessary for character recognition) is photographed by the camera 11.

この場合、タブレット端末1のカメラ11を車検証Aに向けて、図4に示すように、車検証Aの文字読取対象の部分がタッチパネル17の画面内に収まるようにしてシャッターボタン22を押すことでカメラ11が車検証Aを撮像し、車検証画像21がメモリ12に記憶される(図3のステップS101)。   In this case, the camera 11 of the tablet terminal 1 is directed to the vehicle verification A, and the shutter button 22 is pressed so that the character reading target portion of the vehicle verification A is within the screen of the touch panel 17 as shown in FIG. Thus, the camera 11 captures the vehicle verification A, and the vehicle verification image 21 is stored in the memory 12 (step S101 in FIG. 3).

横線調整部13はメモリ12に記憶された車検証画像21を読み出して、車検証画像21の中で画像の端から黒画素が連続する横線を検出し(ステップS102)、図5に示すように、タッチパネル17に、車検証画像21と、車検証画像21内に検出された横線に対応する補助線23a〜23rとを表示する(ステップS103)。   The horizontal line adjustment unit 13 reads the vehicle verification image 21 stored in the memory 12, detects a horizontal line in which black pixels continue from the edge of the image in the vehicle verification image 21 (step S102), as shown in FIG. The touch panel 17 displays the vehicle verification image 21 and auxiliary lines 23a to 23r corresponding to the horizontal lines detected in the vehicle verification image 21 (step S103).

補助線23a〜23rは検出した横線に対応したタッチパネル17の位置に歪んだ状態で表示される。また横線の検出性能は完全ではないため、補助線23a〜23rは実際の横線とは多少位置がずれて表示される場合もある。例えば横線が薄い部分については補助線23a〜23rが分離して(途切れて)表示されることもある。   The auxiliary lines 23a to 23r are displayed in a distorted state at the position of the touch panel 17 corresponding to the detected horizontal line. Further, since the detection performance of the horizontal line is not perfect, the auxiliary lines 23a to 23r may be displayed with a slight shift from the actual horizontal line. For example, the auxiliary lines 23a to 23r may be separated (broken) and displayed for the thin horizontal line.

そこで、この例では、補助線23a〜23rの調整を、ユーザの指によるタッチ操作によって行う(ステップS104)。   Therefore, in this example, the auxiliary lines 23a to 23r are adjusted by a touch operation with the user's finger (step S104).

この場合、タッチパネル17の補助線23a〜23rを指でドラックして、撮影した車検証画像21の正しい罫線の位置に補助線23a〜23rを移動する。補助線23a〜23rの調整を行った後、補正ボタン24をクリックすることで、次の処理(画像補正処理)に移る。   In this case, the auxiliary lines 23a to 23r of the touch panel 17 are dragged with a finger, and the auxiliary lines 23a to 23r are moved to the correct ruled line positions of the photographed vehicle verification image 21. After adjusting the auxiliary lines 23a to 23r, the correction button 24 is clicked to move to the next process (image correction process).

図6に示すように、タッチパネル17に表示されている補助線23a〜23rのうちのある補助線、例えば補助線23fなどが、撮影した車検証画像21の横線とずれている場合は、補助線23fを指61でタッチすると、横線調整部13はタッチした補助線23fをアクティブにする。   As shown in FIG. 6, when an auxiliary line among the auxiliary lines 23 a to 23 r displayed on the touch panel 17, for example, the auxiliary line 23 f is shifted from the horizontal line of the photographed vehicle verification image 21, the auxiliary line When 23f is touched with the finger 61, the horizontal line adjusting unit 13 activates the touched auxiliary line 23f.

そして、タッチした指61で補助線23fをそのまま矢印62の方向にドラックすると、横線調整部13は補助線23fを撮影した車検証Aの正しい罫線(横線)の位置に移動する。アクティブになるとは、例えば点滅表示など他の線とは表示形態が変わり、下部に補正ボタン24が表示される。   When the auxiliary line 23f is dragged in the direction of the arrow 62 as it is with the touched finger 61, the horizontal line adjustment unit 13 moves to the position of the correct ruled line (horizontal line) of the vehicle verification A in which the auxiliary line 23f is captured. When activated, for example, the display form changes from other lines such as blinking, and the correction button 24 is displayed at the bottom.

また、1本の補助線をさまざまな方向に修正したい場合は、例えば補助線23nのように、指63で補助線23nを一定の時間(1秒以上)タッチすると、横線調整部13は補助線23nをアクティブにし、ベジェー曲線修正用のポイント64を、補助線23nの上下に補助線23nに沿うように数点表示する。   Further, when it is desired to correct one auxiliary line in various directions, for example, the auxiliary line 23n is touched with a finger 63 for a certain period of time (1 second or more) like the auxiliary line 23n. 23n is activated, and several points 64 for correcting the Bezier curve are displayed above and below the auxiliary line 23n along the auxiliary line 23n.

ユーザが指63で所望のポイント64を移動操作することで、横線調整部13はポイント64の移動量に応じて補助線23nの一部を曲げ、補助線23nを所望の方向へ修正でき、補助線23nを車検証画像21の横線に合わせることができる。   When the user moves the desired point 64 with the finger 63, the horizontal line adjusting unit 13 can bend a part of the auxiliary line 23n according to the amount of movement of the point 64 and correct the auxiliary line 23n in a desired direction. The line 23n can be aligned with the horizontal line of the vehicle verification image 21.

また補助線23a〜23rのうち一部が分離して(途切れて)いる場合は、図7に示すように、指65で途切れている補助線どうし(例えば補助線23eと補助線23f)を選択すると、横線調整部13は選択された2つの補助線23e、23fをアクティブする。その後、指65で互いの補助線23e、23fを繋ぐようになぞることで、横線調整部13は補助線23eと補助線23fを繋げる。   If some of the auxiliary lines 23a to 23r are separated (disconnected), the auxiliary lines that are interrupted by the finger 65 (for example, the auxiliary line 23e and the auxiliary line 23f) are selected as shown in FIG. Then, the horizontal line adjustment unit 13 activates the two selected auxiliary lines 23e and 23f. Thereafter, the horizontal line adjusting unit 13 connects the auxiliary line 23e and the auxiliary line 23f by tracing the auxiliary lines 23e and 23f with the finger 65.

上記の操作を他の所望の補助線23a〜23rについても行い、補助線23a〜23rの調整を行った後、補正ボタン24をクリックすると、車検証画像21の横線の位置に補助線23a〜23rがほぼ重なり、補助線23a〜23rの位置が確定する。   When the above operation is performed for other desired auxiliary lines 23a to 23r and the auxiliary lines 23a to 23r are adjusted, and the correction button 24 is clicked, the auxiliary lines 23a to 23r are positioned at the horizontal lines of the vehicle verification image 21. Almost overlap, and the positions of the auxiliary lines 23a to 23r are determined.

補正ボタン24がクリックされたことで、縦座標平均値算出部14と画像補正部15は補正実行の指示があったものと判定し(ステップS105のYes)、横線とほぼ一致した各補助線23a〜23rを直線(各線の縦座標の平均値の位置)にするように車検証画像21を補正するために、以下の処理を行う。   When the correction button 24 is clicked, the ordinate average value calculation unit 14 and the image correction unit 15 determine that there is an instruction to execute correction (Yes in step S105), and each auxiliary line 23a that substantially matches the horizontal line. In order to correct the vehicle verification image 21 so that ˜23r is a straight line (the position of the average value of the ordinates of each line), the following processing is performed.

まず初めに、縦座標平均値算出部14は補助線23a〜23rに不連続な箇所があるか否か(線の途切れの有無)を確認する。この確認の結果、補助線23a〜23rに不連続な箇所がある(途切れが有る)場合(ステップS106のYes)、縦座標平均値算出部14は途切れのあるエラー箇所を表示し(ステップS107)、ステップS104の処理に戻し、該当する補助線の再調整を行わせる。   First, the ordinate average value calculation unit 14 checks whether or not there are discontinuous portions on the auxiliary lines 23a to 23r (whether or not there is a line break). As a result of the confirmation, if there are discontinuous portions (discontinuities are present) on the auxiliary lines 23a to 23r (Yes in step S106), the ordinate average value calculation unit 14 displays discontinuous error portions (step S107). Returning to the process of step S104, the corresponding auxiliary line is readjusted.

一方、上記確認の結果、途切れがない場合(ステップS106のNo)、縦座標平均値算出部14はそれぞれの補助線23a〜23rについて、縦方向座標の平均値を算出する(ステップS108)。   On the other hand, if there is no interruption as a result of the above confirmation (No in step S106), the ordinate average value calculation unit 14 calculates the average value of the ordinate in each auxiliary line 23a to 23r (step S108).

この場合、縦座標平均値算出部14は、図8(a)に示す車検証画像21の補助線23a〜23rに対応する各横線の画素毎に、図8(b)に示すように、縦方向の座標の平均値(座標)23a-av〜23r-avを求める。なお太い横線については、横線の線幅分の複数の画素毎に平均的な縦方向の位置(座標)を求める。つまり縦座標平均値算出部14は各補助線23a〜23r単位に縦方向の座標の平均値23a-av〜23r-avを算出しメモリ12に記憶する。   In this case, as shown in FIG. 8B, the ordinate average value calculation unit 14 performs the vertical axis as shown in FIG. 8B for each pixel of each horizontal line corresponding to the auxiliary lines 23a to 23r of the vehicle verification image 21 shown in FIG. Average values (coordinates) 23a-av to 23r-av of the direction coordinates are obtained. For thick horizontal lines, an average vertical position (coordinates) is obtained for each of a plurality of pixels corresponding to the width of the horizontal line. That is, the ordinate average value calculation unit 14 calculates the average values 23a-av to 23r-av of the vertical coordinates for each auxiliary line 23a to 23r and stores them in the memory 12.

続いて、画像補正部15は縦方向の座標の平均値23a-av〜23r-avの位置に横線の黒画素が配置されるように縦方向に画像を拡大(引き伸ばし)または縮小して車検証画像21を補正(整形)し(ステップS109)、メモリ12に記憶する。
模式的には、図9に示すように、車検証画像Aの一部を縦方向に切り出した画像91の各線(黒画素)が、平均値23a-av〜23r-avの位置に移動するように画像を縦方向に引き伸ばしまたは縮小する。
Subsequently, the image correction unit 15 enlarges (stretches) or reduces the image in the vertical direction so that the black pixels on the horizontal line are arranged at the average coordinate values 23a-av to 23r-av in the vertical direction, and verifies the vehicle. The image 21 is corrected (shaped) (step S109) and stored in the memory 12.
Typically, as shown in FIG. 9, each line (black pixel) of the image 91 obtained by cutting out a part of the vehicle verification image A in the vertical direction is moved to the position of the average values 23a-av to 23r-av. To enlarge or reduce the image vertically.

すなわち画像補正部15は各補助線23a〜23rの調整量分(移動分および結合分など)、車検証画像21の黒画素以外の画素を拡大(引き伸ばし)または縮小または削除して、横線が連続する直線にほぼ近い状態になるように車検証画像21を変形(補正)する。なお横方向に分離した2つの線を結合する場合は線間の黒画素以外の画素を削除する。   That is, the image correction unit 15 enlarges (stretches), reduces, or deletes pixels other than the black pixels of the vehicle verification image 21 by the adjustment amount (moving amount, combined amount, etc.) of each auxiliary line 23a to 23r, and the horizontal lines are continuous. The vehicle verification image 21 is deformed (corrected) so that the vehicle verification image 21 is almost close to the straight line. When two lines separated in the horizontal direction are combined, pixels other than black pixels between the lines are deleted.

この結果、図10に示すように、補正された画像92では、文字が横に綺麗に並ぶ(整列する)ため、文字と罫線を分離しやすくなり、文字認識の精度を向上でき、また画像上でもユーザの見た目も見やすくなる。   As a result, as shown in FIG. 10, in the corrected image 92, since the characters are neatly arranged (aligned) horizontally, it is easy to separate the characters from the ruled lines, and the accuracy of character recognition can be improved. However, the user's appearance is also easier to see.

このようにして車検証画像21が補正されると、文字認識部16は補正された車検証画像21をメモリ12から読み出して、車検証画像21に対してレイアウト解析を行い、レイアウト解析結果を基づいて文字部分の画像を切り出し、切り出した画像に対して文字認識を行い(ステップS110)、テキスト(文字コード)と文字画像とのペアからなる文字認識結果をメモリ12に記憶する。この動作をレイアウト解析結果として得られた全ての文字部分の画像について行う。   When the vehicle verification image 21 is corrected in this way, the character recognition unit 16 reads the corrected vehicle verification image 21 from the memory 12, performs layout analysis on the vehicle verification image 21, and based on the layout analysis result. Then, the image of the character part is cut out, character recognition is performed on the cut out image (step S110), and the character recognition result consisting of a pair of text (character code) and character image is stored in the memory 12. This operation is performed for images of all character parts obtained as a result of layout analysis.

このようにこの実施形態によれば、以下のような効果を得ることができる。
従来は帳票画像の上下左右の4つのエッジを利用して画像を補正していたため、エッジが複雑に歪んでいる場合には補正が難しいという問題があったが、本実施形態では、車検証Aに横に長い罫線があり、かつその罫線がほぼ左右のエッジに近いところまで一杯に引かれていることに着目し、撮像した車検証画像21の罫線(横線)を用いて車検証画像21を縦方向にだけ補正して文字認識する。
Thus, according to this embodiment, the following effects can be obtained.
Conventionally, since the image is corrected using four edges, top, bottom, left, and right of the form image, there is a problem that correction is difficult when the edges are complicatedly distorted. Paying attention to the fact that there is a long ruled line on the side and the ruled line is drawn almost to the edge of the left and right edges, and using the ruled line (horizontal line) of the captured vehicle verification image 21, Recognize characters with correction only in the vertical direction.

またこの実施形態では、車検証A全体ではなく車検証Aの一部分の画像(図4参照)を撮像してその部分画像の範囲内を文字認識するので、文字認識結果を短時間に得ることができる。また、車検証A全体を撮影する場合に比べて文字を高い解像度で撮影することができるから、文字認識の性能を向上させることができる。   Further, in this embodiment, an image of a part of the vehicle verification A (see FIG. 4) is captured instead of the entire vehicle verification A, and characters are recognized within the range of the partial image, so that a character recognition result can be obtained in a short time. it can. In addition, since characters can be photographed at a higher resolution than when the entire vehicle verification A is photographed, the performance of character recognition can be improved.

この実施形態では、画像に対して横方向の補正はしないが、車検証Aの文字は横書きで印刷されているので、文字が横一直線に並ぶ。現在の文字認識技術では、文字が横一直線に並んでいる方が精度よく文字を画像の中から検出し認識することができる。従って、この実施形態により画像を変形(補正または整形)することで、文字の検出精度および認識精度を高めることができる。   In this embodiment, the image is not corrected in the horizontal direction, but the characters of the car verification A are printed in horizontal writing, so the characters are aligned in a horizontal line. With the current character recognition technology, it is possible to detect and recognize a character from an image with higher accuracy when the characters are aligned in a horizontal line. Therefore, by deforming (correcting or shaping) an image according to this embodiment, it is possible to improve character detection accuracy and recognition accuracy.

以上、本発明の実施形態を説明したが、この実施形態は例として提示したものであり、発明の範囲を限定することは意図していない。この新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。この実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   As mentioned above, although embodiment of this invention was described, this embodiment is shown as an example and is not intending limiting the range of invention. The novel embodiment can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. This embodiment and its modifications are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

上記実施形態では、タッチパネル17に車検証画像Aを表示し、車検証画像Aに重ねるように補助線23a〜23rを表示してユーザのタッチ操作による線の調整を行った後、画像を補正する例について説明したが、ユーザのタッチ操作による線の調整が不要な場合には、横線調整部13を横線検出部とし、以下のように構成してもよい。   In the above embodiment, the vehicle verification image A is displayed on the touch panel 17, the auxiliary lines 23 a to 23 r are displayed so as to be superimposed on the vehicle verification image A, and the line is adjusted by the user's touch operation, and then the image is corrected. Although an example has been described, when line adjustment by a user's touch operation is not necessary, the horizontal line adjustment unit 13 may be a horizontal line detection unit and may be configured as follows.

この場合、タブレット端末1は、車検証画像Aなどの帳票を撮像するカメラ11(撮像部)と、撮像された車検証画像Aから一つ以上の横線を検出する横線検出部と、検出された一つ以上の横線の縦方向の座標の平均値を算出する縦座標平均値算出部14と、縦方向の座標の平均値の位置に横線を配置するように画像を拡大または縮小して車検証画像Aを補正する画像補正部15と、この画像補正部15により補正された車検証画像Aに対して文字認識する文字認識部16と、文字認識した結果を出力する出力部(表示部など)とを備える。これにより車検証Aを撮像後の一連の動作を自動化することができる。   In this case, the tablet terminal 1 is detected by a camera 11 (imaging unit) that captures a form such as the vehicle verification image A, and a horizontal line detection unit that detects one or more horizontal lines from the captured vehicle verification image A. An ordinate average value calculation unit 14 that calculates an average value of one or more horizontal lines in the vertical direction, and vehicle verification by enlarging or reducing the image so that a horizontal line is arranged at the position of the average value of the vertical direction coordinates. An image correction unit 15 that corrects the image A, a character recognition unit 16 that recognizes characters with respect to the vehicle verification image A corrected by the image correction unit 15, and an output unit (such as a display unit) that outputs the result of character recognition With. Thereby, a series of operations after imaging the vehicle verification A can be automated.

また上記実施形態では、各構成要素を、コンピュータのハードディスク装置などのストレージにインストールしたプログラムで実現したが、上記プログラムを、コンピュータ読取可能な電子媒体:electronic mediaに記憶しておき、プログラムを電子媒体からコンピュータに読み取らせることで本発明の機能をコンピュータが実現するようにしてもよい。電子媒体としては、例えばCD−ROM,DVD−ROM等の記録媒体やフラッシュメモリ、リムーバブルメディア:Removable media等が含まれる。さらに、ネットワークを介して接続した異なるコンピュータに構成要素を分散して記憶し、各構成要素を機能させたコンピュータ間で通信することで実現してもよい。   In the above embodiment, each component is realized by a program installed in a storage such as a hard disk device of a computer. However, the above program is stored in a computer-readable electronic medium: electronic media, and the program is stored in the electronic medium. The computer may realize the functions of the present invention by causing the computer to read the information. Examples of the electronic medium include a recording medium such as a CD-ROM and a DVD-ROM, a flash memory, a removable media, and the like. Further, the configuration may be realized by distributing and storing components in different computers connected via a network, and communicating between computers in which the components are functioning.

1…タブレット端末、11…カメラ、12…メモリ、13…横線調整部、14…縦座標平均値算出部、15…画像補正部、16…文字認識部、17…タッチパネル、23a-23r…補助線。   DESCRIPTION OF SYMBOLS 1 ... Tablet terminal, 11 ... Camera, 12 ... Memory, 13 ... Horizontal line adjustment part, 14 ... Vertical coordinate average value calculation part, 15 ... Image correction part, 16 ... Character recognition part, 17 ... Touch panel, 23a-23r ... Auxiliary line .

Claims (4)

帳票の一部の読取対象部分を撮像する撮像部と、
前記撮像部により撮像された前記帳票の一部の読取対象部分の画像を表示するとともにタッチ操作が可能なタッチパネルと、
撮像された前記帳票の一部の読取対象部位の画像の端から黒画素が連続する一つ以上の横線を検出する横線検出部と、
検出された一つ以上の横線それぞれに対応した線の形状で前記タッチパネルに表示され、タッチ操作で線の形状を調整可能な修正用曲線を表示する調整部と、
タッチ操作で線の形状を前記横線に合わせるように調整した前記修正用曲線が直線になるように前記修正用曲線の縦方向の座標の平均値を算出する縦座標平均値算出部と、
前記縦方向の座標の平均値の位置に前記横線を配置するように画像を拡大または縮小して前記帳票の画像を補正する画像補正部と、
前記画像補正部により補正された前記帳票の画像に対して文字認識する文字認識部と
を具備する帳票読取装置。
An imaging unit that images a part of the form to be read ;
A touch panel that displays an image of a part to be read of the form imaged by the imaging unit and is capable of a touch operation;
A horizontal line detection unit that detects one or more horizontal lines in which black pixels are continuous from an edge of an image of a part of the target to be read of the captured form ;
An adjustment unit that displays a correction curve that is displayed on the touch panel in the shape of a line corresponding to each of the detected one or more horizontal lines and that can adjust the shape of the line by a touch operation;
An ordinate average value calculating unit that calculates an average value of vertical coordinates of the correction curve so that the correction curve adjusted to match the shape of the line with the horizontal line by a touch operation becomes a straight line ;
An image correction unit that corrects the image of the form by enlarging or reducing the image so as to arrange the horizontal line at the position of the average value of the vertical coordinates;
A form reading apparatus comprising: a character recognition unit that recognizes characters with respect to the image of the form corrected by the image correction unit.
前記調整部は、
前記修正用曲線の一部が途切れている場合、途切れた修正用曲線どうしをタッチ操作で選択して互いを繋ぐようになぞることで、途切れた修正用曲線どうしを繋ぐ請求項1記載の帳票読取装置。
The adjustment unit is
2. The form reading according to claim 1, wherein when a part of the correction curve is interrupted, the interrupted correction curves are connected by selecting the interrupted correction curves by a touch operation and tracing them together. apparatus.
帳票の一部の読取対象部分を撮像する撮像部と前記撮像部により撮像された前記帳票の一部の読取対象部分の画像を表示するとともにタッチ操作が可能なタッチパネルとを有するコンピュータを、
前記撮像部により撮像された前記帳票の一部の読取対象部位の画像の端から黒画素が連続する一つ以上の横線を検出する横線検出部と、
検出された一つ以上の横線それぞれに対応した線の形状で前記タッチパネルに表示され、タッチ操作で線の形状を調整可能な修正用曲線を表示する調整部と、
タッチ操作で線の形状を前記横線に合わせるように調整した前記修正用曲線が直線になるように前記修正用曲線の縦方向の座標の平均値を算出する縦座標平均値算出部と、
前記縦方向の座標の平均値の位置に前記横線を配置するように画像を拡大または縮小して前記帳票の画像を補正する画像補正部と、
前記画像補正部により補正された前記帳票の画像に対して文字認識する文字認識部
として機能させるためのプログラム。
The Turkey computers that have a touch operation is possible touch displays images of a portion of the reading target portion of the document captured by the imaging unit and the imaging unit that captures an image of a part of the reading target portion of the form ,
A horizontal line detection unit that detects one or more horizontal lines in which black pixels are continuous from an end of an image of a part of the reading target portion of the form imaged by the imaging unit;
An adjustment unit that displays a correction curve that is displayed on the touch panel in the shape of a line corresponding to each of the detected one or more horizontal lines and that can adjust the shape of the line by a touch operation;
An ordinate average value calculating unit that calculates an average value of vertical coordinates of the correction curve so that the correction curve adjusted to match the shape of the line with the horizontal line by a touch operation becomes a straight line ;
An image correction unit that corrects the image of the form by enlarging or reducing the image so as to arrange the horizontal line at the position of the average value of the vertical coordinates;
A program for causing a character recognition unit to function as a character recognition unit for the form image corrected by the image correction unit.
前記調整部は、
前記修正用曲線の一部が途切れている場合、途切れた修正用曲線どうしをタッチ操作で選択して互いを繋ぐようになぞることで、途切れた修正用曲線どうしを繋ぐ請求項3記載のプログラム
The adjustment unit is
4. The program according to claim 3, wherein when a part of the correction curve is interrupted, the interrupted correction curves are connected by selecting the interrupted correction curves by a touch operation and tracing them so as to connect each other .
JP2013186996A 2013-09-10 2013-09-10 Form reader and program Expired - Fee Related JP6319974B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013186996A JP6319974B2 (en) 2013-09-10 2013-09-10 Form reader and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013186996A JP6319974B2 (en) 2013-09-10 2013-09-10 Form reader and program

Publications (2)

Publication Number Publication Date
JP2015055890A JP2015055890A (en) 2015-03-23
JP6319974B2 true JP6319974B2 (en) 2018-05-09

Family

ID=52820281

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013186996A Expired - Fee Related JP6319974B2 (en) 2013-09-10 2013-09-10 Form reader and program

Country Status (1)

Country Link
JP (1) JP6319974B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4357226B2 (en) * 2003-08-08 2009-11-04 日立オムロンターミナルソリューションズ株式会社 Form definition device, form definition method, and form definition program
JP2007249580A (en) * 2006-03-15 2007-09-27 Toshiba Corp Image processor, image processing program and image processing method

Also Published As

Publication number Publication date
JP2015055890A (en) 2015-03-23

Similar Documents

Publication Publication Date Title
US9589333B2 (en) Image correction apparatus for correcting distortion of an image
US9317893B2 (en) Methods and systems for correcting a document image
US10291843B2 (en) Information processing apparatus having camera function and producing guide display to capture character recognizable image, control method thereof, and storage medium
US10694098B2 (en) Apparatus displaying guide for imaging document, storage medium, and information processing method
US10031667B2 (en) Terminal device, display control method, and non-transitory computer-readable recording medium
US10810711B2 (en) Information processing apparatus, storage medium, and information processing method
WO2015021877A1 (en) Method and device for adsorbing straight line/line segment, and method and device for constructing polygon
US10643095B2 (en) Information processing apparatus, program, and information processing method
KR20120066567A (en) Image processing device and program
US10586099B2 (en) Information processing apparatus for tracking processing
US20160300321A1 (en) Information processing apparatus, method for controlling information processing apparatus, and storage medium
US10452943B2 (en) Information processing apparatus, control method of information processing apparatus, and storage medium
US10162501B2 (en) Terminal device, display control method, and non-transitory computer-readable recording medium
WO2015018337A1 (en) Method and device for snapping to line segment in image, method and device for constructing polygon
JP5377743B1 (en) Electronic device and handwritten document processing method
JP6164361B2 (en) Terminal device, display control method, and program
JP2016167715A (en) Image processing apparatus, image processing method and program
JP6319974B2 (en) Form reader and program
US10999513B2 (en) Information processing apparatus having camera function, display control method thereof, and storage medium
US20170116768A1 (en) Image jointing method
JP6607083B2 (en) Program and information processing apparatus
JP2017199288A (en) Image processing device, image processing method and program
JP2017120455A (en) Information processing device, program and control method
JP6973524B2 (en) program
JP6312488B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160826

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170714

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170725

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170925

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180403

R150 Certificate of patent or registration of utility model

Ref document number: 6319974

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees