JP2005210650A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2005210650A
JP2005210650A JP2004017698A JP2004017698A JP2005210650A JP 2005210650 A JP2005210650 A JP 2005210650A JP 2004017698 A JP2004017698 A JP 2004017698A JP 2004017698 A JP2004017698 A JP 2004017698A JP 2005210650 A JP2005210650 A JP 2005210650A
Authority
JP
Japan
Prior art keywords
pixel
image data
area
pixels
significant
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
JP2004017698A
Other languages
Japanese (ja)
Other versions
JP4182891B2 (en
Inventor
Yumi Sekiguchi
ゆみ 関口
Kunikazu Ueno
邦和 上野
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 JP2004017698A priority Critical patent/JP4182891B2/en
Publication of JP2005210650A publication Critical patent/JP2005210650A/en
Application granted granted Critical
Publication of JP4182891B2 publication Critical patent/JP4182891B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing device by which picture portions to be nominated can be specified while reducing processing load. <P>SOLUTION: Labeling process of image data to be processed is executed. Significant pixels joined together are extracted as joined pixels and nonpicture regions are eliminated from among the joined pixels. With respect to image data after the nonpicture regions have been eliminated, portions existing as a background for remaining joined pixels are specified as background portions. Then, the background portions specified are eliminated to produce information for specifying the picture regions. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、画像データから文字部分と絵柄部分とを分離して所定処理を行う画像処理装置に関する。   The present invention relates to an image processing apparatus that separates a character part and a picture part from image data and performs predetermined processing.

ラスタ画像のデータ(以下、区別するべき場合を除いて単に「画像データ」と呼ぶ)には、文字(テキスト)部分や、自然画の部分(絵柄部分)など、互いに性状の異なる多くの画像要素が含まれ得る。こうした画像要素は、その性状の相違から、例えば圧縮処理において異なる方式での圧縮が適していたりするなど、画像要素ごとに異なる画像処理を行うことが好ましい場合が多い。   Raster image data (hereinafter simply referred to as “image data” unless otherwise distinguished) has many image elements with different properties such as character (text) parts and natural picture parts (design parts). Can be included. Due to the difference in properties of these image elements, it is often preferable to perform different image processing for each image element, for example, compression by a different method is suitable for compression processing.

そこで従来から、いわゆるT/I分離と呼ばれる画像処理が研究・開発されている。従来、T/I分離の方法としては、例えば処理対象画像を二値化し、黒画素の連続する領域を画定し、当該画定した領域のサイズが予め定めたしきい値を下回る場合に当該領域に含まれる黒画素が文字を表すものと判定する方法等がある(特許文献1)。
特開2003−8909号公報 特開2002−175532号公報
Therefore, conventionally, image processing called so-called T / I separation has been researched and developed. Conventionally, as a method of T / I separation, for example, a processing target image is binarized, a continuous region of black pixels is defined, and when the size of the defined region is lower than a predetermined threshold value, the region is included in the region. There is a method of determining that an included black pixel represents a character (Patent Document 1).
JP 2003-8909 A JP 2002-175532 A

しかしながら上記従来例の方法では、単に連結画素のサイズによって文字線画の領域を識別しており、当該文字線画でない部分を絵柄として扱うこととなるので、背景までが絵柄として扱われてしまうなどの問題点があった。   However, in the above-described conventional method, the area of the character / line drawing is simply identified by the size of the connected pixel, and the portion that is not the character / line drawing is handled as a design, so that the background is treated as a design. There was a point.

そこで絵柄部分を元の多値の画像データから、色に関係する情報を用いて抽出する方法も考えられている。しかしながら、多値の画像データを用いるときには、データ量が膨大となって処理負荷が大きくなるという問題点がある。   Therefore, a method of extracting the pattern portion from the original multi-valued image data using information related to the color has been considered. However, when multi-value image data is used, there is a problem that the amount of data becomes enormous and the processing load increases.

本発明は上記実情に鑑みて為されたもので、処理負荷を低減しながら、絵柄の候補となるべき部分を特定できる画像処理装置を提供することをその目的の一つとする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an image processing apparatus capable of specifying a portion to be a candidate for a pattern while reducing a processing load.

上記従来例の問題点を解決するための本発明は、画僧処理装置であって、処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を連結画素として抽出する手段と、前記連結画素のうち非絵柄領域を除去する手段と、前記非絵柄領域を除去した後の画像データについて、残存した連結画素部分に対して背景となっている部分を背景部分として特定し、当該特定された背景部分を除去して、絵柄領域を特定する情報を生成する絵柄領域特定手段と、を含むことを特徴としている。   The present invention for solving the problems of the conventional example described above is an image processing apparatus, which performs labeling processing on image data to be processed, and extracts significant pixel portions connected to each other as connected pixels. , A means for removing a non-picture area from the connected pixels, and for the image data after removing the non-picture area, a portion that is a background with respect to the remaining connected pixel part is identified as a background part, And a design area specifying means for generating information for specifying the design area by removing the specified background portion.

またここで前記非絵柄領域を除去した後の画像データについて、有意画素近傍の画素を有意画素と設定する膨張処理を行い、当該膨張処理後の画像データについて、有意でない画素近傍の画素を有意でない画素と設定する収縮処理を行う膨張収縮手段をさらに含み、前記絵柄領域特定手段は、前記膨張・収縮処理後の画像データについて、残存した連結画素部分に対して背景となっている部分を背景部分として特定し、当該特定された背景部分を除去して、絵柄領域を特定する情報を生成することとしてもよい。   In addition, the image data after removing the non-picture area is subjected to expansion processing for setting pixels in the vicinity of significant pixels as significant pixels, and in the image data after the expansion processing, pixels in the vicinity of insignificant pixels are not significant. The image area specifying means further includes a background portion for the remaining connected pixel portion in the image data after the expansion / contraction processing. It is also possible to generate the information specifying the pattern area by removing the specified background portion.

さらにこの膨張収縮手段は、前記非絵柄領域を除去した後の画像データをランレングスのデータに変換して、当該変換後のランレングスのデータについて前記膨張処理を行い、前記収縮処理後のランレングスのデータをビットマップのデータに変換して出力するようにしてもよい。   Further, the expansion / contraction means converts the image data after removing the non-picture region into run length data, performs the expansion processing on the converted run length data, and executes the run length after the contraction processing. These data may be converted into bitmap data and output.

さらに、上記従来例の問題点を解決するための本発明は、画像処理装置であって、処理対象となった画像データを構成する各画素を、所定の背景画素条件を満足する背景画素と、前記所定の背景画素条件を満足しない有意画素とに分類し、前記背景画素または画像データの端部によって互いに仕切られた、前記有意画素同士の連結部分を連結画素領域として抽出する手段と、前記有意画素の各々について、当該有意画素から隣接する有意画素を辿って背景画素まで至るまでの距離を、有意画素距離情報として生成する手段と、前記選択された注目領域のサイズに関係するサイズ関係情報を生成する手段と、前記選択された注目領域に含まれる各有意画素ごとの有意画素距離情報、並びに前記サイズ関係情報に基づいて注目領域のうち絵柄領域を特定する手段と、を含むことを特徴としている。   Furthermore, the present invention for solving the problems of the above-described conventional example is an image processing device, and each pixel constituting image data to be processed is a background pixel that satisfies a predetermined background pixel condition, Means for classifying as significant pixels not satisfying the predetermined background pixel condition, and extracting a connected portion of the significant pixels separated from each other by an edge of the background pixel or image data as a connected pixel region; For each pixel, means for generating, as significant pixel distance information, a distance from the significant pixel to the adjacent significant pixel to the background pixel, and size relationship information related to the size of the selected region of interest. Generating means, significant pixel distance information for each significant pixel included in the selected attention area, and a picture area of the attention area based on the size relationship information It is characterized in that it comprises, means for identifying.

また、上記従来例の問題点を解決するための本発明は、処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を第1連結画素として抽出する手段と、前記連結画素のうち非絵柄領域を除去する手段と、前記非絵柄領域を除去した後の画像データについて、有意でない画素が互いに連結している部分を第2連結画素として抽出する手段と、前記第2連結画素のうち、画像データの境界に接している第2連結画素を背景部分として特定し、当該特定した背景部分以外の領域を絵柄領域として特定する手段と、を含むことを特徴としている。   Further, the present invention for solving the problems of the conventional example described above includes means for performing a labeling process on image data to be processed and extracting significant pixel portions connected to each other as first connected pixels, and the connected pixels. A means for removing a non-picture area, a means for extracting a portion where insignificant pixels are connected to each other as image connection data after removing the non-picture area, and a second connected pixel. And a means for specifying a second connected pixel in contact with the boundary of the image data as a background part and specifying an area other than the specified background part as a picture area.

また、本発明のある態様に係る画像処理方法は、コンピュータを用い、処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を連結画素として抽出し、前記連結画素のうち非絵柄領域を除去し、前記非絵柄領域を除去した後の画像データについて、残存した連結画素部分に対して背景となっている部分を背景部分として特定し、当該特定された背景部分を除去して、絵柄領域を特定する情報を生成することを特徴としている。   In addition, an image processing method according to an aspect of the present invention uses a computer to perform a labeling process on image data to be processed, extracts significant pixel portions connected to each other as connected pixels, and selects non-connected pixels from the connected pixels. For the image data after removing the picture area and removing the non-picture area, the part that is the background with respect to the remaining connected pixel part is specified as the background part, and the specified background part is removed. The method is characterized by generating information for specifying a picture area.

また、本発明の別の態様に係る画像処理方法は、コンピュータを用い、処理対象となった画像データを構成する各画素を、所定の背景画素条件を満足する背景画素と、前記所定の背景画素条件を満足しない有意画素とに分類し、前記背景画素または画像データの端部によって互いに仕切られた、前記有意画素同士の連結部分を連結画素領域として抽出し、前記有意画素の各々について、当該有意画素から隣接する有意画素を辿って背景画素まで至るまでの距離を、有意画素距離情報として生成し、前記選択された注目領域のサイズに関係するサイズ関係情報を生成し、前記選択された注目領域に含まれる各有意画素ごとの有意画素距離情報、並びに前記サイズ関係情報に基づいて注目領域のうち絵柄領域を特定することを特徴としている。   According to another aspect of the present invention, there is provided an image processing method using a computer, wherein each pixel constituting image data to be processed includes a background pixel that satisfies a predetermined background pixel condition, and the predetermined background pixel. Classified as significant pixels that do not satisfy the conditions, and extracted a connected portion of the significant pixels partitioned by the background pixel or the edge of the image data as a connected pixel region, and for each of the significant pixels, the significant pixel The distance from the pixel to the adjacent significant pixel to the background pixel is generated as significant pixel distance information, size relationship information related to the size of the selected attention area is generated, and the selected attention area The design area is specified from the attention area based on the significant pixel distance information for each significant pixel and the size relation information.

さらに、本発明の別の態様に係る画像処理方法は、コンピュータを用い、処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を第1連結画素として抽出し、前記連結画素のうち非絵柄領域を除去し、前記非絵柄領域を除去した後の画像データについて、有意でない画素が互いに連結している部分を第2連結画素として抽出し、前記第2連結画素のうち、画像データの境界に接している第2連結画素を背景部分として特定し、当該特定した背景部分以外の領域を絵柄領域として特定することを特徴としている。   Furthermore, an image processing method according to another aspect of the present invention uses a computer to perform a labeling process on image data to be processed, extracts significant pixel portions connected to each other as first connected pixels, and connects the connected pixels. In the image data after removing the non-picture area and extracting the non-picture area, a portion where insignificant pixels are connected to each other is extracted as a second connected pixel, and the image is extracted from the second connected pixels. A second connected pixel in contact with the data boundary is specified as a background part, and an area other than the specified background part is specified as a pattern area.

さらに、本発明の別の態様に係る画像処理プログラムは、コンピュータに、処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を連結画素として抽出する手順と、前記連結画素のうち非絵柄領域を除去する手順と、前記非絵柄領域を除去した後の画像データについて、残存した連結画素部分に対して背景となっている部分を背景部分として特定し、当該特定された背景部分を除去して、絵柄領域を特定する情報を生成する手順と、を実行させることを特徴としている。   Furthermore, an image processing program according to another aspect of the present invention includes a procedure for performing, on a computer, a labeling process on image data to be processed, and extracting significant pixel portions connected to each other as connected pixels; Among these, the procedure for removing the non-picture area and the image data after removing the non-picture area are identified as a background part with respect to the remaining connected pixel part, and the identified background part And a procedure for generating information for specifying a picture area.

さらに、本発明の別の態様に係る画像処理プログラムは、コンピュータに、処理対象となった画像データを構成する各画素を、所定の背景画素条件を満足する背景画素と、前記所定の背景画素条件を満足しない有意画素とに分類し、前記背景画素または画像データの端部によって互いに仕切られた、前記有意画素同士の連結部分を連結画素領域として抽出する手順と、前記有意画素の各々について、当該有意画素から隣接する有意画素を辿って背景画素まで至るまでの距離を、有意画素距離情報として生成する手順と、前記選択された注目領域のサイズに関係するサイズ関係情報を生成する手順と、前記選択された注目領域に含まれる各有意画素ごとの有意画素距離情報、並びに前記サイズ関係情報に基づいて注目領域のうち絵柄領域を特定する手順と、を実行させることを特徴としている。   Furthermore, an image processing program according to another aspect of the present invention provides a computer with each pixel constituting image data to be processed, a background pixel that satisfies a predetermined background pixel condition, and the predetermined background pixel condition. For each of the significant pixels, and a procedure for extracting a connected portion of the significant pixels separated from each other by the background pixel or the edge of the image data as a connected pixel region. A procedure for generating a distance from a significant pixel to a background pixel by following an adjacent significant pixel as significant pixel distance information, a procedure for generating size relationship information related to the size of the selected region of interest, The design area is identified among the attention areas based on the significant pixel distance information for each significant pixel included in the selected attention area and the size relation information. Is characterized by executing the instructions that, the.

さらに、本発明の別の態様に係る画像処理プログラムは、コンピュータに、処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を第1連結画素として抽出する手順と、前記連結画素のうち非絵柄領域を除去する手順と、前記非絵柄領域を除去した後の画像データについて、有意でない画素が互いに連結している部分を第2連結画素として抽出する手順と、前記第2連結画素のうち、画像データの境界に接している第2連結画素を背景部分として特定し、当該特定した背景部分以外の領域を絵柄領域として特定する手順と、を実行させることを特徴としている。   Furthermore, an image processing program according to another aspect of the present invention includes a procedure for causing a computer to perform a labeling process on image data to be processed and to extract significant pixel portions connected to each other as first connected pixels, and the connection A procedure for removing a non-picture region from the pixels, a procedure for extracting a portion where non-significant pixels are connected to each other as image connection data after removing the non-picture region, and the second connection pixel Among the pixels, the second connected pixel that is in contact with the boundary of the image data is specified as a background part, and a procedure for specifying an area other than the specified background part as a picture area is executed.

本発明の実施の形態に係る画像処理装置は、図1に示すように、制御部11と記憶部12と画像入力部13と画像出力部14とを含んで構成されている。制御部11は、記憶部12に格納されているプログラムに従って動作しており、後に説明する各画像処理を遂行する。この画像処理の内容については、後に詳しく述べる。   As shown in FIG. 1, the image processing apparatus according to the embodiment of the present invention includes a control unit 11, a storage unit 12, an image input unit 13, and an image output unit 14. The control unit 11 operates in accordance with a program stored in the storage unit 12 and performs each image processing described later. The contents of this image processing will be described in detail later.

記憶部12は、制御部11によって実行されるプログラムを保持している。またこの記憶部12は、制御部11の処理の過程で生成される各種データ等を格納するワークメモリとしても動作する。具体的にこの記憶部12は、コンピュータ可読な記録媒体と当該記録媒体に対してデータを書き込み、又は当該記録媒体からデータを読み出す装置(例えばハードディスク装置やメモリ装置)として実装できる。   The storage unit 12 holds a program executed by the control unit 11. The storage unit 12 also operates as a work memory that stores various data generated during the process of the control unit 11. Specifically, the storage unit 12 can be implemented as a computer-readable recording medium and a device that writes data to or reads data from the recording medium (for example, a hard disk device or a memory device).

画像入力部13は、例えばスキャナであり、原稿を光学的に読み取って得られた画像データを制御部11に出力する。ここではこの画像入力部13が出力する画像データにおいて、各画素の値がRGB(赤、緑、青)の色空間で表現されているとする。画像出力部14は、制御部11から入力される指示に従って画像データを出力するもので、例えば画像形成部(プリンタ等)に出力し、又はネットワークを介して外部の装置に送信する等の処理を行うものである。   The image input unit 13 is, for example, a scanner, and outputs image data obtained by optically reading a document to the control unit 11. Here, it is assumed that the value of each pixel is expressed in an RGB (red, green, blue) color space in the image data output from the image input unit 13. The image output unit 14 outputs image data in accordance with an instruction input from the control unit 11. For example, the image output unit 14 outputs the image data to an image forming unit (printer or the like) or transmits it to an external device via a network. Is what you do.

次に制御部11の処理の内容について説明する。本実施の形態の制御部11は、図2に機能的に示すように、画像入力部13から入力される画像データを処理対象として、この処理対象となった画像データに対して、所定前処理を行う前処理部21と、絵柄部分の候補となる部分(絵柄候補部分)を特定する絵柄候補部分特定処理部22と、文字線画を抽出する文字線画抽出処理部23と、レイアウト処理を遂行するレイアウト処理部24と、同一色領域分離部25と、穴埋処理部26と、圧縮処理部27とを含んで構成されている。   Next, the content of the process of the control part 11 is demonstrated. As functionally shown in FIG. 2, the control unit 11 of the present embodiment sets the image data input from the image input unit 13 as a processing target, and performs predetermined preprocessing on the image data that is the processing target. A pre-processing unit 21 that performs the pattern processing, a pattern candidate portion specifying processing unit 22 that specifies a portion that is a candidate for a pattern portion (design candidate portion), a character / line image extraction processing unit 23 that extracts a character / line image, and a layout process. The layout processing unit 24, the same color region separation unit 25, a hole filling processing unit 26, and a compression processing unit 27 are included.

以下、これら各部について具体的に説明する。   Hereinafter, each of these parts will be described in detail.

[1.前処理部]
この前処理部21では、画像入力部13から入力される画像データ(処理対象画像データ)の各画素の値をRGBからYCbCr(輝度と色差とからなる値)に変換する。具体的には、次の(1)式を用いて変換を行うことができる。なお、ここではRGBの各成分の値は0x00(「0x」は16進数であることを示す)から0xFFまでの値であるとしている。また、この前処理部21では、下地領域の輝度・彩度に基づいて各画素値を階調補正してもよい。尤も、この階調補正の処理は、必ずしも必要なものではない。
[1. Pre-processing section]
In the preprocessing unit 21, the value of each pixel of the image data (processing target image data) input from the image input unit 13 is converted from RGB to YCbCr (a value composed of luminance and color difference). Specifically, the conversion can be performed using the following equation (1). Here, the value of each component of RGB is assumed to be a value from 0x00 (“0x” indicates a hexadecimal number) to 0xFF. Further, the pre-processing unit 21 may correct the gradation of each pixel value based on the luminance and saturation of the background area. However, the gradation correction process is not always necessary.

Figure 2005210650
Figure 2005210650

[2.絵柄候補領域特定処理部]
絵柄候補部分特定処理部22は、前処理部21が出力するYCbCr色空間で表現された画像データから絵柄の領域と推定される領域を、絵柄候補領域として特定する処理を行う。以下具体的に、絵柄候補部分特定処理部22の処理方法について説明する。
[2. Design candidate area identification processing unit]
The pattern candidate portion identification processing unit 22 performs a process of identifying an area estimated as a pattern area from the image data expressed in the YCbCr color space output from the preprocessing unit 21 as a pattern candidate area. Hereinafter, the processing method of the pattern candidate portion identification processing unit 22 will be specifically described.

[2a.第1の方法]
絵柄候補部分特定処理部22は、図3(a)に示すように、二値化処理部31と、連結画素抽出部32と、特徴量算出部33と、属性判定部34と、非絵柄領域処理部35と、背景領域塗潰部36と、絵柄候補領域作成部37とを含んで構成される。
[2a. First method]
As shown in FIG. 3A, the pattern candidate portion specifying processing unit 22 includes a binarization processing unit 31, a connected pixel extraction unit 32, a feature amount calculation unit 33, an attribute determination unit 34, and a non-pattern region. The processing unit 35, the background region painting unit 36, and the pattern candidate region creation unit 37 are configured.

二値化処理部31は、前処理部21が出力するYCbCr色空間で表現された画像データを記憶部12にコピーして格納する。そして、当該コピーされた画像データ(絵柄領域特定画像データ)の各画素の値を参照しながら、当該画素値の輝度成分と、予め定めた二値化しきい値とを比較して、輝度成分が二値化しきい値以上の画素を有意画素として黒色(値「1」)に設定する。また、輝度成分が二値化しきい値未満の画素は有意でない画素として白色(値「0」)に設定していき、当該絵柄領域特定画像データを二値画像データに変換する。   The binarization processing unit 31 copies and stores image data expressed in the YCbCr color space output from the preprocessing unit 21 in the storage unit 12. Then, referring to the value of each pixel of the copied image data (design area specifying image data), the luminance component of the pixel value is compared with a predetermined binarization threshold value, and the luminance component is Pixels that are equal to or greater than the binarization threshold are set to black (value “1”) as significant pixels. Also, pixels whose luminance component is less than the binarization threshold are set to white (value “0”) as insignificant pixels, and the pattern area specifying image data is converted into binary image data.

連結画素抽出部32は、二値画像データ中から、黒画素(値「1」の部分)が連結している領域(連結領域)を抽出する。この連結領域の抽出は、ラベリング処理として広く知られた処理を用いることができる。ラベリング処理を用いる場合、各連結領域には互いに異なるラベル識別子を付して、記憶部12に格納しておく。   The connected pixel extraction unit 32 extracts an area (connected area) where black pixels (value “1”) are connected from the binary image data. For the extraction of the connected region, a process widely known as a labeling process can be used. When the labeling process is used, each connected area is given a different label identifier and stored in the storage unit 12.

特徴量算出部33は、連結画素抽出部32によって抽出された連結領域の各々について、その所定のスケール特徴量を演算する。ここでスケール特徴量には、連結領域に関係して定められる矩形の面積や、当該矩形内での黒画素の密度(矩形内の黒画素の数を矩形内の全画素の数で除したもの)などを含む。例えば特徴量算出部33は次のように処理を行う。すなわち特徴量算出部33は、各連結領域ごとの関係領域として、各連結領域に外接する矩形(外接矩形)を画定する。具体的に外接矩形は、連結領域に含まれる画素のうち、そのX座標が最小のもの(絵柄領域特定画像データ中で最も左にあるもの)の当該X座標をXminとし、同じくY座標が最小のもの(絵柄領域特定画像データ中で最も上にあるもの)の当該Y座標をYminとし、以下同様にX座標が最大のものと、Y座標が最大のものとにおける、X座標とY座標とのそれぞれをXmax、Ymaxとして、(Xmin,Ymin)から(Xmax,Ymax)までの線を対角線とする矩形を外接矩形と定める。そして当該外接矩形の面積Aを、(Xmax−Xmin)×(Ymax−Ymin)として演算する。なお、この面積Aは、当該外接矩形に含まれる全画素の数にも等しい。一方、特徴量算出部33は、当該外接矩形内の黒画素の数をカウントし、その数を上記全画素の数(すなわち面積Aの値)で除して密度Dを求める。   The feature amount calculation unit 33 calculates a predetermined scale feature amount for each of the connected regions extracted by the connected pixel extraction unit 32. Here, the scale feature amount includes the rectangular area determined in relation to the connected region, the density of black pixels in the rectangle (the number of black pixels in the rectangle divided by the number of all pixels in the rectangle) ) Etc. For example, the feature amount calculation unit 33 performs processing as follows. That is, the feature amount calculation unit 33 defines a rectangle circumscribing each connected region (a circumscribed rectangle) as a related region for each connected region. Specifically, for the circumscribed rectangle, among the pixels included in the connected area, the X coordinate of the pixel with the smallest X coordinate (the leftmost pixel in the image area specific image data) is defined as Xmin, and the Y coordinate is also the smallest. X coordinate and Y coordinate of the one with the largest X coordinate and the one with the largest Y coordinate are set to Ymin. , Xmax and Ymax are defined as rectangles having diagonal lines from (Xmin, Ymin) to (Xmax, Ymax). Then, the area A of the circumscribed rectangle is calculated as (Xmax−Xmin) × (Ymax−Ymin). The area A is equal to the number of all pixels included in the circumscribed rectangle. On the other hand, the feature amount calculation unit 33 counts the number of black pixels in the circumscribed rectangle and divides the number by the number of all the pixels (that is, the value of the area A) to obtain the density D.

こうして特徴量算出部33は、各連結領域について、これら外接矩形の面積A(面積特徴量に相当する)と、黒画素密度D(密度特徴量に相当する)とを、当該連結領域のスケール特徴量として算出する。そして、各連結領域の識別子(例えばラベル識別子)とそのスケール特徴量とを関連づけて、記憶部12にスケール特徴量データベースとして格納しておく。   In this way, the feature amount calculation unit 33 uses, for each connected region, the area A (corresponding to the area feature amount) of the circumscribed rectangle and the black pixel density D (corresponding to the density feature amount) as the scale feature of the connected region. Calculate as a quantity. Then, the identifier (for example, label identifier) of each connected area and the scale feature amount are associated with each other and stored in the storage unit 12 as a scale feature amount database.

属性判定部34は、記憶部12に格納されたスケール特徴量データベースを参照しながら、各連結領域が絵柄候補領域であるか否かを判定する。具体的な例を挙げると、この属性判定部34は、文字であれば一定以上のサイズがあり、その内部の黒画素密度は比較的小さいはずであるとの前提に基づく処理を行う。つまり、一般的なドキュメントで利用されるフォントサイズの最小値(例えば6ポイント)に相当する面積(いわば最小面積)未満の領域(小領域)は、文字を含まない、絵柄の領域と判定できるので、こうした小領域を除去することで文字部分を特定できる。   The attribute determination unit 34 determines whether each connected region is a pattern candidate region while referring to the scale feature amount database stored in the storage unit 12. As a specific example, the attribute determination unit 34 performs a process based on the premise that a character has a certain size or more and the black pixel density inside the character should be relatively small. That is, an area (small area) less than an area (so-called minimum area) corresponding to the minimum font size (for example, 6 points) used in a general document can be determined as a picture area that does not include characters. By removing these small areas, the character portion can be specified.

また、文字は基本的に線からなるので、複雑な文字であっても領域内の画素のうち一定割合以上が黒画素となることはない。そこで、最小面積より大きい面積を有する矩形であっても、その内部で黒画素の数の占める割合(つまり黒画素密度)が比較的大きい場合に、絵柄であると判定できる。   In addition, since the characters are basically composed of lines, even a complex character will not be a black pixel in a certain proportion or more of the pixels in the region. Therefore, even if the rectangle has an area larger than the minimum area, it can be determined that the pattern is a pattern when the proportion of the number of black pixels in the rectangle (that is, the black pixel density) is relatively large.

さらに、本実施の形態では、例えば一般的なドキュメントで利用されるフォントサイズの最大値(例えば24ポイント)に相当する面積(いわば最大面積)以上の場合、文字は含まれないと基本的に判断できる。しかしながら、こうした領域は絵柄だけでなく線図(グラフなど)である場合もある。そこで、ここでも黒画素密度を利用して、最大面積より大きい面積を有する矩形のうち、黒画素密度が比較的大きい場合に限り、絵柄であると判定する。なぜならば、グラフなどの線図は、線を用いて構成されるので黒画素の密度は比較的低くなると推定されるからである。   Furthermore, in the present embodiment, for example, when the area is equal to or larger than the maximum font size (for example, 24 points) used in a general document (ie, the maximum area), it is basically determined that no character is included. it can. However, such a region may be a diagram (graph etc.) as well as a picture. Therefore, the black pixel density is also used here, and it is determined that the image has a pattern only when the black pixel density is relatively large among rectangles having an area larger than the maximum area. This is because a graph such as a graph is composed of lines, so that the density of black pixels is estimated to be relatively low.

つまり、本実施の形態では、各連結領域ごとに、その面積特徴量が予め定めた複数の等級のいずれに属するかを判断し、各等級について予め定められた密度しきい値のうち、当該面積特徴量が属する等級に係る密度しきい値と密度特徴量とを比較して、絵柄であるか否かを表す情報(本発明にいう分類情報)を生成する。   That is, in the present embodiment, for each connected region, it is determined which of the plurality of classes the area feature amount belongs to, and the area of the density threshold value that is predetermined for each class. The density threshold value related to the class to which the feature quantity belongs is compared with the density feature quantity to generate information (classification information referred to in the present invention) indicating whether or not the pattern is a pattern.

具体的に本実施の形態の属性判定部34は、上記最小面積を表す第1の面積しきい値α1と、最大面積を表す第2の面積しきい値α2(ただし、α1<α2)並びに、第1、第2の密度しきい値(ρ1,ρ2)を予め定めておき、これらのしきい値を用いて、次のように判定する。   Specifically, the attribute determination unit 34 of the present embodiment includes a first area threshold value α1 representing the minimum area, a second area threshold value α2 representing the maximum area (where α1 <α2), First and second density threshold values (ρ1, ρ2) are determined in advance, and the determination is performed as follows using these threshold values.

すなわち属性判定部34は、図4に示すように、スケール特徴量データベースに含まれる連結領域のうち、この処理で未だ選択されていない連結領域の一つを注目領域として選択する(S1)。そしてこの注目領域に関連づけられたスケール特徴量を読み出して、当該スケール特徴量に含まれる面積Aが、第1の面積しきい値α1未満となっているか否か(A<α1か否か)を調べる(S2)。ここで、A<α1であれば、注目領域を非絵柄領域として判定し、注目領域の識別子(例えばラベル識別子)と、その判定結果(非絵柄領域である旨を表す情報)とを関連づけて記憶部12に格納し(S3)、スケール特徴量データベース内にこの処理で未だ選択されていない連結領域があるか否かを調べて(S4)、未選択の連結領域があれば(Yesならば)、処理S1に戻って処理を続ける。また、処理S4において、未選択の連結領域がなければ(Noならば)、つまりすべての連結領域について判定を終了したならば、処理を終了する。   That is, as shown in FIG. 4, the attribute determination unit 34 selects one of the connected areas not yet selected in this process as a target area from the connected areas included in the scale feature amount database (S1). Then, the scale feature quantity associated with the region of interest is read, and whether or not the area A included in the scale feature quantity is less than the first area threshold value α1 (A <α1 or not). Check (S2). Here, if A <α1, the region of interest is determined as a non-picture region, and the identifier of the region of interest (for example, a label identifier) and the determination result (information indicating that the region is a non-pattern region) are stored in association with each other. It is stored in the unit 12 (S3), and it is checked whether or not there is a connected area not yet selected in this process in the scale feature database (S4). If there is an unselected connected area (if Yes) Then, the process returns to the process S1 to continue the process. Further, if there is no unselected connected region in the process S4 (if No), that is, if the determination is completed for all the connected regions, the process is ended.

また、処理S2において、A<α1でなければ、続いて注目領域の面積Aが第2の面積しきい値α2を越えているか否か(A>α2であるか否か)を調べ(S5)、A>α2であれば、注目領域のスケール特徴量の一つである黒画素密度Dが、第1の密度しきい値ρ1未満であるか否か(D<ρ1か否か)を調べ(S6)、D<ρ1であれば、注目領域が絵柄領域である判定して、注目領域の識別子(例えばラベル識別子)と、その判定結果(絵柄領域である旨を表す情報)とを関連づけて記憶部12に格納し(S7)、処理S4に移行する(Y)。さらに処理S6において、D<ρ1でなければ、処理S3に移行(X)して(つまり非絵柄領域と判定して)処理を続ける。   If it is determined in step S2 that A <α1 is not satisfied, whether or not the area A of the attention area exceeds the second area threshold value α2 (whether A> α2) is checked (S5). If A> α2, it is checked whether or not the black pixel density D, which is one of the scale feature quantities of the region of interest, is less than the first density threshold ρ1 (whether D <ρ1) ( S6) If D <ρ1, it is determined that the region of interest is a picture region, and an identifier of the region of interest (for example, a label identifier) and a result of the determination (information indicating that the region is a pattern region) are stored in association with each other. The data is stored in the unit 12 (S7), and the process proceeds to S4 (Y). Furthermore, if D <ρ1 is not satisfied in process S6, the process proceeds to process S3 (X) (that is, determined as a non-picture area) and the process is continued.

また、処理S5において、A>α2でなければ、注目領域のスケール特徴量の一つである黒画素密度Dが、第2の密度しきい値ρ2未満であるか否か(D<ρ2か否か)を調べ(S8)、D<ρ2であれば、処理S3に移行(X)して(つまり非絵柄領域と判定して)処理を続け、D<ρ2でなければ、処理S7に移行(Z)して(つまり絵柄領域と判定して)処理を続ける。なお、第1,第2の密度しきい値ρ1,ρ2は、それぞれ実験によって線画等を抽出するのに適した値と、文字等を抽出するのに適した値とに定める。   In step S5, if A> α2, if not, the black pixel density D, which is one of the scale feature amounts of the region of interest, is less than the second density threshold value ρ2 (D <ρ2). (S8), if D <ρ2, the process proceeds to process S3 (X) (that is, it is determined as a non-picture area) and the process continues. If D <ρ2, the process proceeds to process S7 ( Z) (that is, it is determined as a picture area) and the processing is continued. The first and second density threshold values ρ1 and ρ2 are determined to be values suitable for extracting line drawings and the like by experiments and values suitable for extracting characters and the like.

また、面積特徴量又は面積しきい値の少なくとも一方を、処理対象となっている画像データの解像度に基づいて補正してもよい。例えば面積しきい値α1,α2が解像度r0で設定された値である場合において、処理対象となった画像データの解像度がrであったとき、第1の面積しきい値α1を(r/r0)×α1に補正し、第2の面積しきい値α2を(r/r0)×α2に補正する。   Further, at least one of the area feature amount or the area threshold value may be corrected based on the resolution of the image data to be processed. For example, when the area threshold values α1 and α2 are values set at the resolution r0, when the resolution of the image data to be processed is r, the first area threshold value α1 is set to (r / r0). ) × α1 and the second area threshold value α2 is corrected to (r / r0) × α2.

非絵柄領域処理部35は、属性判定部34によって生成されて記憶部12に格納されている、各連結領域ごとの判定結果を参照して、絵柄領域特定画像データのうち、非絵柄領域と判定された連結領域に含まれる黒画素を白画素に変換して、非絵柄領域と背景とが白画素となっている絵柄領域特定画像データを生成する。   The non-design area processing unit 35 refers to the determination result for each connected area that is generated by the attribute determination unit 34 and stored in the storage unit 12, and is determined to be a non-design area in the design area specifying image data. The black pixels included in the connected area are converted into white pixels, and the image area specifying image data in which the non-picture area and the background are white pixels is generated.

背景領域塗潰部36は、非絵柄領域と背景とが白画素となっている絵柄領域特定画像データに対して、絵柄部分の境界と連結している白画素を、所定の値(白、黒以外の任意の色)で塗りつぶす。ここでは、広く知られているような、閉じた領域(閉曲線で囲まれた内部又は外部)を塗つぶす処理を用いる。絵柄候補領域作成部37は、背景領域塗潰部36によって所定の値で塗潰されなかった画素の色を黒に設定する。この絵柄候補領域作成部37によって黒画素に設定された部分を絵柄候補領域として扱うことになる。   The background area filling unit 36 sets white pixels connected to the boundary of the pattern portion to predetermined values (white, black, etc.) for the pattern area specifying image data in which the non-pattern area and the background are white pixels. Fill with any color other than Here, a process of painting a closed region (inside or outside surrounded by a closed curve) as is widely known is used. The pattern candidate area creation unit 37 sets the color of the pixels that have not been painted with the predetermined value by the background area painting unit 36 to black. A portion set as a black pixel by the pattern candidate area creation unit 37 is handled as a pattern candidate area.

この方法による絵柄候補部分特定処理部22の動作について説明する。以下、図5(a)に示す画像データを処理対象とする場合を例として説明する。なお、図示の都合上、図5(a)においては、全体を線図で示しているが、図5(a)には、写真部分Pと、テキスト部分Tと、線図部分Gと、地図などの図版部分Mとが含まれているものとする。また、地図M内には、地図を構成する線分と一部重なり合う文字等が記述されている場合がある(X)。例えば道路名を示す文字などは、他の道路と重なり合って示されていることも多い。   The operation of the pattern candidate portion specifying processing unit 22 by this method will be described. Hereinafter, a case where the image data illustrated in FIG. 5A is a processing target will be described as an example. For convenience of illustration, FIG. 5A shows the whole as a diagram, but FIG. 5A shows a photograph portion P, a text portion T, a diagram portion G, and a map. And a plate part M such as Further, in the map M, there are cases where characters or the like partially overlapping with the line segments constituting the map are described (X). For example, letters indicating road names are often shown overlapping other roads.

絵柄候補部分特定処理部22がこれを二値化処理して(図5(b))、連結画素を抽出し、各連結画素についての特徴量に基づき小領域除去の処理を行う。すると絵柄領域特定画像データは、図5(c)に示すように、テキスト部分(T)が除かれた状態となる。なお図5においては線図部分Gの黒画素密度が比較的高いので、当該線図部分Gは除去されずに残存した状態となっている。また、地図部分M内において線分と重なり合っている文字は、当該重なり合う線分と一体として連結画素として抽出されてしまう。このためこの連結画素を囲む矩形の面積が大きくなり、小領域として除去されず、残存することとなる(図5(c)のX)。   The pattern candidate portion specifying processing unit 22 binarizes this (FIG. 5B), extracts connected pixels, and performs a small area removal process based on the feature amount for each connected pixel. Then, the pattern area specifying image data is in a state where the text portion (T) is removed as shown in FIG. In FIG. 5, since the black pixel density of the diagram portion G is relatively high, the diagram portion G remains without being removed. In addition, the characters that overlap the line segment in the map portion M are extracted as connected pixels together with the overlapping line segment. For this reason, the area of the rectangle surrounding the connected pixel is increased, and is not removed as a small region, but remains (X in FIG. 5C).

絵柄候補部分特定処理部22は、背景となっている白画素部分Bを所定の色で塗潰し(図5(d))、さらにこの所定の色で塗潰された部分以外の部分を黒画素とする。ここで背景となっている部分を塗潰す方法としては、画像データの四隅(左上、右上、左下、右下の四隅)から線分によって仕切られない領域を塗潰す、一般的なペイント処理を利用する方法を採ることができる。そして絵柄候補部分特定処理部22は、上記所定の色部分を白画素に戻す。すると、図5(e)に示すように、絵柄候補となる部分が黒画素となり、それ以外の部分が白画素となっているような絵柄領域特定画像データが得られることとなる。   The pattern candidate portion specifying processing unit 22 fills the white pixel portion B, which is the background, with a predetermined color (FIG. 5D), and further black pixels other than the portion painted with the predetermined color. And As a method of painting the background part here, use the general paint processing that paints the area that is not partitioned by line segments from the four corners of the image data (upper left, upper right, lower left, lower right corners). Can be taken. Then, the pattern candidate part specifying unit 22 returns the predetermined color part to a white pixel. Then, as shown in FIG. 5 (e), pattern area specifying image data is obtained in which the pattern candidate part is a black pixel and the other part is a white pixel.

この処理によれば、二値化データを利用した負荷の低い処理によって、背景部分を除く絵柄部分を特定することができるようになる。   According to this process, the pattern part excluding the background part can be specified by a low-load process using the binarized data.

[2b.第2の方法]
次に絵柄候補部分特定処理部22の別の処理方法について説明する。この絵柄候補部分特定処理部22による処理は図3(b)に示すように、機能的に、二値化処理部31と、連結画素抽出部32と、特徴量算出部33と、属性判定部34と、非絵柄領域処理部35と、膨張収縮部38と、背景領域塗潰部36と、絵柄候補領域作成部37とを含んで構成される。なお、既に説明した構成と同様の動作を行う部分については同じ符号を付して詳細な説明を省略する。
[2b. Second method]
Next, another processing method of the pattern candidate portion specifying processing unit 22 will be described. As shown in FIG. 3 (b), the processing by the pattern candidate portion specifying processing unit 22 is functionally a binarization processing unit 31, a connected pixel extraction unit 32, a feature amount calculation unit 33, and an attribute determination unit. 34, a non-pattern region processing unit 35, an expansion / contraction unit 38, a background region painting unit 36, and a pattern candidate region creation unit 37. Note that portions that perform the same operations as those already described are denoted by the same reference numerals, and detailed description thereof is omitted.

予め概要を説明すれば、この処理方法を行う絵柄候補部分特定処理部22は、非絵柄領域処理部35によって絵柄領域特定画像データのうち、非絵柄領域と判定された連結領域に含まれる黒画素を白画素に変換した後の絵柄領域特定画像データに対して、膨張収縮処理を行うものである。   If the outline is explained in advance, the pattern candidate part specifying processing unit 22 that performs this processing method includes the black pixels included in the connected area determined as the non-pattern area in the pattern area specifying image data by the non-pattern area processing unit 35. Expansion / contraction processing is performed on the image area specifying image data after the image is converted into white pixels.

膨張収縮部38は、非絵柄領域処理部35によって絵柄領域特定画像データのうち、非絵柄領域と判定された連結領域に含まれる黒画素を白画素に変換した後の絵柄領域特定画像データに含まれる画素を順次注目画素として選択する。   The expansion / contraction unit 38 is included in the pattern area specifying image data after the black pixels included in the connected area determined as the non-pattern area in the pattern area specifying image data by the non-pattern area processing unit 35 are converted into white pixels. The selected pixels are sequentially selected as the target pixel.

そして膨張収縮部38は、注目画素の近傍(上下左右の画素からなる4近傍または、周辺8画素の8近傍)に黒画素が一つでもあれば、当該注目画素を黒画素とする処理(膨張処理)を行って、黒画素部分を膨張させて、次の注目画素を選択する。この選択順序は、上から下へとラインを走査し、ライン内は左から右へと走査する順序(いわゆるラスタスキャン順)とすればよい。   Then, the expansion / contraction unit 38 performs processing (expansion) when the pixel of interest is a black pixel if there is at least one black pixel in the vicinity of the pixel of interest (four neighborhoods of upper, lower, left, and right pixels or eight neighborhoods of the surrounding eight pixels). Process) to expand the black pixel portion and select the next pixel of interest. The selection order may be the order in which lines are scanned from top to bottom and the lines are scanned from left to right (so-called raster scan order).

膨張収縮部38は、すべての画素に対する膨張処理を完了すると、再び、各画素を順次注目画素として選択しながら収縮処理を開始する。収縮処理では、注目画素の近傍(4近傍または8近傍)に白画素が一つでもあれば、注目画素を白画素とする。そして、全画素について収縮処理が完了すると、膨張収縮部38の処理を終了する。   When the expansion / contraction unit 38 completes the expansion processing for all the pixels, the expansion / contraction unit 38 again starts the contraction processing while sequentially selecting each pixel as the target pixel. In the contraction process, if there is at least one white pixel in the vicinity of the pixel of interest (near 4 or 8), the pixel of interest is set as a white pixel. Then, when the contraction process is completed for all the pixels, the process of the expansion / contraction unit 38 ends.

この場合、背景領域塗潰部36は、膨張収縮部38によって処理された後の絵柄領域特定画像データに対して、絵柄部分の境界と連結している背景部分の白画素を、所定の値(白、黒以外の任意の色)で塗りつぶすことになる。   In this case, the background area filling unit 36 sets the white pixels in the background part connected to the boundary of the pattern part to a predetermined value (with respect to the pattern area specifying image data processed by the expansion / contraction part 38). Any color other than white or black) will be painted.

このように膨張収縮処理を行うことによって、網点の領域が背景領域と区別されて絵柄領域として認識され易くなる。   By performing the expansion / contraction process in this manner, the halftone dot region is easily distinguished from the background region and recognized as a pattern region.

また、膨張収縮部38は、非絵柄領域処理部35によって絵柄領域特定画像データのうち、非絵柄領域と判定された連結領域に含まれる黒画素を白画素に変換した後の絵柄領域特定画像データを一旦ランレングスのデータに変換した上で上記処理を行い、処理後にビットマップのデータに戻して出力することとしてもよい。   Further, the expansion / contraction unit 38 has the pattern area specifying image data obtained by converting the black pixels included in the connected area determined to be the non-pattern area in the pattern area specifying image data by the non-pattern area processing unit 35 into white pixels. May be converted into run-length data and then the above process may be performed, and after the process, the data may be returned to the bitmap data and output.

ここでランレングスのデータとは、ラスタスキャン順に同一画素値が連続して現れる場合に、当該一連の画素値に代えて、当該画素値を特定する情報一つと連続回数とからなるデータに変換したものである。   Here, the run-length data is converted into data consisting of one piece of information for specifying the pixel value and the number of consecutive times instead of the series of pixel values when the same pixel value appears successively in the raster scan order. Is.

なお、ここまでの第1、第2の方法の説明では、背景領域塗潰部36は、背景部分を所定の色で塗り潰すこととしているが、これに代えて次のようにしてもよい。すなわち、連結領域の抽出にラベリング処理を用いている場合に、当該抽出の際に得られた最大のラベルの値より大きい値(例えば最大のラベル値に1を加えた値)のラベル(背景特定ラベル)を背景部分の画素のラベルに置換えて設定していくこととしてもよい。この場合、絵柄候補領域作成部37は、当該背景特定ラベルが付されていない画素を黒画素に設定することで、図5(e)に示した絵柄領域特定画像データを生成してもよい。   In the description of the first and second methods thus far, the background region painting unit 36 paints the background portion with a predetermined color, but instead of this, the following may be used. That is, when a labeling process is used to extract a connected region, a label (background identification) that is larger than the maximum label value obtained at the time of extraction (for example, a value obtained by adding 1 to the maximum label value). (Label) may be set by replacing the label of the pixel in the background portion. In this case, the pattern candidate area creation unit 37 may generate the pattern area specific image data shown in FIG. 5E by setting the pixels not attached with the background specific label to black pixels.

この処理によれば、二値化データを利用した負荷の低い処理によって、背景部分を除く絵柄部分を特定することができるようになる。また、膨張・収縮処理を行っていることで、網点で構成されている部分も絵柄として特定できるようになる。   According to this process, the pattern part excluding the background part can be specified by a low-load process using the binarized data. In addition, by performing the expansion / contraction process, it is possible to specify a portion constituted by halftone dots as a design.

[2c.第3の方法]
さらに絵柄候補部分特定処理部22による処理は、ラベリング処理後、ラベリングされた各領域が境界に接するか否かを判断して、それによって絵柄か否かを判定するものであってもよい。具体的にこの場合の処理例は、図3(c)に示すように、機能的に、二値化処理部31と、連結画素抽出部32と、特徴量算出部33と、属性判定部34と、非絵柄領域処理部35と、反転ラベリング処理部41と、境界判定部42と、領域除去部43と、絵柄候補領域作成部44とを含んで構成される。なお、二値化処理部31、連結画素抽出部32、特徴量算出部33、属性判定部34、並びに非絵柄領域処理部35は、既に説明したものと同様の処理を行うものであるので、その詳細な説明を省略する。
[2c. Third method]
Furthermore, the process by the pattern candidate portion specifying processing unit 22 may determine whether or not each labeled area touches the boundary after the labeling process, thereby determining whether or not the pattern is a pattern. Specifically, as shown in FIG. 3C, the processing example in this case is functionally a binarization processing unit 31, a connected pixel extraction unit 32, a feature amount calculation unit 33, and an attribute determination unit 34. And a non-design region processing unit 35, an inversion labeling processing unit 41, a boundary determination unit 42, a region removal unit 43, and a design candidate region creation unit 44. The binarization processing unit 31, the connected pixel extraction unit 32, the feature amount calculation unit 33, the attribute determination unit 34, and the non-picture area processing unit 35 perform the same processing as already described. Detailed description thereof is omitted.

反転ラベリング処理部41は、非絵柄領域処理部35が出力するデータ(非絵柄領域と背景とが白画素となっている絵柄領域特定画像データ)の白画素部分についてラベリング処理(連結領域ごとに異なるラベルを付与する処理)を行う。具体的に非絵柄領域処理部35が出力するデータが図6(a)に示すようなものであるとすると、そのラベリング処理結果は、図6(b)に示すようなものとなる。この図6(b)ではラベルの付与された部分を黒色で示し、ラベルの付与されていない部分を白色で示している。また、図6(b)において、ラベルの値を丸で囲んだ数字で示している。なお、左下の雪だるまの上部分と、右上のバスの行先表示部分及び2つのヘッドライト部分については、図示の都合上、欄外にラベルの値を示している。   The inversion labeling processing unit 41 performs labeling processing (different for each connected region) on the white pixel portion of the data output from the non-pattern region processing unit 35 (pattern region specific image data in which the non-pattern region and the background are white pixels). Process to give a label). Specifically, if the data output by the non-picture area processing unit 35 is as shown in FIG. 6A, the result of the labeling process is as shown in FIG. 6B. In FIG. 6B, a portion to which a label is attached is shown in black, and a portion to which no label is attached is shown in white. In FIG. 6B, the label value is indicated by a circled number. Note that for the upper left snowman, the upper right bus destination display portion, and the two headlight portions, the label values are shown outside the box for the sake of illustration.

境界判定部42は、各ラベルの付与された各連結領域(又はその外接矩形)が画像データの境界(端部)に接しているか否かを調べ、接しているラベルの一覧を生成する。具体的に図6(b)に示した例の場合、ラベル「1」の連結領域以外は、画像データの境界に接していないので、一覧にはラベル「1」のみが含まれることとなる。   The boundary determination unit 42 checks whether or not each connected region (or its circumscribed rectangle) to which each label is attached is in contact with the boundary (end) of the image data, and generates a list of labels in contact. Specifically, in the case of the example shown in FIG. 6B, since only the connected region of the label “1” is not in contact with the boundary of the image data, only the label “1” is included in the list.

領域除去部43は、一覧に含まれるラベルの連結領域を残して、他の連結領域についてのラベルを除去する。この結果、図6(c)に示すように、ラベル「1」以外の領域についてはラベルが付与されていない状態となる。この図6(c)でもラベルの付与された部分を黒色で示し、ラベルの付与されていない部分を白色で示している。   The area removing unit 43 removes the labels for the other connected areas while leaving the connected areas of the labels included in the list. As a result, as shown in FIG. 6C, the area other than the label “1” is not given a label. In FIG. 6C as well, the part with the label is shown in black, and the part without the label is shown in white.

絵柄候補領域作成部44は、ラベルが付与されている連結領域を黒画素、ラベルの付与されている連結領域を白画素とした画像データを絵柄候補領域の画像データとして生成して出力する。すると、図6(d)に示すように、絵柄候補となる部分が黒画素となり、それ以外の部分が白画素となっているような絵柄領域特定画像データが得られることとなる。   The picture candidate area creation unit 44 generates and outputs image data in which the connected area to which the label is attached is a black pixel and the connected area to which the label is attached is a white pixel as image data of the candidate pattern area. Then, as shown in FIG. 6D, pattern area specifying image data is obtained in which the part that is a pattern candidate is a black pixel and the other part is a white pixel.

本実施の形態では、この絵柄領域候補を特定する処理において文字部分を絵柄と誤判定しても、後に行われるレイアウト処理によって文字部分がさらに抽出されるので、絵柄候補領域の抽出精度が比較的低くても構わない。制御部11は、特定された絵柄候補領域の各々を規定する座標情報(以下、絵柄候補領域画定情報と呼ぶ)を記憶部12に格納する。   In the present embodiment, even if the character part is erroneously determined as a pattern in the process of specifying the pattern area candidate, the character part is further extracted by the layout process performed later, so that the extraction accuracy of the pattern candidate area is relatively high. It can be low. The control unit 11 stores coordinate information (hereinafter referred to as “design candidate area definition information”) that defines each of the identified design candidate areas in the storage unit 12.

この処理によれば、簡便な処理によって背景を除く絵柄候補部分を特定できる。また、この処理では、絵柄部分に囲まれた、いわば中空部分(図6の例でいえば雪だるまの内部やバスのフロントガラスやヘッドランプ部分など)については、背景とならずに絵柄候補部分に含まれることとなる。   According to this process, the pattern candidate part excluding the background can be specified by a simple process. Also, in this process, so-called hollow portions (in the example of FIG. 6 such as the inside of a snowman, the windshield of the bus, the headlamp portion, etc.) surrounded by the pattern portion are used as the pattern candidate portion without being the background. Will be included.

[2d.非絵柄領域処理の他の例]
また、ここまでの説明における、二値化処理部31と連結画素抽出部32と特徴量算出部33と属性判定部34と非絵柄領域処理部35との処理に代えて、図7に示す処理を用いてもよい。すなわち、絵柄候補部分特定処理部22によるこの処理は、図7に示すように、二値化処理部71と、ラベリング処理部72と、サイズ情報演算部73と、有意画素距離情報演算部74と、判定部75とを機能的に含む。
[2d. Other examples of non-picture area processing]
In addition, instead of the processing of the binarization processing unit 31, the connected pixel extraction unit 32, the feature amount calculation unit 33, the attribute determination unit 34, and the non-picture area processing unit 35 in the above description, the processing shown in FIG. May be used. That is, as shown in FIG. 7, this processing by the pattern candidate portion specifying processing unit 22 includes a binarization processing unit 71, a labeling processing unit 72, a size information calculation unit 73, and a significant pixel distance information calculation unit 74. And a determination unit 75 functionally.

ここで二値化処理部71は、前処理部21が出力する処理対象画像データの一部(例えば四隅部分)の画素の値を参照し、その輝度の平均値等によって二値化しきい値を定める。そして処理対象画像データを記憶部12上で複写し、複写した画像データの各画素について、当該定めた二値化しきい値よりも輝度の高い画素については「白(背景画素)」、輝度の低い画素については「黒(有意画素)」の画素値を割当てて、二値化画像データを生成する。ここでの二値化しきい値よりも輝度が高いとの条件が本発明の背景画素条件に相当する。   Here, the binarization processing unit 71 refers to the pixel values of a part (for example, the four corners) of the processing target image data output from the preprocessing unit 21, and sets the binarization threshold value based on the average value of the luminance. Determine. Then, the processing target image data is copied on the storage unit 12, and for each pixel of the copied image data, “white (background pixel)” is set for a pixel whose luminance is higher than the predetermined binarization threshold, and the luminance is low. The pixel value of “black (significant pixel)” is assigned to the pixel to generate binarized image data. The condition that the luminance is higher than the binarization threshold here corresponds to the background pixel condition of the present invention.

ラベリング処理部72は、二値化画像データから、当該画像データの端部又は背景画素によって互いに仕切られた、黒画素の連結部分を連結画素領域として抽出して、各連結画素領域ごとに固有の識別子(ラベル)を設定する。具体的には、二値化画像データ内の画素数と同数の識別子を格納するためのデータ領域を記憶部12に確保し、このデータ領域上で各有意画素に対応する位置に当該有意画素が属する連結画素領域のラベルを格納する。   The labeling processing unit 72 extracts, from the binarized image data, a black pixel connection portion, which is partitioned from each other by an edge of the image data or a background pixel, as a connection pixel region, and is unique to each connection pixel region. Set the identifier (label). Specifically, a data area for storing the same number of identifiers as the number of pixels in the binarized image data is secured in the storage unit 12, and the significant pixel is located at a position corresponding to each significant pixel in the data area. Stores the label of the connected pixel region to which it belongs.

すなわち、このラベリング処理部72は、いわゆるラベリング処理を行うもので、隣接した有意画素同士が連結して一つの塊を形成している画素群(連結画素領域)を特定し、当該連結画素領域に含まれる各有意画素にラベルを設定するものである。   That is, the labeling processing unit 72 performs a so-called labeling process, specifies a pixel group (connected pixel region) in which adjacent significant pixels are connected to form one lump, and the connected pixel region A label is set for each significant pixel included.

サイズ情報演算部73は、ラベリング処理部72にて付与されたラベルごとに、当該ラベルに対応する連結画素領域を注目領域として選択し、当該注目領域のサイズに関係する情報(サイズ値)を演算して、当該ラベルに関連付けて、サイズ関係情報として記憶部12に格納する。   For each label given by the labeling processing unit 72, the size information calculation unit 73 selects a connected pixel region corresponding to the label as the attention region, and calculates information (size value) related to the size of the attention region. Then, it is stored in the storage unit 12 as size relation information in association with the label.

具体的に、ここでのサイズに関係する情報は、注目領域内の有意画素の数や、注目領域に関係する所定の幾何形状のサイズに関する情報(例えば注目領域に外接する矩形を画定する座標情報から得られる矩形の幅や高さ、面積など)である。   Specifically, the information related to the size here is information regarding the number of significant pixels in the attention area and the size of a predetermined geometric shape related to the attention area (for example, coordinate information defining a rectangle circumscribing the attention area) The width, height, area, etc. of the rectangle obtained from

有意画素距離情報演算部74は、二値画像データのうち、各有意画素について、当該有意画素から隣接する有意画素を辿って背景画素まで至るまでの距離を、有意画素距離情報として生成する。この有意画素距離情報の演算方法は種々のものがあるが、その一例について次に説明する。   The significant pixel distance information calculation unit 74 generates, for each significant pixel in the binary image data, the distance from the significant pixel to the adjacent significant pixel to the background pixel as significant pixel distance information. There are various methods for calculating the significant pixel distance information. One example will be described below.

この有意画素距離情報演算部74は、上記二値画像データと同じサイズのビットマップデータを格納する領域を記憶部12に確保し、二値画像データ上で、座標(i,j)にある画素の値を、そのままf0(i,j)として取得する。そして記憶部12に確保したビットマップデータ上で当該座標(i,j)に対応する位置のデータをf0(i,j)に設定する。これにより、まずビットマップデータ上に二値画像データがそのまま複写される。   The significant pixel distance information calculation unit 74 secures an area for storing bitmap data having the same size as the binary image data in the storage unit 12, and a pixel at coordinates (i, j) on the binary image data. Is directly obtained as f0 (i, j). And the data of the position corresponding to the said coordinate (i, j) on the bitmap data ensured in the memory | storage part 12 are set to f0 (i, j). Thereby, the binary image data is first copied as it is onto the bitmap data.

次に、ビットマップデータのうち、左上隅の画素に相当する位置のデータ、つまり(0,0)の位置にあるデータから順に、ラスタスキャン順に走査しながら、次の(2)式により位置(i,j)にあるデータをf1(i,j)に更新する。   Next, in the bitmap data, the data at the position corresponding to the pixel at the upper left corner, that is, the data at the position (0, 0) is sequentially scanned in the raster scan order, and the position ( Update the data in i, j) to f1 (i, j).

Figure 2005210650
Figure 2005210650

有意画素距離情報演算部74は、すべての画素について上記更新の処理を完了すると、更新後のビットマップデータについてさらに(0,0)の位置にあるデータから順に、ラスタスキャンの逆順(右下の画素から左上の画素へと1ラインずつ)に走査しながら、次の(3)式により位置(i,j)にあるデータ(f1(i,j))を、f2(i,j)に更新する。   When the update processing for all the pixels is completed, the significant pixel distance information calculation unit 74 further reverses the raster scan (in the lower right) in order from the data at the position (0, 0) with respect to the updated bitmap data. The data (f1 (i, j)) at the position (i, j) is updated to f2 (i, j) by the following equation (3) while scanning from the pixel to the upper left pixel one line at a time) To do.

Figure 2005210650
Figure 2005210650

これにより、図8(a)に示すような二値画像データに基づいて、図8(b)に示すビットマップデータが生成される。なお、(2),(3)式において、min[x,y,…]は、括弧内([]内)の値のうち、最小となるものを選択することを意味する。   As a result, the bitmap data shown in FIG. 8B is generated based on the binary image data shown in FIG. In equations (2) and (3), min [x, y,...] Means that the smallest value is selected from the values in parentheses (in []).

有意画素距離情報演算部74はさらに、ラベリング処理部72にて特定された連結画素領域のうちから順次一つずつ注目領域として選択し、当該注目領域に属する画素に対応するビットマップデータのうち、最大値となっているものを選択し、注目領域に関連するラベルと当該選択した最大値(いわば注目領域を構成する画素塊の幅に関する特徴量)とを関連付けて、有意画素距離情報として記憶部12に格納する。   The significant pixel distance information calculation unit 74 further selects each of the connected pixel regions specified by the labeling processing unit 72 as a region of interest one by one from the bitmap data corresponding to the pixels belonging to the region of interest, A storage unit is selected as the significant pixel distance information by selecting the maximum value and associating the label associated with the region of interest with the selected maximum value (so-called feature amount related to the width of the pixel block constituting the region of interest). 12.

判定部75は、有意画素距離情報演算部74によって生成された有意画素距離情報と、サイズ情報演算部73によって生成されたサイズ関係情報とを参照しながら、ラベリング処理部72によって特定された連結画素領域の各々が「文字線画」と、「絵柄」とのどちらのカテゴリに属するかを判定して分類する。   The determination unit 75 refers to the connected pixel specified by the labeling processing unit 72 while referring to the significant pixel distance information generated by the significant pixel distance information calculation unit 74 and the size relationship information generated by the size information calculation unit 73. It is classified by determining whether each of the areas belongs to a “character / line drawing” or “picture” category.

具体的にこの判定部75は、記憶部12に格納されているサイズ関係情報から、各ラベルに関連付けられたサイズ値を読み出す。そして各ラベルごとのサイズ値で、対応するラベルに関連付けて有意画素距離情報として記憶部12に格納されている特徴量を除して、ラベルごとに、その特徴量がサイズ値に対してどの程度の大きさとなっているかによって、当該ラベルに対応する連結画素領域が「文字線画」と、「絵柄」とのどちらのカテゴリに属するかを判定する。一般に、文字線画であれば、サイズ値に比べ特徴量は小さくなる(比較的細い線によって構成される)。そこで判定部75は、特徴量がサイズ値に対して所定のしきい値より小さいときに、そのラベルに対応する連結画素領域は文字線画であると判定し、特徴量がサイズ値に対して所定のしきい値より大きいときに、そのラベルに対応する連結画素領域は絵柄であると判定する。   Specifically, the determination unit 75 reads the size value associated with each label from the size relation information stored in the storage unit 12. And by the size value for each label, the feature quantity stored in the storage unit 12 as significant pixel distance information in association with the corresponding label is divided, and for each label, how much the feature quantity is relative to the size value It is determined whether the connected pixel region corresponding to the label belongs to the category “character / line drawing” or “picture”. In general, in the case of a character line drawing, the feature amount is smaller than the size value (configured by relatively thin lines). Therefore, when the feature amount is smaller than a predetermined threshold with respect to the size value, the determination unit 75 determines that the connected pixel region corresponding to the label is a character line drawing, and the feature amount is predetermined with respect to the size value. When the threshold value is larger than the threshold value, it is determined that the connected pixel region corresponding to the label is a picture.

また判定部75は、連結画素領域ごとに、そのサイズ値が予めさだめたしきい値を越える場合にのみ、当該連結画素領域が「文字線画」と「絵柄」とのどちらのカテゴリに属するかを判定することとしてもよい。   In addition, for each connected pixel area, the determination unit 75 determines whether the connected pixel area belongs to the “character / line image” or “picture” category only when the size value exceeds a predetermined threshold value. It may be determined.

すなわち判定部75は、ラベルごとに、それに関連付けられたサイズ値を参照し、当該サイズ値が予め定めたノイズしきい値を越えない場合は、当該ラベルに対応する連結画素領域を「ノイズ」と判定する。   That is, the determination unit 75 refers to the size value associated with each label, and when the size value does not exceed a predetermined noise threshold, the connected pixel region corresponding to the label is set to “noise”. judge.

また、当該サイズ値が予め定めたノイズしきい値を越える場合は、当該サイズ値に関係する所定関数によってしきい値を判定し、このしきい値と上記ラベルに関連付けられた特徴量とを比較する。そして、当該特徴量がしきい値を越えている場合に、当該ラベルに対応する連結画素領域を「絵柄」と判定し、そうでない場合(当該特徴量がしきい値を越えていない場合)は、当該ラベルに対応する連結画素領域を「文字線画」と判定する。   When the size value exceeds a predetermined noise threshold value, the threshold value is determined by a predetermined function related to the size value, and the threshold value is compared with the feature amount associated with the label. To do. When the feature amount exceeds the threshold value, the connected pixel area corresponding to the label is determined as “picture”, and otherwise (when the feature amount does not exceed the threshold value). The connected pixel area corresponding to the label is determined as “character line drawing”.

ここで上記所定関数は、所定最低値から所定限界値へと対数関数的に漸近する関数としてもよい。このようにすると、サイズ値に対する特徴量に応じて、図9に示すように判断が為されることになる。   Here, the predetermined function may be a function that gradually approaches a predetermined logarithmic function from a predetermined minimum value to a predetermined limit value. In this way, a determination is made as shown in FIG. 9 according to the feature amount with respect to the size value.

そして判定部75は、ラベルごと(連結画素領域ごと)の判定結果を記憶部12に格納して処理を終了する。なお、ノイズと判定されたラベルについては、その判定結果を格納しないようにしてもよい。判定部75は、絵柄と判定した連結画素領域については黒色、それ以外は白色の画素とした画像データを生成して出力する。   Then, the determination unit 75 stores the determination result for each label (for each connected pixel region) in the storage unit 12 and ends the process. In addition, about the label determined as noise, you may make it not store the determination result. The determination unit 75 generates and outputs image data in which the connected pixel region determined to be a pattern is black, and the other is a white pixel.

この画像データは、非絵柄領域処理部35が出力するデータ(非絵柄領域と背景とが白画素となっている絵柄領域特定画像データ)と同様に扱うことができる。ここで述べた処理によれば、細線部などが絵柄として判定されることがなくなり、絵柄候補部分の抽出の精度を高めることができるようになる。   This image data can be handled in the same way as the data output by the non-picture area processing unit 35 (the picture area specifying image data in which the non-picture area and the background are white pixels). According to the processing described here, a fine line portion or the like is not determined as a pattern, and the accuracy of extracting a pattern candidate portion can be improved.

なお、判定部75は、次に説明する文字線画抽出処理部23に対して、文字線画と判定した部分の連結画素領域の情報を出力してもよい。   Note that the determination unit 75 may output information on the connected pixel region of the portion determined to be a character / line image to the character / line image extraction processing unit 23 described below.

[2e.下地除去処理を行う例]
絵柄候補部分特定処理部22は、さらに、これらの処理によって生成した絵柄候補領域画定情報を用い、元の画像データのうち、絵柄候補領域以外の部分について下地除去処理を行ってもよい。この下地除去処理は、例えば次のようなものである。
[2e. Example of background removal processing]
The pattern candidate part specifying processing unit 22 may further perform the background removal process on the part other than the pattern candidate area in the original image data using the pattern candidate area defining information generated by these processes. This background removal processing is, for example, as follows.

すなわち、まず輝度(YCbCrであればY)のヒストグラムを生成し、演算されたヒストグラム上で、輝度の低い(暗い)側から探索して所定のしきい値を超える頻度となっている輝度値を取得して、この輝度値をTHD1とする。   That is, first, a histogram of luminance (Y if YCbCr) is generated, and on the calculated histogram, a luminance value having a frequency exceeding a predetermined threshold is searched from the low luminance (dark) side. The luminance value is acquired and is set as THD1.

そして、予め定められているパラメータk,c,dを用いて、THD1′=k・THD1+cと、THD2=d・THD1とを生成する。これらのパラメータは任意のTHD1について、k×THD1+c<d×THD1となるように設定されているものとする。   Then, THD1 ′ = k · THD1 + c and THD2 = d · THD1 are generated using predetermined parameters k, c, and d. These parameters are set so that k × THD1 + c <d × THD1 for an arbitrary THD1.

次に0からTHD1′の入力値に対しては出力値が0となり、x≧THD2であるような入力値xに対しては出力値がxとなり、THD1′≦x<THD2については、座標(THD1′,0)から(THD2,THD2)までを結んだ直線に対応する出力値となるLUTを生成する。   Next, for an input value from 0 to THD1 ′, the output value is 0, for an input value x such that x ≧ THD2, the output value is x, and for THD1 ′ ≦ x <THD2, the coordinates ( An LUT that generates an output value corresponding to a straight line connecting THD1 ′, 0) to (THD2, THD2) is generated.

そして、元の画像データのうち、絵柄候補領域以外の部分について上記生成したLUTを用いた輝度補正を行い、この輝度補正後の画像データを記憶部12に格納する。   Then, luminance correction using the generated LUT is performed on the original image data other than the pattern candidate region, and the image data after the luminance correction is stored in the storage unit 12.

すなわち本実施の形態においては、絵柄候補の領域を生成して、当該絵柄候補領域以外の部分について下地除去の処理を行ってもよい。   That is, in the present embodiment, a pattern candidate region may be generated, and the background removal processing may be performed on a portion other than the pattern candidate region.

[3.文字線画抽出処理部]
文字線画抽出処理部23は、前処理部21が出力するYCbCr色空間で表現された画像データ(又は絵柄候補部分特定処理部22が出力する輝度補正後の画像データでもよい)から文字線画部分を抽出する処理を行う。この処理は、例えば特許文献2に開示されている通りの処理を用いることができる。そして文字線画抽出処理部23は、個々の文字や、線画部分についてそれらを取囲む矩形(文字線画外接矩形)を生成し、その座標情報を記憶部12に格納する。
[3. Character line drawing extraction processing unit]
The character / line drawing extraction processing unit 23 extracts the character / line drawing part from the image data expressed in the YCbCr color space output from the preprocessing part 21 (or the image data after luminance correction output from the pattern candidate part specifying processing part 22). Perform the extraction process. For this processing, for example, processing as disclosed in Patent Document 2 can be used. Then, the character / line drawing extraction processing unit 23 generates a rectangle (character / line drawing circumscribed rectangle) surrounding each character or line drawing part, and stores the coordinate information in the storage unit 12.

また、この文字線画抽出処理部23は、絵柄候補部分特定処理部22が文字線画と判定される部分(連結画素領域)を特定する情報を出力している場合は、それを利用して、個々の文字や、線画部分についてそれらを取囲む矩形(文字線画外接矩形)を生成し、その座標情報を記憶部12に格納するようにしてもよい。   In addition, when the pattern candidate portion specifying processing unit 22 outputs information specifying a portion (concatenated pixel region) determined to be a character / line image, the character / line drawing extraction processing unit 23 uses the information to identify each portion. A rectangle (character / line drawing circumscribing rectangle) surrounding them may be generated for the characters and line drawing parts, and the coordinate information thereof may be stored in the storage unit 12.

[4.レイアウト処理部]
レイアウト処理部24は、絵柄候補部分特定処理部22が生成した絵柄候補領域画定情報と、文字線画抽出処理部23が生成した文字線画外接矩形の座標情報とを記憶部12から読み出す。
[4. Layout processing section]
The layout processing unit 24 reads, from the storage unit 12, the pattern candidate area defining information generated by the pattern candidate portion specifying processing unit 22 and the coordinate information of the character / line drawing circumscribing rectangle generated by the character / line drawing extraction processing unit 23.

レイアウト処理部24は、この絵柄候補領域画定情報によって画定される絵柄候補領域と、文字線画外接矩形の座標情報で画定される文字線画の領域とのそれぞれに対して互いに異なる判定条件を用いてレイアウト解析を行う。   The layout processing unit 24 performs layout using different determination conditions for each of the pattern candidate area defined by the pattern candidate area definition information and the character / line drawing area defined by the coordinate information of the circumscribed rectangle of the character / line drawing. Analyze.

具体的に本実施の形態においては、記憶部12から読出した絵柄候補領域画定情報によって画定される絵柄候補領域においてレイアウト解析処理を行い、当該絵柄候補領域の中からさらに文字部分の抽出を試みる。そして、抽出された文字部分を除く部分を絵柄領域として画定し、後段の処理に供する。   Specifically, in the present embodiment, layout analysis processing is performed in the pattern candidate area defined by the pattern candidate area definition information read from the storage unit 12, and further character portions are extracted from the pattern candidate area. Then, a portion excluding the extracted character portion is defined as a pattern region, and is used for subsequent processing.

本実施の形態におけるレイアウト処理部24は、文字から行、行から領域へと段階的に文字領域を画定し、当該画定した文字領域内の行の状態に基づいて文字列が含まれているかを判断し、文字列が含まれていないと判断される場合には、さらに行内(文字単位)の状態に基づいて文字が含まれているかを判断する。そして各文字と判定される部分に外接する矩形の情報(基本矩形の情報)と、文字を一行に配列した行に外接する矩形の情報(行矩形の情報)とを記憶部12に格納する。さらに、このレイアウト処理部24は、文字領域(文字領域の座標情報そのもの)または当該文字領域内の黒画素部分(文字領域の座標情報と、黒画素部分からなるビットマップ情報)を文字部分として特定し、当該文字部分を特定する情報(文字部分特定情報)を記憶部12に格納する。   In the present embodiment, the layout processing unit 24 demarcates a character area step by step from a character to a line and from a line to a region, and determines whether a character string is included based on the state of the line in the delimited character area. If it is determined that the character string is not included, it is further determined whether the character is included based on the in-line (character unit) state. Then, the storage unit 12 stores information on a rectangle circumscribing a portion determined to be each character (basic rectangle information) and information on a rectangle circumscribing a row in which characters are arranged in one line (row rectangle information). Further, the layout processing unit 24 specifies a character area (character area coordinate information itself) or a black pixel portion in the character area (character area coordinate information and bitmap information including the black pixel portion) as a character portion. Then, information for specifying the character part (character part specifying information) is stored in the storage unit 12.

なお、本実施の形態におけるレイアウト処理はこれに限られるものではなく、その他広く知られたレイアウト処理を用いても構わない。   Note that the layout processing in the present embodiment is not limited to this, and other well-known layout processing may be used.

本実施形態において特徴的なことの一つは、いわゆるT/I分離処理においてレイアウト解析を用いて文字部分を抽出することとしていることである。これによって絵柄候補領域に含まれる文字部分もレイアウト解析処理によって抽出されることとなり、文字部分の抽出精度を向上させることができる。   One characteristic of this embodiment is that a character portion is extracted using layout analysis in so-called T / I separation processing. As a result, the character portion included in the pattern candidate region is also extracted by the layout analysis process, and the accuracy of extracting the character portion can be improved.

一方、レイアウト処理部24は、文字線画として画定された部分(文字線画外接矩形)内についても、レイアウト解析処理を行う。そしてレイアウト処理部24は、当該レイアウト解析処理の結果として得られたレイアウト枠(少なくとも各文字に外接する矩形(基本矩形)を含む)を定め、これらレイアウト枠の情報(座標情報など)を記憶部12に格納する。   On the other hand, the layout processing unit 24 performs a layout analysis process also on a portion (character / line drawing circumscribed rectangle) defined as a character / line drawing. The layout processing unit 24 determines layout frames (including at least rectangles (basic rectangles) circumscribing each character) obtained as a result of the layout analysis processing, and stores information (coordinate information and the like) of these layout frames. 12.

なお、文字線画外接矩形内においても、上記基本矩形を水平または垂直方向に関係づけて得られる行矩形を画定し、この行矩形の座標情報などを記憶部12に併せて格納してもよい。   Note that a line rectangle obtained by relating the basic rectangle in the horizontal or vertical direction may also be defined within the character line drawing circumscribed rectangle, and the coordinate information of the line rectangle may be stored in the storage unit 12 together.

制御部11のレイアウト処理部24は、記憶部12に格納された文字部分特定情報と、文字線画外接矩形(またはそれに対するレイアウト処理結果としてのレイアウト枠)とを参照し、処理対象となった画像データ全体について、画像データ内で文字を含む矩形領域の座標情報を生成する。具体的にレイアウト処理部24は、文字部分特定情報の座標情報で画定される矩形と、文字線画外接矩形情報(またはそれに対するレイアウト処理結果としてのレイアウト枠)で画定される矩形とを結合して、文字線画領域を生成する。すなわち、本実施の形態では絵柄候補領域の画定と、文字線画領域の画定とを別々に行っているため、絵柄候補領域内にも文字線画領域として特定された領域が存在し得る。このためここでこれらの領域を結合して、重複領域を一つの文字線画領域とする。   The layout processing unit 24 of the control unit 11 refers to the character part specifying information stored in the storage unit 12 and the character / line drawing circumscribing rectangle (or the layout frame as a layout processing result thereof), and the image to be processed For the entire data, coordinate information of a rectangular area including characters in the image data is generated. Specifically, the layout processing unit 24 combines the rectangle defined by the coordinate information of the character part specifying information and the rectangle defined by the character / line drawing circumscribing rectangle information (or the layout frame as a result of the layout processing). A character line drawing area is generated. In other words, in the present embodiment, the pattern candidate area and the character / line drawing area are defined separately, and therefore the area specified as the character / line drawing area may exist in the pattern candidate area. For this reason, these areas are combined here to make the overlapping area one character / line drawing area.

そしてレイアウト処理部24は、結合後の各文字線画部分について固有の領域識別子(以下、ラベルデータと呼ぶ)を生成し、このラベルデータと、対応する文字線画領域を画定するための座標情報(頂点座標の情報等)とを関連づけて記憶部12に文字線画領域データベースとして格納する。   Then, the layout processing unit 24 generates a unique area identifier (hereinafter referred to as label data) for each combined character / line drawing part, and coordinates information (vertex) for defining the label data and the corresponding character / line drawing area. The information is stored in the storage unit 12 as a character / line drawing area database.

[5.同一色領域分離部]
同一色領域分離部25は、記憶部12の文字線画領域データベースに格納されている文字線画領域の各々について、同一の色の文字線画部分のみからなる領域に分割する処理を行う。同一色領域分離部25は、レイアウト処理の過程で記憶部12に格納された基本矩形(絵柄候補領域と文字線画領域との双方から画定された矩形)の座標情報を読み出す。そして、処理対象となっている画像データ(元画像データ)のうち、この座標情報で画定される各基本矩形内に含まれる画素値から代表値(代表色)の候補を決定する。
[5. Same color area separation unit]
The same color area separation unit 25 performs a process of dividing each of the character / line drawing areas stored in the character / line drawing area database of the storage unit 12 into an area including only the character / line drawing parts of the same color. The same color region separation unit 25 reads the coordinate information of the basic rectangle (rectangle defined from both the pattern candidate region and the character / line drawing region) stored in the storage unit 12 during the layout process. Then, a representative value (representative color) candidate is determined from pixel values included in each basic rectangle defined by the coordinate information in the image data (original image data) to be processed.

本実施の形態における同一色領域分離部25は、図10(a)に示すように、代表色決定部51と、同一色領域情報生成部52と、包含画像作成部53とを含んで構成されている。なお、以下の説明で基本矩形内の画素は、元画像データ上で基本矩形内に含まれるすべての画素であってもよいし、基本矩形内で、文字または線画を構成する画素として判断される画素であってもよい。   As shown in FIG. 10A, the same color region separation unit 25 in the present embodiment is configured to include a representative color determination unit 51, a same color region information generation unit 52, and an inclusion image creation unit 53. ing. In the following description, the pixels in the basic rectangle may be all the pixels included in the basic rectangle on the original image data, or are determined as pixels constituting a character or a line drawing in the basic rectangle. It may be a pixel.

代表色決定部51は、記憶部12に格納された基本矩形の座標情報を参照し、それらを順次注目基本矩形として選択しながら、当該注目基本矩形内の画素値に基づいて少なくとも一つの代表画素値を決定する。ここで、代表画素値の決定方法は、元画像データのうち注目基本矩形内の画素値のヒストグラム(発生頻度)を生成し、このヒストグラムにおいて最も高い頻度で出現する一つの画素値、又は所定しきい値(例えば注目基本矩形内の画素数の1/3など)を超える頻度で出現する少なくとも一つの画素値を代表画素値とする方法などがある。代表色決定部51は、注目基本矩形を特定する情報(注目基本矩形に固有に発行された識別子)に関連づけて決定した代表画素値を代表画素値データベースとして記憶部12に格納する。   The representative color determination unit 51 refers to the coordinate information of the basic rectangle stored in the storage unit 12 and selects at least one representative pixel based on the pixel value in the target basic rectangle while sequentially selecting them as the target basic rectangle. Determine the value. Here, the representative pixel value is determined by generating a histogram (occurrence frequency) of pixel values in the target basic rectangle in the original image data, and one pixel value appearing at the highest frequency in the histogram, or a predetermined pixel value. There is a method in which at least one pixel value that appears at a frequency exceeding a threshold value (for example, 1/3 of the number of pixels in the target basic rectangle) is used as a representative pixel value. The representative color determination unit 51 stores the representative pixel value determined in association with the information specifying the target basic rectangle (identifier issued uniquely to the target basic rectangle) in the storage unit 12 as a representative pixel value database.

同一色領域情報生成部52は、代表画素値データベースに格納されている代表画素値を、互いに同一と判断される色ごとにグループ化する。具体的に同一色領域情報生成部52は、代表画素値データベースに格納されている代表画素値のうち、未だグループ化されていない代表画素値を注目代表画素値とし、この注目代表画素値とは異なる代表画素値であって、未だグループ化されていない代表画素値を順次、比較対照画素値として選択する。そして注目代表画素値と同一の色と判断できる比較対照画素値があった場合には、当該少なくとも一つの比較対照画素値と注目代表画素値とを一つのグループとして決定する。そして同一色領域情報生成部52は、それらグループとなった代表画素値に関連づけられた基本矩形の識別子を代表画素値データベースから取り出して、基本矩形の識別子のリストを生成し、注目代表画素値と比較対照画素値とに基づいて決定される一つのグループ代表画素値を決定する。同一色領域情報生成部52はそして、固有のグループ識別子を発行し、このグループ識別子と、グループ代表画素値と、上記生成した基本矩形の識別子のリストとを関連づけて同一色領域情報データベースとして、記憶部12に格納する。なおグループ代表画素値の決定方法は、例えば注目代表画素値と、それに同一と判断された比較対照画素値との統計演算結果(例えば平均)の画素値などとすることができる。   The same color area information generation unit 52 groups representative pixel values stored in the representative pixel value database for each color determined to be the same. Specifically, the same color area information generation unit 52 sets representative pixel values not yet grouped among representative pixel values stored in the representative pixel value database as target representative pixel values. Different representative pixel values that have not yet been grouped are sequentially selected as comparison pixel values. If there is a comparison pixel value that can be determined to be the same color as the target representative pixel value, the at least one comparison pixel value and the target representative pixel value are determined as one group. Then, the same color area information generation unit 52 extracts the basic rectangle identifiers associated with the representative pixel values in the group from the representative pixel value database, generates a list of basic rectangle identifiers, One group representative pixel value determined based on the comparison pixel value is determined. The same color area information generation unit 52 then issues a unique group identifier, stores this group identifier, the group representative pixel value, and the generated list of basic rectangle identifiers as the same color area information database. Stored in the unit 12. Note that the group representative pixel value determination method may be, for example, a pixel value of a statistical calculation result (for example, an average) between a target representative pixel value and a comparison pixel value determined to be the same.

一方、注目代表画素値と同一の色と判断できる比較対照画素値がなかった場合には、注目代表画素値のみからなるグループを生成する。つまり同一色領域情報生成部52は、注目代表画素値に関連づけられた基本矩形の識別子を代表画素値データベースから取り出し、注目代表画素値をそのままグループ代表画素値として決定する。そして同一色領域情報生成部52は固有のグループ識別子を発行し、このグループ識別子と、グループ代表画素値と、上記生成した基本矩形の識別子とを関連づけて、同一色領域情報データベースとして記憶部12に格納する。   On the other hand, when there is no comparison pixel value that can be determined to be the same color as the representative pixel value of interest, a group including only the representative pixel value of interest is generated. That is, the same color area information generation unit 52 extracts the identifier of the basic rectangle associated with the target representative pixel value from the representative pixel value database, and determines the target representative pixel value as the group representative pixel value as it is. The same color area information generation unit 52 issues a unique group identifier, associates the group identifier, the group representative pixel value, and the generated basic rectangle identifier with each other in the storage unit 12 as the same color area information database. Store.

こうして同一色領域情報生成部52は、グループ化された代表画素値(グループ代表画素値)ごとに、当該代表画素値(グループ代表画素値)と当該代表画素値に対応した基本領域を画定する情報(ここでは基本領域の識別子)とを関連づけた情報を含む同一色領域情報を生成し、これを記憶部12に同一色領域情報データベースとして格納することになる。   In this way, the same color area information generation unit 52 defines, for each grouped representative pixel value (group representative pixel value), the representative pixel value (group representative pixel value) and a basic area corresponding to the representative pixel value. The same color area information including the information associated with (here, the identifier of the basic area) is generated and stored in the storage unit 12 as the same color area information database.

包含画像作成部53は、代表画素値データベースを参照しながら、当該代表画素値データベースに含まれる基本領域の識別子を取り出す。また基本矩形データベースを参照して、上記取り出した各基本領域の識別子に関連づけられている座標情報(各基本領域を画定する情報)を取得する。そして包含画像作成部53は、これら基本領域を包含する領域を生成する。具体的に包含画像作成部53は、取得した座標情報が示すX,Yの座標値のうち、最も小さいX座標値Xminと、Y座標値Ymin、並びに、最も大きいX座標値Xmaxと、Y座標値Ymaxとを検索する。そして、(Xmin,Ymin)と、(Xmax,Ymax)を対角線とする矩形(包含される各基本矩形に外接する矩形)を画定する情報を生成する。   The included image creation unit 53 retrieves the identifier of the basic area included in the representative pixel value database while referring to the representative pixel value database. Further, with reference to the basic rectangle database, coordinate information (information defining each basic area) associated with the identifier of each extracted basic area is acquired. Then, the included image creation unit 53 generates a region that includes these basic regions. Specifically, the inclusion image creation unit 53 includes the smallest X coordinate value Xmin, the Y coordinate value Ymin, the largest X coordinate value Xmax, and the Y coordinate among the X and Y coordinate values indicated by the acquired coordinate information. Search for the value Ymax. Then, information is generated that defines a rectangle having a diagonal line (Xmin, Ymin) and (Xmax, Ymax) (a rectangle circumscribing each included basic rectangle).

包含画像作成部53は、包含している各基本領域内の画素を元画像データから抽出し、これを、例えば元画像データの四隅の画素値から決定される背景画素値に基づいて生成されるしきい値を用いて二値化し、当該二値化された画像データを包含画像データとして生成する。   The inclusion image creation unit 53 extracts the pixels in each included basic region from the original image data, and generates this based on the background pixel values determined from the pixel values at the four corners of the original image data, for example. Binarization is performed using a threshold value, and the binarized image data is generated as inclusion image data.

この包含画像データは、当該包含画像データに包含されている基本領域内の各画素の値を二値化して得たビットマップ情報となっており、従って、包含画像データには少なくともいずれかの代表画素値(又はグループ代表画素値)に設定されるべき画素の位置を示す情報が含まれることになる。なお、包含画像作成部53は、この二値化して得たビットマップ情報など、上記画素の位置を示す情報を所定の方法(例えばMMRやJBIG2等)で圧縮処理してもよい。   This inclusion image data is bitmap information obtained by binarizing the value of each pixel in the basic region included in the inclusion image data. Therefore, the inclusion image data includes at least one representative. Information indicating the position of the pixel to be set in the pixel value (or group representative pixel value) is included. The inclusion image creation unit 53 may compress information indicating the position of the pixel, such as bitmap information obtained by binarization, by a predetermined method (for example, MMR, JBIG2, etc.).

なお、ここでは基本矩形、すなわち文字のみを対象としているが、文字線画外接矩形のうちレイアウト処理部24にて基本矩形として画定されていない矩形部分(つまり線画部分)についても、その代表画素値を定め、基本矩形とともに同一色と判断される矩形ごとにグループ化し、基本矩形と線画部分とを包含し、これらに含まれる画素を二値化して包含画像データを生成することとしてもよい。   Here, only the basic rectangle, that is, the character is targeted, but the representative pixel value of the rectangular portion (that is, the line drawing portion) that is not defined as the basic rectangle in the layout processing unit 24 among the character line drawing circumscribed rectangle is also set. It is also possible to group the rectangles that are determined to be the same color together with the basic rectangle, include the basic rectangle and the line drawing portion, and binarize the pixels included in these to generate included image data.

制御部11は、これらの処理によって生成した包含画像データと、同一色領域情報データベースと、包含画像データの元の画像データ上での位置を表す座標情報とを、その構造に含むデータを、文字線画プレーンデータとして出力する。このように生成された文字線画プレーンデータは、元の画像データを再現する際には、まず圧縮されたデータを伸長して包含画像データのビットマップを再現し、同一色領域情報データベースに含まれているグループごとに、当該グループ内の基本矩形に相当する上記再現したビットマップ上の黒画素(オンとなっている画素)の画素値を特定し、当該特定した画素の値を当該グループのグループ代表画素値に設定する。   The control unit 11 includes data including in its structure the inclusion image data generated by these processes, the same color area information database, and coordinate information indicating the position of the inclusion image data on the original image data. Output as line drawing plane data. When reproducing the original image data, the character / line drawing plane data generated in this way is decompressed first to reproduce the bitmap of the included image data, and is included in the same color area information database. For each group, the pixel value of the black pixel (on pixel) on the reproduced bitmap corresponding to the basic rectangle in the group is specified, and the value of the specified pixel is assigned to the group of the group Set to representative pixel value.

また、制御部11の同一色領域分離部25は、図10(b)に示すように、代表色決定部51と、同一色領域情報生成部52と、包含画像作成部53と、色別包含画像作成部54と、比較部55とを含み、代表色決定部51と、同一色領域情報生成部52と、包含画像作成部53とが、上述の動作を行うとともに、色別包含画像作成部54が、グループごとの包含画像データを生成し、比較部55が、これらグループごとの包含画像データ(色別包含領域)を含んだ文字線画プレーンデータ(第1画像データ)と、上記包含画像データと同一色領域情報データベースとを含む文字線画プレーンデータ(第2画像データ)とを比較し、第1画像データと第2画像データとのうちいずれかサイズの小さい方を選択して、選択したデータを文字線画プレーンデータとして出力することとしてもよい。   Further, as shown in FIG. 10B, the same color region separation unit 25 of the control unit 11 includes a representative color determination unit 51, an identical color region information generation unit 52, an included image creation unit 53, and an inclusion by color. The image creation unit 54 and the comparison unit 55 are included, and the representative color determination unit 51, the same color area information generation unit 52, and the inclusion image creation unit 53 perform the above-described operation and include the color-specific inclusion image creation unit. 54 generates inclusion image data for each group, and the comparison unit 55 includes character / line drawing plane data (first image data) including the inclusion image data (color inclusion regions) for each group, and the inclusion image data. And the character / line drawing plane data (second image data) including the same color area information database, and selects the smaller one of the first image data and the second image data, and selects the selected data. Character line drawing It may be output as the lane data.

また、同一色領域情報生成部52において、2つの代表画素値が同一と判断できるか否かを決定する方法は、2つの代表画素値の成分ごとの差の二乗和(代表画素値間の所定色空間上での距離に関する量)が予め定められたしきい値より小さい場合に同一と判断することとすればよい。   In addition, the same color area information generation unit 52 determines whether two representative pixel values can be determined to be the same as the sum of squares of differences of the two representative pixel values for each component (predetermined value between representative pixel values). If the amount relating to the distance in the color space is smaller than a predetermined threshold value, it may be determined that they are the same.

次に、図11を参照しながら、本実施の形態の同一色領域分離部25の動作を説明する。ここでは具体的に図11(a)に示すような画像を例として説明する。図11(a)に示す例では、第1行目の文字列「昨日は雨でした」のうち、「昨日」の文字が赤文字で、「は雨でした」の文字が黒文字で表され、次の行の文字列「今日は曇です」の全体が黒文字で表されている。また、この2行の文字列とは離れた位置に「お天気の話でした」との文字列があり、ここで「話」の文字のみが赤文字となっている例を示している。なお、図11(a)では図示の都合上、赤色文字部分を破線で囲んで示すこととしている。この囲み破線は現実に表されるものではない。   Next, the operation of the same color region separation unit 25 of the present embodiment will be described with reference to FIG. Here, an image as shown in FIG. 11A will be specifically described as an example. In the example shown in FIG. 11A, in the character string “Yesterday was rainy” on the first line, the letters “Yesterday” were red characters and the characters “Has rainy” were represented by black characters. , The whole string of the next line “Today is cloudy” is represented in black. Further, an example is shown in which there is a character string “It was a story about the weather” at a position apart from the character strings of the two lines, and only the characters “story” are red characters. In FIG. 11A, for convenience of illustration, the red character portion is surrounded by a broken line. This enclosed broken line is not actually represented.

この場合、レイアウト処理部24の処理等によって個々の文字の画素塊に外接する矩形(基本矩形)が画定され、代表色決定部51が、各基本矩形ごとに代表色を決定する。なお、この代表色決定部51によって決定される代表色は、個々の文字、例えば上記「昨日」の「昨」と「日」との2つの文字が元々同じ色(画素値)に設定されていたとしても、同一の画素値になるとは限らず、距離は比較的近いが互いに異なる代表画素値が決定されてもよい。つまり、この代表色決定部51によって、「昨」と「日」、並びに「話」の3つの文字に外接する基本矩形について赤色に近い代表画素値が決定され、他の文字に外接する各基本矩形については、黒色に近い代表画素値が決定される。   In this case, a rectangle (basic rectangle) circumscribing the pixel block of each character is defined by the processing of the layout processing unit 24 and the like, and the representative color determining unit 51 determines a representative color for each basic rectangle. The representative color determined by the representative color determining unit 51 is set to the same color (pixel value) for each character, for example, two characters “Yesterday” and “Day” of “Yesterday”. However, the pixel values are not always the same, and representative pixel values that are relatively close to each other but different from each other may be determined. That is, the representative color determining unit 51 determines a representative pixel value close to red for the basic rectangle circumscribing the three characters “Yesterday”, “Day”, and “Story”, and each basic character circumscribing other characters. For the rectangle, a representative pixel value close to black is determined.

同一色領域情報生成部52は、同一と判断される代表画素値に関連づけられる基本矩形をグループとして定める。これにより「昨」と「日」、並びに「話」の3つの文字に外接する基本矩形を画定する情報に一つのグループ代表画素値(これもまた、赤色に近い値として定められる)が関連づけてグループ化され、他の文字に外接する基本矩形を画定する情報に一つのグループ代表画素値(これもまた、黒色に近い値として定められる)が関連づけてグループ化される。   The same color area information generation unit 52 defines basic rectangles associated with representative pixel values determined to be the same as a group. As a result, one group representative pixel value (also defined as a value close to red) is associated with the information defining the basic rectangle circumscribing the three characters “Yesterday”, “Day”, and “Story”. One group representative pixel value (also defined as a value close to black) is associated with information that defines a basic rectangle that is grouped and circumscribes other characters, and is grouped.

包含画像作成部53は、(グループに関わらず)対象となっている基本矩形のすべてを包含する矩形を生成し、各基本矩形内の画素値を二値化した画像データを包含画像データ(第2画像データとなる)として生成する(図11(b))。   The inclusion image creation unit 53 generates a rectangle that includes all of the target basic rectangles (regardless of the group), and converts the pixel value in each basic rectangle into binary image data (first image). 2 image data) (FIG. 11B).

そして基本矩形を画定する情報とグループ代表画素値との組を少なくとも一つ含んでなる同一色領域情報データベースと、包含画像データとを関連づけて、文字線画プレーンデータとして出力する。   Then, the same color area information database including at least one set of information defining the basic rectangle and the group representative pixel value is associated with the included image data, and is output as character line drawing plane data.

一方、色別包含画像作成部54はグループごとに包含画像データ(色別包含画像データ)を生成する(図11(c))。ここで色別包含画像データ内の画素値は二値化しなくてもよい。また、二値化する場合は、色別包含画像データに対応するグループのグループ代表画素値を関連づけて文字線画プレーンデータに含める。そして比較部55が、この色別包含画像作成部54が生成する文字線画プレーンデータ(第1画像データ)と、第2画像データのうち、データのサイズの小さい画像データを選択的に出力し、この出力結果が文字線画プレーンデータとして記憶部12に格納される。   On the other hand, the color-specific inclusion image creation unit 54 generates inclusion image data (color-specific inclusion image data) for each group (FIG. 11C). Here, the pixel values in the color-by-color inclusion image data need not be binarized. In the case of binarization, the group representative pixel values of the group corresponding to the color-by-color inclusion image data are associated and included in the character / line drawing plane data. Then, the comparison unit 55 selectively outputs image data having a small data size among the character / line drawing plane data (first image data) generated by the color-specific inclusion image creation unit 54 and the second image data, The output result is stored in the storage unit 12 as character / line drawing plane data.

なお、ここでは同一色領域情報データベースに含まれる基本矩形を画定する座標情報は、元の画像データ上の位置を表すものであってもよいし、包含画像データ内での位置を表すもの(例えば包含画像データの右下座標からの相対位置を表す座標情報)に変換されてもよい。   Here, the coordinate information that defines the basic rectangle included in the same color region information database may represent a position on the original image data, or represents a position in the included image data (for example, Coordinate information representing a relative position from the lower right coordinates of the included image data).

また同一色領域情報データベースには、必ずしもすべての基本矩形を画定する情報が含まれなくてもよい。例えば各グループのうち、含まれる基本矩形の数が最大となっているグループ(最大グループと呼ぶ)のグループ代表画素値を図11(b)に示した包含画像データに関連づけ、当該最大グループの情報を同一色領域情報データベースから除去してもよい。   The same color area information database does not necessarily include information that defines all basic rectangles. For example, among the groups, the group representative pixel value of the group having the maximum number of basic rectangles (referred to as the maximum group) is associated with the included image data shown in FIG. May be removed from the same color area information database.

この場合、元の画像データを生成する側ではまず、包含画像データのビットマップを再現して、その内部の黒画素(オンとなっている画素)の画素値を、包含画像データに関連づけられたグループ代表画素値(最大グループのグループ代表画素値)に設定し、次いで、同一色領域情報データベース内の各グループごとに、当該ビットマップ上で各グループに含まれる基本矩形に相当する領域内でオンとなっている画素について、各グループのグループ代表画素値に設定し直すことになる。   In this case, the original image data generation side first reproduces the bitmap of the inclusive image data, and associates the pixel values of the black pixels (pixels that are turned on) with the inclusive image data. Set to the group representative pixel value (the group representative pixel value of the largest group), and then turn on for each group in the same color area information database in the area corresponding to the basic rectangle included in each group on the bitmap. For the pixels that are, the group representative pixel value of each group is reset.

また、ここでは最大グループのグループ代表画素値とすることとしたが、予め定めた色(例えば黒色)に最も近いグループ代表画素値を図11(b)に示した包含画像データに関連づけ、当該グループ代表画素値に関するグループの情報を同一色領域情報データベースから除去してもよい。   Here, the group representative pixel value of the maximum group is set, but the group representative pixel value closest to a predetermined color (for example, black) is associated with the inclusion image data shown in FIG. The group information related to the representative pixel value may be removed from the same color area information database.

さらに、基本矩形内の画素値がばらついている場合に配慮して、代表色決定部51は、平滑化処理を行ってから代表画素値を決定してもよい。ここで平滑化処理としては、各基本矩形内の各画素を順次注目画素として特定し、注目画素の値とそれに隣接する画素の値との平均値を注目画素の値とする処理などがある。   Further, the representative color determination unit 51 may determine the representative pixel value after performing the smoothing process in consideration of the case where the pixel values in the basic rectangle vary. Here, the smoothing process includes a process of sequentially specifying each pixel in each basic rectangle as a target pixel, and setting an average value of the value of the target pixel and the value of a pixel adjacent thereto as the value of the target pixel.

さらにこの平滑化処理の際に、基本矩形内で文字を構成する画素(例えば二値化処理により黒画素となる部分)のみを注目画素として選択してもよい。また平滑化の処理において、平均値を演算する際は当該文字を構成する画素の値のみを参照して平均値を演算することとしてもよい。これにより、文字以外の部分の画素値を参照することにより、文字の代表色が背景色に影響されることが防止される。   Furthermore, at the time of this smoothing process, only the pixels constituting the character in the basic rectangle (for example, the portion that becomes a black pixel by the binarization process) may be selected as the target pixel. In the smoothing process, when calculating the average value, the average value may be calculated with reference to only the values of the pixels constituting the character. This prevents the representative color of the character from being influenced by the background color by referring to the pixel value of the portion other than the character.

ここで平滑化処理してから決定した代表値について補正を行ってもよい。すなわち、本実施の形態の同一色領域分離部25は、決定した代表値の候補についてその輝度を補正して、補正後の値を代表値として決定する。ここで輝度の補正は、例えば図12に示すようなトーンカーブ(補正関数)を用いて補正することができる。この図12に示すトーンカーブは、入力値(補正前の代表値候補の輝度)が最小値MINから第1しきい値TH1までに対する出力値(補正後の値、つまり代表値として決定される値の輝度)が最小値MINであり、第2しきい値TH2(ただしTH2>TH1)から、最大値MAXまでに対する出力値が最大値MAXであるように設定されている。また、このトーンカーブは、入力値が最大値MAXと最小値MINとの間の中央の値MID(例えば最大値が「255」であり最小値が「0」であるときにはMIDは「128」となる)であるときに、これに対する出力値が略MIDとなるように設定されてもよい。   Here, the representative value determined after the smoothing process may be corrected. That is, the same color region separation unit 25 of the present embodiment corrects the luminance of the determined representative value candidate, and determines the corrected value as the representative value. Here, the luminance can be corrected using, for example, a tone curve (correction function) as shown in FIG. The tone curve shown in FIG. 12 is an output value (value after correction, that is, a value determined as a representative value) with respect to an input value (luminance of a representative value candidate before correction) from the minimum value MIN to the first threshold value TH1. Brightness) is the minimum value MIN, and the output value from the second threshold TH2 (where TH2> TH1) to the maximum value MAX is set to the maximum value MAX. The tone curve has a center value MID between the maximum value MAX and the minimum value MIN (for example, when the maximum value is “255” and the minimum value is “0”, the MID is “128”). The output value for this may be set to be substantially MID.

つまり同一色領域分離部25は、代表値の候補(本実施の形態ではYCbCrで表されることとしている)の輝度成分(Y)について、図12のトーンカーブによる補正を行って、代表値の輝度(Y′)を決定し、このY′と、代表値の候補の色差成分Cb,Crとによって特定される値を代表値として決定する。   That is, the same color region separation unit 25 corrects the representative value candidate (represented by YCbCr in the present embodiment) with the tone curve of FIG. Luminance (Y ′) is determined, and a value specified by this Y ′ and representative value candidate color difference components Cb and Cr is determined as a representative value.

なお、代表値候補がRGBなど、輝度成分を含まない色空間で表現されている場合は、L*a*b*や、YCbCrなど、輝度成分を含む色空間の値に変換してから上記処理を行うこととすればよい。   If the representative value candidate is expressed in a color space that does not include a luminance component, such as RGB, the above processing is performed after conversion to a value in a color space that includes a luminance component such as L * a * b * or YCbCr. Should be done.

さらに、ここでは輝度のみを補正したが、色差成分についても補正を行ってもよい。具体的に同一色領域分離部25は、代表値候補の各色差成分が所定の条件を満足しているときに、当該代表色候補値の輝度成分値に関する階調数を低減する補正を行い、当該補正後の値を代表値として決定してもよい。   Further, although only the luminance is corrected here, the color difference component may also be corrected. Specifically, the same color region separation unit 25 performs correction to reduce the number of gradations regarding the luminance component value of the representative color candidate value when each color difference component of the representative value candidate satisfies a predetermined condition, The corrected value may be determined as the representative value.

具体的には、図13に示すように、L*a*bの色空間で表現された代表値候補の色差成分(a*、b*)が、それぞれ対応する色差成分の値域の中心値からの所定範囲内(図13のTHa,THbで画定される円の内部)にあるとの条件を満足している場合に、例えば256階調で表現された輝度成分Lを4階調または8階調など所定階調に低減する。この場合、色差成分の値を上記中心値に設定してもよい。ここで、各成分ごとの所定範囲THa,THbは、同じ値であってもよいし、異なる値であってもよい。   Specifically, as shown in FIG. 13, the color difference components (a *, b *) of the representative value candidates expressed in the color space of L * a * b are respectively calculated from the center values of the corresponding color difference component value ranges. Of the luminance component L expressed in 256 gradations, for example, in 4 gradations or 8th floor, when the condition of being within the predetermined range (inside the circle defined by THa and THb in FIG. 13) is satisfied. The tone is reduced to a predetermined gradation such as a tone. In this case, the value of the color difference component may be set to the center value. Here, the predetermined ranges THa and THb for each component may be the same value or different values.

この処理により、特に文字色がグレー(黒を含む)である場合に、その文字色の本来の色を再現した代表値が設定される。例えば文字色が黒であるときに色差成分と輝度成分とは本来「0」であるが、スキャナの特性や、元の画像データのエンコード形式(例えばJPEGなど)の特性によっては、色差成分が「0」でなくなってしまったり、輝度成分が「0」でなくなってしまう場合がある。そこでここで示した色差成分に関する処理を行うことで、代表値を本来の黒色とすることができるようになる。   By this processing, when the character color is gray (including black), a representative value that reproduces the original color of the character color is set. For example, when the character color is black, the color difference component and the luminance component are originally “0”. However, depending on the characteristics of the scanner and the encoding format of the original image data (for example, JPEG), the color difference component may be “ In some cases, the luminance component is not “0” or the luminance component is not “0”. Therefore, by performing the processing relating to the color difference component shown here, the representative value can be set to the original black color.

このように本実施の形態によれば、処理対象となった画像データ内に画定される注目画像領域としての基本矩形や行矩形内の画素値に基づいて当該注目画像領域の代表色候補を決定し、その輝度を補正して、代表色を決定することとしている。   As described above, according to the present embodiment, the representative color candidate of the target image area is determined based on the pixel values in the basic rectangle or the row rectangle as the target image area defined in the image data to be processed. Then, the luminance is corrected to determine the representative color.

なお、ここでは平滑化処理を行った後で、補正処理を行って代表値を決定しているが、この処理順序を逆にして各画素について上記補正処理を行った後で、各画素値の平滑化処理を行ってヒストグラムを演算し、代表値を決定してもよい。なお、ここでは文字の場合を説明したが、線画についても同様の処理が行われることとなる。   Here, after performing the smoothing process, the correction process is performed to determine the representative value. However, after performing the above correction process for each pixel by reversing the process order, A representative value may be determined by performing a smoothing process and calculating a histogram. Although the case of characters has been described here, the same processing is performed for line drawings.

こうした平滑化と補正の処理によって、本実施の形態においては、文字や線画を構成する画素値にばらつきがあっても、当該ばらつきの影響を軽減して、元の画像データの色と違和感のない代表色を決定することができる。   With this smoothing and correction process, in this embodiment, even if there is a variation in the pixel values that make up a character or line drawing, the influence of the variation is reduced and there is no sense of incongruity with the color of the original image data. A representative color can be determined.

[6.穴埋処理部]
穴埋処理部26は、元の画像データのうち、絵柄候補領域に相当する領域を抽出し、この領域内からレイアウト処理部24の処理で検出された文字の画素(文字を構成する画素)を除去して、絵柄部分画像データを生成する。このとき例えば下地部分を絵柄部分画像データに含めてもよい。
[6. Cavity processing section]
The hole-filling processing unit 26 extracts a region corresponding to the pattern candidate region from the original image data, and detects a pixel of a character (a pixel constituting the character) detected by the processing of the layout processing unit 24 from this region. The pattern partial image data is generated by removing. At this time, for example, the background portion may be included in the pattern portion image data.

そして、この絵柄部分画像データの各画素をラスタスキャン順に走査し、走査により選択される注目画素が除去された画素でなければ、当該注目画素の画素値をそのままとするとともに、当該注目画素の画素値を直前画素値として記憶部12のワークメモリに記憶する。なお、既に他の画素値が直前画素値として記憶されている場合は、その記憶内容に上書きする。   Then, each pixel of the pattern partial image data is scanned in the raster scan order, and if the pixel of interest selected by the scanning is not removed, the pixel value of the pixel of interest remains as it is and the pixel of the pixel of interest The value is stored in the work memory of the storage unit 12 as the previous pixel value. If another pixel value is already stored as the previous pixel value, the stored content is overwritten.

また、走査により選択される注目画素が除去された画素である場合、当該注目画素の画素値を、記憶している直前画素値に設定する。これにより除去された部分の画素値が、ラスタスキャン順に直前画素値と同一になり、多くの圧縮処理において圧縮効率を向上させることができるようになる。   If the pixel of interest selected by scanning is a removed pixel, the pixel value of the pixel of interest is set to the immediately preceding pixel value stored. As a result, the pixel value of the removed portion becomes the same as the previous pixel value in the raster scan order, and the compression efficiency can be improved in many compression processes.

そしてこの処理を行った後の絵柄部分画像データを絵柄プレーンデータとして記憶部12に格納する。   Then, the pattern partial image data after this processing is performed is stored in the storage unit 12 as pattern plane data.

[7.圧縮処理部]
圧縮処理部27は、記憶部12に格納されている絵柄プレーンデータを、JPEG圧縮し、圧縮絵柄プレーンデータを生成する。また、この圧縮処理部27は、記憶部12に格納されている文字線画プレーンデータと、この圧縮絵柄プレーンデータとを連結して一連のデータを生成する。
[7. Compression processing unit]
The compression processing unit 27 performs JPEG compression on the pattern plane data stored in the storage unit 12 to generate compressed pattern plane data. In addition, the compression processing unit 27 concatenates the character / line drawing plane data stored in the storage unit 12 and the compressed picture plane data to generate a series of data.

具体的にこの一連のデータとしては、PDF(Portable Document Format)データとすることができる。すなわち、圧縮絵柄プレーンデータを伸長して生成したビットマップ(絵柄プレーンデータのビットマップ)を生成させる指示と、当該絵柄プレーンデータのビットマップ上に文字線画プレーンデータに含まれる各文字や線画を描画させる指示とを含むPDFデータとする。   Specifically, the series of data can be PDF (Portable Document Format) data. That is, an instruction to generate a bitmap generated by decompressing the compressed picture plane data (a bitmap of the picture plane data), and each character or line drawing included in the character / line drawing plane data is drawn on the bitmap of the picture plane data. PDF data including an instruction to be executed.

ここで文字線画プレーンデータに含まれる各文字や線画を描画させる指示は、文字線画圧縮データと、これに関連する代表色の情報と基本矩形等の座標情報との組を一つずつ読み出し、それぞれの組について、文字線画圧縮データを伸長して二値化画像を生成し、この二値化画像の黒画素の色を代表色に設定し、絵柄プレーンデータのビットマップ上において、上記基本矩形等の座標情報として設定された位置に透過合成する指示である。ここで透過合成とは、二値化画像のうち黒画素(代表色に設定された画素)以外の画素については上書きせず、代表色に設定された画素のみを上書きすることをいう。   Here, the instruction to draw each character or line drawing included in the character line drawing plane data is to read out the character line drawing compressed data, the representative color information related to this and the coordinate information such as the basic rectangle one by one, For the set of the above, the character line drawing compressed data is expanded to generate a binarized image, the color of the black pixel of the binarized image is set as the representative color, and the basic rectangle etc. on the bitmap of the picture plane data This is an instruction for transparent composition at the position set as the coordinate information. Here, “transparent composition” means that pixels other than black pixels (pixels set as representative colors) in the binarized image are not overwritten, but only pixels set as representative colors are overwritten.

圧縮処理部27は、この生成したPDFデータを記憶部12に格納し、または画像出力部14にこのPDFデータを出力して、外部の装置に送出させる。   The compression processing unit 27 stores the generated PDF data in the storage unit 12 or outputs the PDF data to the image output unit 14 to send it to an external device.

[動作]
本実施の形態の画像処理装置は、上述の構成を有しているので、次のように動作する。ここでは図14(a)に示すような文字部分(T1,T2)と、写真部分(P)と、線画部分としての地図部分(M)とを含むドキュメントが画像入力部13から入力され、このドキュメントの画像データを処理対象とする場合を例として説明する。この図14(a)の例においては写真部分(P)内に文字部分の一部(T2)が重ね合わせられている。また地図部分(M)には、道路線図と文字とが入組んでいる。なお、ここでは便宜的に白黒で示しているが、実際には地図部分の道路線図と文字とは互いに異なる色で表され、写真はカラーで構わない。
[Operation]
Since the image processing apparatus according to the present embodiment has the above-described configuration, it operates as follows. Here, a document including a character part (T1, T2) as shown in FIG. 14A, a photograph part (P), and a map part (M) as a line drawing part is input from the image input unit 13, and this A case where image data of a document is a processing target will be described as an example. In the example of FIG. 14A, a part (T2) of the character part is superimposed on the photograph part (P). The map portion (M) includes a road map and characters. Here, although shown in black and white for the sake of convenience, the road map and characters in the map portion are actually represented in different colors, and the photograph may be in color.

前処理部21は、この画像データの画素値を所定色空間(YCbCr)の値に変換する。絵柄候補部分特定処理部22は、この画像データ(元の画像データ)を二値化処理し、その小領域を除去して文字部分(T1)や線図(M)を除去した画像データを生成する(図14(b))。さらに、絵柄候補部分特定処理部22は、この画像データから背景領域(画像データの境界に隣接する部分)を塗潰し処理等によって特定して除去し、絵柄候補部分を特定する。このとき、文字や道路線図のほとんどが除去されるが(部分的に残存しても構わない)、写真部分に重ね合わせられた文字は、そのまま絵柄候補部分に含まれることととなる。   The preprocessing unit 21 converts the pixel value of the image data into a value in a predetermined color space (YCbCr). The pattern candidate portion specifying processing unit 22 binarizes the image data (original image data), and generates image data from which the character region (T1) and the diagram (M) are removed by removing the small area. (FIG. 14B). Further, the pattern candidate portion specifying processing unit 22 specifies and removes a background region (a portion adjacent to the boundary of the image data) from this image data by painting or the like, and specifies a pattern candidate portion. At this time, most of the characters and road map are removed (may be partially left), but the characters superimposed on the photograph portion are included in the pattern candidate portion as they are.

文字線画抽出処理部23は、元の画像データを二値化し、小領域部分を特定するなどの方法で文字線画部分を抽出する。この際において、元の画像データを複数の領域に分割し、分割して得られた各領域ごとに二値化のしきい値を適応的に定める方法(特許文献2に開示の方法など)によって二値化を行うことで、地図等着色された部分からも文字の抽出を可能としている(図14(c))。   The character / line drawing extraction processing unit 23 binarizes the original image data and extracts the character / line drawing part by a method such as specifying a small area part. At this time, the original image data is divided into a plurality of regions, and a binarization threshold value is adaptively determined for each region obtained by the division (a method disclosed in Patent Document 2). By performing binarization, characters can be extracted from a colored portion such as a map (FIG. 14C).

レイアウト処理部24は、絵柄候補部分内でレイアウト解析処理を行い、絵柄候補部分内に残存する文字部分(T2)を抽出する。同一色領域分離部25は、文字線画抽出処理部23やレイアウト処理部24で抽出された文字部分や線図部分について、個々の文字や線画部分ごとに代表色を定め、同一色と判断される代表色に関係する文字や線画部分をグループ化する。そして文字線画抽出処理部23やレイアウト処理部24で抽出された文字部分や線図部分を包含する画像データを生成し、この画像データを二値化(又はグレイスケールに変換するなど、画像データの画素値情報のサイズを低減できればよい)し、さらに圧縮処理して包含画像データとし、図15に示すように、グループごとのグループ代表色と、グループに含まれる基本矩形(個々の文字に外接する矩形)を画定する座標情報と、包含画像データと、当該包含画像データの元の画像データ上の位置を特定する座標情報と、を含む文字線画プレーンデータを生成する。   The layout processing unit 24 performs a layout analysis process in the pattern candidate part, and extracts a character part (T2) remaining in the pattern candidate part. The same color region separation unit 25 determines a representative color for each character or line drawing portion of the character portion or line drawing portion extracted by the character line drawing extraction processing unit 23 or the layout processing unit 24, and is determined to be the same color. Group characters and line drawings related to representative colors. Then, image data including the character portion or the diagram portion extracted by the character / line drawing extraction processing unit 23 or the layout processing unit 24 is generated, and the image data is binarized (or converted to gray scale). It is sufficient if the size of the pixel value information can be reduced), and further compression processing is performed to include image data. As shown in FIG. 15, a group representative color for each group and a basic rectangle included in the group (which circumscribes each character) Character / line drawing plane data including coordinate information defining a rectangle), inclusion image data, and coordinate information specifying the position of the inclusion image data on the original image data is generated.

穴埋処理部26は、絵柄候補部分から、それに内在していた文字部分(T2)を除去した画像データを生成する(図14(d))。なお、本来は文字部分T2の文字形状通りに白抜きとなるのであるが、図14(d)では図面を見やすくするため当該文字形状を含む矩形部分を白抜きにして図示している。また、図14(d)、(e)は絵柄画像部分のみを図示している。そして穴埋処理部26が当該除去された画素の値を、スキャンライン順で最近傍の画素値(除去されていない画素値)に設定して(図14(e))、絵柄プレーンデータを生成する。   The burial processing unit 26 generates image data obtained by removing the character portion (T2) inherent in the pattern candidate portion (FIG. 14D). Originally, the character portion T2 is outlined as in the character shape, but in FIG. 14D, the rectangular portion including the character shape is illustrated in white to make the drawing easier to see. FIGS. 14D and 14E show only the pattern image portion. Then, the hole filling unit 26 sets the value of the removed pixel to the nearest pixel value (the pixel value that has not been removed) in the scan line order (FIG. 14E), and generates the picture plane data. To do.

圧縮処理部27は、絵柄プレーンデータについてJPEG圧縮を行い、文字線画プレーンデータと組み合せてPDFデータを生成し、これを画像出力部14に出力する。画像出力部14は、このPDFデータを外部の装置に出力する。   The compression processing unit 27 performs JPEG compression on the pattern plane data, generates PDF data in combination with the character line drawing plane data, and outputs this to the image output unit 14. The image output unit 14 outputs the PDF data to an external device.

ここで圧縮処理部27は、絵柄プレーンデータについてJPEG圧縮の前に画像のサイズを縮小する処理(縮小処理)を行って圧縮率をより向上させることとしてもよい。   Here, the compression processing unit 27 may perform a process of reducing the image size (reduction process) on the design plane data before JPEG compression to further improve the compression rate.

なお、元の画像データから絵柄プレーンに含まれる画像部分と文字線画データに含まれる画像部分とを除いた背景画像領域については、絵柄画像プレーンと同様に穴埋処理し、ランレングス等の方法で圧縮処理し、PDFデータに含めてもよい。   Note that the background image area excluding the image part included in the pattern plane and the image part included in the character / line drawing data from the original image data is subjected to hole filling processing in the same manner as the pattern image plane, and a method such as run length is used. It may be compressed and included in the PDF data.

このPDFデータを受けた側では、背景画像領域のランレングス圧縮を伸長してベースの画像データを生成し、絵柄プレーンデータのJPEG圧縮を伸長して拡大処理し、ベースの画像データに不透明合成し、さらに文字線画プレーンデータを伸長して得た各画像データについては、包含画像データの有意な画素にグループ代表色を設定した画像データを生成し、その包含画像データ関連付けられた座標情報によって特定される位置に当該生成した画像データを合成して元の画像データを再現すればよい。   On the side receiving this PDF data, the base image data is generated by expanding the run-length compression of the background image area, the JPEG compression of the pattern plane data is expanded and enlarged, and the base image data is opaquely synthesized. Further, for each image data obtained by expanding the character / line drawing plane data, image data in which a group representative color is set to a significant pixel of the included image data is generated and specified by the coordinate information associated with the included image data. The original image data may be reproduced by synthesizing the generated image data at a certain position.

本発明の実施の形態に係る画像処理装置の一例を表す構成ブロック図である。1 is a configuration block diagram illustrating an example of an image processing apparatus according to an embodiment of the present invention. 本発明の実施の形態に係る画像処理装置の制御部によって実行される処理内容を表す機能ブロック図である。It is a functional block diagram showing the processing content performed by the control part of the image processing apparatus which concerns on embodiment of this invention. 絵柄候補部分特定処理部22の処理内容例を表す機能ブロック図である。It is a functional block diagram showing the example of the processing content of the pattern candidate part specific process part. 属性判定部34の処理例を表すフローチャート図である。FIG. 6 is a flowchart illustrating a processing example of an attribute determination unit 34. 絵柄候補部分特定処理部22の処理例を表す説明図である。It is explanatory drawing showing the process example of the pattern candidate part specific process part. 絵柄候補部分特定処理部22の別の処理例を表す説明図である。It is explanatory drawing showing another example of a process of the pattern candidate part specific process part. 絵柄候補部分特定処理部22における処理の一部の例を表す機能ブロック図である。It is a functional block diagram showing the example of a part of process in the pattern candidate part specific process part 22. FIG. 有意画素距離情報演算部の処理例を表す説明図である。It is explanatory drawing showing the process example of a significant pixel distance information calculating part. 有意画素距離情報演算部の処理例を表す説明図である。It is explanatory drawing showing the process example of a significant pixel distance information calculating part. 同一色領域分離部25の処理内容例を表す機能ブロック図である。6 is a functional block diagram illustrating an example of processing contents of the same color region separation unit 25. FIG. 同一色領域分離部25の処理例を表す説明図である。11 is an explanatory diagram illustrating a processing example of the same color region separation unit 25. FIG. 同一色領域分離部25において利用されるトーンカーブの例を表す説明図である。It is explanatory drawing showing the example of the tone curve utilized in the same color area separation part 25. FIG. 同一色領域分離部25における補正処理の処理条件を表す説明図である。FIG. 11 is an explanatory diagram illustrating processing conditions for correction processing in the same color region separation unit 25. 本発明の実施の形態に係る画像処理装置の処理例を表す説明図である。It is explanatory drawing showing the process example of the image processing apparatus which concerns on embodiment of this invention. 文字線画プレーンデータの一例を表す説明図である。It is explanatory drawing showing an example of character line drawing plane data.

符号の説明Explanation of symbols

11 制御部、12 記憶部、13 画像入力部、14 画像出力部、21 前処理部、22 絵柄候補部分特定処理部、23 文字線画抽出処理部、24 レイアウト処理部、25 同一色領域分離部、26 穴埋処理部、27 圧縮処理部、31、71 二値化処理部、32 連結画素抽出部、33 特徴量算出部、34 属性判定部、35 非絵柄領域処理部、36 背景領域塗潰部、37,44 絵柄候補領域作成部、38 膨張収縮部、41 反転ラベリング処理部、42 境界判定部、43 領域除去部、51 代表色決定部、52 同一色領域情報生成部、53 包含画像作成部、54 色別包含画像作成部、55 比較部、72 ラベリング処理部、73 サイズ情報演算部、74 有意画素距離情報演算部、75 判定部。
DESCRIPTION OF SYMBOLS 11 Control part, 12 Memory | storage part, 13 Image input part, 14 Image output part, 21 Pre-processing part, 22 Design candidate part specific processing part, 23 Character line drawing extraction processing part, 24 Layout processing part, 25 Same color area separation part, 26 burial processing unit, 27 compression processing unit, 31, 71 binarization processing unit, 32 connected pixel extraction unit, 33 feature amount calculation unit, 34 attribute determination unit, 35 non-pattern region processing unit, 36 background region filling unit 37, 44 Design candidate region creation unit, 38 Expansion / contraction unit, 41 Reverse labeling processing unit, 42 Boundary determination unit, 43 Region removal unit, 51 Representative color determination unit, 52 Same color region information generation unit, 53 Included image creation unit 54 color-specific inclusion image creation unit, 55 comparison unit, 72 labeling processing unit, 73 size information calculation unit, 74 significant pixel distance information calculation unit, 75 determination unit.

Claims (11)

処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を連結画素として抽出する手段と、
前記連結画素のうち非絵柄領域を除去する手段と、
前記非絵柄領域を除去した後の画像データについて、残存した連結画素部分に対して背景となっている部分を背景部分として特定し、当該特定された背景部分を除去して、絵柄領域を特定する情報を生成する絵柄領域特定手段と、
を含むことを特徴とする画像処理装置。
Means for performing a labeling process on the image data to be processed, and extracting significant pixel parts connected to each other as connected pixels;
Means for removing a non-picture area from the connected pixels;
For the image data after removing the non-picture area, the background part is specified as the background part for the remaining connected pixel parts, and the specified background part is removed to specify the picture area A pattern area specifying means for generating information;
An image processing apparatus comprising:
請求項1に記載の画像処理装置において、
前記非絵柄領域を除去した後の画像データについて、有意画素近傍の画素を有意画素と設定する膨張処理を行い、当該膨張処理後の画像データについて、有意でない画素近傍の画素を有意でない画素と設定する収縮処理を行う膨張収縮手段をさらに含み、
前記絵柄領域特定手段は、前記膨張・収縮処理後の画像データについて、残存した連結画素部分に対して背景となっている部分を背景部分として特定し、当該特定された背景部分を除去して、絵柄領域を特定する情報を生成することを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The image data after removing the non-picture area is subjected to expansion processing for setting pixels in the vicinity of significant pixels as significant pixels, and in the image data after the expansion processing, pixels in the vicinity of insignificant pixels are set as insignificant pixels. Further includes expansion and contraction means for performing the contraction process,
The pattern area specifying means, for the image data after the expansion / contraction processing, specifies a background part as a background with respect to the remaining connected pixel part, removes the specified background part, An image processing apparatus that generates information for specifying a picture area.
請求項2に記載の画像処理装置において、
前記膨張収縮手段は、前記非絵柄領域を除去した後の画像データをランレングスのデータに変換して、当該変換後のランレングスのデータについて前記膨張処理を行い、
前記収縮処理後のランレングスのデータをビットマップのデータに変換して出力することを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
The expansion / contraction means converts the image data after removing the non-pattern area into run-length data, and performs the expansion process on the converted run-length data.
An image processing apparatus, wherein the run-length data after the contraction processing is converted into bitmap data and output.
処理対象となった画像データを構成する各画素を、所定の背景画素条件を満足する背景画素と、前記所定の背景画素条件を満足しない有意画素とに分類し、前記背景画素または画像データの端部によって互いに仕切られた、前記有意画素同士の連結部分を連結画素領域として抽出する手段と、
前記有意画素の各々について、当該有意画素から隣接する有意画素を辿って背景画素まで至るまでの距離を、有意画素距離情報として生成する手段と、
前記選択された注目領域のサイズに関係するサイズ関係情報を生成する手段と、
前記選択された注目領域に含まれる各有意画素ごとの有意画素距離情報、並びに前記サイズ関係情報に基づいて注目領域のうち絵柄領域を特定する手段と、
を含むことを特徴とする画像処理装置。
Each pixel constituting the image data to be processed is classified into a background pixel that satisfies a predetermined background pixel condition and a significant pixel that does not satisfy the predetermined background pixel condition, and an end of the background pixel or image data Means for extracting a connection portion between the significant pixels, which are partitioned from each other by a unit, as a connection pixel region;
For each of the significant pixels, means for generating a distance from the significant pixel to the background pixel following the adjacent significant pixel as significant pixel distance information;
Means for generating size relationship information relating to the size of the selected region of interest;
Means for identifying a pattern area of the attention area based on the significant pixel distance information for each significant pixel included in the selected attention area, and the size relationship information;
An image processing apparatus comprising:
処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を第1連結画素として抽出する手段と、
前記連結画素のうち非絵柄領域を除去する手段と、
前記非絵柄領域を除去した後の画像データについて、有意でない画素が互いに連結している部分を第2連結画素として抽出する手段と、
前記第2連結画素のうち、画像データの境界に接している第2連結画素を背景部分として特定し、当該特定した背景部分以外の領域を絵柄領域として特定する手段と、
を含むことを特徴とする画像処理装置。
Means for performing a labeling process on the image data to be processed, and extracting significant pixel portions connected to each other as first connected pixels;
Means for removing a non-picture area from the connected pixels;
Means for extracting, as the second connected pixel, a portion in which insignificant pixels are connected to each other for the image data after removing the non-picture area;
Means for specifying a second connected pixel in contact with a boundary of image data as a background portion among the second connected pixels, and specifying a region other than the specified background portion as a pattern region;
An image processing apparatus comprising:
コンピュータを用い、
処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を連結画素として抽出し、
前記連結画素のうち非絵柄領域を除去し、
前記非絵柄領域を除去した後の画像データについて、残存した連結画素部分に対して背景となっている部分を背景部分として特定し、当該特定された背景部分を除去して、絵柄領域を特定する情報を生成することを特徴とする画像処理方法。
Using a computer,
Perform a labeling process on the image data to be processed, extract significant pixel parts connected to each other as connected pixels,
Removing a non-picture area from the connected pixels;
For the image data after removing the non-picture area, the background part is specified as the background part for the remaining connected pixel parts, and the specified background part is removed to specify the picture area An image processing method characterized by generating information.
コンピュータを用い、
処理対象となった画像データを構成する各画素を、所定の背景画素条件を満足する背景画素と、前記所定の背景画素条件を満足しない有意画素とに分類し、前記背景画素または画像データの端部によって互いに仕切られた、前記有意画素同士の連結部分を連結画素領域として抽出し、
前記有意画素の各々について、当該有意画素から隣接する有意画素を辿って背景画素まで至るまでの距離を、有意画素距離情報として生成し、
前記選択された注目領域のサイズに関係するサイズ関係情報を生成し、
前記選択された注目領域に含まれる各有意画素ごとの有意画素距離情報、並びに前記サイズ関係情報に基づいて注目領域のうち絵柄領域を特定することを特徴とする画像処理方法。
Using a computer,
Each pixel constituting the image data to be processed is classified into a background pixel that satisfies a predetermined background pixel condition and a significant pixel that does not satisfy the predetermined background pixel condition, and an end of the background pixel or image data A connected portion between the significant pixels partitioned by each other as a connected pixel region;
For each of the significant pixels, a distance from the significant pixel to the adjacent significant pixel to the background pixel is generated as significant pixel distance information.
Generating size relationship information related to the size of the selected region of interest;
An image processing method characterized in that a pattern area is specified among attention areas based on significant pixel distance information for each significant pixel included in the selected attention area and the size relation information.
コンピュータを用い、
処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を第1連結画素として抽出し、
前記連結画素のうち非絵柄領域を除去し、
前記非絵柄領域を除去した後の画像データについて、有意でない画素が互いに連結している部分を第2連結画素として抽出し、
前記第2連結画素のうち、画像データの境界に接している第2連結画素を背景部分として特定し、当該特定した背景部分以外の領域を絵柄領域として特定することを特徴とする画像処理方法。
Using a computer,
A labeling process is performed on the image data to be processed, and significant pixel portions connected to each other are extracted as first connected pixels.
Removing a non-picture area from the connected pixels;
For the image data after removing the non-picture area, a portion where insignificant pixels are connected to each other is extracted as a second connected pixel,
An image processing method characterized in that, among the second connected pixels, a second connected pixel in contact with a boundary of image data is specified as a background part, and an area other than the specified background part is specified as a pattern area.
コンピュータに、
処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を連結画素として抽出する手順と、
前記連結画素のうち非絵柄領域を除去する手順と、
前記非絵柄領域を除去した後の画像データについて、残存した連結画素部分に対して背景となっている部分を背景部分として特定し、当該特定された背景部分を除去して、絵柄領域を特定する情報を生成する手順と、
を実行させることを特徴とする画像処理プログラム。
On the computer,
A procedure for performing a labeling process on the image data to be processed and extracting significant pixel parts connected to each other as a connected pixel;
Removing a non-picture area from the connected pixels;
For the image data after removing the non-picture area, the background part is specified as the background part for the remaining connected pixel parts, and the specified background part is removed to specify the picture area A procedure for generating information,
An image processing program for executing
コンピュータに、
処理対象となった画像データを構成する各画素を、所定の背景画素条件を満足する背景画素と、前記所定の背景画素条件を満足しない有意画素とに分類し、前記背景画素または画像データの端部によって互いに仕切られた、前記有意画素同士の連結部分を連結画素領域として抽出する手順と、
前記有意画素の各々について、当該有意画素から隣接する有意画素を辿って背景画素まで至るまでの距離を、有意画素距離情報として生成する手順と、
前記選択された注目領域のサイズに関係するサイズ関係情報を生成する手順と、
前記選択された注目領域に含まれる各有意画素ごとの有意画素距離情報、並びに前記サイズ関係情報に基づいて注目領域のうち絵柄領域を特定する手順と、
を実行させることを特徴とする画像処理プログラム。
On the computer,
Each pixel constituting the image data to be processed is classified into a background pixel that satisfies a predetermined background pixel condition and a significant pixel that does not satisfy the predetermined background pixel condition, and an end of the background pixel or image data A procedure for extracting a connection portion between the significant pixels separated from each other by a unit as a connection pixel region;
For each of the significant pixels, a procedure for generating the distance from the significant pixel to the background pixel by tracing the adjacent significant pixel as significant pixel distance information;
Generating size relationship information related to the size of the selected region of interest;
A procedure for identifying a picture area of the attention area based on the significant pixel distance information for each significant pixel included in the selected attention area, and the size relationship information;
An image processing program for executing
コンピュータに、
処理対象となった画像データについてラベリング処理を行い、互いに連結した有意画素部分を第1連結画素として抽出する手順と、
前記連結画素のうち非絵柄領域を除去する手順と、
前記非絵柄領域を除去した後の画像データについて、有意でない画素が互いに連結している部分を第2連結画素として抽出する手順と、
前記第2連結画素のうち、画像データの境界に接している第2連結画素を背景部分として特定し、当該特定した背景部分以外の領域を絵柄領域として特定する手順と、
を実行させることを特徴とする画像処理プログラム。
On the computer,
A procedure of performing a labeling process on the image data to be processed, and extracting significant pixel portions connected to each other as first connected pixels;
Removing a non-picture area from the connected pixels;
A procedure for extracting a portion where insignificant pixels are connected to each other as the second connected pixel for the image data after removing the non-picture area;
Among the second connected pixels, a procedure for specifying a second connected pixel in contact with a boundary of image data as a background portion and specifying an area other than the specified background portion as a design area;
An image processing program for executing
JP2004017698A 2004-01-26 2004-01-26 Image processing device Expired - Fee Related JP4182891B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004017698A JP4182891B2 (en) 2004-01-26 2004-01-26 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004017698A JP4182891B2 (en) 2004-01-26 2004-01-26 Image processing device

Publications (2)

Publication Number Publication Date
JP2005210650A true JP2005210650A (en) 2005-08-04
JP4182891B2 JP4182891B2 (en) 2008-11-19

Family

ID=34902420

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004017698A Expired - Fee Related JP4182891B2 (en) 2004-01-26 2004-01-26 Image processing device

Country Status (1)

Country Link
JP (1) JP4182891B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007336563A (en) * 2006-06-15 2007-12-27 Sharp Corp Method and system for specifying region of uniform color in digital image
WO2010058735A1 (en) * 2008-11-21 2010-05-27 独立行政法人科学技術振興機構 Image processing device and method
JP2010124346A (en) * 2008-11-21 2010-06-03 Japan Science & Technology Agency Image processing apparatus, method and program
JP2011097538A (en) * 2009-11-02 2011-05-12 Sharp Corp Image processing apparatus, program, recording medium
US8150166B2 (en) 2006-09-06 2012-04-03 Sharp Laboratories Of America, Inc. Methods and systems for identifying text in digital images
US8368956B2 (en) 2006-06-15 2013-02-05 Sharp Laboratories Of America, Inc. Methods and systems for segmenting a digital image into regions
US8630498B2 (en) 2006-03-02 2014-01-14 Sharp Laboratories Of America, Inc. Methods and systems for detecting pictorial regions in digital images

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8630498B2 (en) 2006-03-02 2014-01-14 Sharp Laboratories Of America, Inc. Methods and systems for detecting pictorial regions in digital images
JP2007336563A (en) * 2006-06-15 2007-12-27 Sharp Corp Method and system for specifying region of uniform color in digital image
JP4745297B2 (en) * 2006-06-15 2011-08-10 シャープ株式会社 Method and system for identifying regions of uniform color in digital images
US8368956B2 (en) 2006-06-15 2013-02-05 Sharp Laboratories Of America, Inc. Methods and systems for segmenting a digital image into regions
US8437054B2 (en) 2006-06-15 2013-05-07 Sharp Laboratories Of America, Inc. Methods and systems for identifying regions of substantially uniform color in a digital image
US8150166B2 (en) 2006-09-06 2012-04-03 Sharp Laboratories Of America, Inc. Methods and systems for identifying text in digital images
WO2010058735A1 (en) * 2008-11-21 2010-05-27 独立行政法人科学技術振興機構 Image processing device and method
JP2010124346A (en) * 2008-11-21 2010-06-03 Japan Science & Technology Agency Image processing apparatus, method and program
JP4650958B2 (en) * 2008-11-21 2011-03-16 独立行政法人科学技術振興機構 Image processing apparatus, method, and program
JP2011097538A (en) * 2009-11-02 2011-05-12 Sharp Corp Image processing apparatus, program, recording medium

Also Published As

Publication number Publication date
JP4182891B2 (en) 2008-11-19

Similar Documents

Publication Publication Date Title
JP3748172B2 (en) Image processing device
JP4764231B2 (en) Image processing apparatus, control method, and computer program
JP4646797B2 (en) Image processing apparatus, control method therefor, and program
JP5132530B2 (en) Image coding apparatus, image processing apparatus, and control method thereof
US20020006220A1 (en) Method and apparatus for recognizing document image by use of color information
JP4149464B2 (en) Image processing device
JP2000181992A (en) Color document image recognition device
JP4182891B2 (en) Image processing device
JP6370080B2 (en) Image processing apparatus, image processing method, and program.
JP5335581B2 (en) Image processing apparatus, image processing method, and program
JP5151708B2 (en) Image processing apparatus and image processing program
JP4370950B2 (en) Image processing device
JP4217969B2 (en) Image processing apparatus and program
JP4396331B2 (en) Image processing device
JP2005134601A (en) Analysis system for map image
JP4259310B2 (en) Image processing apparatus and program
JP4312524B2 (en) Manga line image forming method, apparatus and computer program
JP4507656B2 (en) Image processing device
JP4227530B2 (en) Image processing apparatus, image processing method, computer-readable storage medium storing program, and program
JP4193687B2 (en) Image processing apparatus and program
JP4250316B2 (en) Image compression apparatus, image expansion apparatus, method thereof, and storage medium
JP4228905B2 (en) Image processing apparatus and program
JP4182873B2 (en) Image processing apparatus and program
JP2003046746A (en) Method and apparatus for processing image
JP4311183B2 (en) Image processing apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061220

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071112

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080415

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080613

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

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

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4182891

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130912

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees