JPH07121699A - Image processing device - Google Patents

Image processing device

Info

Publication number
JPH07121699A
JPH07121699A JP5269110A JP26911093A JPH07121699A JP H07121699 A JPH07121699 A JP H07121699A JP 5269110 A JP5269110 A JP 5269110A JP 26911093 A JP26911093 A JP 26911093A JP H07121699 A JPH07121699 A JP H07121699A
Authority
JP
Japan
Prior art keywords
image
area
texture
data
filled
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
JP5269110A
Other languages
Japanese (ja)
Other versions
JP2845107B2 (en
Inventor
Mariko Tanahashi
真理子 棚橋
Masatoshi Kato
雅敏 加藤
Keiichi Koike
桂一 小池
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP5269110A priority Critical patent/JP2845107B2/en
Publication of JPH07121699A publication Critical patent/JPH07121699A/en
Application granted granted Critical
Publication of JP2845107B2 publication Critical patent/JP2845107B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To make only required information into a vector by automatically sampling a texture area and the contour(edge) of it from image data, deleting the texture area from the image data, and thinning the contour of the texture area. CONSTITUTION:This device is constituted of an image input part 101, an arithmetic part 102, memory 103, an image output part 104, an image display part 105, and a pointing device 106. The texture area and the contour(edge) of it are automatically sampled from the image data, and the texture area is deleted from the image data, then, the contour of the texture area is thinned. Also, the texture area is made into the vector as a polygon consisting of uniform texture images as it is, and it is made into image descriptive language so as to possess the kind of the image in a closed area as attribute. Furthermore, a paint-out area and the contourpart of it in the image data are automatically sampled, and a sampled paint-out area is deleted from the image data, then, a paintout contour part is thinned.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は一般的な文書画像をスキ
ャナ等で読取って得られるラスタデータやコンピュータ
上で描画した画像のラスタデータを処理する画像処理装
置に関するものである。さらに詳細には、オフィス文書
や、図面等によく用いられるテクスチャ領域や塗りつぶ
し領域を閉領域として認識し、前記閉領域を削除するこ
とで効率良いベクトル化を可能にする画像処理装置に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus for processing raster data obtained by reading a general document image with a scanner or the like or raster data of an image drawn on a computer. More specifically, the present invention relates to an image processing apparatus that recognizes a texture area or a filled area that is often used in an office document or a drawing as a closed area and deletes the closed area to enable efficient vectorization. .

【0002】[0002]

【従来の技術】一般的な画像はテキスト、線図形、一様
な領域、写真などの自然画像などの要素から構成されて
いる。このように複数種類の構成要素から成る一般的な
画像をコンピュータ上で処理する時に、それぞれの領域
に応じた処理が必要である。従来このような要求に応え
るものとして以下に挙げる例がある。この例は線画像の
中に塗りつぶし領域が存在するような場合に、塗りつぶ
し領域と線画像の領域について異なる処理を行うもので
ある。その詳細を以下に説明する。図29は特開平1-20
6470号公報に示された従来の図形処理装置のブロック図
である。スキャナ1は紙に描かれた図形を読取って2値
画像信号を出力するものであって、例えばイメージスキ
ャナや、テレビカメラなどである。スキャナ1から出力
された2値画像信号はCPU2に与えられる。CPU2
にはキーボード3と画像メモリ4とベクトルデータメモ
リ5とが接続される。キーボード3はスキャナ1によっ
て読取られた画像のうち、線図形と塗りつぶし図形のそ
れぞれを指定したり、細線化のための回数を入力するの
に用いる。CPU2は内蔵されているプログラムに基づ
いて、スキャナ1で読取られた2値画像データを画像メ
モリ4に記憶させたり、その2値画像データに基づい
て、細線化、エッジ(輪郭部)抽出、ベクトル化などの
処理を行うものである。ベクトルデータメモリ5はCP
U2によってベクトル化されたデータを記憶する。
2. Description of the Related Art A general image is composed of elements such as text, line graphics, uniform areas, and natural images such as photographs. As described above, when a general image including a plurality of types of constituent elements is processed on a computer, it is necessary to perform processing according to each area. Conventionally, there are the following examples to meet such a demand. In this example, when there is a filled area in the line image, different processing is performed on the filled area and the area of the line image. The details will be described below. FIG. 29 shows Japanese Patent Laid-Open No. 1-20
FIG. 6 is a block diagram of a conventional graphic processing device disclosed in Japanese Patent No. 6470. The scanner 1 reads a figure drawn on paper and outputs a binary image signal, and is, for example, an image scanner or a television camera. The binary image signal output from the scanner 1 is given to the CPU 2. CPU2
A keyboard 3, an image memory 4 and a vector data memory 5 are connected to. The keyboard 3 is used to specify a line figure and a filled figure in the image read by the scanner 1 and to input the number of times for thinning. The CPU 2 stores the binary image data read by the scanner 1 in the image memory 4 based on a built-in program, and based on the binary image data, thinning, edge (outline) extraction, vector Processing such as conversion. Vector data memory 5 is CP
Store the vectorized data by U2.

【0003】次に動作について図30、図31を用いて
説明する。図30は図29の図形処理装置の動作を示す
フローチャートである。まず、スキャナ1によって画像
が読取られ、その2値画像データがCPU2に与えられ
る。この2値画像データはモニタなどの表示装置(図示
せず)に表示される。このとき、オペレータ(図形処理
装置を操作する人)が読取られた画像が塗りつぶし図形
であるかまたは線図形であるか、または塗りつぶし図形
と線図形の混在した画像であるかを判断する。図31
(a)に示すような塗りつぶし図形であれば、オペレータ
がキーボード3によって塗りつぶし図形であることを指
定するとともに、1次細線化の回数を入力する。入力さ
れた回数に応じてCPU2は指定された回数だけ細線化
を実施する。具体的には、図31(a)に示した塗りつぶ
し図形の幅方向端部にある画素が指定された回数だけ1
画素毎に削除され、その結果を図31(b)に示す。次に
CPU2は図31(b)に示すような1次細線化された塗
りつぶし図形のエッジ抽出処理を行う。その結果図31
(c)に示すような比較的太い線のみで表される図形に処
理する。次にCPU2はエッジ抽出された図形に対し
て、再び細線化の処理をする。図31(c)の太い線の図
形が図31(d)のような、画素1ドット分のつながりと
なるような細い線図形に処理される。これを2次細線化
と呼ぶ。次にCPU2は細線化された線図形をベクトル
データに変換し、ベクトルデータメモリ5に記憶させ
る。塗りつぶし領域については以上のような処理を行
う。線図形であれば、2次細線化のみを行い、画素1ド
ット分のつながりとなるような線図形に処理される。塗
りつぶし領域と線図形の混在する場合であれば、キーボ
ード3によって塗りつぶし図形と線図形を指定すること
によって、塗りつぶし図形については先に説明した処理
を行い、図31(d)のようにエッジのみで表された図形
になる。また、線図形については1画素の連なりから成
る線図形で表された図形に処理することができる。
Next, the operation will be described with reference to FIGS. 30 and 31. FIG. 30 is a flow chart showing the operation of the graphic processing device of FIG. First, an image is read by the scanner 1, and its binary image data is given to the CPU 2. This binary image data is displayed on a display device (not shown) such as a monitor. At this time, the operator (person who operates the graphic processing device) determines whether the read image is a filled graphic, a line graphic, or an image in which the filled graphic and the line graphic are mixed. Figure 31
In the case of the filled figure as shown in (a), the operator designates the filled figure with the keyboard 3 and inputs the number of primary thinning. The CPU 2 carries out the thinning process a specified number of times according to the input number. Specifically, the pixels at the widthwise end of the filled figure shown in FIG.
Each pixel is deleted, and the result is shown in FIG. Next, the CPU 2 performs an edge extraction process for the primary thinned filled figure as shown in FIG. As a result, FIG.
Process to a graphic represented by only a relatively thick line as shown in (c). Next, the CPU 2 performs thinning processing again on the figure whose edge has been extracted. The thick line graphic in FIG. 31 (c) is processed into a thin line graphic as shown in FIG. This is called secondary thinning. Next, the CPU 2 converts the thinned line figure into vector data and stores it in the vector data memory 5. The above processing is performed on the filled area. If it is a line figure, only the secondary thinning is performed, and the line figure is processed so as to form a connection for one dot of a pixel. If the filled area and the line figure are mixed, the above-described processing is performed on the filled figure by designating the filled figure and the line figure with the keyboard 3, and only the edge is displayed as shown in FIG. 31 (d). It becomes the figure shown. Also, a line figure can be processed into a figure represented by a line figure consisting of a series of one pixel.

【0004】[0004]

【発明が解決しようとする課題】従来の図形処理装置は
以上のように構成されているので、塗りつぶしの領域を
含む図形に対しては、塗りつぶし領域のエッジを先に抽
出してしまうことにより塗りつぶし領域についてもベク
トル化が可能になっている。しかし、表示した入力画像
上でオペレータが塗りつぶし領域を指定し、更に1次細
線化を行う回数を入力する必要があり、手間がかかる。
また、塗りつぶし領域だけでなく、例えば図7(a)に示
す画像のようにハッチングやドットの領域があった場
合、ベクトル化する意味の無い規則的パターンの全てを
細線化、ベクトル化してしまい、例えば、ハッチングさ
れた長方形という認識がなされない。また、より様々な
種類の画像を処理するにあたって、テクスチャパターン
のデータや、カラー画像の色のデータは画像を表現する
のに非常に有効なデータである。しかし、従来の画像処
理装置ではそのような画像の情報を自動的に有効なベク
トルデータの形に変換するものは無かった。
Since the conventional graphic processing apparatus is configured as described above, a graphic including a filled area can be filled by extracting the edge of the filled area first. Vectorization is also possible for regions. However, the operator needs to specify the filled area on the displayed input image and input the number of times the primary thinning is performed, which is troublesome.
In addition to the filled area, if there is a hatching or dot area as in the image shown in FIG. 7A, all regular patterns that are meaningless to vectorize are thinned and vectorized, For example, it is not recognized as a hatched rectangle. Further, when processing various types of images, texture pattern data and color image color data are very effective data for expressing images. However, there is no conventional image processing apparatus that automatically converts such image information into an effective vector data form.

【0005】本発明は上記のような問題点を解消するた
めになされたもので、図面などの線画像だけでなく、よ
り様々な種類の画像を処理することを目的としている。
さらには一般的な画像をコンピュータ上で編集するのに
都合の良い画像記述言語に変換することを目的としてい
る。
The present invention has been made to solve the above problems, and an object thereof is to process not only line images such as drawings but also various types of images.
Furthermore, the purpose is to convert a general image into an image description language convenient for editing on a computer.

【0006】[0006]

【課題を解決するための手段】本発明に係る画像処理装
置は、ラスタデータを扱う画像処理装置において、ハッ
チングなどのテクスチャ領域(明るさ、色の変化が一様
な領域をテクスチャ領域と言う)およびその輪郭(エッ
ジ)を自動的に抽出する手段と、この抽出されたテクス
チャ領域を画像データから削除する手段と、テクスチャ
領域の輪郭を細線化する手段とを設けたものである。
An image processing apparatus according to the present invention is an image processing apparatus that handles raster data, and has a texture region such as hatching (a region where brightness and color change are uniform is called a texture region). And means for automatically extracting the contour (edge) thereof, means for deleting the extracted texture region from the image data, and means for thinning the contour of the texture region.

【0007】また、本発明に係る画像処理装置は、ラス
タデータを扱う画像処理装置において、ハッチングなど
のテクスチャ領域(明るさ、色の変化が一様な領域をテ
クスチャ領域と言う)およびその輪郭(エッジ)を自動
的に抽出する手段と、この抽出されたテクスチャ領域を
画像データから削除する手段に加えて、さらに、細線化
されたテクスチャ領域の輪郭部を多角形としてベクトル
化する手段と、閉領域内の画像の種類を属性に持つよう
に画像記述言語化する手段とを設けたものである。
Further, the image processing apparatus according to the present invention is an image processing apparatus which handles raster data, and a texture area such as hatching (an area having a uniform change in brightness and color is called a texture area) and its contour ( Edge) and the means for deleting the extracted texture area from the image data, and the means for vectorizing the outline of the thinned texture area as a polygon. An image description language conversion means is provided so that the type of the image in the area has an attribute.

【0008】また、本発明に係る画像処理装置は、ラス
タデータを扱う画像処理装置において、画像データ中の
塗りつぶし領域およびその輪郭部を自動的に抽出する手
段と、この抽出された塗りつぶし領域を画像データから
削除し、塗りつぶし領域の輪郭部を細線化する手段とを
設けたものである。
Further, the image processing apparatus according to the present invention is, in an image processing apparatus which handles raster data, means for automatically extracting a filled area and its contour portion in image data, and an image of the extracted filled area. And means for thinning the outline of the filled area from the data.

【0009】また、本発明に係る画像処理装置は、ラス
タデータを扱う画像処理装置において、画像データ中の
塗りつぶし領域およびその輪郭部を自動的に抽出する手
段と、この抽出された塗りつぶし領域を画像データから
削除し、塗りつぶし領域の輪郭部を細線化する手段に加
えて、さらに、細線化された塗りつぶし領域の輪郭部を
多角形としてベクトル化する手段と、閉領域内の画像の
種類を属性に持つように画像記述言語化する手段とを設
けたものである。
Further, the image processing apparatus according to the present invention is, in an image processing apparatus which handles raster data, means for automatically extracting a filled area and its contour portion in the image data and an image of the extracted filled area. In addition to the method of deleting from the data and thinning the outline of the filled area, the method of vectorizing the outline of the thinned filled area as a polygon, and the attribute of the type of image in the closed area And a means for converting the image into a description language.

【0010】また、本発明に係る画像処理装置は、画像
を構成する色をコード化する手段と、この色のコードを
用いて画像データを再構成する手段と、コード化された
画像をベクトル化する手段と、この色のコードをベクト
ルデータの属性として画像記述言語化する手段を設けた
ものである。
The image processing apparatus according to the present invention further comprises means for encoding the colors forming the image, means for reconstructing the image data using the color code, and vectorizing the encoded image. And a means for converting the color code into an image description language as an attribute of vector data.

【0011】また、本発明に係る画像処理装置は、画像
を構成する色をコード化する手段とこの色のコードを用
いて画像データを再構成する手段と、コード化された画
像から塗りつぶし領域を自動的に抽出する手段と、この
抽出された塗りつぶし領域の色のコードを塗りつぶし領
域の属性として画像記述言語化する手段を設けたもので
ある。
Further, the image processing apparatus according to the present invention comprises means for coding the colors forming the image, means for reconstructing the image data using the code of this color, and a filled area from the coded image. A means for automatically extracting and a means for converting the extracted color code of the filled area into an image description language as an attribute of the filled area are provided.

【0012】また、本発明に係る画像処理装置は、画像
を構成する色をコード化する手段とこの色のコードを用
いて画像データを再構成する手段と、コード化された画
像からテクスチャ領域を自動的に抽出する手段と、この
抽出されたテクスチャ領域の色のコードをテクスチャ領
域の属性として画像記述言語化する手段を設けたもので
ある。
Further, the image processing apparatus according to the present invention comprises means for encoding colors forming an image, means for reconstructing image data using the color codes, and texture areas from the encoded images. A means for automatically extracting and a means for converting the extracted color code of the texture area into an image description language as an attribute of the texture area are provided.

【0013】[0013]

【作用】本発明においては、画像データからテクスチャ
領域およびその輪郭(エッジ)を自動的に抽出し、この
抽出されたテクスチャ領域を画像データから削除し、テ
クスチャ領域の輪郭を細線化する。
In the present invention, the texture region and its contour (edge) are automatically extracted from the image data, the extracted texture region is deleted from the image data, and the contour of the texture region is thinned.

【0014】本発明においては、テクスチャ領域をその
まま、中が一様なテクスチャ画像である多角形としてベ
クトル化し、閉領域内の画像の種類を属性に持つように
画像記述言語化する。
In the present invention, the texture region is vectorized as it is as a polygon having a uniform texture image, and the image description language is created so as to have the type of the image in the closed region as an attribute.

【0015】本発明においては、画像データ中の塗りつ
ぶし領域およびその輪郭部を自動的に抽出し、この抽出
された塗りつぶし領域を画像データから削除し、塗りつ
ぶし領域の輪郭部を細線化する。
In the present invention, the filled area and its contour portion in the image data are automatically extracted, the extracted filled area is deleted from the image data, and the contour portion of the filled area is thinned.

【0016】本発明においては、塗りつぶし領域をその
まま、中が塗りつぶされた多角形としてベクトル化し、
閉領域内の画像の種類を属性に持つように画像記述言語
化する。
In the present invention, the filled area is vectorized as it is as a polygon whose inside is filled,
The image description language is created so that the type of the image in the closed area has an attribute.

【0017】本発明においては、画像を構成する色をコ
ード化し、この色のコードを用いて画像データを再構成
し、色コードで表現された画像をベクトル化し、この色
のコードをベクトルデータの属性として画像記述言語化
する。
In the present invention, the colors forming the image are coded, the image data is reconstructed using this color code, the image represented by the color code is vectorized, and this color code is converted into vector data. Image description language is used as an attribute.

【0018】本発明においては、画像を構成する色をコ
ード化し、この色のコードを用いて画像データを再構成
し、色コードで表現された画像からテクスチャ領域を自
動的に抽出し、この抽出されたテクスチャ領域の色のコ
ードをテクスチャ領域の属性として画像記述言語化す
る。
In the present invention, the colors forming the image are coded, the image data is reconstructed using the code of this color, the texture region is automatically extracted from the image expressed by the color code, and this extraction is performed. The code of the color of the generated texture area is converted into an image description language as an attribute of the texture area.

【0019】本発明においては、画像を構成する色をコ
ード化し、この色のコードを用いて画像データを再構成
し、色コードで表現された画像から塗りつぶし領域を自
動的に抽出し、この抽出された塗りつぶし領域の色のコ
ードを塗りつぶし領域の属性として画像記述言語化す
る。
In the present invention, the color forming the image is coded, the image data is reconstructed using the code of this color, the filled area is automatically extracted from the image expressed by the color code, and this extraction is performed. The code of the color of the filled area is converted into an image description language as an attribute of the filled area.

【0020】[0020]

【実施例】以下に、図面を参照して、本発明を詳細に説
明する。図1はこの画像処理装置の概略を示すブロック
図である。本画像処理装置は画像入力部101、演算部10
2、メモリ103、画像出力部104、画像表示部105、ポイン
ティングデバイス106から構成される。101はカラースキ
ャナなどの画像入力部である。演算部102は画像入力部
から入力されるビットマップイメージのラスタデータの
処理を行う。103は各処理で必要とされる途中結果など
のデータを記憶しておくメモリである。画像出力部104
は処理を終えた画像データを出力する。105は入力され
た処理の対象画像を表示する画像表示部である。オペレ
ータは画像表示部105上の画像において、マウスなどの
ポインティングデバイス106を用いて文字領域を指定す
る。指定された文字領域のデータはその部分だけ切りと
られ、OCR107に入力され、そこで文字コードに変換
される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to the drawings. FIG. 1 is a block diagram showing the outline of this image processing apparatus. The image processing apparatus includes an image input unit 101 and a calculation unit 10.
2. The memory 103, the image output unit 104, the image display unit 105, and the pointing device 106. Reference numeral 101 is an image input unit such as a color scanner. The calculation unit 102 processes the raster data of the bitmap image input from the image input unit. Reference numeral 103 is a memory for storing data such as intermediate results required for each process. Image output unit 104
Outputs the processed image data. An image display unit 105 displays the input target image of the process. The operator uses the pointing device 106 such as a mouse to specify a character area in the image on the image display unit 105. The data of the designated character area is cut off only for that portion, input to the OCR 107, and converted into a character code there.

【0021】画像入力部101から画像データが入力され
ると、図2に示されるような画像処理モード設定画面が
画像表示部105に表示される。前記画面中、入力画像表
示エリア201に入力画像が表示される。図2の画像処理
モード設定画面は、入力画像表示エリア201、文字領域
設定ボタン202、輪郭モードボタン203、全画像モードボ
タン204、カラーモードボタン205、モノモードボタン20
6、処理スタートボタン207が配置されている。オペレー
タは画像処理モード設定画面において、モード選択のコ
ラム内の輪郭モードボタン203、全画像モードボタン204
のうちのどちらかと、カラーモードボタン205、モノモ
ードボタン206のうちのどちらかをクリックすることで
画像処理モードを選択する。ここでは画像処理モードと
して、4つのモードを設ける。カラーモードとモノモー
ドの2つのモードについて、それぞれ輪郭のデータのみ
を画像記述言語化する輪郭モードと、閉領域内の画像に
ついてもその種類について画像記述言語化する全画像モ
ードを設ける。
When image data is input from the image input unit 101, an image processing mode setting screen as shown in FIG. 2 is displayed on the image display unit 105. The input image is displayed in the input image display area 201 on the screen. The image processing mode setting screen of FIG. 2 has an input image display area 201, a character area setting button 202, a contour mode button 203, an all image mode button 204, a color mode button 205, and a mono mode button 20.
6. A processing start button 207 is arranged. On the image processing mode setting screen, the operator selects the contour mode button 203 and the all image mode button 204 in the mode selection column.
The image processing mode is selected by clicking either one of them, and either the color mode button 205 or the mono mode button 206. Here, four modes are provided as the image processing mode. Regarding the two modes of the color mode and the mono mode, there are provided a contour mode in which only contour data is converted into an image description language, and an entire image mode in which an image in a closed region is converted into an image description language.

【0022】また、オペレータは表示された入力画像
中、文字領域が存在すれば、予め文字領域設定ボタン20
2をクリックし(ボタン上にマウスを用いてポインタを
移動させ、マウスに付属したボタンを押下すること)、
文字領域設定モードに遷移する。 図3は文字領域設定
モードに遷移した時の画像処理モード設定画面である。
図3の文字領域設定モードの表示画面において、分割決
定ボタン301、設定解除ボタン302、モード終了ボタン30
3が配置されている。文字領域設定モードに遷移した状
態で、画像表示部201に表示された画像上においてオペ
レータが文字領域の左上と右下の点をクリックすること
で、文字領域を長方形として選択する。この時、選択さ
れた領域は、図3の画像中表題のところに示すように”
選択された”ことがわかるように、左上と右下の頂点に
白丸が付与された破線の長方形でマーキングされてい
る。このように文字領域を選択した後、分割決定ボタン
をクリックすると、演算部102は、上記白丸の付与され
た破線の長方形で囲まれた領域を文字領域として、その
長方形の左上と右下の点の座標をメモリに格納する。文
字領域として認識されると、図3の画像中下部の説明文
のところに示すように”文字領域として認識された”こ
とが左上と右下の頂点に黒丸が付与された破線の長方形
でマーキングされる。最後に文字領域設定モード終了ボ
タン303をクリックすると、演算部102は文字領域のラス
タデータを切りとり、OCR107に入力する。OCR107
からの出力データと文字領域の長方形の左上と右下の点
の座標を文字領域データとしてメモリ103に格納する。
また原画像データから文字領域を削除したものを図形デ
ータとしてメモリ103に格納する。図4は以上の文字領
域分割処理の前後のそれぞれの画像データを示してい
る。図4(a)は原画像、図4(b)、(c)はそれぞれ文字領
域分割処理によって得られた文字領域データ(b)と図形
領域データ(c)である。
If there is a character area in the displayed input image, the operator previously sets the character area setting button 20.
2 Click (use the mouse to move the pointer over the button and press the button attached to the mouse),
Transition to the character area setting mode. FIG. 3 is an image processing mode setting screen when the mode is changed to the character area setting mode.
On the display screen of the character area setting mode of FIG. 3, the split decision button 301, the setting cancel button 302, the mode end button 30
3 are arranged. In the state of transition to the character area setting mode, the operator clicks the upper left and lower right points of the character area on the image displayed on the image display unit 201 to select the character area as a rectangle. At this time, as shown in the title of the image in FIG. 3, the selected area is "
As you can see that it has been selected, the upper left and lower right vertices are marked with dashed rectangles with white circles. After selecting the character area in this way, click the division decision button 102 stores the coordinates of the upper left and lower right points of the rectangle in the memory as the character area surrounded by the broken line rectangle with the white circles. As shown in the description at the bottom of the image, "Recognized as a character area" is marked with a dashed rectangle with black circles at the top left and bottom right vertices. When 303 is clicked, the arithmetic unit 102 cuts raster data in the character area and inputs it to the OCR 107.
And the coordinates of the upper left and lower right points of the rectangle of the character area are stored in the memory 103 as character area data.
The original image data with the character area deleted is stored in the memory 103 as graphic data. FIG. 4 shows respective image data before and after the above character area division processing. 4A is an original image, and FIGS. 4B and 4C are character area data (b) and graphic area data (c) obtained by the character area dividing process, respectively.

【0023】上記のように、文字領域を分割し、画像処
理モードの設定をした上で、オペレータが処理スタート
ボタン207をクリックすると図5のフローに従って画像
処理が実行され、画像のラスタデータは最終的に画像記
述言語に変換される。まず便宜をはかる為に、本説明で
用いる変数や記号の定義を図6を用いて説明する。区画
の座標を(i,j)、画素の座標を(x,y)とする。各座標軸の
方向は図6に示すとおりである。また、区画の大きさを
mとし、区画内の座標を(x,y)とする。また、最も右下の
区画座標を(imax,jmax)、画素座標を(xmax,ymax)とす
る。また、この処理において扱う画像データの変数を以
下に列挙する。 画像のラスタデータ:A(x,y) 塗りつぶし領域のラスタデータ:B(x,y) 塗りつぶし領域のエッジ部分のラスタデータ:D(x,y) テクスチャ領域のラスタデータ:C(x,y) テクスチャ領域のエッジ部分のラスタデータ:E(x,y) A(x,y)は座標(x,y)の画素が白の場合に0、黒の場合に
1とする。また、カラーモードの場合には白、黒以外の
色に2以上の整数をカラーコードとして割り当てる。ま
た、途中で形成されるデータB(x,y)、C(x,y)、D(x,y)、
E(x,y)の値はみな、領域番号であり、領域として抽出さ
れない画素については0である。以下、図5のフローチ
ャートに従って処理の概要を説明する。まず、最初にモ
ノモードとカラーモードの選択を判定をする。以下、最
初にモノモードの処理について図7を参照して詳細に説
明する。図7は本発明の一実施例による画像処理装置に
おける画像データの処理プロセスを表す図である。図7
には図5の処理による画像データA(x,y)と、処理途中で
形成されるB(x,y)、C(x,y)、D(x,y)、E(x,y)が示されて
いる。図7(a)から(g)において、それぞれのデータが0
の画素を白、1以上の画素を黒で表示している。
As described above, the character area is divided, the image processing mode is set, and when the operator clicks the processing start button 207, the image processing is executed according to the flow of FIG. 5, and the raster data of the image is finalized. Is converted into an image description language. First, for convenience, the definitions of variables and symbols used in this description will be described with reference to FIG. The coordinates of the section are (i, j) and the coordinates of the pixel are (x, y). The directions of the coordinate axes are as shown in FIG. In addition, the size of the section
Let m be the coordinate in the section be (x, y). Further, the lowest right section coordinate is (imax, jmax) and the pixel coordinate is (xmax, ymax). In addition, the variables of the image data handled in this processing are listed below. Image raster data: A (x, y) Fill area raster data: B (x, y) Edge area raster data: D (x, y) Texture area raster data: C (x, y) Raster data of the edge portion of the texture area: E (x, y) A (x, y) is set to 0 when the pixel at the coordinates (x, y) is white and is set to 1 when it is black. In the color mode, an integer of 2 or more is assigned as a color code to colors other than white and black. In addition, data B (x, y), C (x, y), D (x, y), and
The values of E (x, y) are all area numbers, and are 0 for pixels that are not extracted as areas. The outline of the processing will be described below with reference to the flowchart of FIG. First, the selection of the mono mode and the color mode is determined. Hereinafter, first, the mono mode processing will be described in detail with reference to FIG. 7. FIG. 7 is a diagram showing a process of processing image data in the image processing apparatus according to the embodiment of the present invention. Figure 7
5 includes image data A (x, y) obtained by the processing of FIG. 5 and B (x, y), C (x, y), D (x, y), E (x, y) formed during the processing. It is shown. 7 (a) to (g), each data is 0
Pixels are displayed in white, and one or more pixels are displayed in black.

【0024】図7(a)は文字領域を削除した図形領域の
画像データA(x,y)を示す。前処理において、画像を図7
(b)に示すような区画に区切り、画像データA(x,y)より
各区画内の黒画素数をカウントする。この区画座標(i,
j)における黒画素数をpixels(i,j,code_black)というよ
うに表現する。この区画毎の黒画素数は後の処理に必要
となるため、メモリ103に記憶しておく。次に、後述す
るアルゴリズムに従って、塗りつぶし領域とそのエッジ
部分を抽出し、抽出された順に塗りつぶし領域に番号を
ふる。これを領域番号と呼ぶことにして、変数Kで表
す。塗りつぶし領域のラスタデータB(x,y)、塗りつぶし
領域のエッジ部分のラスタデータD(x,y)の値を領域番号
kにする。塗りつぶし領域として抽出されない画素のB
(x,y)、D(x,y)の値は0である。 B(x,y) = k (1) D(x,y) = k (2) ここで塗りつぶし領域におけるエッジ部分とは塗りつぶ
し領域の最も外側の一画素とする。次に、塗りつぶし領
域とエッジ部分をA(x,y)から削除する。具体的にB(x,y)
=0またはD(x,y)=0でない画素のA(x,y)の値を0にする。
塗りつぶし領域を削除したA(x,y)が図7(c)に示されて
いる。また、ここで抽出された塗りつぶし領域B(x,y)と
そのエッジ部分D(x,y)を合わせて図7(d)に示す。図7
(d)中、数字は領域番号kである。
FIG. 7A shows the image data A (x, y) of the graphic area in which the character area is deleted. In the preprocessing, the image is
The image is divided into sections as shown in (b), and the number of black pixels in each section is counted from the image data A (x, y). This parcel coordinate (i,
The number of black pixels in j) is expressed as pixels (i, j, code_black). Since the number of black pixels for each section is necessary for the subsequent processing, it is stored in the memory 103. Next, according to an algorithm described later, the filled area and its edge portion are extracted, and the filled areas are numbered in the order of extraction. This is called a region number and is represented by a variable K. The area number is the raster data B (x, y) of the filled area and the raster data D (x, y) of the edge of the filled area.
set to k B of the pixels that are not extracted as the filled area
The values of (x, y) and D (x, y) are 0. B (x, y) = k (1) D (x, y) = k (2) Here, the edge part in the filled area is the outermost pixel in the filled area. Next, the filled area and the edge portion are deleted from A (x, y). Specifically B (x, y)
The value of A (x, y) of a pixel that is not = 0 or D (x, y) = 0 is set to 0.
FIG. 7 (c) shows A (x, y) with the filled area deleted. Further, the filled area B (x, y) extracted here and its edge portion D (x, y) are shown together in FIG. 7 (d). Figure 7
In (d), the numeral is the area number k.

【0025】次に、後述するアルゴリズムに従って、テ
クスチャ領域とそのエッジ部分を抽出する。テクスチャ
領域のエッジはテクスチャ領域を囲む閉ループとする。
テクスチャ領域についても塗りつぶし領域同様に、抽出
された順に領域番号をふる。そして、テクスチャ領域の
ラスタデータC(x,y)、テクスチャ領域のエッジ部分のラ
スタデータE(x,y)の値を領域番号kにする。テクスチャ
領域として抽出されない画素のC(x,y)、E(x,y)の値は0
である。 C(x,y) = k (3) E(x,y) = k (4) この時、図8に示すように、そのテクスチャ領域の領域
番号とテクスチャ画像の種類を表すコード(以後、この
コードをテクスチャコードと呼ぶ)とを対応させてメモ
リ103に記憶しておく。テクスチャコードはテクスチャ
領域が抽出される際に、そのテクスチャ画像が新しい種
類のものである場合に、前記テクスチャ画像とともに登
録されるものである。図9に示すように所定の大きさの
テクスチャ画像のラスタデータとそのテクスチャ画像の
画像特徴量をコードに対応させてメモリ103に記憶して
おく。この画像特徴量については、後に詳細に記述す
る。次に、テクスチャ領域とそのエッジ部分を削除す
る。塗りつぶし領域同様、C(x,y)=0、または、E(x,y)=0
でないテクスチャ領域のA(x,y)の値を0にする。テクス
チャ領域を削除したA(x,y)が図7(e)に示されている。
また、ここで抽出されたテクスチャ領域C(x,y)とそのエ
ッジ部分E(x,y)を図7(f)に示す。図7(f)中、数字はテ
クスチャ領域の領域番号である。
Next, the texture region and its edge portion are extracted according to an algorithm described later. The edge of the texture area is a closed loop that surrounds the texture area.
Similarly to the filled area, the area number is assigned to the texture area in the order of extraction. Then, the values of the raster data C (x, y) of the texture area and the raster data E (x, y) of the edge portion of the texture area are set to the area number k. Values of C (x, y) and E (x, y) of pixels that are not extracted as texture areas are 0
Is. C (x, y) = k (3) E (x, y) = k (4) At this time, as shown in FIG. 8, a code indicating the area number of the texture area and the type of texture image (hereinafter, this The code is referred to as a texture code) and stored in the memory 103. The texture code is registered with the texture image when the texture region is extracted and the texture image is of a new type. As shown in FIG. 9, raster data of a texture image of a predetermined size and the image feature amount of the texture image are stored in the memory 103 in association with the code. The image feature amount will be described later in detail. Next, the texture area and its edge portion are deleted. Similar to the filled area, C (x, y) = 0 or E (x, y) = 0
Set the value of A (x, y) in the non-texture area to 0. A (x, y) from which the texture area is deleted is shown in FIG. 7 (e).
The texture area C (x, y) and the edge portion E (x, y) extracted here are shown in FIG. 7 (f). In FIG. 7 (f), the numeral is the area number of the texture area.

【0026】塗りつぶし領域と、テクスチャ領域を削除
した後、次に線画像処理を行う。この対象になるのはA
(x,y)、D(x,y)、E(x,y)のデータである。これらのデー
タをまとめて図7(g)に示す。ここで、扱う線画像処理
の細線化、ベクトル変換ともに公知の技術があるので、
ここではその詳細には触れない。まず、A(x,y)、D(x,
y)、E(x,y)について細線化を行い、次にA(x,y)について
ベクトル化を行う。次に、D(x,y)、E(x,y)は、閉領域で
あるという認識のもとにベクトル化を行う。ここで、D
(x,y)、E(x,y)は領域番号データであるが、一連の線画
像処理において、1以上の値を持つときは1、0の時は
そのまま0で処理をする。その時、輪郭モードと全画像
モードで異なる処理を行う。輪郭モードの場合には単純
にベクトル変換するだけである。一方、全画像モードの
場合にはD(x,y)、E(x,y)のエッジ画像データをベクトル
変換した後、その領域番号より閉領域内の画像について
図8に示すテクスチャコードを参照し、最終的な画像記
述言語にテクスチャコードや、塗りつぶしであることを
示すコードをベクトルデータの属性として付与する。こ
のようにして、A(x,y)、D(x,y)、E(x,y)についてベクト
ル化を終えると、図7(h)の図形中の黒丸に示すように
ベクトルの端点、通過点が求められる。
After deleting the filled area and the texture area, line image processing is next performed. This target is A
The data is (x, y), D (x, y), and E (x, y). These data are summarized and shown in FIG. 7 (g). Here, since there are known techniques for thinning and vector conversion of line image processing to be handled,
I won't go into the details here. First, A (x, y), D (x,
y) and E (x, y) are thinned, and then A (x, y) is vectorized. Next, D (x, y) and E (x, y) are vectorized with the recognition that they are closed regions. Where D
Although (x, y) and E (x, y) are area number data, in a series of line image processing, if the value is 1 or more, the value is 1, and if 0, the value is 0. At that time, different processing is performed in the contour mode and the whole image mode. In the contour mode, vector conversion is simply performed. On the other hand, in the case of the all image mode, after the vector conversion of the edge image data of D (x, y) and E (x, y), refer to the texture code shown in FIG. Then, a texture code or a code indicating that the image is filled is added to the final image description language as an attribute of vector data. In this way, when vectorization is completed for A (x, y), D (x, y), and E (x, y), as shown by the black circles in the figure of FIG. The passing point is required.

【0027】以上の処理を終えて、最終的な画像記述言
語の形になると、例えば図10(a)、(b)に示すようなデ
ータになる。図10は本発明の実施例の画像処理によっ
て最終的に出力される画像記述言語をモノ輪郭モード
(a)とモノ全画像モード(b)の場合に分けて示した図であ
る。図10の全ての画像記述言語において、Polgは多角
形、Lineは折れ線を表し、それらの記号の後にx,y座標
の値が並ぶ。これらの座標は折れ線の場合には2つの端
点もしくは通過点の座標であり、通過する順に記述され
ている。Lineの後に続くx,y座標が2点のデータのみの
場合、折れ線ではなく単純に線分である。一方、多角形
の場合には頂点の座標が記述されている。図10(a)の
輪郭モードの画像記述言語において、多角形のコードPo
lgの後にその閉領域内の画像を表すコードは無いが、図
10(b)の全画像モードの画像記述言語においては、閉
領域内の画像を表すコードが示されている。それらはそ
れぞれ塗りつぶし領域にはbeta1、テクスチャ領域にはp
attern1、pattern2のコードが付与されている。このコ
ードの最後の数字がテクスチャコードに対応する。
After the above processing is completed, when the final image description language is formed, for example, the data shown in FIGS. 10 (a) and 10 (b) are obtained. FIG. 10 shows an image description language finally output by the image processing according to the embodiment of the present invention as a mono-contour mode.
It is the figure which divided and showed in the case of (a) and the mono all image mode (b). In all the image description languages in FIG. 10, Polg represents a polygon, Line represents a polygonal line, and the x and y coordinate values are arranged after those symbols. In the case of a polygonal line, these coordinates are the coordinates of two end points or passing points, and are described in the order of passing. When the x and y coordinates following Line are only data of two points, they are not line segments but simply line segments. On the other hand, in the case of a polygon, the coordinates of the vertices are described. In the contour mode image description language of FIG. 10A, the polygonal code Po
After lg, there is no code representing the image in the closed area, but in the image description language in the all image mode of FIG. 10B, the code representing the image in the closed area is shown. They are beta1 for the filled area and p for the texture area, respectively.
Codes of attern1 and pattern2 are added. The last number in this code corresponds to the texture code.

【0028】上で述べたそれぞれの処理について以下に
詳細に説明する。まず、塗りつぶし領域を抽出する方法
について説明する。図11は塗りつぶし領域を抽出する
処理のフローチャートである。図中、kは領域番号であ
る。まず、前処理で区切られた区画を一単位として塗り
つぶし領域を抽出する。図12は区画単位の塗りつぶし
領域抽出の処理の流れを示している。次に、塗りつぶし
区画の周囲の区画の処理により、画素単位の塗りつぶし
領域の抽出を行う。このようにして塗りつぶし領域の抽
出を終えた後で、塗りつぶし領域内にエッジ部分の抽出
を行う。
Each processing described above will be described in detail below. First, a method of extracting a filled area will be described. FIG. 11 is a flowchart of the processing for extracting the filled area. In the figure, k is a region number. First, the filled area is extracted with the section divided in the preprocessing as one unit. FIG. 12 shows a flow of processing for extracting a filled area in units of sections. Next, the filled area is extracted in pixel units by processing the area around the filled area. After the extraction of the filled area is completed in this way, the edge portion is extracted in the filled area.

【0029】図12(a)のような塗りつぶし領域があっ
た場合に、まず、左上の区画から右方向への走査を主走
査として、各区画に対して区画毎にそれが塗りつぶし区
画か否かの判断をしながらラスタスキャンをする。この
判断は次の(5)式で表される条件を満たすかどうかであ
る。(5)式中aは最適化されたしきい値である。 pixels(i,j,code_black) > a (5) 以後、(5)式を満たす区画を塗りつぶし区画と呼ぶ。図
12(b)のように、塗りつぶし領域の区画を一つ見つけ
ると、その区画(i,j)から区画単位の連続化処理を開始
する。また、前記区画を連続化開始区画として、1イン
クリメントした領域番号kでラベリングする。この時、
ラベリングの対象とするのは、まだ塗りつぶし領域とし
てのラベルがふられていない区画である。従って、一つ
の区画が複数の塗りつぶし領域に属することはないよう
にする。また、kは初期値が0であるので、1つ目の領
域の領域番号は1である。
When there is a filled area as shown in FIG. 12 (a), first, the main scan is the scan from the upper left section to the right direction, and for each section, whether or not it is a filled section is determined. The raster scan is performed while making the judgment. This judgment is whether or not the condition represented by the following expression (5) is satisfied. In equation (5), a is an optimized threshold value. pixels (i, j, code_black)> a After (5), the partition that satisfies Eq. (5) is called the filled partition. As shown in FIG. 12B, when one section of the filled area is found, the section-based continuation process is started from the section (i, j). In addition, labeling is performed with the region number k that is incremented by 1 by using the segment as a continuation start segment. This time,
The target of labeling is a section that is not yet labeled as a filled area. Therefore, one section should not belong to a plurality of filled areas. Since the initial value of k is 0, the area number of the first area is 1.

【0030】連続化処理のフローチャートを図14に示
す。この連続化処理により、連続している塗りつぶし区
画が同じ値でラベリングされ、一つの連続領域として認
識される。連続化処理は塗りつぶし区画の周囲走査の繰
り返しで行う。周囲走査とは周囲8区画を図13に示す
ような順序で時計回りの方向に走査し、連続化開始区画
と同様の塗りつぶし区画であるか否かの判定をする。周
囲8区画の座標は図14のフローチャート中p,qで表さ
れている。走査された周囲区画が塗りつぶし区画である
場合には、連続化開始区画と同じ領域番号kの値でラベ
リングする。また、前記同じラベルをふった区画の座標
を、ラベルがふられた順番であるnumを配列に持つ変数i
(num)、j(num)に記憶する。この時、ラベルがふられた
順番として連続化開始区画はカウントされない。図12
(c)は連続化開始区画についての周囲走査を終えたとこ
ろであり、右、右下、下の三つの区画が塗りつぶし区画
であると判断され、通し番号numが1、2、3とふられ
ている。その通し番号を配列に持つ二つの変数i(num)、
j(num)にi座標と、j座標を記憶しておく。図12(c)で
は i(1) = 2 i(2) = 2 i(3) = 1 j(1) = 1 j(2) = 2 j(3) = 2 となる。連続化開始区画について周囲走査を終えると、
周囲走査の終わった区画の数を表すパラメータを1にす
る。今、このパラメータを変数p_finで表し、 p_fin = 1 とする。パラメータp_finは次に周囲走査を行う区画の
番号を表すことにもなっている。次に、p_finの値をi(p
_fin)、j(p_fin)に代入し、そこで得られたi座標、j座
標の区画について周囲走査を行う。つまり、図12(c)
においては1の区画について次に周囲走査を行う。その
結果が図12(d)であり、新たに4、5の番号がふられ
る。この時、既に塗りつぶし区画としてラベリングされ
ている区画については新たにラベリングは行わない。そ
れらの区画のi座標、j座標の値が i(4) = 3 i(5) = 3 j(4) = 1 j(5) = 2 と記憶され、p_finの値を1インクリメントする。
FIG. 14 shows a flowchart of the continuation process. By this continuation processing, continuous filled sections are labeled with the same value and recognized as one continuous area. The continuation process is performed by repeating the peripheral scanning of the filled section. The surrounding scan is performed by scanning the eight surrounding areas in the clockwise direction in the order shown in FIG. 13 and determining whether the area is a filled area similar to the continuation start area. The coordinates of the eight surrounding sections are represented by p and q in the flowchart of FIG. When the scanned surrounding section is a filled section, labeling is performed with the same value of the area number k as the continuous start section. In addition, the coordinate of the section labeled with the same label is a variable i that has num, which is the order of labeling, in an array.
It is stored in (num) and j (num). At this time, the continuation start section is not counted in the order in which the labels are given. 12
In (c), the peripheral scanning for the continuous start section is finished, and it is determined that the three sections, the right, the lower right, and the bottom are the filled sections, and the serial numbers num are numbered 1, 2, and 3. . Two variables i (num) with their serial numbers in the array,
The i coordinate and the j coordinate are stored in j (num). In FIG. 12C, i (1) = 2 i (2) = 2 i (3) = 1 j (1) = 1 j (2) = 2 j (3) = 2. When the surrounding scan is completed for the continuation start section,
The parameter indicating the number of sections for which the peripheral scanning is completed is set to 1. Now, this parameter is represented by the variable p_fin, and p_fin = 1. The parameter p_fin is also meant to represent the number of the section to be scanned next. Then change the value of p_fin to i (p
_fin) and j (p_fin), and the surrounding scan is performed on the section of the i coordinate and j coordinate obtained there. That is, FIG. 12 (c)
In, the peripheral scanning is performed for one section. The result is shown in FIG. 12 (d), and numbers 4 and 5 are newly added. At this time, a new labeling is not performed on a section that has already been labeled as a filled section. The values of the i coordinate and the j coordinate of those sections are stored as i (4) = 3 i (5) = 3 j (4) = 1 j (5) = 2, and the value of p_fin is incremented by 1.

【0031】最終的にkでラベリングされた全ての塗り
つぶし区画について、周囲走査を終えるまでこの処理を
繰り返す。図12(d)の場合には2から5の区画まで、
新たにラベリングされる区画は存在しないが、5まで周
囲走査を行い、そこで区画の連続化処理が終了する(図
12(e))。区画の連続化の終了は周囲走査済みの区画
の数p_finとラベリングされた区画の数numの値を比較す
ることで判断する。
This process is repeated until the peripheral scanning is finally completed for all the filled sections labeled with k. In the case of FIG. 12 (d), from 2 to 5 sections,
Although there is no new section to be labeled, the peripheral scanning is performed up to 5, and the section continuation process ends there (FIG. 12 (e)). Completion of partitioning is determined by comparing the value of the number of peripherally scanned partitions p_fin with the number of labeled partitions num.

【0032】ひとつの連続化開始区画からの連続化処理
が終了すると、前記連続化開始区画の次の区画から再び
ラスタスキャンを始め、次の連続化開始区画をさがす。
図12(f)のように、再び塗りつぶしの区画を見つける
と、その区画を連続化開始区画として、そこから連続化
処理を開始する。この時、塗りつぶし区画にふる領域番
号kの値は直前に抽出した領域番号kの値を1インクリメ
ントしたものである。以上のようにして、領域毎にラベ
ルの値を変化させ、塗りつぶし領域を区画単位で抽出
し、最も右下の区画までラスタスキャンを終えると、そ
れまでに塗りつぶし領域として抽出された区画内の画素
について、塗りつぶし領域のデータB(x,y)をB(x,y)=kと
する。図12(g)において、実際の塗りつぶし領域中、
白線で囲まれた部分が区画単位で抽出された2つの領域
である。
When the continuation process from one continuation start section is completed, the raster scan is restarted from the section next to the continuation start section to search for the next continuation start section.
As shown in FIG. 12 (f), when a filled section is found again, the section is set as a continuation start section, and the continuation process is started from that section. At this time, the value of the area number k assigned to the filled section is obtained by incrementing the value of the area number k extracted immediately before by one. As described above, the label value is changed for each area, the filled area is extracted in units of partitions, and when the raster scan is completed up to the bottom-right partition, the pixels in the partition extracted as the filled area up to that point For, regarding the data B (x, y) of the filled area, B (x, y) = k. In FIG. 12 (g), in the actual filled area,
The portions surrounded by white lines are the two areas extracted in units of sections.

【0033】一通り、区画単位の塗りつぶし領域の抽出
が終了した後、図11のフローチャート中、塗りつぶし
区画の周囲の処理において、各領域毎に区画単位では抽
出され得なかった塗りつぶし領域の残りの部分とエッジ
部分の抽出処理を行う。この処理は図15(a)のk=1の
塗りつぶし区画の周囲の矢印に示されているように、外
側に向かって黒画素の連続性を走査する。その詳細を図
16、図17のフローチャートとともに以下に説明す
る。図16は本発明の実施例の画像処理中で、塗りつぶ
し区画の周囲処理のフローチャートである。図17は図
16中の区画内連続性走査の処理のフローチャートであ
る。フローチャート中kは領域番号を示す変数であり、k
maxは領域の数を表している。領域毎に周囲の処理を行
う。区画単位のラスタスキャンをし、塗りつぶし領域で
はない区画について、隣合う塗りつぶし区画からの黒画
素の連続性を走査する。図15(b)において、中心の区
画が塗りつぶしではない注目区画である。区画内連続性
走査では、まず、その上下左右の周囲4区画が注目して
いる番号kの塗りつぶし領域であるか否かの判断をす
る。周囲4区画のうち、塗りつぶし領域が存在した場合
には、周囲の塗りつぶし区画から図15(b)に示す矢印
の方向に黒画素の連続性を判断する。これが図17のフ
ローチャート中、垂直処理にあたる。また図15(c)に
示すように、右上、右下、左上、左下の斜め隣の区画が
塗りつぶしであり、前記斜め隣の区画をはさむ位置の上
下左右の区画が塗りつぶし領域でない場合、斜め隣の区
画からの黒画素の連続性を走査する。これは図17のフ
ローチャート中斜め処理にあたる。
After the extraction of the filled area in units of sections is completed, the remaining portion of the filled area that cannot be extracted in units of sections in each area in the processing around the filled section in the flowchart of FIG. And edge part extraction processing is performed. This process scans the continuity of black pixels outward, as indicated by the arrows around the k = 1 filled section in FIG. 15 (a). The details will be described below with reference to the flowcharts of FIGS. FIG. 16 is a flowchart of the surrounding processing of the filled section in the image processing of the embodiment of the present invention. FIG. 17 is a flowchart of the intra-section continuous scanning process in FIG. In the flowchart, k is a variable indicating the area number, and k
max represents the number of areas. The surrounding processing is performed for each area. A raster scan is performed for each partition, and the continuity of black pixels from an adjacent painted partition is scanned for a partition that is not a painted area. In FIG. 15 (b), the center section is the not-filled section of interest. In the intra-section continuous scanning, first, it is determined whether or not the surrounding four sections on the upper, lower, left, and right sides are the painted area of the number k of interest. When there is a filled area in the four surrounding sections, the continuity of black pixels is determined from the surrounding filled section in the direction of the arrow shown in FIG. 15 (b). This corresponds to vertical processing in the flowchart of FIG. Further, as shown in FIG. 15 (c), when the diagonally adjacent sections at the upper right, lower right, upper left, and lower left are filled, and the upper, lower, left, and right sections sandwiching the diagonally adjacent section are not filled areas, Scan the continuity of the black pixels from the partition. This corresponds to the diagonal processing in the flowchart of FIG.

【0034】図15(d)〜(h)を用いて、上記垂直処理と
斜め処理による画素単位の領域抽出とエッジ部分の抽出
処理を説明する。ここで説明する処理は図15(b)の左
端のように、上隣の塗りつぶし区画から黒画素の連続性
を判断する場合である。ここでは、モノモードにおける
垂直処理について述べる。垂直処理では塗りつぶし区画
の最も外側の黒画素列からの連続性を黒画素列に垂直な
方向に走査する。斜め処理では塗りつぶし区画における
注目区画に隣接する頂点からの連続性を評価する。図1
5(d)〜(h)では1つの区画が1画素を示しており、黒の
区画、ハッチングの区画は黒画素を示している。ハッチ
ングは現在注目している2ラインを示している。最上列
の黒画素は上隣の塗りつぶし区画内の最下段の黒画素列
を示している。垂直処理の場合は、注目区画に面してい
る1列からの黒画素の連続性を判断する。斜め処理の場
合には注目区画に隣接するところの頂点からの黒画素の
連続性を判断する。
With reference to FIGS. 15 (d) to 15 (h), the pixel-based area extraction and edge portion extraction processing by the vertical processing and diagonal processing will be described. The process described here is a case where the continuity of black pixels is determined from the upper adjacent filled section as in the left end of FIG. Here, the vertical processing in the mono mode will be described. In the vertical processing, continuity from the outermost black pixel column of the filled section is scanned in the direction perpendicular to the black pixel column. In the diagonal processing, the continuity from the vertex adjacent to the target section in the filled section is evaluated. Figure 1
In 5 (d) to (h), one section shows one pixel, and the black section and the hatched section show black pixels. The hatching shows the two lines that are currently focused. The black pixel in the uppermost row indicates the black pixel row in the lowermost row in the upper adjacent filled section. In the case of vertical processing, the continuity of black pixels from one column facing the target partition is determined. In the case of diagonal processing, the continuity of black pixels from the vertex adjacent to the target section is determined.

【0035】黒画素の連続性は隣合う2ラインが重なる
か否かで判断し、これを繰り返すことで塗りつぶし領域
を抽出する。これを順を追って説明する。図15(d)に
はこの処理の最初の注目ラインである、塗りつぶし領域
の最も外側の1ラインと、更に外側の隣合う1ラインを
示している。まず、内側の1ラインにおいては黒画素列
の始点のx座標x_in1と終点のx座標x_in2を求める。次に
外側の黒画素列の始点のx座標x_out1と終点のx座標x_ou
t2を求める。この2ラインにおいて x_out2 > x_in1 or x_in2 > x_out1) (6) を判断し、上の2式のどちらかを満たせば、この2ライ
ンは重なることによって連続性が確認される。そして、
外側の黒画素列について、塗りつぶし領域であることが
確認されたので、B(x,y) = k(k;領域番号)とする。
次に図15(e)に示すように、更に1画素外側のライン
について連続性を確認するために、外側の黒画素列の始
点、終点のx座標を新たに内側の黒画素列の座標とす
る。 x_in1 = x_out1 , x_in2 = x_out2 (7) 以下同様に、外側に新たな黒画素列が抽出されない、も
しくは、抽出された黒画素列が一画素分内側の黒画素列
と全く重なり合わなくなるまで、上記の処理を繰り返
す。以上の処理によって塗りつぶし領域の抽出が可能に
なる。
The continuity of black pixels is judged by whether or not two adjacent lines overlap each other, and by repeating this, the filled area is extracted. This will be described step by step. FIG. 15 (d) shows the outermost one line of the filled area and the adjacent one line further outside, which are the first noticed lines of this processing. First, in the inner one line, the x coordinate x_in1 of the start point and the x coordinate x_in2 of the end point of the black pixel row are obtained. Next, the x coordinate x_out1 of the start point and the x coordinate x_ou of the end point of the outer black pixel row
Find t2. If x_out2> x_in1 or x_in2> x_out1) (6) is judged in these two lines and either of the above two expressions is satisfied, the continuity is confirmed by overlapping these two lines. And
Since it is confirmed that the outer black pixel row is a filled area, B (x, y) = k (k; area number).
Next, as shown in FIG. 15 (e), in order to confirm the continuity of the line further outside by one pixel, the x-coordinates of the start point and the end point of the outer black pixel row are newly set as the coordinates of the inner black pixel row. To do. x_in1 = x_out1, x_in2 = x_out2 (7) Similarly, until a new black pixel row is not extracted to the outside, or the extracted black pixel row does not overlap with the inner black pixel row for one pixel at all, the above The process of is repeated. With the above processing, the filled area can be extracted.

【0036】塗りつぶし領域の抽出が終了するとエッジ
抽出の処理を行う。今度は図15(g)、(h)内の矢印で示
すように、xとyの2方向にB(x,y)の値に変化の見られる
ところを探してエッジ部分を抽出する。図15(h)、(i)
に示すように、ドットパターンで表された画素がエッジ
画素であり、これをD(x,y) = kとする。以上で塗りつぶ
し領域とそのエッジ部分の抽出処理が終了する。
When the extraction of the filled area is completed, edge extraction processing is performed. This time, as shown by the arrows in FIGS. 15 (g) and 15 (h), the edge portion is extracted by searching for a place where the value of B (x, y) is changed in two directions of x and y. 15 (h), (i)
As shown in, the pixel represented by the dot pattern is an edge pixel, and this is D (x, y) = k. This is the end of the extraction processing of the filled area and its edge portion.

【0037】次に、テクスチャ領域を抽出する方法につ
いて説明する。テクスチャ領域抽出の処理を表したフロ
ーチャートを図18に示す。図18は本発明の実施例の
画像処理の中で、テクスチャ領域抽出のフローチャート
である。図中、kは領域番号である。テクスチャ領域の
抽出の処理は基本的に塗りつぶし領域の場合とほぼ同じ
である。まず、前処理において区切られた区画単位でテ
クスチャ領域の抽出をした後に、テクスチャ区画の周囲
の処理において画素単位の領域抽出を行う。
Next, a method of extracting a texture area will be described. FIG. 18 is a flowchart showing the texture region extraction processing. FIG. 18 is a flowchart of texture region extraction in the image processing of the embodiment of the present invention. In the figure, k is a region number. The process of extracting the texture region is basically the same as that for the filled region. First, the texture region is extracted in the unit of the divided sections in the pre-processing, and then the region of the pixel unit is extracted in the processing around the texture section.

【0038】区画単位のテクスチャ領域の抽出処理より
説明する。まず、注目する区画がテクスチャ画像かどう
かの判断(判断1)をしながら区画毎にラスタスキャン
をする。テクスチャ画像の区画がひとつ抽出されると、
そこからテクスチャ区画の連続化を開始する。この時、
抽出されたテクスチャ区画の画像が既にコード化されて
いるテクスチャ画像と等しいかどうかの判断(判断2)
をする。等しければ、図8に示すように、そのコードと
領域番号を対応させて記憶する。そうでなければ、図9
に示すように、新たに抽出されたテクスチャ画像の所定
の大きさ分とテクスチャ画像の画像特徴量を新たなコー
ドに対応させて記憶してから、新たなコードとこの領域
番号を対応させて記憶する。テクスチャ区画の連続化処
理を図19のフローチャートに示す。これは図12、1
3、14に示した塗りつぶし領域抽出の連続化処理とほ
ぼ等しい。この処理の中で、塗りつぶし領域の抽出処理
と異なるのは連続化するべきテクスチャ領域であるかの
判断(判断3)である。以下、上述した3つの判断につ
いて詳細に説明する。それぞれの判断のための主な画像
特徴量としては、黒画素数、各色毎の画素数、濃度共起
行列、空間周波数特性など、いろいろあるが、ここでは
フーリエパワースペクトルを利用した空間周波数特性に
基づく画像特徴量と黒画素数について説明する。
The process of extracting a texture area in units of sections will be described. First, a raster scan is performed for each section while determining whether the section of interest is a texture image (determination 1). When one section of the texture image is extracted,
From that point, the continuation of the texture section is started. This time,
Judgment whether the image of the extracted texture section is equal to the texture image already coded (decision 2)
do. If they are equal, as shown in FIG. 8, the code and the area number are stored in association with each other. Otherwise, FIG.
As shown in, the predetermined size of the newly extracted texture image and the image feature amount of the texture image are stored in association with a new code, and then the new code is stored in association with this area number. To do. The texture segment continuation process is shown in the flowchart of FIG. This is
This is almost the same as the continuous processing of the filled area extraction shown in 3 and 14. In this processing, the difference from the extraction processing of the filled area is the judgment (judgment 3) as to whether or not the texture area is to be made continuous. Hereinafter, the above-mentioned three determinations will be described in detail. There are various main image features for each judgment, such as the number of black pixels, the number of pixels for each color, the density co-occurrence matrix, and the spatial frequency characteristic. Here, the spatial frequency characteristic using the Fourier power spectrum is used. The image feature amount and the number of black pixels based on the image feature amount will be described.

【0039】最初に、図20(a)、(c)、(e)で示したよ
うな頻繁に用いられるテクスチャ画像をスキャナで読取
った画像データの2次元フーリエパワースペクトルを図
20(b)、(d)、(f)で示す。また、図21(a)のようにテ
クスチャでない画像の2次元フーリエパワースペクトル
を図21(b)に示す。2次元パワースペクトルのp、q軸
はそれぞれx方向、y方向の空間周波数に比例した値であ
る。上記、図20と図21のパワースペクトルを比較す
ると、テクスチャ画像の方は卓越しているパワーを持つ
空間周波数が空間周波数領域において規則的に点在して
いる。一方テクスチャではない画像のパワースペクトル
は卓越周波数の規則性は見られず、低周波数成分のパワ
ーがランダムに卓越している。以上のパワースペクトル
の特性を考慮して、テクスチャ領域の抽出を行う。上に
示した図20、図21はモノクロ2値画像について、白
のデータをー1、黒のデータを1に割当ててフーリエパ
ワースペクトルを算出したものである。
First, a two-dimensional Fourier power spectrum of image data obtained by reading a frequently used texture image as shown in FIGS. 20 (a), 20 (c) and 20 (e) with a scanner is shown in FIG. 20 (b), Shown by (d) and (f). Further, FIG. 21B shows a two-dimensional Fourier power spectrum of an image which is not a texture as shown in FIG. The p and q axes of the two-dimensional power spectrum are values proportional to the spatial frequency in the x and y directions, respectively. Comparing the power spectra of FIG. 20 and FIG. 21 described above, in the texture image, the spatial frequencies having the outstanding power are regularly scattered in the spatial frequency domain. On the other hand, the power spectrum of an image that is not a texture has no regularity of dominant frequencies, and the power of low-frequency components is dominant at random. The texture region is extracted in consideration of the above characteristics of the power spectrum. 20 and 21 shown above are obtained by calculating the Fourier power spectrum by assigning white data to -1 and black data to 1 for a monochrome binary image.

【0040】図18中の判断1は注目区画の画像がテク
スチャであるか否かである。前処理において、予めカウ
ントして記憶しておいた区画毎の黒画素数について、
(8)式に基づいて判断する。今、注目している区画の座
標は(i,j)であり、a1、a2は最適化されたしきい値であ
る。 a1 > pixels(i,j,code_black) > a2 (8) 次に、以下のparameter_k、parameter_lを考える。この
パラメータは上述のテクスチャ画像のパワースペクトル
の特性を考慮したものである。 parameter_k = Σkmax’(n) (9) parameter_l = Σlmax’(n) (10) ここで、kmax’(n)、lmax’(n)はn番目に大きなパワー
の振幅の空間周波数kmax(n)、lmax(n)を用いて次の式で
表される。 kmax’(n) = kmax(n) ;kmax(n) =< m/2 (11) kmax’(n) = m - kmax(n) ;kmax(n) > m/2 (12) lmax’(n) = lmax(n) ;lmax(n) =< m/2 (13) lmax’(n) = m - lmax(n) ;lmax(n) > m/2 (14) ここでkmax(n)、lmax(n)はそれぞれx方向、y方向の空
間周波数である。このパラメータparameter_k、paramet
er_lの値があるしきい値を上回る場合、卓越空間周波数
へのパワーの集中度が高いと判断して、テクスチャ画像
であると考える。式で表すと(15)式のようになる。(15)
式中a3は最適化されたしきい値である。 parameter_k > a3 or parameter_l > a3 (15) この後のテクスチャ領域の連続化のために、上記n番目
に大きなパワーの振幅を持つところの空間周波数をkmax
_st’(n)、lmax_st’(n)として、n番目に大きなパワー
の振幅をF_st(kmax_st’(n),lmax_st’(n))として記憶
しておく。
Judgment 1 in FIG. 18 is whether or not the image of the section of interest is a texture. In the pre-processing, regarding the number of black pixels for each section that has been counted and stored in advance,
Judgment is made based on equation (8). The coordinates of the section of interest are (i, j), and a1 and a2 are optimized threshold values. a1> pixels (i, j, code_black)> a2 (8) Next, consider the following parameter_k and parameter_l. This parameter takes into consideration the characteristics of the power spectrum of the texture image described above. parameter_k = Σkmax '(n) (9) parameter_l = Σlmax' (n) (10) where kmax '(n) and lmax' (n) are the spatial frequency kmax (n) of the nth largest power amplitude, It is expressed by the following equation using lmax (n). kmax '(n) = kmax (n); kmax (n) = <m / 2 (11) kmax' (n) = m-kmax (n); kmax (n)> m / 2 (12) lmax '( n) = lmax (n); lmax (n) = <m / 2 (13) lmax '(n) = m-lmax (n); lmax (n)> m / 2 (14) where kmax (n) , Lmax (n) are spatial frequencies in the x and y directions, respectively. This parameter parameter_k, paramet
When the value of er_l exceeds a certain threshold, it is determined that the power concentration to the predominant spatial frequency is high, and the texture image is considered. It can be expressed by equation (15). (15)
In the formula, a3 is an optimized threshold value. parameter_k> a3 or parameter_l> a3 (15) For the subsequent continuation of the texture region, the spatial frequency at the nth largest power amplitude is kmax.
As _st '(n) and lmax_st' (n), the amplitude of the nth largest power is stored as F_st (kmax_st '(n), lmax_st' (n)).

【0041】図18中の判断2は抽出された連続化開始
区画のテクスチャ画像が既にコード化されているテクス
チャ画像と同じものであるかの判断である。したがっ
て、この評価ではそれぞれの区画毎の空間周波数特性を
求め、卓越空間周波数、そのパワーの値、が等しいかど
うかを判断すれば良い。その具体的な式を以下に示す。
既にコード化されているテクスチャ画像のn番目に大き
なパワーの振幅の空間周波数を、kmax_c’(n)、lmax_
c’(n)とする。また、既にコード化されているテクスチ
ャ画像のn番目に大きなパワーをF_c(kmax_c’(n),lmax
_c’(n))とすると,注目区画と既にコード化されたテク
スチャ画像が等しいと判断される条件は以下に表される
式になる。 kmax_st’(n) = kmax_cm’(n) (16) lmax_st’(n) = lmax_cm’(n) (17) F_cm(kmax_cm’(n),lmax_cm’(n))) - c1 < F_st(kmax_st’(n),lmax_st’(n))) < F_cm(kmax_cm’(n),lmax_cm’(n))) + c1 (18) (18)式中c1は定数である。
Judgment 2 in FIG. 18 is to judge whether the extracted texture image of the continuation start section is the same as the already coded texture image. Therefore, in this evaluation, it suffices to obtain the spatial frequency characteristic of each section and judge whether the predominant spatial frequency and its power value are equal. The specific formula is shown below.
The spatial frequency of the nth largest power amplitude of the texture image already coded is kmax_c '(n), lmax_
Let c '(n). In addition, the nth largest power of the texture image already coded is F_c (kmax_c '(n), lmax
If _c '(n)), the condition for judging that the target section and the texture image already coded are equal is the following expression. kmax_st '(n) = kmax_cm' (n) (16) lmax_st '(n) = lmax_cm' (n) (17) F_cm (kmax_cm '(n), lmax_cm' (n)))-c1 <F_st (kmax_st ') (n), lmax_st '(n))) <F_cm (kmax_cm' (n), lmax_cm '(n))) + c1 (18) (18) In the formula, c1 is a constant.

【0042】図18中の判断2において、既にコード化
されているテクスチャ画像の中に等しいと判断されるも
のが見つからなかった場合には、テクスチャコードデー
タ作成の処理において、上記kmax’(n)、lmax’(n)、F
(kmax’(n),lmax’(n))の値をテクスチャコードmのテク
スチャ画像の特徴量として記憶しておく。その時図9に
示すように、所定の大きさのテクスチャ画像に対応させ
て、max_cm’(n)、lmax_cm’(n)、F(kmax_cm’(n),lmax
_cm’(n))の変数に記憶しておく。
In the decision 2 in FIG. 18, if none of the texture images already coded can be found to be equal, the above kmax '(n) is set in the texture code data creation process. , Lmax '(n), F
The value of (kmax '(n), lmax' (n)) is stored as the feature amount of the texture image of the texture code m. At that time, as shown in FIG. 9, max_cm ′ (n), lmax_cm ′ (n), F (kmax_cm ′ (n), lmax are associated with a texture image of a predetermined size.
It is stored in the variable of _cm '(n)).

【0043】また、図19中の判断3は連続化処理にお
いて、連続化開始区画のテクスチャ画像と注目区画のテ
クスチャ画像が同じであるかどうかの判断である。ま
ず、予め前処理においてカウントしておいた黒画素数に
ついて連続化開始区画のそれと比較する。以上の式を以
下に示す。連続化開始区画の座標を(i_st,j_st)とし、
注目している区画の座標を(i,j)とする。 pixels(i_st,j_st,code_black) + c2 > pixels(i,j,code_black) > pixels(i_st,j_st,code_black) - c2 (19) (19)式中c2は定数である。(19)式を満たすと次の判断を
行う。次に、注目区画のフーリエパワースペクトルを求
め、n番目に大きいパワーの振幅を持つところの卓越空
間周波数をkmax’(n)、lmax’(n)、そのパワーの振幅を
F(kmax’(n),lmax’(n))として連続化開始区画のそれら
と比較する。その式を以下(20)、(21)、(22)式に示す。 kmax’(n) = kmax_st’(n) (20) lmax’(n) = lmax_st’(n) (21) F(kmax_st’(n),lmax_st’(n))) - c3 < F(kmax’(n),lmax’(n))) < F(kmax_st’(n),lmax_st’(n))) + c3 (22) 上の(20)、(21)、(22)式を満たした場合、注目している
区画は連続化開始区画の同じテクスチャ画像として、同
じ値でラベリングする。
Further, the judgment 3 in FIG. 19 is a judgment as to whether the texture image of the continuation start section and the texture image of the target section are the same in the continuation processing. First, the number of black pixels counted in the pre-processing is compared with that in the continuation start section. The above equation is shown below. The coordinates of the continuation start section are (i_st, j_st),
Let the coordinates of the section of interest be (i, j). pixels (i_st, j_st, code_black) + c2> pixels (i, j, code_black)> pixels (i_st, j_st, code_black)-c2 (19) (19) where c2 is a constant. When formula (19) is satisfied, the following judgment is made. Next, the Fourier power spectrum of the section of interest is obtained, and the predominant spatial frequency having the nth largest power amplitude is kmax '(n), lmax' (n), and its power amplitude is
Compare them to those of the serialization start partition as F (kmax '(n), lmax' (n)). The equations are shown in the following equations (20), (21) and (22). kmax '(n) = kmax_st' (n) (20) lmax '(n) = lmax_st' (n) (21) F (kmax_st '(n), lmax_st' (n)))-c3 <F (kmax ' (n), lmax '(n))) <F (kmax_st' (n), lmax_st '(n))) + c3 (22) When the above equations (20), (21), (22) are satisfied , The section of interest is labeled with the same value as the same texture image of the continuous start section.

【0044】一通り、区画単位のテクスチャ領域の抽出
が終了した後、テクスチャ区画の周囲の処理において、
各領域毎に区画単位の処理では抽出され得なかったテク
スチャ領域の残りの部分とエッジ部分の抽出処理を行
う。この処理は既に抽出されているテクスチャ区画の領
域から外側に向かって、テクスチャ画像の画像特徴量の
変化を調べ、変化の大きくなったところをエッジ部と判
断する。この時、第1ステップとして区画単位で抽出さ
れたテクスチャ領域から縦横4方向に画像特徴量の変化
を調べる。図22(a)においては、k=1で示されたグレイ
の領域が区画単位で既に抽出されているテクスチャ領域
であり、テクスチャ領域からの走査の方向を矢印で示し
ている。また、この第1ステップの処理で抽出されるテ
クスチャ領域とエッジを図22(b)に示す。次に、第2
ステップでは、第1ステップで抽出されたテクスチャ領
域から図22(b)の矢印に示すような2つの方向に向か
って、同様にテクスチャ画像の画像特徴量の変化を調べ
る。
Once the extraction of the texture area in units of sections is completed, in the processing around the texture section,
Extraction processing is performed on the remaining portion and edge portion of the texture area that could not be extracted by the division unit processing for each area. In this process, the change in the image feature amount of the texture image is examined from the area of the texture section that has already been extracted to the outside, and the point where the change is large is determined to be the edge portion. At this time, as the first step, the change of the image feature amount is examined in the vertical and horizontal directions from the texture region extracted in units of sections. In FIG. 22A, the gray area indicated by k = 1 is a texture area that has already been extracted in units of sections, and the direction of scanning from the texture area is indicated by an arrow. Further, the texture area and the edge extracted in the processing of the first step are shown in FIG. Then the second
In the step, the change of the image feature amount of the texture image is similarly examined from the texture region extracted in the first step in the two directions as shown by the arrow in FIG.

【0045】上記、画像特徴量の変化を調べる処理の詳
細は以下のとおりである。図22(a)において、区画単
位のラスタスキャンを行い、テクスチャ区画として抽出
されていない区画を注目する。次に、その注目区画の上
下左右の周囲4区画のうち、テクスチャ区画が存在する
場合には図22(b)の矢印に示すように、テクスチャ区
画から注目区画の方に向かって画像特徴量の変化を調べ
る。ここでは画像特徴量として1次元のパワースペクト
ルを採択した。図22(c)の左端に示すように上隣にテ
クスチャ領域の区画が存在する場合の処理を図22
(d)、(e)を参照して説明する。従って図22(d)、(e)に
おいては、上がテクスチャ区画、下が注目区画である。
まず、図22(d)に示すようにテクスチャ領域の区画内
で、エッジを求める方向に1次元のウィンドウを設定
し、その中で算出したパワースペクトルをマスタスペク
トルG(P)として記憶する。図22(d)、(e)内で縦方向の
太い線がウィンドウを表す。この時、2次元のパワース
ペクトル算出の場合と同様に,黒のデータを1、白のデー
タを-1とする。ここで、図23(a)にマスタスペクトル
の例を示す。次に図22(e)に示すように、ウィンドウ
をエッジを求める方向に1画素ずつずらしながら、パワ
ースペクトルG’(p)を算出する。図22(d)のようにウ
ィンドウ内にエッジ部を含む場合のパワースペクトル
G’(p)の例を図23(b)に示す。ずらした先のパワース
ペクトルとマスタスペクトルとの差の総和Σ(G(p)-G’
(p))を算出し、その値としきい値a4を(23)式に従って比
較する。 Σ(G(p)-G’(p)) > a4 (23) (21)式を満したウィンドウはテクスチャ領域のエッジ部
分にさしかかっていると判断する。Σ(G(p)-G’(p))の
変化を図23(c)に示す。図23(c)において、縦軸はΣ
(G(p)-G’(p))の値であり、横軸はウィンドウをずらし
た距離を画素数で表している。この例ではちょうど22
画素分だけウィンドウをずらしたところで、ウィンドウ
はエッジにさしかかっているが、この時、マスタスペク
トルとの差の総和Σ(G(p)-G’(p))がかなり大きくなる
ことが顕著である。このように、エッジ部分にさしかか
っていると判断されたウィンドウの終端部分の黒画素を
エッジ画素とし、D(x,y)=kとする。
The details of the above-described processing for checking the change in the image feature amount are as follows. In FIG. 22A, raster scanning is performed in units of sections, and sections not extracted as texture sections are noted. Next, if there is a texture section among the four sections above, below, left, and right of the section of interest, as shown by the arrow in FIG. Examine the changes. Here, a one-dimensional power spectrum is adopted as the image feature amount. As shown in the left end of FIG. 22 (c), the process in the case where a texture region section exists on the upper side is shown in FIG.
This will be described with reference to (d) and (e). Therefore, in FIGS. 22D and 22E, the upper section is the texture section and the lower section is the target section.
First, as shown in FIG. 22 (d), a one-dimensional window is set in a direction of obtaining an edge within a section of a texture area, and the power spectrum calculated therein is stored as a master spectrum G (P). The thick vertical lines in FIGS. 22D and 22E represent windows. At this time, the black data is set to 1 and the white data is set to -1, as in the case of the two-dimensional power spectrum calculation. Here, an example of the master spectrum is shown in FIG. Next, as shown in FIG. 22 (e), the power spectrum G ′ (p) is calculated while shifting the window by one pixel in the direction of obtaining the edge. Power spectrum when edge part is included in window as shown in Fig. 22 (d)
An example of G '(p) is shown in FIG. 23 (b). Sum of the differences between the shifted power spectrum and the master spectrum Σ (G (p) -G '
(p)) is calculated and the value is compared with the threshold value a4 according to the equation (23). It is determined that the window satisfying Σ (G (p) -G '(p))> a4 (23) (21) is approaching the edge part of the texture area. The change of Σ (G (p) -G '(p)) is shown in FIG. 23 (c). In FIG. 23 (c), the vertical axis is Σ
It is a value of (G (p) -G '(p)), and the horizontal axis represents the distance in which the window is displaced in the number of pixels. Just 22 in this example
When the window is shifted by pixels, the window is approaching the edge, but at this time, it is noticeable that the sum Σ (G (p) -G '(p)) of the difference from the master spectrum becomes considerably large. . In this way, the black pixel at the end portion of the window that is determined to approach the edge portion is set as an edge pixel, and D (x, y) = k.

【0046】テクスチャ領域のエッジ抽出においては、
エッジ部分が必ずしも閉ループとして抽出されるとは限
らない。そこで、エッジ画素の閉ループ化処理を行う。
閉ループ化処理は基本的にエッジ画素の連続化処理であ
り、連続化されるべきエッジ画素がなくなった時点で、
閉ループであることの条件を満たすかどうかの判断をす
る。この連続化処理は、前述の塗りつぶし領域の抽出に
おける区画単位の連続化処理を、画素単位で行うもので
ある。閉ループであることの条件を満たさない場合に
は、連続化処理の終了するところのエッジ画素の周辺の
黒画素を新たにエッジ画素として連続化処理を再開す
る。連続化が終了する時に閉ループであることの条件を
満たすとエッジの閉ループ化処理を終了する。
In the edge extraction of the texture area,
The edge part is not always extracted as a closed loop. Therefore, closed-loop processing of edge pixels is performed.
The closed loop process is basically a continuous process of edge pixels, and when there are no more edge pixels to be continuous,
It is determined whether the condition of being a closed loop is satisfied. In this continuation process, the continuation process for each partition in the extraction of the above-described filled area is performed for each pixel. If the condition of being a closed loop is not satisfied, the black pixel around the edge pixel where the continuation process ends is newly set as an edge pixel, and the continuation process is restarted. If the condition of being a closed loop is satisfied when the continuation is completed, the edge closed loop processing is ended.

【0047】閉ループ化処理を図24を参照して詳細を
説明する。図24は本発明の実施例の画像処理の中で、
抽出したテクスチャ領域のエッジ画素を閉ループ化する
処理を分かりやすく示した図である。まず、左上からラ
スタスキャンをし、D(x,y)>=1であるエッジ画素をさが
す。図24においてエッジ画素は黒く塗られた区画で表
現されている。また、エッジ画素を表す区画内にふられ
ているラベルはAが注目画素、aが連続化されたエッジ画
素を示す。エッジ画素を一つ見つけると、その画素を開
始点として連続化処理を開始する。図24(a)におい
て、連続化開始画素にはAのラベルが、また連続化開始
画素からの周囲画素走査によって連続化される画素には
aのラベルがふられている。この時、連続化の条件はD
(x,y)の値が等しいということである。この連続化処理
は分岐画素が見つかるまで続行される。分岐画素とは図
24(b)に示すように”斜め右下がエッジ画素ではな
く、右と下に隣合う画素がエッジ画素である”という周
囲画素に対する条件を満たしたエッジ画素である。この
例では、図24(c)に示すラベルAの画素の周囲走査によ
る連続化が終了すると、ラベルAの画素が分岐画素の条
件を満たすことが判明する。図24(d)において分岐画
素をハッチングで表す。また、分岐画素のx,y座標を記
憶しておく。
The closed loop processing will be described in detail with reference to FIG. FIG. 24 shows the image processing of the embodiment of the present invention.
It is the figure which showed intelligibly the process which makes the edge pixel of the extracted texture area into a closed loop. First, a raster scan is performed from the upper left to search for edge pixels with D (x, y)> = 1. In FIG. 24, the edge pixel is represented by a black section. Further, in the labels attached to the sections representing the edge pixels, A indicates the target pixel and a indicates the continuous edge pixels. When one edge pixel is found, the pixel is used as a starting point and the continuation process is started. In FIG. 24 (a), the label of A is set to the continuation start pixel, and the pixels that are serialized by the surrounding pixel scan from the continuation start pixel are
Label a. At this time, the continuation condition is D
This means that the (x, y) values are equal. This continuation process is continued until a branch pixel is found. As shown in FIG. 24B, the branch pixel is an edge pixel that satisfies the condition for the surrounding pixels that "the diagonally lower right is not an edge pixel, but the adjacent pixels on the right and the lower are edge pixels". In this example, it is found that the pixel of label A satisfies the condition of the branch pixel when the continuation of the pixel of label A shown in FIG. In FIG. 24 (d), the branch pixels are hatched. In addition, the x and y coordinates of the branch pixel are stored.

【0048】分岐画素を見つけた以後の連続化処理は、
その画素の位置によって画素にふるラベルを変える。こ
の連続化処理は以下に記述するように2段階で行う。 :分岐画素を見つける以前にラベリングされた画素
(図24(c)中aのラベルの画素)の周囲走査による連続
化処理 :の処理を終了した後、分岐画素を見つけた以後に
ラベリングされた画素(図24()中b,cのラベルの画
素)の周囲走査による連続化処理 まずの処理では、x方向について分岐画素を境にして
連続領域であることを示すラベルの値を変える。図24
(e)は分岐画素を見つける以前にラベリングされている
画素からの周囲走査結果の一例を示している。分岐画素
を含めて左側の画素にはcのラベルをふる。逆に、図2
4(f)に示すように分岐画素より右側の画素にはbのラベ
ルをふる。図24(f)はの処理が終了した状態を示
す。次に、の処理においては、連続しているエッジ画
素に新たにふられるラベルを注目画素に等しいものにす
る。従ってbのラベルの画素から連続化された画素にはb
のラベルを、またcのラベルの画素から連続化された画
素にはbのラベルをふる。このようにしての処理を終
えた状態が図24(g)である。連続化するエッジ画素が
なくなった時点で、図24(g)におけるbとcのように、
異なるラベルが隣合っていることが確認されると閉ルー
プ化が成功したことになる。
The continuation process after finding the branch pixel is
The label assigned to the pixel is changed according to the position of the pixel. This continuation process is performed in two stages as described below. : Pixels labeled before finding a branch pixel (pixels labeled a in Fig. 24 (c)) by peripheral scanning continuation process: After finishing the process, a pixel labeled after finding a branch pixel Continuation processing by peripheral scanning of (pixels of labels b and c in FIG. 24 ()) In the first processing, the value of the label indicating the continuous area is changed at the branch pixel in the x direction. Figure 24
(e) shows an example of the peripheral scanning result from the pixels that are labeled before the branch pixel is found. Label the left pixel including the branch pixel with c. Conversely, FIG.
As shown in 4 (f), the label on the right side of the branch pixel is labeled b. FIG. 24 (f) shows a state in which the process of FIG. Next, in the process of (1), the labels newly given to the continuous edge pixels are made equal to the target pixel. Therefore, the pixel that is made continuous from the pixel labeled b is b
, And the label of b is attached to the pixel which is made continuous from the pixel of label of c. FIG. 24 (g) shows a state in which the above processing is completed. When there are no continuous edge pixels, as shown by b and c in FIG. 24 (g),
When it is confirmed that the different labels are adjacent to each other, the closed loop formation is successful.

【0049】一方、異なるラベルをふられた画素どうし
が隣合わない場合、エッジ部分は閉領域になっていな
い。そのような場合には、ラベリングされた順序の最後
のほうの画素から、その周囲にエッジ画素として抽出さ
れていない黒画素が存在するかどうかの判断を行う。そ
のような黒画素が存在する場合には、その黒画素を新た
にエッジ画素としてラベリングし、そこから連続化処理
を再開する。例えば、図24(h)において、ドットのパ
ターンの区画で示される画素はエッジ画素として抽出さ
れていない黒画素を表す。また、ドットの区画の下方
に、抽出されたエッジ画素が存在するが、このような場
合、抽出されたエッジ画素よりも、連続化されてきたエ
ッジ画素群に隣接する黒画素のほうがエッジとして確か
らしいと考える。そこで、図24(i)に示すようにエッ
ジ画素ではない黒画素を、新たにエッジ画素としてラベ
ルをふり、連続化処理を再び開始し、最終的に閉ループ
になるまで、この処理を繰り返す。
On the other hand, when pixels labeled with different labels are not adjacent to each other, the edge portion is not a closed area. In such a case, it is determined from the last pixel in the labeling order whether or not there is a black pixel that has not been extracted as an edge pixel around it. If such a black pixel exists, the black pixel is newly labeled as an edge pixel, and the continuation process is restarted from there. For example, in FIG. 24 (h), the pixels indicated by the dot pattern sections represent black pixels that have not been extracted as edge pixels. Also, there is an extracted edge pixel below the dot section. In such a case, the black pixel adjacent to the continuous edge pixel group is more likely to be an edge than the extracted edge pixel. I think it seems. Therefore, as shown in FIG. 24 (i), a black pixel that is not an edge pixel is newly labeled as an edge pixel, the continuation process is restarted, and this process is repeated until it finally becomes a closed loop.

【0050】次に、カラーモードの処理について詳細に
説明する。図5のフローチャートに示すように、最初に
カラーコードデータ作成の処理が入るが、それ以降の大
きな処理の流れはモノモードの処理とほとんど同じであ
る。まず、カラーコードデータ作成について説明する。
予めカラーコードによるデータの再編成を行う。これを
図25(a),(b),(c)を参照して説明する。フルカラーの
ラスタデータは通常図25(b)に示すように、(R,G,B)の
羅列で構成されていることが多い。このデータ形態では
画像処理をするのにR,G,Bの全てのデータにアクセスし
ないと完全な色の情報は得られず、処理時間がかかり効
率が悪い。従って、スキャナで画像を読み取った場合の
データのばらつきを考えて、図25(a)に示すようにR,
G,B色空間において、ある領域をカラーコード1、2、
3というように定義する。そして、その領域内に(R,G,
B)データを持つ画素のデータとして色の領域のコードを
割り当てる。つまり、(r1,g1,b1)のようなデータを持つ
画素のデータを1とし、これをカラーコードとする。以
上のようにして、色空間を分割していくつかのカラーコ
ードを定義することにより、図25(b)に示すような(R,
G,B)データは図25(c)に示すようなカラーコードの羅
列のデータに変換される。カラーモードの場合には、こ
のカラーコードデータをA(x,y)とする。
Next, the color mode processing will be described in detail. As shown in the flowchart of FIG. 5, color code data creation processing first comes in, but the subsequent large processing flow is almost the same as the mono mode processing. First, the color code data creation will be described.
Data is reorganized in advance by color code. This will be described with reference to FIGS. 25 (a), 25 (b) and 25 (c). Full-color raster data is usually composed of a list of (R, G, B) as shown in FIG. In this data format, complete color information cannot be obtained unless all R, G, and B data are accessed for image processing, which requires processing time and is inefficient. Therefore, considering the variation of the data when the image is read by the scanner, as shown in FIG.
In the G, B color space, a certain area is color code 1, 2,
Defined as 3. Then, within that area (R, G,
B) The code of the color area is assigned as the data of the pixel having the data. That is, the pixel data having data such as (r1, g1, b1) is set to 1, and this is used as a color code. As described above, by dividing the color space and defining some color codes, as shown in FIG.
The G, B) data is converted into a list of color codes as shown in FIG. In the case of the color mode, this color code data is A (x, y).

【0051】次に、モノモード同様に前処理において図
7(b)に示すような区画内の各色の画素数をカウントす
る。例えば、この区画座標(i,j)におけるカラーコード
1の画素数をpixels(i,j,code_1)というように表現す
る。この区画毎の各色の画素数は後の処理に必要となる
ため、メモリ103に記憶しておく。
Next, as in the mono mode, the number of pixels of each color in the section as shown in FIG. 7B is counted in the preprocessing. For example, the number of pixels of the color code 1 at this partition coordinate (i, j) is expressed as pixels (i, j, code_1). Since the number of pixels of each color for each section is necessary for the subsequent processing, it is stored in the memory 103.

【0052】次に、後述するアルゴリズムに従って、塗
りつぶし領域とそのエッジ部分を抽出し、モノモード同
様に抽出された順に塗りつぶし領域に領域番号kをふ
る。また、(1)、(2)式に示すように、塗りつぶし領域の
ラスタデータB(x,y)、塗りつぶし領域のエッジ部分のラ
スタデータD(x,y)の値を領域番号kにする。ここで、塗
りつぶし領域とは1色から成る領域であり、エッジ部分
とは塗りつぶし領域の最も外側の一画素とする。また、
図26に示すように塗りつぶし領域の領域番号と領域の
色コードを対応させて記憶しておく。次に、塗りつぶし
領域とエッジ部分をA(x,y)から削除する。具体的にB(x,
y)=0またはD(x,y)=0でない画素のA(x,y)の値を0にす
る。
Next, according to an algorithm described later, the filled area and its edge portion are extracted, and the area number k is assigned to the filled area in the same order as in the mono mode. Further, as shown in the equations (1) and (2), the values of the raster data B (x, y) of the filled area and the raster data D (x, y) of the edge portion of the filled area are set to the area number k. Here, the filled area is an area of one color, and the edge portion is one pixel on the outermost side of the filled area. Also,
As shown in FIG. 26, the area number of the filled area and the color code of the area are stored in association with each other. Next, the filled area and the edge portion are deleted from A (x, y). Specifically, B (x,
The value of A (x, y) of a pixel that is not y) = 0 or D (x, y) = 0 is set to 0.

【0053】次に、後述するアルゴリズムに従って、テ
クスチャ領域とそのエッジ部分を抽出する。ここで抽出
の対象としているのは2色から構成されるテクスチャ画
像である。テクスチャ領域のエッジはテクスチャ領域を
囲む閉ループとし、エッジはテクスチャ画像を構成する
2色のうちのどちらかであるとする。また、2色のうち
1色が白の場合には、自動的に他方の色の閉ループをエ
ッジとして抽出する。ここでもモノモード同様に、抽出
されたテクスチャ領域に領域番号kをふる。そして、
(3)、(4)式に示すように、テクスチャ領域のラスタデー
タC(x,y)、テクスチャ領域のエッジ部分のラスタデータ
E(x,y)の値を領域番号kにする。この時、図27に示す
ように、そのテクスチャ領域の領域番号とテクスチャコ
ードと色コードを対応させてメモリ103に記憶してお
く。テクスチャコードは白黒2色で表現されるパターン
に対応するので、カラーのテクスチャ画像はカラーコー
ドの数字の小さい方を白、数字の大きい方を黒に対応さ
せることによって、カラーコードとテクスチャコードで
表現できる。このテクスチャコードはモノモードの場合
と同様に、そのテクスチャ画像が新しい種類のものであ
る場合に、前記テクスチャ画像のラスタデータ、画像特
徴量ともに登録されるものである。図9に示すように所
定の大きさのテクスチャ画像のラスタデータをコードに
対応させてメモリ103に記憶しておく。次に、テクスチ
ャ領域とそのエッジ部分を削除する。塗りつぶし領域同
様、C(x,y)=0、または、E(x,y)=0でないテクスチャ領域
のA(x,y)の値を0にする。
Next, the texture region and its edge portion are extracted according to the algorithm described later. The target of extraction here is a texture image composed of two colors. The edge of the texture area is a closed loop that surrounds the texture area, and the edge is one of two colors that form the texture image. When one of the two colors is white, the closed loop of the other color is automatically extracted as an edge. Here, as in the mono mode, the area number k is assigned to the extracted texture area. And
As shown in equations (3) and (4), the raster data C (x, y) of the texture area, the raster data of the edge portion of the texture area
The value of E (x, y) is set to the area number k. At this time, as shown in FIG. 27, the area number of the texture area, the texture code, and the color code are stored in the memory 103 in association with each other. Since the texture code corresponds to a pattern expressed by two colors of black and white, the color texture image is expressed by the color code and the texture code by associating the smaller number of the color code with white and the larger number with black. it can. As in the case of the mono mode, this texture code is registered with both the raster data and the image feature amount of the texture image when the texture image is of a new type. As shown in FIG. 9, raster data of a texture image of a predetermined size is stored in the memory 103 in association with the code. Next, the texture area and its edge portion are deleted. Similar to the filled area, the value of A (x, y) in the texture area where C (x, y) = 0 or E (x, y) = 0 is not set to 0.

【0054】塗りつぶし領域と、テクスチャ領域を削除
した後、次に線画像処理を行う。この対象になるのはA
(x,y)、D(x,y)、E(x,y)のデータである。A(x,y)はカラ
ーコード、D(x,y)、E(x,y)には領域番号kのデータであ
る。カラーモードでは一つのベクトルは一色から成る。
そこで、A(x,y)についてはカラーコード毎に細線化、ベ
クトル化を行う。そして、最終的な画像記述言語にカラ
ーコードをベクトルデータの属性として付加する。次
に、D(x,y)、E(x,y)について細線化を行い、モノモード
同様にD(x,y)、E(x,y)の値を一連の線画像処理におい
て、1以上の値を持つときは黒、0の時は白という画像
データになおして処理をする。カラーモードにおいても
モノモード同様に、輪郭モードと全画像モードで異なる
処理を行う。カラーモードの全画像モードの場合にはD
(x,y)、E(x,y)のエッジ画像データをベクトル変換した
後、その領域番号より閉領域内の画像について図26、
27に示す塗りつぶし領域のカラーコードやテクスチャ
領域のテクスチャコード、カラーコードを参照し、最終
的な画像記述言語にそれらのコードをベクトルデータの
属性として付与する。このようにして、A(x,y)、D(x,
y)、E(x,y)についてベクトル化を終えると、図7(h)の
図形中の黒丸に示すようにベクトルの端点、通過点が求
められる。ベクトル化を終えると図28に示すような画
像記述言語に変換される。図28(a)は輪郭モードの場
合、図28(b)は全画像モードの場合である。これらの
画像記述言語のコードの意味はモノモードと同じであ
る。ただし、各コードの最後に記述されてあるのはカラ
ーコードである。
After deleting the filled area and the texture area, line image processing is next performed. This target is A
The data is (x, y), D (x, y), and E (x, y). A (x, y) is a color code, and D (x, y) and E (x, y) are data of area number k. In color mode, one vector consists of one color.
Therefore, A (x, y) is thinned and vectorized for each color code. Then, a color code is added to the final image description language as an attribute of vector data. Next, thinning is performed for D (x, y) and E (x, y), and the values of D (x, y) and E (x, y) are set to 1 in a series of line image processing as in mono mode. When the value is equal to or more than the above value, the image data is black, and when 0, the image data is white. Also in the color mode, different processing is performed in the contour mode and the whole image mode as in the mono mode. D for all image modes in color mode
After vector-converting the edge image data of (x, y) and E (x, y), the image in the closed region is extracted from the region number in FIG.
The color code of the filled area, the texture code of the texture area, and the color code shown in 27 are referenced, and these codes are added to the final image description language as attributes of vector data. In this way, A (x, y), D (x,
When vectorization is completed for y) and E (x, y), the end points and passing points of the vector are obtained as shown by the black circles in the figure of FIG. 7 (h). When vectorization is completed, it is converted into an image description language as shown in FIG. 28A shows the case of the contour mode, and FIG. 28B shows the case of the full image mode. The meaning of the codes in these image description languages is the same as in mono mode. However, the color code is written at the end of each code.

【0055】上で述べたそれぞれの処理について以下に
詳細に説明する。まず、塗りつぶし領域を抽出する方法
であるが、基本的には図11に示すモノモードの塗りつ
ぶし領域抽出処理とほとんど同じであるので、以下特に
モノモードとは異なる点について、重点的に述べる。こ
こで説明に用いる変数もモノモードの場合と同じであ
る。まず、塗りつぶし区画の判断条件である。まず、連
続化開始区画の条件は次の(24)式を満たすカラーコード
nが存在するか否かである。式中a5は最適化されたしき
い値である。 pixels(i,j,code_n) > a5 (24) モノモードの図12(b)に示すように、(24)式を満たす
塗りつぶし領域の区画を一つ見つけると、その区画(i,
j)から連続化処理を開始する。連続化処理のフローチャ
ートをモノモードと同様に図14に示す。この連続化処
理により、連続している同じ色の塗りつぶし区画が同じ
値でラベリングされ、一つの連続領域として認識され
る。この連続化処理もモノモードの場合とほとんど等し
いが、連続化のための判断がモノモードの場合と少し異
なり、”同じカラーコードである”という条件が付加さ
れる。これを具体的に式で表すと(25)式のようになる。
これは連続化開始区画においてa5のしきい値を越える画
素数を持つカラーコードがcode_mの場合である。 pixels(i,j,code_m) > a6 (25)
Each processing described above will be described in detail below. First, the method of extracting a filled area is basically the same as the mono-mode filled area extraction processing shown in FIG. 11, and therefore the points different from the mono mode will be mainly described below. The variables used here are the same as in the mono mode. First, there are the conditions for determining the filled area. First, the condition of the continuous start section is a color code that satisfies the following equation (24).
Whether or not n exists. In the equation, a5 is an optimized threshold value. pixels (i, j, code_n)> a5 (24) As shown in Fig. 12 (b) in mono mode, when one partition of the filled area that satisfies Eq. (24) is found, that partition (i, j
The continuation process is started from j). A flowchart of the continuation process is shown in FIG. 14 as in the mono mode. By this continuation processing, consecutive filled sections of the same color are labeled with the same value and recognized as one continuous area. This continuation process is almost the same as that in the mono mode, but the judgment for continuation is slightly different from that in the mono mode, and a condition that "the color code is the same" is added. If this is concretely expressed by an equation, it becomes as shown in equation (25).
This is the case where the color code having the number of pixels exceeding the threshold value of a5 in the continuous start section is code_m. pixels (i, j, code_m)> a6 (25)

【0056】一通り、区画単位の塗りつぶし領域の抽出
が終了した後、モノモード同様に塗りつぶし区画の周囲
の処理において、各領域毎に区画単位では抽出され得な
かった塗りつぶし領域の残りの部分とエッジ部分の抽出
処理を行う。この処理もほとんどモノモードの処理と等
しく、画素の連続性の判断が”同じカラーコードの画素
であるか”に変わる。
After the extraction of the filled area in units of sections is completed, in the processing around the filled section as in the mono mode, the remaining portions and edges of the filled areas that cannot be extracted in units of sections for each area are processed. Extract the part. This processing is also almost the same as the processing in the mono mode, and the determination of the continuity of the pixels changes to "whether the pixels have the same color code".

【0057】次に、テクスチャ領域を抽出する方法につ
いて説明する。テクスチャ領域の抽出の処理も、モノモ
ードの処理と同じく、初期化してあった変数C(x,y)、E
(x,y)の値を領域番号に変化させることである。全画像
モードの場合には図27に示すように、領域番号とテク
スチャコード、カラーコードを対応させて記憶する。処
理も図18、図19に示したフローチャートにほとんど
等しい。異なるのは、図18、18のフローチャート中
の判断1、2、3である。またそれに加えて、フーリエ
パワースペクトルを算出する時に、A(x,y)のカラーコー
ドデータをー1と1に割り当てるという前処理が必要に
なる点である。この前処理のルールは、カラーコードの
数字の小さい方をー1に、大きい方を1に対応させるこ
とにする。
Next, a method of extracting a texture area will be described. The texture region extraction process is the same as the mono mode process. Initialized variables C (x, y), E
It is to change the value of (x, y) to the area number. In the case of the all image mode, as shown in FIG. 27, the area number is stored in association with the texture code and the color code. The processing is also almost the same as the flowcharts shown in FIGS. Differences are judgments 1, 2, and 3 in the flowcharts of FIGS. In addition to this, when calculating the Fourier power spectrum, a pre-processing of assigning the color code data of A (x, y) to -1 and 1 is required. The rule of this pre-processing is that the smaller color code number corresponds to -1 and the larger color code number corresponds to 1.

【0058】以下、上述した3つの判断について詳細に
説明する。図18中の判断1は注目区画の画像がテクス
チャであるか否かである。前処理において、予めカウン
トして記憶しておいた区画毎のカラーコード別の画素数
について、まず判断する。今、注目している区画の座標
を(i,j)とし、次の(26)、(27)式をともに満たすカラー
コードp,qが存在することを第1の条件とする。 a7 > pixels(i,j,code_p) > a8 (26) pixels(i,j,code_p) + pixels(i,j,code_q) ≒1区画内の画素数 (27) 次に、以下のparameter_k、parameter_lについての判断
であるが、このパラメータはモノモードのものと等し
い。判断条件も同様にパラメータparameter_k、paramet
er_lの値があるしきい値を越えるか否かである。上記の
判断条件をクリアして、一つテクスチャ区画が見つかる
と、この後のテクスチャ区画の連続化のために、上記n
番目に大きなパワーの振幅を持つところの空間周波数を
kmax_st’(n)、lmax_st’(n)として、また、n番目に大
きなパワーの振幅をF_st(kmax_st’(n),lmax_st’(n))
としてモノモード同様に記憶しておく。カラーモードで
は、さらにテクスチャ画像を構成する2色のカラーコー
ドの画素数をpixels(code_st1)、pixels(code_st2)とし
て、カラーコードの数字の小さい順に記憶する。
The above three judgments will be described in detail below. Judgment 1 in FIG. 18 is whether or not the image of the section of interest is a texture. In the pre-processing, the number of pixels for each color code, which is counted and stored in advance, is first determined. It is assumed that the coordinates of the section of interest are (i, j), and the first condition is that there are color codes p, q that satisfy both of the following expressions (26) and (27). a7> pixels (i, j, code_p)> a8 (26) pixels (i, j, code_p) + pixels (i, j, code_q) ≈ number of pixels in one section (27) Next, the following parameter_k, parameter_l This parameter is equal to that of mono mode. The judgment conditions are also parameters parameter_k, paramet
Whether or not the value of er_l exceeds a certain threshold. When the above judgment condition is cleared and one texture section is found, the above n is set for the subsequent continuation of the texture section.
The spatial frequency of the second largest power amplitude
kmax_st '(n), lmax_st' (n), and the amplitude of the nth largest power is F_st (kmax_st '(n), lmax_st' (n))
Is stored as in the mono mode. In the color mode, the number of pixels of the two color codes forming the texture image is stored as pixels (code_st1) and pixels (code_st2) in ascending order of the numbers of the color codes.

【0059】図18中の判断2は抽出された連続化開始
区画のテクスチャ画像が既にコード化されているテクス
チャ画像と同じものであるかの判断である。したがっ
て、この評価では卓越空間周波数、そのパワーの値を既
にコード化されているテクスチャ画像の値と比較する。
この判断については全てモノモードと同じである。図1
8中の判断2において、既にコード化されているテクス
チャ画像の中に等しいと判断されるものが見つからなか
った場合には、テクスチャコードデータ作成の処理にお
いて、上記kmax’(n)、lmax’(n)、F(kmax’(n),lmax’
(n))の値と、所定の大きさの画像データを新たにkmax_c
1’(n)、lmax_c1’(n)、F(kmax_c1’(n),lmax_c1’(n))
記憶しておく。この処理もモノモードの処理と同じであ
る。
Judgment 2 in FIG. 18 is to judge whether the extracted texture image of the continuation start section is the same as the texture image already coded. Therefore, this evaluation compares the value of the dominant spatial frequency, its power, with the value of the texture image already coded.
This judgment is the same as in mono mode. Figure 1
In the decision 2 in 8, if the texture image already coded is not found to be equal, in the texture code data creation processing, kmax '(n), lmax' ( n), F (kmax '(n), lmax'
(n)) and the image data of a predetermined size are newly added to kmax_c.
1 '(n), lmax_c1' (n), F (kmax_c1 '(n), lmax_c1' (n))
Remember. This process is also the same as the mono mode process.

【0060】また、図19中の判断3は連続化処理にお
いて、連続化開始区画のテクスチャ画像と注目区画のテ
クスチャ画像が同じであるかどうかの判断である。ま
ず、注目区画について、予め前処理においてカウントし
ておいたテクスチャ画像を構成する2つのカラーコード
の画素数について連続化開始区画のそれと比較する。そ
の式を以下に示す。連続化開始区画の座標を(i_st,j_s
t)とし、注目している区画の座標を(i,j)とする。 pixels(i,j,code_st1) + c4 > pixels(code_st1) > pixels(i,j,code_st1) - c4 (28) pixels(i,j,code_st2) + c4 > pixels(code_st2) > pixels(i,j,code_st2) - c4 (29) 上の2式を満たした場合に、次の空間周波数特性の比較
を行う。この判断では、注目区画のフーリエパワースペ
クトルを求め、n番目に大きいパワーの振幅を持つとこ
ろの卓越空間周波数をkmax’(n)、lmax’(n)、そのパワ
ーの振幅をF(kmax’(n),lmax’(n))として連続化開始区
画のそれらと比較する。 kmax’(n) = kmax_st’(n) (30) lmax’(n) = lmax_st’(n) (31) F(kmax_st’(n),lmax_st’(n))) - c5 < F(kmax’(n),lmax’(n))) < F(kmax_st’(n),lmax_st’(n))) + c5 (32) 上の(18)、(19)、(20)式を満たした場合、注目している
区画は連続化開始区画と同じテクスチャ画像として、同
じ値でラベリングする。
Further, the judgment 3 in FIG. 19 is a judgment as to whether the texture image of the continuation start section and the texture image of the target section are the same in the continuation processing. First, the number of pixels of the two color codes forming the texture image, which has been counted in the pre-processing, is compared in the target section with that in the continuation start section. The formula is shown below. Set the coordinates of the continuation start section to (i_st, j_s
Let (t) and the coordinates of the section of interest be (i, j). pixels (i, j, code_st1) + c4> pixels (code_st1)> pixels (i, j, code_st1)-c4 (28) pixels (i, j, code_st2) + c4> pixels (code_st2)> pixels (i, j , code_st2) -c4 (29) When the above two expressions are satisfied, the following spatial frequency characteristics are compared. In this judgment, the Fourier power spectrum of the section of interest is obtained, the predominant spatial frequency having the nth largest power amplitude is kmax '(n), lmax' (n), and the power amplitude is F (kmax '( n), lmax '(n)) and compare them with those of the continuation starting partition. kmax '(n) = kmax_st' (n) (30) lmax '(n) = lmax_st' (n) (31) F (kmax_st '(n), lmax_st' (n)))-c5 <F (kmax ' (n), lmax '(n))) <F (kmax_st' (n), lmax_st '(n))) + c5 (32) When the above equations (18), (19) and (20) are satisfied , The section of interest is labeled with the same value as the same texture image as the continuous start section.

【0061】一通り、区画単位のテクスチャ領域の抽出
が終了した後、テクスチャ区画の周囲の処理において、
各領域毎に区画単位の処理では抽出され得なかったテク
スチャ領域の残りの部分とエッジ部分の抽出処理を行
う。この処理は既に抽出されているテクスチャ区画の領
域から外側に向かって、テクスチャ画像の連続性を走査
する。この処理においても基本的には図22に示すモノ
モードの処理と同じであるが、ウィンドウを移動させな
がら1次元の空間周波数特性でテクスチャ画像の連続性
を見ていくところで、カラーコードの情報を加える。
In general, after the extraction of the texture area in units of sections is completed, in the processing around the texture section,
Extraction processing is performed on the remaining portion and edge portion of the texture area that could not be extracted by the division unit processing for each area. This process scans the continuity of the texture image outward from the area of the texture segment that has already been extracted. This process is basically the same as the mono mode process shown in FIG. 22, but when the continuity of the texture image is checked by the one-dimensional spatial frequency characteristic while moving the window, the color code information is displayed. Add.

【0062】図22(d)、(e)に示すところのテクスチャ
領域の区画から注目区画の方に向かってテクスチャ画像
の連続性を評価する処理を以下に詳細に述べる。モノモ
ード同様に、図22(d)に示すようにテクスチャ領域の
区画内で、エッジを求める方向に1次元のウィンドウを
設定する。その中でパワースペクトルを算出し、それを
マスタスペクルG(p)として記憶するが、カラーの場合に
はこの前にデータ作り替えの処理を行う。この時のルー
ルとして、カラーコードデータの数字の小さい方をー1
に、大きい方を1にする。この後、ウィンドウをずらし
ながらパワースペクトルを算出し、マスタスペクトルと
パワーの振幅との差を算出する。この時、ずらした先の
ウィンドウにおいて現在注目しているテクスチャ画像を
構成するカラーコード以外のカラーコードの画素が存在
するかどうかを見る。ウィンドウを順に外側にずらして
いくので、異なるカラーコードの画素はウィンドウの終
端部分に出現するはずであり、そこから外側は注目して
いるテクスチャ領域とは異なる領域であると判断する。
そこで、異なるカラーコードの画素の一つ内側の画素ま
でをテクスチャ領域とし、その最後の画素をエッジ画素
とする。また、テクスチャ画像を構成する2色のうち一
色が白の場合には、エッジは白以外のカラーコードであ
る。従って、モノモードの時の黒画素の代わりに白以外
の色の画素を目標にエッジを求める。この処理はモノモ
ードとほとんど一緒である。マスタスペクトルとパワー
スペクトルとの差の総和があるしきい値を越えた時に、
そのウィンドウの終端付近の白以外の画素をエッジとす
る。モノモード同様にそのエッジ画素の、D(x,y)=kとす
る。最後に閉ループ化処理を行う。この時点では既に色
の情報は関係なくなっているので、この処理は全てモノ
モードの処理と等しい。
The process of evaluating the continuity of the texture image from the section of the texture area shown in FIGS. 22D and 22E to the section of interest will be described in detail below. As in the mono mode, as shown in FIG. 22D, a one-dimensional window is set in the direction in which the edge is obtained within the section of the texture area. The power spectrum is calculated therein and stored as the master spectrum G (p), but in the case of color, the process of data reconstruction is performed before this. As a rule at this time, the smaller number of color code data is -1
Then, set the larger one to 1. After that, the power spectrum is calculated while shifting the window, and the difference between the master spectrum and the power amplitude is calculated. At this time, it is checked whether or not there is a pixel of a color code other than the color code forming the texture image of interest in the shifted window. Since the window is sequentially shifted to the outside, pixels of different color codes should appear at the end portion of the window, and it is determined that the outside is a region different from the texture region of interest.
Therefore, pixels up to one pixel inside the pixels of different color codes are set as the texture area, and the last pixel is set as the edge pixel. If one of the two colors forming the texture image is white, the edge is a color code other than white. Therefore, instead of the black pixel in the mono mode, the edge is obtained by targeting the pixel of the color other than white. This process is almost the same as the mono mode. When the sum of the difference between the master spectrum and the power spectrum exceeds a certain threshold,
Pixels other than white near the end of the window are used as edges. Similarly to the mono mode, D (x, y) = k of the edge pixel is set. Finally, closed loop processing is performed. Since the color information is no longer relevant at this point, this processing is all the same as the mono mode processing.

【0063】[0063]

【発明の効果】以上のように、本発明によれば、画像デ
ータからテクスチャ領域およびその輪郭(エッジ)を自
動的に抽出し、この抽出されたテクスチャ領域を画像デ
ータから削除し、テクスチャ領域の輪郭を細線化するす
るので、テクスチャ領域の画像パターンを全てベクトル
化しなくて済む。結果として人手を介さずに必要な情報
のみをベクトル化することができるようになり、データ
サイズの削減にも有効である。
As described above, according to the present invention, the texture region and its contour (edge) are automatically extracted from the image data, and the extracted texture region is deleted from the image data. Since the contour is thinned, it is not necessary to vectorize all the image patterns in the texture area. As a result, only necessary information can be vectorized without human intervention, which is also effective in reducing the data size.

【0064】また、本発明によれば、テクスチャ領域を
そのまま、中が一様なテクスチャ画像である多角形とし
てベクトル化し、閉領域内の画像の種類を属性に持つよ
うに画像記述言語化するので、テクスチャ領域はテクス
チャ領域として、閉領域内の画像の情報を有効にしたベ
クトル化が可能になる。別にベクトルデータを編集する
ときに、テクスチャ画像が満たされたまま閉領域の座標
を編集することが可能になる。
Further, according to the present invention, the texture region is vectorized as it is as a polygon having a uniform texture image, and the image description language is made to have the type of the image in the closed region as an attribute. As a texture area, the texture area can be vectorized by validating the image information in the closed area. When separately editing vector data, it becomes possible to edit the coordinates of the closed region while the texture image is being filled.

【0065】また、本発明によれば、画像データ中の塗
りつぶし領域およびその輪郭部を自動的に抽出し、この
抽出された塗りつぶし領域を画像データから削除し、塗
りつぶし領域の輪郭部を細線化するので、テクスチャ領
域の画像パターンを全てベクトル化することがなくな
り、塗りつぶし領域を細線化することがなくなる。結果
として人手を介さずに必要な情報のみをベクトル化する
ことができるようになり、データサイズの削減にも有効
である。
Further, according to the present invention, the filled area and its outline portion in the image data are automatically extracted, the extracted filled area is deleted from the image data, and the outline portion of the filled area is thinned. Therefore, it is not necessary to vectorize all the image patterns in the texture area, and it is not necessary to thin the filled area. As a result, only necessary information can be vectorized without human intervention, which is also effective in reducing the data size.

【0066】また、本発明によれば、塗りつぶし領域を
そのまま、中が塗りつぶされた多角形としてベクトル化
し、閉領域内の画像の種類を属性に持つように画像記述
言語化するので、塗りつぶし領域は塗りつぶし領域とし
て、閉領域内の画像の情報を有効にしたベクトル化が可
能になる。別にベクトルデータを編集するときに、塗り
つぶし状態のまま閉領域の座標を編集することが可能に
なる。
Further, according to the present invention, since the filled area is vectorized as a polygon whose inside is filled and the image description language is made to have the type of the image in the closed area as an attribute, the filled area is As a filled area, it is possible to vectorize the information of the image in the closed area. When separately editing the vector data, it becomes possible to edit the coordinates of the closed region in the filled state.

【0067】また、本発明によれば、画像を構成する色
をコード化し、この色のコードを用いて画像データを再
構成し、色コードで表現された画像をベクトル化し、こ
の色のコードをベクトルデータの属性として画像記述言
語化するので、カラー画像の場合にもその色の情報を有
効にしたベクトル化が可能になる。従って、後の画像デ
ータの編集において、色の編集が可能になる。
Further, according to the present invention, the color forming the image is coded, the image data is reconstructed using the code of this color, the image represented by the color code is vectorized, and the code of this color is Since the image description language is used as the attribute of the vector data, even in the case of a color image, it is possible to perform vectorization in which the color information is valid. Therefore, the color can be edited in the subsequent editing of the image data.

【0068】また、本発明によれば、画像を構成する色
をコード化し、この色のコードを用いて画像データを再
構成し、色コードで表現された画像からテクスチャ領域
を自動的に抽出し、この抽出されたテクスチャ領域の色
のコードをテクスチャ領域の属性として画像記述言語化
するので、カラー画像の場合にもその色の情報を有効に
したベクトル化が可能になる。従って、塗りつぶし領域
の色の編集が可能になる。
Further, according to the present invention, the color forming the image is coded, the image data is reconstructed using the code of this color, and the texture region is automatically extracted from the image represented by the color code. The color code of the extracted texture area is converted into an image description language as an attribute of the texture area. Therefore, even in the case of a color image, vectorization in which the color information is valid can be performed. Therefore, the color of the filled area can be edited.

【0069】また、本発明によれば、画像を構成する色
をコード化し、この色のコードを用いて画像データを再
構成し、色コードで表現された画像から塗りつぶし領域
を自動的に抽出し、この抽出された塗りつぶし領域の色
のコードを塗りつぶし領域の属性として画像記述言語化
するので、閉領域内の画像の情報と色の情報を有効にし
たベクトル化が可能になる。
Further, according to the present invention, the color forming the image is coded, the image data is reconstructed using the code of this color, and the filled area is automatically extracted from the image represented by the color code. Since the extracted color code of the filled area is converted into an image description language as an attribute of the filled area, it is possible to vectorize the image information and the color information in the closed area effectively.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施例の画像処理装置のブロック図で
ある。
FIG. 1 is a block diagram of an image processing apparatus according to an embodiment of the present invention.

【図2】本発明の実施例の画像処理装置の画像処理モー
ド設定画面を表す図である。
FIG. 2 is a diagram showing an image processing mode setting screen of the image processing apparatus according to the embodiment of the present invention.

【図3】本発明の実施例の画像処理装置の文字領域設定
モードに遷移した状態の画像処理モード設定画面を表す
図である。
FIG. 3 is a diagram illustrating an image processing mode setting screen in a state where the image processing apparatus according to the exemplary embodiment of the present invention transits to a character area setting mode.

【図4】本発明の実施例の画像処理装置に入力する画像
データ(a)と文字領域分割により分割された文字領域デ
ータ(b)と図形領域データ(c)を示す図である。
FIG. 4 is a diagram showing image data (a) input to the image processing apparatus according to the embodiment of the present invention, character area data (b) divided by character area division, and graphic area data (c).

【図5】本発明の実施例の画像処理のメインルーチンを
示すフローチャートである。
FIG. 5 is a flowchart showing a main routine of image processing according to the embodiment of the present invention.

【図6】本発明の実施例の画像処理で用いる変数や記号
の定義を示す図である。
FIG. 6 is a diagram showing definitions of variables and symbols used in image processing according to the embodiment of the present invention.

【図7】本発明の実施例の画像処理装置における画像デ
ータの処理プロセスを表す図である。
FIG. 7 is a diagram showing a process of processing image data in the image processing apparatus according to the embodiment of the present invention.

【図8】本発明の実施例の画像処理によって抽出された
テクスチャ領域の領域番号とテクスチャコードの対応を
示す図である。
FIG. 8 is a diagram showing correspondence between area numbers and texture codes of texture areas extracted by image processing according to the embodiment of this invention.

【図9】本発明の実施例の画像処理によって抽出された
テクスチャ領域のテクスチャコードとこのテクスチャ画
像の所定の大きさのラスタデータとこのテクスチャ画像
の画像特徴量の対応を示す図である。
FIG. 9 is a diagram showing a correspondence between a texture code of a texture region extracted by image processing of the embodiment of the present invention, raster data of a predetermined size of this texture image, and an image feature amount of this texture image.

【図10】本発明の実施例の画像処理によって最終的に
出力される画像記述言語をモノ輪郭モード(a)とモノ全
画像モード(b)の場合に分けて示した図である。
FIG. 10 is a diagram showing the image description language finally output by the image processing according to the embodiment of the present invention separately for the mono contour mode (a) and the mono all image mode (b).

【図11】本発明の実施例の画像処理の中で、塗りつぶ
し領域抽出の処理を示すフローチャートである。
FIG. 11 is a flowchart showing a processing of extracting a filled area in the image processing of the embodiment of the present invention.

【図12】本発明の実施例の画像処理の中で、塗りつぶ
し領域抽出の処理を分かりやすく示した図である。
FIG. 12 is a diagram showing a process of extracting a filled area in the image processing of the embodiment of the present invention in an easy-to-understand manner.

【図13】本発明の実施例の画像処理の中で、連続化処
理中の周囲走査の周囲を走差する順序を示した図であ
る。
FIG. 13 is a diagram showing an order of running around the periphery of the peripheral scan during the continuation process in the image processing of the embodiment of the present invention.

【図14】本発明の実施例の画像処理の中で、連続化処
理を示すフローチャートである。
FIG. 14 is a flowchart showing a continuation process in the image processing of the embodiment of the present invention.

【図15】本発明の実施例の画像処理の中で、塗りつぶ
し領域のエッジ抽出の処理を分かりやすく示した図であ
る。
FIG. 15 is a diagram showing, in an easy-to-understand manner, an edge extraction process of a filled area in the image processing of the embodiment of the present invention.

【図16】本発明の実施例の画像処理の中で、塗りつぶ
し区画の周囲の処理を示すフローチャートである。
FIG. 16 is a flowchart showing processing around a filled section in the image processing according to the embodiment of this invention.

【図17】本発明の実施例の画像処理の中で、図16中
の区画内連続性走査の処理を示すフローチャートであ
る。
FIG. 17 is a flowchart showing the intra-section continuous scanning process in FIG. 16 in the image processing according to the embodiment of the present invention.

【図18】本発明の実施例の画像処理の中で、テクスチ
ャ領域抽出を示すフローチャートである。
FIG. 18 is a flowchart showing texture region extraction in the image processing of the embodiment of the present invention.

【図19】本発明の実施例の画像処理の中で、テクスチ
ャ区画の連続化処理を示すフローチャートである。
FIG. 19 is a flowchart showing a texture segment continuation process in the image processing of the embodiment of the present invention.

【図20】本発明の実施例の画像処理の対象とするテク
スチャ画像(a)、(c)、(e)とそのフーリエパワースペク
トル(b)、(d)、(f)を示す図である。
FIG. 20 is a diagram showing texture images (a), (c), and (e) and their Fourier power spectra (b), (d), and (f) which are the targets of image processing according to the embodiment of the present invention. .

【図21】本発明の実施例の画像処理の対象ではない画
像(a)とそのフーリエパワースペクトル(b)を示す図であ
る。
FIG. 21 is a diagram showing an image (a) and its Fourier power spectrum (b) which are not the targets of image processing according to the embodiment of the present invention.

【図22】本発明の実施例の画像処理の中で、テクスチ
ャ領域のエッジ抽出の処理を分かりやすく示した図であ
る。
FIG. 22 is a diagram showing, in an easy-to-understand manner, the edge extraction processing of the texture area in the image processing of the embodiment of the present invention.

【図23】本発明の実施例の画像処理の対象とするテク
スチャ画像について、ウィンドウをエッジ部分にかけな
がら移動した時のパワースペクトルの変化を表した図で
ある。
FIG. 23 is a diagram showing a change in power spectrum when a window is moved while being applied to an edge portion of a texture image which is a target of image processing according to the embodiment of the present invention.

【図24】本発明の実施例の画像処理の中で、抽出した
テクスチャ領域のエッジ画素を閉ループ化する処理を分
かりやすく示した図である。
FIG. 24 is a diagram showing, in an easy-to-understand manner, a process of forming an edge pixel of the extracted texture region into a closed loop in the image processing of the embodiment of the present invention.

【図25】本発明の実施例の画像処理におけるカラーモ
ードの処理の中で、カラーコードデータ作成の際に参照
するR,G,Bデータと各カラーコードとの対応を表した図
である。
FIG. 25 is a diagram showing the correspondence between R, G, B data and each color code that is referred to when creating color code data in the color mode processing in the image processing of the embodiment of the present invention.

【図26】本発明の実施例の画像処理におけるカラーモ
ードの処理によって抽出された塗りつぶし領域の領域番
号とカラーコードの対応を示す図である。
FIG. 26 is a diagram showing the correspondence between the area number and the color code of the filled area extracted by the color mode processing in the image processing according to the embodiment of the present invention.

【図27】本発明の実施例の画像処理におけるカラーモ
ードの処理によって抽出されたテクスチャ領域の領域番
号とテクスチャコードとカラーコードの対応を示す図で
ある。
FIG. 27 is a diagram showing correspondences between area numbers of texture areas, texture codes, and color codes extracted by the color mode processing in the image processing according to the embodiment of the present invention.

【図28】本発明の実施例の画像処理におけるカラーモ
ードの処理によって最終的に出力される画像記述言語を
カラー輪郭モード(a)とカラー全画像モード(b)の場合に
分けて示した図である。
FIG. 28 is a diagram showing the image description language finally output by the color mode processing in the image processing of the embodiment of the present invention separately in the case of the color contour mode (a) and the color full image mode (b). Is.

【図29】従来の画像処理装置のブロック図である。FIG. 29 is a block diagram of a conventional image processing apparatus.

【図30】従来の画像処理装置の動作を説明するフロー
チャートである。
FIG. 30 is a flowchart illustrating an operation of a conventional image processing device.

【図31】従来の画像処理装置の図形処理のプロセスを
説明するための図である。
FIG. 31 is a diagram for explaining a graphic processing process of a conventional image processing apparatus.

【符号の説明】[Explanation of symbols]

101 画像入力部 102 演算部 103 メモリ 104 画像出力部 105 画像表示部 106 ポインティングデバイス 107 OCR 201 入力画像表示エリア 202 文字領域設定ボタン 203 輪郭モードボタン 204 全画像モードボタン 205 カラーモードボタン 206 モノモードボタン 207 処理スタートボタン 301 分割決定ボタン 302 設定解除ボタン 303 モード終了ボタン 101 image input unit 102 arithmetic unit 103 memory 104 image output unit 105 image display unit 106 pointing device 107 OCR 201 input image display area 202 character region setting button 203 contour mode button 204 all-image mode button 205 color mode button 206 mono mode button 207 Processing start button 301 Split decision button 302 Setting cancel button 303 Mode end button

【手続補正書】[Procedure amendment]

【提出日】平成6年12月9日[Submission date] December 9, 1994

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0023[Name of item to be corrected] 0023

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0023】上記のように、文字領域を分割し、画像処
理モードの設定をした上で、オペレータが処理スタート
ボタン207をクリックすると図5のフローに従って画像
処理が実行され、画像のラスタデータは最終的に画像記
述言語に変換される。まず便宜をはかる為に、本説明で
用いる変数や記号の定義を図6を用いて説明する。区画
の座標を(i,j)、画素の座標を(x,y)とする。各座標軸の
方向は図6に示すとおりである。また、区画の一辺の長
さをmとする。また、最も右下の区画座標を(imax,jma
x)、画素座標を(xmax,ymax)とする。また、この処理に
おいて扱う画像データの変数を以下に列挙する。 画像のラスタデータ:A(x,y) 塗りつぶし領域のラスタデータ:B(x,y) 塗りつぶし領域のエッジ部分のラスタデータ:D(x,y) テクスチャ領域のラスタデータ:C(x,y) テクスチャ領域のエッジ部分のラスタデータ:E(x,y) A(x,y)は座標(x,y)の画素が白の場合に0、黒の場合に
1とする。また、カラーモードの場合には白、黒以外の
色に2以上の整数をカラーコードとして割り当てる。ま
た、途中で形成されるデータB(x,y)、C(x,y)、D(x,y)、
E(x,y)の値はみな、領域番号であり、領域として抽出さ
れない画素については0である。以下、図5のフローチ
ャートに従って処理の概要を説明する。まず、最初にモ
ノモードとカラーモードの選択を判定をする。以下、最
初にモノモードの処理について図7を参照して詳細に説
明する。図7は本発明の一実施例による画像処理装置に
おける画像データの処理プロセスを表す図である。図7
には図5の処理による画像データA(x,y)と、処理途中で
形成されるB(x,y)、C(x,y)、D(x,y)、E(x,y)が示されて
いる。図7(a)から(g)において、それぞれのデータが0
の画素を白、1以上の画素を黒で表示している。
As described above, the character area is divided, the image processing mode is set, and when the operator clicks the processing start button 207, the image processing is executed according to the flow of FIG. 5, and the raster data of the image is finalized. Is converted into an image description language. First, for convenience, the definitions of variables and symbols used in this description will be described with reference to FIG. The coordinates of the section are (i, j) and the coordinates of the pixel are (x, y). The directions of the coordinate axes are as shown in FIG. In addition, the length of one side of the section is m. In addition, the bottom right section coordinate is (imax, jma
x) and the pixel coordinates are (xmax, ymax). In addition, the variables of the image data handled in this processing are listed below. Image raster data: A (x, y) Fill area raster data: B (x, y) Edge area raster data: D (x, y) Texture area raster data: C (x, y) Raster data of the edge portion of the texture area: E (x, y) A (x, y) is set to 0 when the pixel at the coordinates (x, y) is white and is set to 1 when it is black. In the color mode, an integer of 2 or more is assigned as a color code to colors other than white and black. In addition, data B (x, y), C (x, y), D (x, y), and
The values of E (x, y) are all area numbers, and are 0 for pixels that are not extracted as areas. The outline of the processing will be described below with reference to the flowchart of FIG. First, the selection of the mono mode and the color mode is determined. Hereinafter, first, the mono mode processing will be described in detail with reference to FIG. 7. FIG. 7 is a diagram showing a process of processing image data in the image processing apparatus according to the embodiment of the present invention. Figure 7
5 includes image data A (x, y) obtained by the processing of FIG. 5 and B (x, y), C (x, y), D (x, y), E (x, y) formed during the processing. It is shown. 7 (a) to (g), each data is 0
Pixels are displayed in white, and one or more pixels are displayed in black.

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0035[Correction target item name] 0035

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0035】黒画素の連続性は隣合う2ラインが重なる
か否かで判断し、これを繰り返すことで塗りつぶし領域
を抽出する。これを順を追って説明する。図15(d)に
はこの処理の最初の注目ラインである、塗りつぶし領域
の最も外側の1ラインと、更に外側の隣合う1ラインを
示している。まず、内側の1ラインにおいては黒画素列
の始点のx座標x_in1と終点のx座標x_in2を求める。次に
外側の黒画素列の始点のx座標x_out1と終点のx座標x_ou
t2を求める。この2ラインにおいて x_out2 > x_in1 or x_in2 > x_out1 (6) を判断し、上の2式のどちらかを満たせば、この2ライ
ンは重なることによって連続性が確認される。そして、
外側の黒画素列について、塗りつぶし領域であることが
確認されたので、B(x,y) = k(k;領域番号)とする。
次に図15(e)に示すように、更に1画素外側のライン
について連続性を確認するために、外側の黒画素列の始
点、終点のx座標を新たに内側の黒画素列の座標とす
る。 x_in1 = x_out1 , x_in2 = x_out2 (7) 以下同様に、外側に新たな黒画素列が抽出されない、も
しくは、抽出された黒画素列が一画素分内側の黒画素列
と全く重なり合わなくなるまで、上記の処理を繰り返
す。以上の処理によって塗りつぶし領域の抽出が可能に
なる。
The continuity of black pixels is judged by whether or not two adjacent lines overlap each other, and by repeating this, the filled area is extracted. This will be described step by step. FIG. 15 (d) shows the outermost one line of the filled area and the adjacent one line further outside, which are the first noticed lines of this processing. First, in the inner one line, the x coordinate x_in1 of the start point and the x coordinate x_in2 of the end point of the black pixel row are obtained. Next, the x coordinate x_out1 of the start point and the x coordinate x_ou of the end point of the outer black pixel row
Find t2. If x_out2> x_in1 or x_in2> x_out1 (6) is judged in these two lines and either of the above two expressions is satisfied, the continuity is confirmed by overlapping these two lines. And
Since it is confirmed that the outer black pixel row is a filled area, B (x, y) = k (k; area number).
Next, as shown in FIG. 15 (e), in order to confirm the continuity of the line further outside by one pixel, the x-coordinates of the start point and the end point of the outer black pixel row are newly set as the coordinates of the inner black pixel row. To do. x_in1 = x_out1, x_in2 = x_out2 (7) Similarly, until a new black pixel row is not extracted to the outside, or the extracted black pixel row does not overlap with the inner black pixel row for one pixel at all, the above The process of is repeated. With the above processing, the filled area can be extracted.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0037[Name of item to be corrected] 0037

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0037】次に、テクスチャ領域を抽出する方法につ
いて説明する。テクスチャ領域抽出の処理を表したフロ
ーチャートを図18に示す。図18は本発明の実施例の
画像処理におけるテクスチャ領域抽出のフローチャート
である。図中、kは領域番号である。テクスチャ領域の
抽出の処理は基本的に塗りつぶし領域の場合とほぼ同じ
である。まず、前処理において区切られた区画単位でテ
クスチャ領域の抽出をした後に、テクスチャ区画の周囲
の処理において画素単位の領域抽出を行う。
Next, a method of extracting a texture area will be described. FIG. 18 is a flowchart showing the texture region extraction processing. FIG. 18 is a flowchart of texture region extraction in image processing according to the embodiment of the present invention. In the figure, k is a region number. The process of extracting the texture region is basically the same as that for the filled region. First, the texture region is extracted in the unit of the divided sections in the pre-processing, and then the region of the pixel unit is extracted in the processing around the texture section.

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0055[Correction target item name] 0055

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0055】上で述べたそれぞれの処理について以下に
詳細に説明する。まず、塗りつぶし領域を抽出する方法
であるが、基本的には図11に示すモノモードの塗りつ
ぶし領域抽出処理とほとんど同じであるので、以下特に
モノモードとは異なる点について、重点的に述べる。こ
こで説明に用いる変数もモノモードの場合と同じであ
る。まず、塗りつぶし区画の判断条件である。まず、連
続化開始区画の条件は次の(24)式を満たすカラーコード
nが存在するか否かである。式中a5は最適化されたしき
い値である。 pixels(i,j,code_n) > a5 (24) モノモードの図12(b)に示すように、(24)式を満たす
塗りつぶし領域の区画を一つ見つけると、その区画(i,
j)から連続化処理を開始する。連続化処理のフローチャ
ートをモノモードと同様に図14に示す。この連続化処
理により、連続している同じ色の塗りつぶし区画が同じ
値でラベリングされ、一つの連続領域として認識され
る。この連続化処理もモノモードの場合とほとんど等し
いが、連続化のための判断がモノモードの場合と少し異
なり、”同じカラーコードである”という条件が付加さ
れる。これを具体的に式で表すと(25)式のようになる。
これは連続化開始区画においてa6のしきい値を越える画
素数を持つカラーコードがcode_mの場合である。 pixels(i,j,code_m) > a6 (25)
Each processing described above will be described in detail below. First, the method of extracting a filled area is basically the same as the mono-mode filled area extraction processing shown in FIG. 11, and therefore the points different from the mono mode will be mainly described below. The variables used here are the same as in the mono mode. First, there are the conditions for determining the filled area. First, the condition of the continuous start section is a color code that satisfies the following equation (24).
Whether or not n exists. In the equation, a5 is an optimized threshold value. pixels (i, j, code_n)> a5 (24) As shown in Fig. 12 (b) in mono mode, when one partition of the filled area that satisfies Eq. (24) is found, that partition (i, j
The continuation process is started from j). A flowchart of the continuation process is shown in FIG. 14 as in the mono mode. By this continuation processing, consecutive filled sections of the same color are labeled with the same value and recognized as one continuous area. This continuation process is almost the same as that in the mono mode, but the judgment for continuation is slightly different from that in the mono mode, and a condition that "the color code is the same" is added. If this is concretely expressed by an equation, it becomes as shown in equation (25).
This is the case where the color code having the number of pixels exceeding the threshold value of a6 in the continuation start section is code_m. pixels (i, j, code_m)> a6 (25)

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 7459−5L G06F 15/70 335 Z ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI technical display location 7459-5L G06F 15/70 335 Z

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 ラスタデータを扱う画像処理装置におい
て、ハッチングなどのテクスチャ領域(明るさ、色の変
化が一様な領域をテクスチャ領域と言う)およびその輪
郭(エッジ)を自動的に抽出する手段と、この抽出され
たテクスチャ領域を画像データから削除する手段と、テ
クスチャ領域の輪郭を細線化する手段とから構成される
ことを特徴とする画像処理装置。
1. A means for automatically extracting a texture region such as hatching (a region having a uniform change in brightness and color is referred to as a texture region) and its contour (edge) in an image processing apparatus that handles raster data. An image processing apparatus comprising: a means for deleting the extracted texture area from the image data; and means for thinning the contour of the texture area.
【請求項2】 請求項1記載の画像処理装置において、
さらに、 細線化されたテクスチャ領域の輪郭部を多角形としてベ
クトル化する手段と、閉領域内の画像の種類を属性に持
つように画像記述言語化する手段とを有することを特徴
とする画像処理装置。
2. The image processing apparatus according to claim 1,
Further, the image processing is characterized by having means for vectorizing the contour portion of the thinned texture area as a polygon and means for making an image description language so that the type of the image in the closed area has an attribute. apparatus.
【請求項3】 ラスタデータを扱う画像処理装置におい
て、画像データ中の塗りつぶし領域およびその輪郭部を
自動的に抽出する手段と、この抽出された塗りつぶし領
域を画像データから削除し、塗りつぶし領域の輪郭部を
細線化する手段とから構成されることを特徴とする画像
処理装置。
3. In an image processing apparatus handling raster data, means for automatically extracting a filled area and its contour portion in the image data, and the extracted filled area being deleted from the image data, and a contour of the filled area. An image processing apparatus comprising: a thinning unit.
【請求項4】 請求項3記載の画像処理装置において、
さらに、 細線化された塗りつぶし領域の輪郭部を多角形としてベ
クトル化する手段と、閉領域内の画像の種類を属性に持
つように画像記述言語化する手段とを有することを特徴
とする画像処理装置。
4. The image processing device according to claim 3,
Further, the image processing is characterized by having a means for vectorizing the contour part of the thinned filled area as a polygon, and a means for making an image description language so that the type of the image in the closed area has an attribute. apparatus.
【請求項5】 ラスタデータを扱う画像処理装置におい
て、画像を構成する色をコード化する手段と、この色の
コードを用いて画像データを再構成する手段と、色コー
ドで表現された画像をベクトル化する手段と、この色の
コードをベクトルデータの属性として画像記述言語化す
る手段から構成される画像処理装置。
5. An image processing apparatus for handling raster data, means for encoding colors forming an image, means for reconstructing image data using the color codes, and an image represented by a color code. An image processing device comprising vectorization means and means for converting the color code into an image description language as an attribute of vector data.
【請求項6】 ラスタデータを扱う画像処理装置におい
て、画像を構成する色をコード化する手段とこの色のコ
ードを用いて画像データを再構成する手段と、色コード
で表現された画像からテクスチャ領域を自動的に抽出す
る手段と、この抽出されたテクスチャ領域の色のコード
をテクスチャ領域の属性として画像記述言語化する手段
から構成される画像処理装置。
6. An image processing apparatus which handles raster data, means for encoding colors forming an image, means for reconstructing image data using the color code, and texture from an image represented by a color code. An image processing apparatus comprising means for automatically extracting a region and means for converting the extracted color code of the texture region into an image description language as an attribute of the texture region.
【請求項7】 ラスタデータを扱う画像処理装置におい
て、画像を構成する色をコード化する手段とこの色のコ
ードを用いて画像データを再構成する手段と、色コード
で表現された画像から塗りつぶし領域を自動的に抽出す
る手段と、この抽出された塗りつぶし領域の色のコード
を塗りつぶし領域の属性として画像記述言語化する手段
から構成される画像処理装置。
7. An image processing apparatus for handling raster data, means for encoding colors forming an image, means for reconstructing image data using the color codes, and filling from an image represented by a color code. An image processing apparatus comprising means for automatically extracting an area and means for converting the extracted color code of the filled area into an image description language as an attribute of the filled area.
JP5269110A 1993-10-27 1993-10-27 Image processing device Expired - Lifetime JP2845107B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5269110A JP2845107B2 (en) 1993-10-27 1993-10-27 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5269110A JP2845107B2 (en) 1993-10-27 1993-10-27 Image processing device

Publications (2)

Publication Number Publication Date
JPH07121699A true JPH07121699A (en) 1995-05-12
JP2845107B2 JP2845107B2 (en) 1999-01-13

Family

ID=17467815

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5269110A Expired - Lifetime JP2845107B2 (en) 1993-10-27 1993-10-27 Image processing device

Country Status (1)

Country Link
JP (1) JP2845107B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001004842A1 (en) * 1999-07-09 2001-01-18 Electronics And Telecommunications Research Institute Texture description method and texture-based retrieval method in frequency domain
JP2001357406A (en) * 2000-06-14 2001-12-26 Minolta Co Ltd Picture processor
WO2004068368A1 (en) * 2003-01-31 2004-08-12 Canon Kabushiki Kaisha Image processing method, system, program, program storage medium and information processing apparatus
KR100706414B1 (en) * 1999-09-16 2007-04-10 주식회사 팬택앤큐리텔 Method and Apparatus for retrieving of texture
US8041122B2 (en) 2006-12-12 2011-10-18 Canon Kabushiki Kaisha Image processing apparatus, method for controlling image processing apparatus, and storage medium storing related program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4991590B2 (en) 2008-02-14 2012-08-01 キヤノン株式会社 Image processing apparatus, image processing method, image processing program, and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001004842A1 (en) * 1999-07-09 2001-01-18 Electronics And Telecommunications Research Institute Texture description method and texture-based retrieval method in frequency domain
US6803919B1 (en) 1999-07-09 2004-10-12 Electronics And Telecommunications Research Institute Extracting texture feature values of an image as texture descriptor in a texture description method and a texture-based retrieval method in frequency domain
KR100706414B1 (en) * 1999-09-16 2007-04-10 주식회사 팬택앤큐리텔 Method and Apparatus for retrieving of texture
JP2001357406A (en) * 2000-06-14 2001-12-26 Minolta Co Ltd Picture processor
WO2004068368A1 (en) * 2003-01-31 2004-08-12 Canon Kabushiki Kaisha Image processing method, system, program, program storage medium and information processing apparatus
US7664321B2 (en) 2003-01-31 2010-02-16 Canon Kabushiki Kaisha Image processing method, system, program, program storage medium and information processing apparatus
US8041122B2 (en) 2006-12-12 2011-10-18 Canon Kabushiki Kaisha Image processing apparatus, method for controlling image processing apparatus, and storage medium storing related program

Also Published As

Publication number Publication date
JP2845107B2 (en) 1999-01-13

Similar Documents

Publication Publication Date Title
US6466694B2 (en) Document image processing device and method thereof
US6347156B1 (en) Device, method and storage medium for recognizing a document image
JP2771813B2 (en) Trimming method of B-spline description of patch in 3D graphic processing system
JPH0634231B2 (en) How to create mold piece data
US4817187A (en) Apparatus and method for vectorization of incoming scanned image data
US5214718A (en) Scan-in polygonal extraction of video images
JPH09293082A (en) Device for retrieving picture and its method
US5199083A (en) Image data processing method and system for giving identification labels to areas of connected black picture elements
US6360006B1 (en) Color block selection
JP2845107B2 (en) Image processing device
US6233352B1 (en) Information processing method and apparatus
US7570811B2 (en) Segmenting an image via a graph
US20040141643A1 (en) Segmenting an image via shortest cycles
US7336825B2 (en) Segmenting a composite image via minimum areas
US20050238235A1 (en) Run length based connected components and contour following for enhancing the performance of circled region extraction algorithm
JP3172498B2 (en) Image recognition feature value extraction method and apparatus, storage medium for storing image analysis program
JPH08194716A (en) Picture processing method and its device
WO1999017250A1 (en) Image comparing system
JP3648778B2 (en) Image processing device
JP2908451B2 (en) Method and apparatus for processing scanned video images
Ablameyko et al. Automatic map digitising: problems and solution
Ablameyko et al. Interpretation of colour maps. A combination of automatic and interactive techniques
JP2010218165A (en) Image processor, information processor, and image reader
Ablameyko et al. Knowledge based technique for map-drawing interpretation
Ablameyko et al. A system for automatic recognition of engineering drawing entities