JP2006129250A - Image processor - Google Patents

Image processor Download PDF

Info

Publication number
JP2006129250A
JP2006129250A JP2004316762A JP2004316762A JP2006129250A JP 2006129250 A JP2006129250 A JP 2006129250A JP 2004316762 A JP2004316762 A JP 2004316762A JP 2004316762 A JP2004316762 A JP 2004316762A JP 2006129250 A JP2006129250 A JP 2006129250A
Authority
JP
Japan
Prior art keywords
edge
data
image data
image
information
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.)
Granted
Application number
JP2004316762A
Other languages
Japanese (ja)
Other versions
JP2006129250A5 (en
JP4375199B2 (en
Inventor
Kunihiko Kobayashi
邦彦 小林
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2004316762A priority Critical patent/JP4375199B2/en
Publication of JP2006129250A publication Critical patent/JP2006129250A/en
Publication of JP2006129250A5 publication Critical patent/JP2006129250A5/ja
Application granted granted Critical
Publication of JP4375199B2 publication Critical patent/JP4375199B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To produce binary image data from document data at higher speed and with memory capacity less than that of the prior art. <P>SOLUTION: An image processor 10 describes image data 13 in an edge array form. A binary image producing unit 15 efficiently produces binary image data 17 in respective colors by performing processing of sorting edge body structures comprising the image data in accordance with color information, coordinates, attribute information and the like. The edge body structures are collected for each color and sorted so that the edge body structures in the same color become adjacent to each other, thereby specifying at high speed edge body structures to produce the binary image data 17. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、文書を構成する文字、グラフィクスおよびイメージなどの各種オブジェクトに対して画像処理を施すための技術に関する。   The present invention relates to a technique for performing image processing on various objects such as characters, graphics, and images constituting a document.

インターネットやLAN(Local Area Network)等のコンピュータネットワークが急速に普及しつつある。ユーザはコンピュータを用いて作成した文書データを電子メールに添付し、これをネットワーク経由で他のコンピュータに送信させる、といった利用の仕方が可能である。また、ユーザは文書データをネットワークに接続されたサーバコンピュータに保存させておき、このサーバコンピュータから必要に応じて他のコンピュータに文書データを送信させる、といったことも容易に実現することができる。   Computer networks such as the Internet and LAN (Local Area Network) are rapidly spreading. The user can attach the document data created using a computer to an e-mail and send it to another computer via a network. In addition, the user can easily realize storing document data in a server computer connected to the network and transmitting the document data from the server computer to another computer as necessary.

この種の文書データは、送信元のコンピュータにインストールされた文書作成ソフトウェア固有のコードによって表現されている。したがって、送信先のコンピュータは、その文書作成ソフトウェアと同一種類のソフトウェアを用意しておかないと、受け取った文書を表示したり編集したりすることができない。また、文書作成ソフトウェアの種類だけではなく、コンピュータのオペレーティングシステム(OS)の種類やバージョンなども統一しておかないと、作成者の意図した通りに文書が表示されない等の不具合が生じるおそれもある。よって、文書作成ソフトウェアだけではなく、その他のコンピュータ環境も全て統一して揃えておくことが望ましい。
さらに、近年では、PDA(Personal Digital Assistants)や携帯電話機等の携帯型情報端末が普及し、これらの端末でも文書を表示することができるように求められている。このようにソフトウェアやハードウェアが多種多様化している状況に鑑みると、あらゆるコンピュータや携帯型情報端末が、受け取った文書を表示・編集できるようなコンピュータ環境を常に装備しているとは限らないと考えられる。
This type of document data is represented by a code unique to the document creation software installed in the transmission source computer. Therefore, the destination computer cannot display or edit the received document unless software of the same type as the document creation software is prepared. In addition, not only the type of document creation software but also the type and version of the operating system (OS) of the computer must be standardized, there is a risk that a document may not be displayed as intended by the creator. . Therefore, it is desirable that not only the document creation software, but also all other computer environments are unified.
Furthermore, in recent years, portable information terminals such as PDAs (Personal Digital Assistants) and mobile phones have become widespread, and these terminals are required to be able to display documents. In view of the diversification of software and hardware in this way, not all computers and portable information terminals are always equipped with a computer environment that can display and edit received documents. Conceivable.

このような問題に対しては、作成された文書データを一般的に利用されている汎用の画像データ(例えばビットマップ形式)に変換してから他のコンピュータに送信する、という対策が考えられる。汎用の画像データによって文書が画像として表現されていれば、送信先のコンピュータが製品出荷時点で実装している一般的な画像処理ソフトウェアなどによって表示・編集することが可能だからである。ただし、ビットマップ形式等の画像データではそのデータサイズが非常に大きくなるのが普通であるから、例えばJPEG(Joint Photographic Experts Group)等の標準的な圧縮方式で圧縮しておかないと、コンピュータ間で送受信するには不都合がある。例えばJPEG方式で画像データを圧縮した場合、その画像データの高周波成分を切り捨てるので、写真などの自然画像に対しては圧縮率や画質の点で良い結果が得られる。ただし、文書を構成する要素(オブジェクト)は自然画像ばかりではなく、文字(テキスト)や線画・図形(グラフィクス)のようなものもある。これらのオブジェクトを一律にJPEG方式などの非可逆圧縮方式で圧縮すると、例えば文字領域の境界で画質劣化が発生し、文字が判読しづらくなる、といった問題が生じる。   For such a problem, it is conceivable that the created document data is converted into general-purpose image data (for example, bitmap format) that is generally used and then transmitted to another computer. This is because if the document is expressed as an image by general-purpose image data, it can be displayed and edited by general image processing software or the like installed at the time of product shipment by the destination computer. However, since the size of image data such as bitmap format is usually very large, it must be compressed with a standard compression method such as JPEG (Joint Photographic Experts Group). It is inconvenient to send and receive with. For example, when image data is compressed by the JPEG method, high-frequency components of the image data are discarded, so that good results can be obtained in terms of compression rate and image quality for natural images such as photographs. However, the elements (objects) constituting the document include not only natural images but also characters (text) and line drawings / graphics (graphics). When these objects are uniformly compressed by an irreversible compression method such as the JPEG method, there arises a problem that, for example, the image quality is deteriorated at the boundary of the character region, and the characters are difficult to read.

この問題を解決するための技術として、特許文献1に記載の技術がある。特許文献1においては、画像データ内のテキストやグラフィクス等のオブジェクト(ドローイングオブジェクト)とイメージ等のオブジェクト(イメージオブジェクト)を分離し、例えばドローイングオブジェクトに対しては可逆圧縮を施して2値画像を生成し、イメージオブジェクトに対しては非可逆圧縮を施して多値画像を生成するというように、それぞれのオブジェクトに対して異なる圧縮方式を適用している。このように画像データを生成することによって、テキストやグラフィクスを鮮明に再現しつつも高い圧縮率を確保することが可能となる。   As a technique for solving this problem, there is a technique described in Patent Document 1. In Patent Document 1, an object (drawing object) such as text or graphics in an image data is separated from an object (image object) such as an image, and for example, a binary image is generated by performing lossless compression on the drawing object. However, different compression methods are applied to each object, such as irreversible compression for image objects to generate a multi-valued image. By generating image data in this way, it is possible to ensure a high compression ratio while clearly reproducing text and graphics.

この特許文献1に記載の技術においては、複数の色によって表されたドローイングオブジェクトを表す2値画像データを生成しようとした場合には、それぞれの色単位で2値画像データを生成する必要がある。このような場合には、圧縮前の画像データの各ピクセルの色情報を逐一参照しなければならない。したがって、メモリ等の物理リソースを多く消費したり、処理時間が増大したりするといった負荷が生じる。この種の問題は、特に特許文献1に記載の技術に固有のものではなく、複数の色からなる画像を2値画像データで表現しようとした場合には従来から生じていた問題である。   In the technique described in Patent Document 1, when generating binary image data representing a drawing object represented by a plurality of colors, it is necessary to generate binary image data for each color unit. . In such a case, the color information of each pixel of the image data before compression must be referred to one by one. Therefore, a load such as consuming a lot of physical resources such as a memory or increasing a processing time occurs. This type of problem is not particular to the technique described in Patent Document 1, and is a problem that has conventionally occurred when an image composed of a plurality of colors is to be expressed by binary image data.

特開2003−189112号公報JP 2003-189112 A

本発明は上述の問題に鑑みてなされたものであり、その目的は、従来よりも高速かつ少ないメモリ容量で文書データから2値画像データを生成するための技術を提供することにある。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a technique for generating binary image data from document data at a higher speed and with a smaller memory capacity than before.

上述した目的を達成するために、本発明は、複数種類のオブジェクトによって構成された文書データを記憶する記憶部と、記憶した前記文書データを、当該文書データの各スキャンライン上に存在するオブジェクトの色および位置を表すエッジ構造体によって構成された画像データに変換する解析処理部と、前記解析処理部によって得られた画像データを保存するエッジ保存部と、前記エッジ保存部に保存されている画像データを構成するエッジ構造体のうち、同一色のオブジェクトを表すエッジ構造体どうしが互いに隣り合うように並び替えるエッジソート部と、並び替えられたエッジ構造体のうち、同一色のオブジェクトを表すエッジ構造体を当該エッジ構造体によって表わされる位置に基づいて再配置し、再配置したエッジ構造体によって表される同一色のオブジェクトを2値で表現した2値画像データを生成して出力するデータ出力部とを備える画像処理装置を提供する。
この画像処理装置によれば、エッジ構造体によって構成された画像データを用いて2値画像データを出力するため、ビットマップ形式の画像データを参照する場合のように、各ピクセルの色情報を逐一読み取る必要がない。そのため、従来よりも高速に、かつ少ないメモリ容量で2値画像データを生成することが可能となる。
In order to achieve the above-described object, the present invention provides a storage unit that stores document data composed of a plurality of types of objects, and stores the stored document data for objects existing on each scan line of the document data. An analysis processing unit that converts image data composed of edge structures representing colors and positions, an edge storage unit that stores image data obtained by the analysis processing unit, and an image stored in the edge storage unit Of the edge structures that make up the data, the edge sort unit that sorts the edge structures that represent objects of the same color so that they are adjacent to each other, and the edge that represents the object of the same color among the sorted edge structures The structure is rearranged based on the position represented by the edge structure, and the rearranged edge structure To provide an image processing apparatus and a data output unit for generating and outputting the binary image data expressed in the object of the same color 2 value represented Te.
According to this image processing apparatus, since binary image data is output using image data configured by an edge structure, color information of each pixel is sequentially stored as in the case of referring to bitmap image data. There is no need to read. Therefore, binary image data can be generated at a higher speed and with a smaller memory capacity than in the past.

また、本発明の画像処理装置は、より好適な態様として、前記エッジ構造体は、オブジェクトの色および位置に加えてオブジェクトの種類を表しており、前記エッジソート部は、前記エッジ保存部に保存されている画像データを構成するエッジ構造体のうち、同一種類かつ同一色のオブジェクトを表すエッジ構造体どうしが隣り合うように並び替え、前記データ出力部は、前記エッジソート部によって並び替えられたエッジ構造体のうち、同一種類で同一色のオブジェクトを表すエッジ構造体を当該エッジ構造体が表す位置に基づいて再配置し、再配置したエッジ構造体によって表されるオブジェクトを2値で表現した2値画像データを生成して出力する。
このようにすれば、同一種類のオブジェクトの2値画像データを色毎に生成することもできるため、同一色であってもオブジェクトが異なれば、それぞれを別の2値画像データして生成することが可能となる。これにより、ユーザが所望する2値画像データがより確実に得られるようになり、ユーザの意図を忠実に反映した2値画像データを得ることが可能となる。
In a more preferred aspect of the image processing apparatus of the present invention, the edge structure represents an object type in addition to the color and position of the object, and the edge sorting unit is stored in the edge storage unit. The edge structures representing the same kind and the same color of the edge structures constituting the image data are rearranged so that they are adjacent to each other, and the data output unit is rearranged by the edge sort unit Among the edge structures, the edge structures representing the same type and the same color object are rearranged based on the position represented by the edge structure, and the object represented by the rearranged edge structure is expressed in binary. Binary image data is generated and output.
In this way, binary image data of the same type of object can be generated for each color. Therefore, even if the object is the same color, each binary image data is generated as different binary image data. Is possible. Thereby, the binary image data desired by the user can be obtained more reliably, and the binary image data reflecting the user's intention faithfully can be obtained.

本発明の画像処理装置は、文書データから2値画像データを生成する部分に特徴を有している。本発明の画像処理装置は、画像データをエッジ配列形式で記述し、画像データを構成するエッジ構造体を色情報や座標、あるいは属性情報によってソートする処理を行うことで、各色の2値画像データを効率よく生成することを可能としている。エッジ構造体を色毎にまとめ、同一色のエッジ構造体が互いに隣り合うようにソートすることで、2値画像データを生成すべきエッジ構造体の特定を高速に行うことが可能となる。以下においては、本発明を適用した画像処理装置の一例を示し、本発明の実施形態について詳しく説明する。   The image processing apparatus according to the present invention is characterized in that binary image data is generated from document data. The image processing apparatus of the present invention describes image data in an edge array format, and performs a process of sorting edge structures constituting the image data according to color information, coordinates, or attribute information, whereby binary image data of each color Can be generated efficiently. By organizing the edge structures for each color and sorting the edge structures of the same color so as to be adjacent to each other, it is possible to specify the edge structures for which binary image data should be generated at high speed. In the following, an example of an image processing apparatus to which the present invention is applied will be shown, and embodiments of the present invention will be described in detail.

(1)装置構成
図1は、本実施形態に係る画像処理装置10のハードウェア構成を表すブロック図である。画像処理装置10は、例えばパーソナルコンピュータであり、制御部1と、記憶部2と、入出力I/F3と、表示部4と、操作部5とを備えている。制御部1は、CPU(Central Processing Unit)等の演算装置と、ROM(Read Only Memory)やRAM(Random Access Memory)等の各種メモリとを備えている。記憶部2は、例えばハードディスク等の大容量の不揮発性記憶装置であり、制御部1が後述する機能を実現するための手順が記述された制御プログラムPRG1を記憶している。入出力I/F3は、図示しないネットワークに接続されており、そのネットワークに接続されたコンピュータやプリンタなどの外部機器とデータの授受を行う。表示部4は、例えば液晶ディスプレイであり、制御部1によって供給されるデータに基づいて画像を表示する。操作部5は、例えばキーボードやマウスなどであり、操作者の操作内容に応じた信号を制御部1に供給する。
(1) Device Configuration FIG. 1 is a block diagram illustrating a hardware configuration of an image processing device 10 according to the present embodiment. The image processing apparatus 10 is a personal computer, for example, and includes a control unit 1, a storage unit 2, an input / output I / F 3, a display unit 4, and an operation unit 5. The control unit 1 includes an arithmetic device such as a CPU (Central Processing Unit) and various memories such as a ROM (Read Only Memory) and a RAM (Random Access Memory). The storage unit 2 is a large-capacity nonvolatile storage device such as a hard disk, for example, and stores a control program PRG1 describing a procedure for the control unit 1 to realize functions to be described later. The input / output I / F 3 is connected to a network (not shown), and exchanges data with external devices such as computers and printers connected to the network. The display unit 4 is a liquid crystal display, for example, and displays an image based on data supplied by the control unit 1. The operation unit 5 is, for example, a keyboard or a mouse, and supplies a signal corresponding to the operation content of the operator to the control unit 1.

図2は、この画像処理装置10の機能構成を示した機能ブロック図である。なお、この機能ブロック図においては、図中の矢印は画像処理装置10が実行する処理によって発生するデータや各種の制御情報の流れを表している。
制御部1は、制御プログラムPRG1を実行することにより、解析処理部12と、多値画像生成部14と、2値画像生成部15という機能を実現する。これらの各部は互いに協働して後述する動作を行う。
FIG. 2 is a functional block diagram showing a functional configuration of the image processing apparatus 10. In this functional block diagram, the arrows in the figure represent the flow of data and various control information generated by processing executed by the image processing apparatus 10.
The control unit 1 executes functions of the analysis processing unit 12, the multi-value image generation unit 14, and the binary image generation unit 15 by executing the control program PRG1. These units cooperate with each other to perform operations described later.

図2に示されているように、解析処理部12には、文書データ11が入力される。ここで、文書データ11は、例えばユーザが文書作成ソフトウェア等のアプリケーションプログラムを用いて作成したデータであり、このアプリケーションプログラムに定義された固有のコードによって記述されている。文章データ11は、画像処理装置10の記憶部2にあらかじめ記憶されているものであってもよいし、外部のコンピュータ等から入出力I/F3を介して画像処理装置10に入力されるものであってもよい。文章データ11を外部から取得する場合にも、取得した文書データ11は解析処理部12はこの文書データ11に基づき、画像データ13を生成する。解析処理部12の機能は、プリンタ等の画像出力装置においては、ラスタデータ、またはラスタデータと等価な(相互変換可能な)データを生成する処理部分に相当する。解析処理部12により生成された画像データ13は多値画像生成部14と2値画像生成部15に供給され、それぞれにおいて多値画像データ16と2値画像データ17として出力される。   As shown in FIG. 2, document data 11 is input to the analysis processing unit 12. Here, the document data 11 is data created by a user using an application program such as document creation software, for example, and is described by a unique code defined in the application program. The text data 11 may be stored in advance in the storage unit 2 of the image processing apparatus 10 or input to the image processing apparatus 10 from an external computer or the like via the input / output I / F 3. There may be. Even when the text data 11 is acquired from the outside, the analysis processing unit 12 generates image data 13 based on the acquired document data 11 based on the document data 11. The function of the analysis processing unit 12 corresponds to a processing part that generates raster data or data equivalent to the raster data (interchangeable) in an image output device such as a printer. The image data 13 generated by the analysis processing unit 12 is supplied to a multi-value image generation unit 14 and a binary image generation unit 15 and is output as multi-value image data 16 and binary image data 17 respectively.

このように、画像処理装置10は、入力された文書データ11から多値画像データ16と2値画像データ17とを生成する処理を行う。以下においては、この処理における画像処理装置10の各部の機能について詳細に説明するが、その前に本実施形態における文書データ11,中間データとしての画像データ13および最終的に生成される多値画像データ16,2値画像データ17のデータ構造について説明する。   As described above, the image processing apparatus 10 performs processing for generating the multi-value image data 16 and the binary image data 17 from the input document data 11. In the following, the function of each part of the image processing apparatus 10 in this processing will be described in detail. Before that, the document data 11 in the present embodiment, the image data 13 as intermediate data, and the finally generated multi-value image The data structure of the data 16 and the binary image data 17 will be described.

(2)各種データのデータ構造
図3は、本実施形態における文書データ11と、この文書データ11から生成される多値画像データ16と2値画像データ17とを概念的に示した図である。文書データ11には、文字が描画されている「テキスト」領域と、図形(ここでは星形とする)が描画されている「グラフィクス」領域と、写真等の自然画像が描画されている「イメージ」領域とが含まれている。また、「テキスト」および「グラフィクス」領域には、「黒」で描画された領域と「赤」で描画された領域とがある。この文書データ11の各画素は、例えばR(レッド)G(グリーン)B(ブルー)各色3バイト(24ビット)の色値(以下、これを「RGB値」という)を有する。
多値画像データ16は、文書データ11中の「イメージ」領域を表す画像情報そのもの(多値画像情報)と、この多値画像情報の位置情報とサイズ情報とを含んでいる。多値画像データ16における画像情報は文書データ11と同様に、各画素がRGB各色3バイトのRGB値を有している。位置情報は、例えば文書データ11の左上端を原点としたときの画像情報のある1点(例えば左上端)の座標を示したものである。本実施形態においては、図2における主走査方向(横方向)をx座標とし、副走査方向(縦方向)をy座標とする。サイズ情報は、多値画像情報のx方向およびy方向の長さを示したものである。
(2) Data Structure of Various Data FIG. 3 is a diagram conceptually showing the document data 11 and the multi-value image data 16 and the binary image data 17 generated from the document data 11 in this embodiment. . The document data 11 includes a “text” area in which characters are drawn, a “graphics” area in which graphics (here, stars) are drawn, and an “image” in which natural images such as photographs are drawn. ”Area. The “text” and “graphics” areas include an area drawn in “black” and an area drawn in “red”. Each pixel of the document data 11 has, for example, a color value of 3 bytes (24 bits) for each color of R (red), G (green), and B (blue) (hereinafter referred to as “RGB value”).
The multi-value image data 16 includes image information itself (multi-value image information) representing the “image” area in the document data 11, and position information and size information of the multi-value image information. As with the document data 11, the image information in the multi-value image data 16 has RGB values of 3 bytes for each RGB color. The position information indicates, for example, the coordinates of one point (for example, the upper left end) of the image information when the upper left end of the document data 11 is the origin. In the present embodiment, the main scanning direction (horizontal direction) in FIG. 2 is the x coordinate, and the sub scanning direction (vertical direction) is the y coordinate. The size information indicates the lengths of the multi-value image information in the x direction and the y direction.

一方、2値画像データ17は、文書データ11中の「テキスト」領域を表す画像情報と「グラフィクス」領域を表す画像情報とにより生成される。2値画像データ17は、それぞれの色毎に1つのデータとして生成される。すなわちここでは、「黒」で描画された「テキスト」および「グラフィクス」領域による2値画像データ17kと、「赤」で描画された「テキスト」および「グラフィクス」領域による2値画像データ17rとが生成される。そのため、2値画像データ17における画像情報(2値画像情報)は、各画素中にオブジェクトを含むか否かを示した1ビットの情報となっており、2値画像情報自体には色を識別するための情報が含まれていない。そこで、2値画像データ17には、2値画像情報の色を識別するために例えばRGB値等の色情報が含まれている。さらに、それぞれの2値画像データ17は、多値画像データ16と同様の位置情報およびサイズ情報を有している。
なお、多値画像データ16と2値画像データ17は上述のように生成されるものとは限らず、例えば多値画像データ16が文書データ11中の「グラフィクス」領域を表す画像情報により生成されてもよい。
On the other hand, the binary image data 17 is generated by image information representing a “text” region and image information representing a “graphics” region in the document data 11. The binary image data 17 is generated as one data for each color. That is, here, the binary image data 17k based on the “text” and “graphics” regions drawn in “black” and the binary image data 17r based on the “text” and “graphics” regions drawn in “red” are included. Generated. Therefore, the image information (binary image information) in the binary image data 17 is 1-bit information indicating whether or not an object is included in each pixel, and the binary image information itself identifies the color. Information to do is not included. Therefore, the binary image data 17 includes color information such as RGB values in order to identify the color of the binary image information. Further, each binary image data 17 has the same position information and size information as the multi-value image data 16.
The multi-value image data 16 and the binary image data 17 are not necessarily generated as described above. For example, the multi-value image data 16 is generated by image information representing a “graphics” area in the document data 11. May be.

続いて、画像データ13について詳細に説明する。
画像データ13には、ラスタデータと等価な複数のエッジデータと、それぞれのエッジデータの属性を示すタグ情報(属性情報)と、それぞれのエッジデータの色情報と、オブジェクトの形状を規定する外接矩形情報とが含まれる。
エッジデータとは、エッジ配列形式によって記述されたデータであり、いわゆるランレングス圧縮と同様の形式で示されたデータである。ここで「エッジ」とは、例えばRAM(画像メモリ)に展開された画像に定義されるxy座標系において、x軸(主走査方向)に平行な1本のスキャンライン上に存在する線分画像のことである。そして、「エッジ配列形式」とは、1スキャンライン上に存在する複数のエッジの列によってスキャンライン全体の画像を表現する形式を意味している。画像をエッジ配列形式で記述すると、ラスタデータと可逆的に変換可能でありながら、多くの場合に画像のデータ容量を小さくすることが可能となる。エッジデータは、特に、一定の面積が同一色で描画された領域(いわゆる「ベタ領域」)を多く含むような画像を効率よく圧縮できる。
タグ情報とは、上述のエッジデータに含まれるそれぞれのエッジの属性を示す情報である。ここで「属性」とは、それぞれのエッジにより示されるオブジェクトの種類のことである。本実施形態においては、タグ情報は「テキスト」領域を表す「テキスト」オブジェクトと、「グラフィクス」領域を表す「グラフィクス」オブジェクトと、「イメージ」領域を表す「イメージ」オブジェクトと、その他の領域、すなわち画像が描画されない背景領域を表す「バックグラウンド」オブジェクトの4種類であるとする。なお、実際の画像データ13においては、例えば「テキスト」オブジェクトのタグ情報は「1」、「グラフィクス」オブジェクトのタグ情報は「2」、「イメージ」オブジェクトのタグ情報は「3」、「バックグラウンド」オブジェクトのタグ情報は「0」というように、それぞれのオブジェクトに対して一意的な番号を割り当てて、これをタグ情報としている。
色情報とは、上述のエッジデータに含まれるそれぞれのエッジが描画されるべき色を示す情報であり、例えばRGB値によって示される。
Next, the image data 13 will be described in detail.
The image data 13 includes a plurality of edge data equivalent to raster data, tag information (attribute information) indicating attributes of each edge data, color information of each edge data, and a circumscribed rectangle that defines the shape of the object Information.
The edge data is data described in an edge arrangement format, and is data indicated in a format similar to so-called run length compression. Here, the “edge” is, for example, a line segment image existing on one scan line parallel to the x axis (main scanning direction) in the xy coordinate system defined in the image developed in the RAM (image memory). That is. The “edge arrangement format” means a format in which an image of the entire scan line is expressed by a plurality of edge rows existing on one scan line. When an image is described in an edge array format, it is possible to reduce the data capacity of the image in many cases while being reversibly converted to raster data. In particular, the edge data can efficiently compress an image including many areas (so-called “solid areas”) in which a certain area is drawn with the same color.
The tag information is information indicating the attribute of each edge included in the above edge data. Here, “attribute” refers to the type of object indicated by each edge. In this embodiment, the tag information includes a “text” object representing a “text” region, a “graphics” object representing a “graphics” region, an “image” object representing an “image” region, and other regions, Assume that there are four types of “background” objects representing background areas in which images are not drawn. In the actual image data 13, for example, the tag information of the “text” object is “1”, the tag information of the “graphics” object is “2”, the tag information of the “image” object is “3”, “background” As the tag information of “object”, a unique number is assigned to each object, such as “0”, and this is used as tag information.
The color information is information indicating the color in which each edge included in the above-described edge data is to be drawn, and is indicated by, for example, an RGB value.

なお、「グラフィクス」オブジェクトについては、オブジェクトの形状や色、色変化の規則性や連続性を解析し、より細かな属性を指定することも可能である。例えば、図形の輪郭や罫線のような微小な幅を有するオブジェクトを「細線」、一定の領域が同一色で描画されたオブジェクトを「ベタ領域」、一定の領域の色がある方向に連続的に変化していくオブジェクトを「グラデーション」、一定の形状を有する2以上の微小領域が規則的なパターンで描画されたオブジェクトを「パターン」に指定するという具合である。そこで、説明の便宜上、以下においては、「グラフィクス」オブジェクトがさらに「ベタ領域」と「グラデーション」の属性を有するオブジェクトに細分化されるものとし、前者を「ベタ領域」オブジェクト、後者を「グラデーション」オブジェクトということがある。この場合、例えば「ベタ領域」オブジェクトには「20」,「グラデーション」オブジェクトには「21」というように、それぞれのオブジェクトに対して異なるタグ情報が割り当てられる。また、このとき、「ベタ領域」オブジェクトは2値画像データ17の生成対象となり、「グラデーション」オブジェクトは多値画像データ16の生成対象となるものとする。   As for the “graphics” object, it is possible to analyze the shape and color of the object, the regularity and continuity of the color change, and specify more detailed attributes. For example, an object with a minute width such as a contour or ruled line of a figure is a “thin line”, an object in which a certain area is drawn in the same color is a “solid area”, and the color of a certain area is continuously in a certain direction. For example, the changing object is designated as “gradation”, and the object in which two or more minute areas having a certain shape are drawn in a regular pattern is designated as “pattern”. Therefore, for convenience of explanation, in the following, it is assumed that the “graphics” object is further subdivided into objects having “solid region” and “gradation” attributes, the former being a “solid region” object and the latter being “gradation”. Sometimes called an object. In this case, different tag information is assigned to each object, for example, “20” for the “solid region” object and “21” for the “gradation” object. At this time, the “solid region” object is a generation target of the binary image data 17, and the “gradation” object is a generation target of the multi-value image data 16.

画像データ13は、複数のスキャンラインを構成するエッジデータの集合として表される。そして、それぞれのエッジデータは、複数のエッジ画像の集合として表される。1つのエッジ画像を構成するデータの集合のことを、以下では「エッジ構造体」という。
図4は、このエッジ構造体のフォーマットを示した図である。エッジ構造体は、始点座標SXと、終点座標EXと、タグ情報TGと、色情報CLとを含んでいる。本実施形態においては、1つのスキャンライン上に例えば「文字」や「グラフィクス」などの複数のオブジェクトが存在している場合、オブジェクトの色もしくはオブジェクトの種類が変わる毎にエッジ構造体が1つ生成されるようになっている。
The image data 13 is represented as a set of edge data constituting a plurality of scan lines. Each edge data is represented as a set of a plurality of edge images. A set of data constituting one edge image is hereinafter referred to as an “edge structure”.
FIG. 4 is a diagram showing the format of this edge structure. The edge structure includes start point coordinates SX, end point coordinates EX, tag information TG, and color information CL. In this embodiment, when a plurality of objects such as “characters” and “graphics” exist on one scan line, one edge structure is generated every time the color of the object or the type of the object changes. It has come to be.

また、図5は、本実施形態における画像データ13のデータ構造を概念的に示した図であり、あるy座標Y1およびY2で示されるスキャンラインのエッジデータE1およびE2を例示している。また、同図の画像データ13は、例えばRAM(画像メモリ)に展開される画像データを示したイメージ図であり、領域T,G,I,Bはそれぞれ「テキスト」、「グラフィクス」、「イメージ」、「バックグラウンド」の各オブジェクトを意味している。なお、この画像データ13は、主走査方向に200ピクセルの幅を有するものであるとする。   FIG. 5 is a diagram conceptually showing the data structure of the image data 13 in this embodiment, and illustrates edge data E1 and E2 of a scan line indicated by certain y coordinates Y1 and Y2. Further, the image data 13 in the figure is an image diagram showing image data developed in, for example, a RAM (image memory), and regions T, G, I, and B are “text”, “graphics”, and “image”, respectively. , "Background" means each object. The image data 13 is assumed to have a width of 200 pixels in the main scanning direction.

エッジデータE1は、4つのエッジ構造体es1,es2,es3,es4を有する。始点座標SX=0、終点座標EX=150、タグ情報TG=0(バックグラウンド)、色情報CL=「未定」というエッジ構造体es1は、スキャンラインY1におけるバックグラウンドオブジェクトの一部(領域Tの左側)を構成している。また、始点座標SX=151、終点座標EX=165、タグ情報TG=1(文字)、色情報CL=「黒」というエッジ構造体es2は、スキャンラインY1におけるテキストオブジェクト(領域T)を構成している。また、始点座標SX=166、終点座標EX=170、タグ情報TG=2(グラフィクス)、色情報CL=「黒」というエッジ構造体es3は、スキャンラインY1におけるグラフィクスオブジェクト(領域Tの右側)を構成している。そして、始点座標SX=171、終点座標EX=199、タグ情報TG=0(バックグラウンド)、色情報CL=「未定」というエッジ構造体es4は、スキャンラインY1におけるバックグラウンドオブジェクトの一部(領域Gの右側)を構成している。これと同様に、エッジデータE2は、3つのエッジ構造体es5,es6,es7を有しており、それぞれがスキャンラインY2におけるバックグラウンドオブジェクトとイメージオブジェクトを構成している。
なお、バックグラウンドオブジェクトの色情報CLは「未定」となっているが、これは任意の色を指定してよいという意味である。例えばバックグラウンドオブジェクトの色情報CLは「白」であってもよいし、特に定義しなくともよい。
The edge data E1 has four edge structures es1, es2, es3, and es4. The edge structure es1 having the start point coordinate SX = 0, the end point coordinate EX = 150, the tag information TG = 0 (background), and the color information CL = “undecided” is a part of the background object in the scan line Y1 (the region T On the left). The edge structure es2 having the start point coordinate SX = 151, the end point coordinate EX = 165, the tag information TG = 1 (character), and the color information CL = “black” constitutes a text object (region T) in the scan line Y1. ing. The edge structure es3 having the start point coordinate SX = 166, the end point coordinate EX = 170, the tag information TG = 2 (graphics), and the color information CL = “black” is a graphics object (right side of the region T) in the scan line Y1. It is composed. The edge structure es4 having the start point coordinates SX = 171, the end point coordinates EX = 199, the tag information TG = 0 (background), and the color information CL = “undecided” is a part (area) of the background object in the scan line Y1. G on the right side). Similarly, the edge data E2 includes three edge structures es5, es6, and es7, and each forms a background object and an image object in the scan line Y2.
The color information CL of the background object is “undecided”, which means that an arbitrary color may be designated. For example, the color information CL of the background object may be “white” or not particularly defined.

これらのエッジ構造体es1とes2,es2とes3,es3とes4,es5とes6,es6とes7は、互いに隣接する位置関係にあるので、隣接するエッジ構造体の始点座標SXと終点座標EXとは連続することになる。エッジ構造体が「テキスト」や「グラフィクス」オブジェクトである場合は、エッジ構造体es1〜es5,es7のように、1つのエッジに着色される色は1つである。
これに対し、エッジ構造体es6のように、エッジによって構成されるオブジェクトがイメージの場合、エッジデータの色情報CLとしてメモリアドレスが記述されている。このメモリアドレスによって指定された記憶領域には、イメージの実データ、すなわち画像情報が格納されている。このように、オブジェクトが文字やグラフィクスであるか、あるいはイメージであるかによって(つまりタグ情報TGの値によって)、色情報CLをどのように解釈すべきかが異なっている。
Since these edge structures es1, es2, es2, es3, es3, es4, es6, es6, and es7 are adjacent to each other, the start point coordinates SX and end point coordinates EX of the adjacent edge structures are It will be continuous. When the edge structure is a “text” or “graphics” object, one edge is colored as in the edge structures es1 to es5 and es7.
On the other hand, when the object constituted by the edge is an image like the edge structure es6, the memory address is described as the color information CL of the edge data. In the storage area designated by the memory address, actual image data, that is, image information is stored. As described above, how the color information CL should be interpreted differs depending on whether the object is a character, a graphic, or an image (that is, depending on the value of the tag information TG).

次に、画像データ13に含まれる外接矩形情報について説明する。
外接矩形とは、オブジェクトの外縁に接する矩形を意味しており、外接矩形情報とはその外接矩形の位置とサイズとを表す情報である。本実施形態では、オブジェクトの種類毎に、生成される外接矩形情報の最大数を設定することができる。また、オブジェクトの種類毎に、生成すべき外接矩形の数を変えることもできる。例えば、あるオブジェクトについてだけ4つの外接矩形を生成し、その他のオブジェクトについては1つの外接矩形を生成する、といった具合である。このような外接矩形の数は、ユーザが操作部5を用いて画像処理装置10に入力することによって指定することもできるし、あらかじめ記憶部2に記憶されていてもよい。
Next, circumscribed rectangle information included in the image data 13 will be described.
The circumscribed rectangle means a rectangle that touches the outer edge of the object, and the circumscribed rectangle information is information indicating the position and size of the circumscribed rectangle. In the present embodiment, the maximum number of circumscribed rectangle information generated can be set for each type of object. Further, the number of circumscribed rectangles to be generated can be changed for each type of object. For example, four circumscribed rectangles are generated only for a certain object, and one circumscribed rectangle is generated for other objects. The number of circumscribed rectangles can be designated by the user by inputting to the image processing apparatus 10 using the operation unit 5 or may be stored in the storage unit 2 in advance.

図6は、図3に示したような文書データ11に対して生成される外接矩形情報を概念的に示した図である。ここでは、オブジェクトの種類毎に外接矩形を1つずつ生成するように設定された場合を示しており、図中の点線で示される矩形C1,C2,C3がそれぞれ「テキスト」、「グラフィクス」、「イメージ」の各種オブジェクトの外接矩形である。外接矩形情報は解析処理部12により生成されるが、この外接矩形情報の生成方法の詳細は後述する。   FIG. 6 is a diagram conceptually showing circumscribed rectangle information generated for the document data 11 as shown in FIG. Here, a case is shown in which each circumscribed rectangle is set to be generated for each type of object, and rectangles C1, C2, and C3 indicated by dotted lines in the figure are “text”, “graphics”, It is a circumscribed rectangle of various objects of “image”. The circumscribed rectangle information is generated by the analysis processing unit 12, and details of the method of generating the circumscribed rectangle information will be described later.

(3)解析処理部12の説明
次に、図7の機能ブロック図を参照しながら、本実施形態の解析処理部12の機能構成および動作について説明する。解析処理部12は、例えば本発明者による特開2002−334341号公報に開示された技術を用いて入力データの内容を解析し、画像データ13を生成するものである。図7に示す矢印は、解析処理部12の処理によって発生するデータや各種の制御情報の流れを表している。入力データ解析部120は、文書データ11の内容を解析し、このデータを「テキスト」、「グラフィクス」および「イメージ」などのオブジェクト種類毎に分離し、これらをそれぞれテキスト処理部121、グラフィクス処理部122およびイメージ処理部123に供給する。この入力データ解析部120による解析結果に基づいて、分離されたデータにはタグ情報が付加される。例えば、テキスト処理部121に供給されたデータに対しては、このデータが「テキスト」オブジェクトであることを示すタグ情報(すなわち「1」)が付加される。
(3) Description of Analysis Processing Unit 12 Next, the functional configuration and operation of the analysis processing unit 12 of the present embodiment will be described with reference to the functional block diagram of FIG. The analysis processing unit 12 analyzes the content of the input data using, for example, the technique disclosed in Japanese Patent Laid-Open No. 2002-334341 by the present inventor, and generates image data 13. The arrows shown in FIG. 7 represent the flow of data and various control information generated by the processing of the analysis processing unit 12. The input data analysis unit 120 analyzes the contents of the document data 11 and separates the data into object types such as “text”, “graphics”, and “image”, which are separated into a text processing unit 121 and a graphics processing unit, respectively. 122 and the image processing unit 123. Based on the analysis result by the input data analysis unit 120, tag information is added to the separated data. For example, tag information (that is, “1”) indicating that the data is a “text” object is added to the data supplied to the text processing unit 121.

テキスト処理部121、グラフィクス処理部122およびイメージ処理部123は、それぞれのオブジェクトの種類に応じた処理を行う。例えば、テキスト処理部121は、供給されてくるデータと、あらかじめ記憶部2に記憶されているフォントのアウトラインデータとに基づいて、画像処理装置10から出力される2値画像データ17の座標空間に適合した文字の輪郭データを生成するなどの処理を行う。また、グラフィクス処理部122は、供給されてくるデータを、2値画像データ17の座標空間に適合したデータに変換する等の処理を行う。また、イメージ処理部123は、供給されてくるデータに対し、イメージの拡大・縮小や色空間を調整する処理や、イメージの輪郭形状を表現するための輪郭データを発生させるなどの処理を行う。   The text processing unit 121, the graphics processing unit 122, and the image processing unit 123 perform processing according to the type of each object. For example, the text processing unit 121 sets the binary image data 17 output from the image processing apparatus 10 in the coordinate space based on the supplied data and font outline data stored in the storage unit 2 in advance. Perform processing such as generating contour data for matched characters. In addition, the graphics processing unit 122 performs processing such as converting supplied data into data suitable for the coordinate space of the binary image data 17. In addition, the image processing unit 123 performs processes such as image enlargement / reduction and color space adjustment on the supplied data, and generation of contour data for expressing the contour shape of the image.

中間コード生成部124は、テキスト処理部121、グラフィクス処理部122およびイメージ処理部123によって処理されたデータを、ラスタ形式で展開するのに適した中間コードに変換する。中間コード生成部124によって生成された中間コードは記憶部2に逐次蓄積される。中間コードが1ページ分蓄積されると、レンダリング処理部126は、この中間コードから上述したエッジデータを1スキャンライン分ずつ生成していく。   The intermediate code generation unit 124 converts the data processed by the text processing unit 121, the graphics processing unit 122, and the image processing unit 123 into an intermediate code suitable for development in a raster format. The intermediate code generated by the intermediate code generation unit 124 is sequentially stored in the storage unit 2. When the intermediate code for one page is accumulated, the rendering processing unit 126 generates the edge data described above from the intermediate code for each scan line.

中間コード生成部124によって中間コードが生成されている間、もしくは中間コードが生成された後に、外接矩形生成部125は前述した外接矩形情報を生成する。例えば、タグ情報が「テキスト」、「グラフィクス」、「イメージ」といったオブジェクトの種類を表す場合、外接矩形生成部125は次のようにして外接矩形情報を生成する。なお、以下においては、それぞれのオブジェクト種類について1つずつの外接矩形情報を生成するように指定されている場合を例に説明する。   The circumscribed rectangle generating unit 125 generates the circumscribed rectangle information described above while the intermediate code is generated by the intermediate code generating unit 124 or after the intermediate code is generated. For example, when the tag information represents the type of an object such as “text”, “graphics”, and “image”, the circumscribed rectangle generation unit 125 generates circumscribed rectangle information as follows. In the following description, an example in which one piece of circumscribed rectangle information is specified for each object type will be described.

図8は、一例として星形のグラフィクスの外接矩形情報を生成する過程を示した図である。外接矩形生成部125は、1つの外接矩形について1つの描画フラグをあらかじめ用意しておく。この描画フラグは、記憶部2の適当な記憶領域に記憶されているものであり、その初期値は「0(OFF)」であるとする。よって、図8(A)の初期状態では、描画フラグの値は「0(OFF)」である。そして、外接矩形生成部125は、ページの上端から下端方向へとスキャンライン単位で順次走査していき、オブジェクトが検出された場合には、描画フラグの値を「1(ON)」に変更する。なお、図8(A)に示す初期状態では、外接矩形生成部125は、例えばページの印刷可能領域以外の領域等の、適当な領域に外接矩形を設定しておく。   FIG. 8 is a diagram showing a process of generating circumscribed rectangle information of star-shaped graphics as an example. The circumscribed rectangle generation unit 125 prepares one drawing flag for one circumscribed rectangle in advance. This drawing flag is stored in an appropriate storage area of the storage unit 2 and its initial value is “0 (OFF)”. Therefore, in the initial state of FIG. 8A, the value of the drawing flag is “0 (OFF)”. Then, the circumscribed rectangle generation unit 125 sequentially scans in units of scan lines from the upper end to the lower end of the page. When an object is detected, the value of the drawing flag is changed to “1 (ON)”. . In the initial state shown in FIG. 8A, the circumscribed rectangle generating unit 125 sets a circumscribed rectangle in an appropriate area such as an area other than the printable area of the page.

続いて、図8(B)に示すように、そのページ内ではじめて処理対象とすべき星形形状のグラフィクスオブジェクトが検出された場合、外接矩形生成部125は、そのオブジェクトの外縁に接する外接矩形を形成し、その外接矩形における対角線上の2頂点の座標値を含む外接矩形情報を生成する。ここでは、外接矩形生成部125は、図8(B)のページ左上端部を原点Oとし、原点Oに最も近い頂点h1と最も遠い頂点h2とを含む外接矩形情報を生成し、これを記憶する。この2つの頂点h1,h2の座標値によって、外接矩形の位置とサイズとが表されることになる。そして、外接矩形生成部125は、描画フラグを「0(OFF)」から「1(ON)」へと変更する。   Next, as shown in FIG. 8B, when a star-shaped graphics object to be processed is detected for the first time in the page, the circumscribed rectangle generating unit 125 makes a circumscribed rectangle that touches the outer edge of the object. And circumscribing rectangle information including the coordinate values of the two vertices on the diagonal in the circumscribing rectangle is generated. Here, the circumscribed rectangle generating unit 125 generates circumscribed rectangle information including the vertex h1 closest to the origin O and the furthest vertex h2 as the origin O at the upper left corner of the page in FIG. To do. The position and size of the circumscribed rectangle are represented by the coordinate values of the two vertices h1 and h2. Then, the circumscribed rectangle generation unit 125 changes the drawing flag from “0 (OFF)” to “1 (ON)”.

さらに処理が進んで、図8(C)に示すように、そのページ中で2つ目のオブジェクトが検出された場合を想定する。このとき外接矩形生成部125は、描画フラグが既に「1(ON)」に設定されているので、外接矩形を新たに生成するのではなく、既に生成している外接矩形を拡張する処理を行う。すなわち、外接矩形生成部125は、既に生成されている外接矩形情報に含まれる2つの座標値と、新たに発生したオブジェクトの外縁に接する外接矩形の座標値(黒い星印形状のグラフィクスに外接する矩形)の2つの頂点座標を比較し、これら2つのオブジェクトの双方を内包するような外接矩形を形成する。そして、外接矩形生成部125は、このようにして得られた外接矩形の2頂点(h1,h3)の座標値を含む外接矩形情報を生成して記憶する。以降、3つ目のグラフィクスオブジェクトが検出された場合も同様にして、外接矩形生成部125は3つ全てのオブジェクトを包含する1つの外接矩形を生成する。   Assume that the processing further proceeds and a second object is detected in the page as shown in FIG. 8C. At this time, since the drawing flag has already been set to “1 (ON)”, the circumscribed rectangle generation unit 125 performs a process of expanding the circumscribed rectangle that has already been generated, instead of newly generating the circumscribed rectangle. . That is, the circumscribed rectangle generation unit 125 circumscribes the two coordinate values included in the already generated circumscribed rectangle information and the coordinate values of the circumscribed rectangle that touches the outer edge of the newly generated object (circumscribes the black star-shaped graphics). (Rectangular) two vertex coordinates are compared, and a circumscribed rectangle that encloses both of these two objects is formed. Then, the circumscribed rectangle generating unit 125 generates and stores circumscribed rectangle information including the coordinate values of the two vertices (h1, h3) of the circumscribed rectangle obtained in this way. Thereafter, similarly when the third graphics object is detected, the circumscribed rectangle generating unit 125 generates one circumscribed rectangle including all three objects.

次に、オブジェクトの種類毎に、2つ以上の外接矩形情報を生成する場合について、図9を参照しつつ説明する。ここでは一例として、1つのオブジェクト種類について最大4つの外接矩形情報を生成する場合について説明する。まず、外接矩形生成部125は、図9(A)に示すようにページの全領域を4つの部分領域に等分する。次に、外接矩形生成部125は、各々の部分領域において、図8(A),(B),(C)を用いて説明したのと同様の方法で外接矩形を生成する。これは、4等分された部分領域のそれぞれを1ページ(つまり合計4ページ)とし、各ページに対して上述した外接矩形生成処理を行うことに等しい。この場合、描画フラグも部分領域の数だけ用意される。この処理によって、図9(B)に示すような4つの外接矩形が生成される。   Next, a case where two or more circumscribed rectangle information is generated for each type of object will be described with reference to FIG. Here, as an example, a case where a maximum of four circumscribed rectangle information is generated for one object type will be described. First, the circumscribed rectangle generation unit 125 equally divides the entire area of the page into four partial areas as shown in FIG. Next, the circumscribed rectangle generation unit 125 generates a circumscribed rectangle in each partial region by the same method as described with reference to FIGS. 8 (A), (B), and (C). This is equivalent to performing the circumscribed rectangle generation process described above on each page, with each of the partial areas divided into four equals one page (that is, a total of four pages). In this case, as many drawing flags as the number of partial areas are prepared. By this processing, four circumscribed rectangles as shown in FIG. 9B are generated.

この後、外接矩形生成部125は、それぞれの部分領域に含まれる外接矩形のうち、隣接する部分領域を跨いで互いに接し合う外接矩形を包含するような外接矩形を生成する。これを「外接矩形の結合」という。図9(C)の例では、外接矩形C11と外接矩形C12とが結合されて外接矩形C10が生成され、外接矩形C13と外接矩形C14とが結合されて外接矩形C20が生成される。このように、1つのオブジェクトの種類について最大N個の外接矩形を生成する場合、外接矩形生成部125は、まず最初に1ページ分の全領域をN個の部分領域に分割してから、それぞれの領域において外接矩形を生成し、最後に隣接する外接矩形どうしを結合する。
なお、図9に示した状態とは異なり、それぞれの部分領域に含まれる外接矩形が互いに接しない場合には、上述した結合処理は行われない。このとき、それぞれの部分領域に1つの外接矩形が生成されれば、ページ全体の外接矩形の数は4個となる。
Thereafter, the circumscribed rectangle generation unit 125 generates a circumscribed rectangle that includes circumscribed rectangles that are in contact with each other across adjacent partial areas, among the circumscribed rectangles included in each partial area. This is called “joining of circumscribed rectangles”. In the example of FIG. 9C, the circumscribed rectangle C11 and the circumscribed rectangle C12 are combined to generate the circumscribed rectangle C10, and the circumscribed rectangle C13 and the circumscribed rectangle C14 are combined to generate the circumscribed rectangle C20. In this way, when generating a maximum of N circumscribed rectangles for one object type, the circumscribed rectangle generating unit 125 first divides the entire area for one page into N partial areas, A circumscribed rectangle is generated in the area of, and finally adjacent circumscribed rectangles are joined.
Note that, unlike the state shown in FIG. 9, when the circumscribed rectangles included in the respective partial areas do not contact each other, the above-described combining process is not performed. At this time, if one circumscribed rectangle is generated in each partial area, the number of circumscribed rectangles in the entire page is four.

以上がグラフィクスについての外接矩形生成処理の一例である。外接矩形生成部125は、イメージや文字といったその他のオブジェクトについても、上記と同様な処理によって外接矩形情報を生成することができる。そして、外接矩形生成部125によって生成された外接矩形情報と、レンダリング処理部126によって生成されたラスタデータと、入力データ解析部120によって生成されたタグ情報とが合わせられて、画像データ13が生成される。この画像データ13は、解析処理部12から多値画像生成部14および2値画像生成部15に供給される。   The above is an example of a circumscribed rectangle generation process for graphics. The circumscribed rectangle generation unit 125 can generate circumscribed rectangle information for other objects such as images and characters by the same processing as described above. Then, the circumscribed rectangle information generated by the circumscribed rectangle generating unit 125, the raster data generated by the rendering processing unit 126, and the tag information generated by the input data analyzing unit 120 are combined to generate the image data 13. Is done. The image data 13 is supplied from the analysis processing unit 12 to the multi-value image generation unit 14 and the binary image generation unit 15.

(4)多値画像生成部14の説明
次に、本実施形態の多値画像生成部14の動作について説明する。上述したように、多値画像生成部14は、多値画像情報、位置情報およびサイズ情報を含んだ多値画像データ16を生成する。まず、多値画像生成部14は、ページ単位の多値画像データ16の生成に際して、画像データ13から多値画像データ16の生成対象となるオブジェクトに属するタグ情報と外接矩形情報とを取得する。ここで、多値画像データ16の生成対象となるオブジェクトは「イメージ」オブジェクトと「グラデーション」オブジェクトであるとする。これらのデータを用いて、多値画像生成部14は多値画像データ16の位置情報とサイズ情報とを算出する。
(4) Description of Multilevel Image Generation Unit 14 Next, the operation of the multilevel image generation unit 14 of the present embodiment will be described. As described above, the multi-value image generation unit 14 generates multi-value image data 16 including multi-value image information, position information, and size information. First, the multi-value image generation unit 14 acquires tag information and circumscribed rectangle information belonging to an object to be generated of the multi-value image data 16 from the image data 13 when generating the multi-value image data 16 in page units. Here, it is assumed that the objects for which the multi-value image data 16 is generated are an “image” object and a “gradation” object. Using these data, the multi-value image generation unit 14 calculates position information and size information of the multi-value image data 16.

図10は、多値画像生成部14が位置情報とサイズ情報とを算出する過程を概念的に示した図である。例えば、画像データ13から多値画像データ16の生成対象として「イメージ」オブジェクトと「グラデーション」オブジェクトを示すタグ情報が取得された場合、多値画像生成部14はそれぞれのオブジェクトの外接矩形を特定する。このとき図10(A)に示すように、複数の外接矩形が重畳する領域が存在する場合には、多値画像生成部14はこれらの重畳する外接矩形を内包するような外接矩形を新たに定義する。この処理は上述した「外接矩形の結合」と同様の要領で行われる。図10(B)は、この処理が施された結果生成される外接矩形を示しており、図10(A)では4つ(Cg1,Cg2,Ci1,Ci2)だった外接矩形が2つ(C1,C2)となっている。そして多値画像生成部14は、これら2つの外接矩形C1,C2について位置情報とサイズ情報とを再び算出し、これらの外接矩形内に含まれるエッジデータを解析した上で、これを多値画像情報であるラスタデータに変換する。
以上のようにして、多値画像生成部14は多値画像データ16の生成対象となるオブジェクトから多値画像情報、位置情報およびサイズ情報を求め、これを多値画像データ16として出力する。
FIG. 10 is a diagram conceptually illustrating a process in which the multi-value image generation unit 14 calculates position information and size information. For example, when tag information indicating an “image” object and a “gradation” object is acquired as the generation target of the multi-value image data 16 from the image data 13, the multi-value image generation unit 14 specifies the circumscribed rectangle of each object. . At this time, as shown in FIG. 10A, if there is a region where a plurality of circumscribed rectangles overlap, the multi-value image generation unit 14 newly creates a circumscribed rectangle that includes these circumscribed rectangles. Define. This process is performed in the same manner as the above-described “joining rectangles”. FIG. 10B shows circumscribed rectangles generated as a result of this processing. In FIG. 10A, there are two circumscribed rectangles (C1, Cg2, Ci1, Ci2) (C1). , C2). Then, the multi-value image generation unit 14 recalculates the position information and the size information for these two circumscribed rectangles C1 and C2, analyzes the edge data contained in these circumscribed rectangles, and uses this to calculate the multi-value image. Convert to raster data, which is information.
As described above, the multi-value image generation unit 14 obtains multi-value image information, position information, and size information from the object for which the multi-value image data 16 is to be generated, and outputs this as multi-value image data 16.

(5)2値画像生成部15の説明
続いて、本実施形態の2値画像生成部15の構成と動作について説明する。上述の図2に示したように、2値画像生成部15は、それぞれの色毎に1つの2値画像データ17を生成する。この2値画像データ17は、1ビットの2値画像情報と、この2値画像情報の色情報、位置情報およびサイズ情報とを含んでいる。つまり、図3のように、「黒」と「赤」の「テキスト」オブジェクトおよび「グラフィクス」オブジェクト(ここでは「ベタ領域」とする)が存在する場合には、2値画像生成部15は少なくとも2つ以上の2値画像データ17を生成する。
(5) Description of Binary Image Generation Unit 15 Next, the configuration and operation of the binary image generation unit 15 of the present embodiment will be described. As shown in FIG. 2 described above, the binary image generation unit 15 generates one binary image data 17 for each color. The binary image data 17 includes 1-bit binary image information and color information, position information, and size information of the binary image information. That is, as shown in FIG. 3, when “black” and “red” “text” objects and “graphics” objects (here, “solid regions”) exist, the binary image generation unit 15 at least Two or more binary image data 17 are generated.

図11は、2値画像生成部15の機能構成を示した機能ブロック図である。また、図12は、2値画像生成部15によって2値画像データ17が生成される画像データ13(2値画像データ17となるオブジェクトのみを表示し、多値画像データ16となるオブジェクトの表示を省略している)を概念的に示した図である。以下においては、図11に示した構成のもとで、2値画像生成部15が図12に示した画像データ13から2値画像データ17を生成する過程を説明する。なお、図12に示されているように、以下においては、画像データ13を10×7ピクセルのデータとして説明する。
図12の画像データ13は、「黒」のテキストオブジェクトTx1と、「青」のテキストオブジェクトTx2と、「赤」のグラフィクスオブジェクトGr1と、「黒」のグラフィクスオブジェクトGr2と、「黒」のグラフィクスオブジェクトGr3とを含んでいる。また、これらのオブジェクト以外の領域は、すべてバックグラウンドオブジェクトとなっている。バックグラウンドオブジェクトの色情報は「白」とする。
FIG. 11 is a functional block diagram showing a functional configuration of the binary image generation unit 15. Further, FIG. 12 shows image data 13 in which binary image data 17 is generated by the binary image generation unit 15 (only the object that becomes the binary image data 17 is displayed, and the object that becomes the multi-value image data 16 is displayed. (Not shown) conceptually. In the following, a process in which the binary image generation unit 15 generates the binary image data 17 from the image data 13 shown in FIG. 12 under the configuration shown in FIG. 11 will be described. As shown in FIG. 12, hereinafter, the image data 13 will be described as 10 × 7 pixel data.
The image data 13 in FIG. 12 includes a “black” text object Tx1, a “blue” text object Tx2, a “red” graphics object Gr1, a “black” graphics object Gr2, and a “black” graphics object. Gr3. All areas other than these objects are background objects. The color information of the background object is “white”.

ここで、図13は、2値画像生成部15が図12に示した画像データ13から2値画像データ17を生成する過程を説明するための図である。また、図14は、図13におけるエッジ構造体のフォーマットを示しており、図13のエッジ構造体が(左から)色情報CL,タグ情報TG,始点座標SX,終点座標EXを示していることを意味している。
ページ単位の2値画像データ17の生成に際して、はじめに2値画像生成部15のエッジ保存部150は、画像データ13からエッジデータを取得し、これを例えばRAMに記憶して保存する。図12に示した画像データ13が入力された場合には、エッジデータは図13(A)のように記憶される。例えば、y=0のスキャンラインのエッジデータは、SX=0,EX=9のバックグラウンドオブジェクト(B)であるエッジ構造体により構成されている。また、y=1のスキャンラインのエッジデータは、SX=0,EX=0のバックグラウンドオブジェクト(B)であるエッジ構造体と、SX=1,EX=3のグラフィクスオブジェクト(G)であるエッジ構造体と、SX=4,EX=6のバックグラウンドオブジェクト(B)であるエッジ構造体と、SX=7,EX=7のテキストオブジェクト(T)であるエッジ構造体と、SX=8,EX=9のバックグラウンドオブジェクト(B)であるエッジ構造体とにより構成されている。
続いてエッジ保存部150は、2値画像データ17の生成対象となるオブジェクトに属するエッジ構造体を特定し、2値画像データ17の生成対象とならないエッジ構造体については削除する。この処理は、例えば図12に示した画像データ13に対して行う場合であれば、バックグラウンドオブジェクトを示すタグ情報を有するエッジ構造体を削除する処理である。これを示したのが図13(B)である。エッジ保存部150がこれらの処理を行う処理単位は、例えばページ単位であってもよいし、所定の1ないし複数のスキャンライン毎であってもよい。
Here, FIG. 13 is a diagram for explaining a process in which the binary image generation unit 15 generates the binary image data 17 from the image data 13 shown in FIG. 14 shows the format of the edge structure in FIG. 13. The edge structure in FIG. 13 shows color information CL, tag information TG, start point coordinates SX, and end point coordinates EX (from the left). Means.
When generating the binary image data 17 in page units, the edge storage unit 150 of the binary image generation unit 15 first acquires edge data from the image data 13 and stores it in, for example, a RAM. When the image data 13 shown in FIG. 12 is input, the edge data is stored as shown in FIG. For example, the edge data of the scan line with y = 0 is composed of an edge structure which is a background object (B) with SX = 0 and EX = 9. The edge data of the scan line with y = 1 includes an edge structure which is a background object (B) with SX = 0 and EX = 0 and an edge with a graphics object (G) with SX = 1 and EX = 3. An edge structure that is a background object (B) of SX = 4, EX = 6, an edge structure that is a text object (T) of SX = 7, EX = 7, and SX = 8, EX = 9 background object (B).
Subsequently, the edge storage unit 150 identifies an edge structure that belongs to the object that is the generation target of the binary image data 17 and deletes the edge structure that is not the generation target of the binary image data 17. For example, if this processing is performed on the image data 13 shown in FIG. 12, the edge structure having tag information indicating the background object is deleted. This is shown in FIG. The processing unit in which the edge storage unit 150 performs these processes may be, for example, a page unit, or may be for each predetermined one or a plurality of scan lines.

図13(B)に示したエッジデータに対して、続いてエッジソート部151がソート(並び替え)処理を行う。ここでは、各エッジ構造体の色情報CLをソートキーとしてソート処理を行う。色情報CLのソート順は任意であるが、例えば色情報CLのRGB値の小さな色から大きな色へとソートするのが好適である。同一の色情報を有するエッジ構造体に対しては、エッジソート部151は始点座標SXを参照して、例えば始点座標SXの小さなエッジ構造体から順に並べる。このソート処理を具体的に説明すると、次のようになる。すなわち、それぞれのエッジ構造体の色情報CLがNバイトのデータで表現され、始点座標がMバイトのデータで表現されている場合、これらを連結した(N+M)バイトの数値の大小を比較してソートする。この処理結果の例を示したものが、図13(C)である。同図を参照すると、同一色のエッジ構造体どうしがまとまり、互いに隣り合うように並んでいることが理解できる。また、同図においては、(N+M)バイトの数値が小さいデータ構造体から順にソートされており、各スキャンラインにおいては「黒」、「青」、「赤」の順にソートされている。   Subsequently, the edge sort unit 151 performs sort (rearrangement) processing on the edge data shown in FIG. Here, the sort processing is performed using the color information CL of each edge structure as a sort key. Although the sort order of the color information CL is arbitrary, for example, it is preferable to sort from a color with a small RGB value of the color information CL to a large color. For edge structures having the same color information, the edge sorting unit 151 refers to the start point coordinates SX and arranges them in order from, for example, the edge structures having the smallest start point coordinates SX. This sort processing will be specifically described as follows. That is, when the color information CL of each edge structure is expressed by N-byte data and the start point coordinate is expressed by M-byte data, the numerical values of (N + M) bytes obtained by connecting these are compared. Sort. FIG. 13C shows an example of the processing result. Referring to the figure, it can be understood that edge structures of the same color are grouped and arranged adjacent to each other. In the figure, the data structures are sorted in ascending order of numerical values of (N + M) bytes, and in each scan line, they are sorted in the order of “black”, “blue”, and “red”.

続いて、データ出力部152は、図13(C)に示したエッジ構造体を色毎に出力する。具体的には、データ出力部152はy=0から順にエッジ構造体の走査(スキャン)を行い、最初に検出したエッジ構造体と同じ色情報CLを有するエッジ構造体を順次特定していく。図13(C)においては、最初に検出されるエッジ構造体はy=1,SX=1,EX=3のグラフィクスオブジェクトであり、その色情報CLは「黒」であるから、データ出力部152は「黒」の色情報CLを有するエッジ構造体を順次検出して特定する。すなわち、データ出力部152は、y=1,SX=1,EX=3のグラフィクスオブジェクト(G)、y=1,SX=7,EX=7のテキストオブジェクト(T)、y=2,SX=3,EX=3のグラフィクスオブジェクト(G)、y=2,SX=7,EX=7のテキストオブジェクト(T)、y=4,SX=3,EX=6のグラフィクスオブジェクト(G)、y=5,SX=3,EX=6のグラフィクスオブジェクト(G)という順に6個のエッジ構造体を特定し、これらをまとめて出力する。これらのエッジ構造体の画像情報(2値画像情報)と、色情報、位置情報およびサイズ情報とにより、「黒」で描画すべき2値画像データは構成されており、このときデータ出力部152はこの「黒」で描画すべき2値画像データを出力することとなる。エッジ構造体はエッジソート部151により並び替えられているが、2値画像データに含まれている位置情報を参照することで、データ出力部152はそれぞれの2値画像情報を適切な位置に再配置することが可能となっている。   Subsequently, the data output unit 152 outputs the edge structure shown in FIG. 13C for each color. Specifically, the data output unit 152 scans the edge structures sequentially from y = 0, and sequentially specifies edge structures having the same color information CL as the edge structure detected first. In FIG. 13C, since the edge structure detected first is a graphics object with y = 1, SX = 1, and EX = 3, and its color information CL is “black”, the data output unit 152 Sequentially detects and specifies edge structures having color information CL of “black”. That is, the data output unit 152 displays a graphics object (G) with y = 1, SX = 1, EX = 3, a text object (T) with y = 1, SX = 7, EX = 7, y = 2, SX = 3, EX = 3 graphics object (G), y = 2, SX = 7, EX = 7 text object (T), y = 4, SX = 3, EX = 6 graphics object (G), y = Five edge structures are specified in the order of graphics objects (G) of 5, SX = 3 and EX = 6, and these are output together. The image information (binary image information) of these edge structures, the color information, the position information, and the size information constitute binary image data to be drawn in “black”. At this time, the data output unit 152 Will output binary image data to be drawn in this "black". The edge structures are rearranged by the edge sort unit 151, but by referring to the position information included in the binary image data, the data output unit 152 restores each binary image information to an appropriate position. It is possible to arrange.

ここでいう「再配置」とは、データ出力部152が、検出した複数のエッジ構造体(以下、これを「エッジ構造体群」という)から2値画像の位置とサイズとを決定する処理のことである。この処理には、さまざまな手法が考えられる。例えば、検出したエッジ構造体をメモリ等の別の記憶領域に一旦コピーしつつ、個々のエッジ毎に2値画像の矩形(以下、これを「イメージ矩形」という)を決定してゆく方法がある。図13(C)を例に説明すると、この場合、最初のエッジ構造体、すなわちy=1,SX=1,EX=3のグラフィクスオブジェクト(G)をコピーした時点でのイメージ矩形は、左上端の座標が(x,y)=(1,1)、右下端の座標が(x,y)=(3,1)の矩形となる。次に、y=1,SX=7,EX=7のテキストオブジェクト(T)のエッジ構造体をコピーした時点では、イメージ矩形は左上端の座標が(x,y)=(1,1)、右下端の座標が(x,y)=(7,1)となる。以下、同様の要領で6個のエッジ構造体の全てについて計算すると、左上端の座標が(x,y)=(1,1)、右下端の座標が(x,y)=(7,5)となる。したがって、生成される2値画像は、左上(x,y)=(1,1)の位置から、幅6画素、高さ5画素となる。この方法は、イメージ矩形を決定した後に、コピーしておいたエッジ構造体群を実際の2値画像に変換するものである。
また、別の例としては、例えば図13(C)のエッジデータにおいて、データ出力部152が「黒」の色情報CLを有するエッジ構造体の検出を2回行う手法が挙げられる。この場合、1回目の検出ではイメージ矩形の決定を行い、2回目の検出で実際にデータの出力を行う。この方法では、2回目の処理を効率よく行うために、エッジの読み出し位置をメモリ等の別の記憶領域に記憶することもできる。すなわち、図13(C)では、「黒」の色情報CLを有するエッジ構造体の始まる位置として、y=1は1番目のエッジ、y=2は1番目のエッジ、y=3はエッジなし、y=4は1番目のエッジ、y=5は1番目のエッジ、という情報を記述したテーブルを作成しておき、2回目の読み出しでは、このテーブルを参照して、テーブルに示された位置から読み出すことでデータを取得するものである。
この他にも、エッジデータから2値画像を生成するにあたり、2値画像の位置とサイズを決定する手法にはさまざまなものが考えられる。すなわち、本発明においては、2値画像の位置とサイズを決定する手法は限定されるものではない。また、本発明においては、2値画像領域は、対象とするエッジ構造体群を含む最小面積の矩形に限定されるものではなく、例えば、後段の各種の画像処理のために、周囲にある程度の余白を持たせた画像として生成してもよい。
Here, “rearrangement” refers to processing in which the data output unit 152 determines the position and size of a binary image from a plurality of detected edge structures (hereinafter referred to as “edge structure group”). That is. Various methods are conceivable for this processing. For example, there is a method of determining a binary image rectangle (hereinafter referred to as “image rectangle”) for each edge while temporarily copying the detected edge structure to another storage area such as a memory. . 13C will be described as an example. In this case, the image rectangle when the first edge structure, that is, the graphics object (G) with y = 1, SX = 1, and EX = 3 is copied is the upper left corner. The coordinates of (x, y) = (1, 1) and the coordinates of the lower right corner are (x, y) = (3, 1). Next, when the edge structure of the text object (T) with y = 1, SX = 7, and EX = 7 is copied, the coordinates of the upper left corner of the image rectangle are (x, y) = (1, 1), The coordinates of the lower right corner are (x, y) = (7, 1). Hereinafter, when all the six edge structures are calculated in the same manner, the coordinates of the upper left corner are (x, y) = (1, 1), and the coordinates of the lower right corner are (x, y) = (7, 5 ) Therefore, the generated binary image has a width of 6 pixels and a height of 5 pixels from the position of the upper left (x, y) = (1, 1). In this method, after the image rectangle is determined, the copied edge structure group is converted into an actual binary image.
As another example, for example, in the edge data of FIG. 13C, there is a method in which the data output unit 152 detects the edge structure having the “black” color information CL twice. In this case, the image rectangle is determined in the first detection, and the data is actually output in the second detection. In this method, in order to efficiently perform the second process, the edge reading position can be stored in another storage area such as a memory. That is, in FIG. 13C, as the position where the edge structure having the color information CL of “black” starts, y = 1 is the first edge, y = 2 is the first edge, and y = 3 is no edge. , Y = 4 is the first edge, and y = 5 is the first edge. A table describing the information is created, and in the second reading, this table is referred to and the position indicated in the table is created. The data is acquired by reading from.
There are various other methods for determining the position and size of a binary image when generating a binary image from edge data. That is, in the present invention, the method for determining the position and size of the binary image is not limited. In the present invention, the binary image region is not limited to a rectangle with the minimum area including the target edge structure group. For example, a certain amount of surroundings is used for various image processing in the subsequent stage. It may be generated as an image with a margin.

なお、上述したように、データ出力部152が色情報CLの小さいエッジ構造体から順にソートを行っているのであれば、それぞれのスキャンラインの走査に際してデータ出力部152は、特定対象とは異なる色情報CLのエッジ構造体がスキャンされた時点でそのスキャンラインの走査を終了し、次のスキャンラインの走査に開始してもよい。これにより、読み取る必要のないエッジ構造体を読み飛ばすことが可能となり、2値画像データ17の出力時間を短縮し、処理を効率化することができる。   As described above, if the data output unit 152 performs sorting in order from the edge structure with the smallest color information CL, the data output unit 152 has a different color from the specific target when scanning each scan line. When the edge structure of the information CL is scanned, the scanning of the scanning line may be terminated and the scanning of the next scanning line may be started. As a result, it is possible to skip edge structures that do not need to be read, and the output time of the binary image data 17 can be shortened and the processing can be made more efficient.

上述のようにデータ出力部152が「黒」で描画すべき2値画像データを出力したら、続いてデータ出力部152は「黒」の色情報CLを有するエッジ構造体をRAMから削除する。これを示したのが図13(D)である。そしてデータ出力部152は、上述の「黒」の色情報CLを有するエッジ構造体を特定したときと同じ要領で、y=0から順にエッジ構造体のスキャンを行い、最初に検出したエッジ構造体と同じ色情報CLを有するエッジ構造体を順次特定していく。図13(D)においては、最初に検出されるエッジ構造体はy=2,SX=1,EX=2のグラフィクスオブジェクト(G)であり、その色情報CLは「赤」であるから、データ出力部152は、y=2,SX=1,EX=2のグラフィクスオブジェクト(G)、y=3,SX=1,EX=2のグラフィクスオブジェクト(G)、y=4,SX=1,EX=2のグラフィクスオブジェクト(G)という順に3個のエッジ構造体を特定し、これらをまとめて出力する。つまりこのとき、データ出力部152は「赤」で描画すべき2値画像データ17を出力する。   As described above, when the data output unit 152 outputs binary image data to be rendered in “black”, the data output unit 152 subsequently deletes the edge structure having the “black” color information CL from the RAM. This is shown in FIG. 13 (D). Then, the data output unit 152 scans the edge structure in order from y = 0 in the same manner as when the edge structure having the “black” color information CL is specified, and detects the edge structure detected first. The edge structures having the same color information CL are sequentially identified. In FIG. 13D, the edge structure detected first is a graphics object (G) with y = 2, SX = 1, and EX = 2, and its color information CL is “red”. The output unit 152 outputs graphics objects (G) with y = 2, SX = 1, and EX = 2, graphics objects (G) with y = 3, SX = 1, and EX = 2, y = 4, SX = 1, and EX = 3 graphics objects (G) in the order of 2 graphics objects (G) are identified and output together. That is, at this time, the data output unit 152 outputs the binary image data 17 to be drawn in “red”.

以下、上述の「黒」で描画すべき2値画像データを出力した場合と同様に、データ出力部152は「赤」の色情報CLを有するエッジ構造体をRAMから削除する。そして、図13(E)に示された状態のエッジデータに対して、エッジ構造体を特定および出力する処理を同様に行う。ここでは、特定されるエッジ構造体はy=4,SX=7,EX=7のテキストオブジェクトのみであるから、データ出力部152は「青」で描画すべき2値画像データ17を出力する。   Thereafter, the data output unit 152 deletes the edge structure having the color information CL of “red” from the RAM, as in the case where the binary image data to be drawn with “black” is output. And the process which specifies and outputs an edge structure is similarly performed with respect to the edge data of the state shown by FIG.13 (E). Here, since the specified edge structure is only a text object with y = 4, SX = 7, and EX = 7, the data output unit 152 outputs the binary image data 17 to be drawn in “blue”.

以上のようにして、本実施形態の画像処理装置10は、文書データ11から2値画像データ17を生成することができる。画像処理装置10の2値画像生成部15は、エッジ配列形式で記述されたエッジデータを用いて2値画像データを出力するため、ビットマップ形式の画像データを参照する場合のように、各ピクセルの色情報を逐一読み取る必要がない。そのため、従来よりも高速に、かつ少ないメモリ容量で2値画像データを生成することが可能となる。   As described above, the image processing apparatus 10 according to the present embodiment can generate the binary image data 17 from the document data 11. Since the binary image generation unit 15 of the image processing apparatus 10 outputs binary image data using edge data described in the edge array format, each pixel is referred to as in the case of referring to bitmap format image data. There is no need to read the color information of each. Therefore, binary image data can be generated at a higher speed and with a smaller memory capacity than in the past.

なお、上述の実施形態においては、2値画像生成部15は色毎の2値画像データ17を生成するものであり、ある色の2値画像データ17にはグラフィクスオブジェクトもテキストオブジェクトも含まれ得る態様であった。しかし、本実施形態の2値画像生成部15はこのような態様に限定されるものではなく、オブジェクト毎に2値画像データ17を生成することももちろん可能である。オブジェクト毎の2値画像データ17を生成するためには、2値画像生成部15において色情報CLをソートキーとしてソート処理を行う前に、タグ情報TGをソートキーとしてソート処理を行えばよい。   In the above-described embodiment, the binary image generation unit 15 generates the binary image data 17 for each color, and the binary image data 17 of a certain color can include both graphics objects and text objects. It was an aspect. However, the binary image generation unit 15 of the present embodiment is not limited to such a mode, and it is of course possible to generate the binary image data 17 for each object. In order to generate the binary image data 17 for each object, the sort processing may be performed using the tag information TG as the sort key before the binary image generation unit 15 performs the sort processing using the color information CL as the sort key.

図13(F)は、2値画像生成部15のエッジソート部151が、このようなソート処理を図12に示された画像データ13に対して行った場合を示している。同図を図13(B)と比較すると、エッジ構造体の並びが異なっていることがわかる。図13(F)においては、例えばy=2のスキャンラインが示すように、テキストオブジェクト(T)であるエッジ構造体がグラフィクスオブジェクト(G)であるエッジ構造体よりも先に出力されるようにソートされている。このようなエッジデータに対して、データ出力部152は、色情報CLとタグ情報TGとが一致しているエッジ構造体を1つの2値画像データ17として出力する。これにより、オブジェクト別の2値画像データを得ることができる。
また、タグ情報TGをソートキーとしてソート処理を行う際に、あらかじめタグ情報TGを適切に設定しておくことで、例えばテキストオブジェクトの2値画像データをグラフィクスオブジェクトの2値画像データよりも必ず先に生成するといった動作を行わせることもできる。これは、ソート処理がタグ情報TGに対して昇順で行われる場合、テキストオブジェクトに対応するタグ情報TGをグラフィクスオブジェクトに対応するタグ情報TGよりも小さな値を設定しておくことで実現される。
FIG. 13F shows a case where the edge sort unit 151 of the binary image generation unit 15 performs such sort processing on the image data 13 shown in FIG. When this figure is compared with FIG. 13B, it can be seen that the arrangement of the edge structures is different. In FIG. 13F, for example, as indicated by the scan line of y = 2, the edge structure that is the text object (T) is output before the edge structure that is the graphics object (G). It is sorted. For such edge data, the data output unit 152 outputs an edge structure in which the color information CL and the tag information TG match as one binary image data 17. Thereby, binary image data for each object can be obtained.
Also, when performing the sorting process using the tag information TG as a sort key, the tag information TG is appropriately set in advance, so that, for example, the binary image data of the text object is always preceded by the binary image data of the graphics object. An operation such as generation can also be performed. This is realized by setting the tag information TG corresponding to the text object to a smaller value than the tag information TG corresponding to the graphics object when the sorting process is performed in ascending order with respect to the tag information TG.

このようにすることで、本実施形態の画像処理装置10はオブジェクト毎の2値画像データ17を生成することもできるため、同一色であってもオブジェクトが異なれば、それぞれを別の2値画像データ17とすることが可能となる。これにより、ユーザが所望する2値画像データがより確実に得られるようになり、ユーザの意図を忠実に反映した2値画像データを得ることが可能となる。   By doing in this way, the image processing apparatus 10 of this embodiment can also generate binary image data 17 for each object. Therefore, if the objects are different even if they are the same color, each binary image data 17 is different from each other. Data 17 can be obtained. Thereby, the binary image data desired by the user can be obtained more reliably, and the binary image data reflecting the user's intention faithfully can be obtained.

(6)変形例
なお、本発明は上述した実施形態に限定されるものではなく、種々の変形が可能である。以下にその例をいくつか示す。
上述の実施形態においては、パーソナルコンピュータによって画像処理装置10を実現する場合について説明したが、これに限らず、例えばプリンタ等の画像出力装置やいわゆる複合機等の画像形成装置が、この画像処理装置10と同等の機能を備えていてもよい。また、コンピュータと画像形成装置が連携することで画像処理装置10と同等の機能を実現するようにしてもよい。そして、画像処理装置10が動作するための制御プログラムPRG1は、CPU等の演算装置によって読み取り可能な磁気記録媒体、光記録媒体あるいはROMなどの記録媒体に記録して提供することができる。また、インターネットのようなネットワーク経由でダウンロードさせることももちろん可能である。
(6) Modifications The present invention is not limited to the above-described embodiments, and various modifications can be made. Some examples are shown below.
In the above-described embodiment, the case where the image processing apparatus 10 is realized by a personal computer has been described. However, the present invention is not limited to this. For example, an image output apparatus such as a printer or an image forming apparatus such as a so-called multifunction machine 10 may be provided. Further, a function equivalent to that of the image processing apparatus 10 may be realized by cooperation between the computer and the image forming apparatus. The control program PRG1 for operating the image processing apparatus 10 can be provided by being recorded on a recording medium such as a magnetic recording medium, an optical recording medium, or a ROM that can be read by an arithmetic device such as a CPU. Of course, downloading via a network such as the Internet is also possible.

また、上述の実施形態において説明された各種データについても、種々の変形が可能である。例えば、オブジェクトの種類は上述の「テキスト」、「グラフィクス」、「イメージ」および「バックグラウンド」に限定されず、その他のオブジェクトを追加することも可能である。また、「バックグラウンド」の属性についてはオブジェクトとして割り当てるのではなく、エッジ構造体内部にバックグラウンド領域であるか否かを示すフラグとして表現してもよい。また、エッジ構造体内部には、この他にもイメージオブジェクトの拡大・縮小に対応した倍率情報を含んでもよい。   Various modifications can be made to the various data described in the above embodiment. For example, the types of objects are not limited to the above-mentioned “text”, “graphics”, “image”, and “background”, and other objects can be added. Further, the attribute of “background” is not assigned as an object, but may be expressed as a flag indicating whether or not the background area is inside the edge structure. In addition, the edge structure may include magnification information corresponding to the enlargement / reduction of the image object.

また、2値画像生成部15においては、データ出力部152が2値画像データを出力したエッジ構造体についてはメモリから削除されると説明したが、エッジ構造体内部に2値画像データとして出力済であるか否かを示すフラグを設け、このフラグが「ON」となっているエッジ構造体については再度の出力処理を行わないようにすれば、エッジ構造体をメモリから削除する必要はなくなる。   In the binary image generation unit 15, the edge structure from which the data output unit 152 has output binary image data has been described as being deleted from the memory, but has already been output as binary image data inside the edge structure. If an edge structure having this flag set to “ON” is not output again, it is not necessary to delete the edge structure from the memory.

また、それぞれのオブジェクトを多値画像データと2値画像データのいずれに割り当てるかについても、任意に設定可能である。これは、ユーザが操作部5を介して設定できるようにしてもよいし、この割り当てを記述した定義ファイルをあらかじめ記憶部2等に記憶しておいてもよい。   In addition, it is possible to arbitrarily set whether to assign each object to multi-value image data or binary image data. This may be set by the user via the operation unit 5, or a definition file describing this assignment may be stored in advance in the storage unit 2 or the like.

本発明の一実施形態に係る画像処理装置のハードウェア構成を表すブロック図である。It is a block diagram showing the hardware constitutions of the image processing apparatus which concerns on one Embodiment of this invention. 同実施形態の画像処理装置の機能構成を示した機能ブロック図である。FIG. 2 is a functional block diagram illustrating a functional configuration of the image processing apparatus according to the embodiment. 同実施形態における文書データと、この文書データから生成される多値画像データと2値画像データとを概念的に示した図である。FIG. 3 is a diagram conceptually showing document data, multi-value image data and binary image data generated from the document data in the embodiment. 同実施形態におけるエッジ構造体のフォーマットを示した図である。It is the figure which showed the format of the edge structure in the same embodiment. 同実施形態における画像データのデータ構造を概念的に示した図である。It is the figure which showed notionally the data structure of the image data in the embodiment. 図3に示した文書データに対して生成される外接矩形情報を概念的に示した図である。FIG. 4 is a diagram conceptually showing circumscribed rectangle information generated for the document data shown in FIG. 3. 同実施形態の解析処理部の機能構成を示した機能ブロック図である。It is a functional block diagram showing the functional composition of the analysis processing part of the embodiment. 星形のグラフィクスの外接矩形情報を生成する過程を例示した図である。It is the figure which illustrated the process which produces | generates the circumscribed rectangle information of star-shaped graphics. 星形のグラフィクスの外接矩形情報を生成する過程を例示した図である。It is the figure which illustrated the process which produces | generates the circumscribed rectangle information of star-shaped graphics. 同実施形態において、多値画像生成部が位置情報とサイズ情報とを算出する過程を概念的に示した図である。In the embodiment, it is the figure which showed notionally the process in which a multi-value image generation part calculates a positional information and size information. 同実施形態の2値画像生成部の機能構成を示した機能ブロック図である。It is the functional block diagram which showed the function structure of the binary image generation part of the embodiment. 同実施形態において、2値画像生成部によって2値画像データが生成される画像データを概念的に示した図である。In the embodiment, it is the figure which showed notionally the image data by which binary image data is produced | generated by the binary image production | generation part. 同実施形態において、2値画像生成部が画像データから2値画像データを生成する過程を説明するための図である。FIG. 6 is a diagram for describing a process in which a binary image generation unit generates binary image data from image data in the embodiment. 図13のエッジ構造体のフォーマットを示した図である。It is the figure which showed the format of the edge structure of FIG.

符号の説明Explanation of symbols

10…画像処理装置、1…制御部、2…記憶部、3…入出力I/F、4…表示部、5…操作部、11…文書データ、12…解析処理部、13…画像データ、14…多値画像生成部、15…2値画像生成部、16…多値画像データ、17…2値画像データ、120…入力データ解析部、121…テキスト処理部、122…グラフィクス処理部、123…イメージ処理部、124…中間コード生成部、125…外接矩形生成部、126…レンダリング処理部、150…エッジ保存部、151…エッジソート部、152…データ出力部。 DESCRIPTION OF SYMBOLS 10 ... Image processing apparatus, 1 ... Control part, 2 ... Memory | storage part, 3 ... Input-output I / F, 4 ... Display part, 5 ... Operation part, 11 ... Document data, 12 ... Analysis processing part, 13 ... Image data, DESCRIPTION OF SYMBOLS 14 ... Multi-value image generation part, 15 ... Binary image generation part, 16 ... Multi-value image data, 17 ... Binary image data, 120 ... Input data analysis part, 121 ... Text processing part, 122 ... Graphics processing part, 123 DESCRIPTION OF SYMBOLS Image processing part 124 ... Intermediate code generation part 125 ... circumscribed rectangle generation part 126 ... rendering processing part 150 ... edge preservation part 151 ... edge sort part 152 ... data output part

Claims (2)

複数種類のオブジェクトによって構成された文書データを記憶する記憶部と、
記憶した前記文書データを、当該文書データの各スキャンライン上に存在するオブジェクトの色および位置を表すエッジ構造体によって構成された画像データに変換する解析処理部と、
前記解析処理部によって得られた画像データを保存するエッジ保存部と、
前記エッジ保存部に保存されている画像データを構成するエッジ構造体のうち、同一色のオブジェクトを表すエッジ構造体どうしが互いに隣り合うように並び替えるエッジソート部と、
並び替えられたエッジ構造体のうちの同一色のオブジェクトを表すエッジ構造体によって表される画像を2値で表現した2値画像データを生成して出力するデータ出力部と
を備える画像処理装置。
A storage unit for storing document data composed of a plurality of types of objects;
An analysis processing unit that converts the stored document data into image data configured by an edge structure representing a color and a position of an object existing on each scan line of the document data;
An edge storage unit for storing image data obtained by the analysis processing unit;
Among the edge structures constituting the image data stored in the edge storage unit, an edge sort unit that rearranges the edge structures representing objects of the same color so as to be adjacent to each other;
An image processing apparatus comprising: a data output unit configured to generate and output binary image data representing a binary image of an image represented by an edge structure representing an object of the same color among the sorted edge structures.
前記エッジ構造体は、オブジェクトの色および位置に加えてオブジェクトの種類を表しており、
前記エッジソート部は、前記エッジ保存部に保存されている画像データを構成するエッジ構造体のうち、同一種類かつ同一色のオブジェクトを表すエッジ構造体どうしが隣り合うように並び替え、
前記データ出力部は、前記エッジソート部によって並び替えられたエッジ構造体のうちの、同一種類かつ同一色のオブジェクトを表すエッジ構造体によって表される画像を2値で表現した2値画像データを生成して出力する
請求項1記載の画像処理装置。
The edge structure represents the type of the object in addition to the color and position of the object,
The edge sorting unit is arranged so that edge structures representing objects of the same type and the same color are adjacent to each other among the edge structures constituting the image data stored in the edge storage unit,
The data output unit is a binary image data representing a binary image of an image represented by an edge structure representing an object of the same type and the same color among the edge structures rearranged by the edge sort unit. The image processing apparatus according to claim 1, wherein the image processing apparatus generates and outputs.
JP2004316762A 2004-10-29 2004-10-29 Image processing apparatus and program Expired - Fee Related JP4375199B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004316762A JP4375199B2 (en) 2004-10-29 2004-10-29 Image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004316762A JP4375199B2 (en) 2004-10-29 2004-10-29 Image processing apparatus and program

Publications (3)

Publication Number Publication Date
JP2006129250A true JP2006129250A (en) 2006-05-18
JP2006129250A5 JP2006129250A5 (en) 2007-11-01
JP4375199B2 JP4375199B2 (en) 2009-12-02

Family

ID=36723420

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004316762A Expired - Fee Related JP4375199B2 (en) 2004-10-29 2004-10-29 Image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP4375199B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008211510A (en) * 2007-02-26 2008-09-11 Konica Minolta Business Technologies Inc Printing control program, printing controller, image forming apparatus and printing control method
JP2009065322A (en) * 2007-09-05 2009-03-26 Nec Access Technica Ltd Image output device and method
JP2013224023A (en) * 2012-03-22 2013-10-31 Canon Inc Apparatus, method and system for processing image, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008211510A (en) * 2007-02-26 2008-09-11 Konica Minolta Business Technologies Inc Printing control program, printing controller, image forming apparatus and printing control method
JP4529148B2 (en) * 2007-02-26 2010-08-25 コニカミノルタビジネステクノロジーズ株式会社 Print control program, print control apparatus, image forming apparatus, and print control method
JP2009065322A (en) * 2007-09-05 2009-03-26 Nec Access Technica Ltd Image output device and method
JP2013224023A (en) * 2012-03-22 2013-10-31 Canon Inc Apparatus, method and system for processing image, and program

Also Published As

Publication number Publication date
JP4375199B2 (en) 2009-12-02

Similar Documents

Publication Publication Date Title
JP4766657B2 (en) Image processing apparatus, control method therefor, and program
KR100935267B1 (en) Mixed raster content files
JP4012140B2 (en) Image processing apparatus, information processing apparatus, control method therefor, and program
TWI230516B (en) Segmented layered image system
JP4817821B2 (en) Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
US7853873B2 (en) Data processing apparatus, data processing method, and computer program for generating electronic data from a paper document
US7680358B2 (en) Image processing apparatus and control method thereof, and program
JP5171733B2 (en) Image processing apparatus and image processing method
US6715127B1 (en) System and method for providing editing controls based on features of a raster image
JP2006345314A (en) Image processing apparatus and image processing method
JP4375199B2 (en) Image processing apparatus and program
JP2008042345A (en) Image processing method and image processor
JP2008228168A (en) Image processing apparatus and program
JP2007179261A (en) Image processor, image processing method and control program
JP4345609B2 (en) Image processing apparatus and program
JP2010136192A (en) Image processor, image processing method, and computer program
JP2008042346A (en) Image processing method and image processor
JP2005151455A (en) Image processor, information processor, these control method, and program
JP4109793B2 (en) Image processing apparatus and method
JP2006040161A (en) Image processing apparatus and program
JP4228905B2 (en) Image processing apparatus and program
JP2008092419A (en) Image processor and image processing method
JP4506346B2 (en) Image processing device
JP2011054123A (en) Image processing apparatus, image processing method and computer program
KR100334624B1 (en) Clustering based document image segmentation method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070912

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070912

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081209

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090202

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090831

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120918

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120918

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130918

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees