JP2924744B2 - Image region extraction method and device - Google Patents
Image region extraction method and deviceInfo
- Publication number
- JP2924744B2 JP2924744B2 JP7296570A JP29657095A JP2924744B2 JP 2924744 B2 JP2924744 B2 JP 2924744B2 JP 7296570 A JP7296570 A JP 7296570A JP 29657095 A JP29657095 A JP 29657095A JP 2924744 B2 JP2924744 B2 JP 2924744B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- determined
- mask
- extracting
- scan
- 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.)
- Expired - Lifetime
Links
- 238000000605 extraction Methods 0.000 title claims description 80
- 238000000034 method Methods 0.000 claims description 41
- 239000012536 storage buffer Substances 0.000 claims description 38
- 238000001914 filtration Methods 0.000 claims description 19
- 230000000873 masking effect Effects 0.000 claims description 14
- 239000000872 buffer Substances 0.000 claims description 6
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 11
- 230000008602 contraction Effects 0.000 description 7
- 239000003086 colorant Substances 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000010354 integration Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- CYJRNFFLTBEQSQ-UHFFFAOYSA-N 8-(3-methyl-1-benzothiophen-5-yl)-N-(4-methylsulfonylpyridin-3-yl)quinoxalin-6-amine Chemical compound CS(=O)(=O)C1=C(C=NC=C1)NC=1C=C2N=CC=NC2=C(C=1)C=1C=CC2=C(C(=CS2)C)C=1 CYJRNFFLTBEQSQ-UHFFFAOYSA-N 0.000 description 1
- 238000012935 Averaging Methods 0.000 description 1
- 241000252067 Megalops atlanticus Species 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、各種画像処理装置
において、画像中の必要な対象領域を抽出する技術、あ
るいは対象領域のマスクを作成する技術、対象領域を切
り抜く技術に関する。マスクとは、ある画像内の部分領
域を切り出して他の画像上に合成したり、文書と合成し
たりする場合に使用し、元画像のどの画素を必要とする
のかを画素単位で指定したデータを意味する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for extracting a required target area in an image, a technique for creating a mask for the target area, and a technique for cutting out the target area in various image processing apparatuses. A mask is a data used to cut out a partial area in one image and combine it with another image or combine it with a document, and specify which pixels of the original image are required in pixel units Means
【0002】[0002]
【従来の技術】従来この種の画像の領域抽出装置は、抽
出したい領域の明度あるいは色相、彩度、あるいはRG
B値を指定し、指定値からあるしきい値の範囲以内の画
素のみを抽出する処理を行っていた。2. Description of the Related Art Conventionally, this type of image area extracting apparatus uses a lightness, hue, saturation, or RG of an area to be extracted.
A process of designating the B value and extracting only pixels within a certain threshold range from the designated value has been performed.
【0003】図15及び図14を用いて従来の画像の領
域抽出装置の実施例について説明する。An embodiment of a conventional image region extracting apparatus will be described with reference to FIGS.
【0004】従来の装置の実施例は、スキャナなど画像
の入力装置201、画像表示用のモニタ202、オペレ
ータが対象領域内の基準点を指定する位置指定手段20
4、基準点の画素値を記憶する基準画素値記憶バッファ
206、入力画像メモリ203、マスク画像メモリ20
7、基準点のRGB値、画素値を比較するしきい値処理
手段205、生成されたマスクデータを出力する出力装
置208とからなる。An embodiment of the conventional apparatus includes an image input device 201 such as a scanner, a monitor 202 for displaying an image, and a position specifying means 20 for an operator to specify a reference point in a target area.
4. Reference pixel value storage buffer 206 for storing pixel values of reference points, input image memory 203, mask image memory 20
7, threshold value processing means 205 for comparing the RGB value and the pixel value of the reference point, and an output device 208 for outputting the generated mask data.
【0005】画像入力装置201から入力された画像デ
ータは入力画像メモリ203に保持され、同時にモニタ
202に表示される。オペレータは、モニタ202に表
示された画像を見ながらマスクしたい領域(対象領域)
内の一点を、位置指定手段204を用いて基準点として
指定する(ステップA101)。位置指定手段204と
しては、マウス、タブレット、キーボードなどがある。
次に基準点の画素値(R0,G0,B0)を、入力画像
メモリ203から抽出し、基準画素値記憶バッファ20
6に入れる(ステップA102)。[0005] Image data input from the image input device 201 is held in an input image memory 203 and simultaneously displayed on a monitor 202. The operator wants to mask while viewing the image displayed on the monitor 202 (target area)
One of the points is designated as a reference point using the position designation means 204 (step A101). Examples of the position specifying unit 204 include a mouse, a tablet, and a keyboard.
Next, the pixel value (R0, G0, B0) of the reference point is extracted from the input image memory 203, and is stored in the reference pixel value storage buffer 20.
6 (step A102).
【0006】画像走査用位置を初期値にリセットし(ス
テップA103)、入力画像メモリ203のデータを用
いて、画像を端から端まで走査し、しきい値処理手段2
05において、各画素値(r,g,b)について、(R
0,G0,B0)と比較して抽出すべきどうかを判定す
る。抽出すべきと判定された画素については、該当する
位置のマスク画像メモリ207にTRUEをセットし、
そうでないときにはFALSEをセットする(ステップ
A104,A105,A106,A107,A108,
A109)。画像の最後まで走査した後、マスク画像メ
モリ207の内容を出力装置208に出力して終了す
る。一般に、マスク画像メモリ207の内容は、TRU
E,FALSEの2種類であり、以下、TRUEの場合
にはその画素を抽出することを、FALSEの場合には
抽出しないことを示すものとする。The image scanning position is reset to an initial value (step A103), and the image is scanned from one end to the other by using the data of the input image memory 203.
At 05, for each pixel value (r, g, b), (R
(0, G0, B0). For a pixel determined to be extracted, TRUE is set in the mask image memory 207 at the corresponding position,
Otherwise, set FALSE (steps A104, A105, A106, A107, A108,
A109). After scanning to the end of the image, the contents of the mask image memory 207 are output to the output device 208, and the process ends. Generally, the contents of the mask image memory 207 are
E and FALSE. In the following description, TRUE indicates that the pixel is extracted, and FALSE indicates that the pixel is not extracted.
【0007】しきい値処理手段205の判定方法として
は、Thをあるしきい値として、(R0−Th<r<R
0+Th)かつ(G0−Th<g<G0+Th)かつ
(B0−Th<b<B0+Th)ならばTRUE、それ
以外はFALSE、とする方法がある。また、RGB値
ではなく、色相、彩度、明度値に変換してから閾値処理
する方式や、判定条件として、(R0−r)2 +(G0
−g)2 +(B0−b)2 <Thを用いる方式などがあ
る。[0007] As a determination method of the threshold value processing means 205, assuming that Th is a certain threshold value, (R0-Th <r <R
0 + Th), (G0−Th <g <G0 + Th) and (B0−Th <b <B0 + Th), TRUE, and FALSE otherwise. Further, a method of performing threshold processing after converting into hue, saturation, and brightness values instead of RGB values, or (R0−r) 2 + (G0
−g) 2 + (B0−b) 2 <Th.
【0008】従来の装置の例として、他に特開平4−3
29487、特開平5−28263などがあげられる。As an example of a conventional apparatus, Japanese Patent Laid-Open Publication No.
29487 and JP-A-5-28263.
【0009】[0009]
【発明が解決しようとする課題】従来の画像の領域抽出
装置では、抽出したい領域以外に同じ色を持つ画素が存
在すると、その部分も同様に除去されるため、オペレー
タが意図した対象領域が正確に抽出できないという問題
があった。また、抽出したい領域が、複数色の画素パタ
ーンで構成されている場合には、領域を抽出できないと
いう問題があった。In a conventional image region extracting apparatus, if a pixel having the same color exists in a region other than the region to be extracted, that portion is similarly removed, so that the target region intended by the operator can be accurately determined. There was a problem that it could not be extracted. Further, when the region to be extracted is composed of a plurality of color pixel patterns, there is a problem that the region cannot be extracted.
【0010】図12は、部分領域101、部分領域10
2、部分領域103、部分領域104、からなる。部分
領域101、部分領域102、部分領域103は、それ
ぞれの領域内の画素値はほぼ等しい。部分領域101と
他の領域の画素値は大きく異なっている。部分領域10
2と部分領域103は位置は離れているものの、領域内
の画素値はほぼ等しいものとする。また、部分領域10
4は、一番色画素105と二番色画素106の2つの色
の画素のパターンで構成されているものとする。FIG. 12 shows partial areas 101 and 10
2, a partial area 103 and a partial area 104. The partial area 101, the partial area 102, and the partial area 103 have substantially the same pixel value in each area. The pixel values of the partial area 101 and other areas are significantly different. Partial area 10
Although the position of 2 and the partial area 103 are apart from each other, the pixel values in the area are assumed to be substantially equal. Also, the partial area 10
4 is composed of a pattern of pixels of two colors, a first color pixel 105 and a second color pixel 106.
【0011】従来の画像の領域抽出装置においては、部
分領域101のように、他の領域と画素値が異なるよう
な領域については抽出可能である。しかし、部分領域1
02を抽出しようとすると、画素値が等しい部分領域1
03も同時に抽出されてしまうという問題があった。ま
た、部分領域104のようなパターンで構成されている
領域に対しては、大部分の場合2つの色の画素のどちら
かしか抽出できないという問題があった。もちろん、一
番色画素105の色と二番色画素106の両方を用いて
マスクすれば、ある程度抽出可能となるが、オペレータ
に負担が掛かるだけでなく、抽出精度も非常に悪いとい
う問題があった。In a conventional image area extracting apparatus, an area such as the partial area 101 having a pixel value different from that of another area can be extracted. However, partial area 1
02 is to be extracted, the partial area 1 having the same pixel value
03 is also extracted at the same time. In addition, there is a problem that, in most cases, only one of two color pixels can be extracted from an area configured with a pattern such as the partial area 104. Of course, if masking is performed using both the color of the first color pixel 105 and the second color pixel 106, extraction can be performed to some extent. However, not only is the burden on the operator, but also the extraction accuracy is extremely poor. Was.
【0012】[0012]
【課題を解決するための手段】上述した問題点を解決す
るため、本発明の画像の領域抽出装置は、入力画像デー
タを保持する入力画像メモリと、画像データ及び領域抽
出結果を表示するモニタと、抽出する対象領域を指定す
る位置指定手段と、領域抽出の基準点の画素特徴量を保
持する基準点特徴量記憶バッファと、領域抽出の基準点
の位置を保持する基準点位置記憶バッファと、ある画素
の隣接画素のアドレスを探索する近傍画素探索手段と、
マスクすべき画素を記憶する判定済画素記憶バッファ
と、2つの画素の特徴量を比較する画素特徴量比較手段
と、ある画素の特徴量を算出する画素特徴量抽出手段
と、領域抽出結果を保持するマスク画像メモリとを備
え、前記近傍画素探索手段が、前記マスク画像メモリを
FALSEで初期化し、前記判定済画素記憶バッファか
ら判定済画素の位置を読み込み、判定済画素から−X方
向(ここでは、左から右へ向かう方向を+X方向とす
る)へ探索し対象領域の境界画素を求め、境界画素をス
キャン画素として記憶し、 前記マスク画像メモリ上の
スキャン画素の位置にTRUEをセットし、スキャン画
素の+Y方向(ここでは、下から上へ向かう方向を+Y
方向とする)の隣接画素(以下、画素P1と呼ぶ)につ
いて、該画素P1の画素特徴量と基準画素の画素特徴量
との差が所定のしきい値以下(以下、マスク可能と呼
ぶ)であり、かつ、該画素P1の−X方向の隣接画素が
マスク可能でない場合に、該画素P1を前記判定済画素
記憶バッファに記憶し、スキャン画素の−Y方向の隣接
画素(以下、画素P2と呼ぶ)について、該画素P2が
マスク可能であり、かつ、該画素P2の−X方向の隣接
画素がマスク可能でない場合に、該画素P2を前記判定
済画素位置記憶バッファに記憶し、スキャン画素の+X
方向の隣接画素がマスク可能かどうかを判定し、マスク
可能と判定された場合には、スキャン画素の位置を+X
方向に1画素移動させて、新たなスキャン画素について
も同様の処理を繰り返し、判定済画素位置記憶バッファ
にまだ読み出していない判定済画素があるかどうかを調
べ、まだ読み出していない判定済画素がある場合には、
当該判定済画素についても読み出して同様の処理を繰り
返すことを特徴とする。In order to solve the above-mentioned problems, an image area extracting apparatus according to the present invention comprises an input image memory for holding input image data, and a monitor for displaying image data and area extraction results. Position specifying means for specifying a target region to be extracted, a reference point feature storage buffer for holding a pixel feature of a reference point for region extraction, a reference point position storage buffer for holding the position of the reference point for region extraction, Neighboring pixel searching means for searching for an address of a pixel adjacent to a certain pixel;
A determined pixel storage buffer for storing a pixel to be masked, a pixel characteristic amount comparison unit for comparing characteristic amounts of two pixels, a pixel characteristic amount extraction unit for calculating a characteristic amount of a certain pixel, and holding a region extraction result A neighboring pixel searching means, wherein the mask image memory is
Initialize with FALSE, and execute the
Read the position of the determined pixel from the
Direction (here, the direction from left to right is defined as + X direction)
To find the boundary pixels of the target area, and
Stored as a can pixel, and stored on the mask image memory
Set TRUE at the position of the scan pixel, and
Elementary + Y direction (here, the direction from bottom to top is + Y
Direction) (hereinafter referred to as pixel P1).
And the pixel feature amount of the pixel P1 and the pixel feature amount of the reference pixel
Is less than or equal to a predetermined threshold (hereinafter referred to as maskable).
And the pixel adjacent to the pixel P1 in the −X direction is
If masking is not possible, the pixel P1 is replaced with the determined pixel
Stored in the storage buffer, adjacent to the scan pixel in the -Y direction
For a pixel (hereinafter, referred to as a pixel P2), the pixel P2
Maskable and adjacent to the pixel P2 in the -X direction
When the pixel is not maskable, the pixel P2 is determined.
+ X of the scan pixel
Determines whether adjacent pixels in the direction can be masked, and
If determined to be possible, the position of the scan pixel is set to + X
Move one pixel in the direction
The same processing is repeated for the determined pixel position storage buffer.
Check if there are any judged pixels that have not been read out yet.
In addition, if there is a determined pixel that has not been read yet,
The same processing is repeated by reading the determined pixel.
It is characterized by returning .
【0013】また、本発明の画像の領域抽出方法は、抽
出する対象領域内の基準画素を指定するステップと、任
意の画素の特徴量を抽出する1つ以上の異なる画素特徴
量抽出ステップと、マスク画像を記憶するメモリ(以
下、マスク画像メモリと呼ぶ)をFALSEで初期化す
るステップと、判定済画素位置を記憶するバッファ(以
下、判定済画素位置記憶バッファと呼ぶ)から判定済画
素の位置を読み込むステップ(ステップB21)と、判
定済画素から−X方向(ここでは、左から右へ向かう方
向を+X方向とする)へ探索し対象領域の境界画素を求
めるステップ(ステップB22)と、境界画素をスキャ
ン画素として記憶するステップ(ステップB23)と、
マスク画像メモリ上のスキャン画素の位置にTRUEを
セットするステップと(ステップB24)、スキャン画
素の+Y方向(ここでは、下から上へ向かう方向を+Y
方向とする)の隣接画素(以下、画素P1と呼ぶ)につ
いて、該画素P1の画素特徴量と基準画素の画素特徴量
との差が所定のしきい値以下(以下、マスク可能と呼
ぶ)であり、かつ、該画素P1の−X方向の隣接画素が
マスク可能でない場合に、該画素P1を判定済画素位置
情報記憶バッファに記憶するステップ(ステップB2
5、ステップB26)と、スキャン画素の−Y方向の隣
接画素(以下、画素P2と呼ぶ)について、該画素P2
がマスク可能であり、かつ、該画素P2の−X方向の隣
接画素がマスク可能でない場合に、該画素P2を判定済
画素位置情報記憶バッファに記憶するステップ(ステッ
プB27、ステップB28)と、スキャン画素の+X方
向の隣接画素がマスク可能かどうかを判定するステップ
(ステップB29)と、ステップB29でマスク可能と
判定された場合には、スキャン画素の位置を+X方向に
1画素移動させ、ステップB24からステップB29ま
でを繰り返すステップ(ステップB30)と、判定済画
素位置記憶バッファにまだ読み出していない判定済画素
があるかどうかを調べ、まだ読み出していない判定済画
素がある場合には、ステップB21からステップB30
までを繰り返すステップ(ステップB31)と、基準画
素を含む均一な画素特徴量を持つ連結領域を抽出するこ
とを特徴とする。Further, the image region extracting method according to the present invention includes a step of designating a reference pixel in a target region to be extracted, and one or more different pixel characteristic amount extracting steps of extracting a characteristic amount of an arbitrary pixel. Memory for storing mask images (hereinafter
(Referred to as a mask image memory below) with FALSE
And a buffer for storing the determined pixel position (hereinafter referred to as a buffer).
Below, it is called the determined pixel position storage buffer).
Reading the elementary position (step B21);
From the determined pixel in the -X direction (here, the direction from left to right
Direction to + X direction) to find the boundary pixel of the target area.
(Step B22) and scanning the boundary pixels.
Storing as a pixel (step B23);
TRUE at the position of the scan pixel on the mask image memory
Setting step (step B24) and scan image
Elementary + Y direction (here, the direction from bottom to top is + Y
Direction) (hereinafter referred to as pixel P1).
And the pixel feature amount of the pixel P1 and the pixel feature amount of the reference pixel
Is less than or equal to a predetermined threshold (hereinafter referred to as maskable).
And the pixel adjacent to the pixel P1 in the −X direction is
If masking is not possible, the pixel P1 is determined as the determined pixel position
Storing in the information storage buffer (step B2
5, Step B26) and the neighbor of the scan pixel in the −Y direction.
For a contact pixel (hereinafter, referred to as a pixel P2), the pixel P2
Can be masked, and is adjacent to the pixel P2 in the -X direction.
If the contact pixel cannot be masked, the pixel P2 has been determined.
Storing in the pixel position information storage buffer (step
B27, step B28) and + X direction of the scan pixel
Determining whether the neighboring pixel in the direction is maskable
(Step B29) and masking is possible in Step B29
If determined, move the position of the scan pixel in the + X direction.
Move one pixel and move from step B24 to step B29.
(Step B30) and the determined image
Determined pixels that have not yet been read into the elementary position storage buffer
Check if there is any
If there is a prime, Step B21 to Step B30
(Step B31) and extracting a connected region having a uniform pixel feature amount including the reference pixel.
【0014】本発明の画像の領域抽出方法及び装置の原
理について説明する。The principle of the image region extracting method and apparatus of the present invention will be described.
【0015】図4、図5、図7、図8は、本発明の原理
を示す流れ図である。図9、図10は、入力画像データ
を拡大した図である。画像データはスキャナ等によりデ
ジタイズされており、各画素は、図中の格子で囲まれた
小矩形として表されている。FIGS. 4, 5, 7 and 8 are flowcharts showing the principle of the present invention. 9 and 10 are enlarged views of the input image data. The image data is digitized by a scanner or the like, and each pixel is represented as a small rectangle surrounded by a grid in the figure.
【0016】図4を用いて本発明の処理の流れを説明す
る。まずオペレータは、抽出したい対象領域内の画素を
指定する(ステップA1)。オペレータによって指定さ
れた画素を基準画素とする。そして、基準画素の位置
を、第一の判定済画素位置として登録し(ステップA
2,A3)、同時に基準画素の画素特徴量を計算する
(ステップA4)。次に、連結領域抽出処理を行い、対
象領域を抽出する(ステップA5)。連結領域抽出処理
では、基準画素を含む均一な画素特徴量を持つ連結領域
を抽出する。連結領域とは、画素特徴量がほぼ等しい隣
接画素の集合で構成される領域である。さらにマスク画
像データに対して膨張、収縮処理を行い、領域の形状を
補正する(ステップA6)。最後にマスク画像データを
出力する(ステップA7)。The processing flow of the present invention will be described with reference to FIG. First, the operator specifies a pixel in the target area to be extracted (step A1). The pixel specified by the operator is set as a reference pixel. Then, the position of the reference pixel is registered as a first determined pixel position (step A).
2, A3), and at the same time, the pixel feature amount of the reference pixel is calculated (step A4). Next, a connected area extraction process is performed to extract a target area (step A5). In the connected region extraction processing, a connected region having a uniform pixel feature amount including the reference pixel is extracted. The connected region is a region formed by a set of adjacent pixels having substantially the same pixel feature amount. Further, expansion and contraction processing is performed on the mask image data to correct the shape of the area (step A6). Finally, the mask image data is output (step A7).
【0017】図5を用いて本発明の処理の流れを説明す
る。まずオペレータは、抽出したい対象領域内の画素を
指定する(ステップA21)。オペレータによって指定
された画素を、基準画素とする。そして、基準画素の位
置を、第一の判定済画素位置として登録し(ステップA
22,A23)、基準画素の画素特徴量を計算する(ス
テップA24)。次に、連結領域抽出処理を行い、対象
領域を抽出する(ステップA25)。連結領域抽出処理
では、基準画素を含む均一な画素特徴量を持つ連結領域
を抽出する。連結領域とは、画素特徴量がほぼ等しい隣
接画素の集合で構成される領域である。そして、得られ
たマスクデータを調査し、マスクが正常に作成されたか
どうかを判定する(ステップA25)。The processing flow of the present invention will be described with reference to FIG. First, the operator specifies a pixel in the target area to be extracted (step A21). The pixel specified by the operator is set as a reference pixel. Then, the position of the reference pixel is registered as a first determined pixel position (step A).
22, A23), and calculate the pixel feature amount of the reference pixel (step A24). Next, a connected area extraction process is performed to extract a target area (step A25). In the connected region extraction processing, a connected region having a uniform pixel feature amount including the reference pixel is extracted. The connected region is a region formed by a set of adjacent pixels having substantially the same pixel feature amount. Then, the obtained mask data is examined to determine whether or not the mask has been normally created (step A25).
【0018】マスク作成判定結果の一例として、マスク
TRUEの画素がn個以上抽出されたかどうかを調べる
ことがあげられる。nは通常2であるが、それ以上の数
でもかまわない。この場合TRUEがn個以上存在する
場合にはマスク作成に成功、n個未満のときは作成に失
敗したとみなす。あらかじめ何回まで特徴量を替えて処
理するかを決めておく方法もある。また、装置内のすべ
ての画素特徴量抽出手段を実行してしまった場合にも、
成功したとみなして次のステップへ進むものとする。One example of the mask creation determination result is to check whether n or more pixels of the mask TRUE have been extracted. n is usually 2, but may be a larger number. In this case, when n or more TRUEs are present, the mask creation is considered to be successful, and when less than n, the creation is considered to have failed. There is also a method of determining in advance how many times the feature amount should be changed before processing. Also, when all the pixel feature extraction means in the apparatus have been executed,
It shall be considered successful and proceed to the next step.
【0019】マスクが正常に作成されなかった時は、使
用する画素特徴量を変更して(ステップA27)、もう
一度、基準画素の画素特徴量の計算(ステップA23)
から繰り返す。マスク作成結果判定処理(ステップA2
6)にて、成功したと判断されれば次のステップに進
む。次にマスク画像データに対して膨張、収縮処理を行
い、領域の輪郭を補正する(ステップA28)。最後に
マスク画像データを出力する(ステップA29)。If the mask is not created normally, the pixel feature to be used is changed (step A27), and the pixel feature of the reference pixel is calculated again (step A23).
Repeat from Mask creation result determination processing (step A2)
If it is determined in 6) that the process has succeeded, the process proceeds to the next step. Next, expansion and contraction processing is performed on the mask image data to correct the contour of the area (step A28). Finally, the mask image data is output (step A29).
【0020】本発明における出力データは、TRUE,
FALSEの2種類のマスクデータであり、TRUEの
場合には、入力画像のその位置における抽出領域とする
ことを、FALSEの場合には抽出しないことを示すも
のとする。しかし、出力するデータはこれに限られるも
のではなく、画素値をTRUE,FALSEを0と25
5の値で表現したり、TRUEの位置に、入力画像の画
素値をマッピングして出力する方法などがある。The output data in the present invention is TRUE,
FALSE two types of mask data, TRUE indicates that the extraction area is the extraction area at the position of the input image, and FALSE indicates that the extraction area is not extracted. However, data to be output is not limited to this, and pixel values are set to TRUE and FALSE to 0 and 25.
For example, there is a method of expressing the value with a value of 5, mapping the pixel value of the input image to the position of TRUE and outputting the result.
【0021】ここで、本発明における画素特徴量につい
て説明する。画素Xにおける画素特徴量をV(X)と
し、V(X)は、単一の値でもよいし、画素の特徴を表
す複数の値でもよいものとする。画素特徴量の例として
は、 ・画素値をそのまま用いる。グレー画像ならばグレース
ケールを、カラー画像の場合には、RGB値をそのまま
用いる。 ・HSV値(色相、彩度、明度値)。これらを求めるた
めの計算方法は従来よりいくつか提案されており、例え
ば文献[1]によって、RGB値から計算することがで
きる。また、XYZ値、L* a* b* 値、L* u* v*
値なども使用することができる。これらはCIE(国際
照明委員会)で定められた規格で一般に広く知られてお
り、計算方法は文献[3]等に詳しく述べられている。 ・画素の近傍に局所フィルタを作用させて得られる値。 ・HSV、XYZ等の色変換を行った後に、局所フィル
タを作用させて得られる値。 などがある。Here, the pixel feature value in the present invention will be described. The pixel feature amount of the pixel X is V (X), and V (X) may be a single value or a plurality of values representing the characteristics of the pixel. As an example of the pixel feature amount: The pixel value is used as it is. For a gray image, gray scale is used, and for a color image, RGB values are used as they are. HSV values (hue, saturation, lightness values). Several calculation methods for obtaining these have been conventionally proposed, and can be calculated from RGB values according to, for example, Ref. [1]. XYZ values, L * a * b * values, L * u * v *
Values can also be used. These are generally widely known in the standards set by the CIE (International Commission on Illumination), and the calculation method is described in detail in reference [3] and the like. A value obtained by applying a local filter to the vicinity of a pixel. A value obtained by applying a local filter after performing color conversion such as HSV and XYZ. and so on.
【0022】画素の近傍に局所フィルタを作用させる方
法について、図11を用いて説明する。局所フィルタ7
0は、注目画素位置71において、局所フィルタを作用
させている場面を示す。iは画像のx方向の位置、jは
y方向の位置を表す。図では局所フィルタのサイズが3
×3であるが、一般的には、M×Nで表され、そのサイ
ズは任意である。位置i,jにおける画素値を、I
(i,j)とすると、3×3局所フィルタを作用させた
場合、その出力I′(i,j)は、 I′(i,j)=I(i−1,j−1)*a(1,1)+I(i,j−1)* a(1,2)+I(i+1,j−1)*a(1,3)+I(i−1,j)*a( 2,1)+I(i,j)*a(2,2)+I(i+1,j)*a(2,3)+I (i−1,j+1)*a(3,1)+I(i,j+1)*a(3,2)+I(i +1,j+1)*a(3,3) (1) となる。画素値がRGBのように3つある場合には、
R、G、Bのそれぞれに局所フィルタを作用させること
で、R′,G′,B′の3つの特徴量が得られることに
なる。A method of applying a local filter to the vicinity of a pixel will be described with reference to FIG. Local filter 7
0 indicates a scene where the local filter is applied at the target pixel position 71. i represents the position in the x direction of the image, and j represents the position in the y direction. In the figure, the size of the local filter is 3
Although it is × 3, it is generally represented by M × N, and its size is arbitrary. The pixel value at position i, j is
Assuming that (i, j), when a 3 × 3 local filter is applied, the output I ′ (i, j) is I ′ (i, j) = I (i−1, j−1) * a (1,1) + I (i, j-1) * a (1,2) + I (i + 1, j-1) * a (1,3) + I (i-1, j) * a (2,1) + I (i, j) * a (2,2) + I (i + 1, j) * a (2,3) + I (i-1, j + 1) * a (3,1) + I (i, j + 1) * a ( 3,2) + I (i + 1, j + 1) * a (3,3) (1) If there are three pixel values like RGB,
By applying a local filter to each of R, G, and B, three characteristic amounts of R ', G', and B 'are obtained.
【0023】本発明において有効な局所フィルタの一つ
に、低周波濾過フィルタがある。図中に示された低周波
濾過フィルタ72の数値は一例であり、ここでいう低周
波濾過フィルタとは、画像をフーリエ変換した後、空間
周波数の低い成分のみを濾過するような作用をするフィ
ルタを総称している。このような低周波濾過フィルタ
は、実際には注目画素の周辺の画素を加重平均するよう
な局所フィルタとして表すことができる。これらの例と
して低周波濾過フィルタ72は、周辺の画素の一様平均
をとる局所フィルタを示している。One of the effective local filters in the present invention is a low-frequency filter. The numerical value of the low-frequency filter 72 shown in the figure is an example, and the low-frequency filter described here is a filter that acts to filter only low-spatial-frequency components after Fourier-transforming an image. Collectively. Such a low-frequency filtering filter can actually be represented as a local filter that performs weighted averaging of pixels around the pixel of interest. As an example of these, the low-frequency filter 72 is a local filter that takes a uniform average of peripheral pixels.
【0024】低周波濾過フィルタは、図12内の対象領
域104のような、一番色画素105と二番色画素10
6が細かいパターンとして繰り返されている領域を抽出
するのに有効である。このようなパターンを持つ領域
は、モニタ上で表示すると、双方の色が混色した色とし
て見えるので、16色など、色数の限られたモニタに任
意の色を表示するためにしばしばこのような画像が作成
されて用いられる。例えば、白と黒のパターンでグレー
の中間調を表したり、赤と青のパターンで紫を表したり
することができる。The low-frequency filtering filter includes a first color pixel 105 and a second color pixel 10 such as a target area 104 in FIG.
This is effective for extracting an area in which 6 is repeated as a fine pattern. Since an area having such a pattern appears as a mixture of both colors when displayed on a monitor, such an area is often used to display an arbitrary color on a monitor having a limited number of colors, such as 16 colors. An image is created and used. For example, white and black patterns can represent gray halftones, and red and blue patterns can represent purple.
【0025】一番色画素105が赤、二番色画素106
が青であるとすると、モニタに表示すると人間からは、
ほぼ紫に見える。この効果を再現するために、低周波濾
過フィルタを用いるのである。対象領域104のある注
目画素の特徴量として、低周波濾過成分を用いることに
より、赤と青の加重平均値が得られるが、これは紫色の
画素値とほぼ同じである。つまり、低周波濾過フィルタ
を用いることにより、例え微細なパターンで構成された
領域であっても、人間が見たままの色としてマスク作成
作業を行うことができる。The first color pixel 105 is red and the second color pixel 106
Is blue, and when displayed on a monitor,
It looks almost purple. In order to reproduce this effect, a low frequency filter is used. By using a low-frequency filtering component as a feature value of a certain pixel of interest in the target area 104, a weighted average value of red and blue is obtained, which is almost the same as a purple pixel value. In other words, by using the low-frequency filtering filter, even in a region configured by a fine pattern, a mask creating operation can be performed with a color as seen by a human.
【0026】その他、局所フィルタとして有効なものの
例として、高周波フィルタ73、エッジ強度抽出フィル
タ74などがある。なお、図中の高周波フィルタ73、
エッジ強度フィルタ74に示された数値はほんの一例で
あり、文献[2]等にいくつかのフィルタが記載されて
いる。高周波フィルタやエッジ強度抽出フィルタは、色
は同じでテクスチャーが異なる領域を抽出するのに有効
である。Other examples of effective local filters include a high-frequency filter 73 and an edge strength extraction filter 74. In addition, the high frequency filter 73 in the figure,
The numerical values shown in the edge strength filter 74 are just examples, and several filters are described in literature [2] and the like. The high frequency filter and the edge strength extraction filter are effective for extracting regions having the same color but different textures.
【0027】次に、連結領域抽出処理(ステップA5,
A25)の内容について述べる。Next, a connected area extraction process (step A5,
The contents of A25) will be described.
【0028】連結領域抽出処理の参考技術として、図7
がある。まず、出力のマスク画像データをすべてFAL
SEに初期化する(ステップB1)。判定済画素位置を
一つ読み込む(ステップB2)。なお、一度読みだした
位置情報項目は登録から削除されなければならない。マ
スク画像における、判定済画素の位置に、TRUEをセ
ットする(ステップB3)。次に判定済画素の近傍の画
素をマスク候補画素として取得する(ステップB4)。
マスク候補画素それぞれについて、画素特徴量と基準画
素特徴量とを比較し、マスク可能ならば、その画素位置
を判定済画素位置として登録する(ステップB5,B
6,B7,B8)。そしてステップB2以下の処理を判
定済画素がなくなるまで続ける。FIG. 7 shows a reference technique of the connected area extraction processing.
There is. First, all output mask image data is FAL
Initialize to SE (step B1). One determined pixel position is read (step B2). Note that the location information item once read must be deleted from the registration. TRUE is set at the position of the determined pixel in the mask image (step B3). Next, a pixel near the determined pixel is acquired as a mask candidate pixel (step B4).
For each mask candidate pixel, the pixel feature amount is compared with the reference pixel feature amount, and if masking is possible, the pixel position is registered as a determined pixel position (steps B5 and B).
6, B7, B8). Then, the processing from step B2 is continued until there are no more determined pixels.
【0029】マスク可能かどうかの判断方法の例を以下
に述べる。N個の特徴量を使用するものとすると、N個
の基準画素特徴量を、Vi=(V1,V2,V3…V
n)、対象画素の特徴量を、Xi=(X1,X2,X3
…Xn)と表すことができる。それぞれの特徴量の許容
範囲を、Ti=(T1,T2,T3…Tn)とすれば、
次式の基準で判定できる。 ・もしも、1からNまですべてのiについて、|Xi−
Vi|<Tiが成り立つならばその画素はマスク可能
(TRUE)、そうでないならFALSE もしも特徴量がRGB画素値の場合には、対象画素の
R、G、Bのそれぞれの値が、基準画素の値から、ある
一定の範囲内に入っていればTRUE、そうでないなら
FALSEとなる。An example of a method of determining whether masking is possible will be described below. Assuming that N feature amounts are used, N reference pixel feature amounts are defined as Vi = (V1, V2, V3... V
n), the characteristic amount of the target pixel is expressed as Xi = (X1, X2, X3
.. Xn). If the allowable range of each feature is Ti = (T1, T2, T3... Tn),
It can be determined based on the following formula.・ If all i from 1 to N, | Xi−
If Vi | <Ti holds, the pixel is maskable (TRUE); otherwise, FALSE If the feature value is an RGB pixel value, the respective values of R, G, and B of the target pixel are set to the reference pixel. From the value, TRUE if the value falls within a certain range, FALSE otherwise.
【0030】実際の処理の様子を図9を用いて説明す
る。基準画素53(図中のAで示されている画素)は、
あらかじめ第一の判定済画素位置54として登録されて
いる。マスク画像データにおける第一の判定済画素位置
54にTRUEをセットした後、マスク候補画素とし
て、4近傍の画素、a,b,c,dを取得し、それぞれ
の画素特徴量V(a),V(b),V(c),V(d)
を基準画素特徴量V(A)と比較する。そして、特徴量
が基準画素値に近ければ、マスク可能な画素であり、判
定済画素として登録する。この例では、a,b,c,d
すべて判定済画素に登録する。The actual processing will be described with reference to FIG. The reference pixel 53 (pixel indicated by A in the figure) is
It is registered in advance as the first determined pixel position 54. After setting TRUE to the first determined pixel position 54 in the mask image data, four neighboring pixels, a, b, c, and d, are obtained as mask candidate pixels, and the respective pixel feature amounts V (a), V (b), V (c), V (d)
Is compared with the reference pixel feature amount V (A). If the feature value is close to the reference pixel value, the pixel is a maskable pixel and is registered as a determined pixel. In this example, a, b, c, d
All are registered as determined pixels.
【0031】次に、判定済画素バッファから読み込まれ
た画素が、cであったとする。cは、第二の判定済画素
位置55に位置するので、マスク画像メモリの第二の判
定済画素位置55にTRUEをセットする。画素cの近
傍のマスク候補画素は、A,e,f,gであるが、Aは
既にマスク画像に登録されているので判定しない。e,
f,gの特徴量を比較すると、e,fはTRUEとなり
マスク可能であるが、gは、対象領域から外れるのでF
ALSEとなる。このように、基準画素の近傍から探索
画素を拡大していくことにより、基準画素を含む対象領
域を抽出することができる。Next, it is assumed that the pixel read from the determined pixel buffer is c. Since c is located at the second determined pixel position 55, TRUE is set to the second determined pixel position 55 in the mask image memory. The mask candidate pixels near the pixel c are A, e, f, and g, but A is not determined because A is already registered in the mask image. e,
Comparing the feature values of f and g, e and f become TRUE and can be masked.
ALSE. As described above, by expanding the search pixel from the vicinity of the reference pixel, a target region including the reference pixel can be extracted.
【0032】本願発明の連結領域抽出処理(ステップA
5,A25)の例として、図8がある。まず、出力のマ
スク画像データをすべてFALSEに初期化する(ステ
ップB20)。判定済画素位置を一つ読み込む(ステッ
プB21)。判定済画素から、−X方向へ入力画像を探
索し、対象領域の境界となる画素を見付け(ステップB
22)、その境界画素をスキャン画素pとする(ステッ
プB23)。次にマスク画像におけるスキャン画素の位
置に、TRUEをセットする(ステップB24)。次
に、スキャン画素の+Y方向の隣接画素P1がマスク可
能かどうか判断し(ステップB25)、マスク可能なら
ば、p1の−X方向の隣接画素がマスク不可であるとき
に限り、p1を判定済画素として登録する(ステップB
26)。次に、スキャン画素の−Y方向の隣接画素p2
がマスク可能かどうかを判断し(ステップB27)、マ
スク可能ならば、p2の−X方向の隣接画素がマスク不
可であるときに限り、p2を判定済画素として登録する
(ステップB28)。The connected region extraction processing (step A) of the present invention
5, A25) is shown in FIG. First, all output mask image data is initialized to FALSE (step B20). One determined pixel position is read (step B21). The input image is searched in the −X direction from the determined pixels, and a pixel serving as a boundary of the target area is found (step B).
22) The boundary pixel is set as a scan pixel p (step B23). Next, TRUE is set at the position of the scan pixel in the mask image (step B24). Next, it is determined whether the adjacent pixel P1 in the + Y direction of the scan pixel can be masked (step B25). If maskable, p1 has been determined only when the adjacent pixel in the −X direction of p1 cannot be masked. Register as a pixel (step B
26). Next, an adjacent pixel p2 in the −Y direction of the scan pixel
Is determined whether or not is maskable (step B27). If masking is possible, p2 is registered as a determined pixel only when an adjacent pixel in the −X direction of p2 cannot be masked (step B28).
【0033】次にスキャン画素の+X方向の隣接画素を
マスク可能か判断し(ステップB29)、マスク可能な
らば、スキャン画素を+X方向にインクリメントし(ス
テップB30)、ステップB24へ戻る。マスク不可な
らば、次の判定済画素についてステップB21からの処
理を繰り返す。これを判定済画素がなくなるまで続け
る。Next, it is determined whether a pixel adjacent to the scan pixel in the + X direction can be masked (step B29). If masking is possible, the scan pixel is incremented in the + X direction (step B30), and the process returns to step B24. If masking is not possible, the processing from step B21 is repeated for the next determined pixel. This is continued until there are no more determined pixels.
【0034】実際の処理の様子を図10を用いて説明す
る。基準画素63(図中のAで示されている画素)は、
あらかじめ第一の判定済画素位置64として登録されて
いる。第一の判定済画素位置64から、−X方向に探索
していくと、まず境界画素pが見付かる。そこでpをス
キャン画素とする。スキャン画素の位置のマスクデータ
をTRUEにした後、その上のp1画素がマスク可能か
どうかを調査する。しかしp1は対象領域外なので、次
のステップに進み、スキャン画素の下のp2画素につい
てマスク可能かどうか調査する。p2は対象領域内なの
で次にp2の−X方向の隣接画素を調査する。すると、
p2の−X方向の隣接画素は、対象領域外でFALSE
なので、条件に合致し、判定済画素として登録する。The actual processing will be described with reference to FIG. The reference pixel 63 (pixel indicated by A in the figure)
It is registered as a first determined pixel position 64 in advance. When the search is performed in the -X direction from the first determined pixel position 64, the boundary pixel p is first found. Therefore, let p be a scan pixel. After setting the mask data at the position of the scan pixel to TRUE, it is checked whether the p1 pixel above it can be masked. However, since p1 is outside the target area, the process proceeds to the next step, and it is checked whether the p2 pixel below the scan pixel can be masked. Since p2 is within the target area, the next pixel in the -X direction of p2 is examined. Then
The adjacent pixel in the -X direction of p2 is FALSE outside the target area.
Therefore, the condition is met and registered as a determined pixel.
【0035】スキャン画素pの+X方向の隣接画素qも
マスク可能なので、同様に上下の画素を調査し、q1が
判定済画素として登録されることがわかる。以上の様に
処理を進めていくと、やがてもう一つの境界画素rに到
達し、1ライン分の処理が終了する。このように、図8
のマスク判定処理方法では、各ラインごとに、一つの判
定済画像を記憶することになり、非常に高速に処理でき
ることがわかる。Since the adjacent pixel q in the + X direction of the scan pixel p can also be masked, the upper and lower pixels are similarly examined, and it is found that q1 is registered as a determined pixel. When the processing proceeds as described above, another boundary pixel r is eventually reached, and the processing for one line is completed. Thus, FIG.
In the mask determination processing method described above, one determined image is stored for each line, and it can be seen that the processing can be performed at a very high speed.
【0036】次に、膨張収縮処理(ステップA6,A2
8)について述べる。Next, expansion and contraction processing (steps A6 and A2)
8) will be described.
【0037】膨張処理は、領域を1画素分太める処理で
あり、収縮処理は1画素分細める処理である。本処理は
文献[4]にも記載されている。The expansion process is a process for increasing the area by one pixel, and the contraction process is a process for reducing the area by one pixel. This processing is also described in reference [4].
【0038】本発明においては、マスク画像はTRUE
とFALSEの画素で構成されているので、入力マスク
画像をf(i,j)、出力マスク画像をg(i,j)と
すると、次のように表す事ができる。 ・膨張: f(i,j)または、その4近傍(8近傍)
のいずれかがTRUEのとき、g(i,j)=TRU
E。それ以外はg(i,j)=FALSE ・収縮: f(i,j)または、その4近傍(8近傍)
のいずれかがFALSEのとき、g(i,j)=FAL
SE。それ以外はg(i,j)=TRUE ここで、4近傍とは画素の上下左右の4つの隣接画素の
ことを指し、8近傍とは画素の上下左右と斜め方向の8
つの隣接画素を指す。本発明では、膨張と収縮をN回ず
つ行い、領域の細かい凹凸や穴を除去する。In the present invention, the mask image is TRUE
And FALSE pixels, the input mask image can be expressed as f (i, j) and the output mask image can be expressed as g (i, j) as follows.・ Expansion: f (i, j) or its vicinity 4 (around 8)
Is TRUE, g (i, j) = TRU
E. Otherwise, g (i, j) = FALSE Shrinkage: f (i, j) or its four neighbors (eight neighbors)
Is FALSE, g (i, j) = FALSE
SE. Other than that, g (i, j) = TRUE Here, 4 neighbors indicate four adjacent pixels on the upper, lower, left and right sides of the pixel, and 8 neighbors are 8 pixels in the upper, lower, left, and right directions of the pixel.
One adjacent pixel. In the present invention, expansion and contraction are performed N times, and fine irregularities and holes in the region are removed.
【0039】なお、これまでの作用の説明では、オペレ
ータが基準画素として1画素を指定するものとして説明
したが、オペレータが複数画素を指定する場合には、前
記の作用を複数回繰り返して行い、その結果を統合すれ
ばよい。マスクを統合する様子を図13を用いて説明す
る。入力画像例110において、オペレータは対象領域
116を抽出しようとしたが、はじめはA領域111し
か抽出できなかった。そこで、A領域111を保存して
おいて、次にB領域112を抽出し、A領域111と統
合する。このようにして、E領域115、までを随時統
合していけば、対象領域116をすべて抽出することが
できる。In the above description of the operation, it has been described that the operator specifies one pixel as the reference pixel. However, when the operator specifies a plurality of pixels, the above operation is repeated a plurality of times. The results can be integrated. The manner in which the masks are integrated will be described with reference to FIG. In the input image example 110, the operator tried to extract the target area 116, but initially could only extract the A area 111. Therefore, the A region 111 is stored, and then the B region 112 is extracted and integrated with the A region 111. In this way, if the E region 115 is integrated at any time, the entire target region 116 can be extracted.
【0040】このような処理の一例を、図6をもとに説
明する。1つの基準画素について領域抽出が終了した時
点で、マスク画像メモリのデータを出力するのではな
く、第二のマスク画像メモリに転送しておく(ステップ
C3)。そして領域抽出結果をモニタに表示し(ステッ
プC4)、オペレータからの次の指示を待つ。オペレー
タから、次の基準点が指示されたら、もう一度領域抽出
処理を行い、第二のマスク画像メモリに保持されていた
前回の結果と統合する(ステップC2)。オペレータか
ら終了指示があれば、マスク画像データを出力して終了
する。An example of such a process will be described with reference to FIG. When the area extraction for one reference pixel is completed, the data in the mask image memory is not output but transferred to the second mask image memory (step C3). Then, the area extraction result is displayed on the monitor (step C4), and the next instruction from the operator is waited. When the next reference point is designated by the operator, the area extraction processing is performed again, and the result is integrated with the previous result held in the second mask image memory (step C2). If there is an end instruction from the operator, the mask image data is output and the processing ends.
【0041】[0041]
【発明の実施の形態】以下に、本発明の実施例である画
像の領域抽出装置を図面を用いて説明する。図1は本発
明の画像の領域抽出装置の実施例を示すブロック図であ
る。図2は本発明の画像の領域抽出装置の別の実施例を
示すブロック図である。図3は本発明の画像の領域抽出
装置の中の画素特徴量抽出手段の実施例を示すブロック
図である。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an image area extracting apparatus according to an embodiment of the present invention. FIG. 1 is a block diagram showing an embodiment of an image region extracting apparatus according to the present invention. FIG. 2 is a block diagram showing another embodiment of the image region extracting apparatus according to the present invention. FIG. 3 is a block diagram showing an embodiment of a pixel feature extracting means in the image region extracting apparatus of the present invention.
【0042】本発明の第一の実施例は、スキャナやカメ
ラ等の画像入力装置1と、画像を表示するモニタ2と、
画像データを保持する入力画像メモリ4と、対象領域を
指定するための位置指定手段3と、基準点の特徴量を記
憶する基準点特徴量記憶バッファ6と、基準点の位置を
記憶する基準点位置記憶バッファ7と、近傍画素のアド
レスを計算する近傍画素探索手段8と、判定済画素位置
記憶バッファ9と、マスク画像メモリ5と、ハードディ
スクなどのデータ出力装置10と、画素特徴量を比較す
る画素特徴量比較手段11と、画素特徴量抽出手段12
と、各モジュールを制御するCPU15から構成されて
いる。The first embodiment of the present invention comprises an image input device 1 such as a scanner or a camera, a monitor 2 for displaying an image,
An input image memory 4 for holding image data, a position designating means 3 for designating a target area, a reference point feature quantity storage buffer 6 for storing feature quantities of reference points, and a reference point for storing locations of reference points The pixel feature amount is compared with the position storage buffer 7, the neighboring pixel search means 8 for calculating the address of the neighboring pixel, the determined pixel position storage buffer 9, the mask image memory 5, and the data output device 10 such as a hard disk. Pixel feature quantity comparison means 11 and pixel feature quantity extraction means 12
And a CPU 15 for controlling each module.
【0043】本発明の第二の実施例は、第一の実施例に
おいて、画素蓄積抽出手段40からなる画素特徴量抽出
手段12を有する。The second embodiment of the present invention is different from the first embodiment in that it has a pixel characteristic amount extracting means 12 comprising a pixel accumulation extracting means 40.
【0044】本発明の第三の実施例は、第二の実施例に
おける画素特徴量抽出手段に対し、さらに色変換手段4
4を加えた構成の、画素特徴量抽出手段12を有する。The third embodiment of the present invention is different from the second embodiment in that the color conversion means 4
And a pixel characteristic amount extraction unit 12 having a configuration obtained by adding the pixel characteristic amount extraction unit 12.
【0045】本発明の第四の実施例は、第二と第三の実
施例における画素特徴量抽出手段に対し、さらに低周波
濾過手段41を加えた構成の、画素特徴量抽出手段12
を有する。The fourth embodiment of the present invention is a pixel feature extraction unit 12 having a configuration in which a low-frequency filtering unit 41 is added to the pixel feature extraction unit of the second and third embodiments.
Having.
【0046】本発明の第五の実施例は、第一の実施例の
画素特徴量抽出手段12に替えて、N個(Nは2以上)
の異なる画素特徴量抽出手段からなる、複数の画素特徴
量抽出手段21と、マスク作成結果判定手段22とから
構成されている。In the fifth embodiment of the present invention, N (N is 2 or more) N pixels are used in place of the pixel feature extracting means 12 of the first embodiment.
And a plurality of pixel characteristic amount extracting means 21 composed of different pixel characteristic amount extracting means, and a mask creation result determining means 22.
【0047】本発明の第六の実施例は、第一の実施例の
画素特徴量抽出手段12に替えて、画素値抽出手段40
を有する1番目の画素特徴量抽出手段23と、画素値抽
出手段40と低周波濾過手段41を有する2番目の画素
特徴量抽出手段24とからなる複数の画素特徴量抽出手
段21と、マスク作成結果判定手段22とから構成され
ている。According to the sixth embodiment of the present invention, the pixel value extracting means 40 is replaced with the pixel feature extracting means 12 of the first embodiment.
A plurality of pixel feature quantity extraction means 21 comprising a first pixel feature quantity extraction means 23 having a pixel value extraction means 23, a second pixel feature quantity extraction means 24 having a pixel value extraction means 40 and a low-frequency filtering means 41, And a result determination unit 22.
【0048】本発明の第七の実施例は、第一の実施例、
第二の実施例、第三の実施例、第四の実施例、第五の実
施例、第六の実施例の構成要素に加えて、マスク領域膨
張手段13と、マスク領域収縮手段14を有する。The seventh embodiment of the present invention is the first embodiment,
In addition to the components of the second embodiment, the third embodiment, the fourth embodiment, the fifth embodiment, and the sixth embodiment, a mask region expanding unit 13 and a mask region contracting unit 14 are provided. .
【0049】本発明の第八の実施例は、第一の実施例、
第二の実施例、第三の実施例、第四の実施例、第五の実
施例、第六の実施例、第七の実施例の構成要素に加え
て、第二のマスク画像メモリ26と、マスク領域統合手
段27を有する。The eighth embodiment of the present invention is the first embodiment,
In addition to the components of the second embodiment, the third embodiment, the fourth embodiment, the fifth embodiment, the sixth embodiment, and the seventh embodiment, the second mask image memory 26 , And a mask area integrating means 27.
【0050】図4と、図8を参照して本発明の第一、第
二、第三、第四の実施例の動作について説明する。[0050] and FIG. 4, the first invention with reference to FIG. 8, second, third, the operation of the fourth embodiment.
【0051】画像入力装置1から入力画像メモリ4に画
像データが入力され、モニタ2に表示される。画像入力
装置1は、スキャナ、カメラ等の撮像装置だけでなく、
ネットワークで接続されたデータベースからの画像取得
を行う装置等を含むものとする。オペレータは、マウ
ス、キーボード等の位置指定手段3によって、画像中か
ら切り出したい対象領域内の点を指定する(ステップA
1)。Image data is input from the image input device 1 to the input image memory 4 and displayed on the monitor 2. The image input device 1 includes not only imaging devices such as a scanner and a camera, but also
It includes a device for acquiring images from a database connected via a network. The operator designates a point in the target area to be cut out from the image by using the position designation means 3 such as a mouse or a keyboard (step A).
1).
【0052】指定された点(基準画素)の位置情報(x
座標、y座標)は、まず基準点位置記憶バッファ7に記
憶される(ステップA2)。そして基準点の位置情報
は、判定済画素位置記憶バッファ9にも記憶される(ス
テップA3)。The position information (x) of the designated point (reference pixel)
The coordinates (y-coordinate) are first stored in the reference point position storage buffer 7 (step A2). Then, the reference point position information is also stored in the determined pixel position storage buffer 9 (step A3).
【0053】次に基準画素の画素特徴量を、画素特徴量
抽出手段12によって抽出し、出力値を基準点特徴量記
憶バッファ6に入れる(ステップA4)。画素特徴量抽
出手段12の実現方法については作用の項ですでに述べ
た。例として、当該画素のRGB値を出力するもの、色
相、彩度、明度値を出力するもの、近傍画素に局所フィ
ルタを作用させるものなどがある。Next, the pixel feature amount of the reference pixel is extracted by the pixel feature amount extraction means 12, and the output value is stored in the reference point feature amount storage buffer 6 (step A4). The method of realizing the pixel feature amount extracting means 12 has already been described in the section of operation. Examples include those that output RGB values of the pixel, those that output hue, saturation, and lightness values, and those that apply a local filter to neighboring pixels.
【0054】図3を用いて画素特徴量抽出手段12の例
について説明する。図3においては、入力はすべて画素
のアドレス(画素の位置)であり、出力は画素特徴量で
ある。画素特徴量抽出手段30は、画素値抽出手段40
のみからなる最も単純な構成例であり、画素アドレスが
入力されると、画素値を返却するものである。An example of the pixel characteristic amount extracting means 12 will be described with reference to FIG. In FIG. 3, all inputs are pixel addresses (pixel positions) and outputs are pixel feature values. The pixel feature amount extracting unit 30 is provided with a pixel value extracting unit 40.
This is an example of the simplest configuration including only a pixel address. When a pixel address is input, a pixel value is returned.
【0055】画素特徴量抽出手段31は、画素値抽出手
段40と低周波濾過手段41からなる。低周波濾過手段
41は、図11の低周波濾過フィルタ72のような局所
フィルタを入力画素の近傍に作用させるものである。The pixel feature quantity extracting means 31 comprises a pixel value extracting means 40 and a low frequency filtering means 41. The low-frequency filtering unit 41 causes a local filter such as the low-frequency filtering filter 72 of FIG. 11 to act near the input pixel.
【0056】画素特徴量抽出手段32は、画素値抽出手
段40とエッジ強度抽出手段42からなる。エッジ強度
抽出手段42は、図11のエッジ強度抽出フィルタ74
のような局所フィルタを入力画素の近傍に作用させるも
のである。The pixel feature quantity extracting means 32 includes a pixel value extracting means 40 and an edge strength extracting means 42. The edge strength extraction means 42 is provided with an edge strength extraction filter 74 shown in FIG.
Is applied to the vicinity of the input pixel.
【0057】画素特徴量抽出手段33は、画素値抽出手
段40と高周波濾過手段43からなる。高周波濾過手段
43は、図11の高周波濾過フィルタ73のような局所
フィルタを入力画素の近傍に作用させるものである。The pixel characteristic amount extracting means 33 comprises a pixel value extracting means 40 and a high frequency filtering means 43. The high frequency filtering means 43 causes a local filter such as the high frequency filtering filter 73 of FIG. 11 to act near the input pixel.
【0058】画素特徴量抽出手段34は、画素値抽出手
段40と色変換手段44からなる。色変換手段44は、
RGB値をHSV(色相(H)、彩度(S)、明度
(V))値、あるいはXYZ値、L* a* b* 値、L*
u* v* 値に変換するモジュールである。HSV値への
変換方法については、文献[1]などにより公知であ
る。また、XYZ、L* a* b* 、L* u* v* 値への
変換方法についても、文献[3]などにより公知であ
る。The pixel characteristic amount extracting means 34 comprises a pixel value extracting means 40 and a color converting means 44. The color conversion means 44
RGB values are converted into HSV (hue (H), saturation (S), lightness (V)) values, XYZ values, L * a * b * values, L *
This is a module for converting to u * v * values. A method for converting to an HSV value is known from literature [1] and the like. Further, a method of converting the values into XYZ, L * a * b * , and L * u * v * values is also known from literature [3].
【0059】画素特徴量抽出手段35は、画素値抽出手
段40と色変換手段44と、低周波濾過手段41からな
り、低周波濾過作用の後に、色変換を行った値を特徴量
として出力する。The pixel characteristic amount extracting means 35 includes a pixel value extracting means 40, a color converting means 44, and a low frequency filtering means 41, and outputs a value subjected to color conversion after the low frequency filtering operation as a characteristic amount. .
【0060】[0060]
【0061】[0061]
【0062】[0062]
【0063】[0063]
【0064】[0064]
【0065】まずマスク画像メモリ5をFALSEで初
期化する(ステップB20)。次に判定済画素位置記憶
バッファ9より1つ判定済画素位置を読み込む(ステッ
プB21)。このとき判定済画素位置記憶バッファ9か
らは、読みだした位置情報項目を削除しなければならな
い。近傍画素探索手段8と、画素特徴量抽出手段12を
用いて得られた判定画素位置から、−X方向へ探索し、
対象領域の境界画素を見付け、その画素をスキャン画素
とする(ステップB22,B23)。First, the mask image memory 5 is initialized by FALSE (step B20). Next, one determined pixel position is read from the determined pixel position storage buffer 9 (step B21). At this time, the read position information item must be deleted from the determined pixel position storage buffer 9. A search is performed in the −X direction from the determination pixel position obtained by using the neighboring pixel search unit 8 and the pixel feature amount extraction unit 12,
A boundary pixel of the target area is found, and that pixel is set as a scan pixel (steps B22 and B23).
【0066】マスク画像メモリ5内のスキャン画素の位
置にTRUEをセットする(ステップB24)。近傍画
素探索手段8を用いて、スキャン画素の+Y方向の隣接
画素p1のアドレスを算出し、画素特徴量抽出手段12
を用いて画素特徴量を抽出する。その点の特徴量と基準
点特徴量記憶バッファ6の内容とを画像特徴量比較手段
11によって比較し、マスク可能かどうかを判断する
(ステップB6)。マスク可能と判断されればその隣接
画素の−X方向の隣接画素が、マスク可能かどうかを判
断し、−X方向の隣接画素がマスク不可ならば、p1を
判定済画素位置記憶バッファ9に入力する。スキャン画
素の−Y方向の隣接画素p2についても同様の処理を行
う。これらの処理を、判定済画素位置記憶バッファ9が
空になるまで続ける。TRUE is set at the position of the scan pixel in the mask image memory 5 (step B24). The address of the adjacent pixel p1 in the + Y direction of the scan pixel is calculated by using the neighboring pixel searching means 8, and the pixel characteristic amount extracting means 12 is used.
Is used to extract the pixel feature amount. The feature value at that point and the contents of the reference point feature value storage buffer 6 are compared by the image feature value comparison means 11 to determine whether masking is possible (step B6). If it is determined that masking is possible, it is determined whether the adjacent pixel in the −X direction of the adjacent pixel is maskable. If the adjacent pixel in the −X direction is not maskable, p1 is input to the determined pixel position storage buffer 9 I do. The same processing is performed for the adjacent pixel p2 in the −Y direction of the scan pixel. These processes are continued until the determined pixel position storage buffer 9 becomes empty.
【0067】図5と、図8を参照して本発明の第五、第
六の実施例の動作について説明する。[0067] and FIG. 5, a fifth of the present invention with reference to FIG. 8, the operation of the sixth embodiment will be described.
【0068】本実施例は、前段部分は第一の実施例と同
じであり、画素特徴量抽出手段として、1番目の特徴量
抽出手段23を用いる。一度マスク画像データが作成で
きた時点で、マスク作成結果判定手段22を用いて、マ
スク画像メモリの内容をチェックする。マスク作成結果
判定手段22は、領域抽出が良好な結果で終了したかど
うか、またはあらかじめ指定された画素特徴量をすべて
用いて領域抽出を実行したかどうかを判定する。マスク
作成結果判定手段22が、失敗と判断すれば、1番目の
画素特徴量抽出手段23を、2番目の画素特徴量抽出手
段24に置き換えてから、もう一度ステップA23から
処理を繰り返す。マスク作成結果判定手段22が、成功
と判断すれば、マスク画像メモリ5に保持されたデータ
は、ハードディスクなどのデータ出力装置10にセーブ
されて処理を終了する。This embodiment is the same as the first embodiment in the former part, and uses the first feature amount extracting means 23 as the pixel feature amount extracting means. Once the mask image data has been created, the contents of the mask image memory are checked using the mask creation result determination means 22. The mask creation result determination unit 22 determines whether or not the region extraction has been completed with a good result, or whether or not the region extraction has been performed using all the pixel feature amounts specified in advance. If the mask creation result determination unit 22 determines that the process has failed, the first pixel feature amount extraction unit 23 is replaced with the second pixel feature amount extraction unit 24, and the process is repeated from step A23 again. If the mask creation result determination means 22 determines success, the data held in the mask image memory 5 is saved in the data output device 10 such as a hard disk, and the process ends.
【0069】また次のマスクの画像データが作成できた
時点で、マスク作成結果判定手段22が、失敗と判断す
れば、今度は3番目の画素特徴量抽出手段を用いるとい
うふうに、成功と判断されるまで処理を繰り返す。When the image data of the next mask is created, if the mask creation result judging means 22 judges that the image data has failed, the mask making result judging means 22 judges that the third pixel feature quantity extracting means is used. Repeat until it is done.
【0070】マスク作成結果判定手段22の例として
は、TRUEの画素がn個以上かどうかを検査し、n個
以上ならば成功、n個未満ならば失敗とするものがあ
る。また、実施例内に実装されたN個の画素特徴量抽出
手段をすべて使用してしまった場合には、判定はすべて
成功とみなし、強制的に終了するものとする。As an example of the mask creation result judging means 22, there is a method in which it is checked whether or not the number of TRUE pixels is n or more. If all of the N pixel feature amount extraction units implemented in the embodiment have been used, all the determinations are regarded as successful, and the process is forcibly terminated.
【0071】図4と、図5を参照して本発明の第七の実
施例の動作について説明する。The operation of the seventh embodiment of the present invention will be described with reference to FIGS.
【0072】本実施例は、第一の実施例と第二の実施例
において、データを出力する直前に、マスク領域膨張手
段13と、マスク領域収縮手段14を用いてマスク画像
メモリ5に保持されている領域データに対して膨張収縮
処理を行うものである。処理例としては、マスクデータ
がTRUEの領域に対してはじめに膨張処理をm回行っ
て、凹凸や小さい穴などを除去した後に、収縮処理をm
回行う(mは1以上の任意の整数)。In this embodiment, in the first embodiment and the second embodiment, immediately before data is output, the data is held in the mask image memory 5 using the mask area expanding means 13 and the mask area reducing means 14. The expansion / contraction processing is performed on the area data. As an example of the processing, the mask data is first subjected to the expansion processing m times in the region of TRUE, and after removing the irregularities and small holes, the contraction processing is performed m times.
(M is an arbitrary integer of 1 or more).
【0073】図6を参照して本発明の第八の実施例の動
作について説明する。本実施例は、前記実施例において
マスク画像データを出力する前に、第二のマスク画像メ
モリ26に一度データを保持する(ステップC3)。さ
らに、マスク画像メモリ5のデータを領域抽出結果とし
てモニタ2に表示し、オペレータの次の指示を待つ(ス
テップC4,C5)。そして、オペレータによって、も
う一度領域抽出することが指示されれば、領域抽出処理
C1に戻って処理を続行する。The operation of the eighth embodiment of the present invention will be described with reference to FIG. In this embodiment, before outputting the mask image data in the above embodiment, the data is once held in the second mask image memory 26 (step C3). Further, the data of the mask image memory 5 is displayed on the monitor 2 as a region extraction result, and the next instruction from the operator is waited (steps C4 and C5). If the operator instructs to perform region extraction again, the process returns to the region extraction process C1 to continue the process.
【0074】そして、マスク画像メモリ5にある新しい
領域抽出結果は、マスク領域統合処理27によって、第
二の画像メモリ26に保持されたデータと統合される
(ステップC2)。マスク領域統合処理27の例として
は、各画素について、どちらかがTRUEならばTRU
Eとするような処理を行えば良い。仮にTRUE=1,
FALSE=0とすれば、この処理は両者のORをとる
ことと等価である。Then, the new area extraction result in the mask image memory 5 is integrated with the data held in the second image memory 26 by the mask area integration processing 27 (step C2). As an example of the mask area integration process 27, for each pixel, if either is TRUE, the TRU
What is necessary is just to perform the process which sets it as E. If TRUE = 1,
If FALSE = 0, this processing is equivalent to taking the OR of both.
【0075】統合されたデータはマスク画像メモリ5に
保持されると同時に再び第二のマスク画像メモリ26に
も転送される。そして再度モニタ2に結果が表示され、
オペレータの指示を待つ。オペレータによって、終了指
示がでたところで、データ出力装置10に、マスク画像
データ5の内容を出力して終了する(ステップC7)。The integrated data is held in the mask image memory 5 and simultaneously transferred to the second mask image memory 26 again. Then, the result is displayed on the monitor 2 again,
Wait for operator's instruction. When the end instruction is given by the operator, the contents of the mask image data 5 are output to the data output device 10 and the operation ends (step C7).
【0076】[0076]
【発明の効果】以上説明したように、本発明の画像の領
域抽出装置は、オペレータが指定した基準点を含む連結
領域(画素特徴量がほぼ等しい隣接画素の集合で構成さ
れる領域)のみを抽出できるという効果がある。これに
より、図12の対象領域102を指定しても、対象領域
103が誤って抽出されるという問題は発生しない。As described above, the image region extracting apparatus according to the present invention is capable of extracting only a connected region including a reference point specified by an operator (a region formed by a set of adjacent pixels having substantially the same pixel feature amount). There is an effect that it can be extracted. Thereby, even if the target area 102 in FIG. 12 is specified, the problem that the target area 103 is erroneously extracted does not occur.
【0077】また、本装置は連結領域のみを処理するた
め、従来の装置に比べ処理速度が向上するという効果が
ある。Further, since the present apparatus processes only the connected area, there is an effect that the processing speed is improved as compared with the conventional apparatus.
【0078】また、画素特徴量に低周波濾過フィルタを
用いた装置においては、図12の対象領域104のよう
なパターンで構成された領域をも抽出することができる
という効果がある。Further, an apparatus using a low-frequency filtering filter for the pixel characteristic amount has an effect that an area constituted by a pattern such as the target area 104 in FIG. 12 can be extracted.
【図1】本発明の画像の領域抽出装置の実施例を示すブ
ロック図。FIG. 1 is a block diagram showing an embodiment of an image region extracting apparatus according to the present invention.
【図2】本発明の画像の領域抽出装置の実施例を示すブ
ロック図。FIG. 2 is a block diagram showing an embodiment of an image region extracting apparatus according to the present invention.
【図3】本発明の画像の領域抽出装置の中の画素特徴量
抽出手段の実施例を示すブロック図。FIG. 3 is a block diagram showing an embodiment of a pixel characteristic amount extracting means in the image region extracting apparatus of the present invention.
【図4】本発明の画像の領域抽出方法の流れ図。FIG. 4 is a flowchart of an image region extraction method according to the present invention.
【図5】本発明の画像の領域抽出方法の第二の流れ図。FIG. 5 is a second flowchart of an image region extraction method according to the present invention.
【図6】本発明の画像の領域抽出方法の第三の流れ図。FIG. 6 is a third flowchart of an image region extraction method according to the present invention.
【図7】画像の領域抽出方法の中の連結領域抽出処理に
関連する技術の流れ図。FIG. 7 illustrates a connected region extraction process in the image region extraction method.
Flow chart of related technology .
【図8】本発明の画像の領域抽出方法の中の連結領域抽
出処理の流れ図。FIG. 8 is a flowchart of a connected region extraction process in the image region extraction method of the present invention.
【図9】連結領域抽出処理に関連する技術の説明図。FIG. 9 is an explanatory diagram of a technique related to a connected region extraction process.
【図10】連結領域抽出処理の説明図。FIG. 10 is an explanatory diagram of a connected region extraction process .
【図11】局所フィルタの説明図。FIG. 11 is an explanatory diagram of a local filter.
【図12】入力画像の例。FIG. 12 is an example of an input image.
【図13】入力画像の例。FIG. 13 shows an example of an input image.
【図14】従来の画像の領域抽出装置の実施例を示すブ
ロック図。FIG. 14 is a block diagram showing an embodiment of a conventional image region extracting apparatus.
【図15】従来の画像の領域抽出方法の流れ図。FIG. 15 is a flowchart of a conventional image region extraction method.
1 画像入力装置 2 モニタ 3 位置指定手段 4 入力画像メモリ 5 マスク画像メモリ 6 基準点特徴量記憶バッファ 7 基準点位置記憶バッファ 8 近傍画素探索手段 9 判定済画素記憶バッファ 10 データ出力装置 11 画素特徴量比較手段 12 画素特徴量抽出手段 13 マスク領域膨張手段 14 マスク領域収縮手段 15 CPU 21 複数の画素特徴量抽出手段 22 マスク作成結果判定手段 23 1番目の画素特徴量抽出手段 24 2番目の画素特徴量抽出手段 25 N番目の画素特徴量抽出手段 26 第二のマスク画像メモリ 27 マスク領域統合手段 30 画素特徴量抽出手段 31 画素特徴量抽出手段 32 画素特徴量抽出手段 33 画素特徴量抽出手段 34 画素特徴量抽出手段 35 画素特徴量抽出手段 40 画素値抽出手段 41 低周波濾過手段 42 エッジ強度抽出手段 43 高周波濾過手段 44 色変換手段 50 拡大画像 51 対象領域 52 対象領域の輪郭 53 基準画素 54 第一の判定済画素位置 55 第二の判定済画素位置 60 拡大画像 61 対象領域 62 対象領域の輪郭 63 基準画素 64 第一の判定済画素位置 65 第二の判定済画素位置 66 第三の判定済画素位置 70 局所フィルタ 71 注目画素位置 72 低周波濾過フィルタ 73 高周波濾過フィルタ 74 エッジ強度抽出フィルタ 100 入力画像例 101 対象領域 102 対象領域 103 対象領域 104 対象領域 105 1番色画素 106 2番色画素 110 入力画像例 111 A領域 112 B領域 113 C領域 114 D領域 115 E領域 116 対象領域 201 画像入力装置 202 モニタ 203 しきい値処理手段 204 位置指定手段 205 入力画像メモリ 206 基準画素置バッファ 207 マスク画像メモリ 208 出力装置 REFERENCE SIGNS LIST 1 image input device 2 monitor 3 position designation means 4 input image memory 5 mask image memory 6 reference point feature amount storage buffer 7 reference point position storage buffer 8 neighboring pixel search means 9 determined pixel storage buffer 10 data output device 11 pixel feature amount Comparison means 12 Pixel feature quantity extraction means 13 Mask area expansion means 14 Mask area reduction means 15 CPU 21 Multiple pixel feature quantity extraction means 22 Mask creation result determination means 23 First pixel feature quantity extraction means 24 Second pixel feature quantity Extraction means 25 N-th pixel feature quantity extraction means 26 Second mask image memory 27 Mask area integration means 30 Pixel feature quantity extraction means 31 Pixel feature quantity extraction means 32 Pixel feature quantity extraction means 33 Pixel feature quantity extraction means 34 Pixel features Amount extraction means 35 Pixel feature extraction means 40 Pixel value extraction means 41 Low Wave filtering means 42 Edge strength extracting means 43 High-frequency filtering means 44 Color conversion means 50 Enlarged image 51 Target area 52 Target area outline 53 Reference pixel 54 First determined pixel position 55 Second determined pixel position 60 Enlarged image 61 Target area 62 Outline of target area 63 Reference pixel 64 First determined pixel position 65 Second determined pixel position 66 Third determined pixel position 70 Local filter 71 Target pixel position 72 Low frequency filter 73 High frequency filter 74 Edge intensity extraction filter 100 Input image example 101 Target area 102 Target area 103 Target area 104 Target area 105 1st color pixel 106 2nd color pixel 110 Input image example 111 A area 112 B area 113 C area 114 D area 115 E area 116 Target area 201 Image input device 202 Monitor 203 thresholding means 204 position specifying means 205 the input image memory 206 reference pixel location buffer 207 mask image memory 208 output device
Claims (10)
ステップと、 任意の画素の特徴量を抽出する1つ以上の異なる画素特
徴量抽出ステップと、マスク画像を記憶するメモリ(以下、マスク画像メモリ
と呼ぶ)をFALSEで初期化するステップと、 判定済画素位置を記憶するバッファ(以下、判定済画素
位置記憶バッファと呼ぶ)から判定済画素の位置を読み
込むステップ(ステップB21)と、 判定済画素から−X方向(ここでは、左から右へ向かう
方向を+X方向とする)へ探索し対象領域の境界画素を
求めるステップ(ステップB22)と、 境界画素をスキャン画素として記憶するステップ(ステ
ップB23)と、 マスク画像メモリ上のスキャン画素の位置にTRUEを
セットするステップと(ステップB24)、 スキャン画素の+Y方向(ここでは、下から上へ向かう
方向を+Y方向とする)の隣接画素(以下、画素P1と
呼ぶ)について、該画素P1の画素特徴量と基準画素の
画素特徴量との差が所定のしきい値以下(以下、マスク
可能と呼ぶ)であり、かつ、該画素P1の−X方向の隣
接画素がマスク可能でない場合に、該画素P1を判定済
画素位置記憶バッファに記憶するステップ(ステップB
25、ステップB26)と、 スキャン画素の−Y方向の隣接画素(以下、画素P2と
呼ぶ)について、該画素P2がマスク可能であり、か
つ、該画素P2の−X方向の隣接画素がマスク可能でな
い場合に、該画素P2を判定済画素位置記憶バッファに
記憶するステップ(ステップB27、ステップB28)
と、 スキャン画素の+X方向の隣接画素がマスク可能かどう
かを判定するステップ(ステップB29)と、 ステップB29でマスク可能と判定された場合には、ス
キャン画素の位置を+X方向に1画素移動させ、ステッ
プB24からステップB29までを繰り返すステップ
(ステップB30)と、 判定済画素位置記憶バッファにまだ読み出していない判
定済画素があるかどう かを調べ、まだ読み出していない
判定済画素がある場合には、ステップB21からステッ
プB30までを繰り返すステップ(ステップB31)と
を有することを特徴とする 画像の領域抽出方法。1. A step of designating a reference pixel in a target area to be extracted, one or more different pixel feature extraction steps of extracting feature of an arbitrary pixel, and a memory for storing a mask image (hereinafter referred to as a mask). Image memory
) With FALSE, and a buffer for storing the determined pixel position (hereinafter, determined pixel
Read the position of the determined pixel from the
(Step B21), and from the determined pixel in the −X direction (here, from left to right).
Direction is defined as + X direction)
Determining (step B22) and storing the boundary pixels as scan pixels (step B22).
B23) and TRUE at the position of the scan pixel on the mask image memory.
Setting step (step B24) and the + Y direction of the scan pixel (here, from the bottom to the top)
The direction is defined as + Y direction) and adjacent pixels (hereinafter referred to as pixel P1).
), The pixel feature amount of the pixel P1 and the reference pixel
The difference from the pixel feature is equal to or less than a predetermined threshold
And is adjacent to the pixel P1 in the -X direction.
If the contact pixel is not maskable, the pixel P1 has been determined
Step of storing in pixel position storage buffer (step B
25, step B26) and a pixel adjacent to the scan pixel in the −Y direction (hereinafter, pixel P2 and
Pixel), the pixel P2 can be masked,
In addition, a pixel adjacent to the pixel P2 in the −X direction cannot be masked.
The pixel P2 is stored in the determined pixel position storage buffer.
Step of storing (Step B27, Step B28)
And whether the adjacent pixel in the + X direction of the scan pixel can be masked.
(Step B29), and if it is determined in Step B29 that masking is possible,
Move the position of the can pixel by one pixel in the + X direction, and
Step from Step B24 to Step B29
(Step B30) and a judgment that the data has not yet been read out to the determined pixel position storage buffer.
Check if there is a fixed pixel and have not read it out yet
If there is a determined pixel, the process proceeds from step B21.
Steps to repeat step B30 (step B31)
A method for extracting an area of an image, comprising:
ステップと、任意の画素の特徴量を抽出する1つ以上の
異なる画素特徴量抽出ステップと、マスク画像を記憶するメモリ(以下、マスク画像メモリ
と呼ぶ)をFALSEで初期化するステップと、 判定済画素位置を記憶するバッファ(以下、判定済画素
位置記憶バッファと呼ぶ)から判定済画素の位置を読み
込むステップ(ステップB21)と、 判定済画素から−X方向(ここでは、左から右へ向かう
方向を+X方向とする)へ探索し対象領域の境界画素を
求めるステップ(ステップB22)と、 境界画素をスキャン画素として記憶するステップ(ステ
ップB23)と、 マスク画像メモリ上のスキャン画素の位置にTRUEを
セットするステップと(ステップB24)、 スキャン画素の+Y方向(ここでは、下から上へ向かう
方向を+Y方向とする)の隣接画素(以下、画素P1と
呼ぶ)について、該画素P1の画素特徴量と基準画素の
画素特徴量との差が所定のしきい値以下(以下、マスク
可能と呼ぶ)であり、かつ、該画素P1の−X方向の隣
接画素がマスク可能でない場合に、該画素P1を判定済
画素位置記憶バッファに記憶するステップ(ステップB
25、ステップB26)と、 スキャン画素の−Y方向の隣接画素(以下、画素P2と
呼ぶ)について、該画素P2がマスク可能であり、か
つ、該画素P2の−X方向の隣接画素がマスク可能でな
い場合に、該画素P2を判定済画素位置記憶バッファに
記憶するステップ(ステップB27、ステップB28)
と、 スキャン画素の+X方向の隣接画素がマスク可能かどう
かを判定するステップ(ステップB29)と、 ステップB29でマスク可能と判定された場合には、ス
キャン画素の位置を+X方向に1画素移動させ、ステッ
プB24からステップB29までを繰り返すステップ
(ステップB30)と、 判定済画素位置記憶バッファにまだ読み出していない判
定済画素があるかどうかを調べ、まだ読み出していない
判定済画素がある場合には、ステップB21からステッ
プB30までを繰り返すステップ(ステップB31)
と、 複数の基準画素によって抽出され対象領域を統合するス
テップとを持った、画像の領域抽出方法。2. A step of designating a reference pixel in a target area to be extracted, one or more different pixel feature extraction steps of extracting a feature of an arbitrary pixel, and a memory storing a mask image (hereinafter referred to as a mask). Image memory
) With FALSE, and a buffer for storing the determined pixel position (hereinafter, determined pixel
Read the position of the determined pixel from the
(Step B21), and from the determined pixel in the −X direction (here, from left to right).
Direction is defined as + X direction)
Determining (step B22) and storing the boundary pixels as scan pixels (step B22).
B23) and TRUE at the position of the scan pixel on the mask image memory.
Setting step (step B24) and the + Y direction of the scan pixel (here, from the bottom to the top)
The direction is defined as + Y direction) and adjacent pixels (hereinafter referred to as pixel P1).
), The pixel feature amount of the pixel P1 and the reference pixel
The difference from the pixel feature is equal to or less than a predetermined threshold
And is adjacent to the pixel P1 in the -X direction.
If the contact pixel is not maskable, the pixel P1 has been determined
Step of storing in pixel position storage buffer (step B
25, step B26) and a pixel adjacent to the scan pixel in the −Y direction (hereinafter, pixel P2 and
Pixel), the pixel P2 can be masked,
In addition, a pixel adjacent to the pixel P2 in the −X direction cannot be masked.
The pixel P2 is stored in the determined pixel position storage buffer.
Step of storing (Step B27, Step B28)
And whether the adjacent pixel in the + X direction of the scan pixel can be masked.
(Step B29), and if it is determined in Step B29 that masking is possible,
Move the position of the can pixel by one pixel in the + X direction, and
Step from Step B24 to Step B29
(Step B30) and a judgment that the data has not yet been read out to the determined pixel position storage buffer.
Check if there is a fixed pixel and have not read it out yet
If there is a determined pixel, the process proceeds from step B21.
Step to repeat Step B30 (Step B31)
And a step of integrating target regions extracted by a plurality of reference pixels.
と、画像データ及び領域抽出結果を表示するモニタと、
抽出する対象領域を指定する位置指定手段と、領域抽出
の基準点の画素特徴量を保持する基準点特徴量記憶バッ
ファと、領域抽出の基準点の位置を保持する基準点位置
記憶バッファと、ある画素の隣接画素のアドレスを探索
する近傍画素探索手段と、マスクすべき画素を記憶する
判定済画素記憶バッファと、2つの画素の特徴量を比較
する画素特徴量比較手段と、ある画素の特徴量を算出す
る画素特徴量抽出手段と、領域抽出結果を保持するマス
ク画像メモリとを備え、前記近傍画素探索手段が、 前記マスク画像メモリをFALSEで初期化し、 前記判定済画素記憶バッファから判定済画素の位置を読
み込み、 判定済画素から−X方向(ここでは、左から右へ向かう
方向を+X方向とする)へ探索し対象領域の境界画素を
求め、 境界画素をスキャン画素として記憶し、 前記マスク画像メモリ上のスキャン画素の位置にTRU
Eをセットし、 スキャン画素の+Y方向(ここでは、下から上へ向かう
方向を+Y方向とする)の隣接画素(以下、画素P1と
呼ぶ)について、該画素P1の画素特徴量と基準画素の
画素特徴量との差が所定のしきい値以下(以下、マスク
可能と呼ぶ)であり、かつ、該画素P1の−X方向の隣
接画素がマスク可能でない場合に、該画素P1を前記判
定済画素記憶バッファに記憶し、 スキャン画素の−Y方向の隣接画素(以下、画素P2と
呼ぶ)について、該画素P2がマスク可能であり、か
つ、該画素P2の−X方向の隣接画素がマスク可能でな
い場合に、該画素P2を前記判定済画素位置記憶バッフ
ァに記憶し、 スキャン画素の+X方向の隣接画素がマスク可能かどう
かを判定し、 マスク可能と判定された場合には、スキャン画素の位置
を+X方向に1画素移動させて、新たなスキャン画素に
ついても同様の処理を繰り返し、 判定済画素位置記憶バッファにまだ読み出していない判
定済画素があるかどうかを調べ、まだ読み出していない
判定済画素がある場合には、当該判定済画素についても
読み出して同様の処理を繰り返すこと を特徴とする画像
の領域抽出装置。3. An input image memory for holding input image data, a monitor for displaying image data and an area extraction result,
There are position specifying means for specifying a target region to be extracted, a reference point feature amount storage buffer for holding a pixel feature amount of a reference point for area extraction, and a reference point position storage buffer for holding a position of the reference point for area extraction. A neighboring pixel searching means for searching for an address of a pixel adjacent to the pixel, a determined pixel storage buffer for storing a pixel to be masked, a pixel feature comparing means for comparing the feature of two pixels, and a feature of a certain pixel And a mask image memory for holding a region extraction result , wherein the neighboring pixel search means initializes the mask image memory with FALSE, and stores a determined pixel from the determined pixel storage buffer. Read the position of
From the determined pixel, in the −X direction (here, from left to right
Direction is defined as + X direction)
Then, the boundary pixel is stored as a scan pixel, and the TRU is stored at the position of the scan pixel on the mask image memory.
E is set and the scan pixel is set in the + Y direction (here, from the bottom to the top).
The direction is defined as + Y direction) and adjacent pixels (hereinafter referred to as pixel P1).
), The pixel feature amount of the pixel P1 and the reference pixel
The difference from the pixel feature is equal to or less than a predetermined threshold
And is adjacent to the pixel P1 in the -X direction.
If the contact pixel is not maskable, the pixel P1 is determined as described above.
The pixel is stored in a fixed pixel storage buffer, and a pixel adjacent to the scan pixel in the −Y direction (hereinafter, pixel P2
Pixel), the pixel P2 can be masked,
In addition, a pixel adjacent to the pixel P2 in the −X direction cannot be masked.
The pixel P2 is stored in the determined pixel position storage buffer.
And whether the adjacent pixel in the + X direction of the scan pixel can be masked.
And if it is determined that masking is possible, the position of the scan pixel
Is moved by one pixel in the + X direction to create a new scan pixel.
The same processing is repeated for the determination that the pixel position has not yet been read out to the determined pixel position storage buffer.
Check if there is a fixed pixel and have not read it out yet
If there is a determined pixel, the determined pixel is also
An image region extracting apparatus, which reads out and repeats the same processing .
する画素値抽出手段を備えたことを特徴とする請求項3
記載の画像の領域抽出装置。4. The apparatus according to claim 3, wherein said pixel characteristic amount extracting means includes a pixel value extracting means for extracting a pixel value.
A region extraction device for the described image.
する画素値抽出手段と、色変換を行う色変換手段とを備
えたことを特徴とする請求項3記載の画像の領域抽出装
置。5. The image area extracting apparatus according to claim 3, wherein said pixel characteristic amount extracting means includes a pixel value extracting means for extracting a pixel value and a color converting means for performing a color conversion. .
手段を備えたことを特徴とする請求項4又は5記載の記
載の画像の領域抽出装置。6. The image region extracting apparatus according to claim 4, wherein said pixel characteristic amount extracting means further comprises a low frequency filtering means.
量抽出手段と、1種類の画素特徴量を用いて抽出された
領域を判定するマスク作成結果判定手段とを備えたこと
を特徴とする請求項3記載の画像の領域抽出装置。7. An image processing apparatus comprising: N (N is 2 or more) different pixel feature amount extraction means; and a mask creation result determination means for determining an area extracted using one type of pixel feature amount. The image region extracting apparatus according to claim 3, wherein:
を抽出する画素値抽出手段を有する第1の画素特徴量抽
出手段と、前記画素値抽出手段と低周波濾過手段の両方
を有する第2の画素特徴量抽出手段と、1種類の画素特
徴量を用いて抽出された領域を判定するマスク作成結果
判定手段とを備えたことを特徴とする請求項3記載の画
像の領域抽出装置。8. The image processing apparatus according to claim 1, further comprising a first pixel characteristic amount extracting unit having a pixel value extracting unit for extracting a pixel value, and both said pixel value extracting unit and a low frequency filtering unit, in place of said pixel characteristic amount extracting unit. 4. The image region extracting apparatus according to claim 3, further comprising: a second pixel feature amount extracting unit; and a mask creation result determining unit that determines an area extracted using one type of pixel feature amount. .
と、領域を1画素分細めるマスク領域収縮手段とを備え
たことを特徴とする請求項3,4,5,6,7又は8記
載の画像の領域抽出装置。9. The apparatus according to claim 3, further comprising mask area expanding means for increasing the area by one pixel, and mask area reducing means for reducing the area by one pixel. A region extraction device for the described image.
のマスク画像メモリと、マスク画像メモリと第二のマス
ク画像メモリの内容を統合するマスク領域統合手段とを
備えたことを特徴とする請求項3,4,5,6,7又は
8記載の画像の領域抽出装置。10. A system according to claim 1, further comprising a second mask image memory for holding a previous region extraction result, and a mask region integrating means for integrating the contents of the mask image memory and the second mask image memory. 9. The image region extracting apparatus according to claim 3, 4, 5, 6, 7, or 8.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7296570A JP2924744B2 (en) | 1995-11-15 | 1995-11-15 | Image region extraction method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7296570A JP2924744B2 (en) | 1995-11-15 | 1995-11-15 | Image region extraction method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH09138854A JPH09138854A (en) | 1997-05-27 |
| JP2924744B2 true JP2924744B2 (en) | 1999-07-26 |
Family
ID=17835257
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP7296570A Expired - Lifetime JP2924744B2 (en) | 1995-11-15 | 1995-11-15 | Image region extraction method and device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2924744B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4046016B2 (en) * | 2003-06-04 | 2008-02-13 | セイコーエプソン株式会社 | Image data processing apparatus and image data processing method |
| US20080144124A1 (en) * | 2006-10-13 | 2008-06-19 | Ramin Samadani | Auxiliary information for reconstructing digital images processed through print-scan channels |
| JP5057480B2 (en) * | 2009-06-30 | 2012-10-24 | キヤノンマーケティングジャパン株式会社 | Image forming apparatus, image forming method, program, and storage medium storing program |
| WO2013161155A1 (en) * | 2012-04-23 | 2013-10-31 | 日本電気株式会社 | Image measurement device, image measurement method, and image-measuring program |
-
1995
- 1995-11-15 JP JP7296570A patent/JP2924744B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH09138854A (en) | 1997-05-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6714689B1 (en) | Image synthesizing method | |
| US6803920B2 (en) | Method and apparatus for digital image segmentation using an iterative method | |
| JP3684017B2 (en) | Image processing apparatus and method | |
| JPH1023452A (en) | Image extraction apparatus and method | |
| JP2002503894A (en) | Noise removal algorithm based on new edge detection | |
| JPH05250472A (en) | Method and apparatus for preparing a fine mask of boundaries on an image of an area of interest to be separated from the rest of the image | |
| JP3814353B2 (en) | Image segmentation method and image segmentation apparatus | |
| JP2924744B2 (en) | Image region extraction method and device | |
| JPH10228536A (en) | Image processing method | |
| JPH0320882A (en) | Method for displaying, extracting, and segmenting interested area | |
| US5920648A (en) | Image processing method and apparatus which replace horizontal and vertical vectors with an inclined vector | |
| JPH10187972A (en) | Discriminating method for light source color | |
| JP2936599B2 (en) | Color image processing equipment | |
| JP2001209808A (en) | System and method for extracting object, and storage medium with stored program for object extraction | |
| JPH07334648A (en) | Image processing method and apparatus thereof | |
| JPH10232935A (en) | Image processing apparatus and method | |
| JP2002077631A (en) | Image compression device, image decompression device, method thereof, and storage medium | |
| JP3126462B2 (en) | Boundary extraction method and apparatus | |
| JP2001053977A (en) | Color picture contour line extracting device | |
| JPH11296672A (en) | Image color information extraction method | |
| JP4004217B2 (en) | Image processing device | |
| JPH064665A (en) | Boundary extraction method and apparatus | |
| JP3297964B2 (en) | Image processing method and apparatus | |
| JP3330803B2 (en) | Image data processing method | |
| JP2804299B2 (en) | Cutout mask making system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19990406 |