JP4291870B1 - Kanji recognition program, portable terminal device, and kanji recognition method - Google Patents

Kanji recognition program, portable terminal device, and kanji recognition method Download PDF

Info

Publication number
JP4291870B1
JP4291870B1 JP2008214321A JP2008214321A JP4291870B1 JP 4291870 B1 JP4291870 B1 JP 4291870B1 JP 2008214321 A JP2008214321 A JP 2008214321A JP 2008214321 A JP2008214321 A JP 2008214321A JP 4291870 B1 JP4291870 B1 JP 4291870B1
Authority
JP
Japan
Prior art keywords
kanji
character
unit
reading
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.)
Expired - Fee Related
Application number
JP2008214321A
Other languages
Japanese (ja)
Other versions
JP2010049564A (en
Inventor
誉志 市川
宏二郎 山城
Original Assignee
株式会社アイエスピー
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社アイエスピー filed Critical 株式会社アイエスピー
Priority to JP2008214321A priority Critical patent/JP4291870B1/en
Application granted granted Critical
Publication of JP4291870B1 publication Critical patent/JP4291870B1/en
Publication of JP2010049564A publication Critical patent/JP2010049564A/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

【課題】処理能力が高性能ではない携帯端末装置の場合でも、簡易な操作で、撮像部が取得する画像データに含まれる漢字の読み仮名を軽快な動作で表示部に随時表示させることができる漢字認識プログラム、携帯端末装置、及び、漢字認識方法を提供する。
【解決手段】カメラ機能により画像データを取得する撮像部10と表示部50とを備える携帯端末装置1は、画像データに含まれる文字が漢字であるか否かを判定し、漢字の可能性がある画像部分を出力する漢字判定部20と、漢字判定部20が出力する画像部分に文字認識処理を行って文字コードを取得する文字認識部30と、文字認識部30が取得する文字コードに基づき読みデータ記憶部60から読み仮名情報を読み出し、読み出した読み仮名情報を表示部50に表示させる読み取得部40とを備える。
【選択図】図1
Even in the case of a portable terminal device whose processing capability is not high-performance, it is possible to display a kana reading kana included in image data acquired by an imaging unit on a display unit at any time with a simple operation with a simple operation. A kanji recognition program, a portable terminal device, and a kanji recognition method are provided.
A mobile terminal device including an imaging unit and a display unit that obtains image data by a camera function determines whether or not a character included in the image data is a kanji, and the possibility of a kanji is found. Based on the kanji determination unit 20 that outputs a certain image portion, the character recognition unit 30 that performs character recognition processing on the image portion that is output by the kanji determination unit 20 and acquires a character code, and the character code that the character recognition unit 30 acquires. A reading acquisition unit 40 that reads the reading kana information from the reading data storage unit 60 and causes the display unit 50 to display the read reading kana information.
[Selection] Figure 1

Description

本発明は、カメラ機能を備える携帯端末装置に用いられる漢字認識プログラム、携帯端末装置、及び、漢字認識方法に関する。   The present invention relates to a Chinese character recognition program, a mobile terminal device, and a Chinese character recognition method used in a mobile terminal device having a camera function.

近年、辞書を引く際、読みが分からない漢字であっても、検索対象の文字を画像として取り込み、OCR(光学文字認識:Optical Character Recognition)で文字を認識し、辞書を読み出す方法がある。例えば、特許文献1に示されるように、カメラ機能つき携帯電話機において、内部の記憶メモリに記録した撮像した画像データに対し、文字認識処理を行うことで文字データを取得し、この文字データをキーワードとして辞書データを検索し、表示させる方法がある。
特開2005−301914号公報
In recent years, there is a method of reading a dictionary by retrieving a character to be searched as an image, recognizing the character by OCR (Optical Character Recognition), even if it is a Chinese character whose reading is unknown when drawing a dictionary. For example, as disclosed in Patent Document 1, in a mobile phone with a camera function, character data is obtained by performing character recognition processing on captured image data recorded in an internal storage memory, and the character data is used as a keyword. There is a method for searching and displaying dictionary data.
JP 2005-301914 A

しかしながら、上述の特許文献1の技術において、撮影による画像の取得、文字認識処理の実行指示、文字認識処理、辞書検索処理、表示処理までに時間がかかったり、操作するユーザにおける入力手順が多いと、文章を読んでいる途中に複雑な処理等をしなければならないので、それまで読み進めた文章の流れや、ストーリーが分からなくなるという問題がある。
新聞や、書籍、文書などを読む際、意味などは前後の文脈等を考慮することで、読み手が推測することができるが、単純に漢字の「読み」のみを知りたい場合、「読み」を推測しにくいという問題がある。
However, in the technique of the above-described Patent Document 1, it takes time to acquire an image by photographing, execute an instruction for character recognition processing, character recognition processing, dictionary search processing, and display processing, or if there are many input procedures for the operating user. There is a problem in that it is difficult to understand the flow of the text read up to that point and the story because complicated processing must be performed while reading the text.
When reading newspapers, books, documents, etc., the meaning can be inferred by the reader by taking into account the context before and after, but if you simply want to know only the reading of the kanji, There is a problem that it is difficult to guess.

本発明は、このような事情を考慮し、上記の問題を解決すべくなされたもので、その目的は、簡易に操作することができ、撮像部が取得する画像データに含まれる漢字の読み仮名を軽快な動作で表示部に随時表示させることができる漢字認識プログラム、携帯端末装置、及び、漢字認識方法を提供することにある。   The present invention has been made in consideration of such circumstances and has been made to solve the above-described problems. The purpose of the present invention is to enable easy operation, and to read kana characters in kanji included in image data acquired by the imaging unit. Is to provide a kanji recognition program, a portable terminal device, and a kanji recognition method.

上記問題を解決するために、本発明は、文字列を撮像して画像データとして取得する撮像部と表示部とを備える携帯端末装置に用いられるコンピュータを前記画像データに含まれる文字が漢字であるか否かを判定し、漢字の可能性がある画像部分を出力する漢字判定部、前記漢字判定部が出力する画像部分に文字認識処理を行い、対応する文字識別情報を取得する文字認識部、文字識別情報と漢字の読み仮名を示す読み仮名情報とを対応付けた読みデータ記憶部、前記文字認識部が取得する文字識別情報に基づき、前記読みデータ記憶部から読み仮名情報を読み出し、前記表示部に表示させる読み取得部として機能させ、前記漢字判定部は、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合の最大値であって複数の前記判定対象の文字のうちの当該最大値を算出し、算出した最大値が予め定めた値を超えるか否かに応じて異なる閾値に基づいて、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合が前記閾値を超えるか否かに基づき判定対象の文字が漢字であるか否かを判定することを特徴とする漢字認識プログラムである。 In order to solve the above problem, the present invention provides a computer used in a portable terminal device that includes an imaging unit that captures a character string and acquires it as image data, and a display unit. The character included in the image data is a Chinese character. A character recognition unit that determines whether or not and outputs an image portion that may be a kanji character, performs character recognition processing on the image portion output by the kanji determination unit, and acquires corresponding character identification information; A reading data storage unit associating character identification information with reading kana information indicating kanji reading kana, reading the reading kana information from the reading data storage unit based on the character identification information acquired by the character recognition unit, and the display parts to thereby function as reading acquisition unit for displaying, the Chinese character determination unit includes a plurality of said-size a maximum percentage of the number of black pixels to the total number of pixels in the image range to be determined character Black pixels for the total number of pixels in the image range of the character to be determined based on a threshold value that is different depending on whether or not the calculated maximum value exceeds a predetermined value. It is a kanji recognition program characterized in that it is determined whether or not the character to be determined is a kanji based on whether the number ratio exceeds the threshold .

また、本発明の前記漢字判定部は、前記画像範囲において黒画素に囲まれた白画素の領域である白エリアの個数に基づき、判定対象の文字が漢字であるか否かを判定することを特徴とする。 Further, the kanji determination unit of the present invention determines whether the character to be determined is a kanji based on the number of white areas that are white pixel regions surrounded by black pixels in the image range. Features.

また、本発明の前記漢字判定部は、前記白エリアの個数が4個以上である場合、判定対象の文字を漢字であると判定することを特徴とする。 The kanji determination unit of the present invention is characterized in that, when the number of the white areas is four or more, the determination target character is determined to be a kanji.

また、本発明の前記漢字判定部は、漢字と漢字とで挟まれた判定対象の文字を熟語の一部の漢字として判定することを特徴とする。   In addition, the kanji determination unit according to the present invention is characterized in that a determination target character sandwiched between kanji and kanji is determined as a partial kanji of a idiom.

また、本発明は、文字列を撮像して画像データとして取得する撮像部と、表示部とを備える携帯端末装置であって、前記画像データに含まれる文字が漢字であるか否かを判定し、漢字の可能性がある画像部分を出力する漢字判定部と、前記漢字判定部が出力する画像部分に文字認識処理を行い、対応する文字識別情報を取得する文字認識部と、文字識別情報と漢字の読み仮名を示す読み仮名情報とを対応付けた読みデータ記憶部と、前記文字認識部が取得する文字識別情報に基づき、前記読みデータ記憶部から読み仮名情報を読み出し、前記表示部に表示させる読み取得部とを備え、前記漢字判定部は、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合の最大値であって複数の前記判定対象の文字のうちの当該最大値を算出し、算出した最大値が予め定めた値を超えるか否かに応じて異なる閾値に基づいて、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合が前記閾値を超えるか否かに基づき判定対象の文字が漢字であるか否かを判定することを特徴とする携帯端末装置である。 In addition, the present invention is a portable terminal device that includes an imaging unit that captures a character string and acquires it as image data, and a display unit, and determines whether or not the character included in the image data is a Chinese character. A character recognition unit that outputs an image portion that may be a kanji, a character recognition unit that performs character recognition processing on the image portion output by the kanji determination unit and obtains corresponding character identification information, and character identification information; Based on the reading data storage unit that associates the reading kana information indicating the reading kana of the kanji and the character identification information acquired by the character recognition unit, the reading kana information is read from the reading data storage unit and displayed on the display unit The kanji determination unit is a maximum value of the ratio of the number of black pixels to the total number of pixels in the image range of the character to be determined, and the maximum value among the plurality of characters to be determined Calculate Whether or not the ratio of the number of black pixels to the total number of pixels in the image range of the character to be determined exceeds the threshold based on a different threshold depending on whether or not the calculated maximum value exceeds a predetermined value. It is a portable terminal device characterized by determining whether the character of determination object is a Chinese character based on this.

また、本発明は、文字列を撮像して画像データとして取得する撮像部と、文字識別情報と漢字の読み仮名を示す読み仮名情報とを対応付けた読みデータ記憶部と、表示部とを備える携帯端末装置における漢字認識方法であって、前記画像データに含まれる文字が漢字であるか否かを判定し、漢字の可能性がある画像部分を出力する漢字判定過程と、出力した画像部分に文字認識処理を行い、対応する文字識別情報を取得する文字認識過程と、取得した前記文字識別情報に基づき、前記読みデータ記憶部から読み仮名情報を読み出し、前記表示部に表示させる読み取得過程とを有し、前記漢字判定過程にて、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合の最大値であって複数の前記判定対象の文字のうちの当該最大値を算出し、算出した最大値が予め定めた値を超えるか否かに応じて異なる閾値に基づいて、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合が前記閾値を超えるか否かに基づき判定対象の文字が漢字であるか否かを判定することを特徴とする漢字認識方法である。 In addition, the present invention includes an imaging unit that captures a character string and acquires it as image data, a reading data storage unit that associates character identification information and reading kana information indicating kanji reading kana, and a display unit. A method for recognizing kanji in a mobile terminal device, comprising: determining whether a character included in the image data is a kanji and outputting an image portion that may be a kanji; and an output image portion It performs character recognition processing, and the corresponding character identification information character recognition process of obtaining, based on the obtained the character identification information, read kana reading information from the read data storing unit, and reading acquisition process to be displayed on the display unit In the kanji determination process, the maximum value of the ratio of the number of black pixels to the total number of pixels in the image range of the character to be determined, and the maximum value among the plurality of characters to be determined Whether or not the ratio of the number of black pixels to the total number of pixels in the image range of the character to be determined exceeds the threshold based on a different threshold depending on whether the calculated maximum value exceeds a predetermined value It is a Chinese character recognition method characterized by determining whether the character of judgment object is a Chinese character based on this.

本発明によれば、携帯端末装置において、漢字判定部が、撮像部が取得する画像データのうち、漢字に該当する画像部分を文字認識部に出力することとした。
これにより、文字認識対象の画像部分に対して文字認識処理を行う場合、画像データの全範囲に対して文字認識処理を行う場合に比して、文字認識処理時間を必要最小限に抑制することが可能になり、読み仮名を表示部に表示させるまでの処理時間を短縮することが可能になるという効果がある。
According to the present invention, in the mobile terminal device, the kanji determination unit outputs the image portion corresponding to the kanji in the image data acquired by the imaging unit to the character recognition unit.
As a result, when character recognition processing is performed on an image portion to be character-recognized, the character recognition processing time can be minimized as compared with the case where character recognition processing is performed on the entire range of image data. As a result, it is possible to shorten the processing time until the reading kana is displayed on the display unit.

また、この発明によれば、漢字判定部は、黒画素数割合に基づき判定対象の文字が漢字であるか否かを判定することとした。
これにより、画数が多く、黒画素数割合が高い傾向にある文字を漢字として認識し、この画像部分に対する読み仮名を表示部に表示させることが可能になるという効果がある。
According to the present invention, the kanji determination unit determines whether or not the character to be determined is a kanji based on the ratio of the number of black pixels.
As a result, it is possible to recognize a character having a large number of strokes and a high ratio of black pixels as a Chinese character, and to display a reading kana for the image portion on the display unit.

また、この発明によれば、漢字判定部は、パターンマッチングに基づき、判定対象の文字が漢字であるか否かを判定することとした。
これにより、漢字の特徴に基づき、文字が漢字であるか否かを判定することができるため、漢字検出処理を高精度に行うことが可能になるという効果がある。
According to the present invention, the kanji determination unit determines whether or not the character to be determined is a kanji based on pattern matching.
Thereby, since it can be determined whether a character is a Chinese character based on the characteristic of a Chinese character, there exists an effect that it becomes possible to perform a Chinese character detection process with high precision.

また、この発明によれば、漢字判定部は、漢字と漢字とで挟まれた判定対象の文字を熟語の一部の漢字として判定することとした。これにより、漢字以外であると判定した文字のうち、熟語の一部の文字を漢字として判定することができ、熟語として読み仮名を表示することが可能になるという効果がある。   Further, according to the present invention, the kanji determining unit determines the character to be determined sandwiched between the kanji and the kanji as part of the idiom. As a result, among the characters determined to be other than kanji, some characters of the idiom can be determined as kanji, and the kana can be displayed as the idiom.

以下、本発明の一実施形態による携帯端末装置1を図1を参照して説明する。
図1は、本実施形態による携帯端末装置1を示すブロック図である。携帯端末装置1は、例えば、PDA(Personal Digital Assistants:情報携帯端末)、携帯電話などのコンピュータ端末であり、撮像部10、漢字判定部20、文字認識部30、読み取得部40、表示部50、読みデータ記憶部60、入力部70を備える。携帯端末装置1は、所定の周期t秒ごとに撮像部10が取得する画像データに対し、文字認識処理を行い、当該画像データの所定位置(たとえば、中央部)に含まれる漢字の読み仮名を撮像部10が撮影した画像とともに表示部50に表示する。
Hereinafter, a mobile terminal device 1 according to an embodiment of the present invention will be described with reference to FIG.
FIG. 1 is a block diagram showing a mobile terminal device 1 according to the present embodiment. The mobile terminal device 1 is a computer terminal such as a PDA (Personal Digital Assistants) or a mobile phone, for example, and includes an imaging unit 10, a kanji determination unit 20, a character recognition unit 30, a reading acquisition unit 40, and a display unit 50. A reading data storage unit 60 and an input unit 70 are provided. The mobile terminal device 1 performs a character recognition process on the image data acquired by the imaging unit 10 every predetermined period t seconds, and reads a kana reading of a kanji character included in a predetermined position (for example, the central portion) of the image data. The image is displayed on the display unit 50 together with the image captured by the imaging unit 10.

携帯端末装置1の撮像部10は、カメラ機能により画像データを取得し、漢字判定部20と表示部50とに出力する。
漢字判定部20は、撮像部10から入力される画像データから、漢字部分のみを抽出し、抽出した漢字部分の画像データを文字認識部30に出力する。
文字認識部30は、タイマー機能を備えており、撮像部10から入力される画像データのうち、所定の周期t秒ごとの画像データに対して文字認識処理(OCR処理)を行い、処理結果の漢字コードを読み取得部40に出力する。なお、漢字コードは、漢字を識別するための文字コード(文字識別情報)である。
The imaging unit 10 of the mobile terminal device 1 acquires image data by the camera function and outputs the image data to the kanji determination unit 20 and the display unit 50.
The kanji determination unit 20 extracts only the kanji part from the image data input from the imaging unit 10, and outputs the extracted image data of the kanji part to the character recognition unit 30.
The character recognition unit 30 has a timer function, and performs character recognition processing (OCR processing) on image data every predetermined period t seconds out of the image data input from the imaging unit 10. The kanji code is read and output to the acquisition unit 40. The kanji code is a character code (character identification information) for identifying a kanji.

読み取得部40は、文字認識部30から入力される漢字コードに基づき、当該漢字コードに対応する漢字の読み仮名を読みデータ記憶部60から読み出し、表示部50に読み出した漢字の読み仮名を示す読み仮名情報を出力する。
表示部50は、LCD(Liquid Crystal Display)などのディスプレイであり、撮像部10から入力される画像データと、読み取得部40から入力される読み仮名情報とを画像として表示する。
読みデータ記憶部60は、漢字コードと、読み仮名とを対応付けて記憶する記憶装置であり、漢字一字ごとの音読み、訓読み、2字以上の漢字を組み合わせた熟語の読みなどを記憶する。
入力部70は、キーボード、タッチパネル、ボタンなどの入力装置であり、ユーザによる入力操作を受け付けて、携帯端末装置1の各種機能の制御信号等を出力する。
Based on the kanji code input from the character recognition unit 30, the reading acquisition unit 40 reads a kanji reading kana corresponding to the kanji code from the reading data storage unit 60 and indicates the kanji reading kana read on the display unit 50. Outputs the reading information.
The display unit 50 is a display such as an LCD (Liquid Crystal Display), and displays image data input from the imaging unit 10 and reading kana information input from the reading acquisition unit 40 as images.
The reading data storage unit 60 is a storage device that stores a kanji code and a reading kana in association with each other, and stores sound reading for each kanji character, kanji reading, reading of a idiom combining two or more kanji characters, and the like.
The input unit 70 is an input device such as a keyboard, a touch panel, or a button. The input unit 70 receives an input operation by a user and outputs control signals for various functions of the mobile terminal device 1.

次に、本発明の一実施形態による携帯端末装置1の動作の概要についてフローチャートを用いて説明する。図2は、携帯端末装置1の読み表示処理フローの概略を示す図である。
携帯端末装置1において、入力部70は、ユーザの入力操作による読み仮名表示要求の入力を受け付けて、撮像部10と漢字判定部20とに対し、起動要求を出力する(ステップS1)。
Next, the outline | summary of operation | movement of the portable terminal device 1 by one Embodiment of this invention is demonstrated using a flowchart. FIG. 2 is a diagram showing an outline of the reading display processing flow of the mobile terminal device 1.
In the mobile terminal device 1, the input unit 70 receives an input of a reading kana display request by a user input operation, and outputs an activation request to the imaging unit 10 and the kanji determination unit 20 (step S1).

撮像部10は、入力部70からの起動要求を受けて、カメラ機能を起動し、取得した画像データを漢字判定部20と表示部50とに出力し、表示部50は入力された画像データを表示する(ステップS2)。漢字判定部20は、入力部70からの起動要求を受けて、撮像部10から入力される画像データに対し、漢字認識処理として、画像データの中央部から漢字部分を抽出するとともに、漢字判定部20は、所定の周期t秒のタイミングを取得するタイマーを起動する。
また、漢字判定部20は、画像データの中央部から漢字部分が抽出できない場合、漢字がないと判定して漢字部分を抽出するまで漢字認識処理を繰り返す。漢字判定部20は、撮像部10から入力される画像データの中央部から漢字部分を抽出した場合、抽出した画像データを文字認識部30に出力する(ステップS3)。
In response to the activation request from the input unit 70, the imaging unit 10 activates the camera function, outputs the acquired image data to the kanji determination unit 20 and the display unit 50, and the display unit 50 displays the input image data. Display (step S2). In response to an activation request from the input unit 70, the kanji determination unit 20 extracts a kanji part from the center of the image data as kanji recognition processing for the image data input from the imaging unit 10, and also determines a kanji determination unit. 20 starts a timer for obtaining a timing of a predetermined period t seconds.
In addition, when the kanji part cannot be extracted from the center of the image data, the kanji determination unit 20 repeats the kanji recognition process until it determines that there is no kanji and extracts the kanji part. When the Chinese character determination unit 20 extracts the Chinese character part from the central part of the image data input from the imaging unit 10, the Chinese character determination unit 20 outputs the extracted image data to the character recognition unit 30 (step S3).

文字認識部30は、漢字判定部20から入力される漢字部分の画像データに対して、OCR処理を行うことにより(ステップS4)、入力された漢字部分の文字に対応する漢字コードを取得し、取得した漢字コードを読み取得部40に出力する(ステップS5)。
読み取得部40は、例えば、逆FEP処理などにより、入力される漢字コードに対応する読み仮名情報を読みデータ記憶部60から読み出し、読み出した読み仮名情報を表示部50に出力する(ステップS6)。
The character recognition unit 30 performs an OCR process on the image data of the kanji portion input from the kanji determination unit 20 (step S4), thereby acquiring a kanji code corresponding to the input kanji character. The acquired kanji code is read and output to the acquisition unit 40 (step S5).
The reading acquisition unit 40 reads the reading kana information corresponding to the input kanji code from the reading data storage unit 60 by, for example, reverse FEP processing, and outputs the read reading kana information to the display unit 50 (step S6). .

表示部50は、撮像部10から順次入力される画像データを随時表示しており、読み取得部40から読み仮名情報が入力された場合、次の読み仮名情報が入力されるまで、画像データ上に入力された読み仮名情報を表示する(ステップS7)。
漢字判定部20は、所定の周期t秒が経過するごとにステップS3の処理を繰り返す(ステップS8)。
上述の実施形態によれば、漢字判定部20が、画像データから漢字部分のみを抽出し、抽出した画像データを文字認識部30に出力することにより、画像のサイズに応じて処理に時間がかかる文字認識処理において、文字認識処理時間を最小限にすることができる。これにより、撮像部10の画像データ取得から表示部50に漢字の読みを表示するまでの処理時間を短縮することが可能になるという効果がある。
The display unit 50 displays image data sequentially input from the image capturing unit 10 at any time. When reading kana information is input from the reading acquisition unit 40, the display unit 50 displays the image data until the next reading kana information is input. Is displayed (step S7).
The kanji determination unit 20 repeats the process of step S3 every time a predetermined period t seconds elapses (step S8).
According to the above-described embodiment, the kanji determination unit 20 extracts only the kanji part from the image data, and outputs the extracted image data to the character recognition unit 30, so that the processing takes time depending on the size of the image. In the character recognition process, the character recognition processing time can be minimized. Accordingly, there is an effect that it is possible to shorten the processing time from the acquisition of the image data of the imaging unit 10 to the display of the kanji reading on the display unit 50.

また、図3は、表示部50の画面遷移例を示す図である。図3(a)は、図2のステップS2における表示部50による画像データの画面表示例である。例えば、図3(a)に示す画像の場合、漢字判定部20が、ステップS3において、画像の中央部から漢字部分「選手」を抽出して読み取得部40に出力し、読み取得部40が読み仮名情報「せんしゅ」を読みデータ記憶部60から読み出して、表示部50に出力する。図3(b)は、図3(a)に読み仮名情報を表示した場合の表示部50の画面例である。なお、ここでは、読み仮名情報として「せんしゅ」のみを表示する場合を例示しているが、これに限らず、漢字コードに対応する複数の読み仮名情報を表示することでもよい。   FIG. 3 is a diagram illustrating a screen transition example of the display unit 50. FIG. 3A is a screen display example of image data by the display unit 50 in step S2 of FIG. For example, in the case of the image shown in FIG. 3A, the kanji determination unit 20 extracts the kanji portion “player” from the center of the image and outputs it to the reading acquisition unit 40 in step S3. The reading kana information “senshu” is read from the reading data storage unit 60 and output to the display unit 50. FIG. 3B is a screen example of the display unit 50 when the reading information is displayed in FIG. In addition, although the case where only "senshu" is displayed as reading kana information is illustrated here, the present invention is not limited to this, and a plurality of reading kana information corresponding to kanji codes may be displayed.

一方、図3(c)は、読み仮名情報「せんしゅ」を表示後に、漢字判定部20が漢字認識処理を行った際に、画像の中央部に漢字がない場合の表示部50の画面例である。同図に示すように、中央付近に漢字がない場合、ステップS2において漢字判定部20が漢字部分を抽出するまで漢字認識処理を繰り返し、文字認識部30の文字認識後、新たな読み仮名情報を読み取得部40が出力するまでの間、前回認識した読み仮名情報「せんしゅ」が表示部50に表示されることとなる。   On the other hand, FIG. 3C shows a screen example of the display unit 50 when there is no kanji in the center of the image when the kanji determination unit 20 performs kanji recognition processing after displaying the reading kana information “senshu”. It is. As shown in the figure, when there is no kanji near the center, the kanji recognition process is repeated until the kanji determination unit 20 extracts the kanji portion in step S2, and after the character recognition by the character recognition unit 30, new kana information is obtained. Until the reading acquisition unit 40 outputs, the kana information “senshu” recognized last time is displayed on the display unit 50.

図3(d)は、読み仮名情報として、漢字部分「採用」に対応する読み仮名情報「さいよう」を表示した場合の表示部50の画面例を示す。同図に示すように、漢字判定部20が画像の中央部から漢字部分「採用」を抽出すると、文字認識部30の文字認識後、読み取得部40が読み仮名情報「さいよう」を表示部50に出力し、表示部50が、前回の読み仮名情報「せんしゅ」に代えて新たな読み仮名情報「さいよう」を表示する。   FIG. 3D shows a screen example of the display unit 50 when the reading kana information “saiyo” corresponding to the kanji part “adopted” is displayed as the reading kana information. As shown in the figure, when the kanji determination unit 20 extracts the kanji part “adopted” from the center of the image, after the character recognition by the character recognition unit 30, the reading acquisition unit 40 displays the reading kana information “saiyo”. 50, the display unit 50 displays new reading kana information “saiyo” instead of the previous reading kana information “senshu”.

次に、漢字判定部20による漢字認識処理の動作の詳細について図面を用いて説明する。図4は、漢字判定部20における漢字認識処理の流れの概要を示すフロー図である。
漢字判定部20は、漢字認識処理として、ステップS11〜S18までの前処理の過程と、ステップS20〜ステップS60の各ステップにおいてサブルーチンとして実行するメイン処理の過程とを有し、画数が多い文字を漢字として検出する。
Next, details of the operation of the kanji recognition process by the kanji determination unit 20 will be described with reference to the drawings. FIG. 4 is a flowchart showing an outline of the flow of kanji recognition processing in the kanji determination unit 20.
The kanji determination unit 20 has a process of pre-processing from steps S11 to S18 and a process of main processing executed as a subroutine in steps S20 to S60 as kanji recognition processing. Detect as Kanji.

<前処理>
漢字判定部20は、漢字部分の抽出精度を向上させる前処理を行う。漢字判定部20は、入力された所定の周期t秒ごとの漢字認識処理の対象となる画像データに対し、文字要素ではない枠線などを除去する処理として、縦、及び横の棒線の除去処理を行う(ステップS11)。棒線の除去処理は、例えば、処理対象の画像の上辺、左辺、下辺、右辺のラインを1画素ずつ走査し、黒画素を棒線の画素として判定し、この黒画素に隣接する全ての黒画素を白画素に置換する処理である。画像の端の黒画素は、文字の一部や、棒線の一部である可能性が高い。また、文字の一部や、棒線は文字認識処理の対象外であるため、画像の端に存在する黒画素、及びこの黒画素に隣接する他の黒画素について白画素に置換することにより、文字認識処理に不要な黒画素を除去することが可能になる。
<Pretreatment>
The kanji determination unit 20 performs preprocessing to improve the extraction accuracy of the kanji part. The kanji determination unit 20 removes vertical and horizontal bar lines as a process of removing frame lines that are not character elements from the input image data subject to kanji recognition processing every predetermined period t seconds. Processing is performed (step S11). The bar line removal processing is performed by, for example, scanning the upper side, left side, lower side, and right side lines of the image to be processed one pixel at a time, determining black pixels as bar pixels, and determining all black pixels adjacent to the black pixels. This is a process of replacing a pixel with a white pixel. The black pixel at the edge of the image is likely to be part of a character or part of a bar. Also, since part of the characters and bar lines are not subject to character recognition processing, by replacing the black pixels existing at the edge of the image and other black pixels adjacent to the black pixels with white pixels, It becomes possible to remove black pixels unnecessary for the character recognition process.

次に、漢字判定部20は、処理対象の画像データに含まれる文字列が縦書きであるか横書きであるかを判定する(ステップS12)。この判定は、例えば、画像の水平方向(x軸方向)、又は、垂直方向(y軸方向)における黒画素と白画素との割合に基づき行う。具体的には、例えば水平方向について判定する場合、漢字判定部20は、画像データの左上の座標より、水平方向へ1行ずつ画像走査を行い、黒画素を検出した場合、処理対象の行を黒画素が存在する行を文字が存在する行(文字行)として判定し、次の行の画像走査処理を行う。また、行端までの画像走査において、黒画素を検出しなかった場合、処理対象の黒画素が存在しない行を文字間、又は、行間に該当する行であると判定する。漢字判定部20は、画像データの全ての行について画像走査を行い、文字行の行数と、文字ではない行の行数との比率を算出する。   Next, the kanji determination unit 20 determines whether the character string included in the image data to be processed is vertical writing or horizontal writing (step S12). This determination is performed based on, for example, the ratio of black pixels to white pixels in the horizontal direction (x-axis direction) or vertical direction (y-axis direction) of the image. Specifically, for example, when determining the horizontal direction, the kanji determination unit 20 performs image scanning one line at a time in the horizontal direction from the upper left coordinates of the image data, and when a black pixel is detected, the line to be processed is determined. A line in which black pixels exist is determined as a line in which characters exist (character line), and image scanning processing for the next line is performed. If no black pixel is detected in the image scanning up to the end of the line, it is determined that a line in which no black pixel to be processed exists is a line corresponding to a space between characters or a line. The kanji determination unit 20 performs image scanning for all lines of the image data, and calculates the ratio between the number of character lines and the number of lines that are not characters.

漢字判定部20は、算出した割合が所定の割合未満(例えば、全体に対し、文字ではない行の割合が20%未満)である場合、文字ではない行の間隔が文字間であり、対象の文字列が縦書きであることと判定する。また、漢字判定部20は、算出した割合が所定の割合以上である場合、文字ではない行の間隔が行間であり、対象の文字列が横書きであると判定する。
漢字判定部20は、縦書き、又は、横書きであるかを判定できた場合、ステップS14に進む。また、文字ではない行を検出できなかったなどにより、縦書き、横書きを判定できなかった場合、処理対象の当該画像データを破棄するとともに、当該画像データへの漢字認識処理を中止し、他の画像データへの漢字認識処理に移行する(ステップS13)。
When the calculated ratio is less than a predetermined ratio (for example, the ratio of non-character lines is less than 20% of the whole), the interval between non-character lines is between characters, and the target character It is determined that the character string is vertical writing. In addition, when the calculated ratio is equal to or greater than a predetermined ratio, the kanji determination unit 20 determines that the interval between lines that are not characters is between lines and the target character string is horizontal writing.
If the kanji determination unit 20 can determine whether the writing is vertical or horizontal, the process proceeds to step S14. In addition, when vertical writing or horizontal writing cannot be determined due to failure to detect a line that is not a character, the image data to be processed is discarded, and the kanji recognition process for the image data is stopped, The process proceeds to kanji recognition processing for image data (step S13).

漢字判定部20は、縦書き、横書きのいずれであるかの判定結果に基づき、行間を検出する(ステップS14)。例えば、漢字判定部20は、検出対象の文字列が縦書きである場合、x軸方向の中心座標を始点として右方向に1列ずつ垂直方向に画像走査し、文字が存在しない列を所定列数(例えば、3列)連続検出した場合、これらの列を画像データの中心の文字列に対する行間として検出する。同様に、漢字判定部20は、x軸方向の中心座標を始点として左方向に1列ずつ画像操作し、x軸方向の中心に存在する文字列の左右に存在する行間を検出する。
漢字判定部20は、行間を検出できた場合、ステップS16に進む。また、文字ではない列を検出できなかったなどにより、行間を検出できなかった場合、処理対象の当該画像データを破棄するとともに、当該画像データへの漢字認識処理を中止し、他の画像データへの漢字認識処理に移行する(ステップS15)。
The kanji determination unit 20 detects the line spacing based on the determination result of vertical writing or horizontal writing (step S14). For example, when the character string to be detected is vertically written, the kanji determination unit 20 performs image scanning in the vertical direction one column at a time starting from the center coordinate in the x-axis direction, and sets a column in which no character exists as a predetermined column. When a number (for example, three columns) is continuously detected, these columns are detected as the line spacing with respect to the character string at the center of the image data. Similarly, the kanji determination unit 20 operates the image one column at a time in the left direction starting from the center coordinate in the x-axis direction, and detects the line spacing existing on the left and right of the character string existing in the center in the x-axis direction.
If the kanji determination unit 20 can detect the line spacing, the process proceeds to step S16. In addition, when the line spacing cannot be detected due to failure to detect a column that is not a character, the image data to be processed is discarded, and the kanji recognition processing for the image data is stopped and another image data is transferred. The process proceeds to kanji character recognition processing (step S15).

漢字判定部20は、ステップS14において検出した2つの行間に挟まれた画像範囲において、文字間を検出する(ステップS16)。例えば、漢字判定部20は、検出対象の文字列が縦書きである場合、x軸方向の左の行間から右の行間までの範囲において、下方向に1行ずつ水平方向に画像走査し、文字が存在しない行を検出した場合、これらの行を文字間として検出する。漢字判定部20は、画像データの上辺から下辺に向かって画像走査を繰り返し、各文字間に挟まれた範囲を1文字の画像範囲として検出する。
漢字判定部20は、文字間を検出することにより、1文字の画像範囲を検出できた場合、ステップS18に進む。また、文字ではない行を検出できなかったなどにより、文字間を検出できなかった場合、処理対象の当該画像データを破棄するとともに、当該画像データへの漢字認識処理を中止し、他の画像データへの漢字認識処理に移行する(ステップS17)。
The kanji determination unit 20 detects a space between characters in the image range sandwiched between the two lines detected in step S14 (step S16). For example, when the character string to be detected is vertically written, the kanji determination unit 20 scans the image horizontally by one line downward in the range from the left line to the right line in the x-axis direction. When lines that do not exist are detected, these lines are detected as characters. The kanji determination unit 20 repeats image scanning from the upper side to the lower side of the image data, and detects a range between the characters as an image range of one character.
If the kanji determination unit 20 detects the image range of one character by detecting the space between characters, the process proceeds to step S18. In addition, when a line between characters cannot be detected because a line that is not a character cannot be detected, the image data to be processed is discarded, and the kanji recognition process for the image data is stopped, and other image data The process shifts to kanji recognition processing (step S17).

漢字判定部20は、ステップS14において検出した行間と、ステップS16において検出した文字間とに基づき検出した文字範囲の画像データを2値化する(ステップS18)。上述したステップS11〜S18の処理が前処理である。
なお、上述した前処理の各過程における具体的な処理内容は一例であり、後述のメイン処理において漢字認識処理の認識精度を向上させる処理であれば、いずれの処理でも適用可能である。
The kanji determination unit 20 binarizes the image data of the character range detected based on the line spacing detected in step S14 and the character spacing detected in step S16 (step S18). The processing of steps S11 to S18 described above is preprocessing.
Note that the specific processing content in each process of the preprocessing described above is an example, and any processing can be applied as long as it is a processing that improves the recognition accuracy of the kanji recognition processing in the main processing described later.

<メイン処理>
次に、画数が多い文字を漢字として検出するメイン処理のサブルーチンの概略について説明する。漢字判定部20は、文字面積に基づく漢字認識処理を行う(ステップS20)。図5は、縦書きの文字列「漢字認識アプリ」に対して処理を行う場合を例として、漢字認識処理の概要を示す図である。
図5(a)において、文字範囲M1〜M7は、上述の図4ステップS11〜S18において検出した行間と、文字間とに基づき漢字判定部20が検出する1文字ごとの文字範囲である。同図における文字範囲ごとに、漢字判定部20は、文字範囲の総画素数と、当該文字範囲の黒画素数とを検出し、総画素数に対する黒画素数の割合を算出する。
<Main processing>
Next, an outline of a subroutine of the main process for detecting characters with a large number of strokes as kanji will be described. The kanji determination unit 20 performs kanji recognition processing based on the character area (step S20). FIG. 5 is a diagram showing an outline of the kanji recognition process, taking as an example the case where the process is performed on the vertically written character string “kanji recognition app”.
In FIG. 5A, character ranges M1 to M7 are character ranges for each character detected by the kanji determination unit 20 based on the line spacing detected in steps S11 to S18 in FIG. 4 and the character spacing. For each character range in the figure, the kanji determining unit 20 detects the total number of pixels in the character range and the number of black pixels in the character range, and calculates the ratio of the number of black pixels to the total number of pixels.

次に漢字判定部20は、算出した黒画素数の割合が所定の閾値(例えば、50%)以上であるか否かに基づき、文字範囲ごとに当該文字範囲が漢字であるか否かを判定する。
漢字と、ひらがなやカタカナ、英数字等の漢字以外の文字とを比較すると、漢字の方が画数が多いという傾向がある。また、ユーザにおいて読み仮名を調べる対象の漢字についても、画数が多い傾向がある。黒画素数の割合が高い文字範囲は、画数が多い文字であると考えられるため、黒画素数の割合に基づき、文字範囲が漢字であるか否かを判定することが可能となる。
Next, the kanji determination unit 20 determines whether the character range is a kanji for each character range based on whether the calculated ratio of the number of black pixels is equal to or greater than a predetermined threshold (for example, 50%). To do.
When comparing kanji with non-kanji characters such as hiragana, katakana, and alphanumeric characters, kanji tends to have more strokes. In addition, there is a tendency that the number of strokes is also large for the kanji for which the user checks the reading kana. Since a character range with a high proportion of black pixels is considered to be a character with a large number of strokes, it can be determined whether or not the character range is kanji based on the proportion of black pixels.

なお、ステップS20に用いる所定の閾値は、黒画素数の割合の最大値が50%を超えるか否かに応じて異なる値を用いてもよい。例えば、図5(a)に示す細字の文字列の文字範囲M1〜M7のうち、最大の黒画素数割合は、文字範囲M4の黒画素数割合48%(<50%)であるため、漢字判定部20において、漢字か否かを判定する所定の閾値を30%とする。一方、図5(b)に示す太字の文字列の文字範囲m1〜m7のうち、最大の黒画素数割合は、文字範囲m4の黒画素数割合72%(≧50%)であるため、漢字判定部20において、漢字か否かを判定する所定の閾値を50%とする。   Note that the predetermined threshold value used in step S20 may be a different value depending on whether or not the maximum value of the ratio of the number of black pixels exceeds 50%. For example, in the character range M1 to M7 of the thin character string shown in FIG. 5A, the maximum black pixel number ratio is 48% (<50%) of the black pixel number of the character range M4. In the determination unit 20, a predetermined threshold value for determining whether or not the character is kanji is set to 30%. On the other hand, in the character range m1 to m7 of the bold character string shown in FIG. 5B, the maximum black pixel number ratio is 72% (≧ 50%) of the black pixel number of the character range m4. In the determination unit 20, a predetermined threshold value for determining whether or not the character is a Chinese character is set to 50%.

これにより、例えば、新聞などのように、タイトル文字と、本文文字とで異なるフォント、字体を用いている場合でも、黒画素数の最大の割合に基づきタイトル文字であるか本文文字であるかを判定し、太字体のタイトル文字における閾値を本文文字における閾値よりも大きな値とすることにより、漢字認識精度を上げることが可能になる。
漢字判定部20は、例示した図5(a)であれば、文字範囲M1、M3、M4を、図5(b)であれば、文字範囲m1、m3、m4を漢字として判定する。
Thus, for example, even in the case of using different fonts and fonts for title characters and body characters, such as newspapers, the title character or body character is determined based on the maximum ratio of the number of black pixels. It is possible to increase the accuracy of kanji recognition by making a determination and setting the threshold value for the title text in bold type to be larger than the threshold value for the text character.
The kanji determination unit 20 determines the character ranges M1, M3, and M4 as kanji characters in FIG. 5 (a), and the character ranges m1, m3, and m4 in FIG. 5 (b).

図4に戻り、漢字判定部20は、パターンマッチングによる漢字認識処理を行う(ステップS30)。ステップS30における漢字認識処理は、各文字範囲の矩形内の閉じられた白エリアの個数に基づき行う処理である。漢字判定部20は、文字範囲の矩形範囲において、左上から画像走査を行い、白画素を検出すると、検出した白画素に隣接する全白画素のエリア(白エリア)を黒画素に塗りつぶし、矩形内を全て黒画素に塗りつぶすまで、白エリアの塗りつぶし処理を繰り返す。この塗りつぶし処理の回数から1減算した数が、当該文字範囲の矩形範囲における白エリアの個数となる。なお、ひらがな、カタカナ、及び英数字において、最大の白エリアの個数が3であるため、ここでは、漢字判定部20は、白エリアが4個以上となる文字範囲を漢字として判定する。   Returning to FIG. 4, the kanji determination unit 20 performs kanji recognition processing by pattern matching (step S30). The kanji recognition processing in step S30 is processing performed based on the number of closed white areas in the rectangle of each character range. In the rectangular range of the character range, the kanji determination unit 20 scans the image from the upper left, and when a white pixel is detected, the area of the all white pixels (white area) adjacent to the detected white pixel is painted on the black pixel. Repeat the process of filling the white area until all the black pixels are filled. The number obtained by subtracting 1 from the number of times of filling processing is the number of white areas in the rectangular range of the character range. Since the maximum number of white areas in hiragana, katakana, and alphanumeric characters is 3, here, the kanji determination unit 20 determines a character range having 4 or more white areas as kanji.

上述したように、漢字は画数が多い傾向があり、画数が多い漢字においては、閉じられた白エリアが複数存在する場合がある。これに基づき、白エリアが4以上存在する場合を漢字として判定することが可能になる。なお、例えば、ひらがなにおいて、白エリアが3個となる文字は、「あ」(字体に依る)や「ぬ」など、非常に少数であるため、例えば、白エリアが3個以上の文字を漢字として検出することでもよい。   As described above, kanji tends to have a large number of strokes, and a kanji having a large number of strokes may have a plurality of closed white areas. Based on this, it is possible to determine that there are four or more white areas as kanji. For example, in Hiragana, there are very few characters that have three white areas such as “A” (depending on the font) and “Nu”. It may be detected as

図6は、縦書きの文字列「漢字認識アプリ」のうち、例えば、文字範囲M3の文字「識」に対してステップS30の処理を行う場合を例として、漢字認識処理の概要を示す図である。同図に示すように、文字「識」において、全エリアを黒画素に塗りつぶすまでに、白エリアを5回塗りつぶす処理が必要となるため、漢字判定部20は、5から1減算した値「4」を文字「識」の白エリアの個数として算出する。漢字判定部20は、白エリアの個数が4個以上であることから、文字範囲M3を漢字として判定する。   FIG. 6 is a diagram showing an outline of the kanji recognition process, taking as an example the case where the process of step S30 is performed on the character “knowledge” in the character range M3 in the vertically written character string “kanji recognition app”. is there. As shown in the figure, in the character “K”, the white area needs to be painted five times before the entire area is painted with black pixels. "Is calculated as the number of white areas of the character" Kan ". Since the number of white areas is four or more, the kanji determination unit 20 determines the character range M3 as a kanji.

図4に戻り、漢字判定部20は、ステップS11〜S18において検出した全文字範囲(例えば文字範囲M1〜M7)について、漢字であるか否かを判定し、いずれか1つ以上の文字範囲を漢字として認識できた場合、ステップS50に進む。また、いずれの文字範囲においても漢字を検出できなかった場合、処理対象の当該画像データを破棄するとともに、当該画像データへの漢字認識処理を中止し、他の画像データへの漢字認識処理に移行する(ステップS40)。   Returning to FIG. 4, the kanji determination unit 20 determines whether or not all the character ranges (for example, the character ranges M1 to M7) detected in steps S11 to S18 are kanji, and determines any one or more character ranges. If it can be recognized as a Chinese character, the process proceeds to step S50. If no Kanji character can be detected in any of the character ranges, the image data to be processed is discarded and the Kanji recognition process for the image data is stopped, and the process proceeds to Kanji recognition processing for other image data. (Step S40).

次に、漢字判定部20は、検出した漢字が熟語であるか否かを判定する(ステップS50)。この熟語認識処理は、前後の文字、すなわち、上下に隣接する文字範囲がいずれも漢字である文字範囲を漢字として認識する処理である。例えば、図5の文字範囲M2は、黒画素数割合と、白エリア数とのいずれについても漢字である条件を満たしていないが、前後の文字範囲M1と文字範囲M3とがいずれも漢字であるため、文字範囲M2も漢字であると判定する。   Next, the kanji determination unit 20 determines whether or not the detected kanji is an idiom (step S50). This idiom recognition process is a process for recognizing the preceding and following characters, that is, the character ranges in which the upper and lower adjacent character ranges are kanji as kanji. For example, the character range M2 in FIG. 5 does not satisfy the condition of being in Chinese characters for both the ratio of the number of black pixels and the number of white areas, but the character range M1 and the character range M3 before and after are both Chinese characters. Therefore, it is determined that the character range M2 is also a Chinese character.

図4に戻り、漢字判定部20は、文字認識対象である漢字の画像範囲の切り出し座標を算出し、算出した切り出し座標の範囲を文字認識対象の画像データとして文字認識部30に出力する(ステップS60)。ステップS60における切り出し座標の算出処理は、漢字判定部20が、画像データの中心座標、すなわち、x座標中心、y座標中心となる点から最も近い漢字を検出し、検出した漢字を中心とする前後の文字範囲において、漢字ではない文字が出現するまでの範囲を切り出し範囲とする。具体的には、漢字判定部20は、図7に示すように、画像中心に最も近い文字範囲m4の漢字「識」を中心として、漢字の範囲を検出する。同図において、漢字判定部20は、文字範囲m1の漢字「漢」を切り出しの開始文字とし、漢字ではない文字としてカタカナ「ア」が出現する文字範囲m5の前の文字範囲m4を切り出しの終了文字として切り出し対象の範囲を検出する。   Returning to FIG. 4, the kanji determination unit 20 calculates the cutout coordinates of the image range of the kanji that is the character recognition target, and outputs the calculated cutout coordinate range to the character recognition unit 30 as the image data of the character recognition target (step). S60). In the cut-out coordinate calculation process in step S60, the kanji determination unit 20 detects the closest kanji from the center coordinates of the image data, that is, the x-coordinate center and the y-coordinate center, and before and after centering on the detected kanji. In this character range, a range until a character that is not a Chinese character appears is defined as a cutout range. Specifically, as shown in FIG. 7, the kanji determination unit 20 detects the range of the kanji with the kanji “knowledge” in the character range m4 closest to the center of the image as the center. In the figure, the kanji determination unit 20 sets the kanji character “Kan” in the character range m1 as the start character for extraction, and ends the character range m4 before the character range m5 in which the katakana “a” appears as a character that is not a Kanji character. A range to be cut out is detected as a character.

上述したメイン処理により、画数が少ない漢字が一文字だけ存在する場合は、読み仮名の難読度が低い傾向があると考えられるため、漢字として読み仮名を検出する処理を行わないことにより、漢字認識処理の処理数を減少させることが可能になるという効果がある。
また、ステップS50の処理により、ステップS20、S30において画数が少なく、漢字ではないと認識された熟語に含まれる漢字(例えば、図7に示すように文字範囲m2の文字「字」)を漢字として検出することができ、熟語部分の画像データを一続きのまとまりとして文字認識部30に出力することが可能になるという効果がある。
If there is only one Kanji character with a small number of strokes due to the main processing described above, it is considered that the reading difficulty of Kana characters is likely to be low. It is possible to reduce the number of processes.
In addition, by the process of step S50, the kanji (for example, the character “character” in the character range m2 as shown in FIG. 7) included in the idiom recognized as not being a kanji has a small number of strokes in steps S20 and S30. Thus, the image data of the idiom portion can be output to the character recognition unit 30 as a continuous group.

<ステップS20:黒画素数割合に基づく漢字認識処理>
次に、上述した図4のメイン処理のステップS20〜S60のサブルーチンの処理の詳細について図面を用いて説明する。図8は、図4のステップS20における黒画素数割合に基づく漢字認識処理の流れを示すフロー図である。
漢字判定部20は、処理対象の文字範囲の矩形内の左上座標より画像走査を開始する(ステップS201)。漢字判定部20は、処理対象の画素の画素値が0であるか否かを判定し、画素値が0と判定した場合、ステップS204に進み(ステップS202)、画素値が0ではない場合、黒画素数を1加算する(ステップS203)。
<Step S20: Kanji recognition processing based on black pixel number ratio>
Next, details of the subroutine processing of steps S20 to S60 of the main processing of FIG. 4 described above will be described with reference to the drawings. FIG. 8 is a flowchart showing the flow of kanji recognition processing based on the black pixel number ratio in step S20 of FIG.
The kanji determination unit 20 starts image scanning from the upper left coordinates in the rectangle of the character range to be processed (step S201). The kanji determination unit 20 determines whether or not the pixel value of the pixel to be processed is 0. If the pixel value is determined to be 0, the process proceeds to step S204 (step S202). If the pixel value is not 0, The number of black pixels is incremented by 1 (step S203).

漢字判定部20は、総画素数を1加算し(ステップS204)、当該画素が処理対象の最後の画素であるか否かを判定し、最後の画素であると判定した場合、ステップS207に進み、最後の画素ではないと判定した場合、ステップS206の処理に進む(ステップS205)。漢字判定部20は、次の画素に移動し、ステップS202の処理に戻る(ステップS206)。
漢字判定部20は、黒画素数割合を次式に基づき算出する(ステップS207)。
黒画素数割合=(黒画素数÷総画素数)×100
The kanji determination unit 20 adds 1 to the total number of pixels (step S204), determines whether the pixel is the last pixel to be processed, and determines that the pixel is the last pixel, the process proceeds to step S207. If it is determined that the pixel is not the last pixel, the process proceeds to step S206 (step S205). The kanji determination unit 20 moves to the next pixel and returns to the process of step S202 (step S206).
The kanji determination unit 20 calculates the black pixel number ratio based on the following equation (step S207).
Black pixel ratio = (number of black pixels / total number of pixels) x 100

漢字判定部20は、漢字判定処理対象の文字範囲が最後の文字であるか否かを判定し、最後の文字であると判定した場合、ステップS209の処理に進み、最後の文字ではないと判定した場合、次の文字について、ステップS1の処理に戻る(ステップS208)。
漢字判定部20は、算出した黒画素数割合の最大値とタイトル部分と本文部分との判別用閾値の50%とを比較する(ステップS209)。
漢字判定部20は、比較の結果、最大値が50%未満の場合、漢字か否かを判定する所定の閾値を30%とし(ステップS210−1)、最大値が50%以上の場合、漢字か否かを判定する所定の閾値を50%とする(ステップS210−2)。
The kanji determination unit 20 determines whether or not the character range subject to kanji determination processing is the last character. When it is determined that the character range is the last character, the process proceeds to step S209 and is determined not to be the last character. If so, the process returns to step S1 for the next character (step S208).
The kanji determination unit 20 compares the calculated maximum value of the number of black pixels with 50% of the determination threshold value between the title part and the body part (step S209).
If the maximum value is less than 50% as a result of the comparison, the kanji determination unit 20 sets a predetermined threshold value for determining whether or not it is a kanji as 30% (step S210-1). If the maximum value is 50% or more, the kanji is determined. The predetermined threshold value for determining whether or not is 50% (step S210-2).

漢字判定部20は、黒画素数割合と所定の閾値とを比較し(ステップS211)、黒画素数割合が所定の閾値を超える場合、判定対象の文字が漢字であると判定し(ステップS212−1)、黒画素数割合が所定の閾値以下の場合、判定対象の文字が漢字ではないと判定する(ステップS212−2)。
漢字判定部20は、漢字判定処理対象の文字範囲が最後の文字であるか否かを判定し、最後の文字であると判定した場合、黒画素数割合に基づく漢字判定処理を終了し、最後の文字ではないと判定した場合、次の文字について、ステップS201の処理に戻る(ステップS213)。
The kanji determination unit 20 compares the black pixel number ratio with a predetermined threshold (step S211), and determines that the character to be determined is a kanji character when the black pixel number ratio exceeds the predetermined threshold (step S212- 1) When the ratio of the number of black pixels is equal to or less than a predetermined threshold value, it is determined that the character to be determined is not a Chinese character (step S212-2).
The kanji determination unit 20 determines whether or not the character range subject to kanji determination processing is the last character. If it is determined that the character range is the last character, the kanji determination processing based on the black pixel number ratio ends. If it is determined that the character is not, the process returns to step S201 for the next character (step S213).

<ステップS30:パターンマッチングに基づく漢字認識処理>
次に、上述した図4のメイン処理のステップS30のサブルーチンの処理の詳細について図面を用いて説明する。図9は、図4のステップS30におけるパターンマッチングに基づく漢字認識処理の流れを示すフロー図である。
漢字判定部20は、矩形内の左上座標より画像走査を開始すると(ステップS301)、画素値が0であるか否かを判定し、画素値が0と判定した場合、ステップS303に進む(ステップS302)。漢字判定部20は、白エリアを塗りつぶすサブルーチンを実行し(ステップS303)、塗りつぶし回数を1加算し、ステップS301の処理に戻る(ステップS304)。
<Step S30: Kanji recognition processing based on pattern matching>
Next, details of the subroutine processing of step S30 of the main processing of FIG. 4 described above will be described with reference to the drawings. FIG. 9 is a flowchart showing the flow of kanji recognition processing based on pattern matching in step S30 of FIG.
The kanji determination unit 20 starts image scanning from the upper left coordinates in the rectangle (step S301), determines whether or not the pixel value is 0, and proceeds to step S303 if the pixel value is determined to be 0 (step S303). S302). The kanji determination unit 20 executes a subroutine for painting the white area (step S303), adds 1 to the number of paintings, and returns to the process of step S301 (step S304).

漢字判定部20は、ステップS302において、画素値が0ではないと判定した場合、当該画素が処理対象の最後の画素であるか否かを判定し、最後の画素であると判定した場合、ステップS307に進み、最後の画素ではないと判定した場合、ステップS306の処理に進む(ステップS305)、次の画素に移動し、ステップS302の処理に戻る(ステップS306)。
漢字判定部20は、塗りつぶし回数から1減算することにより、閉じられた白エリアの数を算出し(ステップS307)、算出した閉じられた白エリアの数と、3とを比較する(ステップS308)。
If the kanji determination unit 20 determines in step S302 that the pixel value is not 0, it determines whether or not the pixel is the last pixel to be processed, and if it determines that the pixel is the last pixel, step If it is determined that the pixel is not the last pixel, the process proceeds to step S306 (step S305), moves to the next pixel, and returns to the process of step S302 (step S306).
The kanji determination unit 20 calculates the number of closed white areas by subtracting 1 from the number of times of filling (step S307), and compares the calculated number of closed white areas with 3 (step S308). .

漢字判定部20は、閉じられた白エリアの数が4以上の場合、判定対象の文字が漢字であると判定する(ステップS309−1)。
漢字判定部20は、閉じられた白エリアの数が3以下の場合、判定対象の文字が漢字ではないと判定する(ステップS309−2)。
漢字判定部20は、漢字判定処理対象の文字範囲が最後の文字であるか否かを判定し、最後の文字であると判定した場合、パターンマッチングに基づく漢字判定処理を終了し、最後の文字ではないと判定した場合、次の文字について、ステップS301の処理に戻る(ステップS310)。
When the number of closed white areas is 4 or more, the kanji determination unit 20 determines that the character to be determined is a kanji (step S309-1).
If the number of closed white areas is 3 or less, the kanji determination unit 20 determines that the character to be determined is not a kanji (step S309-2).
The kanji determination unit 20 determines whether or not the character range subject to kanji determination processing is the last character. If it is determined that the character range is the last character, the kanji determination processing based on pattern matching is terminated, and the last character is determined. If it is determined that it is not, the process returns to step S301 for the next character (step S310).

<ステップS303:白エリア塗りつぶし処理>
次に、上述した図9のステップS303のサブルーチンの処理の詳細について図面を用いて説明する。図10は、図9のステップS303における白エリア塗りつぶし処理の流れを示すフロー図である。
漢字判定部20は、処理対象の画素の画素値「0」を画素値「1」に置換する(ステップS331)。漢字判定部20は、処理対象の画素(X,Y)の一つ上の画素(X,Y−1)の画素値を取得する(ステップS332)。
漢字判定部20は、取得した画素値が1であるか否かを判定し(ステップS333)、画素値が1ではない、すなわち、画素値が0である場合、さらに画素(X,Y−1)に対する白エリア塗りつぶし処理のサブルーチンを実行する(ステップS334)。
<Step S303: White Area Filling Process>
Next, details of the subroutine processing in step S303 of FIG. 9 described above will be described with reference to the drawings. FIG. 10 is a flowchart showing the flow of white area filling processing in step S303 of FIG.
The kanji determination unit 20 replaces the pixel value “0” of the pixel to be processed with the pixel value “1” (step S331). The kanji determination unit 20 acquires the pixel value of the pixel (X, Y-1) that is one pixel above the pixel (X, Y) to be processed (step S332).
The kanji determination unit 20 determines whether or not the acquired pixel value is 1 (step S333). If the pixel value is not 1, that is, if the pixel value is 0, the pixel (X, Y−1) is further determined. ) For the white area filling process is executed (step S334).

漢字判定部20は、画素値が1である場合、処理対象の画素(X,Y)の一つ右の画素(X+1,Y)の画素値を取得する(ステップS335)。
漢字判定部20は、取得した画素値が1であるか否かを判定し(ステップS336)、画素値が1ではない、すなわち、画素値が0である場合、さらに画素(X+1,Y)に対する白エリア塗りつぶし処理のサブルーチンを実行する(ステップS337)。
漢字判定部20は、画素値が1である場合、処理対象の画素(X,Y)の一つ下の画素(X,Y+1)の画素値を取得する(ステップS338)。
When the pixel value is 1, the Chinese character determination unit 20 acquires the pixel value of the pixel (X + 1, Y) that is one right of the pixel (X, Y) to be processed (step S335).
The kanji determination unit 20 determines whether or not the acquired pixel value is 1 (step S336), and if the pixel value is not 1, that is, if the pixel value is 0, the pixel value (X + 1, Y) is further increased. A subroutine for white area filling processing is executed (step S337).
When the pixel value is 1, the Chinese character determination unit 20 acquires the pixel value of the pixel (X, Y + 1) immediately below the pixel (X, Y) to be processed (step S338).

漢字判定部20は、取得した画素値が1であるか否かを判定する(ステップS339)。漢字判定部20は、画素値が1である場合、現在実行している白エリア塗りつぶしのサブルーチンを終了し、画素値が1ではない、すなわち、画素値が0である場合、さらに画素(X,Y+1)に対する白エリア塗りつぶし処理のサブルーチンを実行する(ステップS340)。   The kanji determination unit 20 determines whether or not the acquired pixel value is 1 (step S339). When the pixel value is 1, the kanji determination unit 20 ends the currently executed white area filling subroutine. When the pixel value is not 1, that is, when the pixel value is 0, the pixel (X, A subroutine of white area filling processing for Y + 1) is executed (step S340).

<ステップS50:熟語認識処理>
次に、上述した図4のメイン処理のステップS50のサブルーチンの処理の詳細について図面を用いて説明する。図11は、図4のステップS50における熟語認識処理の流れを示すフロー図である。
漢字判定部20は、判定対象の文字範囲が漢字であるか否かを判定し、漢字である場合、ステップS505の処理に進み、漢字ではない場合、ステップS502の処理に進む(ステップS501)。漢字判定部20は、処理対象の文字範囲の一つ前の文字範囲が漢字であるか否かを判定し、漢字である場合、ステップS503の処理に進み、漢字でない場合、ステップS505の処理に進む(ステップS502)。
<Step S50: idiom recognition processing>
Next, details of the subroutine processing of step S50 of the main processing of FIG. 4 described above will be described with reference to the drawings. FIG. 11 is a flowchart showing the idiom recognition process in step S50 of FIG.
The kanji determination unit 20 determines whether or not the character range to be determined is kanji. If it is a kanji, the process proceeds to step S505. If not, the process proceeds to step S502 (step S501). The kanji determination unit 20 determines whether or not the character range immediately before the character range to be processed is kanji. If it is kanji, the process proceeds to step S503. If not, the process proceeds to step S505. Proceed (step S502).

漢字判定部20は、処理対象の文字範囲の一つ後の文字範囲が漢字であるか否かを判定し、漢字である場合、ステップS504の処理に進み、漢字でない場合、ステップS505の処理に進む(ステップS503)。
漢字判定部20は、前後の文字範囲がいずれも漢字であると判定した場合、処理対象の文字範囲についても漢字であると判定する(ステップS504)。
漢字判定部20は、漢字判定処理対象の文字範囲が最後の文字であるか否かを判定し、最後の文字であると判定した場合、熟語判定処理を終了し、最後の文字ではないと判定した場合、ステップS506の処理に進む(ステップS505)。漢字判定部20は、次の文字範囲に移動し、ステップS501の処理に戻る(ステップS506)。
The kanji determination unit 20 determines whether or not the character range immediately after the character range to be processed is a kanji. If it is a kanji, the process proceeds to step S504. If not, the process proceeds to step S505. Proceed (step S503).
When determining that the preceding and following character ranges are all kanji, the kanji determining unit 20 determines that the character range to be processed is also kanji (step S504).
The kanji determination unit 20 determines whether or not the character range subject to kanji determination processing is the last character. If it is determined that the character range is the last character, the kanji determination processing ends, and it is determined that the character range is not the last character. If so, the process proceeds to step S506 (step S505). The kanji determination unit 20 moves to the next character range and returns to the process of step S501 (step S506).

<ステップS60:切り出し座標算出処理>
次に、上述した図4のメイン処理のステップS60のサブルーチンの処理の詳細について図面を用いて説明する。図12は、図4のステップS60における切り出し座標算出処理の流れを示すフロー図である。
漢字判定部20は、判定対象の文字範囲が漢字ではないか、漢字であるかを判定し、漢字ではない場合、ステップS604の処理に進み、漢字である場合、ステップS602の処理に進む(ステップS601)。
漢字判定部20は、処理対象の文字範囲が、現在までに判定した中心漢字よりも画像中心に近いか否かを判定し、中心漢字よりも近い場合、ステップS603の処理に進み、中心漢字よりも遠い場合、ステップS604の処理に進む(ステップS602)。漢字判定部20は、処理対象の文字範囲が、中心漢字であると判定する(ステップS603)。
<Step S60: Cutout coordinate calculation process>
Next, details of the subroutine processing of step S60 of the main processing of FIG. 4 described above will be described with reference to the drawings. FIG. 12 is a flowchart showing the cut-out coordinate calculation process in step S60 of FIG.
The kanji determination unit 20 determines whether the character range to be determined is not kanji or kanji. If it is not kanji, the process proceeds to step S604, and if it is kanji, the process proceeds to step S602 (step S602). S601).
The kanji determination unit 20 determines whether or not the character range to be processed is closer to the center of the image than the central kanji determined so far. If the character range is closer to the central kanji, the process proceeds to step S603. If it is too far, the process proceeds to step S604 (step S602). The kanji determination unit 20 determines that the character range to be processed is the central kanji (step S603).

漢字判定部20は、判定処理対象の文字範囲が最後の文字であるか否かを判定し、最後の文字であると判定した場合、ステップS607の処理に進み、最後の文字ではないと判定した場合、ステップS605の処理に進む(ステップS604)。漢字判定部20は、次の文字範囲に移動し、ステップS601の処理に戻る(ステップS605)。   The kanji determination unit 20 determines whether or not the character range subject to determination processing is the last character. If it is determined that the character range is the last character, the process proceeds to step S607 and determines that the character range is not the last character. In this case, the process proceeds to step S605 (step S604). The kanji determination unit 20 moves to the next character range and returns to the process of step S601 (step S605).

漢字判定部20は、処理対象の文字範囲の基準を中心漢字とし(ステップS606)、処理対象の文字範囲を前の文字範囲に移動する(ステップS607)。
漢字判定部20は、処理対象の文字範囲が最初の文字範囲であるか否かを判定し、最初の文字である場合、ステップS611の処理に進み、最初の文字ではない場合、ステップS609の処理に進む(ステップS608)。
漢字判定部20は、処理対象の文字範囲が漢字であるか否かを判定し、漢字である場合、ステップS610の処理に進み、漢字ではない場合、ステップS611の処理に進む(ステップS609)。漢字判定部20は、処理対象の文字範囲を開始文字であると判定し、ステップS607の処理に戻る(ステップS610)。
The kanji determination unit 20 sets the reference character range of the processing target as the central kanji (step S606), and moves the processing target character range to the previous character range (step S607).
The kanji determination unit 20 determines whether or not the character range to be processed is the first character range. If the character range is the first character range, the process proceeds to step S611. If the character range is not the first character range, the process proceeds to step S609. (Step S608).
The kanji determination unit 20 determines whether or not the character range to be processed is kanji. If it is a kanji, the process proceeds to step S610. If not, the process proceeds to step S611 (step S609). The kanji determination unit 20 determines that the character range to be processed is a start character, and returns to the process of step S607 (step S610).

漢字判定部20は、処理対象の文字範囲の基準を中心漢字とし(ステップS611)、処理対象の文字範囲を次の文字範囲に移動する(ステップS612)。
漢字判定部20は、処理対象の文字範囲が最後の文字範囲であるか否かを判定し、最後の文字である場合、切り出し座標算出処理を終了し、最後の文字ではない場合、ステップS614の処理に進む(ステップS613)。
漢字判定部20は、処理対象の文字範囲が漢字であるか否かを判定し、漢字である場合、切り出し座標算出処理を終了し、漢字ではない場合、ステップS615の処理に進む(ステップS614)。漢字判定部20は、処理対象の文字範囲を終了文字であると判定し、ステップS612の処理に戻る(ステップS615)。
The kanji determination unit 20 sets the reference of the character range to be processed as a central Chinese character (step S611), and moves the character range to be processed to the next character range (step S612).
The kanji determination unit 20 determines whether or not the character range to be processed is the last character range. If the character range is the last character range, the cut-out coordinate calculation process ends, and if it is not the last character, the process proceeds to step S614. The process proceeds (step S613).
The kanji determination unit 20 determines whether or not the character range to be processed is a kanji. If it is a kanji, the cut coordinate calculation process ends, and if it is not a kanji, the process proceeds to the process of step S615 (step S614). . The kanji determination unit 20 determines that the character range to be processed is an end character, and returns to the process of step S612 (step S615).

なお、本実施形態において、画素値が0(零)であるとは、白色の画素であることを意味し、画素値が1であるとは、黒色の画素であることを意味する。
また、上述した処理において、縦書きの文字列に対する具体的な処理例について説明したが、横書きの文字列に対する処理は、上述の処理を水平方向(x軸方向)と垂直方向(y軸方向)とを読替え、右左と上下とを読み替えた処理である。
上述した実施形態によれば、画数が多い文字を検出対象の漢字として判定することにより、ユーザが読み仮名を調べようとする対象の漢字を処理能力が高性能ではない携帯端末装置の場合でも簡易で処理時間が短い(動作が軽い)方法で高精度に検出することが可能になる。
In the present embodiment, a pixel value of 0 (zero) means a white pixel, and a pixel value of 1 means a black pixel.
In the above-described processing, a specific processing example for a vertically written character string has been described. However, for the horizontally written character string, the above processing is performed in the horizontal direction (x-axis direction) and the vertical direction (y-axis direction). Is a process in which right and left and up and down are replaced.
According to the embodiment described above, by determining a character with a large number of strokes as a kanji to be detected, it is easy even in the case of a portable terminal device whose processing capability is not high performance for the target kanji for which the user wants to check the reading kana. Thus, it becomes possible to detect with high accuracy by a method with a short processing time (light operation).

また、処理時間が短く、連続して漢字認識処理を行って読み仮名情報を表示部50に表示することができることから、難読の漢字をカメラ部分にかざすだけで読み仮名をすばやく把握させることができるルーペのような使用感覚をユーザに与えることが可能になり、これにより、レスポンスの速さの点でストレスを軽減できる。
また、難読の漢字に限らず、文字サイズが小さいため、ひらがな以上に画数が多い文字について読みづらい場合や、近くの文字が見づらくなる老視(いわゆる老眼)の影響を受ける場合においても、本発明の携帯端末装置1を用いることにより、画数が多い文字の読み仮名を表示することにより、読書の妨げを抑制することができる。
In addition, since the processing time is short and kanji recognition processing can be continuously performed and the reading kana information can be displayed on the display unit 50, the reading kana can be quickly grasped simply by holding the difficult-to-read kanji over the camera portion. It is possible to give the user a sense of use like a loupe, thereby reducing stress in terms of speed of response.
Further, the present invention is not limited to difficult-to-read kanji characters, and the present invention can be applied to cases where it is difficult to read a character having a larger number of strokes than hiragana, or when it is affected by presbyopia (so-called presbyopia) that makes it difficult to see nearby characters By using the portable terminal device 1, it is possible to suppress reading hindrance by displaying a reading kana of characters having a large number of strokes.

また、処理対象の画像を撮像部10が備えるマイクロSDメモリカード等の記録媒体に記録させることなく漢字認識処理を行うため、処理に時間がかかる画像データの保存を行わずに読み仮名情報を表示部50に表示することが可能になるという効果がある。
また、画数が少ない漢字で難読となる漢字は、常用漢字以外の漢字である傾向があり、常用漢字以外の漢字が新聞等では用いられないことから、画数が少ない難読の漢字を出現頻度が少ない文字として処理対象外にすることにより、例外処理を省略し、読み仮名表示処理を単純化させることが可能になる。
上述したように、本発明の一実施形態によれば、画数の多い文字の読み仮名をすばやく表示部50に表示させることが可能になるため、ユーザにストーリーを見失わせることを低減できる。
In addition, since kanji recognition processing is performed without recording an image to be processed on a recording medium such as a micro SD memory card provided in the imaging unit 10, reading kana information is displayed without saving image data that takes time. There is an effect that it is possible to display on the part 50.
In addition, kanji that is difficult to read with kanji with a small number of strokes tend to be kanji other than regular kanji, and kanji other than regular kanji is not used in newspapers. By excluding them as characters, it is possible to omit the exception process and simplify the reading display process.
As described above, according to an embodiment of the present invention, it is possible to quickly display a reading kana of a character with a large number of strokes on the display unit 50, so that it is possible to reduce the user from losing sight of the story.

なお、上述した漢字認識処理において、黒画素数割合と、パターンマッチングとの双方の漢字認識処理結果を用いることとして説明したが、いずれか一方のみを用いることでもよい。これにより、さらに漢字認識処理の簡易化を実現することができる。   In the above-described kanji recognition processing, it has been described that the kanji recognition processing results of both the black pixel number ratio and the pattern matching are used, but only one of them may be used. This can further simplify the kanji recognition process.

なお、上述の携帯端末装置1は、内部にコンピュータシステムを有している。そして、携帯端末装置1の撮像部10、漢字判定部20、文字認識部30、読み取得部40、表示部50、読みデータ記憶部60、並びに、入力部70の動作の過程は、プログラムの形式でコンピュータ読み取り可能な記録媒体に記憶されており、このプログラムをコンピュータシステムが読み出して実行することによって、上記処理が行われる。ここでいう「コンピュータシステム」とは、CPU及び各種メモリやOS、周辺機器等のハードウェアを含むものである。
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
In addition, the above-mentioned portable terminal device 1 has a computer system inside. The operation process of the imaging unit 10, the kanji determination unit 20, the character recognition unit 30, the reading acquisition unit 40, the display unit 50, the reading data storage unit 60, and the input unit 70 of the mobile terminal device 1 is a program format. Is stored in a computer-readable recording medium, and the above-described processing is performed by the computer system reading and executing this program. The “computer system” herein includes a CPU, various memories, an OS, and hardware such as peripheral devices.
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.

また、図2、4、8〜12に示す各ステップを実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、また、図1に示す携帯端末装置1における処理部の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、携帯電話端末装置がカメラ機能により取得する画像データにおいて、漢字部分を認識し、漢字部分の画像データを文字認識対象として切り出す処理を行ってもよい。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、フラッシュメモリ等の書き込み可能な不揮発性メモリ、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。
2, 4 and 8 to 12 are recorded on a computer-readable recording medium, and the function of the processing unit in the mobile terminal device 1 shown in FIG. 1 is realized. In the image data acquired by the mobile phone terminal device using the camera function by recording the program for recording on a computer-readable recording medium, causing the computer system to read and execute the program recorded on the recording medium, A process of recognizing the part and cutting out the image data of the Chinese character part as a character recognition target may be performed.
The “computer-readable recording medium” means a flexible disk, a magneto-optical disk, a ROM, a writable nonvolatile memory such as a flash memory, a portable medium such as a CD-ROM, a hard disk built in a computer system, etc. This is a storage device.

さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。
また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。
また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムに既に記録されているプログラムとの組合せで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。
Further, the “computer-readable recording medium” refers to a volatile memory (for example, DRAM (Dynamic DRAM)) in a computer system that becomes a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. Random Access Memory)), etc., which hold programs for a certain period of time.
The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.
The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.

本発明の一実施形態による携帯端末装置1の全体構成を示すブロック図である。It is a block diagram which shows the whole structure of the portable terminal device 1 by one Embodiment of this invention. 同実施形態における携帯端末装置1の動作の概要を示すフロー図である。It is a flowchart which shows the outline | summary of operation | movement of the portable terminal device 1 in the embodiment. 同実施形態における表示部50の表示例、及び画面遷移例を示す図である。It is a figure which shows the example of a display of the display part 50 in the same embodiment, and a screen transition example. 同実施形態における漢字判定部20の動作の概要を示すフロー図である。It is a flowchart which shows the outline | summary of operation | movement of the Chinese character determination part 20 in the embodiment. 同実施形態における黒画素数割合に基づく漢字認識処理の具体例を示す図である。It is a figure which shows the specific example of the Chinese character recognition process based on the black pixel number ratio in the embodiment. 同実施形態におけるパターンマッチングに基づく漢字認識処理の具体例を示す図である。It is a figure which shows the specific example of the Chinese character recognition process based on the pattern matching in the embodiment. 同実施形態における切り出し座標算出処理の具体例を示す図である。It is a figure which shows the specific example of the cut-out coordinate calculation process in the embodiment. 同実施形態における黒画素数割合に基づく漢字認識処理の動作フローを示す図である。It is a figure which shows the operation | movement flow of the Chinese character recognition process based on the black pixel number ratio in the embodiment. 同実施形態におけるパターンマッチングに基づく漢字認識処理の動作フローを示す図である。It is a figure which shows the operation | movement flow of the Chinese character recognition process based on the pattern matching in the same embodiment. 同実施形態における白エリア塗りつぶし処理の動作フローを示す図である。It is a figure which shows the operation | movement flow of the white area filling process in the embodiment. 同実施形態における熟語認識処理の動作フローを示す図である。It is a figure which shows the operation | movement flow of the idiom recognition process in the embodiment. 同実施形態における切り出し座標算出処理の動作フローを示す図である。It is a figure which shows the operation | movement flow of the cut-out coordinate calculation process in the embodiment.

符号の説明Explanation of symbols

1 携帯端末装置
10 撮像部
20 漢字判定部
30 文字認識部
40 読み取得部
50 表示部
60 読みデータ記憶部
70 入力部
DESCRIPTION OF SYMBOLS 1 Portable terminal device 10 Imaging part 20 Kanji determination part 30 Character recognition part 40 Reading acquisition part 50 Display part 60 Reading data storage part 70 Input part

Claims (6)

文字列を撮像して画像データとして取得する撮像部と表示部とを備える携帯端末装置に用いられるコンピュータを
前記画像データに含まれる文字が漢字であるか否かを判定し、漢字の可能性がある画像部分を出力する漢字判定部、
前記漢字判定部が出力する画像部分に文字認識処理を行い、対応する文字識別情報を取得する文字認識部、
文字識別情報と漢字の読み仮名を示す読み仮名情報とを対応付けた読みデータ記憶部、
前記文字認識部が取得する文字識別情報に基づき、前記読みデータ記憶部から読み仮名情報を読み出し、前記表示部に表示させる読み取得部
として機能させ
前記漢字判定部は、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合の最大値であって複数の前記判定対象の文字のうちの当該最大値を算出し、算出した最大値が予め定めた値を超えるか否かに応じて異なる閾値に基づいて、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合が前記閾値を超えるか否かに基づき判定対象の文字が漢字であるか否かを判定する
ことを特徴とする漢字認識プログラム。
A computer used in a mobile terminal device that includes an imaging unit that captures a character string and obtains it as image data and a display unit determine whether or not the character included in the image data is kanji, and the possibility of kanji Kanji determination unit that outputs a certain image part,
A character recognition unit that performs character recognition processing on an image portion output by the kanji determination unit and acquires corresponding character identification information;
A reading data storage unit that associates character identification information with reading kana information indicating kanji reading kana,
Based on the character identification information acquired by the character recognition unit, read kana information from the reading data storage unit, function as a reading acquisition unit to be displayed on the display unit ,
The kanji determination unit calculates the maximum value of the ratio of the number of black pixels to the total number of pixels in the image range of the determination target character and calculates the maximum value among the plurality of determination target characters. The character to be determined based on whether or not the ratio of the number of black pixels to the total number of pixels in the image range of the character to be determined exceeds the threshold based on a different threshold depending on whether or not exceeds a predetermined value. A kanji recognition program characterized by determining whether or not is a kanji.
前記漢字判定部は、
前記画像範囲において黒画素に囲まれた白画素の領域である白エリアの個数に基づき、判定対象の文字が漢字であるか否かを判定する
ことを特徴とする請求項1に記載の漢字認識プログラム。
The kanji determination unit
The kanji recognition according to claim 1, wherein it is determined whether or not the character to be determined is a kanji character based on the number of white areas that are white pixel regions surrounded by black pixels in the image range. program.
前記漢字判定部は、The kanji determination unit
前記白エリアの個数が4個以上である場合、判定対象の文字を漢字であると判定するWhen the number of white areas is 4 or more, the character to be determined is determined to be kanji
ことを特徴とする請求項2に記載の漢字認識プログラム。The Chinese character recognition program according to claim 2, wherein:
前記漢字判定部は、
漢字と漢字で挟まれた判定対象の文字を熟語の一部の漢字として判定する
ことを特徴とする請求項1乃至3のいずれかに記載の漢字認識プログラム。
The kanji determination unit
The kanji recognition program according to any one of claims 1 to 3, wherein a determination target character sandwiched between kanji and kanji is determined as a partial kanji of the idiom.
文字列を撮像して画像データとして取得する撮像部と、表示部とを備える携帯端末装置であって、
前記画像データに含まれる文字が漢字であるか否かを判定し、漢字の可能性がある画像部分を出力する漢字判定部と、
前記漢字判定部が出力する画像部分に文字認識処理を行い、対応する文字識別情報を取得する文字認識部と、
文字識別情報と漢字の読み仮名を示す読み仮名情報とを対応付けた読みデータ記憶部と、
前記文字認識部が取得する文字識別情報に基づき、前記読みデータ記憶部から読み仮名情報を読み出し、前記表示部に表示させる読み取得部と
を備え
前記漢字判定部は、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合の最大値であって複数の前記判定対象の文字のうちの当該最大値を算出し、算出した最大値が予め定めた値を超えるか否かに応じて異なる閾値に基づいて、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合が前記閾値を超えるか否かに基づき判定対象の文字が漢字であるか否かを判定する
ことを特徴とする携帯端末装置。
A mobile terminal device including an imaging unit that captures a character string and acquires it as image data, and a display unit,
Determining whether or not the characters included in the image data are kanji, and outputting a kanji determination unit that may be a kanji; and
A character recognition unit that performs character recognition processing on the image portion output by the kanji determination unit and acquires corresponding character identification information;
A reading data storage unit associating character identification information with reading kana information indicating kanji reading kana,
Based on the character identification information acquired by the character recognition unit, the reading acquisition unit that reads the reading kana information from the reading data storage unit and displays on the display unit ,
The kanji determination unit calculates the maximum value of the ratio of the number of black pixels to the total number of pixels in the image range of the determination target character and calculates the maximum value among the plurality of determination target characters. The character to be determined based on whether or not the ratio of the number of black pixels to the total number of pixels in the image range of the character to be determined exceeds the threshold based on a different threshold depending on whether or not exceeds a predetermined value. It is determined whether or not is a Chinese character.
文字列を撮像して画像データとして取得する撮像部と、文字識別情報と漢字の読み仮名を示す読み仮名情報とを対応付けた読みデータ記憶部と、表示部とを備える携帯端末装置における漢字認識方法であって、
前記画像データに含まれる文字が漢字であるか否かを判定し、漢字の可能性がある画像部分を出力する漢字判定過程と、
出力した画像部分に文字認識処理を行い、対応する文字識別情報を取得する文字認識過程と、
取得した前記文字識別情報に基づき、前記読みデータ記憶部から読み仮名情報を読み出し、前記表示部に表示させる読み取得過程と
を有し、
前記漢字判定過程にて、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合の最大値であって複数の前記判定対象の文字のうちの当該最大値を算出し、算出した最大値が予め定めた値を超えるか否かに応じて異なる閾値に基づいて、判定対象の文字の画像範囲における総画素数に対する黒画素数の割合が前記閾値を超えるか否かに基づき判定対象の文字が漢字であるか否かを判定する
ことを特徴とする漢字認識方法。
Kanji recognition in a portable terminal device comprising: an imaging unit that captures a character string and acquires it as image data; a reading data storage unit that associates character identification information with reading kana information indicating kanji reading kana; and a display unit A method,
Determining whether or not the character included in the image data is kanji, and outputting a portion of the image that may be kanji,
A character recognition process for performing character recognition processing on the output image portion and obtaining corresponding character identification information;
Based on the obtained the character identification information, read kana reading information from the read data storage unit, possess a reading acquisition process to be displayed on the display unit,
In the kanji determination process, the maximum value of the ratio of the number of black pixels to the total number of pixels in the image range of the character to be determined and the maximum value among the plurality of characters to be determined is calculated, and the calculated maximum Based on a threshold value that differs depending on whether the value exceeds a predetermined value, based on whether the ratio of the number of black pixels to the total number of pixels in the image range of the character to be determined exceeds the threshold value, A method for recognizing kanji, wherein it is determined whether or not the character is kanji .
JP2008214321A 2008-08-22 2008-08-22 Kanji recognition program, portable terminal device, and kanji recognition method Expired - Fee Related JP4291870B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008214321A JP4291870B1 (en) 2008-08-22 2008-08-22 Kanji recognition program, portable terminal device, and kanji recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008214321A JP4291870B1 (en) 2008-08-22 2008-08-22 Kanji recognition program, portable terminal device, and kanji recognition method

Publications (2)

Publication Number Publication Date
JP4291870B1 true JP4291870B1 (en) 2009-07-08
JP2010049564A JP2010049564A (en) 2010-03-04

Family

ID=40921854

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008214321A Expired - Fee Related JP4291870B1 (en) 2008-08-22 2008-08-22 Kanji recognition program, portable terminal device, and kanji recognition method

Country Status (1)

Country Link
JP (1) JP4291870B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6051675B2 (en) * 2012-08-16 2016-12-27 株式会社リコー Image processing apparatus, image processing method, program, and recording medium
JP6458358B2 (en) * 2014-05-28 2019-01-30 コニカミノルタ株式会社 Image processing apparatus and program

Also Published As

Publication number Publication date
JP2010049564A (en) 2010-03-04

Similar Documents

Publication Publication Date Title
KR101805090B1 (en) Method and device for region identification
US10803367B2 (en) Method and apparatus for recognizing characters
KR101015663B1 (en) Method for recognizing character and apparatus therefor
US8503780B2 (en) Apparatus for detecting text recognition region and method of recognizing text
KR101002899B1 (en) Character recognition method and apparatus
KR100615058B1 (en) Mobile handset and the method of selecting an objective area of the chatacter recognition on a mobile handset
Du et al. Snap and translate using windows phone
JP4291870B1 (en) Kanji recognition program, portable terminal device, and kanji recognition method
CN110795918B (en) Method, device and equipment for determining reading position
JP4474231B2 (en) Document link information acquisition system
JP6408055B2 (en) Information processing apparatus, method, and program
CN111090738A (en) Double-screen-based photographing question searching method and electronic equipment
JP5277750B2 (en) Image processing program, image processing apparatus, and image processing system
JP5105440B2 (en) Information processing apparatus, character recognition method, character recognition program, and computer-readable recording medium on which character recognition program is recorded
JP2009053826A (en) Document processor and document processing program
US20090222725A1 (en) Method and apparatus for input assistance
CN110969161A (en) Image processing method, circuit, visual impairment assisting apparatus, electronic apparatus, and medium
JP2005109981A (en) Information processor with photographing function
JP2008083846A (en) Target area determination method and device
JPH08263591A (en) Device and method for character recognition
JP2005050134A (en) Character recognizing system and method

Legal Events

Date Code Title Description
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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090403

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120410

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20150410

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees