JP6152633B2 - Display control apparatus and program - Google Patents

Display control apparatus and program Download PDF

Info

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
Application number
JP2012241377A
Other languages
Japanese (ja)
Other versions
JP2014092824A (en
Inventor
茂出木 敏雄
敏雄 茂出木
金山 行雄
行雄 金山
秀樹 室田
秀樹 室田
裕昭 葛西
裕昭 葛西
久保田 靖夫
靖夫 久保田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2012241377A priority Critical patent/JP6152633B2/en
Publication of JP2014092824A publication Critical patent/JP2014092824A/en
Application granted granted Critical
Publication of JP6152633B2 publication Critical patent/JP6152633B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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, Patent Documents 1 to 3).

特開2004−5453号公報JP 2004-5453 A 特表2009−531789号公報JP-T 2009-531789 特開2011−242987号公報JP 2011-242987 A

しかしながら、上記特許文献1〜3にあっては、日本語特有の文書の縦書き、該当する漢字に付与するルビ又は禁則処理を含むコンテンツデータの分解及び再構成における具体的な手法については開示されていない。   However, the above Patent Documents 1 to 3 disclose specific methods for disassembling and reconstructing content data including vertical writing of documents peculiar to Japanese, ruby assigned to the corresponding kanji, or prohibition processing. Not.

本発明は、上記課題を解決するためになされたものであり、その目的は、印刷ページ体裁のビットマップ形式において、表示サイズに依存せずに閲覧性を向上させることが可能な表示制御装置等を提供することにある。   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.

本発明に係る一実施形態の携帯通信端末装置の概要構成を示すブロック図である。It is a block diagram which shows schematic structure of the portable communication terminal device of one Embodiment which concerns on this invention. 本発明に関連する文字コードベースの文書を画像化する際の流れを説明するための図である。It is a figure for demonstrating the flow at the time of imaging the document of a character code base relevant to this invention. 本発明に関連する印刷ページ体裁のビットマップ形式によって画像化された文書を画像化する際の流れを説明するための図である。It is a figure for demonstrating the flow at the time of imaging the document imaged by the bitmap format of the print page appearance relevant to this invention. 本発明に関連する印刷ページ体裁のビットマップ形式によって画像化された文書の表示形式を説明するための図である。It is a figure for demonstrating the display format of the document imaged by the bitmap format of the print page appearance relevant to this invention. 本発明に係る携帯通信端末装置における効果の一例を説明するための図(その1)である。It is FIG. (1) for demonstrating an example of the effect in the mobile communication terminal device which concerns on this invention. 本発明に係る携帯通信端末装置における効果の一例を説明するための図(その2)である。It is FIG. (2) for demonstrating an example of the effect in the mobile communication terminal device which concerns on this invention. 一実施形態の文字配置解析処理部における2値化処理について説明するため図であり、2値化処理の一例を示す図である。It is a figure for demonstrating the binarization process in the character arrangement | positioning analysis process part of one Embodiment, and is a figure which shows an example of a binarization process. 一実施形態の文字配置解析処理部における行検出処理について説明するため図(その1)である。It is FIG. (1) for demonstrating the line detection process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部における行検出処理について説明するため図(その1)である。It is FIG. (1) for demonstrating the line detection process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部における文字区画検出処理について説明するため図(その1)である。It is FIG. (1) for demonstrating the character division detection process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部における文字区画検出処理について説明するため図(その2)である。It is FIG. (2) for demonstrating the character division detection process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部における文字区画検出処理について説明するため図(その3)である。It is FIG. (3) for demonstrating the character division detection process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部における文字区画検出処理について説明するため図(その4)である。FIG. 6 is a diagram (part 4) for explaining the character section detection processing in the character arrangement analysis processing unit of the embodiment; 一実施形態の文字配置解析処理部における統合補正処理について説明するため図である。It is a figure for demonstrating the integrated correction | amendment process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部における見出し解析処理について説明するため図である。It is a figure for demonstrating the headline analysis process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部における字下げ解析処理について説明するため図である。It is a figure for demonstrating the indentation analysis process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部におけるルビ解析処理について説明するため図である。It is a figure for demonstrating the ruby analysis process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の文字配置解析処理部における禁則文字解析処理について説明するため図である。It is a figure for demonstrating the prohibited character analysis process in the character arrangement | positioning analysis process part of one Embodiment. 一実施形態の区画配置処理部における区画配置処理について説明するため図(その1)である。It is FIG. (1) for demonstrating the division arrangement | positioning process in the division arrangement | positioning process part of one Embodiment. 一実施形態の区画配置処理部における区画配置処理について説明するため図(その2)である。It is FIG. (2) for demonstrating the division arrangement | positioning process in the division arrangement | positioning process part of one Embodiment. 一実施形態の画像生成処理部における画像生成処理について説明するため図である。It is a figure for demonstrating the image generation process in the image generation process part of one Embodiment. 一実施形態の携帯用端末装置における閲覧アプリケーションに基づく文書画像の表示処理の動作を示すフローチャートである。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 of one Embodiment. 一実施形態において、閲覧アプリケーション実行中における文字配置解析処理の動作を示すフローチャートである。In one Embodiment, it is a flowchart which shows the operation | movement of the character arrangement | positioning analysis process during browsing application execution. 一実施形態において、閲覧アプリケーション実行中における区画配置処理の動作を示すフローチャート(その1)である。In one Embodiment, it is a flowchart (the 1) which shows operation | movement of the division | segmentation arrangement | positioning process during browsing application execution. 一実施形態において、閲覧アプリケーション実行中における区画配置処理の動作を示すフローチャート(その2)である。In one Embodiment, it is a flowchart (the 2) which shows operation | movement of the division | segmentation arrangement | positioning process during browsing application execution. 一実施形態において、閲覧アプリケーション実行中における区画配置処理の動作を示すフローチャート(その3)である。In one Embodiment, it is a flowchart (the 3) which shows operation | movement of the division | segmentation arrangement | positioning process during browsing application execution. 一実施形態における横組みの場合における表示処理の一例を説明するための図である。It is a figure for demonstrating an example of the display process in the case of the horizontal composition in one Embodiment. 一実施形態における縦組みの場合における表示処理の一例を説明するための図である。It is a figure for demonstrating an example of the display process in the case of the vertical composition in one Embodiment. 一実施形態に基づく変形例を説明するための図である。It is a figure for demonstrating the modification based on one Embodiment.

以下、図面を参照しつつ、本発明の実施形態について説明する。なお、以下の実施形態は、携帯端末装置に対し、本発明に係る、表示制御装置及び、プログラムを適用した場合の実施形態である。   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 data storage unit 100 in which necessary data including a browsing application is stored and a plurality of document data (not shown) as shown in FIG. A communication control unit 110 that communicates with a server device and other communication devices, an application processing unit 120 that executes and manages various applications including the browsing application, and a display unit that has a display screen of a predetermined size 150, a display control unit 140 that controls various drawing operations on the display unit 150, an operation unit 160 that is used to input user operations, and a terminal management control unit 190 that controls the whole.

また、携帯用端末装置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 data storage unit 100 of the present embodiment constitutes a storage unit of the present invention, and the application processing unit 120 includes an acquisition unit, a setting unit, a binarization unit, a line detection unit, a character segment according to the present invention. A detection unit, an arrangement position determination unit, and an image generation unit are configured. Further, for example, the output means of the present embodiment constitutes the display control means of the present invention, and the display unit 150 constitutes the display means and the display device according to the present invention. Furthermore, for example, the operation unit 160 of the present embodiment constitutes an operation unit according to the present invention.

[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 display unit 150 so that the user can view the document image. Because

(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 data storage unit 100 includes, for example, a hard disk drive (hereinafter abbreviated as “HDD”), a solid state drive (hereinafter abbreviated as “SSD”), or a nonvolatile flash memory such as a NAND type or a NOR type. The

また、データ記憶部100には、閲覧アプリケーションを含む、アプリケーション処理部120及び端末管理制御部190によって実行される様々なアプリケーション、及び、文書データを含むコンテンツデータが記憶されるとともに、アプリケーション処理部120及び端末管理制御部190のワークエリアとしてRAM(Random Access Memory)及びROM(Read Only Memory )も含まれる。   In addition, the data storage unit 100 stores various applications executed by the application processing unit 120 and the terminal management control unit 190 including a browsing application, and content data including document data, and the application processing unit 120. As a work area of the terminal management control unit 190, a random access memory (RAM) and a read only memory (ROM) are also included.

具体的には、データ記憶部100には、少なくとも、アプリケーション記憶部101、コンテンツデータ記憶部102、及びROM/RAM103を少なくとも含む。   Specifically, the data storage unit 100 includes at least an application storage unit 101, a content data storage unit 102, and a ROM / RAM 103.

通信制御部110は、図示しないサーバ装置又は他の通信装置との通信回線を構築し、文書データを含む各種のデータの授受を行う。   The communication control unit 110 constructs a communication line with a server device or other communication device (not shown), and exchanges various data including document data.

アプリケーション処理部120は、主に中央演算処理装置(CPU)によって構成されるとともに、アプリケーション記憶部101に記憶された各種アプリに基づいて、表示制御部140及び操作部160と連動しつつ、各処理を実現する。特に、アプリケーション処理部120は、ユーザによって指定された表示部150の表示画面における指定表示領域の領域サイズに従って、文書データをユーザに閲覧させるための閲覧アプリケーションにおける各種の処理を実行する。 The application processing unit 120 is mainly configured by a central processing unit (CPU), and based on various applications stored in the application storage unit 101 , each process is performed in conjunction with the display control unit 140 and the operation unit 160. To realize. In particular, the application processing unit 120 executes various processes in the browsing application for allowing the user to browse the document data according to the area size of the designated display area on the display screen of the display unit 150 designated by the user.

具体的には、アプリケーション処理部120は、
(1)文書画像を表示部150にて表示するための画像データを、通信制御部110を介して外部から又はデータ記憶部100から取得するデータ取得処理、
(2)文書画像を表示する際の表示部150における指定表示領域のサイズを設定する表示サイズ設定処理、
(3)文字配置解析処理の一の処理であって、取得した画像データに基づいて、画像化された文書の行方向及び行送り方向を認識する認識処理、
(4)文字配置解析処理の一の処理であって文書画像において一ページとして設定された各ページ(以下、「文書ページ」という。)において、取得した文書画像の各画素値を2値化する2値化処理と、
(5)文字配置解析処理の一の処理であって各文書ページにおいて、文書画像の文書の行方向に対する画素の配列ライン(以下、「第1配列ライン」という。)毎の、2値化された各画素における画素値に基づいて、文書画像の行を検出する行検出処理と、
(6)文字配置解析処理の一の処理であって各文書ページにおいて、検出した行毎に、文書画像の文書の行送り方向における画素の配列ライン(以下、「第2配列ライン」という。)毎の、2値化した各画素における画素値に基づいて、各行に含まれる文字の区画を文字区画として検出する文字区画検出処理と、
(7)設定した指定表示領域の領域サイズに基づいて、検出した各文字区画を、当該表示領域に配置するための配置位置を決定する区画配置処理と、
(8)決定した各文字区画の配置位置に、文書画像の一部であって各文字区画に対応する区画画像を配置して指定表示領域に表示するための表示画像を生成するビットマップ生成処理と、
を実行し、生成したビットマップ画像を出力する。
Specifically, the application processing unit 120
(1) Data acquisition processing for acquiring image data for displaying a document image on the display unit 150 from the outside or the data storage unit 100 via the communication control unit 110;
(2) Display size setting processing for setting the size of the designated display area in the display unit 150 when displaying a document image;
(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 application processing unit 120 is based on the coordinate position in the image in the document image and the reference size of the character section for each document page (hereinafter also referred to as “document data being analyzed”). In addition to detecting each character section, setting of attribute information based on the speciality of each character section, that is, a headline character, indentation, ruby, prohibited character (hereinafter referred to as “prohibited character”), etc. It is determined whether or not it is a special character, and attribute information indicating that is set for a character section determined to be a special character.

そして、アプリケーション処理部120は、検出した各文字区画のサイズ及び区画位置に基づいて予め定められた配置条件に従って、検出した各文字区画を、設定された指定表示領域に配置する位置を決定する。すなわち、アプリケーション処理部120は、区画配置処理において、ユーザによって設定された指定表示領域の領域サイズとともに、文字配置解析処理によって設定した属性情報と、文字区画のサイズ及び区画位置に基づく配置条件とに基づいて、検出した各文字区画を、当該表示領域に配置するための配置位置を決定する。   Then, the application processing unit 120 determines a position at which each detected character segment is arranged in the set designated display area in accordance with a predetermined arrangement condition based on the detected size and position of each character segment. That is, the application processing unit 120 uses the attribute information set by the character placement analysis process and the placement condition based on the size and the position of the character section together with the area size of the designated display area set by the user in the section placement process. Based on this, an arrangement position for arranging each detected character section in the display area is determined.

アプリケーション処理部120は、上記の各処理を実行するために、機能的に、文書データの取得、記憶及び読み出しを実行するデータ管理制御部121と、ユーザその他によって指定表示領域を設定する指定表示領域設定部122と、文字配置解析処理を実行する文字配置解析処理部123と、区画配置処理を実行する区画配置処理部124と、ビットマップ画像を生成する画像データ生成部125と、を実現する。なお、本実施形態のアプリケーション処理部120の各部の詳細については後述する。   The application processing unit 120 functionally executes a data management control unit 121 that executes acquisition, storage, and reading of document data in order to execute each of the above processes, and a specified display area that sets a specified display area by a user or the like. A setting unit 122, a character arrangement analysis processing unit 123 that executes character arrangement analysis processing, a division arrangement processing unit 124 that executes division arrangement processing, and an image data generation unit 125 that generates a bitmap image are realized. Details of each part of the application processing unit 120 of this embodiment will be described later.

表示部150は、所定のサイズの表示画面を有し、例えば、電子ペーパー、液晶素子又は有機EL(Electro Luminescence)素子のパネルによって構成され、表示制御部140において生成された表示データに基づいて所定の画像を表示する。   The display unit 150 has a display screen of a predetermined size, and is configured by, for example, a panel of electronic paper, a liquid crystal element, or an organic EL (Electro Luminescence) element, and is predetermined based on display data generated by the display control unit 140. The image of is displayed.

表示制御部140は、表示部150に表示させるために必要な表示データを生成するようになっており、生成された表示データを当該表示部150に出力する。特に、表示制御部140は、アプリケーション処理部120によって生成されたビットマップ画像を表示するための表示データを生成し、出力する。   The display control unit 140 generates display data necessary for display on the display unit 150, and outputs the generated display data to the display unit 150. In particular, the display control unit 140 generates and outputs display data for displaying the bitmap image generated by the application processing unit 120.

操作部160は、各種の確認ボタン、各操作指令を入力する操作ボタン、テンキーなどの多数のキー及び表示部150に重畳して形成されたタッチパネルにより構成され、各操作を行う際に用いられるようになっている。特に、操作部160は、文書データを表示するための指定表示領域を指定する際に用いられる。   The operation unit 160 includes various confirmation buttons, operation buttons for inputting operation commands, a number of keys such as a numeric keypad, and a touch panel formed to overlap the display unit 150, and is used when performing each operation. It has become. In particular, the operation unit 160 is used when designating a designated display area for displaying document data.

端末管理制御部190は、主に中央演算処理装置(CPU)によって構成されるとともに、キー入力ポート、表示制御ポート等の各種入出力ポートを含み、データ記憶部100に記憶された各種のアプリケーションを実行することにより、携帯用端末装置10の全般的な機能を総括的に制御する。   The terminal management control unit 190 is mainly configured by a central processing unit (CPU) and includes various input / output ports such as a key input port and a display control port, and stores various applications stored in the data storage unit 100. By executing this, overall functions of the portable terminal device 10 are controlled comprehensively.

[4]アプリケーション処理部
[4.1]データ管理制御部
次に、本実施形態のアプリケーション処理部120におけるデータ管理制御部121について説明する。
[4] Application Processing Unit [4.1] Data Management Control Unit Next, the data management control unit 121 in the application processing unit 120 of the present embodiment will be described.

データ管理制御部121は、通信制御部110と連動し、図示しないサーバ装置又は他の通信装置と通信に基づく文書データの授受及びデータ記憶部100に記憶される文書データのデータ管理を行う。   The data management control unit 121 is linked with the communication control unit 110 to exchange document data based on communication with a server device or another communication device (not shown) and manage data of document data stored in the data storage unit 100.

具体的には、データ管理制御部121は、HTML(Hyper Text Markup Language)等のマークアップ言語によって記述されているWWWシステム用のリソースデータと、当該リソースデータのネットワークアドレスを示す固有のURL(Uniform Resource Locator)と、を用いたブラウジング機能に基づいて、図示しないサーバ装置又は他の通信装置とデータ通信を行う。特に、データ管理制御部121は、閲覧アプリケーションの実行中に、当該ブラウジング機能とユーザ操作とに基づいて、ユーザが所望する文書データを取得する。   Specifically, the data management control unit 121 includes resource data for the WWW system described in a markup language such as HTML (Hyper Text Markup Language) and a unique URL (Uniform) indicating the network address of the resource data. Based on the browsing function using Resource Locator), data communication is performed with a server device or other communication device (not shown). In particular, the data management control unit 121 acquires document data desired by the user based on the browsing function and the user operation during execution of the browsing application.

また、データ管理制御部121は、ユーザ操作に基づいて、データ記憶部100に予め記憶された文書データを読み出すことによって取得する。ただし、データ記憶部100に記憶された文書データは、ブラウジング機能によって図示しないサーバ装置又は他の通信装置から取得した(ダウンロード又は転送された)データなどである。   Further, the data management control unit 121 acquires the document data stored in advance in the data storage unit 100 based on a user operation. However, the document data stored in the data storage unit 100 is data acquired (downloaded or transferred) from a server device or other communication device (not shown) by the browsing function.

なお、データ管理制御部121は、白黒の文書画像を有する文書データであっても、カラーの文書画像を有する文書データであってもよい。   Note that the data management control unit 121 may be document data having a monochrome document image or document data having a color document image.

また、データ管理制御部121は、イメージスキャナによって文書を読み込みつつ、画像化した文書における画像データ(すなわち、文書データ)を取得してもよい。そして、データ管理制御部121は、イメージスキャナによって画像化された文書については、当該文書に予めマーキングされたマーカ又は基準に使用できる文書ページ内にレイアウトされている罫線などに基づく傾き補正を実行する。この傾き補正は、行方向が水平であることを確保するため、及び、行送り方向が垂直であることを確保するために重要である。ただし、データ管理制御部121は、データ通信によって取得した各文書データについても水平が保障されていない場合もあるので、ユーザ指示に基づいて又は自動的に、当該データ通信によって取得した各文書データに対して実行してもよい。   Further, the data management control unit 121 may acquire image data (that is, document data) in an imaged document while reading the document with an image scanner. Then, the data management control unit 121 executes tilt correction on a document imaged by the image scanner based on a marker previously marked on the document or a ruled line laid out in a document page that can be used as a reference. . This inclination correction is important for ensuring that the line direction is horizontal and for ensuring that the line feed direction is vertical. However, the data management control unit 121 may not guarantee the level of each document data acquired by data communication. Therefore, the data management control unit 121 applies each document data acquired by the data communication based on a user instruction or automatically. It may be executed against.

[4.2]指定表示領域設定部
次に、本実施形態のアプリケーション処理部120におけるに指定表示領域設定部122ついて説明する。
[4.2] Designated Display Area Setting Unit Next, the designated display area setting unit 122 in the application processing unit 120 of the present embodiment will be described.

指定表示領域設定部122は、ユーザ指示等によって表示部150の表示画面内に形成される矩形の指定表示領域を設定する。   The designated display area setting unit 122 sets a rectangular designated display area formed in the display screen of the display unit 150 according to a user instruction or the like.

特に、指定表示領域設定部122は、指定表示領域の上下方向及び左右方向に対して拡大及び縮小指示された場合に、当該指示された表示画面における座標を認識するとともに、認識した座標に従って当該指定表示領域を設定しつつ、当該設定した指定表示領域の領域サイズを区画配置処理部124に出力する。   In particular, the designated display area setting unit 122 recognizes the coordinates on the designated display screen when instructed to enlarge and reduce the designated display area in the vertical and horizontal directions, and designates the designated display area according to the recognized coordinates. While setting the display area, the set area size of the designated display area is output to the partition arrangement processing unit 124.

また、指定表示領域設定部122は、閲覧アプリケーションを用いて文書データを表示している場合であっても、操作部160を介して任意のタイミングで指定表示領域が指定された場合に、指示された表示画面における座標を認識するとともに、認識した座標に従って当該指定表示領域を設定する。   The designated display area setting unit 122 is instructed when the designated display area is designated at an arbitrary timing via the operation unit 160 even when the document data is displayed using the browsing application. The coordinates on the displayed screen are recognized, and the designated display area is set according to the recognized coordinates.

[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 application processing unit 120 of this embodiment will be described with reference to FIGS. The analysis processing unit 123 will be described.

文字配置解析処理部123は、取得した文書データの文書構造のページ毎に(すなわち、元の文書形式のページ毎に)、上述の認識処理、2値化処理、行検出処理及び文字区画検出処理を実行する。   The character arrangement analysis processing unit 123 performs the above-described recognition processing, binarization processing, line detection processing, and character section detection processing for each page of the document structure of the acquired document data (that is, for each page of the original document format). Execute.

また、文字配置解析処理部123は、認識処理、2値化処理、行検出処理及び文字区画検出処理を実行すると、補正処理として、各行において所定の条件を具備する2以上の文字区画を統合する統合補正処理と、予め定めた種々の条件に基づいて各文字区画が特殊文字を構成する文字区画であるか否かを解析し、特殊文字に該当する文字区画であると判定された場合には該当する属性を属性情報として設定する特殊文字解析処理と、を実行する。   In addition, when the character arrangement analysis processing unit 123 executes the recognition process, the binarization process, the line detection process, and the character section detection process, two or more character sections having a predetermined condition in each line are integrated as a correction process. If it is determined that each character section is a character section constituting a special character based on the integrated correction process and various predetermined conditions, and it is determined that the character section corresponds to the special character And a special character analysis process for setting the corresponding attribute as attribute information.

特に、文字配置解析処理部123は、特殊文字解析処理として、見出し解析処理、字下げ解析処理、ルビ解析処理、及び、禁則文字解析処理を実行する。   In particular, the character arrangement analysis processing unit 123 performs a headline analysis process, an indentation analysis process, a ruby analysis process, and a prohibited character analysis process as the special character analysis process.

具体的には、文字配置解析処理部123は、統合補正処理としては、
(1)文字区画を検出する際の第1画素の検出結果に基づいて、行毎に、同一の行に属し、かつ、隣接する2つの文字区画の文書の行方向(すなわち、第1配列ライン方向)における配置間隔を示す文字ピッチを算出し、
(2)当該算出した文字ピッチが予め定められた文字ピッチ条件を具備する場合に、当該文字ピッチ条件を具備する2つの文字区画を同一の文字区画として統合補正を実行する
Specifically, the character arrangement analysis processing unit 123 performs the integrated correction process as follows:
(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 analysis processing unit 123 performs the headline analysis processing as follows:
(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 analysis processing unit 123 performs the indentation analysis processing as follows:
(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 analysis processing unit 123 performs ruby analysis processing as follows:
(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 analysis processing unit 123 performs the prohibited character analysis processing as follows:
(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 analysis processing unit 123 performs various calculations as preprocessing (preprocessing for correction processing) as described later for the character pitch or line pitch used in the integrated correction processing or the like. It is calculated by executing.

また、文字配置解析処理部123は、文書データの元の文書構造におけるページ毎に各種の処理を実行する。ただし、文字配置解析処理部123は、複数ページの文書データであって、次のページのデータが存在する場合には、現ページの文字配置解析処理の実行後に、次ページに該当するデータについて文字配置解析処理を実行する。   The character arrangement analysis processing unit 123 executes various processes for each page in the original document structure of the document data. However, the character arrangement analysis processing unit 123, when there is a plurality of pages of document data, and the next page data exists, the character arrangement analysis processing unit 123 executes the character data for the data corresponding to the next page after executing the current page character arrangement analysis process. Execute placement analysis processing.

[4.3.2]認識処理
文字配置解析処理部123は、認識処理としては、取得した文書データに付加されるフラグ情報に基づいて、画像化された文書のページレイアウトを識別し、当該文書データにおける前記文書の行方向及び行送り方向を認識する。
[4.3.2] Recognition processing As the recognition processing, the character arrangement analysis processing unit 123 identifies the page layout of the imaged document based on the flag information added to the acquired document data, and the document Recognize line direction and line feed direction of the document in the data.

例えば、文字配置解析処理部123は、フラグ情報に基づいて、取得した文書データの文書が横書き(すなわち、横組み)であるか、又は、縦書き(すなわち、縦組み)であるかを判定し、文書に沿って文字が配列される行方向(すなわち、文字を読む方向)と、当該行方向に対して直交方向となる文書の行送り方向(すなわち、文書の改行方向)と、を認識する。   For example, the character arrangement analysis processing unit 123 determines, based on the flag information, whether the document of the acquired document data is horizontal writing (that is, horizontal writing) or vertical writing (that is, vertical writing). , Recognizing the line direction in which characters are arranged along the document (that is, the direction in which the characters are read) and the line feed direction of the document that is orthogonal to the line direction (that is, the line feed direction of the document). .

また、文字配置解析処理部123は、上記に代えて、認識処理として、
(1)各第1配列ラインに属する各画素の画素値に基づいて第2配列ライン方向の文字が存在しない空白ライン数を検出し、
(2)各第2配列ラインに属する各画素の画素値に基づいて第1配列ライン方向の文字が存在しない空白ライン数を検出し、
(3)第1配列ライン方向の空白ライン数と第2配列ライン方向の空白ライン数とに基づいて、文書の行方向及び行送り方向を認識してもよい。
In addition, the character arrangement analysis processing unit 123 performs recognition processing instead of the above.
(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 analysis processing unit 123 recognizes an array line direction having a large number of blank lines as a line feed direction, and recognizes an array line direction having a small number of blank lines as a line direction.

通常、行方向の文字間の距離は、行送り方向の行間の距離より短くなる。したがって、第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 analysis processing unit 123 can recognize an array line direction with a large number of blank lines as a line feed direction, and can recognize an array line direction with a small number of blank lines as a line direction.

なお、この場合においては、第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 analysis processing unit 123 of this embodiment will be described with reference to FIG. FIG. 7 is a diagram for explaining the binarization processing in the character arrangement analysis processing unit 123 of this embodiment, and is a diagram illustrating an example of the binarization processing.

文字配置解析処理部123は、2値化処理としては、解析中の文書ページにおいて、カラーによって形成された文書画像をグレースケール画像に変換し、変換したグレースケール画像を、又は、白黒によって形成された文書画像を直接的に、予め定められた閾値に基づいて、2値化するとともに、2値化された文書画像における量子化ノイズ(2値化処理に伴う斑点状のノイズ)を除去するノイズ補正を実行する。   As the binarization processing, the character arrangement analysis processing unit 123 converts a document image formed in color into a grayscale image on a document page being analyzed, and forms the converted grayscale image or monochrome. Noise that directly binarizes a document image based on a predetermined threshold and removes quantization noise (spotted noise associated with binarization processing) in the binarized document image Perform correction.

具体的には、文字配置解析処理部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 analysis processing unit 123 executes a predetermined calculation process and converts it into a black and white grayscale image by the predetermined calculation process. For example, the character arrangement analysis processing unit 123 converts the RGB pixel values R (x, y), G (x, y), and B (x, y) to gray scale for each pixel based on (Equation 1). Pixel value P (x, y) is calculated. In addition, the character arrangement analysis processing unit 123 applies a character to the converted grayscale image in the case of a color image, or to the acquired document image in the case of a monochrome image based on a threshold value. The pixel value “1” constituting the image or the pixel value “0” constituting the background is converted.

Figure 0006152633
Figure 0006152633

なお、例えば、文字配置解析処理部123は、各画素の階調値が0〜255の場合には、200を閾値として用いて2値化処理を実行する。また、文字配置解析処理部123は、ノイズ補正としては、2値化処理された文書画像に対して孤立点の除去及び不連続点の穴埋め等を実行するモルフォロジ演算に基づく画像処理を実行する。   For example, when the gradation value of each pixel is 0 to 255, the character arrangement analysis processing unit 123 executes binarization processing using 200 as a threshold value. In addition, as noise correction, the character arrangement analysis processing unit 123 performs image processing based on a morphological operation for performing isolated point removal, discontinuous point filling, and the like on a binarized document image.

また、文字配置解析処理部123は、図6(A)、(B)に示すように、横書き又は縦書きのカラー又はグレースケールによる文書画像については、白及び黒の2値化処理を実行する。   Further, as shown in FIGS. 6A and 6B, the character arrangement analysis processing unit 123 executes white and black binarization processing for a horizontally or vertically written color or grayscale document image. .

[4.3.4]行検出処理
次に、図8及び図9を用いて本実施形態の文字配置解析処理部123における行検出処理について説明する。なお、図8及び図9は、本実施形態の文字配置解析処理部123における行検出処理について説明するため図である。
[4.3.4] Line Detection Processing Next, line detection processing in the character arrangement analysis processing unit 123 of this embodiment will be described with reference to FIGS. 8 and 9 are diagrams for explaining the line detection processing in the character arrangement analysis processing unit 123 of the present embodiment.

文字配置解析処理部123は、行検出処理としては、解析中の文書ページにおいて、第1配列ライン毎に、各第1配列ラインに属する画素の中から、2値化した際の一方の画素値(すなわち、黒又は白の画素値)を有する画素を少なくとも検出し、当該検出した画素の有無に基づいて前記画像化された文書の各行を検出する。   As the line detection processing, the character arrangement analysis processing unit 123 performs one pixel value when binarizing from the pixels belonging to each first array line for each first array line in the document page being analyzed. At least pixels having (that is, black or white pixel values) are detected, and each row of the imaged document is detected based on the presence or absence of the detected pixels.

なお、本実施形態においては、黒を示す画素値「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 analysis processing unit 123 detects at least any pixel. However, in the following description, the character arrangement analysis processing unit 123 will be described using a case where the first pixel (black pixel) is detected.

具体的には、文字配置解析処理部123は、文書画像における文書の行方向の画素ライン(第1配列ライン)毎に、黒画素をカウントする。そして、文字配置解析処理部123は、黒画素のカウント数が「0」となるラインを空白ラインとして文書画像における文書の行間を構成するラインであると判定し、黒画素のカウント数が「1」以上となるラインを文字が形成されている行形成ラインとして文書画像における各文字を構成するラインであると判定する。   Specifically, the character arrangement analysis processing unit 123 counts black pixels for each pixel line (first array line) in the document row direction in the document image. Then, the character arrangement analysis processing unit 123 determines that the line in which the black pixel count is “0” is a blank line and constitutes a line between the lines of the document in the document image, and the black pixel count is “1”. It is determined that the above-described line is a line forming each character in the document image as a line forming line on which the character is formed.

また、文字配置解析処理部123は、第1配列ラインにおける空白ラインが形成されている一以上のライン又はライン群の領域を行間として検出し、第1配列ラインにおける行形成ラインが形成されている一以上のライン又はライン群の領域を行として検出する。   In addition, the character arrangement analysis processing unit 123 detects one or more lines or line group areas in which blank lines are formed in the first array lines as inter-line intervals, and row formation lines in the first array lines are formed. A region of one or more lines or line groups is detected as a row.

なお、このとき、文字配置解析処理部123は、検出した行については文書画像の先頭の行から順に符号(すなわち、識別情報であって、本実施形態においては「番号」を用いる。)を付与する。   At this time, the character arrangement analysis processing unit 123 assigns a code (that is, identification information, which is “number” in the present embodiment) in order from the first line of the document image to the detected line. To do.

(横組みの文書構造の場合)
例えば、文書画像が(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 analysis processing unit 123 detects each pixel value for each y line and counts black pixels. Further, when the black pixel count is “1” or more, the character arrangement analysis processing unit 123 determines that the y line is a row formation line, and when the count is “0”, the y line is a blank line. judge. Further, as shown in FIG. 8B, the character arrangement analysis processing unit 123 detects, as the line spacing LS, the area of the y line in which blank lines are formed or the group of y lines in which blank lines are continuously formed. At the same time, the region of the y line group in which the row forming line is formed is detected as a row C (t), and codes (t = 1 to L) are sequentially applied from the top row as the head of the document image to the L row. Give.

(縦組みの文書構造の場合)
例えば、横組みの場合と同様に、文書画像が(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 analysis processing unit 123 detects a pixel value of each y line and counts black pixels. Further, the character arrangement analysis processing unit 123 determines that the x line is a row forming line when the count is “1” or more, and determines that the x line is a blank line when the count is “0”. Then, as shown in FIG. 9B, the character arrangement analysis processing unit 123 detects the x-line or x-line group region in which the blank line is formed as the inter-row LS, and the row formation line is formed. The x-line or x-line group area is detected as a row C (t), and a code (t = 1 to L) is assigned in order from the rightmost row as the head of the document image to the L row.

[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 analysis processing unit 123 of this embodiment will be described with reference to FIGS. 10 to 13 are diagrams for explaining the character section detection processing in the character arrangement analysis processing unit 123 of the present embodiment.

文字配置解析処理部123は、文字検出処理としては、解析中の文書ページにおいて、第1配列ライン及び第2配列ラインに属する各画素の画素値に基づいて、区画サイズ及び文書画像上における区画位置を特定しつつ、各文字区画を検出する。特に、文字配置解析処理部123は、上述の行検出処理として検出された文書画像の行毎に、検出された行に属する第2配列ライン毎の各第2配列ラインに属する画素の中から、2値化した際の一方の値を有する画素を検出し、当該検出した画素の有無に基づいて、行毎に文字区画を検出する。なお、行検出処理と同様に、文字区画検出処理においても、以下の説明においては、文字配置解析処理部123は、第1画素(黒画素)を検出する場合を用いて説明する。   The character arrangement analysis processing unit 123 performs character detection processing based on the pixel value of each pixel belonging to the first array line and the second array line in the document page being analyzed, and the partition position on the document image. Each character section is detected while specifying the character. In particular, the character arrangement analysis processing unit 123, for each line of the document image detected as the above-described line detection process, from among pixels belonging to each second array line for each second array line belonging to the detected line, Pixels having one value when binarized are detected, and character sections are detected for each line based on the presence or absence of the detected pixels. Note that, similarly to the line detection process, in the character section detection process, in the following description, the character arrangement analysis processing unit 123 will be described using a case where the first pixel (black pixel) is detected.

具体的には、文字配置解析処理部123は、行毎に文書画像における文書の行送り方向の画素ラインとなる第2配列ライン毎に、黒画素(又は、白画素)をカウントするとともに、黒画素のカウント数が「0」となるラインを空白ラインとして各行における文字間を構成するラインであると判定し、黒画素のカウント数が「1」以上となるラインを文字が形成されている文字形成ラインとして文書画像における各文字を構成するラインであると判定する。   Specifically, the character arrangement analysis processing unit 123 counts black pixels (or white pixels) for each second array line that is a pixel line in the document feed direction in the document image for each line, A line in which a character count is “0” is determined to be a line constituting a space between characters in each line with a line having a pixel count of “0” as a blank line, and a character in which a character having a black pixel count of “1” or more is formed It is determined that the line constitutes each character in the document image as a formation line.

そして、文字配置解析処理部123は、行毎に第2配列ラインにおける空白ラインが形成されている一以上のライン又はライン群の領域を文字間として検出し、第2配列ラインにおける文字形成ラインが形成されているライン群の領域を文字区画として検出する。特に、文字配置解析処理部123は、各文字区画を規定する座標を検出する。   And the character arrangement | positioning analysis process part 123 detects the area | region of the 1 or more line or line group in which the blank line in the 2nd arrangement line is formed for every line as a character space, The character formation line in the 2nd arrangement line is An area of the formed line group is detected as a character section. In particular, the character arrangement analysis processing unit 123 detects coordinates that define each character section.

なお、このとき、文字配置解析処理部123は、検出した文字区画については各行の先頭の文字区画から順に符号を付与する。   At this time, the character arrangement analysis processing unit 123 assigns codes to the detected character sections in order from the first character section of each line.

(横組みの文書構造の場合)
例えば、文書画像が(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 analysis processing unit 123 detects each pixel value of each x line for each detected row, and counts black pixels. The character arrangement analysis processing unit 123 determines that the x line is a character forming line when the count is “1” or more, and determines the x line as a blank line when the count is “0”. Furthermore, as shown in FIG. 10B, the character arrangement analysis processing unit 123 detects an area of the x line or the x line group in which the character forming line is formed as the character section C (t, m). Then, as shown in FIG. 11, the character arrangement analysis processing unit 123 has four corners that define each character section, that is, upper left coordinates (x1, y1), lower left coordinates (x1, y2), and upper right coordinates (x2, y1). In addition, the lower right coordinates (x2, y2) are detected, and codes are assigned in order from the leftmost character division line to the m division at the head of each line.

(縦組みの文書構造の場合)
例えば、横組みの場合と同様に、文書画像が(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 analysis processing unit 123 detects each pixel value of each y line and counts black pixels for each detected row. The character arrangement analysis processing unit 123 determines that the y line is a character forming line when the count is “1” or more, and determines that the y line is a blank line when the count is “0”. Furthermore, as shown in FIG. 12B, the character arrangement analysis processing unit 123 detects a region of the y line or the y line group in which the character forming line is formed as the character section C (t, m). Then, as shown in FIG. 13, the character arrangement analysis processing unit 123, like horizontal composition, has four corners that define each character section, that is, upper left coordinates (x1, y1), lower left coordinates (x1, y2), and upper right corners. The coordinates (x2, y1) and the lower right coordinates (x2, y2) are detected, and codes are assigned in order from the leftmost character partition line to the m section, which is the head of each line.

[4.3.6]補正処理用の前処理
次に、本実施形態の文字配置解析処理部123における補正処理用の前処理ついて説明する。
[4.3.6] Preprocessing for Correction Processing Next, preprocessing for correction processing in the character arrangement analysis processing unit 123 of this embodiment will be described.

文字配置解析処理部123は、統合補正処理と、見出し解析処理、ルビ解析処理及び禁則文字解析処理の各特殊文字解析処理との補正処理用の前処理として、文字区画の最大区画サイズ、平均区画サイズ及び標準区画サイズと、平均行ピッチ及び最大文字ピッチと、平均行ピッチと、文字間の距離とを算出する。   The character arrangement analysis processing unit 123 performs preprocessing for correction processing of the integrated correction processing and the special character analysis processing of the headline analysis processing, ruby analysis processing, and prohibited character analysis processing, as the maximum division size and average division of character divisions. The size and standard partition size, average line pitch and maximum character pitch, average line pitch, and distance between characters are calculated.

なお、文字配置解析処理部123は、取得した文書データの元のデータ形式(すなわち、画像化された文書の文書構造)によって定まるページ毎に補正処理用の前処理を実行する。   Note that the character arrangement analysis processing unit 123 executes preprocessing for correction processing for each page determined by the original data format of the acquired document data (that is, the document structure of the imaged document).

(各行の最大区画サイズ)
文字配置解析処理部123は、検出された各文字区画に基づいて、行毎に行方向及び行送り方向における最大区画サイズをそれぞれ算出する。
(Maximum partition size for each row)
The character arrangement analysis processing unit 123 calculates the maximum section size in the line direction and the line feed direction for each line based on each detected character section.

具体的には、文字配置解析処理部123は、行毎に、検出された各文字区画の第1配列ラインにおけるx及びy座標値の差を算出するとともに、検出された各文字区画の第2配列ラインにおけるx及びy座標値の差を算出する。そして、文字配置解析処理部123は、行毎に、検出された各文字区画の第1配列ラインにおける座標値の差の最大の値を、解析中の文書ページにおいて行方向における最大サイズSmax(L1,t)に設定するとともに、検出された各文字区画の第2配列ラインにおける座標値の差の最大の値を、当該解析中の文書ページにおいて行送り方向における最大サイズSmax(L2,t)に設定する。   Specifically, the character arrangement analysis processing unit 123 calculates, for each line, the difference between the x and y coordinate values in the first array line of each detected character section, and the second of each detected character section. The difference between the x and y coordinate values in the array line is calculated. Then, the character arrangement analysis processing unit 123 calculates, for each line, the maximum value of the difference in the coordinate values in the first array line of each detected character section, and the maximum size Smax (L1 in the line direction) in the document page being analyzed. , T), and the maximum value of the difference between the coordinate values in the second array line of each detected character section is set to the maximum size Smax (L2, t) in the line feed direction in the document page being analyzed. Set.

例えば、横組みの場合には、文字配置解析処理部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 analysis processing unit 123 performs, for each line, a line direction that is the direction of the first array line of each character section, as shown in (Expression 2) and (Expression 3). The difference between the coordinate values, that is, the width of each character section is calculated, and the calculated maximum width Smax (x, t) of each character section is set to the maximum size Smax (L1, t) in the row direction. In addition, the character arrangement analysis processing unit 123 calculates, for each line, a difference in coordinate values in the line feed direction that is the direction of the second array line of each character section, that is, the height of each character section. The maximum height Smax (y, t) of each character section is set to the maximum size Smax (L2, t) in the line feed direction.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、式中の「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 analysis processing unit 123, for each row, as shown in (Expression 4) and (Expression 5), in the row direction that is the direction of the first array line of each character section. The difference between the coordinate values, that is, the height of each character section is calculated, and the calculated maximum height Smax (y, t) of each character section is set to the maximum size Smax (L1, t) in the row direction. In addition, the character arrangement analysis processing unit 123 calculates, for each line, a difference in coordinate values in the line feed direction that is the direction of the second array line of each character section, that is, the width of each character section. The maximum width Smax (x, t) of the character section is set to the maximum size Smax (L2, t) in the line feed direction.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、(式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 analysis processing unit 123 calculates an average section size in the line direction and the line feed direction based on each character section detected in all lines in the document page being analyzed.

具体的には、文字配置解析処理部123は、(式6)及び(式7)に示すように、行毎に算出された行方向の最大サイズ及び行送り方向の最大サイズをそれぞれ加算し、全行(すなわち、T行)で除算することによって、解析中の文書ページにおける行方向の平均区画サイズSav(L1)及び行送り方向の平均区画サイズSav(L2)を算出する。なお、式中「T」は、行数を示す。   Specifically, as shown in (Expression 6) and (Expression 7), the character arrangement analysis processing unit 123 adds the maximum size in the line direction and the maximum size in the line feed direction calculated for each line, respectively. By dividing by all lines (that is, T lines), the average section size Sav (L1) in the line direction and the average section size Sav (L2) in the line feed direction in the document page being analyzed are calculated. In the formula, “T” indicates the number of rows.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

例えば、横組みの場合には、文字配置解析処理部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 analysis processing unit 123 sets the calculated maximum width Smax (x, t) of each line to t = 1,. . . , T, and dividing by all rows (ie, T rows), the average partition size Sav (L1) in the row direction is calculated. In addition, the character arrangement analysis processing unit 123 sets the calculated maximum height Smax (y, t) of each line to t = 1,. . . , T, and dividing by all rows (ie, T rows), the average partition size Sav (L2) in the row direction is calculated.

一方、縦組みの場合には、文字配置解析処理部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 analysis processing unit 123 adds the calculated maximum height Smax (y, t) of each line and divides by all lines (that is, T lines). The average partition size Sav (L1) in the row direction is calculated. In addition, the character arrangement analysis processing unit 123 adds the calculated maximum width Smax (x, t) of each line, and divides by all lines (that is, T lines), thereby obtaining the average partition size Sav ( L2) is calculated.

(全行に基づく標準区画サイズ)
文字配置解析処理部123は、解析中の文書ページにおいて、各行における行方向の最大区画サイズ及び全行に基づく行方向の平均区画サイズを用いて全行に基づく標準区画サイズを算出する。
(Standard partition size based on all rows)
The character arrangement analysis processing unit 123 calculates the standard partition size based on all lines using the maximum partition size in the line direction in each line and the average partition size in the line direction based on all lines in the document page being analyzed.

具体的には、文字配置解析処理部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 analysis processing unit 123 calculates a difference value between the maximum partition size in the row direction in each row and the average partition size in the row direction based on all the rows. The difference value between the maximum partition size in the line feed direction and the average partition size in the line feed direction based on all lines is calculated, and the difference value Min | Smax (L1, t) that is the smallest among the calculated difference values. Set the maximum partition size rows ts1 and ts2 with -Sav (L1) | and Min | Smax (L2, t) -Sav (L2) | as standard rows. Then, the character arrangement analysis processing unit 123 calculates the line size Smax (L1, ts1) in the line ts1 set as the standard line and the line feed direction size Smax (L2, ts2) in the line ts2 set as the standard line. The standard section size Sst (L1) in the line direction and the standard section size Sst (L2) in the line feed direction in the document page being analyzed are set.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

(全行に基づく平均行ピッチ)
文字配置解析処理部123は、解析中の文書ページにおいて、行毎に、行送り方向における検出された各文字区画における基準位置の平均座標値に基づいて、平均行ピッチを算出する。
(Average line pitch based on all lines)
The character arrangement analysis processing unit 123 calculates an average line pitch for each line in the document page being analyzed based on the average coordinate value of the reference position in each character section detected in the line feed direction.

具体的には、文字配置解析処理部123は、行毎に、中心座標又は文字区画の四隅のいずれかの座標などの各文字区画における基準点の座標を加算し、該当する行の文字区画数で除算することによって、行毎の平均座標値Pt(av,t)を算出する。また、文字配置解析処理部123は、算出した行毎の平均座標値Pt(av,t)に基づいて、隣接する行における平均座標値の差の平均を算出し、当該算出した平均を、解析中の文書ページにおおける平均行ピッチとして設定する。   Specifically, the character arrangement analysis processing unit 123 adds, for each line, the coordinates of the reference point in each character section such as the center coordinates or the coordinates of any of the four corners of the character section, and the number of character sections in the corresponding line. The average coordinate value Pt (av, t) for each row is calculated by dividing by. In addition, the character arrangement analysis processing unit 123 calculates the average of the difference between the average coordinate values in the adjacent lines based on the calculated average coordinate value Pt (av, t) for each line, and analyzes the calculated average. Set as the average line pitch in the middle document page.

例えば、横組みの場合には、文字配置解析処理部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 analysis processing unit 123, as shown in (Expression 10) and (Expression 11), the average coordinate value Pt (av, t) in the coordinate value y2 calculated for each line. Based on the above, the difference from the average coordinate value Pt (av, t + 1) in the coordinate value y2 with the row adjacent to the subsequent stage is calculated for all rows, and the average is calculated for each of the calculated coordinate value differences. The calculated average is set as the average line pitch SL (av).

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、上述の各式と同様に、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 analysis processing unit 123, as shown in (Equation 12) and (Equation 13), the average coordinate value Pt (av, av) in the coordinate value x1 calculated for each line. t), the difference from the average coordinate value Pt (av, t + 1) in the coordinate value x1 with the row adjacent to the subsequent stage is calculated for all rows, and the average is calculated for each of the calculated coordinate value differences. The calculated average is set as the average line pitch SL (av).

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、(式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 analysis processing unit 123 calculates, as the maximum character pitch, the maximum arrangement pitch of the character sections in the row direction for each line based on each detected character section in the document page being analyzed.

具体的には、文字配置解析処理部123は、行毎に、検出された各文字区画の第1配列ラインにおける隣接する2つの文字区画の同一の座標位置おける座標値の差を算出し、算出した座標値の差の最大の値を、解析中の文書ページにおいて行方向における最大文字ピッチSpmax(L1,t)に設定する。   Specifically, the character arrangement analysis processing unit 123 calculates, for each line, a difference between coordinate values at the same coordinate position of two adjacent character sections in the first array line of each detected character section. The maximum value of the coordinate value difference is set to the maximum character pitch Spmax (L1, t) in the line direction in the document page being analyzed.

例えば、横組みの場合には、文字配置解析処理部123は、(式14)に示すように、各行において、隣接する2つの文字区画の左上の座標位置x1の座標値の差を算出し、算出した座標値の差の最大の値を、各行方向における最大文字ピッチSpmax(L1,t)に設定する。   For example, in the case of horizontal composition, the character arrangement analysis processing unit 123 calculates the difference between the coordinate values of the upper left coordinate position x1 of two adjacent character sections in each row, as shown in (Equation 14). The maximum difference between the calculated coordinate values is set to the maximum character pitch Spmax (L1, t) in each line direction.

Figure 0006152633
Figure 0006152633

なお、上述の各式と同様に、式中の「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 analysis processing unit 123 calculates the difference between the coordinate values of the coordinate position y2 at the right corner of two adjacent character sections in each row, as shown in (Equation 15). The maximum difference between the calculated coordinate values is set as the maximum character pitch Spmax (L1, t) in each line direction.

Figure 0006152633
Figure 0006152633

なお、上述の各式と同様に、式中の「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 analysis processing unit 123 uses the maximum partition size in the line direction in each line, the average partition size in the line direction based on all the lines, and the maximum character pitch of each line in the document page being analyzed, Is calculated.

具体的には、文字配置解析処理部123は、(式16)に示すように、各行における行方向の最大区画サイズSmax(L1,t)と全行に基づく行方向の平均区画サイズSst(L1)の差分値をそれぞれ算出し、算出された差分値のうち最小となる差分値を有する最大区画サイズの行を標準行(Lst)として設定する。そして、文字配置解析処理部123は、標準行(Lst)に設定した行における最大文字ピッチSpmax(L1,Lst)を、解析中の文書ページにおける基準文字ピッチSp(st)に設定する。   Specifically, as shown in (Equation 16), the character arrangement analysis processing unit 123 performs the maximum partition size Smax (L1, t) in the row direction in each row and the average partition size Sst (L1 in the row direction based on all rows). ) And the maximum partition size row having the smallest difference value among the calculated difference values is set as a standard row (Lst). Then, the character arrangement analysis processing unit 123 sets the maximum character pitch Spmax (L1, Lst) in the line set as the standard line (Lst) as the reference character pitch Sp (st) in the document page being analyzed.

Figure 0006152633
Figure 0006152633

なお、上述の各式と同様に、式中の「t」は、行番、「Lst」は、(式17)に示すように、各行における行方向の最大区画サイズSmax(L1,t)と全行に基づく行方向の平均区画サイズSst(L1)の最小差分値Min|Δ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.

Figure 0006152633
Figure 0006152633

[4.3.7]文字区画統合補正処理
次に、図14を用いて本実施形態の文字配置解析処理部123における統合補正処理ついて説明する。なお、図14は、本実施形態の文字配置解析処理部123における統合補正処理について説明するため図である。
[4.3.7] Character block integration correction processing
Next, the integrated correction processing in the character arrangement analysis processing unit 123 of this embodiment will be described with reference to FIG. FIG. 14 is a diagram for explaining the integrated correction processing in the character arrangement analysis processing unit 123 of the present embodiment.

文字配置解析処理部123は、文字区画統合補正処理としては、解析中の文書ページにおいて、行毎に、隣接する文字区画の間の距離をそれぞれ算出するとともに、当該算出した文字区画の間の距離が補正処理の前処理によって算出した基準文字ピッチ以下であるか否かをそれぞれ判定する。そして、文字配置解析処理部123は、文字区画の間の距離が基準文字ピッチ以下と判定した文字区画同士を連結し、一の文字区画に統合する。 The character arrangement analysis processing unit 123 calculates the distance between adjacent character sections for each line in the document page being analyzed as the character section integration correction processing, and also calculates the distance between the calculated character sections. Are each equal to or smaller than the reference character pitch calculated by the pre-processing of the correction processing. Then, the character arrangement analysis processing unit 123 connects the character sections determined to have a distance between the character sections equal to or less than the reference character pitch, and integrates them into one character section.

通常、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 analysis processing unit 123 performs two adjacent character sections C (t, m) in the line direction for each line (t). It is determined whether or not the distance D (L1 (m, m + 1)) between C (t, m + 1) is equal to or smaller than the reference character pitch Sp (st) calculated by the preprocessing of the correction processing. Then, the character arrangement analysis processing unit 123 connects the character sections determined to have a distance between the character sections equal to or less than the reference character pitch Sp (st), and integrates them into one character section.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、(式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 analysis processing unit 123 of this embodiment will be described with reference to FIG. FIG. 15 is a diagram for explaining the headline analysis processing in the character arrangement analysis processing unit 123 of the present embodiment.

文字配置解析処理部123は、見出し解析処理としては、解析中の文書ページにおいて、行毎に、補正処理用の前処理によって算出した平均行ピッチに基づいて予め定めた条件(以下、「行ピッチ条件」という。)を具備したか否かを判定し、行ピッチ条件を具備する行に属する各文字区画については、見出しに用いる文字区画であることを示す属性を見出し属性情報として設定する。   As the headline analysis processing, the character arrangement analysis processing unit 123 performs a predetermined condition (hereinafter referred to as “line pitch”) based on the average line pitch calculated by the preprocessing for correction processing for each line in the document page being analyzed. It is determined whether or not it has a “condition”), and for each character section belonging to the line having the line pitch condition, an attribute indicating the character section used for the heading is set as the heading attribute information.

具体的には、文字配置解析処理部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 analysis processing unit 123 performs a predetermined coefficient multiple of the average line pitch SL (av) calculated by the pitch of each line (for example, It is determined whether it is larger than 1.5 times. When the character arrangement analysis processing unit 123 determines that each line is larger than a predetermined coefficient multiple (for example, 1.5 times) of the calculated average line pitch SL (av), the character arrangement analysis processing unit 123 finds the line used for the determination. A line is set, and heading attribute information (mode = 1) is set for each character section belonging to the line.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、(式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 analysis processing unit 123 may calculate the line pitch of each line by averaging or other operations using a plurality of or all character sections on the same line.

[4.3.9]字下げ解析処理
次に、図16を用いて本実施形態の文字配置解析処理部123における字下げ解析処理ついて説明する。なお、図16は、本実施形態の文字配置解析処理部123における字下げ解析処理について説明するため図である。
[4.3.9] Indentation Analysis Processing Next, indentation analysis processing in the character arrangement analysis processing unit 123 of this embodiment will be described with reference to FIG. FIG. 16 is a diagram for explaining the indentation analysis processing in the character arrangement analysis processing unit 123 of the present embodiment.

文字配置解析処理部123は、字下げ解析処理としては、解析中の文書ページにおいて、行毎に、先頭の文字区画における位置が補正処理用の前処理によって算出した第1配列ラインにおける標準区画サイズに基づいて予め定めた条件(以下、「先頭配置条件」という。)を具備したか否かを判定し、先頭配置条件を具備する文字区画については、字下げ文字に該当する文字区画であることを示す属性を字下げ属性情報として設定する。   As the indentation analysis process, the character arrangement analysis processing unit 123 has a standard section size in the first array line in which the position in the first character section is calculated by preprocessing for correction processing for each line in the document page being analyzed. It is determined whether or not a predetermined condition (hereinafter referred to as “first arrangement condition”) is satisfied, and a character section having the first arrangement condition is a character section corresponding to an indented character. Is set as indentation attribute information.

具体的には、文字配置解析処理部123は、図16、並びに(式22)及び(式23)に示すように、行方向において先頭となる文字区画が行方向の文字記載開始位置から所定の距離以上離れているか否かを判定する。そして、文字配置解析処理部123は、行方向において先頭となる文字区画が行方向の文字が記載される開始位置から所定の距離以上離れていると判定した場合には、当該判定に用いた文字区画に字下げ属性情報(mode=2)を設定する。   Specifically, as shown in FIG. 16 and (Equation 22) and (Equation 23), the character arrangement analysis processing unit 123 sets a predetermined character section in the row direction from the character description start position in the row direction. It is determined whether or not it is more than a distance away. When the character arrangement analysis processing unit 123 determines that the character section that is the head in the line direction is more than a predetermined distance from the start position where the character in the line direction is described, the character used for the determination Indentation attribute information (mode = 2) is set in the section.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、(式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 analysis processing unit 123 of this embodiment will be described with reference to FIG. FIG. 17 is a diagram for explaining the ruby analysis processing in the character arrangement analysis processing unit 123 of the present embodiment.

文字配置解析処理部123は、ルビ解析処理としては、解析中の文書ページにおいて、行毎に、補正処理用の前処理によって算出した平均行ピッチに基づいて予め定めた条件(以下、「行ピッチ特定条件」という。)を具備したか否かを判定し、行ピッチ特定条件を具備する行に属する各文字区画については、ルビに用いる文字区画であることを示す属性をルビ属性情報として設定する。   As the ruby analysis processing, the character arrangement analysis processing unit 123 performs a predetermined condition (hereinafter referred to as “line pitch”) for each line in the document page being analyzed based on the average line pitch calculated by the preprocessing for correction processing. It is determined whether or not “specific condition” is satisfied, and for each character section belonging to the line having the line pitch specifying condition, an attribute indicating that the character section is used for ruby is set as ruby attribute information. .

また、文字配置解析処理部123は、特定したルビ行に属する各文字区画の行方向の第1位置とルビ行の文書の行送り方向に対して次段の行であるルビ対象行における各文字区画の行方向の第2位置とをそれぞれ比較するとともに、第1位置と第2位置の差が最小となるルビ対象行の文字区画をルビ対象文字として特定し、当該ルビ対象文字の文字区画にルビ対象文字を示す属性をルビ対象属性情報として設定する。そして、文字配置解析処理部123は、対象となっているルビの文字区画についても探索位置(ルビ対象となる文字区画の行及び並び順)の情報を設定する。   In addition, the character arrangement analysis processing unit 123 executes each character in the ruby target line that is the next line with respect 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 ruby line document. The second position in the row direction of each section 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, and the character section of the ruby target character is determined. An attribute indicating a ruby target character is set as ruby target attribute information. Then, the character arrangement analysis processing unit 123 also sets information on the search position (line and arrangement order of the character sections to be ruby) for the target ruby character sections.

具体的には、文字配置解析処理部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 analysis processing unit 123 performs the standard of the line feed direction (second array line direction) calculated by the pitch of each line. It is determined whether or not it is smaller than a predetermined coefficient multiple (for example, 0.8 times) of the partition size Sst (L2). If the character arrangement analysis processing unit 123 determines that each line is smaller than a predetermined coefficient multiple of the calculated standard section size Sst (L2), the line used for the determination is set as a ruby line, and the line Ruby attribute information (mode = 3) is set for each character section (C (t, m)) belonging to.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、(式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 analysis processing unit 123 may calculate the line pitch of each line by averaging or other operations using a plurality of or all character sections on the same line.

また、文字配置解析処理部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 analysis processing unit 123 sets 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. On the other hand, the second position in the line direction of each character section in the ruby target line, which is the next line, is compared with each other, and the character section of the ruby target line having the smallest difference between the first position and the second position is determined as the ruby. Specify as the target character. Then, the character arrangement analysis processing unit 123 sets ruby target attribute information (mode = 4) in the character section (C (t + 1, i)) specified as the specified ruby target character, and at the same time, sets the ruby target character's ruby. The ID (C (t + 1, i)) of the character section of the ruby target attribute information is set to the character section to which the ruby attribute information is given.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、(条件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 analysis processing unit 123 of this embodiment will be described with reference to FIG. FIG. 18 is a diagram for explaining prohibited character analysis processing in the character arrangement analysis processing unit 123 of this embodiment.

文字配置解析処理部123は、禁則文字解析処理としては、解析中の文書ページにおいて、見出し解析処理、字下げ解析処理及びルビ解析処理の各属性情報が設定されていない文字区画について、各文字区画の行方向(第1配列ライン方向)の最大幅サイズ(文字区画内で黒画素が存在する最大の幅)及び最小幅サイズ(文字区画内で黒画素が存在する最小の幅)と、行送り方向(第2配列ライン方向)の最大幅サイズ及び最小幅サイズと、を算出する。そして、文字配置解析処理部123は、算出したそのそれぞれの差が予め定めた条件(以下、「禁則文字条件」という。)を具備したか否かを判定し、禁則文字条件を具備する文字区画については、禁則文字に該当する文字区画であることを示す属性を禁則文字属性情報として設定する。   As the prohibited character analysis processing, the character arrangement analysis processing unit 123 sets each character partition for each character partition in which each attribute information of the headline analysis processing, the indent analysis processing, and the ruby analysis processing is not set in the document page being analyzed. Maximum width size in the row direction (first array line direction) (maximum width where black pixels exist in the character section) and minimum width size (minimum width where black pixels exist in the character section), and line feed The maximum width size and the minimum width size in the direction (second array line direction) are calculated. Then, the character arrangement analysis processing unit 123 determines whether or not each of the calculated differences satisfies a predetermined condition (hereinafter referred to as “prohibited character condition”), and the character section having the prohibited character condition. For, an attribute indicating a character section corresponding to a prohibited character is set as prohibited character attribute information.

具体的には、文字配置解析処理部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 analysis processing unit 123 performs the determination in the range of the character segment to be determined.
(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.

Figure 0006152633
Figure 0006152633

Figure 0006152633
Figure 0006152633

なお、(式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 arrangement processing unit 124 in the application processing unit 120 of this embodiment will be described with reference to FIGS. 19 and 20. 19 and 20 are diagrams for explaining the partition arrangement processing in the partition arrangement processing unit 124 of this embodiment.

区画配置処理部124は、取得した文書データの文書構造におけるページ(すなわち、文書ページ)毎に、前の文書ページの文字区画の配置に継続しつつ、字配置解析処理部によって、解析された各文字区画を、設定された指定表示領域の領域サイズと、予め定められた配置条件と、各文字区画の並び順(各ページ毎の並び順)にしたがって文字区画を指定表示領域に配置するための処理を実行する。   For each page (that is, document page) in the document structure of the acquired document data, the section arrangement processing unit 124 continues the arrangement of the character sections of the previous document page, and analyzes each of the characters analyzed by the character arrangement analysis processing unit. For arranging the character sections in the designated display area according to the set area size of the designated display area, the predetermined arrangement condition, and the arrangement order of each character section (order of arrangement for each page) Execute the process.

具体的には、区画配置処理部124は、文字区画の行番号と行毎の並び順C(t,m)と文書構造(すなわち、横組み又は縦組み)に従って、各文字区画を配置しつつ、見出し文字、字下げ文字、ルビ、ルビ対象文字及び禁則文字を示す各属性情報を有する文字区画を検出した場合に、予め定められた配置条件に従って各属性情報を有する文字区画を所定の位置に配置する。   Specifically, the section arrangement processing unit 124 arranges each character section according to the line number of the character section, the arrangement order C (t, m) for each line, and the document structure (that is, horizontal composition or vertical composition). When a character section having each attribute information indicating a heading character, an indented character, ruby, a ruby target character, and a prohibited character is detected, the character section having each attribute information is set at a predetermined position according to a predetermined arrangement condition. Deploy.

すなわち、区画配置処理部124は、
(1)属性情報を有していない文字区画を予め定まっている並び順に従って配置し、
(2)見出し属性情報を有する文字区画を検出した場合には、当該文字区画を、当該見出し行に属する他の文字区画とともに、単一の行として設定された指定表示領域内に配置し、
(3)字下げ属性情報を有する文字区画を検出した場合には、当該文字区画を、設定された指定表示領域内における行の先頭であって字下げされる位置に配置し、
(4)ルビ属性情報を有する文字区画を検出した場合には、当該文字区画を、設定された指定表示領域内におけるルビが付与されるルビ対象文字のルビの位置に配置し、
(5)禁則文字属性情報を有する文字区画を検出した場合には、行の先頭に配置禁止の文字に対応する文字区画を前段の行末に、又は、行末に配置禁止の文字に対応する文字区画を次段の行の先頭にそれぞれ当該文字区画を配置する。
That is, the partition arrangement processing unit 124
(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 arrangement processing unit 124 detects the coordinates of each character section when it is arranged (hereinafter referred to as “modified character section coordinates”), and sets the arrangement data having the coordinates of the four corners of the character section for each character section. Generate.

例えば、区画配置処理部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 arrangement processing unit 124 determines the indented character section, the ruby character section, the ruby target character section, and the prohibited character section. In the designated display area according to the above arrangement conditions.

なお、本実施形態においては、区画配置処理部124は、行末における禁則文字の配置を行う関係上、区画配置処理の実行の際には、図19及び図20に示すように、指定表示領域より行方向に狭い配置領域(以下、「実配置領域」という。)を用いて配置処理を実行し、禁則文字の文字区画があった場合に、指定表示領域内であって禁則文字の前文字区画と同一の行に配置するようになっている。ただし、この実配置領域は、指定表示領域に対して最大の禁則文字の文字区画が配置可能なスペース分狭い領域サイズであればよい。   In the present embodiment, the section arrangement processing unit 124 performs the arrangement of prohibited characters at the end of the line, and therefore, when executing the section arrangement process, the designated display area is used as shown in FIGS. 19 and 20. When placement processing is performed using a narrow placement area in the row direction (hereinafter referred to as “actual placement area”), and there is a character block of prohibited characters, it is in the designated display area and the previous character block of the prohibited character Are arranged on the same line. However, the actual arrangement area may be an area that is narrower than the designated display area by a space in which the maximum prohibited character section can be arranged.

[4.5]画像データ生成部
次に、図21を用いて本実施形態のアプリケーション処理部120におけるに画像データ生成部125ついて説明する。なお、図21は、本実施形態の画像データ生成部125における画像生成処理について説明するため図である。ただし、図21は、横組みの場合におけるビットマップ画像を生成する場合について説明するための図である。
[4.5] Image Data Generation Unit Next, the image data generation unit 125 in the application processing unit 120 of this embodiment will be described with reference to FIG. FIG. 21 is a diagram for explaining image generation processing in the image data generation unit 125 of the present embodiment. However, FIG. 21 is a diagram for explaining a case of generating a bitmap image in the case of horizontal composition.

画像データ生成部125は、区画配置処理部124によって生成された配置データ、すなわち、指定表示領域に配置された各文字区画に基づいて、ビットマップ画像を生成する。   The image data generation unit 125 generates a bitmap image based on the arrangement data generated by the division arrangement processing unit 124, that is, each character division arranged in the designated display area.

具体的には、画像データ生成部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 data generation unit 125, as shown in FIG. 21 , corresponds to the section image corresponding to each character section C (t, m), that is, each character surrounded by the coordinates on the document data. The pixel block (pixel value of each pixel) of the section C (t, m) is extracted, and the pixel block is extracted from the arrangement data generated by the section arrangement processing unit 124 at the four corners of each character section C (t, m). Assigned to coordinates (that is, modified character section coordinates, specifically, (x1, y1), (x2, y1), (x1, y2), and (x2, y2)) in the instruction designation area Each pixel is set to generate a bitmap image. In particular, the image data generation unit 125 sets each pixel value of RGB for a color image, and a gray scale value for each pixel of the modified character segment coordinates for a monochrome 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 data storage unit 100, and the document image of the document data is displayed in the designated display area having a display size different from the page size of the document data. Is displayed.

また、所定の文書データにおける文書画像の閲覧中において使用可能なユーザ操作には、指定表示領域の変更指示と、スクロールによる表示位置の変更指示と、終了指示と、を含む。   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 management control unit 121 detects a user's instruction to start execution of a browsing application together with selection of document data that the user desires to browse through the operation unit 160 (step S101), the data management control unit 121 converts the selected document data into content data. The data is read from the storage unit 102 and expanded in the ROM / RAM 103 (step S102).

次いで、文字配置解析処理部123は、読み出した文書データの文書画像に含まれる各文字の文字区画を、文書ページ毎に解析する文字区画解析処理を実行し、各文字区画の基準座標(具体的には矩形の四隅の座標)及び見出し等の属性情報から構成される文字区画データを生成する(ステップS103)。なお、文字配置解析処理部123における文字区画解析処理の詳細については後述する。   Next, the character arrangement analysis processing unit 123 performs character segment analysis processing for analyzing the character segment of each character included in the document image of the read document data for each document page. Character segment data composed of attribute information such as headings and the like (step S103). Details of the character segment analysis processing in the character arrangement analysis processing unit 123 will be described later.

次いで、指定表示領域設定部122は、予め定められた標準的な指定表示領域を読み出す(ステップS104)。例えば、データ管理制御部121は、前回の閲覧アプリケーションの動作時の指定表示領域をデータ記憶部100に記憶し、本処理においてデータ記憶部100から読み出す。   Next, the designated display area setting unit 122 reads a predetermined standard designated display area (step S104). For example, the data management control unit 121 stores the designated display area at the time of the previous operation of the browsing application in the data storage unit 100 and reads out from the data storage unit 100 in this process.

次いで、区画配置処理部124は、ステップS103において実行された文字区画解析処理によって解析された各文字区画を、所定の配置状況及び属性情報に従って、ステップS104の処理において読み出した指定表示領域、又は、ステップS109の処理において設定された指定表示領域に配置する区画配置処理を実行する(ステップS105)。なお、区画配置処理部124における区画配置処理の詳細については後述する。   Next, the section arrangement processing unit 124 reads each character section analyzed by the character section analysis process executed in step S103 according to a predetermined arrangement state and attribute information, or the designated display area read in the process of step S104, or A partition placement process is performed for placement in the designated display area set in the process of step S109 (step S105). Details of the partition arrangement processing in the partition arrangement processing unit 124 will be described later.

次いで、画像データ生成部125は、配置された指定表示領域内の文字区画に、配置された文字区画に対応する元の文書画像における画素ブロックを配置してビットマップ画像を生成する(ステップS106)。   Next, the image data generating unit 125 arranges the pixel block in the original document image corresponding to the arranged character section in the character section in the arranged designated display area, and generates a bitmap image (step S106). .

次いで、画像データ生成部125は、表示制御と連動して該当する部分のビットマップ画像を表示部150に出力し、ユーザの操作入力を待機する(ステップS107)。なお、スクロール指示された場合には、その指示に連動して該当する部分のビットマップ画像を連続的に出力する。   Next, the image data generation unit 125 outputs the corresponding portion of the bitmap image to the display unit 150 in conjunction with the display control, and waits for a user operation input (step S107). When a scroll instruction is issued, the corresponding portion of the bitmap image is continuously output in conjunction with the instruction.

次いで、データ管理制御部121は、ユーザにおける操作入力を検出すると(ステップS108)、スクロールによる表示変更指示の有無(ステップS109)、及び、指定表示領域の変更指示の有無(ステップS110)をそれぞれ判定する。   Next, when detecting an operation input by the user (step S108), the data management control unit 121 determines whether or not there is a display change instruction by scrolling (step S109) and whether or not there is an instruction to change the designated display area (step S110). To do.

このとき、データ管理制御部121は、ユーザにおける操作入力が指定表示領域の変更指示と判定した場合には、ステップS107の処理に移行し、ユーザにおける操作入力が改変ページの指定と判定した場合には、ステップS105の処理に移行し、ユーザにおける操作入力がいずれの操作入力でもないと判定した場合には、閲覧アプリケーションの終了処理を実行し(ステップS111)、本動作を終了させる。   At this time, if the data management control unit 121 determines that the operation input by the user is an instruction to change the designated display area, the data management control unit 121 proceeds to the process of step S107, and determines that the operation input by the user is the designation of the modified page. When the process proceeds to step S105 and it is determined that the operation input by the user is not any operation input, a termination process of the browsing application is executed (step S111), and this operation is terminated.

[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 analysis processing unit 123 detects the execution of the character segment analysis process in the process of step S103 described above (step S201), based on the flag information included in the document data stored in the ROM / RAM 103, The page layout of the document data is identified, and the line direction and line feed direction of the document in the document data are recognized (step S202).

次いで、文字配置解析処理部123は、カラーによって形成された文書画像をグレースケール画像に変換し、変換したグレースケール画像を、又は、白黒によって形成された文書画像を直接的に、予め定められた閾値に基づいて、2値化するとともに、2値化された文書画像におけるノイズを除去するノイズ補正を実行する(ステップS203)。   Next, the character arrangement analysis processing unit 123 converts the document image formed in color into a grayscale image, and the converted grayscale image or the document image formed in black and white is directly determined in advance. Based on the threshold value, binarization is performed, and noise correction is performed to remove noise in the binarized document image (step S203).

次いで、文字配置解析処理部123は、行検出処理及び文字区画検出処理を実行するために、認識した行方向及び行送り方向に対する2値化された各画素のそれぞれの画素値(黒画素、白画素又はその双方)をカウントする(ステップS204)。   Next, the character arrangement analysis processing unit 123 performs the line detection processing and the character segment detection processing, so that each pixel value (black pixel, white pixel) of each pixel binarized with respect to the recognized line direction and line feed direction is detected. (Pixel or both) is counted (step S204).

次いで、文字配置解析処理部123は、行方向の各画素における画素値のカウント数に基づいて、行方向における空白の画素ライン(空白ライン)を抽出し、領域幅(すなわち、行の高さ又は幅)を含む各行を検出する(ステップS205)。   Next, the character arrangement analysis processing unit 123 extracts a blank pixel line (blank line) in the row direction based on the count value of the pixel value in each pixel in the row direction, and the region width (that is, the row height or Each line including (width) is detected (step S205).

次いで、文字配置解析処理部123は、検出した行毎に、行送り方向の各画素における画素値のカウント数に基づいて、行送り方向における空白の画素ライン(空白ライン)及び文字を形成する文字形成ラインを抽出し、行毎の各文字区画を検出する(ステップS206)。   Next, the character arrangement analysis processing unit 123, for each detected line, based on the count value of the pixel value in each pixel in the line feed direction, a blank pixel line (blank line) in the line feed direction and the characters that form the character A formation line is extracted, and each character section for each line is detected (step S206).

次いで、文字配置解析処理部123は、補正処理用の前処理として、最大区画サイズ、平均区画サイズ、標準区画サイズ、平均行ピッチ、最大文字ピッチ、及び、基準文字ピッチを算出する(ステップS207)。   Next, the character arrangement analysis processing unit 123 calculates a maximum partition size, an average partition size, a standard partition size, an average line pitch, a maximum character pitch, and a reference character pitch as preprocessing for correction processing (step S207). .

次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、各行において、文字ピッチ条件を具備する隣接する2つの文字区画を統合する統合補正処理を実行する(ステップS208)。   Next, the character arrangement analysis processing unit 123 executes an integrated correction process for integrating two adjacent character sections having the character pitch condition in each row using the calculation result executed by the preprocessing (step S208). .

次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、各行において、行ピッチ条件を具備する行であるか否かを判定し、行ピッチ条件を具備する行に属する文字区画に、見出し文字としての属性(見出し属性情報)を設定する見出し解析処理を実行する(ステップS209)。   Next, the character arrangement analysis processing unit 123 determines whether each line has a line pitch condition using the calculation result executed by the preprocessing, and belongs to the line having the line pitch condition. A headline analysis process for setting an attribute (headline attribute information) as a headline character in the character section is executed (step S209).

次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、各行の先頭の文字区画について、先頭配置条件を具備するか否かを判定し、先頭配置条件を具備する先頭の文字区画に、字下げ文字としての属性(字下げ属性情報)を設定する字下げ解析処理を実行する(ステップS210)。   Next, the character arrangement analysis processing unit 123 determines whether or not the first character section of each line has the first arrangement condition by using the calculation result executed by the preprocessing, and the first arrangement having the first arrangement condition. An indentation analysis process for setting an attribute (indentation attribute information) as an indented character in the character section is executed (step S210).

次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、各行において、行ピッチ特定条件を具備するか否かを判定し、行ピッチ特定条件等を有する文字区画をルビ又はルビ対象文字として設定する(ステップS211)。   Next, the character arrangement analysis processing unit 123 determines whether or not each line has a line pitch specifying condition using the calculation result executed by the preprocessing, and determines a character section having the line pitch specifying condition or the like as a ruby. Alternatively, it is set as a ruby target character (step S211).

具体的には、文字配置解析処理部123は、行ピッチ特定条件を具備する各文字区画をルビとしての属性(ルビ属性情報)設定し、ルビと判定され文字区画が存在した場合にルビと判定された文字区画に対して所定の条件を有する文字区画をルビ対象文字としての属性(ルビ対象文字属性情報)を設定し、かつ、ルビに設定された文字区画にルビ対象文字として設定された文字区画を探索する探索位置を設定する。   Specifically, the character arrangement analysis processing unit 123 sets an attribute (ruby attribute information) as ruby for each character section having the line pitch specifying condition, and determines that it is ruby when it is determined to be ruby and there is a character section. Characters that have a predetermined condition for the specified character section are set as the ruby target character attribute (ruby target character attribute information), and the character set as the ruby target character in the character section set to ruby A search position for searching for a partition is set.

次いで、文字配置解析処理部123は、前処理によって実行された演算結果を用いて、見出し属性情報、字下げ属性情報、ルビ属性情報及びルビ対象属性情報が設定されていない各文字区画について、禁則条件を具備するか否かを判定し、禁則条件を有する文字区画に禁則文字としての属性(禁則文字属性情報)を設定する禁則文字解析処理を実行する(ステップS212)。   Next, the character arrangement analysis processing unit 123 uses the calculation result executed by the preprocessing, and forbids each character section for which heading attribute information, indentation attribute information, ruby attribute information, and ruby target attribute information are not set. It is determined whether or not the condition is satisfied, and forbidden character analysis processing for setting an attribute (forbidden character attribute information) as a forbidden character in the character section having the forbidden condition is executed (step S212).

最後に、文字配置解析処理部123は、文字区画毎に、上記各処理によって得られた文字区画の基準座標(具体的には矩形の四隅の座標)、先頭からの並び順情報、及び、見出し等の上記属性情報を含む文字区画データを生成してROM/RAM103に展開し(ステップS213)、本動作を終了させる。   Finally, the character arrangement analysis processing unit 123, for each character segment, the reference coordinates (specifically, the coordinates of the four corners of the rectangle) of the character segment obtained by the above processes, the arrangement order information from the head, and the heading The character section data including the attribute information such as the above is generated and expanded in the ROM / RAM 103 (step S213), and this operation is terminated.

[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 / RAM 103 is expanded.

また、本動作においては、文字区画を配置する際に、行方向に次の文字区画を配置する座標(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 placement processing unit 124 detects the execution of the partition placement processing in the processing of step S105 described above (step S300), the partition placement processing unit 124 determines the row direction from the region size of the designated display region set by the user or preset. The length information is acquired and each value used for the calculation of the subsequent process is initialized (step S301). Specifically, the partition arrangement processing unit 124 acquires the number of pixels in the row direction and the line feed direction to acquire the area size (Ax × Ay) of the designated display area, and the actual arrangement area (Bx × By). Set. At this time, the partition arrangement processing unit 124 initializes the length WD (L1) in the row direction, which is stored in the ROM / RAM 103 and used when calculating the remaining space of the designated display area.

次いで、区画配置処理部124は、該当する文書ページに属する文字区画の文字区画データをROM/RAM103から読み出して取得する(ステップS302)。具体的には、区画配置処理部124は、先頭の文書ページ又は指定表示領域が設定される際に指定表示領域の先頭に表示していた文字区画が属する文書ページを取得する。   Next, the section arrangement processing unit 124 reads out and acquires the character section data of the character sections belonging to the corresponding document page from the ROM / RAM 103 (step S302). Specifically, the section arrangement processing unit 124 acquires the document page to which the character section displayed at the head of the designated display area belongs when the head document page or the designated display area is set.

次いで、区画配置処理部124は、読み出した文書ページにおける該当する文字区画を、その属性情報とともに、読み出す(ステップS304)。具体的には、区画配置処理部124は、読み出した文書ページにおいて、文字配置解析処理によって得られた各文字区画の並び順に従って、先頭の文字区画、又は、既に当該文書ページについて本処理を実行している場合には、前回読み出した文字区画の次の文字区画を読み出す。   Next, the section arrangement processing unit 124 reads out the corresponding character section in the read document page together with its attribute information (step S304). Specifically, the section arrangement processing unit 124 executes this processing for the first character section or the document page already in accordance with the arrangement order of each character section obtained by the character arrangement analysis process in the read document page. If it is, the character section next to the character section read out last time is read out.

次いで、区画配置処理部124は、読み出した文字区画の属性情報に基づいて当該文字区画がルビを示す文字区画であるか否かを判定する(ステップS305)。具体的には、区画配置処理部124は、当該文字区画の属性情報としてルビ属性情報「mode=3」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画の属性情報がルビを示す文字区画であると判定した場合には、ステップS304の処理に戻り、ルビでない文字区画と判定した場合には、ステップS306の処理に移行する。   Next, the section arrangement processing unit 124 determines whether or not the character section is a character section indicating ruby based on the read character section attribute information (step S305). Specifically, the section arrangement processing unit 124 determines whether or not the attribute information of the character section has ruby attribute information “mode = 3”. At this time, if the section arrangement processing unit 124 determines that the read character section attribute information is a character section indicating ruby, the process returns to step S304, and if it is determined that the character section is not ruby. The process proceeds to step S306.

なお、本処理は、ルビと判定された文字区画を、ルビ以外の文字区画を配置した後に配置するための判定処理である。   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 arrangement processing unit 124 determines whether the character section is a character section belonging to the heading line based on the read character section attribute information (step S306). Specifically, the section arrangement processing unit 124 determines whether or not the headline attribute information “mode = 1” is included as the attribute information of the character section. At this time, when the section arrangement processing unit 124 determines that the read character section is a character section belonging to the heading line, the section arrangement processing unit 124 proceeds to the process of step S312 and determines that the character section does not belong to the heading line. In step S307, the process proceeds to step S307.

次いで、区画配置処理部124は、読み出した文字区画の属性情報に基づいて当該文字区画が字下げ文字を示す文字区画であるか否かを判定する(ステップS307)。具体的には、区画配置処理部124は、当該文字区画の属性情報として字下げ属性情報「mode=2」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画が字下げ文字であると判定した場合には、ステップS312の処理に移行し、字下げ文字でないと判定した場合には、ステップS308の処理に移行する。   Next, the section arrangement processing unit 124 determines whether or not the character section is a character section indicating an indented character based on the read character section attribute information (step S307). Specifically, the section arrangement processing unit 124 determines whether or not the indentation attribute information “mode = 2” is included as the attribute information of the character section. At this time, if the section arrangement processing unit 124 determines that the read character section is an indented character, the section arrangement processing unit 124 proceeds to the process of step S312. If it is determined that the character section is not an indented character, the section arrangement processing unit 124 proceeds to step S308. Transition to processing.

次いで、区画配置処理部124は、ステップS307の処理において読み出した文字区画が字下げ文字でないと判定した場合には、所定の演算を実行することによって、指定表示領域の該当する行において読み出した文字区画を配置する残存スペースがあるか否かを判定する(ステップS308)。具体的には、区画配置処理部124は、ROM/RAM103に記憶された行方向の長さWD(L1)に、読み出した文字区画の行方向の長さ(横組みの場合にはΔx及び縦組みの場合には、Δy)を加算し、その値がステップS302の処理において取得した実配置領域における行方向の長さ(横組みの場合には、Bx及び縦組みの場合には、By)より小さいか否かを判定する。   Next, when the section arrangement processing unit 124 determines that the character section read out in step S307 is not an indented character, the section arrangement processing unit 124 executes a predetermined calculation to read out the character read out in the corresponding line of the designated display area. It is determined whether or not there is a remaining space for arranging the sections (step S308). Specifically, the section arrangement processing unit 124 adds the length WD (L1) in the row direction stored in the ROM / RAM 103 to the length in the row direction of the read character section (Δx and vertical in the case of horizontal writing). In the case of a combination, Δy) is added, and the value is the length in the row direction in the actual arrangement area acquired in the processing of step S302 (Bx in the case of horizontal combination and By in the case of vertical combination). It is determined whether it is smaller.

また、このとき、区画配置処理部124は、指定表示領域の該当する行において読み出した文字区画を配置する残存スペースがあると判定した場合には、ステップS321の処理に移行し、読み出した文字区画を配置する残存スペースがないと判定した場合には、ステップS331の処理に移行する。   At this time, if the section arrangement processing unit 124 determines that there is a remaining space for arranging the read character section in the corresponding line of the designated display area, the process proceeds to the process of step S321, and the read character section When it is determined that there is no remaining space for placing the process, the process proceeds to step S331.

次いで、区画配置処理部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 arrangement processing unit 124 includes attribute information of the read character section. Based on this, it is determined whether or not the character section indicates a prohibited character (step S311).

具体的には、区画配置処理部124は、当該文字区画の属性情報として禁則文字属性情報「mode=5」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画が禁則文字でないと判定した場合には、ステップS312の処理に移行し、禁則文字であると判定した場合には、ステップS321の処理に移行する。   Specifically, the section arrangement processing unit 124 determines whether or not the prohibited character attribute information “mode = 5” is included as the attribute information of the character section. At this time, if the section arrangement processing unit 124 determines that the read character section is not a forbidden character, the section arrangement processing unit 124 proceeds to the process of step S312. If it is determined that the character section is a forbidden character, the section arrangement processing unit 124 proceeds to the process of step S321. Transition.

次いで、区画配置処理部124は、ステップS306の処理において読み出した文字区画が見出し行に属する文字区画であると判定した場合には、ステップS307の処理において読み出した文字区画が字下げ文字であると判定した場合には、又は、ステップS311の処理において読み出した文字区画が禁則文字であると判定した場合には、指定表示領域における次配置位置を改行し、行方向の長さWD(L1)を初期化し(ステップS312)、ステップS321の処理に移行する。具体的には、区画配置処理部124は、次配置位置に所定の行間値を加算して行送り方向の位置を決定しつつ、行方向の先頭位置に次配置位置を決定する。   Next, if the section arrangement processing unit 124 determines that the character section read in the process of step S306 is a character section belonging to the heading line, the character section read in the process of step S307 is an indented character. If it is determined, or if it is determined that the character section read out in the process of step S311 is a prohibited character, the next arrangement position in the designated display area is broken, and the length WD (L1) in the row direction is set. Initialization (step S312) and the process proceeds to step S321. Specifically, the partition arrangement processing unit 124 determines the next arrangement position at the head position in the row direction while adding a predetermined line spacing value to the next arrangement position to determine the position in the line feed direction.

次いで、区画配置処理部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 arrangement processing unit 124 reads the character section read in the process of step S312. Is determined to be a forbidden character, or when a line break is made in the processing of step S312 and the next arrangement position is determined at the head position in the row direction, the read character section is arranged at the next arrangement position. (Step S321).

次いで、区画配置処理部124は、行方向の次配置位置に読み出した文字区画の行方向の長さ(横組みの場合にはΔx及び縦組みの場合には、Δy)を加算し、行方向の次配置位置を更新する(ステップS322)。   Next, the partition arrangement processing unit 124 adds the length in the row direction (Δx in the case of horizontal composition and Δy in the case of vertical composition) of the character section read to the next arrangement position in the row direction, The next arrangement position is updated (step S322).

次いで、区画配置処理部124は、ルビを除き、ステップS302の処理によって読み出した文書データについて、全ての文字区画について既に区画配置処理を実行したか否かを判定する(ステップS331)。このとき、区画配置処理部124は、ルビを除き、全ての文字区画について既に区画配置処理を実行したと判定した場合には(すなわち、ルビ以外の文字区画を配置した判定した場合には)、ステップS401の処理移行し、ルビを除き、全ての文字区画について既に区画配置処理を実行していないと判定した場合には(すなわち、ルビ以外にも未だ区画配置処理を実行していない文字区画があると判定した場合には)、ステップS304の処理に戻る。   Next, the section arrangement processing unit 124 determines whether or not the section arrangement processing has already been executed for all the character sections with respect to the document data read by the process of step S302 except for ruby (step S331). At this time, if the partition placement processing unit 124 determines that the partition placement processing has already been executed for all character partitions except for ruby (that is, if it is determined that a character partition other than ruby has been placed), When the process proceeds to step S401 and it is determined that the partition placement processing has not been executed for all character partitions except for the ruby (that is, there is a character partition that has not yet been subjected to the partition placement processing other than ruby). If it is determined that there is, the process returns to step S304.

一方、区画配置処理部124は、ステップS331の処理において、ルビを除き、全ての文字区画について既に区画配置処理を実行したと判定した場合には、ROM/RAM103から該当する文書ページの先頭から該当する文字区画を再度読み出す(ステップS401)。   On the other hand, if the section arrangement processing unit 124 determines in the process of step S331 that the section arrangement processing has already been executed for all character sections except for ruby, the section arrangement processing unit 124 applies the corresponding document page from the top of the corresponding document page. The character section to be read is read again (step S401).

次いで、区画配置処理部124は、当該読み出した文字区画の属性情報に基づいてルビを示す文字区画であるか否かを判定する(ステップS402)。具体的には、区画配置処理部124は、当該文字区画の属性情報としてルビ属性情報「mode=3」を有しているか否かを判定する。このとき、区画配置処理部124は、当該読み出した文字区画の属性情報がルビを示す文字区画であると判定した場合には、ステップ403の処理に戻り、ルビでない文字区画と判定した場合には、ステップS401の処理に戻る。   Next, the section arrangement processing unit 124 determines whether or not the character section indicates ruby based on the read character section attribute information (step S402). Specifically, the section arrangement processing unit 124 determines whether or not the attribute information of the character section has ruby attribute information “mode = 3”. At this time, if the section arrangement processing unit 124 determines that the read character section attribute information is a character section indicating ruby, the process returns to step 403, and if it is determined that the character section is not ruby, The process returns to step S401.

次いで、区画配置処理部124は、属性情報に含まれるルビ対象文字を検索し、当該ルビ対象文字のルビ位置を算出し(ステップS403)、該当する位置に文字区画をルビとして配置する(ステップS404)。   Next, the section arrangement processing unit 124 searches for the ruby target character included in the attribute information, calculates the ruby position of the ruby target character (step S403), and arranges the character section as ruby at the corresponding position (step S404). ).

次いで、区画配置処理部124は、ルビを含め全ての文字区画について区画配置処理を実行したか否かを判定する(ステップS405)。このとき、区画配置処理部124は、ルビを含め全ての文字区画について区画配置処理を実行していないと判定した場合には、ステップS401の処理に戻り、ルビを含め全ての文字区画について区画配置処理を実行したと判定した場合には、ステップS402の処理に移行する。   Next, the section arrangement processing unit 124 determines whether or not the section arrangement processing has been performed for all character sections including ruby (step S405). At this time, if the partition placement processing unit 124 determines that the partition placement processing has not been executed for all the character partitions including the ruby, the processing returns to the process of step S401 and the partition placement for all the character partitions including the ruby is performed. If it is determined that the process has been executed, the process proceeds to step S402.

最後に、区画配置処理部124は、次の文書ページの有無を判定するとともに(ステップS406)、次の文書ページがあると判定した場合には、ステップS302の処理に移行し、次の文書ページがないと判定した場合には、本動作を終了させる。   Finally, the partition arrangement processing unit 124 determines whether or not there is a next document page (step S406). If it is determined that there is a next document page, the section arrangement processing unit 124 proceeds to the process of step S302, and the next document page. If it is determined that there is no, this operation is terminated.

[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 arrangement processing unit 124 arranges each character section in order to provide a document image with a plurality of pages (hereinafter referred to as “modified pages”) according to the set designated display area. It has become. For example, the section arrangement processing unit 124 can secure an area for arranging the character sections on the modified page when all the character sections of one page in the original document image cannot be arranged on one modified page. Each time it becomes impossible, one modified page is added, and character sections that are not yet arranged (hereinafter referred to as “unplaced character sections”) are arranged on the added modified pages according to the arrangement conditions.

特に、この場合において、区画配置処理部124は、図29に示すように、文書画像におけるmpページ(文書ページにおけるmpページ)の文字区画の配置の終了後に、改変ページ(以下、「継続中改変ページ」という。)に一以上の文字区画が配置可能な場合には、文書ページの(mp+1)ページにおける先頭の文字区画から順に、配置条件に従って継続中改変ページの未配置領域に配置し、npページ目の改変ページを生成し、継続中改変ページに未配置の文字区画によって(np+1)ページ目の改変ページを生成する。   In particular, in this case, as shown in FIG. 29, the section arrangement processing unit 124, after the arrangement of the character sections of the mp page in the document image (mp page in the document page) is finished, When one or more character sections can be arranged on the “page”)), the first character section in the (mp + 1) page of the document page is arranged in the unallocated area of the ongoing modification page in accordance with the arrangement condition, and np A modified page of the page is generated, and a modified page of the (np + 1) th page is generated by a character section that is not arranged on the ongoing modified page.

そして、画像データ生成部125は、ユーザによって設定された指定表示領域に基づく改変ページ毎に文書画像を表示するためのデータを生成する。   Then, the image data generation unit 125 generates data for displaying the document image for each modified page based on the designated display area set by the user.

以上、本実施形態の携帯用端末装置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 terminal device 100 ... Data storage part 101 ... Application storage part 102 ... Content data storage part 103 ... ROM / RAM
DESCRIPTION OF SYMBOLS 110 ... Communication control part 120 ... Application processing part 121 ... Data management control part 122 ... Designated display area setting part 123 ... Character arrangement | positioning analysis processing part 124 ... Section arrangement | positioning processing part 125 ... Image data generation part 140 ... Display control part 150 ... Display Unit 160 ... Operation unit 190 ... Terminal management control unit

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配列ライン毎に、各第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.
請求項1又は2に記載の表示制御装置において、
前記配置位置決定手段が、
前記検出された各文字区画のサイズ及び区画位置に基づいて予め定められた配置条件に従って、前記検出された文字区画を、前記設定された表示領域に配置する位置を決定する、表示制御装置。
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.
請求項1〜3のいずれか1項に記載の表示制御装置において、
配置条件には、前記文書における見出しと用いられる行を示す見出し行に属する文字区画を、当該見出し行に属する他の文字区画とともに、単一の行として前記設定された表示領域内に配置する条件を含み、
前記文字区画検出手段が、
前記統合された文字区画を含む各行の各文字区画の前記文書画像における区画位置に基づいて、行毎に、前記文書の行送り方向に対する隣接する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.
請求項1〜3のいずれか1項に記載の表示制御装置において、
配置条件には、所定の文字のルビとして検出された文字区画を、前記設定された表示領域内における前記ルビが付与されるルビ対象文字のルビの位置に配置する条件を含み、
前記文字区画検出手段が、
前記統合された文字区画を含む各行の各文字区画の前記文書画像における区画位置に基づいて、行毎に、前記文書の行送り方向に対する隣接する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.
請求項1〜3のいずれか1項に記載の表示制御装置において、
配置条件には、前記文書における段落の先頭文字と特定された文字区画を、前記設定された表示領域内における行の先頭であって字下げされる位置に配置する条件を含み、
前記文字区画検出手段が、
各行毎に、行の先頭に位置する文字区画の配置位置が、前記行方向の文字が記載される開始位置から、前記各文字区画のサイズに基づく先頭配置条件で定められる所定の距離以上離れている場合に、当該行の先頭の文字区画を文書の段落における先頭文字として特定し、
前記配置位置決定手段が、
前記先頭文字と特定された文字区画を前記配置条件に従って前記表示領域内に配置する、表示制御装置。
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〜3のいずれか1項に記載の表示制御装置において、
配置条件には、前記文書における禁則文字に該当する文字区画を、前記設定された表示領域内における所定の位置に配置する条件を含み、
前記文字区画検出手段が、
前記検出された各文字区画の行方向及び行送り方向のそれぞれにおいて、当該各文字区間における前記第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 .
請求項1〜7のいずれか1項に記載の表示制御装置において、
前記取得手段が、前記外部又は記憶手段から前記画像データを、前記画像化された文書のページ毎に取得し、
前記配置位置決定手段が、配置条件に従いつつ、各ページの先頭の文字に対応する文字区画を、前ページの最終文字に対応する文字区画の次の文字区画として、前記設定された表示領域に配置する位置を決定する、表示制御装置。
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〜8のいずれか1項に記載の表示制御装置において、
前記認識手段が、
各第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
JP2012241377A 2012-10-31 2012-10-31 Display control apparatus and program Active JP6152633B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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