JP6152633B2 - Display control apparatus and program - Google Patents
Display control apparatus and program Download PDFInfo
- Publication number
- JP6152633B2 JP6152633B2 JP2012241377A JP2012241377A JP6152633B2 JP 6152633 B2 JP6152633 B2 JP 6152633B2 JP 2012241377 A JP2012241377 A JP 2012241377A JP 2012241377 A JP2012241377 A JP 2012241377A JP 6152633 B2 JP6152633 B2 JP 6152633B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- line
- section
- document
- arrangement
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、表示制御装置及びプログラムに関する。 The present invention relates to a display control device and a program.
近年、WWW(World Wide Web)などのネットワーク技術、及び、携帯用端末装置に代表されるようにモバイルコンピューティングの発達により、音楽、書籍及び画像その他のあらゆるコンテンツを、データとして簡易に取り扱うことができるとともに、手軽にかつ容易に持ち運びができるようになってきている。 In recent years, music, books, images, and other contents can be easily handled as data by the development of mobile computing as represented by WWW (World Wide Web) and mobile terminal devices. As well as being able to carry it easily and easily.
また、最近、新聞、雑誌又は書籍等を電子化したコンテンツデータを購入してスマートフォン又はタブレット型端末装置をはじめとする携帯端末装置において閲覧することも多くなってきている。 In recent years, content data obtained by digitizing newspapers, magazines, books, and the like has been purchased and browsed on mobile terminal devices such as smartphones or tablet terminal devices.
一方、このようなコンテンツデータの閲覧に用いられるデータ形式としては、EPUB(Electronic PUBlication)などの表示サイズに合せてユーザが表示の組版体裁を自由に変更可能な文字コードベースで制作された形式、及び、編集者の編集意図を的確に再現することが可能な印刷ページ体裁を有する(すなわち、組版体裁が固定されている)ビットマップ形式が知られている。また、文字コードベースによって又はビットマップ形式によって制作可能なデータ形式としては、PDF(Portable Document Format)形式も知られている。ただし、PDF形式は、いずれの場合であっても、ユーザによって組版体裁を自由に変更させることを禁止しており、編集者の編集意図を的確に再現することが可能な体裁を有している。 On the other hand, as a data format used for browsing such content data, a format produced by a character code base that allows the user to freely change the typesetting of the display according to the display size such as EPUB (Electronic PUBlication), A bitmap format having a printed page format that can accurately reproduce the editing intention of the editor (that is, the typesetting format is fixed) is known. Also, a PDF (Portable Document Format) format is known as a data format that can be produced by a character code base or a bitmap format. However, in any case, the PDF format prohibits the user from freely changing the typesetting style and has a style that can accurately reproduce the editing intention of the editor. .
また、印刷ページ体裁のビットマップ形式のデータに基づいて文書等の画像を表示する場合には、文字コードベースで制作されたビットマップ形式のデータに基づいて画像表示する場合に比べて、
(1)著作権の制約からソースの文字コードデータの入手が難しいなどの問題が発生しづらく、データの取り扱いが容易、及び
(2)、フォントに基づく文字化け、及び、レイアウトの乱れが発生することもない、
という利点を有している。
In addition, when displaying an image such as a document based on bitmap format data in a printed page format, compared to displaying an image based on bitmap format data produced on a character code basis,
(1) Problems such as difficulty in obtaining source character code data due to copyright restrictions are difficult to occur, easy handling of data, and (2) garbled characters based on fonts and layout disturbances. Never
Has the advantage.
また、印刷ページ体裁のビットマップ形式は、紙ベースの資料をイメージデータとして取り込むだけでデータ化することが可能であるので、ユーザが自らデータ化する場合にも手軽に使用することができるという利点を有している。 In addition, the bitmap format of the printed page format can be converted into data simply by taking paper-based material as image data, so that the user can easily use it even when converting it into data. have.
しかしながら、印刷ページ体裁のビットマップ形式は、携帯用端末装置等の画面サイズの小さいもので閲覧する場合には、見やすさを確保するためにフォントサイズを大きくすると、1ページの一部しか表示画面には表示することができず、その一方、1ページ全体を表示させると、文字が小さくて読むことができない。 However, the bitmap format of the print page format is a display screen that displays only a part of one page when browsing with a small screen size such as a portable terminal device, etc., if the font size is increased to ensure ease of viewing. On the other hand, if the entire page is displayed, the characters are too small to be read.
そこで、最近では、印刷ページ体裁のビットマップ形式において、種々の印刷ページ体裁のビットマップ文書などのコンテンツデータを分解及び再構成する方法が提案されている(例えば、特許文献1〜3)。
Therefore, recently, there has been proposed a method of disassembling and reconstructing content data such as various printed page format bitmap documents in the bitmap format of the printed page format (for example,
しかしながら、上記特許文献1〜3にあっては、日本語特有の文書の縦書き、該当する漢字に付与するルビ又は禁則処理を含むコンテンツデータの分解及び再構成における具体的な手法については開示されていない。
However, the
本発明は、上記課題を解決するためになされたものであり、その目的は、印刷ページ体裁のビットマップ形式において、表示サイズに依存せずに閲覧性を向上させることが可能な表示制御装置等を提供することにある。 The present invention has been made to solve the above-described problems, and its purpose is to provide a display control device capable of improving the viewability without depending on the display size in the bitmap format of the print page format. Is to provide.
上述した課題を解決するため、本発明に係る表示制御装置等は、マトリクス状に配列された複数の画素によって形成された画像を表示手段に表示するための表示制御装置であって、少なくとも文書が画像化された前記画像を文書画像として前記表示手段にて表示するための画像データを外部又は記憶手段から取得する取得手段と、前記文書画像を表示する際の前記表示手段における表示領域のサイズを設定する設定手段と、前記取得された画像データに基づいて、前記文書画像における文書の行方向及び行送り方向を認識する認識手段と、前記文書画像の各画素値を2値化する2値化手段と、前記文書画像の文書の行方向に対する画素の配列ラインである第1配列ライン毎の、前記2値化された各画素における画素値に基づいて、前記文書画像の行を検出する行検出手段と、前記検出された行毎に、前記文書画像の文書の行送り方向における画素の配列ラインである第2配列ライン毎の、前記2値化された各画素における画素値に基づいて、各行に含まれる文字の区画を文字区画として検出する文字区画検出手段と、前記設定された表示領域の領域サイズに基づいて、前記検出された各文字区画を、当該表示領域に配置するための配置位置を決定する配置位置決定手段と、前記決定された各文字区画の配置位置に、前記文書画像の一部であって各文字区画に対応する区画画像を配置して前記表示領域に表示するための表示画像を生成する画像生成手段と、前記生成された画像を前記表示手段に出力する出力手段と、を備える構成を有している。 In order to solve the above-described problems, a display control device or the like according to the present invention is a display control device for displaying an image formed by a plurality of pixels arranged in a matrix on a display unit, and at least a document is An acquisition means for acquiring image data for displaying the imaged image as a document image on the display means from an external or storage means, and a size of a display area in the display means when the document image is displayed. Setting means for setting, recognition means for recognizing the line direction and line feed direction of the document in the document image based on the acquired image data, and binarization for binarizing each pixel value of the document image And the document image based on a pixel value in each of the binarized pixels for each first array line that is an array line of pixels in the document row direction of the document image. Line detection means for detecting the line of the document image, and for each of the binarized pixels for each of the detected lines, the second array line that is an array line of pixels in the document line feed direction of the document image. Based on the pixel value, character section detection means for detecting a section of characters included in each line as a character section, and based on the set area size of the display area, the detected character sections are displayed in the display area. An arrangement position determining means for determining an arrangement position for arranging the character image; and a section image corresponding to each character section, which is a part of the document image, is disposed at the determined position of each character section An image generation unit that generates a display image to be displayed in the display area and an output unit that outputs the generated image to the display unit are included.
本発明に係る表示制御装置及びプログラムは、携帯端末装置等の表示手段の表示領域が小さい場合であっても、当該表示領域の領域サイズに依存せずに、ユーザの閲覧性を向上させることができる。表示領域に依存せずに、ユーザの閲覧性を向上させることができる。 The display control device and the program according to the present invention can improve the user's viewability without depending on the area size of the display area even when the display area of the display means such as the portable terminal device is small. it can. The user's viewability can be improved without depending on the display area.
以下、図面を参照しつつ、本発明の実施形態について説明する。なお、以下の実施形態は、携帯端末装置に対し、本発明に係る、表示制御装置及び、プログラムを適用した場合の実施形態である。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, the following embodiment is embodiment at the time of applying the display control apparatus and program which concern on this invention with respect to a portable terminal device.
[1]携帯用端末装置の概要
まず、図1を用いて本実施形態における携帯用端末装置10の概要について説明する。なお、図1は、本実施形態における携帯用端末装置10の概要構成を示すブロック図である。
[1] Overview of Portable Terminal Device First, an overview of the portable terminal device 10 according to the present embodiment will be described with reference to FIG. FIG. 1 is a block diagram showing a schematic configuration of the portable terminal device 10 in the present embodiment.
携帯用端末装置10は、例えば、PC(Personal Computer)、タブレット型情報端末装置、スマートフォン、又は、携帯型ゲーム機等の通信端末装置であり、当該携帯用端末装置10が有する種々のハードウェアと協働し、文書が画像化された画像データをユーザに閲覧可能に表示するためのプログラム(以下、「閲覧アプリケーション(文書ビューワー)」という。)を実行するための構成を有している。 The portable terminal device 10 is, for example, a communication terminal device such as a PC (Personal Computer), a tablet information terminal device, a smartphone, or a portable game machine, and includes various hardware included in the portable terminal device 10. It has a configuration for executing a program (hereinafter referred to as “browsing application (document viewer)”) that cooperates and displays image data in which a document is imaged so as to be viewable to the user.
特に、携帯用端末装置10は、PDF(Portable Document Format)等の編集者の編集意図を的確に再現することが可能であって、文字及び図版等の文書の各要素が固定配置された印刷ページ体裁のビットマップ形式によって構成された画像データ(以下、単に「文書データ」という。)を表示する表示機能を有している。 In particular, the portable terminal device 10 can accurately reproduce the editing intention of an editor such as a PDF (Portable Document Format), and a printed page on which elements of a document such as characters and illustrations are fixedly arranged. It has a display function for displaying image data (hereinafter simply referred to as “document data”) configured in a format bitmap format.
ただし、PDF形式のデータは、必ずしもビットマップ形式ではなく、表示時にフォントを参照する文字コードベース形式でも形成することが可能であるが、当該文字コードベース形式であってもビットマップ形式と同様に、編集者の意図を担保するために組版体裁を自由に変更することができないことを特徴としている。 However, the PDF format data is not necessarily in the bitmap format but can be formed in the character code base format that refers to the font at the time of display, but even in the character code base format, the same as the bitmap format. In order to secure the editor's intention, the typesetting style cannot be freely changed.
そして、携帯用端末装置10は、ユーザ操作に基づいて、一の文書データが選択されて閲覧アプリケーションを実行すると、ユーザによって設定された文書画像を表示する際の表示画面内において指定された領域(以下、「指定表示領域」という。)の領域サイズに基づいて、選択された文書データを表示する構成を有している。 Then, when one document data is selected and a browsing application is executed based on a user operation, the portable terminal device 10 is an area designated in the display screen when displaying a document image set by the user ( Hereinafter, the selected document data is displayed based on the area size of “designated display area”.
具体的には、携帯用端末装置10は、閲覧アプリケーションを実行すると、
(1)文書データにおける文書を構成する文字の各配置を画像解析し、各文字の区画(以下、「文字区画」という。)における画像(以下、「区画画像」という。)の配置位置(以下、「区画位置」という。)及びそのサイズ(以下、「区画サイズ」という。)を検出する文字配置解析処理、
(2)文字区画の配置位置及び区画サイズに基づいて、文書の各文書構造を維持しつつ、各文字区画を、ユーザによって表示画面内において指定された指定表示領域に配置する配置位置を決定する区画配置処理、
(3)決定した各配置位置に基づいて、該当する文字区画の区画画像を割り当てて指定表示領域に表示するためのビットマップ形式の表示画像を生成するビットマップ生成処理、及び、
(4)生成した画像を表示画面に出力する出力処理
を実行し、設定した指定表示領域に取得した文書データを表示することができるようになっている。
Specifically, when the portable terminal device 10 executes a browsing application,
(1) Image analysis is performed on each arrangement of characters constituting the document in the document data, and an arrangement position (hereinafter referred to as “section image”) in each character section (hereinafter referred to as “character section”). , “Partition position”) and its size (hereinafter referred to as “partition size”),
(2) Based on the arrangement position and the division size of the character section, the arrangement position for arranging each character section in the designated display area designated in the display screen by the user is determined while maintaining the document structure of the document. Partition placement processing,
(3) A bitmap generation process for generating a bitmap-format display image for allocating a partition image of a corresponding character partition based on each determined layout position and displaying it in the designated display area; and
(4) Output processing for outputting the generated image to the display screen is executed, and the acquired document data can be displayed in the set designated display area.
このような各処理を実現するために、携帯用端末装置10は、図1に示すように、閲覧アプリケーションを含む必要なデータが記憶されるデータ記憶部100と、図示しない複数の文書データを管理するサーバ装置及び他の通信装置と通信を行う通信制御部110と、上記の閲覧アプリケーションを含む各種のアプリケーションの実行及びその管理を行うアプリケーション処理部120と、所定のサイズの表示画面を有する表示部150と、表示部150における種々の描画を制御する表示制御部140と、ユーザ操作を入力するために用いられる操作部160と、全体を制御する端末管理制御部190と、を有している。
In order to implement each of these processes, the portable terminal device 10 manages a
また、携帯用端末装置10は、文書閲覧以外の機能を有している場合があり、例えば、ナビゲーション等の地図機能、カメラ等の撮像機能、電話機能、電子メール等のメール機能を有する場合には、GPS受信機、マイク、スピーカ、及び、通信ユニット等の種々の必要な部材を有している場合がある。そして、上記の各部は、バスBによって互いに接続され、データの授受が実行されるようになっている。 The portable terminal device 10 may have functions other than document browsing. For example, the portable terminal device 10 has a map function such as navigation, an imaging function such as a camera, a telephone function, and a mail function such as e-mail. May have various necessary members such as a GPS receiver, a microphone, a speaker, and a communication unit. The above units are connected to each other by a bus B so that data is exchanged.
なお、例えば、本実施形態のデータ記憶部100は、本発明の記憶手段を構成し、アプリケーション処理部120は、本発明に係る取得手段、設定手段、2値化手段、行検出手段、文字区画検出手段、配置位置決定手段、画像生成手段を構成する。また、例えば、本実施形態の出力手段は、本発明の表示制御手段を構成し、表示部150は、本発明に係る表示手段及び表示装置を構成する。さらに、例えば、本実施形態の操作部160は、本発明に係る操作手段を構成する。
For example, the
[2]本願発明の原理
次に、図2〜図5の各図を用いて本願発明の原理について説明する。なお、図2は、文字コードベースの文書を画像化しながら表示する際の流れを説明するための図であり、図3は、印刷ページ体裁のビットマップ形式によって既に画像化された文書を表示する際の流れを説明するための図である。また、図4は、印刷ページ体裁のビットマップ形式によって画像化された文書の表示形式を説明するための図であり、図5及び図6は、本願発明の効果の一例を説明するための図である。
[2] Principle of the present invention Next, the principle of the present invention will be described with reference to FIGS. FIG. 2 is a diagram for explaining the flow of displaying a character code-based document while imaging it. FIG. 3 displays a document that has already been imaged in the print page format bitmap format. It is a figure for demonstrating the flow in the case. FIG. 4 is a diagram for explaining a display format of a document imaged in the bitmap format of the print page format, and FIGS. 5 and 6 are diagrams for explaining an example of the effect of the present invention. It is.
本実施形態の携帯用端末装置10は、m行n列のマトリクス状に配列された複数の画素によって形成された文書画像をユーザが閲覧可能になるように表示部150に表示するための端末装置であって、
The portable terminal device 10 of the present embodiment displays a document image formed by a plurality of pixels arranged in a matrix of m rows and n columns on the
(1)ユーザによって選択された文書データを図示しないネットワークを介して他の通信端末装置から取得し、又は、内部に記憶された文書データを読み出して取得し、
(2)ユーザ操作に基づいて、文書画像を表示する際の表示画面内において指定された指定表示領域の領域サイズを設定し、
(3)取得した文書データにおける画像化された文書の各文字に該当する文字区画を検出して文字配置を画像解析する文字配置解析処理を実行し、
(4)ページ毎の文書データをシームレスに、検出した文字区画を指定表示領域に配置する配置位置を決定する区画配置処理を実行し、
(5)配置を決定した各文字区画に該当する区画画像を割り当ててビットマップ生成処理を実行し、
(6)生成したビットマップ画像を出力する構成を有している。
(1) The document data selected by the user is acquired from another communication terminal device via a network (not shown), or the document data stored inside is read and acquired.
(2) Based on the user operation, the area size of the designated display area designated in the display screen when displaying the document image is set,
(3) executing a character arrangement analysis process for detecting a character section corresponding to each character of the imaged document in the acquired document data and performing image analysis of the character arrangement;
(4) A section arrangement process for determining an arrangement position for arranging the detected character section in the designated display area seamlessly for the document data for each page,
(5) Assign a partition image corresponding to each character partition whose placement has been determined and execute bitmap generation processing,
(6) It has a configuration for outputting the generated bitmap image.
通常、図2に示すように、文字コードベースの文書を画像化する場合には、
(1)ユーザ操作などによる組版指示と、文字コードを示すテキストデータと、に基づいて、対応するフォントが選択され、
(2)当該選択されたフォントが組版指示に従ってビットマップに変換され(すなわち、ビットマップ変換処理が実行され)、
(3)ビットマップに変換された画像データが、ビデオメモリに描画されつつ、
(4)当該描画された描画データによって画像化した文書が表示される。したがって、このような場合には、表示領域等の閲覧者の指示に基づいて、文書構造を変更することが容易であり、例えば、変更された表示領域に合わせて画像化された文書を表示することも可能である。
Usually, as shown in FIG. 2, when imaging a character code-based document,
(1) A corresponding font is selected based on a typesetting instruction by a user operation or the like and text data indicating a character code,
(2) The selected font is converted into a bitmap according to the typesetting instruction (that is, bitmap conversion processing is executed),
(3) While the image data converted into the bitmap is drawn in the video memory,
(4) A document imaged by the drawn drawing data is displayed. Therefore, in such a case, it is easy to change the document structure on the basis of a viewer's instruction such as a display area. For example, an imaged document is displayed in accordance with the changed display area. It is also possible.
したがって、このような文字コードベースの文書データを、当該文書データを編集(又は制作)した編集者の意図を反映させて画像化するためには、文字コードと編集者が使用した文字フォントとが必要となる。このため、PDF形式等の文書ファイル内に編集者が使用した文字フォントを埋め込むことができる文書データの場合には、編集者の意図を反映させて文書画像を表示することができるものの、当該文字フォントを埋め込むことができない文書データの場合には、携帯用端末装置10内にあらかじめ搭載されている文字フォントを参照させる必要があるので、編集者の意図を反映させる文書を提供することができないだけでなく、文書に含まれる文字を的確に画像化できない場合も多い。 Therefore, in order to image such character code-based document data by reflecting the intention of the editor who edited (or produced) the document data, the character code and the character font used by the editor are determined. Necessary. Therefore, in the case of document data in which a character font used by the editor can be embedded in a document file in PDF format or the like, the document image can be displayed reflecting the editor's intention, but the character In the case of document data in which fonts cannot be embedded, it is necessary to refer to character fonts pre-installed in the portable terminal device 10, so that it is not possible to provide a document that reflects the editor's intention. In addition, there are many cases where characters included in a document cannot be accurately imaged.
通常、文書データにおいて使用されるフォントは多彩であるため、同一言語においても、閲覧側で編集者が用いた文字フォントを用意することができない場合も少なくない。そのため、対応する文字フォントが文書データに埋め込まれておらず、文書データの閲覧を行う携帯用端末装置10内に搭載されていない場合には、他の文字フォント(代理フォント)を用いることとなる。しかしながら、一部の文字コードに対しては対応する文字パターン(画像化する際のパターン)が定義されていない場合、又は、他の文字フォントと異なる文字パターンが定義されている文字フォントも多く、編集時に用いた文字フォントと代理フォントとにおいて同一の文字について定義されていない場合には、文書データに含まれる文字を表示することができない、又は、当該文字に対して異なる文字が表示されて文字化けが発生してしまうのである。また、たとえ対応する文字パターンが代理フォント内に定義されていても、文字幅が編集者の意図と異なる大きさであることも考えられ、その場合には、フォントサイズ等によっては改行位置がずれてしまうこともある。 Usually, since fonts used in document data are various, there are many cases where it is not possible to prepare a character font used by an editor on the browsing side even in the same language. Therefore, when the corresponding character font is not embedded in the document data and is not installed in the portable terminal device 10 that browses the document data, another character font (proxy font) is used. . However, when a corresponding character pattern (pattern for imaging) is not defined for some character codes, or there are many character fonts in which character patterns different from other character fonts are defined, If the same character is not defined in the character font used for editing and the proxy font, the character included in the document data cannot be displayed, or a different character is displayed for the character. A garble will occur. Even if the corresponding character pattern is defined in the proxy font, the character width may be different from the editor's intention. In this case, the line feed position may be shifted depending on the font size. Sometimes.
また、文字コードベースの文書データにおいては、編集者の意図を反映しつつ、閲覧者の指示に基づいて組版の変更を行うためには、文字コードとなるテキストデータ及び編集者が使用した文字フォントとともに、画像が含まれている場合には当該オリジナル画像等の素材を用意することが必須となる。しかしながら、これらの原素材の使用については著作権等によって認められない場合もあり、当該原素材の使用が認められない場合には、文書データを画像化する際に、編集者の意図を的確に反映させることが難しい。特に、上述のように、編集者の意図した文字フォント等を使用できないことにより、表示領域の設定等の組版指示によっては、文書自体のレイアウトの乱れが生じ、画像表示そのものに不具合が生じることもある。 In addition, in character code-based document data, the text data used as the character code and the character font used by the editor are used to change the typesetting based on the viewer's instructions while reflecting the intention of the editor. In addition, when an image is included, it is essential to prepare a material such as the original image. However, the use of these raw materials may not be permitted due to copyrights, etc., and if the use of such raw materials is not permitted, the editor's intentions should be accurately determined when imaging the document data. Difficult to reflect. In particular, as described above, because the character font intended by the editor cannot be used, depending on the typesetting instruction such as setting of the display area, the layout of the document itself may be disturbed, and the image display itself may be defective. is there.
この結果、文字コードベースの文書を画像化する場合には、PDF等の文字フォントを埋め込んだ文書データ以外のデータ形式であっては、文書データを生成又は編集した編集者の意図を反映させるように当該文書データを画像化及びその表示を行うことは難しい。 As a result, when a character code-based document is imaged, the intention of the editor who generated or edited the document data is reflected in a data format other than the document data in which character fonts such as PDF are embedded. In addition, it is difficult to image and display the document data.
一方、図3に示すように、文字コードベースと異なり、印刷ページ体裁のビットマップ形式によって画像化された文書を表示するためには、閲覧者によって印刷ページの体裁を調整することはできないが、文字コードでなく、編集者が完成させた画像そのものを、表示形式を維持しつつ、表示することができる。したがって、このような場合には、著作権などの管理が紙面レイアウト体裁の範囲にとどまり、文字コードベースの文書データに比べて、データの取り扱いが著しく容易になる。また、このようなデータ形式においては、PDF等の文字フォントを埋め込んだ文書データと同様に、編集者が完成させた画像そのものを、表示形式を維持しつつ、表示するので、代替えフォントその他に基づく文字化け、及び、レイアウトの乱れが発生することもない。 On the other hand, as shown in FIG. 3, unlike the character code base, in order to display a document imaged in the print page format bitmap format, the print page format cannot be adjusted by the viewer. Instead of the character code, the image itself completed by the editor can be displayed while maintaining the display format. Therefore, in such a case, the management of copyright and the like is limited to the range of the paper layout style, and the handling of the data is remarkably facilitated as compared with the character code-based document data. Also, in such a data format, the image itself completed by the editor is displayed while maintaining the display format, similarly to document data in which character fonts such as PDF are embedded. Neither garbled characters nor layout disturbances occur.
他方、上記の印刷ページ体裁のビットマップ形式によって又は文字フォントを埋め込んだ文書データによって画像化された文書は、当該体裁を調整することはできないので、例えば、図3に表示するように、表示領域に合わせて文書構造を調整することができず、ユーザの閲覧性には難がある。例えば、図4(A)に示すように、文字の大きさを確保する一方で、その場合の文書画像の行方向のサイズが表示領域の行方向のサイズより大きな場合には、行方向に表示領域を移動させるスクロール処理をする必要がある。また、行方向にスクロールさせないような表示にする場合には、図4(B)に示すように、文書全体を縮小して表示する必要があり、文字が小さくなり、閲覧性も低下する。 On the other hand, a document imaged by the above-described print page format bitmap format or by document data in which character fonts are embedded cannot be adjusted. For example, as shown in FIG. The document structure cannot be adjusted according to the user's ability, and the user's viewability is difficult. For example, as shown in FIG. 4A, when the size of the character is ensured while the size of the document image in the row direction is larger than the size of the display region in the row direction, the characters are displayed in the row direction. It is necessary to perform scroll processing for moving the area. In addition, when the display is not scrolled in the line direction, as shown in FIG. 4B, it is necessary to display the entire document in a reduced size, the characters become smaller, and the viewability also deteriorates.
そこで、本実施形態の携帯用端末装置10は、画像化された文書の各行の文字に対応する文字区画を、設定された表示領域のサイズに基づいて当該各文字区画の配置位置を決定し、当該決定した各文字区画の配置位置に、当該各文字区画に対応する画像を割り当てることによって、画像化された文書の文書構造を維持しつつ、各文字を配置するので、表示領域に依存せずに、ユーザの閲覧性を向上させることができるようになっている。 Therefore, the portable terminal device 10 according to the present embodiment determines the character segment corresponding to the character of each line of the imaged document based on the size of the set display area, By assigning an image corresponding to each character section to the determined arrangement position of each character section, each character is arranged while maintaining the document structure of the imaged document. In addition, the user's viewability can be improved.
例えば、図5に示すように、適度な文字の大きさを確保しても、表示領域の行方向の幅が狭い場合に行方向へのスクロール表示を制限しつつ、行送り方向のみのスクロールによって表示可能な文字配列を実現することができるようになっている。 For example, as shown in FIG. 5, even if a moderate character size is ensured, scrolling in the line direction is restricted when the width of the display area in the line direction is narrow, while scrolling only in the line feed direction. A displayable character arrangement can be realized.
また、このような画像化された文書である電子書籍を制作する場合においては、図6に示すように、編集、製版、印刷、製本、スキャニング、文字認識、編集及び書式変換を行う一般書籍を経て制作する通常の制作工程において、製版後にPDF等のイメージデータ、又は、スキャニングしたデータを書式変換するだけで制作することができるので、通常の制作工程に比べて制作費用を低減し、迅速に制作することができるようになっている。 In the case of producing an electronic book that is such an imaged document, as shown in FIG. 6, a general book that performs editing, plate making, printing, bookbinding, scanning, character recognition, editing, and format conversion is used. In the normal production process, the image data such as PDF or scanned data can be produced simply by converting the format after plate making. It can be produced.
[3]携帯用端末装置
次に、上記の図1を用いて本実施形態の携帯用端末装置10における構成の詳細について説明する。
[3] Portable Terminal Device Next, details of the configuration of the portable terminal device 10 of the present embodiment will be described using FIG. 1 described above.
データ記憶部100は、例えば、ハードディスクドライブ(以下、「HDD」と略す。)、ソリッドステートドライブ(以下、「SSD」と略す。)又は、NAND型、NOR型等の不揮発性フラッシュメモリによって構成される。
The
また、データ記憶部100には、閲覧アプリケーションを含む、アプリケーション処理部120及び端末管理制御部190によって実行される様々なアプリケーション、及び、文書データを含むコンテンツデータが記憶されるとともに、アプリケーション処理部120及び端末管理制御部190のワークエリアとしてRAM(Random Access Memory)及びROM(Read Only Memory )も含まれる。
In addition, the
具体的には、データ記憶部100には、少なくとも、アプリケーション記憶部101、コンテンツデータ記憶部102、及びROM/RAM103を少なくとも含む。
Specifically, the
通信制御部110は、図示しないサーバ装置又は他の通信装置との通信回線を構築し、文書データを含む各種のデータの授受を行う。
The
アプリケーション処理部120は、主に中央演算処理装置(CPU)によって構成されるとともに、アプリケーション記憶部101に記憶された各種アプリに基づいて、表示制御部140及び操作部160と連動しつつ、各処理を実現する。特に、アプリケーション処理部120は、ユーザによって指定された表示部150の表示画面における指定表示領域の領域サイズに従って、文書データをユーザに閲覧させるための閲覧アプリケーションにおける各種の処理を実行する。
The
具体的には、アプリケーション処理部120は、
(1)文書画像を表示部150にて表示するための画像データを、通信制御部110を介して外部から又はデータ記憶部100から取得するデータ取得処理、
(2)文書画像を表示する際の表示部150における指定表示領域のサイズを設定する表示サイズ設定処理、
(3)文字配置解析処理の一の処理であって、取得した画像データに基づいて、画像化された文書の行方向及び行送り方向を認識する認識処理、
(4)文字配置解析処理の一の処理であって文書画像において一ページとして設定された各ページ(以下、「文書ページ」という。)において、取得した文書画像の各画素値を2値化する2値化処理と、
(5)文字配置解析処理の一の処理であって各文書ページにおいて、文書画像の文書の行方向に対する画素の配列ライン(以下、「第1配列ライン」という。)毎の、2値化された各画素における画素値に基づいて、文書画像の行を検出する行検出処理と、
(6)文字配置解析処理の一の処理であって各文書ページにおいて、検出した行毎に、文書画像の文書の行送り方向における画素の配列ライン(以下、「第2配列ライン」という。)毎の、2値化した各画素における画素値に基づいて、各行に含まれる文字の区画を文字区画として検出する文字区画検出処理と、
(7)設定した指定表示領域の領域サイズに基づいて、検出した各文字区画を、当該表示領域に配置するための配置位置を決定する区画配置処理と、
(8)決定した各文字区画の配置位置に、文書画像の一部であって各文字区画に対応する区画画像を配置して指定表示領域に表示するための表示画像を生成するビットマップ生成処理と、
を実行し、生成したビットマップ画像を出力する。
Specifically, the
(1) Data acquisition processing for acquiring image data for displaying a document image on the
(2) Display size setting processing for setting the size of the designated display area in the
(3) A recognition process that is a process of character arrangement analysis processing that recognizes the line direction and line feed direction of an imaged document based on the acquired image data.
(4) In each page set as one page in the document image (hereinafter referred to as “document page”), which is one process of the character arrangement analysis process, each pixel value of the acquired document image is binarized. Binarization processing;
(5) This is a process of character arrangement analysis, and in each document page, binarization is performed for each pixel array line (hereinafter referred to as “first array line”) in the document image row direction. A line detection process for detecting a line of the document image based on the pixel value in each pixel;
(6) One process of character arrangement analysis processing, in each document page, for each detected line, an array line of pixels in the document line feed direction of the document image (hereinafter referred to as “second array line”). A character segment detection process for detecting a character segment included in each line as a character segment based on the binarized pixel value of each pixel;
(7) division arrangement processing for determining an arrangement position for arranging each detected character division in the display area based on the set area size of the designated display area;
(8) Bitmap generation processing for generating a display image for displaying a section image corresponding to each character section in a designated display area by placing a section image corresponding to each character section at the determined position of each character section When,
To output the generated bitmap image.
特に、アプリケーション処理部120は、文字配置解析処理においては、文書ページ(以下、「解析中の文書データ」ともいう。)毎に、文書画像における画像内の座標位置及び文字区画の基準サイズに基づいて、各文字区画を検出するとともに、各文字区画の特殊性に基づく属性情報の設定、すなわち、見出し文字、字下げ、ルビ、禁則処理の対象となる文字(以下、「禁則文字」)等の特殊文字であるか否かを判定し、特殊文字であると判定した文字区画についてはその旨を示す属性情報の設定を行う。
In particular, in the character arrangement analysis process, the
そして、アプリケーション処理部120は、検出した各文字区画のサイズ及び区画位置に基づいて予め定められた配置条件に従って、検出した各文字区画を、設定された指定表示領域に配置する位置を決定する。すなわち、アプリケーション処理部120は、区画配置処理において、ユーザによって設定された指定表示領域の領域サイズとともに、文字配置解析処理によって設定した属性情報と、文字区画のサイズ及び区画位置に基づく配置条件とに基づいて、検出した各文字区画を、当該表示領域に配置するための配置位置を決定する。
Then, the
アプリケーション処理部120は、上記の各処理を実行するために、機能的に、文書データの取得、記憶及び読み出しを実行するデータ管理制御部121と、ユーザその他によって指定表示領域を設定する指定表示領域設定部122と、文字配置解析処理を実行する文字配置解析処理部123と、区画配置処理を実行する区画配置処理部124と、ビットマップ画像を生成する画像データ生成部125と、を実現する。なお、本実施形態のアプリケーション処理部120の各部の詳細については後述する。
The
表示部150は、所定のサイズの表示画面を有し、例えば、電子ペーパー、液晶素子又は有機EL(Electro Luminescence)素子のパネルによって構成され、表示制御部140において生成された表示データに基づいて所定の画像を表示する。
The
表示制御部140は、表示部150に表示させるために必要な表示データを生成するようになっており、生成された表示データを当該表示部150に出力する。特に、表示制御部140は、アプリケーション処理部120によって生成されたビットマップ画像を表示するための表示データを生成し、出力する。
The
操作部160は、各種の確認ボタン、各操作指令を入力する操作ボタン、テンキーなどの多数のキー及び表示部150に重畳して形成されたタッチパネルにより構成され、各操作を行う際に用いられるようになっている。特に、操作部160は、文書データを表示するための指定表示領域を指定する際に用いられる。
The
端末管理制御部190は、主に中央演算処理装置(CPU)によって構成されるとともに、キー入力ポート、表示制御ポート等の各種入出力ポートを含み、データ記憶部100に記憶された各種のアプリケーションを実行することにより、携帯用端末装置10の全般的な機能を総括的に制御する。
The terminal
[4]アプリケーション処理部
[4.1]データ管理制御部
次に、本実施形態のアプリケーション処理部120におけるデータ管理制御部121について説明する。
[4] Application Processing Unit [4.1] Data Management Control Unit Next, the data
データ管理制御部121は、通信制御部110と連動し、図示しないサーバ装置又は他の通信装置と通信に基づく文書データの授受及びデータ記憶部100に記憶される文書データのデータ管理を行う。
The data
具体的には、データ管理制御部121は、HTML(Hyper Text Markup Language)等のマークアップ言語によって記述されているWWWシステム用のリソースデータと、当該リソースデータのネットワークアドレスを示す固有のURL(Uniform Resource Locator)と、を用いたブラウジング機能に基づいて、図示しないサーバ装置又は他の通信装置とデータ通信を行う。特に、データ管理制御部121は、閲覧アプリケーションの実行中に、当該ブラウジング機能とユーザ操作とに基づいて、ユーザが所望する文書データを取得する。
Specifically, the data
また、データ管理制御部121は、ユーザ操作に基づいて、データ記憶部100に予め記憶された文書データを読み出すことによって取得する。ただし、データ記憶部100に記憶された文書データは、ブラウジング機能によって図示しないサーバ装置又は他の通信装置から取得した(ダウンロード又は転送された)データなどである。
Further, the data
なお、データ管理制御部121は、白黒の文書画像を有する文書データであっても、カラーの文書画像を有する文書データであってもよい。
Note that the data
また、データ管理制御部121は、イメージスキャナによって文書を読み込みつつ、画像化した文書における画像データ(すなわち、文書データ)を取得してもよい。そして、データ管理制御部121は、イメージスキャナによって画像化された文書については、当該文書に予めマーキングされたマーカ又は基準に使用できる文書ページ内にレイアウトされている罫線などに基づく傾き補正を実行する。この傾き補正は、行方向が水平であることを確保するため、及び、行送り方向が垂直であることを確保するために重要である。ただし、データ管理制御部121は、データ通信によって取得した各文書データについても水平が保障されていない場合もあるので、ユーザ指示に基づいて又は自動的に、当該データ通信によって取得した各文書データに対して実行してもよい。
Further, the data
[4.2]指定表示領域設定部
次に、本実施形態のアプリケーション処理部120におけるに指定表示領域設定部122ついて説明する。
[4.2] Designated Display Area Setting Unit Next, the designated display
指定表示領域設定部122は、ユーザ指示等によって表示部150の表示画面内に形成される矩形の指定表示領域を設定する。
The designated display
特に、指定表示領域設定部122は、指定表示領域の上下方向及び左右方向に対して拡大及び縮小指示された場合に、当該指示された表示画面における座標を認識するとともに、認識した座標に従って当該指定表示領域を設定しつつ、当該設定した指定表示領域の領域サイズを区画配置処理部124に出力する。
In particular, the designated display
また、指定表示領域設定部122は、閲覧アプリケーションを用いて文書データを表示している場合であっても、操作部160を介して任意のタイミングで指定表示領域が指定された場合に、指示された表示画面における座標を認識するとともに、認識した座標に従って当該指定表示領域を設定する。
The designated display
[4.3]文字配置解析処理部
[4.3.1]文字配置解析処理部の概要
次に、図7〜図18の各図を用いて本実施形態のアプリケーション処理部120におけるに文字配置解析処理部123ついて説明する。
[4.3] Character Placement Analysis Processing Unit [4.3.1] Outline of Character Placement Analysis Processing Unit Next, the character placement in the
文字配置解析処理部123は、取得した文書データの文書構造のページ毎に(すなわち、元の文書形式のページ毎に)、上述の認識処理、2値化処理、行検出処理及び文字区画検出処理を実行する。
The character arrangement
また、文字配置解析処理部123は、認識処理、2値化処理、行検出処理及び文字区画検出処理を実行すると、補正処理として、各行において所定の条件を具備する2以上の文字区画を統合する統合補正処理と、予め定めた種々の条件に基づいて各文字区画が特殊文字を構成する文字区画であるか否かを解析し、特殊文字に該当する文字区画であると判定された場合には該当する属性を属性情報として設定する特殊文字解析処理と、を実行する。
In addition, when the character arrangement
特に、文字配置解析処理部123は、特殊文字解析処理として、見出し解析処理、字下げ解析処理、ルビ解析処理、及び、禁則文字解析処理を実行する。
In particular, the character arrangement
具体的には、文字配置解析処理部123は、統合補正処理としては、
(1)文字区画を検出する際の第1画素の検出結果に基づいて、行毎に、同一の行に属し、かつ、隣接する2つの文字区画の文書の行方向(すなわち、第1配列ライン方向)における配置間隔を示す文字ピッチを算出し、
(2)当該算出した文字ピッチが予め定められた文字ピッチ条件を具備する場合に、当該文字ピッチ条件を具備する2つの文字区画を同一の文字区画として統合補正を実行する
Specifically, the character arrangement
(1) Based on the detection result of the first pixel when the character section is detected, the line direction of the document of two adjacent character sections belonging to the same line for each line (that is, the first array line) Character pitch indicating the arrangement interval in (direction),
(2) When the calculated character pitch has a predetermined character pitch condition, integrated correction is executed with the two character sections having the character pitch condition as the same character section.
一方、文字配置解析処理部123は、見出し解析処理としては、
(1)前記文書の行を検出する際の前記第1画素(例えば、黒画素)の検出結果に基づいて、行毎に、文書の行送り方向(すなわち、第2配列ライン方向)に対する隣接する2つの行の配置間隔を行ピッチとして算出し、
(2)当該算出した行ピッチが予め定められた行ピッチ条件を具備する場合に、当該行ピッチ条件を具備する2つの行のうち、行ピッチを定める基点に基づいて定まる一方の行を、見出し行として特定し、
(3)特定した見出し行に属する文字区画に見出し属性情報を設定する。
On the other hand, the character arrangement
(1) Based on the detection result of the first pixel (for example, black pixel) at the time of detecting the document row, each row is adjacent to the document line feed direction (that is, the second array line direction). Calculate the interval between two rows as the row pitch,
(2) When the calculated line pitch has a predetermined line pitch condition, one of the two lines having the line pitch condition is found based on a base point that determines the line pitch. Identified as a line,
(3) Heading attribute information is set in the character section belonging to the specified heading line.
なお、行ピッチを定める基点とは、隣接する2つの前段及び後段の行の上端(横組みの場合)又は左端(縦組み)によって行ピッチを定める場合には、前段の行が「行ピッチを定める基点に基づいて定まる一方の行」となり、隣接する2つの前段及び後段の行の下端(横組みの場合)又は右端(縦組みの場合)によって行ピッチを定める場合には、後段の行が「行ピッチを定める基点に基づいて定まる一方の行」となる。 The base point for determining the line pitch is that when the line pitch is determined by the upper end (in the case of horizontal assembly) or the left end (in the vertical combination) of the adjacent two preceding and subsequent stages, If the line pitch is determined by the lower end (in the case of horizontal assembly) or the right end (in the case of vertical assembly) of two adjacent preceding and succeeding rows, the following row will be “One row determined based on a base point that determines the row pitch”.
そして、文字配置解析処理部123は、字下げ解析処理としては、
(1)各行毎に、行の先頭に位置する文字区画の配置位置が予め定めた先頭配置条件を具備する場合に、当該先頭配置条件を具備する行の先頭の文字区画を文書の段落における先頭文字として特定し、
(2)特定した文字区画に字下げ属性情報を設定する。
Then, the character placement
(1) For each line, when the arrangement position of the character section located at the head of the line has a predetermined head placement condition, the head character section of the line having the head placement condition is set as the head of the paragraph of the document. Identified as a character,
(2) Indentation attribute information is set in the specified character section.
また、文字配置解析処理部123は、ルビ解析処理としては、
(1)文書の行を検出する際の第1画素(例えば、黒画素)の検出結果に基づいて、行毎に、文書の行送り方向(第2配列ライン方向)に対する隣接する2つの行の配置間隔を行ピッチとして算出し、
(2)当該算出した行ピッチのピッチ幅が予め定められた行ピッチ特定条件を具備する場合に、当該行ピッチ特定条件を具備する2つの行のうち、行ピッチを定める基点に基づいて定まる行を、前記ルビを付与するルビ行として特定し、
(3)前記特定したルビ行に属する各文字区画の行方向の第1位置と前記ルビ行の前記文書の行送り方向に対して次段の行であるルビ対象行における各文字区画の行方向の第2位置とをそれぞれ比較して前記第1位置と前記第2位置の差が最小となるルビ対象行の文字区画をルビ対象文字として特定し、
(4)特定したルビ行に属する文字区画にルビ属性情報を設定するとともにルビの対象となる文字区画のID(具体的には、行番及び該当する行の並び順の探索位置)を設定し、特定したルビ対象行に属する文字区画にルビ対象属性情報を設定する。
In addition, the character arrangement
(1) Based on the detection result of the first pixel (for example, black pixel) at the time of detecting the document row, for each row, two adjacent rows in the document line feed direction (second array line direction) Calculate the arrangement interval as the line pitch,
(2) When the calculated pitch width of the line pitch has a predetermined line pitch specifying condition, a line determined based on a base point for determining the line pitch among the two lines having the line pitch specifying condition Is identified as a ruby line that grants the ruby,
(3) Line direction of each character section in the ruby target line that is the next line to the first position in the line direction of each character section belonging to the specified ruby line and the line feed direction of the document in the ruby line Each of the second position is identified as a ruby target character in a ruby target line that minimizes the difference between the first position and the second position,
(4) Set ruby attribute information for the character sections belonging to the specified ruby line, and set the ID of the character section that is the target of ruby (specifically, the search position of the line number and the order of the corresponding lines). The ruby target attribute information is set in the character section belonging to the specified ruby target line.
さらに、文字配置解析処理部123は、禁則文字解析処理としては、
(1)各文字区画の行方向の幅又は行送り方向の幅が予め定めた区画幅条件を具備する場合に、当該区画幅条件を具備する文字区画を禁則文字として特定し、
(2)特定した文字区画に禁則文字属性情報を設定する。
Furthermore, the character arrangement
(1) When the width in the line direction or the width in the line feed direction of each character section has a predetermined section width condition, the character section having the section width condition is specified as a prohibited character,
(2) Forbidden character attribute information is set in the specified character section.
なお、本実施形態においては、文字配置解析処理部123は、統合補正処理等において用いる文字ピッチ又は行ピッチ等については、後述するように前処理(補正処理用の前処理)として種々の演算を実行して算出するようになっている。
In the present embodiment, the character arrangement
また、文字配置解析処理部123は、文書データの元の文書構造におけるページ毎に各種の処理を実行する。ただし、文字配置解析処理部123は、複数ページの文書データであって、次のページのデータが存在する場合には、現ページの文字配置解析処理の実行後に、次ページに該当するデータについて文字配置解析処理を実行する。
The character arrangement
[4.3.2]認識処理
文字配置解析処理部123は、認識処理としては、取得した文書データに付加されるフラグ情報に基づいて、画像化された文書のページレイアウトを識別し、当該文書データにおける前記文書の行方向及び行送り方向を認識する。
[4.3.2] Recognition processing As the recognition processing, the character arrangement
例えば、文字配置解析処理部123は、フラグ情報に基づいて、取得した文書データの文書が横書き(すなわち、横組み)であるか、又は、縦書き(すなわち、縦組み)であるかを判定し、文書に沿って文字が配列される行方向(すなわち、文字を読む方向)と、当該行方向に対して直交方向となる文書の行送り方向(すなわち、文書の改行方向)と、を認識する。
For example, the character arrangement
また、文字配置解析処理部123は、上記に代えて、認識処理として、
(1)各第1配列ラインに属する各画素の画素値に基づいて第2配列ライン方向の文字が存在しない空白ライン数を検出し、
(2)各第2配列ラインに属する各画素の画素値に基づいて第1配列ライン方向の文字が存在しない空白ライン数を検出し、
(3)第1配列ライン方向の空白ライン数と第2配列ライン方向の空白ライン数とに基づいて、文書の行方向及び行送り方向を認識してもよい。
In addition, the character arrangement
(1) Detecting the number of blank lines where no character exists in the second array line direction based on the pixel value of each pixel belonging to each first array line,
(2) detecting the number of blank lines in which no character in the first array line direction exists based on the pixel value of each pixel belonging to each second array line;
(3) The line direction and line feed direction of the document may be recognized based on the number of blank lines in the first array line direction and the number of blank lines in the second array line direction.
特に、この場合には、文字配置解析処理部123は、空白ライン数が多い配列ライン方向を行送り方向と認識し、空白ライン数が少ない配列ライン方向を行方向と認識する。
In particular, in this case, the character arrangement
通常、行方向の文字間の距離は、行送り方向の行間の距離より短くなる。したがって、第1配列ライン方向の空白ライン数と第2配列ライン方向の空白ライン数によって行方向の文字間の距離及び行送り方向の行間の距離を算出するとともに、2つの距離の大小を比較すれば、行方向を認識することができる。 Usually, the distance between characters in the line direction is shorter than the distance between lines in the line feed direction. Therefore, the distance between the characters in the line direction and the distance between the lines in the line feed direction are calculated from the number of blank lines in the first array line direction and the number of blank lines in the second array line direction, and the two distances are compared. For example, the row direction can be recognized.
そこで、文字配置解析処理部123は、空白ライン数が多い配列ライン方向を行送り方向と認識し、空白ライン数が少ない配列ライン方向を行方向と認識することができるようになっている。
Therefore, the character arrangement
なお、この場合においては、第1配列ライン方向の空白ライン数と第2配列ライン方向の空白ライン数については、代表となる2つの行の行間及び2つの文字間の値を用いてもよいし、各行間及び各文字間の平均を用いてもよい。また、後述するように、算出された第1配列ライン方向及び第2配列ライン方向の最大区画サイズ、平均行ピッチ及び基準文字ピッチの値を用いてもよい。 In this case, as the number of blank lines in the first array line direction and the number of blank lines in the second array line direction, values between two representative lines and between two characters may be used. The average between each line and between each character may be used. Further, as will be described later, the calculated maximum partition size, average line pitch, and reference character pitch in the first array line direction and the second array line direction may be used.
[4.3.3]2値化処理
次に、図7を用いて本実施形態の文字配置解析処理部123における2値化処理について説明する。なお、図7は、本実施形態の文字配置解析処理部123における2値化処理について説明するため図であり、2値化処理の一例を示す図である。
[4.3.3] Binarization Processing Next, the binarization processing in the character arrangement
文字配置解析処理部123は、2値化処理としては、解析中の文書ページにおいて、カラーによって形成された文書画像をグレースケール画像に変換し、変換したグレースケール画像を、又は、白黒によって形成された文書画像を直接的に、予め定められた閾値に基づいて、2値化するとともに、2値化された文書画像における量子化ノイズ(2値化処理に伴う斑点状のノイズ)を除去するノイズ補正を実行する。
As the binarization processing, the character arrangement
具体的には、文字配置解析処理部123は、取得した文書画像がカラー画像の場合には、所定の演算処理を実行し、所定の演算処理によって白黒のグレースケール画像に変換する。例えば、文字配置解析処理部123は、(式1)に基づいて、画素毎にRGBの各画素値R(x,y)、G(x,y)及びB(x,y)をグレースケールの画素値P(x、y)を算出する。また、文字配置解析処理部123は、カラー画像の場合には、変換されたグレースケール画像を、又は、白黒画像の場合には、当該取得した文書画像に対して、閾値に基づいて、文字を構成する画素値「1」又は背景を構成する画素値「0」に変換する。
Specifically, when the acquired document image is a color image, the character arrangement
なお、例えば、文字配置解析処理部123は、各画素の階調値が0〜255の場合には、200を閾値として用いて2値化処理を実行する。また、文字配置解析処理部123は、ノイズ補正としては、2値化処理された文書画像に対して孤立点の除去及び不連続点の穴埋め等を実行するモルフォロジ演算に基づく画像処理を実行する。
For example, when the gradation value of each pixel is 0 to 255, the character arrangement
また、文字配置解析処理部123は、図6(A)、(B)に示すように、横書き又は縦書きのカラー又はグレースケールによる文書画像については、白及び黒の2値化処理を実行する。
Further, as shown in FIGS. 6A and 6B, the character arrangement
[4.3.4]行検出処理
次に、図8及び図9を用いて本実施形態の文字配置解析処理部123における行検出処理について説明する。なお、図8及び図9は、本実施形態の文字配置解析処理部123における行検出処理について説明するため図である。
[4.3.4] Line Detection Processing Next, line detection processing in the character arrangement
文字配置解析処理部123は、行検出処理としては、解析中の文書ページにおいて、第1配列ライン毎に、各第1配列ラインに属する画素の中から、2値化した際の一方の画素値(すなわち、黒又は白の画素値)を有する画素を少なくとも検出し、当該検出した画素の有無に基づいて前記画像化された文書の各行を検出する。
As the line detection processing, the character arrangement
なお、本実施形態においては、黒を示す画素値「1」を有する画素(以下、「黒画素」という。)又は、白を示す画素値「0」を有する画素(以下、「白画素」という。)といい、文字配置解析処理部123は、少なくともいずれの画素を検出する。ただし、以下の説明では、文字配置解析処理部123は、第1画素(黒画素)を検出する場合を用いて説明する。
In the present embodiment, a pixel having a pixel value “1” indicating black (hereinafter referred to as “black pixel”) or a pixel having a pixel value “0” indicating white (hereinafter referred to as “white pixel”). The character arrangement
具体的には、文字配置解析処理部123は、文書画像における文書の行方向の画素ライン(第1配列ライン)毎に、黒画素をカウントする。そして、文字配置解析処理部123は、黒画素のカウント数が「0」となるラインを空白ラインとして文書画像における文書の行間を構成するラインであると判定し、黒画素のカウント数が「1」以上となるラインを文字が形成されている行形成ラインとして文書画像における各文字を構成するラインであると判定する。
Specifically, the character arrangement
また、文字配置解析処理部123は、第1配列ラインにおける空白ラインが形成されている一以上のライン又はライン群の領域を行間として検出し、第1配列ラインにおける行形成ラインが形成されている一以上のライン又はライン群の領域を行として検出する。
In addition, the character arrangement
なお、このとき、文字配置解析処理部123は、検出した行については文書画像の先頭の行から順に符号(すなわち、識別情報であって、本実施形態においては「番号」を用いる。)を付与する。
At this time, the character arrangement
(横組みの文書構造の場合)
例えば、文書画像が(Sx×Sy)の矩形サイズで形成されている場合であって、各画素の文書画像上における座標値(x、y)が(0,0)〜(Sx−1,Sy−1)によって配列されている場合を想定する。
(For horizontal document structure)
For example, when the document image is formed with a rectangular size of (Sx × Sy), the coordinate values (x, y) of each pixel on the document image are (0, 0) to (Sx−1, Sy). -1) is assumed.
このような場合であって、文書画像の文書構造が横組みの場合には、x方向が行方向となり、y方向が行送り方向となる。また、x方向に画素が配列されているyラインが、第1配列ラインとなり、xラインが第2配列ラインとなる。 In such a case, when the document structure of the document image is horizontal composition, the x direction is the row direction and the y direction is the line feed direction. In addition, the y line in which pixels are arranged in the x direction is the first array line, and the x line is the second array line.
このとき、文字配置解析処理部123は、図8(A)に示すように、yライン毎に各画素値を検出し、黒画素をカウントする。また、文字配置解析処理部123は、黒画素のカウントが「1」以上の場合には、当該yラインを行形成ラインと判定し、カウント「0」の場合には、yラインを空白ラインと判定する。さらに、文字配置解析処理部123は、図8(B)に示すように、空白ラインが形成されているyライン又は空白ラインが連続して形成されているyライン群の領域を行間LSとして検出するとともに、行形成ラインが形成されているyライン群の領域を行C(t)として検出し、文書画像の先頭となる最上部の行からL行まで順に符号(t=1〜L)を付与する。
At this time, as shown in FIG. 8A, the character arrangement
(縦組みの文書構造の場合)
例えば、横組みの場合と同様に、文書画像が(Sx×Sy)の矩形サイズで形成されている場合であって、各画素の座標値(x、y)が(0,0)〜(Sx−1,Sy−1)によって配列されている場合を想定する。
(For vertical document structure)
For example, as in the case of horizontal composition, the document image is formed with a rectangular size of (Sx × Sy), and the coordinate values (x, y) of each pixel are (0, 0) to (Sx). −1, Sy−1) is assumed.
このような場合であって、文書画像の文書構造が縦組みの場合には、y方向が行方向となり、x方向が行送り方向となる。また、y方向に画素が配列されているxラインが、第1配列ラインとなり、yラインが第2配列ラインとなる。 In such a case, when the document structure of the document image is vertical composition, the y direction becomes the row direction and the x direction becomes the line feed direction. Further, the x line in which the pixels are arranged in the y direction becomes the first array line, and the y line becomes the second array line.
このとき、文字配置解析処理部123は、図9(A)に示すように、xライン毎に各yの画素値を検出し、黒画素をカウントする。また、文字配置解析処理部123は、カウントが「1」以上の場合には、当該xラインを行形成ラインと判定し、カウント「0」の場合には、xラインを空白ラインと判定する。そして、文字配置解析処理部123は、図9(B)に示すように、空白ラインが形成されているxライン又はxライン群の領域を行間LSとして検出するとともに、行形成ラインが形成されているxライン又はxライン群の領域を行C(t)として検出し、文書画像の先頭となる最右部の行からL行まで順に符号(t=1〜L)を付与する。
At this time, as shown in FIG. 9A, the character arrangement
[4.3.5]文字区画検出処理
次に、図10〜図13を用いて本実施形態の文字配置解析処理部123における文字区画検出処理ついて説明する。なお、図10〜図13は、本実施形態の文字配置解析処理部123における文字区画検出処理について説明するため図である。
[4.3.5] Character Block Detection Processing Next, the character block detection processing in the character layout
文字配置解析処理部123は、文字検出処理としては、解析中の文書ページにおいて、第1配列ライン及び第2配列ラインに属する各画素の画素値に基づいて、区画サイズ及び文書画像上における区画位置を特定しつつ、各文字区画を検出する。特に、文字配置解析処理部123は、上述の行検出処理として検出された文書画像の行毎に、検出された行に属する第2配列ライン毎の各第2配列ラインに属する画素の中から、2値化した際の一方の値を有する画素を検出し、当該検出した画素の有無に基づいて、行毎に文字区画を検出する。なお、行検出処理と同様に、文字区画検出処理においても、以下の説明においては、文字配置解析処理部123は、第1画素(黒画素)を検出する場合を用いて説明する。
The character arrangement
具体的には、文字配置解析処理部123は、行毎に文書画像における文書の行送り方向の画素ラインとなる第2配列ライン毎に、黒画素(又は、白画素)をカウントするとともに、黒画素のカウント数が「0」となるラインを空白ラインとして各行における文字間を構成するラインであると判定し、黒画素のカウント数が「1」以上となるラインを文字が形成されている文字形成ラインとして文書画像における各文字を構成するラインであると判定する。
Specifically, the character arrangement
そして、文字配置解析処理部123は、行毎に第2配列ラインにおける空白ラインが形成されている一以上のライン又はライン群の領域を文字間として検出し、第2配列ラインにおける文字形成ラインが形成されているライン群の領域を文字区画として検出する。特に、文字配置解析処理部123は、各文字区画を規定する座標を検出する。
And the character arrangement | positioning
なお、このとき、文字配置解析処理部123は、検出した文字区画については各行の先頭の文字区画から順に符号を付与する。
At this time, the character arrangement
(横組みの文書構造の場合)
例えば、文書画像が(Sx×Sy)の矩形サイズで形成されている場合であって、各画素の座標値(x、y)が(0,0)〜(Sx−1,Sy−1)によって配列されている場合を想定する。
(For horizontal document structure)
For example, the document image is formed in a rectangular size of (Sx × Sy), and the coordinate values (x, y) of each pixel are (0, 0) to (Sx−1, Sy−1). Assume that they are arranged.
このような場合であって、文書画像の文書構造が横組みの場合には、x方向が行方向となり、y方向が行送り方向となる。また、x方向に画素が配列されているyラインが、第1配列ラインとなり、xラインが第2配列ラインとなる。 In such a case, when the document structure of the document image is horizontal composition, the x direction is the row direction and the y direction is the line feed direction. In addition, the y line in which pixels are arranged in the x direction is the first array line, and the x line is the second array line.
このとき、文字配置解析処理部123は、図10(A)に示すように、検出された行毎に、各xラインの各画素値を検出し、黒画素をカウントする。また、文字配置解析処理部123は、カウントが「1」以上の場合には、当該xラインを文字形成ラインと判定し、カウント「0」の場合には、xラインを空白ラインと判定する。さらに、文字配置解析処理部123は、図10(B)に示すように、文字形成ラインが形成されているxライン又はxライン群の領域を文字区画C(t、m)として検出する。そして、文字配置解析処理部123は、図11に示すように、各文字区画を規定する四隅、すなわち、左上座標(x1,y1)、左下座標(x1,y2)、右上座標(x2,y1)及び右下座標(x2,y2)を検出するとともに、各行の先頭となる最左部の文字区画行からm区画まで順に符号を付与する。
At this time, as shown in FIG. 10A, the character arrangement
(縦組みの文書構造の場合)
例えば、横組みの場合と同様に、文書画像が(Sx×Sy)の矩形サイズで形成されている場合であって、各画素の座標値(x、y)が(0,0)〜(Sx−1,Sy−1)によって配列されている場合を想定する。
(For vertical document structure)
For example, as in the case of horizontal composition, the document image is formed with a rectangular size of (Sx × Sy), and the coordinate values (x, y) of each pixel are (0, 0) to (Sx). −1, Sy−1) is assumed.
このような場合であって、文書画像の文書構造が縦組みの場合には、y方向が行方向となり、x方向が行送り方向となる。また、y方向に画素が配列されているxラインが、第1配列ラインとなり、yラインが第2配列ラインとなる。 In such a case, when the document structure of the document image is vertical composition, the y direction becomes the row direction and the x direction becomes the line feed direction. Further, the x line in which the pixels are arranged in the y direction becomes the first array line, and the y line becomes the second array line.
このとき、文字配置解析処理部123は、図12(A)に示すように、検出された行毎に、各yラインの各画素値を検出し、黒画素をカウントする。また、文字配置解析処理部123は、カウントが「1」以上の場合には、当該yラインを文字形成ラインと判定し、カウント「0」の場合には、yラインを空白ラインと判定する。さらに、文字配置解析処理部123は、図12(B)に示すように、文字形成ラインが形成されているyライン又はyライン群の領域を文字区画C(t,m)として検出する。そして、図13に示すように、文字配置解析処理部123は、横組みと同様に、各文字区画を規定する四隅、すなわち、左上座標(x1,y1)、左下座標(x1,y2)、右上座標(x2,y1)及び右下座標(x2,y2)を検出するとともに、各行の先頭となる最左部の文字区画行からm区画まで順に符号を付与する。
At this time, as shown in FIG. 12A, the character arrangement
[4.3.6]補正処理用の前処理
次に、本実施形態の文字配置解析処理部123における補正処理用の前処理ついて説明する。
[4.3.6] Preprocessing for Correction Processing Next, preprocessing for correction processing in the character arrangement
文字配置解析処理部123は、統合補正処理と、見出し解析処理、ルビ解析処理及び禁則文字解析処理の各特殊文字解析処理との補正処理用の前処理として、文字区画の最大区画サイズ、平均区画サイズ及び標準区画サイズと、平均行ピッチ及び最大文字ピッチと、平均行ピッチと、文字間の距離とを算出する。
The character arrangement
なお、文字配置解析処理部123は、取得した文書データの元のデータ形式(すなわち、画像化された文書の文書構造)によって定まるページ毎に補正処理用の前処理を実行する。
Note that the character arrangement
(各行の最大区画サイズ)
文字配置解析処理部123は、検出された各文字区画に基づいて、行毎に行方向及び行送り方向における最大区画サイズをそれぞれ算出する。
(Maximum partition size for each row)
The character arrangement
具体的には、文字配置解析処理部123は、行毎に、検出された各文字区画の第1配列ラインにおけるx及びy座標値の差を算出するとともに、検出された各文字区画の第2配列ラインにおけるx及びy座標値の差を算出する。そして、文字配置解析処理部123は、行毎に、検出された各文字区画の第1配列ラインにおける座標値の差の最大の値を、解析中の文書ページにおいて行方向における最大サイズSmax(L1,t)に設定するとともに、検出された各文字区画の第2配列ラインにおける座標値の差の最大の値を、当該解析中の文書ページにおいて行送り方向における最大サイズSmax(L2,t)に設定する。
Specifically, the character arrangement
例えば、横組みの場合には、文字配置解析処理部123は、行毎に、(式2)及び(式3)に示すように、各文字区画の第1配列ラインの方向となる行方向の座標値の差、すなわち、各文字区画の幅を算出し、当該算出した各文字区画の最大幅Smax(x,t)を行方向の最大サイズSmax(L1,t)に設定する。また、文字配置解析処理部123は、行毎に、各文字区画の第2配列ラインの方向となる行送り方向の座標値の差、すなわち、各文字区画の高さを算出し、当該算出した各文字区画の最大の高さSmax(y,t)を行送り方向の最大サイズSmax(L2,t)に設定する。
For example, in the case of horizontal composition, the character arrangement
なお、式中の「t」は、行番、及び、「m」は、各行における先頭からの並び順を示す。また、「.x1」又は「.x2」は、文字区画両端のx座標を示し、「.y1」又は「.y2」は、文字区画両端のy座標を示す。例えば、C(t,m).x2は、解析中の文書ページにおけるt行目の先頭からm番目の文字区画における「x2」の座標値を示す。 In the expression, “t” indicates the line number, and “m” indicates the arrangement order from the top in each line. “.X1” or “.x2” indicates the x-coordinates at both ends of the character section, and “.y1” or “.y2” indicates the y-coordinates at both ends of the character section. For example, C (t, m). x2 represents the coordinate value of “x2” in the m-th character section from the beginning of the t-th line in the document page being analyzed.
一方、縦組みの場合には、文字配置解析処理部123は、行毎に、(式4)及び(式5)に示すように、各文字区画の第1配列ラインの方向となる行方向の座標値の差、すなわち、各文字区画の高さを算出し、当該算出した各文字区画の最大の高さSmax(y,t)を行方向の最大サイズSmax(L1,t)に設定する。また、文字配置解析処理部123は、行毎に、各文字区画の第2配列ラインの方向となる行送り方向の座標値の差、すなわち、各文字区画の幅を算出し、当該算出した各文字区画の最大幅Smax(x,t)を行送り方向の最大サイズSmax(L2,t)に設定する。
On the other hand, in the case of vertical composition, the character arrangement
なお、(式2)及び(式3)と同様に、式中の「t」は、行番、及び、「m」は、各行における先頭からの並び順を示す。また、「.x1」又は「.x2」は、文字区画両端のx座標を示し、「.y1」又は「.y2」は、文字区画両端のy座標を示す。例えば、C(t,m).x2は、解析中の文書ページにおけるt行目の先頭からm番目の文字区画における「x2」の座標値を示す。 As in (Expression 2) and (Expression 3), “t” in the expression indicates the line number, and “m” indicates the arrangement order from the top in each line. “.X1” or “.x2” indicates the x-coordinates at both ends of the character section, and “.y1” or “.y2” indicates the y-coordinates at both ends of the character section. For example, C (t, m). x2 represents the coordinate value of “x2” in the m-th character section from the beginning of the t-th line in the document page being analyzed.
(全行に基づく平均区画サイズ)
文字配置解析処理部123は、解析中の文書ページにおいて、全行における検出された各文字区画に基づいて、行方向及び行送り方向における平均区画サイズをそれぞれ算出する。
(Average partition size based on all rows)
The character arrangement
具体的には、文字配置解析処理部123は、(式6)及び(式7)に示すように、行毎に算出された行方向の最大サイズ及び行送り方向の最大サイズをそれぞれ加算し、全行(すなわち、T行)で除算することによって、解析中の文書ページにおける行方向の平均区画サイズSav(L1)及び行送り方向の平均区画サイズSav(L2)を算出する。なお、式中「T」は、行数を示す。
Specifically, as shown in (Expression 6) and (Expression 7), the character arrangement
例えば、横組みの場合には、文字配置解析処理部123は、当該算出した各行の最大幅Smax(x,t)をt=1,...,Tの範囲で加算し、全行(すなわち、T行)で除算することによって、行方向の平均区画サイズSav(L1)を算出する。また、文字配置解析処理部123は、当該算出した各行の最大の高さSmax(y,t)をt=1,...,Tの範囲で加算し、全行(すなわち、T行)で除算することによって、行方向の平均区画サイズSav(L2)を算出する。
For example, in the case of horizontal composition, the character arrangement
一方、縦組みの場合には、文字配置解析処理部123は、当該算出した各行の最大の高さSmax(y,t)をそれぞれ加算し、全行(すなわち、T行)で除算することによって、行方向の平均区画サイズSav(L1)を算出する。また、文字配置解析処理部123は、当該算出した各行の最大幅Smax(x,t)をそれぞれ加算し、全行(すなわち、T行)で除算することによって、行方向の平均区画サイズSav(L2)を算出する。
On the other hand, in the case of vertical composition, the character arrangement
(全行に基づく標準区画サイズ)
文字配置解析処理部123は、解析中の文書ページにおいて、各行における行方向の最大区画サイズ及び全行に基づく行方向の平均区画サイズを用いて全行に基づく標準区画サイズを算出する。
(Standard partition size based on all rows)
The character arrangement
具体的には、文字配置解析処理部123は、(式8)及び(式9)に示すように、各行における行方向の最大区画サイズと全行に基づく行方向の平均区画サイズの差分値と、行送り方向の最大区画サイズと全行に基づく行送り方向の平均区画サイズの差分値と、をそれぞれ算出し、算出した差分値のうち各々最小となる差分値Min|Smax(L1,t)−Sav(L1)|およびMin|Smax(L2,t)−Sav(L2)|を有する最大区画サイズの行ts1およびts2を標準行として設定する。そして、文字配置解析処理部123は、標準行に設定した行ts1における行方向のサイズSmax(L1,ts1)及び標準行に設定した行ts2における行送り方向のサイズSmax(L2,ts2)を、解析中の文書ページにおける行方向の標準区画サイズSst(L1)及び行送り方向の標準区画サイズSst(L2)に設定する。
Specifically, as shown in (Expression 8) and (Expression 9), the character arrangement
(全行に基づく平均行ピッチ)
文字配置解析処理部123は、解析中の文書ページにおいて、行毎に、行送り方向における検出された各文字区画における基準位置の平均座標値に基づいて、平均行ピッチを算出する。
(Average line pitch based on all lines)
The character arrangement
具体的には、文字配置解析処理部123は、行毎に、中心座標又は文字区画の四隅のいずれかの座標などの各文字区画における基準点の座標を加算し、該当する行の文字区画数で除算することによって、行毎の平均座標値Pt(av,t)を算出する。また、文字配置解析処理部123は、算出した行毎の平均座標値Pt(av,t)に基づいて、隣接する行における平均座標値の差の平均を算出し、当該算出した平均を、解析中の文書ページにおおける平均行ピッチとして設定する。
Specifically, the character arrangement
例えば、横組みの場合には、文字配置解析処理部123は、(式10)及び(式11)に示すように、行毎に算出された座標値y2における平均座標値Pt(av,t)に基づいて、後段に隣接する行との座標値y2における平均座標値Pt(av,t+1)との差を、全行を対象に算出し、算出した座標値の差のそれぞれについて平均を算出し、当該算出した平均を平均行ピッチSL(av)として設定する。
For example, in the case of horizontal composition, the character arrangement
なお、上述の各式と同様に、C(t,m).y2は、文字区画t行目の先頭からm番目の文字区画における「y2」の座標値を示し、「Nc」は、t行における文字区画数を示す。 As in the above-described equations, C (t, m). y2 represents the coordinate value of “y2” in the m-th character section from the beginning of the character section t-th line, and “Nc” represents the number of character sections in the t-th line.
一方、例えば、縦組みの場合には、文字配置解析処理部123は、(式12)及び(式13)に示すように、行毎に算出された座標値x1における平均座標値Pt(av,t)に基づいて、後段に隣接する行との座標値x1における平均座標値Pt(av,t+1)との差を、全行を対象に算出し、算出した座標値の差のそれぞれについて平均を算出し、当該算出した平均を平均行ピッチSL(av)として設定する。
On the other hand, for example, in the case of vertical composition, the character arrangement
なお、(式10)及び(式11)と同様に、C(t,m).x1は、文字区画t行目の先頭からm番目の文字区画における「x1」の座標値を示し、「Nc」は、t行における文字区画
数を示す。
Note that, similarly to (Expression 10) and (Expression 11), C (t, m). x1 indicates the coordinate value of “x1” in the m-th character section from the beginning of the t-th character section, and “Nc” indicates the number of character sections in the t-th line.
(各行の最大文字ピッチ)
文字配置解析処理部123は、解析中の文書ページにおいて、検出された各文字区画に基づいて、行毎に行方向における文字区画の最大の配列ピッチを最大文字ピッチとして算出する。
(Maximum character pitch of each line)
The character arrangement
具体的には、文字配置解析処理部123は、行毎に、検出された各文字区画の第1配列ラインにおける隣接する2つの文字区画の同一の座標位置おける座標値の差を算出し、算出した座標値の差の最大の値を、解析中の文書ページにおいて行方向における最大文字ピッチSpmax(L1,t)に設定する。
Specifically, the character arrangement
例えば、横組みの場合には、文字配置解析処理部123は、(式14)に示すように、各行において、隣接する2つの文字区画の左上の座標位置x1の座標値の差を算出し、算出した座標値の差の最大の値を、各行方向における最大文字ピッチSpmax(L1,t)に設定する。
For example, in the case of horizontal composition, the character arrangement
なお、上述の各式と同様に、式中の「t」は、行番、「m」は、各行における先頭からの並び順及び「.x1」は、x座標を示し、例えば、C(t,m).x1は、t行目の先頭からm番目の文字区画における「x1」の座標値を示す。 As in the above formulas, “t” in the formula is the row number, “m” is the order of arrangement from the top in each row, and “.x1” is the x coordinate. For example, C (t , M). x1 represents the coordinate value of “x1” in the m-th character section from the beginning of the t-th line.
一方、例えば、縦組みの場合には、文字配置解析処理部123は、(式15)に示すように、各行において、隣接する2つの文字区画の右隅の座標位置y2の座標値の差を算出し、算出した座標値の差の最大の値を、各行方向における最大文字ピッチSpmax(L1、t)に設定する。
On the other hand, for example, in the case of vertical composition, the character arrangement
なお、上述の各式と同様に、式中の「t」は、行番、「m」は、各行における先頭からの並び順、及び「.y2」は、y座標を示す。そして、例えば、(L1,1)は、t行における第1配列ラインを示し、C(t,m).y2は、t行目の先頭からm番目の文字区画における「y2」の座標値を示す。 As in the above-described expressions, “t” in the expression indicates the line number, “m” indicates the order of arrangement from the top in each line, and “.y2” indicates the y coordinate. For example, (L1, 1) indicates the first array line in the t row, and C (t, m). y2 represents the coordinate value of “y2” in the m-th character section from the beginning of the t-th row.
(全行に基づく基準文字ピッチ)
文字配置解析処理部123は、解析中の文書ページにおいて、各行における行方向の最大区画サイズ、全行に基づく行方向の平均区画サイズ及び各行の最大文字ピッチを用いて全行に基づく基準文字ピッチを算出する。
(Reference character pitch based on all lines)
The character layout
具体的には、文字配置解析処理部123は、(式16)に示すように、各行における行方向の最大区画サイズSmax(L1,t)と全行に基づく行方向の平均区画サイズSst(L1)の差分値をそれぞれ算出し、算出された差分値のうち最小となる差分値を有する最大区画サイズの行を標準行(Lst)として設定する。そして、文字配置解析処理部123は、標準行(Lst)に設定した行における最大文字ピッチSpmax(L1,Lst)を、解析中の文書ページにおける基準文字ピッチSp(st)に設定する。
Specifically, as shown in (Equation 16), the character arrangement
なお、上述の各式と同様に、式中の「t」は、行番、「Lst」は、(式17)に示すように、各行における行方向の最大区画サイズSmax(L1,t)と全行に基づく行方向の平均区画サイズSst(L1)の最小差分値Mint|ΔSp(L1,t)|を有する行を示す。 As in the above formulas, “t” in the formula is the row number, and “Lst” is the maximum partition size Smax (L1, t) in the row direction in each row, as shown in (Formula 17). The row having the minimum difference value Min t | ΔSp (L1, t) | of the average partition size Sst (L1) in the row direction based on all rows is shown.
[4.3.7]文字区画統合補正処理
次に、図14を用いて本実施形態の文字配置解析処理部123における統合補正処理ついて説明する。なお、図14は、本実施形態の文字配置解析処理部123における統合補正処理について説明するため図である。
[4.3.7] Character block integration correction processing
Next, the integrated correction processing in the character arrangement
文字配置解析処理部123は、文字区画統合補正処理としては、解析中の文書ページにおいて、行毎に、隣接する文字区画の間の距離をそれぞれ算出するとともに、当該算出した文字区画の間の距離が補正処理の前処理によって算出した基準文字ピッチ以下であるか否かをそれぞれ判定する。そして、文字配置解析処理部123は、文字区画の間の距離が基準文字ピッチ以下と判定した文字区画同士を連結し、一の文字区画に統合する。
The character arrangement
通常、2以上の互いに独立した部分から構成される文字については、漢字における「へん」や「つくり」等の個々の部分の間に空間が形成されるため、上述のように空白ラインによって文字区画を定めると、画素の大きさや文字の形によっては、個々の部分がそれぞれ別の文字区間として認識される場合がある。その一方、これらの個々の部分の間の空間は、文字間に形成される空間より狭い。 Normally, for characters composed of two or more mutually independent parts, a space is formed between individual parts such as “hen” and “make” in the kanji, so that character lines are defined by blank lines as described above. In some cases, each part may be recognized as a separate character segment depending on the size of the pixel or the shape of the character. On the other hand, the space between these individual parts is narrower than the space formed between the characters.
したがって、本実施形態においては、2以上の互いに独立した部分から構成される文字を一文字の文字区画として特定するように、基準となる値(すなわち、基準文字ピッチ)以下の空間がある隣接する2つの文字区画については、単一の文字区画に統合するようになっている。 Therefore, in the present embodiment, two adjacent spaces having a space equal to or less than a reference value (that is, a reference character pitch) are specified so that a character composed of two or more independent parts is specified as one character section. One character section is integrated into a single character section.
具体的には、文字配置解析処理部123は、(式18)及び(式19)に示すように、行(t)毎に、行方向の隣接する2つの文字区画C(t、m)及びC(t、m+1)の間の距離D(L1(m,m+1))が補正処理の前処理によって算出した基準文字ピッチSp(st)以下であるか否かをそれぞれ判定する。そして、文字配置解析処理部123は、文字区画の間の距離が基準文字ピッチSp(st)以下と判定した文字区画同士を連結し、一の文字区画に統合する。
Specifically, as shown in (Expression 18) and (Expression 19), the character arrangement
なお、(式18)は、横組みの場合の判定式を示し、(式19)は、縦組みの場合の判定式を示す。また、式中の「t」は、行番、「m」は、各行における先頭からの並び順、及び「.x」又は「.y」は、座標を示す。 Note that (Equation 18) shows a determination formula in the case of horizontal composition, and (Equation 19) shows a determination expression in the case of vertical composition. In the formula, “t” indicates a line number, “m” indicates the order of arrangement from the top in each line, and “.x” or “.y” indicates coordinates.
例えば、横組みの文書の場合には、単に行検出処理をしただけであると、一行目にある「は」及び2行目にある「い」については、2つの文字区画として検出されることになる。そこで、本実施形態における統合補正処理が実行されると、「は」及び「い」については、図14(A)に示すように、一つの文字区画として統合されるようになる。 For example, in the case of a horizontal document, if only line detection processing is performed, “ha” on the first line and “i” on the second line are detected as two character sections. become. Therefore, when the integrated correction process in the present embodiment is executed, “ha” and “i” are integrated as one character section as shown in FIG.
また、縦組みの文書の場合には、横組の文書の場合と同様に、単に行検出処理をしただけであると、一行目にある「は」及び2行目にある「い」については、2つの文字区画として検出されることになる。そこで、本実施形態における統合補正処理が実行されると、「は」及び「い」は、図14(B)に示すように、一つの文字区画として統合されるようになる。 Also, in the case of a vertically written document, as in the case of a horizontally written document, if the line detection process is simply performed, “ha” on the first line and “i” on the second line It will be detected as two character sections. Therefore, when the integrated correction process according to the present embodiment is executed, “ha” and “i” are integrated as one character section as shown in FIG.
[4.3.8]見出し解析処理
次に、図15を用いて本実施形態の文字配置解析処理部123における見出し解析処理ついて説明する。なお、図15は、本実施形態の文字配置解析処理部123における見出し解析処理について説明するため図である。
[4.3.8] Headline Analysis Processing Next, the headline analysis processing in the character arrangement
文字配置解析処理部123は、見出し解析処理としては、解析中の文書ページにおいて、行毎に、補正処理用の前処理によって算出した平均行ピッチに基づいて予め定めた条件(以下、「行ピッチ条件」という。)を具備したか否かを判定し、行ピッチ条件を具備する行に属する各文字区画については、見出しに用いる文字区画であることを示す属性を見出し属性情報として設定する。
As the headline analysis processing, the character arrangement
具体的には、文字配置解析処理部123は、図15並びに(式20)及び(式21)に示すように、各行のピッチが算出した平均行ピッチSL(av)の所定の係数倍(例えば1.5倍)より大きいか否かを判定する。そして、文字配置解析処理部123は、各行が算出した平均行ピッチSL(av)の所定の係数倍(例えば1.5倍)より大きいと判定した場合には、当該判定に用いた行を見出し行に設定し、当該行に属する各文字区画に見出し属性情報(mode=1)を設定する。
Specifically, as shown in FIG. 15 and (Equation 20) and (Equation 21), the character arrangement
なお、(式20)は、横組みの場合の判定式を示し、(式21)は、縦組みの場合の判定式を示す。また、上述と同様に、式中の「t」は、行番、「m」は、各行における先頭からの並び順、及び「.x2」又は「.y2」は、xまたはy座標を示す。さらに、行tが見出し行として判定される場合には、当該行に属する全ての文字区画が見出しに用いられるので、上述の演算においては、任意のmとm+1の文字区画についての行ピッチが算出されればよい。ただし、文字配置解析処理部123は、同一行の複数又は全部の文字区画を用いて平均その他の演算によって各行の行ピッチを算出してもよい。
In addition, (Formula 20) shows the judgment formula in the case of horizontal composition, and (Formula 21) shows the judgment formula in the case of vertical composition. Similarly to the above, “t” in the formula indicates the line number, “m” indicates the order of arrangement from the top in each line, and “.x2” or “.y2” indicates the x or y coordinate. Further, when the line t is determined as the heading line, all the character sections belonging to the line are used for the heading. Therefore, in the above calculation, the line pitch for any m and m + 1 character sections is calculated. It only has to be done. However, the character arrangement
[4.3.9]字下げ解析処理
次に、図16を用いて本実施形態の文字配置解析処理部123における字下げ解析処理ついて説明する。なお、図16は、本実施形態の文字配置解析処理部123における字下げ解析処理について説明するため図である。
[4.3.9] Indentation Analysis Processing Next, indentation analysis processing in the character arrangement
文字配置解析処理部123は、字下げ解析処理としては、解析中の文書ページにおいて、行毎に、先頭の文字区画における位置が補正処理用の前処理によって算出した第1配列ラインにおける標準区画サイズに基づいて予め定めた条件(以下、「先頭配置条件」という。)を具備したか否かを判定し、先頭配置条件を具備する文字区画については、字下げ文字に該当する文字区画であることを示す属性を字下げ属性情報として設定する。
As the indentation analysis process, the character arrangement
具体的には、文字配置解析処理部123は、図16、並びに(式22)及び(式23)に示すように、行方向において先頭となる文字区画が行方向の文字記載開始位置から所定の距離以上離れているか否かを判定する。そして、文字配置解析処理部123は、行方向において先頭となる文字区画が行方向の文字が記載される開始位置から所定の距離以上離れていると判定した場合には、当該判定に用いた文字区画に字下げ属性情報(mode=2)を設定する。
Specifically, as shown in FIG. 16 and (Equation 22) and (Equation 23), the character arrangement
なお、(式22)は、横組みの場合の判定式を示し、(式23)は、縦組みの場合の判定式を示す。また、式中の「t」は、行番、「1」は、各行における先頭の文字区画、及び「.x」は、座標を示す。また、「Xmin」は、横組みの場合における画像化された文書の文書構造において左側の文字配列開始位置のx座標を示し、「Ymax」は、縦組みの場合における画像化された文書の文書構造において最上端の文字配列開始位置のx座標を示す。 In addition, (Formula 22) shows the determination formula in the case of horizontal composition, and (Formula 23) shows the determination formula in the case of vertical composition. In the formula, “t” indicates a line number, “1” indicates a leading character section in each line, and “.x” indicates coordinates. “Xmin” indicates the x coordinate of the left character array start position in the document structure of the imaged document in the case of horizontal composition, and “Ymax” indicates the document of the imaged document in the case of vertical composition. The x coordinate of the character array start position at the uppermost end in the structure is shown.
[4.3.10]ルビ解析処理
次に、図17を用いて本実施形態の文字配置解析処理部123におけるルビ解析処理ついて説明する。なお、図17は、本実施形態の文字配置解析処理部123におけるルビ解析処理について説明するため図である。
[4.3.10] Ruby Analysis Processing Next, the ruby analysis processing in the character arrangement
文字配置解析処理部123は、ルビ解析処理としては、解析中の文書ページにおいて、行毎に、補正処理用の前処理によって算出した平均行ピッチに基づいて予め定めた条件(以下、「行ピッチ特定条件」という。)を具備したか否かを判定し、行ピッチ特定条件を具備する行に属する各文字区画については、ルビに用いる文字区画であることを示す属性をルビ属性情報として設定する。
As the ruby analysis processing, the character arrangement
また、文字配置解析処理部123は、特定したルビ行に属する各文字区画の行方向の第1位置とルビ行の文書の行送り方向に対して次段の行であるルビ対象行における各文字区画の行方向の第2位置とをそれぞれ比較するとともに、第1位置と第2位置の差が最小となるルビ対象行の文字区画をルビ対象文字として特定し、当該ルビ対象文字の文字区画にルビ対象文字を示す属性をルビ対象属性情報として設定する。そして、文字配置解析処理部123は、対象となっているルビの文字区画についても探索位置(ルビ対象となる文字区画の行及び並び順)の情報を設定する。
In addition, the character arrangement
具体的には、文字配置解析処理部123は、図17、並びに、(式24)及び(式25)に示すように、各行のピッチが算出した行送り方向(第2配列ライン方向)の標準区画サイズSst(L2)の所定の係数倍(例えば0.8倍)より小さいか否かを判定する。そして、文字配置解析処理部123は、各行が算出した標準区画サイズSst(L2)の所定の係数倍より小さいと判定した場合には、当該判定に用いた行をルビ行に設定し、当該行に属する各文字区画(C(t,m))にルビ属性情報(mode=3)を設定する。
Specifically, as shown in FIG. 17 and (Equation 24) and (Equation 25), the character arrangement
なお、(式24)は、横組みの場合の判定式を示し、(式25)は、縦組みの場合の判定式を示す。また、式中の「t」は、行番、「m」は、各行における先頭からの並び順、及び「.x1」および「.x2」又は「.y1」および「.y2」は、xまたはy座標を示す。さらに、行tがルビ行として判定される場合には、当該行に属する全ての文字区画がルビに用いられるので、上述の演算においては、任意のmの文字区画についての行ピッチが算出されればよい。ただし、文字配置解析処理部123は、同一行の複数又は全部の文字区画を用いて平均その他の演算によって各行の行ピッチを算出してもよい。
Note that (Equation 24) shows a determination formula in the case of horizontal composition, and (Equation 25) shows a determination expression in the case of vertical composition. In the formula, “t” is the line number, “m” is the order of arrangement from the top in each line, and “.x1” and “.x2” or “.y1” and “.y2” are x or The y coordinate is shown. Further, when the line t is determined to be a ruby line, all the character sections belonging to the line are used for ruby, and therefore the line pitch for any m character sections is calculated in the above calculation. That's fine. However, the character arrangement
また、文字配置解析処理部123は、(条件1)及び(条件2)に示すように、特定したルビ行に属する各文字区画の行方向の第1位置とルビ行の文書の行送り方向に対して次段の行であるルビ対象行における各文字区画の行方向の第2位置とをそれぞれ比較し、第1位置と前記第2位置の差が最小となるルビ対象行の文字区画をルビ対象文字として特定する。そして、文字配置解析処理部123は、特定したルビ対象文字として特定された文字区画(C(t+1,i))にルビ対象属性情報(mode=4)を設定するとともに、当該ルビ対象文字のルビとなるルビ属性情報を付与した文字区画に、当該ルビ対象属性情報の文字区画のID(C(t+1,i))を設定する。
Further, as shown in (Condition 1) and (Condition 2), the character arrangement
なお、(条件1)は、横組みの場合の判定条件を示し、(条件2)は、縦組みの場合の判定条件を示す。また、「t」は、行番、「i」および「m」は、各行における先頭からの並び順、及び「.x1」又は「.y2」は、座標を示す。 Note that (Condition 1) indicates the determination condition for horizontal composition, and (Condition 2) indicates the determination condition for vertical composition. “T” indicates the line number, “i” and “m” indicate the order of arrangement from the top in each line, and “.x1” or “.y2” indicates the coordinates.
[4.3.11]禁則文字解析処理
次に、図18を用いて本実施形態の文字配置解析処理部123における禁則文字処理ついて説明する。なお、図18は、本実施形態の文字配置解析処理部123における禁則文字解析処理について説明するため図である。
[4.3.11] Forbidden Character Analysis Processing Next, forbidden character processing in the character arrangement
文字配置解析処理部123は、禁則文字解析処理としては、解析中の文書ページにおいて、見出し解析処理、字下げ解析処理及びルビ解析処理の各属性情報が設定されていない文字区画について、各文字区画の行方向(第1配列ライン方向)の最大幅サイズ(文字区画内で黒画素が存在する最大の幅)及び最小幅サイズ(文字区画内で黒画素が存在する最小の幅)と、行送り方向(第2配列ライン方向)の最大幅サイズ及び最小幅サイズと、を算出する。そして、文字配置解析処理部123は、算出したそのそれぞれの差が予め定めた条件(以下、「禁則文字条件」という。)を具備したか否かを判定し、禁則文字条件を具備する文字区画については、禁則文字に該当する文字区画であることを示す属性を禁則文字属性情報として設定する。
As the prohibited character analysis processing, the character arrangement
具体的には、文字配置解析処理部123は、図18、並びに、(式26)及び(式27)に示すように、判定対象の文字区画の範囲において、
(1)行方向(第1配列ライン方向)の最大幅サイズZmax(L1)及び最小幅サイズZmin(L1)と、行送り方向の最大幅サイズZmax(L2)及び最小幅サイズZmin(L2)と、を算出し、
(2)行方向の最大幅サイズZmax(L1)及び最小幅サイズZmin(L1)の差(以下、「行方向サイズ差」という。)ΔZ(L1)と、行送り方向の最大幅サイズZmax(L2)及び最小幅サイズZmin(L2)の差(以下、「行送り方向サイズ差」という。)ΔZ(L2)と、をそれぞれ算出し、
(3)それぞれの差が行方向及び行送り方向のそれぞれが禁則文字条件である標準区画サイズSst(L1)及びSst(L2)の所定の係数倍(例えば、0.35倍)以下であるか否かを判定し、
(4)禁則条件を具備する場合には、当該判定に用いた文字区画に禁則文字属性情報(mode=5)を設定する。
Specifically, as shown in FIG. 18 and (Equation 26) and (Equation 27), the character arrangement
(1) Maximum width size Zmax (L1) and minimum width size Zmin (L1) in the row direction (first array line direction), maximum width size Zmax (L2) and minimum width size Zmin (L2) in the line feed direction, and , And
(2) The difference between the maximum width size Zmax (L1) in the row direction and the minimum width size Zmin (L1) (hereinafter referred to as “row direction size difference”) ΔZ (L1) and the maximum width size Zmax (in the line feed direction) L2) and the difference between the minimum width size Zmin (L2) (hereinafter referred to as “line feed direction size difference”) ΔZ (L2), respectively,
(3) Whether each difference is equal to or less than a predetermined coefficient multiple (for example, 0.35 times) of the standard partition sizes Sst (L1) and Sst (L2) in which the row direction and the line feed direction are prohibited character conditions Determine whether or not
(4) When the prohibition condition is satisfied, prohibition character attribute information (mode = 5) is set in the character section used for the determination.
なお、(式26)及び(式27)は、横組みの判定式の場合には、「Zmax(L1)」及び「Zmin(L1)」は、x座標となり、「Zmax(L2)」及び「Zmin(L2)」は、y座標となる。また、(式26)及び(式27)は、縦組みの判定式の場合には、「Zmax(L1)」及び「Zmin(L1)」は、y座標となり、「Zmax(L2)」及び「Zmin(L2)」は、x座標となる。 Note that (Expression 26) and (Expression 27) are “Zmax (L1)” and “Zmin (L1)” in the case of a horizontal determination formula, and become “x coordinates”, and “Zmax (L2)” and “ “Zmin (L2)” is the y coordinate. In addition, (Expression 26) and (Expression 27) are “Zmax (L1)” and “Zmin (L1)” in the case of a vertical determination formula, and become the y-coordinate, and “Zmax (L2)” and “ “Zmin (L2)” is the x coordinate.
[4.4]区画配置処理部
次に、図19及び図20を用いて本実施形態のアプリケーション処理部120におけるに区画配置処理部124ついて説明する。なお、図19及び図20は、本実施形態の区画配置処理部124における区画配置処理について説明するため図である。
[4.4] Partition Arrangement Processing Unit Next, the partition
区画配置処理部124は、取得した文書データの文書構造におけるページ(すなわち、文書ページ)毎に、前の文書ページの文字区画の配置に継続しつつ、字配置解析処理部によって、解析された各文字区画を、設定された指定表示領域の領域サイズと、予め定められた配置条件と、各文字区画の並び順(各ページ毎の並び順)にしたがって文字区画を指定表示領域に配置するための処理を実行する。
For each page (that is, document page) in the document structure of the acquired document data, the section
具体的には、区画配置処理部124は、文字区画の行番号と行毎の並び順C(t,m)と文書構造(すなわち、横組み又は縦組み)に従って、各文字区画を配置しつつ、見出し文字、字下げ文字、ルビ、ルビ対象文字及び禁則文字を示す各属性情報を有する文字区画を検出した場合に、予め定められた配置条件に従って各属性情報を有する文字区画を所定の位置に配置する。
Specifically, the section
すなわち、区画配置処理部124は、
(1)属性情報を有していない文字区画を予め定まっている並び順に従って配置し、
(2)見出し属性情報を有する文字区画を検出した場合には、当該文字区画を、当該見出し行に属する他の文字区画とともに、単一の行として設定された指定表示領域内に配置し、
(3)字下げ属性情報を有する文字区画を検出した場合には、当該文字区画を、設定された指定表示領域内における行の先頭であって字下げされる位置に配置し、
(4)ルビ属性情報を有する文字区画を検出した場合には、当該文字区画を、設定された指定表示領域内におけるルビが付与されるルビ対象文字のルビの位置に配置し、
(5)禁則文字属性情報を有する文字区画を検出した場合には、行の先頭に配置禁止の文字に対応する文字区画を前段の行末に、又は、行末に配置禁止の文字に対応する文字区画を次段の行の先頭にそれぞれ当該文字区画を配置する。
That is, the partition
(1) Arrange character sections that do not have attribute information according to a predetermined arrangement order;
(2) When a character section having heading attribute information is detected, the character section is arranged in a designated display area set as a single line together with other character sections belonging to the heading line;
(3) When a character section having indentation attribute information is detected, the character section is placed at the position where the indentation is at the beginning of the line within the set designated display area,
(4) When a character section having ruby attribute information is detected, the character section is arranged at the ruby position of the ruby target character to which the ruby is given within the set designated display area,
(5) When a character section having prohibited character attribute information is detected, the character section corresponding to the prohibited character at the beginning of the line is the end of the preceding line, or the character section corresponding to the prohibited character at the end of the line. Is placed at the beginning of the next line.
そして、区画配置処理部124は、配置された際の各文字区画の座標(以下、「改変文字区画座標」という。)を検出し、文字区画毎に文字区画の四隅の座標を有する配置データを生成する。
Then, the section
例えば、区画配置処理部124は、図19(横組みの場合)及び図20(縦組みの場合)に示すように、字下げ文字区画、ルビ文字区画、ルビ対象文字区画及び禁則文字区画については、上記の配置条件に従って指定表示領域内に配置する。
For example, as shown in FIG. 19 (in the case of horizontal composition) and FIG. 20 (in the case of vertical composition), the section
なお、本実施形態においては、区画配置処理部124は、行末における禁則文字の配置を行う関係上、区画配置処理の実行の際には、図19及び図20に示すように、指定表示領域より行方向に狭い配置領域(以下、「実配置領域」という。)を用いて配置処理を実行し、禁則文字の文字区画があった場合に、指定表示領域内であって禁則文字の前文字区画と同一の行に配置するようになっている。ただし、この実配置領域は、指定表示領域に対して最大の禁則文字の文字区画が配置可能なスペース分狭い領域サイズであればよい。
In the present embodiment, the section
[4.5]画像データ生成部
次に、図21を用いて本実施形態のアプリケーション処理部120におけるに画像データ生成部125ついて説明する。なお、図21は、本実施形態の画像データ生成部125における画像生成処理について説明するため図である。ただし、図21は、横組みの場合におけるビットマップ画像を生成する場合について説明するための図である。
[4.5] Image Data Generation Unit Next, the image
画像データ生成部125は、区画配置処理部124によって生成された配置データ、すなわち、指定表示領域に配置された各文字区画に基づいて、ビットマップ画像を生成する。
The image
具体的には、画像データ生成部125は、図21に示すように、文書データにおいて各文字区画C(t,m)の該当する区画画像、すなわち、文書データ上の座標で囲まれた各文字区画C(t,m)の画素ブロック(各画素の画素値)を抽出し、当該画素ブロックを、区画配置処理部124によって生成された配置データから各文字区画C(t,m)の四隅の座標(すなわち、改変文字区画座標であって、具体的には、(x1,y1)、(x2,y1)、(x1,y2)及び(x2,y2)である)に割り当てて指示指定領域内の各画素を設定し、ビットマップ画像を生成する。特に、画像データ生成部125は、カラー画像であれば、RGBの各画素値を、白黒画像であれば、グレースケールの値を改変文字区画座標の各画素に設定する。
Specifically, as shown in FIG. 21 , the image
[5]表示処理の動作
[5.1]閲覧アプリケーションのメイン表示処理
次に、図22を用いて本実施形態の携帯用端末装置10における閲覧アプリケーションに基づく文書画像の表示処理の動作について説明する。なお、図22を用いて本実施形態の携帯用端末装置10における閲覧アプリケーションに基づく文書画像の表示処理の動作を示すフローチャートである。
[5] Display Processing Operation [5.1] Browsing Application Main Display Processing Next, the operation of the document image display processing based on the browsing application in the portable terminal device 10 of the present embodiment will be described with reference to FIG. . In addition, it is a flowchart which shows the operation | movement of the display process of the document image based on the browsing application in the portable terminal device 10 of this embodiment using FIG.
本動作においては、画像化された文書画像の文書データがデータ記憶部100に既に記憶されているものとし、当該文書データのページサイズとは表示サイズが異なる指定表示領域に当該文書データの文書画像を表示するものとする。
In this operation, it is assumed that the document data of the imaged document image is already stored in the
また、所定の文書データにおける文書画像の閲覧中において使用可能なユーザ操作には、指定表示領域の変更指示と、スクロールによる表示位置の変更指示と、終了指示と、を含む。 In addition, user operations that can be used while viewing a document image in predetermined document data include an instruction to change a designated display area, an instruction to change a display position by scrolling, and an end instruction.
まず、データ管理制御部121は、操作部160によってユーザが閲覧を希望する文書データの選択とともに、ユーザの閲覧アプリケーションの実行開始の指示を検出すると(ステップS101)、選択された文書データをコンテンツデータ記憶部102から読み出してROM/RAM103に展開する(ステップS102)。
First, when the data
次いで、文字配置解析処理部123は、読み出した文書データの文書画像に含まれる各文字の文字区画を、文書ページ毎に解析する文字区画解析処理を実行し、各文字区画の基準座標(具体的には矩形の四隅の座標)及び見出し等の属性情報から構成される文字区画データを生成する(ステップS103)。なお、文字配置解析処理部123における文字区画解析処理の詳細については後述する。
Next, the character arrangement
次いで、指定表示領域設定部122は、予め定められた標準的な指定表示領域を読み出す(ステップS104)。例えば、データ管理制御部121は、前回の閲覧アプリケーションの動作時の指定表示領域をデータ記憶部100に記憶し、本処理においてデータ記憶部100から読み出す。
Next, the designated display
次いで、区画配置処理部124は、ステップS103において実行された文字区画解析処理によって解析された各文字区画を、所定の配置状況及び属性情報に従って、ステップS104の処理において読み出した指定表示領域、又は、ステップS109の処理において設定された指定表示領域に配置する区画配置処理を実行する(ステップS105)。なお、区画配置処理部124における区画配置処理の詳細については後述する。
Next, the section
次いで、画像データ生成部125は、配置された指定表示領域内の文字区画に、配置された文字区画に対応する元の文書画像における画素ブロックを配置してビットマップ画像を生成する(ステップS106)。
Next, the image
次いで、画像データ生成部125は、表示制御と連動して該当する部分のビットマップ画像を表示部150に出力し、ユーザの操作入力を待機する(ステップS107)。なお、スクロール指示された場合には、その指示に連動して該当する部分のビットマップ画像を連続的に出力する。
Next, the image
次いで、データ管理制御部121は、ユーザにおける操作入力を検出すると(ステップS108)、スクロールによる表示変更指示の有無(ステップS109)、及び、指定表示領域の変更指示の有無(ステップS110)をそれぞれ判定する。
Next, when detecting an operation input by the user (step S108), the data
このとき、データ管理制御部121は、ユーザにおける操作入力が指定表示領域の変更指示と判定した場合には、ステップS107の処理に移行し、ユーザにおける操作入力が改変ページの指定と判定した場合には、ステップS105の処理に移行し、ユーザにおける操作入力がいずれの操作入力でもないと判定した場合には、閲覧アプリケーションの終了処理を実行し(ステップS111)、本動作を終了させる。
At this time, if the data
[5.2]文字配置解析処理
次に、図23を用いて本実施形態の携帯用端末装置10において、閲覧アプリケーション実行中に実行される文字配置解析処理の動作について説明する。なお、図23は、本実施形態において、閲覧アプリケーション実行中における文字配置解析処理の動作を示すフローチャートである。
[5.2] Character Arrangement Analysis Processing Next, the operation of the character arrangement analysis processing executed during the execution of the browsing application in the portable terminal device 10 of the present embodiment will be described using FIG. FIG. 23 is a flowchart showing the operation of character arrangement analysis processing during execution of the browsing application in the present embodiment.
本動作においては、文書データのページレイアウト、すなわち、横組みであるか、縦組みであるかは、フラグ情報として文書データに含まれているものとする。また、本動作においては、文字区画解析処理の実行を検出すると、文書ページ毎に、以下の処理が実行されるものとする。 In this operation, it is assumed that the page layout of document data, that is, whether it is horizontal composition or vertical composition, is included in the document data as flag information. In this operation, when the execution of the character section analysis process is detected, the following process is executed for each document page.
まず、文字配置解析処理部123は、上述のステップS103の処理において、文字区画解析処理の実行を検出すると(ステップS201)、ROM/RAM103に記憶された文書データに含まれるフラグ情報に基づいて、当該文書データのページレイアウトを識別し、当該文書データにおける前記文書の行方向及び行送り方向を認識する(ステップS202)。
First, when the character layout
次いで、文字配置解析処理部123は、カラーによって形成された文書画像をグレースケール画像に変換し、変換したグレースケール画像を、又は、白黒によって形成された文書画像を直接的に、予め定められた閾値に基づいて、2値化するとともに、2値化された文書画像におけるノイズを除去するノイズ補正を実行する(ステップS203)。
Next, the character arrangement
次いで、文字配置解析処理部123は、行検出処理及び文字区画検出処理を実行するために、認識した行方向及び行送り方向に対する2値化された各画素のそれぞれの画素値(黒画素、白画素又はその双方)をカウントする(ステップS204)。
Next, the character arrangement
次いで、文字配置解析処理部123は、行方向の各画素における画素値のカウント数に基づいて、行方向における空白の画素ライン(空白ライン)を抽出し、領域幅(すなわち、行の高さ又は幅)を含む各行を検出する(ステップS205)。
Next, the character arrangement
次いで、文字配置解析処理部123は、検出した行毎に、行送り方向の各画素における画素値のカウント数に基づいて、行送り方向における空白の画素ライン(空白ライン)及び文字を形成する文字形成ラインを抽出し、行毎の各文字区画を検出する(ステップS206)。
Next, the character arrangement
次いで、文字配置解析処理部123は、補正処理用の前処理として、最大区画サイズ、平均区画サイズ、標準区画サイズ、平均行ピッチ、最大文字ピッチ、及び、基準文字ピッチを算出する(ステップS207)。
Next, the character arrangement
次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、各行において、文字ピッチ条件を具備する隣接する2つの文字区画を統合する統合補正処理を実行する(ステップS208)。
Next, the character arrangement
次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、各行において、行ピッチ条件を具備する行であるか否かを判定し、行ピッチ条件を具備する行に属する文字区画に、見出し文字としての属性(見出し属性情報)を設定する見出し解析処理を実行する(ステップS209)。
Next, the character arrangement
次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、各行の先頭の文字区画について、先頭配置条件を具備するか否かを判定し、先頭配置条件を具備する先頭の文字区画に、字下げ文字としての属性(字下げ属性情報)を設定する字下げ解析処理を実行する(ステップS210)。
Next, the character arrangement
次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、各行において、行ピッチ特定条件を具備するか否かを判定し、行ピッチ特定条件等を有する文字区画をルビ又はルビ対象文字として設定する(ステップS211)。
Next, the character arrangement
具体的には、文字配置解析処理部123は、行ピッチ特定条件を具備する各文字区画をルビとしての属性(ルビ属性情報)設定し、ルビと判定され文字区画が存在した場合にルビと判定された文字区画に対して所定の条件を有する文字区画をルビ対象文字としての属性(ルビ対象文字属性情報)を設定し、かつ、ルビに設定された文字区画にルビ対象文字として設定された文字区画を探索する探索位置を設定する。
Specifically, the character arrangement
次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、見出し属性情報、字下げ属性情報、ルビ属性情報及びルビ対象属性情報が設定されていない各文字区画について、禁則条件を具備するか否かを判定し、禁則条件を有する文字区画に禁則文字としての属性(禁則文字属性情報)を設定する禁則文字解析処理を実行する(ステップS212)。
Next, the character arrangement
最後に、文字配置解析処理部123は、文字区画毎に、上記各処理によって得られた文字区画の基準座標(具体的には矩形の四隅の座標)、先頭からの並び順情報、及び、見出し等の上記属性情報を含む文字区画データを生成してROM/RAM103に展開し(ステップS213)、本動作を終了させる。
Finally, the character arrangement
[5.3]区画配置処理
次に、図24〜図26を用いて本実施形態の携帯用端末装置10において、閲覧アプリケーション実行中に実行される区画配置処理の動作について説明する。なお、図24〜図26は、本実施形態において、閲覧アプリケーション実行中における区画配置処理の動作を示すフローチャートである。
[5.3] Division Arrangement Processing Next, the operation of the division arrangement processing executed during the execution of the browsing application in the portable terminal device 10 of the present embodiment will be described with reference to FIGS. 24 to 26 are flowcharts showing the operation of the partition arrangement process during the execution of the browsing application in the present embodiment.
本動作においては、文書データの文書構造におけるページ(すなわち、元の文書形式のページ(以下、単に「文書ページ」という。))毎に実行するものとし、配置条件は閲覧アプリケーションの実行開始時にROM/RAM103に展開されているものとする。
This operation is executed for each page in the document structure of the document data (that is, a page in the original document format (hereinafter simply referred to as “document page”)), and the arrangement condition is ROM at the start of execution of the browsing application. It is assumed that /
また、本動作においては、文字区画を配置する際に、行方向に次の文字区画を配置する座標(x、y)の位置(以下、「次配置位置」という。)を認識し、かつ、指定表示領域内の改行を行うための行方向の残存スペースを算出しつつ、当該文字区画を配置するものとする。 In this operation, when a character segment is arranged, the position of coordinates (x, y) (hereinafter referred to as “next arrangement position”) for arranging the next character segment in the line direction is recognized, and It is assumed that the character section is arranged while calculating the remaining space in the line direction for performing a line break in the designated display area.
まず、区画配置処理部124は、上述のステップS105の処理において、区画配置処理の実行を検出すると(ステップS300)、ユーザによって設定された又は予め設定された指定表示領域の領域サイズから行方向の長さ情報を取得して後段の処理の演算に使用する各値を初期化する(ステップS301)。具体的には、区画配置処理部124は、行方向及び行送り方向の画素数を取得して指定表示領域の領域サイズ(Ax×Ay)を取得し、かつ、実配置領域(Bx×By)を設定する。また、このとき、区画配置処理部124は、ROM/RAM103に記憶される、指定表示領域の残存スペースを算出する際に用いる行方向の長さWD(L1)を初期化する。
First, when the partition
次いで、区画配置処理部124は、該当する文書ページに属する文字区画の文字区画データをROM/RAM103から読み出して取得する(ステップS302)。具体的には、区画配置処理部124は、先頭の文書ページ又は指定表示領域が設定される際に指定表示領域の先頭に表示していた文字区画が属する文書ページを取得する。
Next, the section
次いで、区画配置処理部124は、読み出した文書ページにおける該当する文字区画を、その属性情報とともに、読み出す(ステップS304)。具体的には、区画配置処理部124は、読み出した文書ページにおいて、文字配置解析処理によって得られた各文字区画の並び順に従って、先頭の文字区画、又は、既に当該文書ページについて本処理を実行している場合には、前回読み出した文字区画の次の文字区画を読み出す。
Next, the section
次いで、区画配置処理部124は、読み出した文字区画の属性情報に基づいて当該文字区画がルビを示す文字区画であるか否かを判定する(ステップS305)。具体的には、区画配置処理部124は、当該文字区画の属性情報としてルビ属性情報「mode=3」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画の属性情報がルビを示す文字区画であると判定した場合には、ステップS304の処理に戻り、ルビでない文字区画と判定した場合には、ステップS306の処理に移行する。
Next, the section
なお、本処理は、ルビと判定された文字区画を、ルビ以外の文字区画を配置した後に配置するための判定処理である。 This process is a determination process for arranging character sections determined to be ruby after arranging character sections other than ruby.
次いで、区画配置処理部124は、読み出した文字区画の属性情報に基づいて当該文字区画が見出し行に属する文字区画であるか否かを判定する(ステップS306)。具体的には、区画配置処理部124は、当該文字区画の属性情報として見出し属性情報「mode=1」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画が見出し行に属する文字区画であると判定した場合には、ステップS312の処理に移行し、見出し行に属する文字区画でないと判定した場合には、ステップS307の処理に移行する。
Next, the section
次いで、区画配置処理部124は、読み出した文字区画の属性情報に基づいて当該文字区画が字下げ文字を示す文字区画であるか否かを判定する(ステップS307)。具体的には、区画配置処理部124は、当該文字区画の属性情報として字下げ属性情報「mode=2」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画が字下げ文字であると判定した場合には、ステップS312の処理に移行し、字下げ文字でないと判定した場合には、ステップS308の処理に移行する。
Next, the section
次いで、区画配置処理部124は、ステップS307の処理において読み出した文字区画が字下げ文字でないと判定した場合には、所定の演算を実行することによって、指定表示領域の該当する行において読み出した文字区画を配置する残存スペースがあるか否かを判定する(ステップS308)。具体的には、区画配置処理部124は、ROM/RAM103に記憶された行方向の長さWD(L1)に、読み出した文字区画の行方向の長さ(横組みの場合にはΔx及び縦組みの場合には、Δy)を加算し、その値がステップS302の処理において取得した実配置領域における行方向の長さ(横組みの場合には、Bx及び縦組みの場合には、By)より小さいか否かを判定する。
Next, when the section
また、このとき、区画配置処理部124は、指定表示領域の該当する行において読み出した文字区画を配置する残存スペースがあると判定した場合には、ステップS321の処理に移行し、読み出した文字区画を配置する残存スペースがないと判定した場合には、ステップS331の処理に移行する。
At this time, if the section
次いで、区画配置処理部124は、ステップS308の処理において、指定表示領域の該当する行において読み出した文字区画を配置する配置スペースがないと判定した場合には、当該読み出した文字区画の属性情報に基づいて禁則文字を示す文字区画であるか否かを判定する(ステップS311)。
Next, when it is determined in step S308 that there is no arrangement space for arranging the read character section in the corresponding row of the designated display area, the section
具体的には、区画配置処理部124は、当該文字区画の属性情報として禁則文字属性情報「mode=5」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画が禁則文字でないと判定した場合には、ステップS312の処理に移行し、禁則文字であると判定した場合には、ステップS321の処理に移行する。
Specifically, the section
次いで、区画配置処理部124は、ステップS306の処理において読み出した文字区画が見出し行に属する文字区画であると判定した場合には、ステップS307の処理において読み出した文字区画が字下げ文字であると判定した場合には、又は、ステップS311の処理において読み出した文字区画が禁則文字であると判定した場合には、指定表示領域における次配置位置を改行し、行方向の長さWD(L1)を初期化し(ステップS312)、ステップS321の処理に移行する。具体的には、区画配置処理部124は、次配置位置に所定の行間値を加算して行送り方向の位置を決定しつつ、行方向の先頭位置に次配置位置を決定する。
Next, if the section
次いで、区画配置処理部124は、ステップS308の処理において、指定表示領域の該当する行において読み出した文字区画を配置する配置スペースがあると判定した場合に、ステップS312の処理において、読み出した文字区画が禁則文字であると判定した場合に、又は、ステップS312の処理において改行し、かつ、行方向の先頭位置に次配置位置を決定した場合に、当該次配置位置に読み出した文字区画を配置する(ステップS321)。
Next, when it is determined in the process of step S308 that there is an arrangement space for arranging the read character section in the corresponding line of the designated display area, the section
次いで、区画配置処理部124は、行方向の次配置位置に読み出した文字区画の行方向の長さ(横組みの場合にはΔx及び縦組みの場合には、Δy)を加算し、行方向の次配置位置を更新する(ステップS322)。
Next, the partition
次いで、区画配置処理部124は、ルビを除き、ステップS302の処理によって読み出した文書データについて、全ての文字区画について既に区画配置処理を実行したか否かを判定する(ステップS331)。このとき、区画配置処理部124は、ルビを除き、全ての文字区画について既に区画配置処理を実行したと判定した場合には(すなわち、ルビ以外の文字区画を配置した判定した場合には)、ステップS401の処理移行し、ルビを除き、全ての文字区画について既に区画配置処理を実行していないと判定した場合には(すなわち、ルビ以外にも未だ区画配置処理を実行していない文字区画があると判定した場合には)、ステップS304の処理に戻る。
Next, the section
一方、区画配置処理部124は、ステップS331の処理において、ルビを除き、全ての文字区画について既に区画配置処理を実行したと判定した場合には、ROM/RAM103から該当する文書ページの先頭から該当する文字区画を再度読み出す(ステップS401)。
On the other hand, if the section
次いで、区画配置処理部124は、当該読み出した文字区画の属性情報に基づいてルビを示す文字区画であるか否かを判定する(ステップS402)。具体的には、区画配置処理部124は、当該文字区画の属性情報としてルビ属性情報「mode=3」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画の属性情報がルビを示す文字区画であると判定した場合には、ステップ403の処理に戻り、ルビでない文字区画と判定した場合には、ステップS401の処理に戻る。
Next, the section
次いで、区画配置処理部124は、属性情報に含まれるルビ対象文字を検索し、当該ルビ対象文字のルビ位置を算出し(ステップS403)、該当する位置に文字区画をルビとして配置する(ステップS404)。
Next, the section
次いで、区画配置処理部124は、ルビを含め全ての文字区画について区画配置処理を実行したか否かを判定する(ステップS405)。このとき、区画配置処理部124は、ルビを含め全ての文字区画について区画配置処理を実行していないと判定した場合には、ステップS401の処理に戻り、ルビを含め全ての文字区画について区画配置処理を実行したと判定した場合には、ステップS402の処理に移行する。
Next, the section
最後に、区画配置処理部124は、次の文書ページの有無を判定するとともに(ステップS406)、次の文書ページがあると判定した場合には、ステップS302の処理に移行し、次の文書ページがないと判定した場合には、本動作を終了させる。
Finally, the partition
[6]表示処理の一例
次に、図27及び図28を用いて本実施形態における表示処理の一例ついて説明する。なお、図27は、本実施形態における横組みの場合における表示処理の一例を説明するための図であり、図28は、本実施形態における縦組みの場合における表示処理の一例を説明するための図である。
[6] Example of Display Processing Next, an example of display processing in the present embodiment will be described with reference to FIGS. 27 and 28. 27 is a diagram for explaining an example of display processing in the case of horizontal composition in the present embodiment, and FIG. 28 is for explaining an example of display processing in the case of vertical composition in the present embodiment. FIG.
横組みの場合は、携帯用端末装置10は、ユーザ操作に基づいて、例えば、図27(A)に示すJPEG形式などのビットマップ形式の文書データ(文書ページ)に基づいて閲覧アプリケーションを起動させると、図27(B)に示すような文字区画データを生成する。そして、携帯用端末装置10は、図28(C)に示すような指定表示領域(実配置領域)を検出して設定すると、図27(D)に示すような、指定表領域に従った表示画面を出力する。 In the case of horizontal composition, the portable terminal device 10 activates the browsing application based on user data, for example, based on document data (document page) in a bitmap format such as the JPEG format shown in FIG. Then, character segment data as shown in FIG. 27B is generated. Then, when the portable terminal device 10 detects and sets the designated display area (real arrangement area) as shown in FIG. 28C, the display according to the designated table area as shown in FIG. Output the screen.
また、縦組みの場合は、携帯用端末装置10は、ユーザ操作に基づいて、例えば、図28(A)に示すJPEG形式などのビットマップ形式の文書データ(文書ページ)に基づいて閲覧アプリケーションを起動させると、図28(B)に示すような文字区画データを生成する。そして、携帯用端末装置10は、図27(C)に示すような指定表示領域(実配置領域)を検出して設定すると、図28(D)に示すような、指定表領域に従った表示を実行する。 Further, in the case of vertical composition, the portable terminal device 10 selects a browsing application based on user data, for example, based on document data (document page) in a bitmap format such as the JPEG format shown in FIG. When activated, character segment data as shown in FIG. 28B is generated. Then, when the portable terminal device 10 detects and sets a designated display area (actual arrangement area) as shown in FIG. 27C, display according to the designated table area as shown in FIG. Execute.
[7]変形例
次に、図29を用いて上記実施形態に基づく変形例について説明する。なお、図29は、上記実施形態に基づく変形例を説明するための図である。
[7] Modified Example Next, a modified example based on the above embodiment will be described with reference to FIG. In addition, FIG. 29 is a figure for demonstrating the modification based on the said embodiment.
上述の実施形態においては、携帯用端末装置10は、ページの概念を用いることなく、行送り方向については、文書データの文末まで一ページ分の仮想的なページによってビットマップ画像を生成し、ユーザのスクロール表示に従ってユーザの希望する部分をシームレスに閲覧可能に表示するようになっているが、指定表示領域についても、ページの概念を用いて文書画像データを指定表示領域に従って表示してもよい。 In the above-described embodiment, the portable terminal device 10 generates a bitmap image with a virtual page for one page up to the end of the document data in the line feed direction without using the concept of pages, and the user According to the scroll display, the portion desired by the user is displayed so as to be seamlessly browseable. However, the document image data may be displayed according to the designated display area using the concept of the page for the designated display area.
この場合には、区画配置処理部124は、設定された指定表示領域に従って、複数のページ(以下、「改変ページ」という。)によって文書画像を提供するために、各文字区画を配置するようになっている。例えば、区画配置処理部124は、一の改変ページでは元の文書画像における一のページの文字区画を全て配置することができない場合には、改変ページに文字区画を配置する領域が確保することができなくなる毎に、一の改変ページを追加し、追加した改変ページに、未だ配置されていない文字区画(以下、「未配置文字区画」という。)を配置条件に従って配置する。
In this case, the section
特に、この場合において、区画配置処理部124は、図29に示すように、文書画像におけるmpページ(文書ページにおけるmpページ)の文字区画の配置の終了後に、改変ページ(以下、「継続中改変ページ」という。)に一以上の文字区画が配置可能な場合には、文書ページの(mp+1)ページにおける先頭の文字区画から順に、配置条件に従って継続中改変ページの未配置領域に配置し、npページ目の改変ページを生成し、継続中改変ページに未配置の文字区画によって(np+1)ページ目の改変ページを生成する。
In particular, in this case, as shown in FIG. 29, the section
そして、画像データ生成部125は、ユーザによって設定された指定表示領域に基づく改変ページ毎に文書画像を表示するためのデータを生成する。
Then, the image
以上、本実施形態の携帯用端末装置10は、2値化された第1配列ライン及び第2配列ラインの各画素の画素値に基づいて、画像化された文書における各文字の画像領域(区画画像)を文字区画として検出することができるので、設定された表示領域に合わせて各文字区画を配列させることができる。 As described above, the portable terminal device 10 according to the present embodiment is based on the binarized first array line and the pixel value of each pixel of the second array line, and the image area (section) of each character in the imaged document. Image) can be detected as character sections, so that each character section can be arranged in accordance with the set display area.
したがって、本実施形態の携帯用端末装置10は、例えば、表示領域の行方向の幅が狭い場合に行方向へのスクロール表示を制限しつつ、表示可能な文字配列を実現することができるので、携帯端末装置等の表示手段の表示領域が小さい場合であっても、当該表示領域のサイズに依存せずに、ユーザの閲覧性を向上させることができる。 Therefore, the portable terminal device 10 of the present embodiment can realize a displayable character arrangement while restricting scroll display in the row direction when the width of the display region in the row direction is narrow, for example. Even when the display area of a display means such as a portable terminal device is small, the user's viewability can be improved without depending on the size of the display area.
また、本実施形態の携帯用端末装置10は、文字区画を検出する際に、画像化された文書画像を構成する各文字のサイズ、当該文書上の配置位置又はその双方を特定することができるので、各文字の大きさ又は元の配置位置に基づいて表示領域に各文字区画を配置することができる。 Further, when detecting the character section, the portable terminal device 10 of the present embodiment can specify the size of each character constituting the imaged document image, the arrangement position on the document, or both. Therefore, each character section can be arranged in the display area based on the size of each character or the original arrangement position.
したがって、本実施形態の携帯用端末装置10は、文書の文書構造を維持しつつ、適切な文字サイズによる表示を実現することができる。 Therefore, the portable terminal device 10 according to the present embodiment can realize display with an appropriate character size while maintaining the document structure of the document.
また、本実施形態の携帯用端末装置10は、各第1配列ライン上の第1画素の画素値の有無によって、当該各第1配列ラインが文書の行間を示すラインであるか、文字が存在する行に含まれるラインであるかを検出することができる。 In addition, the portable terminal device 10 according to the present embodiment is configured such that each first array line is a line indicating a line space of a document or there is a character depending on the presence or absence of the pixel value of the first pixel on each first array line. It is possible to detect whether the line is included in the line to be performed.
すなわち、本実施形態の携帯用端末装置10は、例えば、黒を示す画素値を有する第1画素を検出する場合であって、第1配列ライン上に第1画素が存在しない場合には、当該第1配列ラインを文字が存在しない空白のラインであって文書の行間を示すラインであることを検出することができるとともに、第1配列ライン上に一以上の第1画素が検出された場合には、第1配列ラインを文字が存在する行に含まれるラインであることを検出することができる。 That is, the portable terminal device 10 according to the present embodiment detects, for example, a first pixel having a pixel value indicating black, and when the first pixel does not exist on the first array line, When it is possible to detect that the first array line is a blank line in which no character exists and indicates a line space between documents, and when one or more first pixels are detected on the first array line Can detect that the first array line is a line included in a line in which a character exists.
そして、本実施形態の携帯用端末装置10は、第1画素が存在する隣接する第1配列ライン群によって文書を構成する各行(すなわち、文字が存在する行)とそれらの行間とを検出することができるので、当該第1配列ライン群に属する第1配列ライン数に基づいて文書を構成する文字の行送り方向のサイズ、すなわち、文書が横組みであれば文字の高さ、文書が縦組みであれば文字の幅を検出することができる。 And the portable terminal device 10 of this embodiment detects each line (namely, line in which a character exists) and the space | interval between those lines which comprise a document by the adjacent 1st arrangement line group in which a 1st pixel exists. Therefore, based on the number of first array lines belonging to the first array line group, the size of the characters constituting the document in the line feed direction, that is, the height of the characters if the document is horizontal composition, the document is vertical composition If so, the width of the character can be detected.
この結果、本実施形態の携帯用端末装置10は、画像化された文書における各文字の画像領域(区画画像)を文字区画として的確に検出することができる。 As a result, the portable terminal device 10 of the present embodiment can accurately detect the image area (division image) of each character in the imaged document as a character division.
また、本実施形態の携帯用端末装置10は、文書の各行毎に、各第2配列ライン上の第1画素の画素値の有無によって、当該各第2配列ラインが文字間を示すラインであるか、文字を構成するラインであるかを検出することができる。 Further, the portable terminal device 10 of the present embodiment is a line in which each second array line indicates a space between characters depending on the presence or absence of the pixel value of the first pixel on each second array line for each row of the document. Or a line constituting a character can be detected.
すなわち、本実施形態の携帯用端末装置10は、例えば、上述のように、黒を示す画素値を有する第1画素を検出する場合であって、第2配列ライン上に第1画素が存在しない場合には、当該第2配列ラインを文字が存在しない空白のラインであって文字間を示すラインであることを検出することができるとともに、第2配列ライン上に一以上の第1画素が検出された場合には、第2配列ラインを、文字を構成するラインであるとして検出することができる。 That is, the portable terminal device 10 according to the present embodiment detects, for example, the first pixel having a pixel value indicating black as described above, and the first pixel does not exist on the second array line. In this case, it can be detected that the second array line is a blank line in which no character exists and indicates a line between characters, and one or more first pixels are detected on the second array line. In such a case, the second array line can be detected as a line constituting a character.
そして、本実施形態の携帯用端末装置10は、第1画素が存在する隣接する第2配列ライン群によって各文字とそれらの文字間とを検出することができるので、当該第2配列ライン群に属する第2配列ライン数に基づいて各行の各文字の行方向のサイズ、すなわち、文書が横組みであれば文字の幅、文書が縦組みであれば文字の高さを検出することができる。 And since the portable terminal device 10 of this embodiment can detect each character and between those characters by the adjacent 2nd arrangement line group in which a 1st pixel exists, it is in the said 2nd arrangement line group. Based on the number of second array lines to which it belongs, it is possible to detect the size in the line direction of each character of each line, that is, the character width if the document is horizontal composition and the character height if the document is vertical composition.
この結果、本実施形態の携帯用端末装置10は、画像化された文書における各文字の画像領域(区画画像)を文字区画として的確に検出することができる。 As a result, the portable terminal device 10 of the present embodiment can accurately detect the image area (division image) of each character in the imaged document as a character division.
また、本実施形態の携帯用端末装置10は、2以上の互いに独立した部分から構成される文字を一文字の文字区画として特定することができるので、画像化された文書における各文字の画像領域(区画画像)を文字区画として的確に検出することができる。 Moreover, since the portable terminal device 10 of this embodiment can specify the character comprised from two or more mutually independent parts as a character division of one character, the image area | region of each character in the imaged document ( (Division image) can be accurately detected as a character division.
また、本実施形態の携帯用端末装置10は、画像化された文書画像を構成する各文字のサイズ、当該文書上の配置位置又はその双方を特定し、文書内における各文字の配列ルールを認識することができるとともに、当該配列ルールを配置条件に反映されることによって、当該配列ルールに従いつつ、各文字区画を示す文字区画の表示領域内の位置を決定することができる。 In addition, the portable terminal device 10 according to the present embodiment identifies the size of each character constituting the imaged document image, the arrangement position on the document, or both, and recognizes the arrangement rule of each character in the document. In addition, by reflecting the arrangement rule in the arrangement condition, the position in the display area of the character section indicating each character section can be determined while following the arrangement rule.
したがって、本実施形態の携帯用端末装置10は、見出し、字下げ、先頭文字、ルビ、又は、禁則文字等の文書構造を維持しつつ、適した文字サイズによる表示を実現することができるので、表示領域に依存せずに、かつ、ユーザの閲覧性を向上させることができる。 Therefore, the portable terminal device 10 of the present embodiment can realize display with a suitable character size while maintaining the document structure such as heading, indentation, first character, ruby, or forbidden character. The user's viewability can be improved without depending on the display area.
また、本実施形態の携帯用端末装置10は、見出し行に属する各文字区画を表示領域における単一の行に配置することができるので、文書構造を維持しつつ、文書を表示領域に合わせて表示させることができる。 Moreover, since the portable terminal device 10 of this embodiment can arrange | position each character section which belongs to a heading line to the single line in a display area, it suits a display area with a document maintained. Can be displayed.
また、本実施形態の携帯用端末装置10は、所定の文字のルビとして検出された文字区画を、設定された表示領域内におけるルビが付与されるルビ対象文字のルビの位置に配置することができるので、文書構造を維持しつつ、文書を表示領域に合わせて表示させることができる。 Moreover, the portable terminal device 10 of this embodiment can arrange the character section detected as the ruby of the predetermined character at the position of the ruby of the ruby target character to which the ruby is given in the set display area. Therefore, the document can be displayed in accordance with the display area while maintaining the document structure.
また、本実施形態の携帯用端末装置10は、文書における段落の先頭文字と特定された文字区画を、設定された表示領域内における行の先頭であって字下げされる位置に配置することができるので、文書構造を維持しつつ、文書を表示領域に合わせて表示させることができる。 In addition, the portable terminal device 10 according to the present embodiment can arrange the character section identified as the first character of the paragraph in the document at the position where it is indented at the beginning of the line within the set display area. Therefore, the document can be displayed in accordance with the display area while maintaining the document structure.
また、本実施形態の携帯用端末装置10は、文書における禁則処理の対象文字として特定された文字区画を、設定された表示領域内においても禁則処理の対象文字として配置することができるので、文書構造を維持しつつ、文書を表示領域に合わせて表示させることができる。 In addition, since the portable terminal device 10 according to the present embodiment can arrange the character section specified as the target character of the prohibition process in the document as the target character of the prohibition process even in the set display area, The document can be displayed in accordance with the display area while maintaining the structure.
また、本実施形態の携帯用端末装置10は、文書のページが切り替わった場合であっても、ユーザにページが切り替わったことを意識させることなく、文書を表示領域に表示することができるので、ユーザの閲覧性を向上させることができる。 In addition, since the portable terminal device 10 according to the present embodiment can display a document in the display area without causing the user to be aware that the page has been switched even when the page of the document has been switched. The user's viewability can be improved.
10 … 携帯用端末装置
100 … データ記憶部
101 … アプリケーション記憶部
102 … コンテンツデータ記憶部
103 … ROM/RAM
110 … 通信制御部
120 … アプリケーション処理部
121 … データ管理制御部
122 … 指定表示領域設定部
123 … 字配置解析処理部
124 … 区画配置処理部
125 … 画像データ生成部
140 … 表示制御部
150 … 表示部
160 … 操作部
190 … 端末管理制御部
DESCRIPTION OF SYMBOLS 10 ... Portable
DESCRIPTION OF
Claims (10)
少なくとも文書が画像化された前記画像を文書画像として前記表示手段にて表示するための画像データを外部又は記憶手段から取得する取得手段と、
前記文書画像を表示する際の前記表示手段における表示領域のサイズを設定する設定手段と、
前記取得された画像データに基づいて、前記文書画像における文書の行方向及び行送り方向を認識する認識手段と、
前記文書画像の各画素値を2値化する2値化手段と、
前記文書画像の文書の行方向に対する画素の配列ラインである第1配列ライン毎の、前記2値化された各画素における画素値に基づいて、前記文書画像の行を検出する行検出手段と、
前記検出された行毎に、前記文書画像の文書の行送り方向における画素の配列ラインである第2配列ライン毎の各第2配列ラインに属する画素の中から、前記2値化した際の一方の値を有する第1画素を少なくとも検出し、当該第1画素の有無に基づいて、各行に含まれる文字の区画を、当該区画のサイズ及び区画位置を特定しつつ、文字区画として検出する文字区画検出手段と、
(1)前記検出された各行の各文字区画に基づいて、各行における行方向の最大の文字区画のサイズを示す最大区画サイズ、全行に基づく前記文字区画のサイズの平均を示す平均区画サイズ、及び、各行における隣接する2つの文字区画の距離の最大値を示す最大文字ピッチを算出し、(2)前記各行における最大区画サイズの中で前記全行に基づく平均区画サイズとの差が最小となる行における最大文字ピッチを基準文字ピッチとして算出し、(3)前記文字区画を検出する際の前記第1画素の検出結果に基づいて、行毎に、同一の行に属し、かつ、隣接する2つの文字区画の文書の行方向における配置間隔を示す文字ピッチを算出し、(4)当該算出した文字ピッチが前記算出した基準文字ピッチに基づいて予め定められた文字ピッチ条件を具備する当該文字ピッチの算出対象の2つの文字区画を同一の文字区画として統合補正を実行する統合補正手段と、
前記設定された表示領域の領域サイズに基づいて、前記補正された各文字区画を、当該表示領域に配置するための配置位置を決定する配置位置決定手段と、
前記決定された各文字区画の配置位置に、前記文書画像の一部であって各文字区画に対応する区画画像を配置して前記表示領域に表示するための表示画像を生成する画像生成手段と、
前記生成された画像を前記表示手段に出力する出力手段と、
を備えることを特徴とする表示制御装置。 A display control device for displaying an image formed by a plurality of pixels arranged in a matrix on a display means,
Acquisition means for acquiring image data for displaying at least the image in which the document is imaged as the document image on the display means;
Setting means for setting a size of a display area in the display means when displaying the document image;
Recognition means for recognizing the line direction and line feed direction of the document in the document image based on the acquired image data;
Binarization means for binarizing each pixel value of the document image;
Row detection means for detecting a row of the document image based on a pixel value in each of the binarized pixels for each first array line that is an array line of pixels in the document row direction of the document image;
For each detected line, one of the pixels belonging to each second array line for each second array line, which is an array line of pixels in the document feed direction of the document image, is binarized. A character segment that detects at least a first pixel having a value of and detects a segment of a character included in each line as a character segment based on the presence or absence of the first pixel while specifying the size and segment position of the segment Detection means;
(1) Based on each character section of each detected line, a maximum section size indicating the size of the largest character section in the line direction in each line, an average section size indicating an average of the size of the character sections based on all lines, And calculating a maximum character pitch indicating a maximum value of a distance between two adjacent character sections in each line , and (2) a difference between the maximum section size in each line and the average section size based on all the lines is minimum. The maximum character pitch in a given line is calculated as a reference character pitch, and (3) each line belongs to the same line and is adjacent based on the detection result of the first pixel when the character section is detected A character pitch indicating an arrangement interval in the line direction of the document in two character sections is calculated. (4) The calculated character pitch is a character pitch condition determined in advance based on the calculated reference character pitch. And integration correction means performs integration correction two character compartments of calculation target of the character pitch as the same character compartments having a matter,
An arrangement position determining means for determining an arrangement position for arranging the corrected character sections in the display area based on the set area size of the display area;
Image generating means for generating a display image to be displayed in the display area by disposing a section image corresponding to each character section at a position where each character section is determined; ,
Output means for outputting the generated image to the display means;
A display control apparatus comprising:
前記行検出手段が、
前記第1配列ライン毎に、各第1配列ラインに属する画素の中から、前記2値化した際の一方の画素値を有する第1画素を少なくとも検出し、
当該第1画素の有無に基づいて前記画像化された文書の各行を検出する、表示制御装置。 The display control device according to claim 1 ,
The row detection means is
Detecting at least a first pixel having one pixel value when binarized from pixels belonging to each first array line for each first array line;
A display control device that detects each line of the imaged document based on the presence or absence of the first pixel.
前記配置位置決定手段が、
前記検出された各文字区画のサイズ及び区画位置に基づいて予め定められた配置条件に従って、前記検出された文字区画を、前記設定された表示領域に配置する位置を決定する、表示制御装置。 In the display control device according to claim 1 or 2 ,
The arrangement position determining means is
A display control device that determines a position at which the detected character segment is arranged in the set display area in accordance with a predetermined arrangement condition based on the size and the segment position of each detected character segment.
配置条件には、前記文書における見出しと用いられる行を示す見出し行に属する文字区画を、当該見出し行に属する他の文字区画とともに、単一の行として前記設定された表示領域内に配置する条件を含み、
前記文字区画検出手段が、
前記統合された文字区画を含む各行の各文字区画の前記文書画像における区画位置に基づいて、行毎に、前記文書の行送り方向に対する隣接する2つの行の配置間隔を行ピッチとして算出し、
前記算出した各行ピッチに基づいて、前記文書画像の全行で平均化した平均行ピッチを算出し、
当該算出した行ピッチが前記平均行ピッチに基づいて定められた行ピッチ条件を具備する場合に、当該行ピッチ条件を具備する2つの行のうち、前記行ピッチを定める基点に基づいて定まる一方の行を、前記見出し行として特定し、
前記配置位置決定手段が、
前記見出し行に属する文字区画を前記配置条件に従って前記表示領域内に配置する、表示制御装置。 In the display control device according to any one of claims 1 to 3 ,
The arrangement condition is a condition in which a character section belonging to a heading line indicating a headline and a line to be used in the document is arranged as a single line in the set display area together with other character sections belonging to the heading line. Including
The character section detecting means is
Based on the section position in the document image of each character section of each line including the integrated character section, for each line, the arrangement interval between two adjacent lines in the line feed direction of the document is calculated as a line pitch,
Based on each calculated line pitch, an average line pitch averaged over all lines of the document image is calculated,
When the calculated row pitch has a row pitch condition determined based on the average row pitch, one of the two rows having the row pitch condition is determined based on a base point that determines the row pitch. Identify the line as the heading line,
The arrangement position determining means is
A display control apparatus that arranges character sections belonging to the heading line in the display area according to the arrangement condition.
配置条件には、所定の文字のルビとして検出された文字区画を、前記設定された表示領域内における前記ルビが付与されるルビ対象文字のルビの位置に配置する条件を含み、
前記文字区画検出手段が、
前記統合された文字区画を含む各行の各文字区画の前記文書画像における区画位置に基づいて、行毎に、前記文書の行送り方向に対する隣接する2つの行の配置間隔を行ピッチとして算出し、
前記算出した各行ピッチに基づいて、前記文書画像の全行で平均化した平均行ピッチを算出し、
当該算出した行ピッチのピッチ幅が前記平均行ピッチに基づいて定められた行ピッチ特定条件を具備する場合に、当該行ピッチ特定条件を具備する2つの行のうち、前記行ピッチを定める基点に基づいて定まる行を、前記ルビを付与するルビ行として特定し、
前記特定したルビ行に属する各文字区画の行方向の第1位置と前記ルビ行の前記文書の行送り方向に対して次段の行であるルビ対象行における各文字区画の行方向の第2位置とをそれぞれ比較し、前記第1位置と前記第2位置の差が最小となるルビ対象行の文字区画をルビ対象文字として特定し、
前記配置位置決定手段が、
前記ルビ対象文字の前記表示領域内の文字区画位置に基づいて、前記配置条件に従って、前記ルビ行に属する各文字区画を前記表示領域内の位置に配置する、表示制御装置。 In the display control device according to any one of claims 1 to 3 ,
The arrangement condition includes a condition for arranging a character section detected as ruby of a predetermined character at a ruby position of a ruby target character to which the ruby is given in the set display area,
The character section detecting means is
Based on the section position in the document image of each character section of each line including the integrated character section, for each line, the arrangement interval between two adjacent lines in the line feed direction of the document is calculated as a line pitch,
Based on each calculated line pitch, an average line pitch averaged over all lines of the document image is calculated,
In the case where the calculated pitch width of the row pitch has a row pitch specifying condition determined based on the average row pitch, of the two rows having the row pitch specifying condition, a base point for determining the row pitch A line determined based on the ruby is specified as a ruby line that gives the ruby,
A first position in the line direction of each character section belonging to the specified ruby line and a second position in the line direction of each character section in the ruby target line, which is the next line to the line feed direction of the document in the ruby line. Each position is compared, and the character section of the ruby target line that minimizes the difference between the first position and the second position is specified as the ruby target character,
The arrangement position determining means is
A display control device that arranges each character section belonging to the ruby line at a position in the display area according to the arrangement condition based on a character section position in the display area of the ruby target character.
配置条件には、前記文書における段落の先頭文字と特定された文字区画を、前記設定された表示領域内における行の先頭であって字下げされる位置に配置する条件を含み、
前記文字区画検出手段が、
各行毎に、行の先頭に位置する文字区画の配置位置が、前記行方向の文字が記載される開始位置から、前記各文字区画のサイズに基づく先頭配置条件で定められる所定の距離以上離れている場合に、当該行の先頭の文字区画を文書の段落における先頭文字として特定し、
前記配置位置決定手段が、
前記先頭文字と特定された文字区画を前記配置条件に従って前記表示領域内に配置する、表示制御装置。 In the display control device according to any one of claims 1 to 3 ,
The arrangement condition includes a condition for arranging the character section identified as the first character of the paragraph in the document at the position at which the first character of the line is indented in the set display area,
The character section detecting means is
For each line, the arrangement position of the character section located at the head of the line is separated from the start position where the characters in the line direction are described by a predetermined distance or more determined by the head arrangement condition based on the size of each character section. when you are to identify the beginning of a character section in the row as the first character in a paragraph of the document,
The arrangement position determining means is
A display control device that arranges a character section identified as the first character in the display area according to the arrangement condition.
配置条件には、前記文書における禁則文字に該当する文字区画を、前記設定された表示領域内における所定の位置に配置する条件を含み、
前記文字区画検出手段が、
前記検出された各文字区画の行方向及び行送り方向のそれぞれにおいて、当該各文字区間における前記第1画素が存在する最大幅及び最小幅を算出し、
前記検出された各文字区画の前記行方向の最大幅と最小幅の差、及び、前記検出された各文字区画の前記行送り方向の最大幅と最小幅の差を算出し、
前記算出されたそれぞれの差が予め定められた条件を具備した場合に、該当する文字区画を前記禁則文字に該当する文字区画に設定し、
前記配置位置決定手段が、
前記禁則文字に該当する文字区画と設定された文字区画を前記配置条件に従って前記表示領域内に配置する、表示制御装置。 In the display control device according to any one of claims 1 to 3 ,
The arrangement condition includes a condition for arranging a character section corresponding to the prohibited characters in the document at a predetermined position in the set display area,
The character section detecting means is
In each of the detected line direction and line feed direction of each character section, calculate the maximum width and minimum width in which the first pixel in each character section exists,
Calculating the difference between the maximum width and the minimum width in the line direction of each detected character section, and the difference between the maximum width and the minimum width in the line feed direction of each detected character section;
When each calculated difference has a predetermined condition, the corresponding character section is set to the character section corresponding to the prohibited character,
The arrangement position determining means is
A display control device that arranges a character section corresponding to the prohibited character and a set character section in the display area according to the arrangement condition .
前記取得手段が、前記外部又は記憶手段から前記画像データを、前記画像化された文書のページ毎に取得し、
前記配置位置決定手段が、配置条件に従いつつ、各ページの先頭の文字に対応する文字区画を、前ページの最終文字に対応する文字区画の次の文字区画として、前記設定された表示領域に配置する位置を決定する、表示制御装置。 In the display control device according to any one of claims 1 to 7 ,
The acquisition unit acquires the image data from the external or storage unit for each page of the imaged document;
The arrangement position determining means arranges the character section corresponding to the first character of each page in the set display area as the character section next to the character section corresponding to the last character of the previous page while following the arrangement condition. A display control device that determines a position to perform.
前記認識手段が、
各第1配列ラインに属する各画素の画素値に基づいて第2配列ライン方向の前記文字が存在しない空白ライン数を検出し、
各第2配列ラインに属する各画素の画素値に基づいて第1配列ライン方向の前記文字が存在しない空白ライン数を検出し、
前記第1配列ライン方向の空白ライン数と前記第2配列ライン方向の空白ライン数とに基づいて、前記文書の行方向及び行送り方向を認識する、表示制御装置。 In the display control device according to any one of claims 1 to 8 ,
The recognition means
Detecting the number of blank lines in which the character in the second array line direction does not exist based on the pixel value of each pixel belonging to each first array line;
Detecting the number of blank lines in which the character in the first array line direction does not exist based on the pixel value of each pixel belonging to each second array line;
A display control apparatus for recognizing a line direction and a line feed direction of the document based on the number of blank lines in the first array line direction and the number of blank lines in the second array line direction.
コンピュータを、
少なくとも文書が画像化された前記画像を文書画像として前記表示手段にて表示するための画像データを外部又は記憶手段から取得する取得手段、
前記文書画像を表示する際の前記表示手段における表示領域のサイズを設定する設定手段、
前記取得された画像データに基づいて、前記文書画像における文書の行方向及び行送り方向を認識する認識手段、
前記文書画像の各画素値を2値化する2値化手段、
前記文書画像の文書の行方向に対する画素の配列ラインである第1配列ライン毎の、前記2値化された各画素における画素値に基づいて、前記文書画像の行を検出する行検出手段、
前記検出された行毎に、前記文書画像の文書の行送り方向における画素の配列ラインである第2配列ライン毎の各第2配列ラインに属する画素の中から、前記2値化した際の一方の値を有する第1画素を少なくとも検出し、当該第1画素の有無に基づいて、各行に含まれる文字の区画を、当該区画のサイズ及び区画位置を特定しつつ、文字区画として検出する文字区画検出手段、
(1)前記検出された各行の各文字区画に基づいて、各行における行方向の最大の文字区画のサイズを示す最大区画サイズ、全行に基づく前記文字区画のサイズの平均を示す平均区画サイズ、及び、各行における隣接する2つの文字区画の距離の最大値を示す最大文字ピッチを算出し、(2)前記各行における最大区画サイズの中で前記全行に基づく平均区画サイズとの差が最小となる行における最大文字ピッチを基準文字ピッチとして算出し、(3)前記文字区画を検出する際の前記第1画素の検出結果に基づいて、行毎に、同一の行に属し、かつ、隣接する2つの文字区画の文書の行方向における配置間隔を示す文字ピッチを算出し、(4)当該算出した文字ピッチが前記算出した基準文字ピッチに基づいて予め定められた文字ピッチ条件を具備する当該文字ピッチの算出対象の2つの文字区画を同一の文字区画として統合補正を実行する統合補正手段、
前記設定された表示領域の領域サイズに基づいて、前記補正された各文字区画を、当該表示領域に配置するための配置位置を決定する配置位置決定手段、
前記決定された各文字区画の配置位置に、前記文書画像の一部であって各文字区画に対応する区画画像を配置して前記表示領域に表示するための表示画像を生成する画像生成手段、及び、
前記生成された画像を前記表示手段に出力する出力手段、
として機能させることを特徴とするプログラム。 A program for displaying on a display means an image formed by a plurality of pixels arranged in a matrix,
Computer
Acquisition means for acquiring image data for displaying at least the image in which the document is imaged as a document image on the display means;
Setting means for setting a size of a display area in the display means when displaying the document image;
Recognition means for recognizing the line direction and line feed direction of the document in the document image based on the acquired image data;
Binarizing means for binarizing each pixel value of the document image;
Row detection means for detecting a row of the document image on the basis of a pixel value in each binarized pixel for each first array line which is an array line of pixels in the document row direction of the document image;
For each detected line, one of the pixels belonging to each second array line for each second array line, which is an array line of pixels in the document feed direction of the document image, is binarized. A character segment that detects at least a first pixel having a value of and detects a segment of a character included in each line as a character segment based on the presence or absence of the first pixel while specifying the size and segment position of the segment Detection means,
(1) Based on each character section of each detected line, a maximum section size indicating the size of the largest character section in the line direction in each line, an average section size indicating an average of the size of the character sections based on all lines, And calculating a maximum character pitch indicating a maximum value of a distance between two adjacent character sections in each line , and (2) a difference between the maximum section size in each line and the average section size based on all the lines is minimum. The maximum character pitch in a given line is calculated as a reference character pitch, and (3) each line belongs to the same line and is adjacent based on the detection result of the first pixel when the character section is detected A character pitch indicating an arrangement interval in the line direction of the document in two character sections is calculated. (4) The calculated character pitch is a character pitch condition determined in advance based on the calculated reference character pitch. Integration correction means performs integration correction two character compartments of calculation target of the character pitch as the same character compartments having a matter,
An arrangement position determining means for determining an arrangement position for arranging the corrected character sections in the display area based on the set area size of the display area;
Image generating means for generating a display image for displaying in the display area by arranging a section image corresponding to each character section at a position where each character section is determined; as well as,
Output means for outputting the generated image to the display means;
A program characterized by functioning as
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012241377A JP6152633B2 (en) | 2012-10-31 | 2012-10-31 | Display control apparatus and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012241377A JP6152633B2 (en) | 2012-10-31 | 2012-10-31 | Display control apparatus and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014092824A JP2014092824A (en) | 2014-05-19 |
JP6152633B2 true JP6152633B2 (en) | 2017-06-28 |
Family
ID=50936884
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012241377A Active JP6152633B2 (en) | 2012-10-31 | 2012-10-31 | Display control apparatus and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6152633B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017045292A (en) * | 2015-08-27 | 2017-03-02 | カシオ計算機株式会社 | Information display apparatus, information display method, and program |
JP2019016236A (en) * | 2017-07-07 | 2019-01-31 | インターマン株式会社 | Character string image display method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3379663B2 (en) * | 1994-09-30 | 2003-02-24 | 沖電気工業株式会社 | Character recognition device |
JP2000137801A (en) * | 1998-11-02 | 2000-05-16 | Fuji Xerox Co Ltd | Method and device for image formation and medium storing image processing control program |
JP2000163044A (en) * | 1998-11-30 | 2000-06-16 | Sharp Corp | Picture display device |
JP2001216292A (en) * | 2000-01-31 | 2001-08-10 | Toshiba Corp | Layout image editing device and layout image editing method |
-
2012
- 2012-10-31 JP JP2012241377A patent/JP6152633B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014092824A (en) | 2014-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10824801B2 (en) | Interactively predicting fields in a form | |
US8593666B2 (en) | Method and system for printing a web page | |
CN100454293C (en) | Document editing method, document editing device | |
US8515176B1 (en) | Identification of text-block frames | |
JP2013080321A (en) | Information processing apparatus and method, and program | |
CN105320933A (en) | Electronic document generation system and electronic document generation apparatus | |
JP5629509B2 (en) | Information processing apparatus, information browsing apparatus, information processing method, and program | |
US9734132B1 (en) | Alignment and reflow of displayed character images | |
JP2022066321A (en) | Information processing device and program | |
JP2010123002A (en) | Document image layout device | |
JP2012234344A (en) | Character recognition device for recognizing character on business form, mask processing method, and mask processing program | |
JP6152633B2 (en) | Display control apparatus and program | |
CN104778199A (en) | Image processing apparatus and image processing method | |
JP5551986B2 (en) | Information processing apparatus, information processing method, and program | |
JP6322086B2 (en) | Display control device, display device, program, recording medium | |
JP5347981B2 (en) | Information display device and program | |
US10789715B2 (en) | Image processing device, image processing method, and information storage medium | |
JP2010003218A (en) | Document review support device and method, program and storage medium | |
JP5012605B2 (en) | Media production system | |
JP2009087270A (en) | Image processing device and program | |
JP2012014486A (en) | Information processing device, information processing method and program | |
JP2019087132A (en) | Method, device, and computer program for generating character data | |
CN110390323B (en) | Information processing apparatus and computer readable medium | |
JPH08255160A (en) | Layout device and display device | |
JP5528410B2 (en) | Viewer device, server device, display control method, electronic comic editing method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150827 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160714 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160719 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160920 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170228 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170419 |
|
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: 20170502 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170515 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6152633 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |