JPH03174670A - Image processor - Google Patents
Image processorInfo
- Publication number
- JPH03174670A JPH03174670A JP33023589A JP33023589A JPH03174670A JP H03174670 A JPH03174670 A JP H03174670A JP 33023589 A JP33023589 A JP 33023589A JP 33023589 A JP33023589 A JP 33023589A JP H03174670 A JPH03174670 A JP H03174670A
- Authority
- JP
- Japan
- Prior art keywords
- label
- pixel
- picture element
- boundary
- pixels
- 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
Links
- 238000012545 processing Methods 0.000 claims abstract description 31
- 238000001514 detection method Methods 0.000 claims abstract description 10
- 238000002372 labelling Methods 0.000 claims description 8
- 238000000034 method Methods 0.000 description 24
- 238000010586 diagram Methods 0.000 description 11
- 239000003086 colorant Substances 0.000 description 2
- 239000006185 dispersion Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000004043 responsiveness Effects 0.000 description 2
- 244000248349 Citrus limon Species 0.000 description 1
- 235000005979 Citrus limon Nutrition 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は、デジタルで表現された写真やビデオ画像など
の画像中の任意の対象の境界を検出する画像処理装置に
関し、検出した対象の境界の情報に基づいて、その対象
の輪郭画像を得たり、対象のマスク画像を求めて対象の
切り抜き、変形、色の修正・変更などの種々の画像処理
に利用することのできるものである。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an image processing device that detects the boundaries of an arbitrary object in an image such as a digitally expressed photograph or video image. Based on this information, it is possible to obtain a contour image of the object or obtain a mask image of the object, which can be used for various image processing such as cropping, deforming, and correcting/changing the color of the object.
(従来の技術)
デジタルで表現された写真やビデオ画像などから、その
画像の一部である対象物を切り出す操作は、画像編集な
どを行う際に頻繁に用いられる重要なものである。(Prior Art) The operation of cutting out an object that is part of a digitally expressed photograph or video image is an important operation that is frequently used when performing image editing.
従来の方式としては、対象部分を拡大表示して直線・曲
線などで周囲をなぞって切り出すものがある。しかしこ
の方式では大きな対象物や複雑な対象物を切り出す場合
などでは、非常に手間がかかる。Conventional methods include enlarging the target area and cutting out the area by tracing the surrounding area using straight lines, curved lines, etc. However, this method is extremely time-consuming when cutting out large or complex objects.
そこで、この手間を削減する方法として対象中に存在す
る色の範囲を指定するもの(例えば、特開昭62−19
8968号公報参照)、微ゲ処理などによってエツジ抽
出を行うもの(例えば、特開昭62−219179号公
報参照)などが提案されている。Therefore, as a method to reduce this effort, there is a method of specifying the range of colors that exist in the target (for example,
8968 (see Japanese Patent Application Laid-open No. 8968), and one in which edges are extracted by micro-edge processing (for example, see Japanese Patent Laid-Open No. 62-219179).
(発明が解決しようとする課題)
しかし、前者の方式は、はぼ均一な色で構成された対象
などには有効であるが、その内部に光の反射やテクスチ
ャなどによる色の変化が存在する一般の対象には適用で
きない。(Problem to be solved by the invention) However, although the former method is effective for objects that are composed of fairly uniform colors, there are variations in color within the object due to light reflection, texture, etc. Not applicable to general subjects.
また、後者の方法では、抽出されたエツジが閉曲線にな
らないことが多く、またノイズやテクスチャも抽出して
しまうために非常に困難な後処理が必要である。Furthermore, in the latter method, the extracted edges often do not become closed curves, and noise and texture are also extracted, so very difficult post-processing is required.
本発明は、このような従来技術の欠点を解決し、光の反
射、テクスチャ、ノイズなどの存在する一般的な画像か
ら任意に指定した対象の画像の境界やマスク画像を、簡
単かつ迅速に検出することのできる画像処理装置を提供
することを目的とするものである。The present invention solves the shortcomings of the conventional technology, and easily and quickly detects the boundary or mask image of an arbitrarily specified target image from a general image that contains light reflection, texture, noise, etc. The object of the present invention is to provide an image processing device that can perform the following steps.
(課題を解決するための手段)
本発明の画像処理装置は、第1図に示すように、少なく
とも対象の境界を含む指示された領域にラベルを付与す
るラベル付与手段13と、前記指示された領域から画素
を選択する注目画素選択手段14と、選択された注目画
素のラベル値(62)と特徴(例えば、画素値[74,
113])および注目画素の近傍の画素群のラベル値と
特徴に基づいて注目画素のラベル値を変更するラベル値
変更手段15と、予め決められた条件が成立したかどう
かを見てラベル値変更を終了させる終了判定手段16と
、ラベル画像から特定の条件を満たすラベルを持つ画素
を前記対象の境界、対象の内部または外部に属する画素
として検出する画素検出手段17とを備えている。(Means for Solving the Problems) As shown in FIG. A pixel of interest selection means 14 selects a pixel from the region, and a label value (62) and a feature (for example, pixel value [74,
113]) and a label value changing means 15 for changing the label value of the pixel of interest based on the label value and characteristics of a group of pixels in the vicinity of the pixel of interest; and a pixel detection means 17 that detects pixels having a label that satisfies a specific condition from the label image as pixels belonging to the boundary of the object, inside or outside the object.
(作 用)
本発明の基本的なフローを第2図に示す。以下、簡単に
本発明の基本的動作を説明する。(Function) The basic flow of the present invention is shown in FIG. The basic operation of the present invention will be briefly explained below.
■ 各画素に、ラベル付与手段13によりラベルを付与
する。ラベル値の付与の仕方は、指示領域中の画素につ
いては特に制限はない。指示領域以外の画素のラベルに
ついては、指示領域よりも外側の画素と内側の画素でラ
ベル値に差があり、外側の画素同士や内側の画素同士の
ラベル値には、あまり差が生じないようにすればよい。(2) A label is attached to each pixel by the label attaching means 13. There are no particular restrictions on how label values are assigned to pixels in the designated area. Regarding the labels of pixels outside the designated area, there is a difference in label value between pixels outside and inside the designated area, and there is not much difference in label values between pixels on the outside or between pixels inside the designated area. Just do it.
例えば、第6図(a)のように付与する。For example, it is provided as shown in FIG. 6(a).
また、ラベルは指示領域のみに付与するようにすること
もでき、この場合はラベルは指示領域の外側と内側で値
に差があればよく、その値やステップには特に制限はな
い。例えば、第10図(a)のように、内側に向かって
単調に増加するように付与する。Further, the label can be attached only to the designated area, and in this case, the label only needs to have a difference in value between the outside and inside of the designated area, and there are no particular restrictions on the value or step. For example, as shown in FIG. 10(a), it is applied so that it increases monotonically toward the inside.
■ 注目画素選択手段14を用いて、ステップ■の処理
を行う画素(以下、これを注目画素と称す)を指示領域
内から任意に選ぶ。(2) Using the pixel of interest selection means 14, a pixel (hereinafter referred to as a pixel of interest) to be processed in step (2) is arbitrarily selected from within the designated area.
■ ステップ■で選択された注目画素の特徴(画素値)
、ラベル値およびその近傍画素の特徴(画素値) 、ラ
ベル値に基づいて、ラベル値変更手段15により注目画
素のラベルを更新する。この更新処理は、注目画素のラ
ベル値が、注目画素と近い特徴を持つ近傍画素のラベル
値に近くなるように行う。■ Features (pixel value) of the pixel of interest selected in step ■
, the label value and the characteristics (pixel value) of its neighboring pixels. Based on the label value, the label value changing means 15 updates the label of the pixel of interest. This updating process is performed so that the label value of the pixel of interest becomes close to the label value of a neighboring pixel having characteristics similar to the pixel of interest.
■ 終了判定手段16により、予め設定された終了の条
件が満足されたかを判定する。もし満たされていないな
らばステップ■に移る。(2) The termination determining means 16 determines whether preset conditions for termination are satisfied. If it is not satisfied, move to step ■.
■ 画素検出手段17を用いて、処理の終了したラベル
画像から特定の条件を満たす画素を検出することにより
、対象の境界検出またはマスク作成を行う。(2) By using the pixel detection means 17 to detect pixels that satisfy a specific condition from the processed label image, the boundary of the object is detected or a mask is created.
なお、第1図において、呵御部11は、装置全体の制御
を行うものであり、また記憶部12は画像やラベル値な
どを記憶するものである。In FIG. 1, a control section 11 controls the entire apparatus, and a storage section 12 stores images, label values, and the like.
(実施例)
以下、2つの実施例により本発明をさらに詳細に説明す
る。(Examples) Hereinafter, the present invention will be explained in further detail using two examples.
第1の実施例
第3図は本発明の一実施例としての画像の切り抜き処理
装置のブロック構成図であり、ラベルを指示領域の内外
共に付与する例を示すものである。First Embodiment FIG. 3 is a block diagram of an image cutout processing apparatus as an embodiment of the present invention, and shows an example in which a label is attached both inside and outside the indicated area.
この装置は、装置全体の制御を行う制御部11と、画像
やラベル値などを記憶する記憶部12と、切抜きマスク
を作成するマスク作成部31と、対象画像を表示する表
示部82と、オペレータが指示を与えるための入力部3
3を備える。そして、本実施例の特徴とするマスク作成
部31は、第1図において説明したラベル付与手段11
、注目画素選択手段12、ラベル値変更手段15、終了
判定手段16、および画素検出手段17よりなっている
。This device includes a control section 11 that controls the entire device, a storage section 12 that stores images, label values, etc., a mask creation section 31 that creates a cutout mask, a display section 82 that displays a target image, and an operator. Input section 3 for giving instructions
Equipped with 3. The mask creation section 31, which is a feature of this embodiment, is configured by the labeling means 11 described in FIG.
, a pixel of interest selection means 12, a label value change means 15, an end determination means 16, and a pixel detection means 17.
以下、第4図に示すフローチャートに沿って、この第1
の実施例の動作の説明を行う。Hereinafter, this first step will be performed according to the flowchart shown in FIG.
The operation of the embodiment will be explained.
[1] 表示部32に対象画像51を表示する。[1] Display the target image 51 on the display unit 32.
この時点での表示画像51を第5図(a)に示す。The displayed image 51 at this point is shown in FIG. 5(a).
この例では切り抜く対象52としてレモンが描かれてい
る。In this example, a lemon is drawn as the target 52 to be cut out.
[2] オペレータが入力部33を用いて、対象52の
周囲を境界を含む幅の閉曲線で囲んで指示領域53を指
定する。この時点での表示画像を第5図(b)に示す。[2] The operator uses the input unit 33 to designate the designated area 53 by surrounding the object 52 with a closed curve having a width including the boundary. The displayed image at this point is shown in FIG. 5(b).
[3コ ラベル付与手段13により、指示領域5S中の
各画素にラベルを付与する。このラベルは、指示領域5
3の内側の画素と外側の画素とでは、値が異なるように
付与する。ここでは−例として、第6図(a)に示すよ
うに、付与するものとする。[3] The labeling means 13 gives a label to each pixel in the designated area 5S. This label is in instruction area 5
Different values are assigned to pixels inside and outside 3. Here, as an example, it is assumed that the information is given as shown in FIG. 6(a).
[4コ 注目画素選択手段14を用いて、例えば乱数な
どで指示領域中から任意に注目画素を選択する。[4] Using the pixel of interest selection means 14, arbitrarily select a pixel of interest from within the designated area using, for example, a random number.
[5コ ステップ[4コで選択した注目画素のラベル値
を、ラベル値変更手段15により更新する。以下に新規
ラベル値を求める方法の一例を示す。[5] The label value of the pixel of interest selected in step [4] is updated by the label value changing means 15. An example of how to obtain a new label value is shown below.
注目画素の周囲から適当にに個の画素を選び、参照画素
とする。画素値が作るn次元特徴空間において、注目画
素との距離が最も近い参照画素を見つけ、その画素と注
目画素のラベル値の平均を新規ラベル値とする。なお、
平均は加重平均としてもよく、その場合、注目画素の重
みをOとすることもある。Appropriate pixels are selected from around the pixel of interest and are used as reference pixels. In the n-dimensional feature space created by the pixel values, the reference pixel closest to the pixel of interest is found, and the average of the label values of that pixel and the pixel of interest is set as the new label value. In addition,
The average may be a weighted average, in which case the weight of the pixel of interest may be set to O.
第7図に、注目画素を中心とする近傍の5×5画素にお
ける4すみにある4個の画素を参照画素としくk=4)
、n=1の場合の上記方式での処理例を示す。n=1の
場合、特徴空間での距離は画素値の差で定義できるので
、第7図では、参照画素72の中で最も距離が近い画素
は画素73となる。画素78のラベル値は6で、注目画
素71のラベル値は2なので、新規ラベル値は(8+2
)/2=4となる。In Figure 7, the four pixels in the four corners of the 5x5 pixels in the vicinity of the pixel of interest are taken as reference pixels (k = 4).
, an example of processing using the above method when n=1 is shown. When n=1, the distance in the feature space can be defined by the difference in pixel values, so in FIG. 7, the pixel 73 is the closest among the reference pixels 72. The label value of pixel 78 is 6, and the label value of pixel of interest 71 is 2, so the new label value is (8+2
)/2=4.
上記の処理により、近い特徴を持つ画素のラベル値が近
くなるようにラベル値が変更される。なお、ラベル値の
変更の方法は一例であって、第11図により後述するよ
うに、近傍画素の中で注目画素に最も近い画素のラベル
値を注目画素の更新ラベル値としてもよい。Through the above processing, the label values are changed so that the label values of pixels having similar characteristics become similar. Note that the method of changing the label value is just one example, and as will be described later with reference to FIG. 11, the label value of the pixel closest to the pixel of interest among the neighboring pixels may be set as the updated label value of the pixel of interest.
また、注目画素に最も近い画素だけでなく、近い順に複
数の画素を選んでラベル更新を行ってもよい。Furthermore, the label may be updated by selecting not only the pixel closest to the pixel of interest, but also a plurality of pixels in descending order of their proximity.
このステップで用いられる画素特徴量の数nには制限が
ないので仏座標値以外に画素値の分散・微分値・勾配方
向などの特徴量を用いてテクスチャ・色の変化などのあ
る画像への対応性を高めることができる。Since there is no limit to the number n of pixel features used in this step, features such as the dispersion, differential value, and gradient direction of pixel values in addition to the Buddhist coordinates can be used to create images with changes in texture and color. It is possible to improve responsiveness.
[6コ 終了判定手段16により、ステップ[4]
[5]の繰り返し処理を終了する条件の成立判定を行う
。終了条件は例えば、途中経過を表示してオペレータの
終了指示を待つ方式や、指示領域中の各画素に対してm
回のラベル変更処理を行ったら終了する方式などが考え
られる。[6] The end determination means 16 determines step [4]
It is determined whether the condition for terminating the repeat process in [5] is met. For example, the termination condition may be a method of displaying the progress and waiting for the operator's termination instruction, or a method of
One possible method is to end the process after the label change process is completed.
[7コ 画素検出手段17を用いて、対象のマスクを作
成する。ステップ[6コまでの処理により、ラベル画像
は第6図(b)から第6図(C)のように変化する。そ
こで例えば、オペレータが指示した閾値でラベル画像を
2値化することで、境界、境界内外の領域を検出するこ
とができ、これにより対象のマスク画像を作成すること
ができる。[7] Using the pixel detection means 17, create a mask of the target. Through the processing up to Step 6, the label image changes as shown in FIG. 6(b) to FIG. 6(C). Therefore, for example, by binarizing the label image using a threshold specified by the operator, the boundary and areas inside and outside the boundary can be detected, and thereby a mask image of the target can be created.
[8] マスクと原画像間の積演算により、所望の対象
を切り抜く。[8] Cut out the desired object by multiplying the mask and the original image.
以上のように第1の実施例によれば、従来数しかった色
の変化やテクスチャなどの存在する一般的な画像中の任
意の対象の境界や、境界内あるいは境界外の領域を簡単
な操作により迅速に検出できる。従って、マスク画像の
作成が容易となり、対象画像の切り抜き、修正など種々
の画像処理を容易に行うことができるようになる。As described above, according to the first embodiment, it is possible to easily manipulate the boundaries of arbitrary objects in general images that have color changes and textures, which were conventionally common, and areas within or outside the boundaries. can be detected quickly. Therefore, it becomes easy to create a mask image, and various image processing such as cropping and modification of the target image can be easily performed.
また、この第1の実施例によれば、指示領域以外の画素
の情報も用いてラベルの変更処理を行うので、以下に説
明する第2の実施例よりもさらに高精度かつ高速にマス
クの作成ができる。Furthermore, according to the first embodiment, since the label change process is performed using information on pixels other than the designated area, the mask can be created with higher precision and faster than the second embodiment described below. Can be done.
第2の実施例
第8図は本発明の第2の実施例のブロック構成図であり
、指示領域にのみラベルを付与する例を示すものである
。この装置は、装置全体の制御を行う制御部11と、画
像やラベル値などを記憶する記憶部12と、境界検出部
8■と、対象画像を表示する表示部82と、オペレータ
が指示を与えるための入力部83と、検出された境界か
ら切り抜きマスクを作成するマスク作成部84を備える
。Second Embodiment FIG. 8 is a block diagram of a second embodiment of the present invention, and shows an example in which a label is attached only to a designated area. This device includes a control section 11 that controls the entire device, a storage section 12 that stores images, label values, etc., a boundary detection section 8, a display section 82 that displays a target image, and an operator that gives instructions. and a mask creation unit 84 that creates a cutout mask from the detected boundaries.
そして、この第2の実施例の特徴とする境界検出部81
は、第1図において説明したラベル付与手段13、注目
画素選択手段14、ラベル値変更手段15、終了判定手
段16、および画素検出手段17よりなっている。A boundary detection unit 81 that is a feature of this second embodiment
is composed of the labeling means 13, the target pixel selecting means 14, the label value changing means 15, the end determining means 16, and the pixel detecting means 17 described in FIG.
1
以下、第9図に示すフローチャートに沿ってこの第2の
実施例の動作の説明を行う。1. The operation of this second embodiment will be explained below along the flowchart shown in FIG.
[1] 表示部82に対象画像51を表示する。[1] Display the target image 51 on the display unit 82.
この時点での表示画像51を第5図(a)に示す。The displayed image 51 at this point is shown in FIG. 5(a).
[2] オペレータが入力部83を用いて、対象52の
周囲を境界を含む幅の閉曲線で囲んで指示領域53を指
定する。この時点での表示画像を第5図(b)に示す。[2] The operator uses the input unit 83 to designate the designated area 53 by surrounding the object 52 with a closed curve whose width includes the boundary. The displayed image at this point is shown in FIG. 5(b).
[3] ラベル付与手段13により、指示領域53中の
各画素にラベルを付与する。このラベルは、示領域53
の内側に近い画素と外側に近い画素とでは、値が異なる
ように付与する。ここでは−例として、第10図(a)
(b)に示すように、内側に行くほどラベル値が大きく
なるように付与するものとする。ラベル付与の方法の一
例としては、指示領域53の一番外側に位置する画素を
閉曲線に沿って追跡しながらある一定のラベルを付与し
て行き、一番外側に位置する画素に全ラベルを付与した
ら、同様にして一番外側の一つ内側に位置する画素を閉
曲線に沿って追跡しながら値を変え2−
たラベルを付与して行く。このような処理を指示領域5
3の全ての画素にラベルを与え終るまで繰り返す。[3] The labeling means 13 gives a label to each pixel in the designated area 53. This label is displayed in the display area 53.
Different values are assigned to pixels close to the inside and pixels close to the outside. Here - as an example, Figure 10(a)
As shown in (b), label values are assigned so that they become larger toward the inside. As an example of a labeling method, a certain label is assigned to the pixels located at the outermost position of the instruction area 53 while tracing them along a closed curve, and all labels are assigned to the pixels located at the outermost position. Then, in the same way, the pixel located one step inside the outermost one is traced along the closed curve, changing its value and giving it a 2-label. Instruct area 5 to perform such processing.
Repeat until all pixels in step 3 have been labeled.
[4コ 注目画素選択手段14を用いて、例えば乱数な
どで指示領域中から任意に注目画素を選択する。ただし
、指示領域53の最も外側と内側の画素(指示領域53
以外の領域に接している画素)63は選択対象から除く
。[4] Using the pixel of interest selection means 14, arbitrarily select a pixel of interest from within the designated area using, for example, a random number. However, the outermost and innermost pixels of the instruction area 53 (indication area 53
The pixel 63 (which is in contact with other areas) is excluded from the selection target.
[5] ステップ[4コで選択した注目画素のラベル値
を、ラベル値変更手段15により更新する。この更新の
方法は第1の実施例と同様であり、ここでは−例を説明
する。[5] The label value of the pixel of interest selected in step [4] is updated by the label value changing means 15. This updating method is the same as in the first embodiment, and an example will be explained here.
指示領域中に位置する注目画素のkXI近傍画素の中で
、各画素の画素値が作るn次元特徴空間において注目画
素に最も距離が近い画素を見つけ、その画素のラベル値
を注目画素の新規ラベル値とする。Among the kXI neighboring pixels of the pixel of interest located in the designated area, find the pixel closest to the pixel of interest in the n-dimensional feature space created by the pixel values of each pixel, and use the label value of that pixel as a new label of the pixel of interest. value.
第11図に、k=1=3.n=1の場合の」二記方式で
の処理例を示す。n=1の場合、特徴空間での距離は画
素値の差で定義できるので、第11図では、注目画素1
11の3×3近傍画素の中で最も距離が近い画素は画素
112となる。画素II2のラベル値は4なので、注目
画素111の新規ラベル値も4に更新される。In FIG. 11, k=1=3. An example of processing using the two-note system when n=1 is shown below. When n = 1, the distance in the feature space can be defined by the difference in pixel values, so in Fig. 11, the pixel of interest 1
The pixel 112 is the closest pixel among the 11 3×3 neighboring pixels. Since the label value of pixel II2 is 4, the new label value of the pixel of interest 111 is also updated to 4.
上記の処理により、近い特徴を持つ画素のラベル値が近
くなるようにラベル値が変更される。Through the above processing, the label values are changed so that the label values of pixels having similar characteristics become similar.
このステップで用いられる画素特徴量の数nには制限が
ないので色原標値以外に画素値の分散・微分値・勾配方
向などの特徴量を用いてテクスチャ・色の変化などのあ
る画像への対応性を高めることができる。There is no limit to the number n of pixel features used in this step, so features such as dispersion, differential value, and gradient direction of pixel values are used in addition to color standard values to create images with changes in texture and color. can improve responsiveness.
また、上記例では説明の都合上に、lを固定として記述
したが、処理中固定する必要はない。例えば、
・乱数によってに、Iを変える。Further, in the above example, l is described as fixed for convenience of explanation, but it is not necessary to be fixed during processing. For example, ・Change I depending on a random number.
・ある条件が満たされるまでに、lを大きくする。- Increase l until a certain condition is met.
などの方法によって近傍領域の大きさを変えて、ラベル
の変化を速めることもできる。また、k×1領域内の全
ての画素を用いず、適当に間引きを行うことで演算回数
を減らし、処理速度を上げることもできる。It is also possible to change the size of the neighborhood region using methods such as this to speed up the label change. Furthermore, by appropriately thinning out pixels without using all the pixels in the k×1 area, the number of calculations can be reduced and the processing speed can be increased.
[6コ 終了判定手段16により、ステップ[4コ [
5コの繰り返し処理を終了する条件の成立判定を行う。[6 pieces] The end determination means 16 determines that step [4 pieces [
It is determined whether the condition for terminating the 5-item repeat process is satisfied.
第1の実施例と同様に、終了条件は例えば、途中経過を
表示してオペレータの終了指示を待つ方式や、ラベル変
化量が閾値以下である更新処理が連続m回以上続いたら
終了する方式などが考えられる。As in the first embodiment, the termination conditions may include, for example, a method in which the progress is displayed and waits for an operator's instruction to terminate, or a method in which the update process ends when the amount of change in the label is less than or equal to a threshold value continues for m or more consecutive times. is possible.
[7コ 画素検出手段17を用いて、対象の境界を求め
る。ステップ[6コまでの処理により、ラベル画像は第
10図(b)から第10図(C)のように変化する。そ
こで例えば、オペレータが指示した閾値をラベル値が交
差する点を検出する方法や、ラベル値の変化の激しいと
ころを線追跡する方法などで、対象の境界が存在する位
置104を検出できる。[7] Use the pixel detection means 17 to find the boundary of the object. Through the processing up to Step 6, the label image changes as shown in FIG. 10(b) to FIG. 10(C). Therefore, for example, the position 104 where the target boundary exists can be detected by a method of detecting a point where a label value intersects a threshold value specified by an operator, or by a method of tracing a line where the label value changes rapidly.
[8] オペレータが入力部88を用いて、境界の内側
を切り抜くか外側を切り抜くかの指示を与える。[8] The operator uses the input unit 88 to give an instruction as to whether to cut out the inside or outside of the boundary.
15−
[9コ ステップ[7]での指示に従って、マスク作成
部84で境界の内側または外側を塗りつぶした切り抜き
マスク54を作成する。この時点での処理結果を第5図
(C)に示す。15-[9] According to the instructions in step [7], the mask creation unit 84 creates a cutout mask 54 in which the inside or outside of the boundary is filled. The processing results at this point are shown in FIG. 5(C).
[10] マスクと原画像間の積演算により、所望の対
象を切り抜く。[10] Cut out the desired object by multiplying the mask and the original image.
以上のように第2の実施例によれば、従来難しかった色
の変化やテクスチャなどの存在する一般的な画像中の任
意の対象の境界を簡単な操作により迅速に検出すること
ができる。従って、検出した対象の境界から輪郭線やマ
スク画像を作成することにより対象画像の切り抜き、修
正など種々の画像処理を容易に行うことができるように
なる。As described above, according to the second embodiment, it is possible to quickly detect the boundary of an arbitrary object in a general image containing color changes, textures, etc., which has been difficult in the past, with a simple operation. Therefore, by creating a contour line or a mask image from the detected boundary of the object, various image processing such as cropping and modification of the object image can be easily performed.
以上、第1、および第2の実施例においては、全ての処
理を画素の単位で行う実施例を説明したが、単位小領域
や特徴の近い画素をまとめた小領域などの領域単位で処
理を行うことで、処理速度をさらに上げることができる
。In the first and second embodiments described above, all processing is performed in pixel units. By doing so, you can further increase the processing speed.
以下にその一例を示す。An example is shown below.
第12図(a)(b)に示すようにpxq画素画素−
6第12図の場合、p=q=2)をまとめて単位領域1
22とし、第一段階としてこの単位領域■22を画素と
みなして処理を行う。その際、単位領域122の特徴量
はその領域内の画素の特徴量の平均値を用いるものとす
る。その結果、第12図(C)に示すように境界を含む
単位領域123が求まるので、第12図(d)(e)の
ようにその部分を少し拡張して新たな指示領域124と
する。第二段階でその新たな指示領域124に対して画
素単位の処理を行う。この方式では処理が2段階に増え
るが、各段階で処理の対象となる要素数が少ないので、
全体としては処理速度を向上させることができる。As shown in Fig. 12 (a) and (b), pxq pixels - 6 (in the case of Fig. 12, p = q = 2) are combined into a unit area 1.
22, and in the first step, processing is performed by regarding this unit area 22 as a pixel. At this time, as the feature amount of the unit area 122, the average value of the feature amount of pixels within the area is used. As a result, a unit area 123 including the boundary is found as shown in FIG. 12(C), and that portion is slightly expanded to form a new designated area 124 as shown in FIGS. 12(d) and (e). In the second step, pixel-by-pixel processing is performed on the new designated area 124. This method increases the processing to two stages, but since the number of elements to be processed at each stage is small,
Overall, the processing speed can be improved.
また、例えば隣接画素との画素値が等しい画素をまとめ
て小領域としてこの小領域単位で処理を行えば、第二段
階の画素単位の処理無しに直接境界を求めることも可能
である。Further, for example, if pixels having the same pixel value as adjacent pixels are grouped together as a small area and processing is performed on a unit of this small area, it is also possible to directly determine the boundary without the second stage of pixel-by-pixel processing.
(発明の効果)
本発明によれば、光の反射、テクスチャ、ノイズなどの
存在する一般的な画像から任意に指定した対象の画像の
境界の検出やマスク画像の作成を、簡単かつ迅速に行う
ことができる。(Effects of the Invention) According to the present invention, it is possible to easily and quickly detect the boundary of an arbitrarily specified target image and create a mask image from a general image containing light reflection, texture, noise, etc. be able to.
また、指示領域以外の画素の情報も用いてラベルの変更
処理を行うことにより、色の変化やテクスチャなどの存
在する一般の画像のマスクをさらに高精度かつ高速に作
成できる。Furthermore, by performing label change processing using information on pixels other than the designated area, it is possible to create a mask for a general image that includes color changes, textures, etc. with higher accuracy and speed.
第1図は本発明の基本的な構成を示すブロック構成図で
ある。
第2図は本発明の基本的なフローチャートである。
第3図は本発明の第1の実施例のブロック構成図である
。
第4図は第1の実施例の動作を示すフローチャートであ
る。
第5図(a)〜(c)は本発明の第1および第2の実施
例での表示画像の一例を示す図である。
第6図(a)〜(C)は第1の実施例でのラベル値の変
化の様子を示す図である。
第7図は第1の実施例でのラベル変更処理を示す図であ
る。
第8図は本発明の第2の実施例のブロック構成図である
。
第9図は本発明の第2の実施例の動作を示すフローチャ
ートである。
第10図(a)〜(C)は本発明でのラベル値の変化の
様子を示す図である。
第11図は本発明の第2の実施例でのラベル変更処理を
示す図である。
第12図(a)〜(e)は本発明の変形例での指示領域
の説明図である。
11・・・制御部、I2・・・記憶部、13・・・ラベ
ル付与手段、14・・・注目画素選択手段、15・・・
ラベル変更手段、16・・・終了判定手段、17・・・
画素検出手段。FIG. 1 is a block configuration diagram showing the basic configuration of the present invention. FIG. 2 is a basic flow chart of the present invention. FIG. 3 is a block diagram of the first embodiment of the present invention. FIG. 4 is a flowchart showing the operation of the first embodiment. FIGS. 5(a) to 5(c) are diagrams showing examples of display images in the first and second embodiments of the present invention. FIGS. 6(a) to 6(C) are diagrams showing changes in label values in the first embodiment. FIG. 7 is a diagram showing label change processing in the first embodiment. FIG. 8 is a block diagram of a second embodiment of the present invention. FIG. 9 is a flowchart showing the operation of the second embodiment of the present invention. FIGS. 10(a) to 10(C) are diagrams showing changes in label values according to the present invention. FIG. 11 is a diagram showing label change processing in the second embodiment of the present invention. FIGS. 12(a) to 12(e) are explanatory diagrams of designated areas in modified examples of the present invention. DESCRIPTION OF SYMBOLS 11... Control part, I2... Storage part, 13... Labeling means, 14... Interested pixel selection means, 15...
Label changing means, 16... Completion determining means, 17...
Pixel detection means.
Claims (1)
ベル付与手段と、 対象の境界を含む指示された領域から画素を選択する注
目画素選択手段と、 選択された注目画素のラベル値と特徴、およびその注目
画素の近傍の画素群のラベル値と特徴に基づいて注目画
素のラベル値を変更するラベル値変更手段と、 予め決められた条件が成立したかどうかを見てラベル値
変更を終了させる終了判定手段と、ラベル画像から特定
の条件を満たすラベルを持つ画素を前記対象の境界、内
部または外部に属する画素として検出する画素検出手段
と を有することを特徴とする画像処理装置。[Scope of Claims] Labeling means for labeling an area including at least the boundary of an object; pixel-of-interest selection means for selecting a pixel from a specified area including the boundary of the object; and a label for the selected pixel of interest. a label value changing means for changing the label value of a pixel of interest based on the value and feature, and the label value and feature of a group of pixels in the vicinity of the pixel of interest; An image processing device characterized by having a completion determination means for terminating the change, and a pixel detection means for detecting pixels having a label that satisfies a specific condition from a label image as pixels belonging to a boundary, inside, or outside of the object. .
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33023589A JPH0797412B2 (en) | 1989-09-06 | 1989-12-20 | Image processing device |
| US07/628,954 US5181261A (en) | 1989-12-20 | 1990-12-18 | An image processing apparatus for detecting the boundary of an object displayed in digital image |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1-230678 | 1989-09-06 | ||
| JP23067889 | 1989-09-06 | ||
| JP33023589A JPH0797412B2 (en) | 1989-09-06 | 1989-12-20 | Image processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH03174670A true JPH03174670A (en) | 1991-07-29 |
| JPH0797412B2 JPH0797412B2 (en) | 1995-10-18 |
Family
ID=26529470
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP33023589A Expired - Fee Related JPH0797412B2 (en) | 1989-09-06 | 1989-12-20 | Image processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0797412B2 (en) |
-
1989
- 1989-12-20 JP JP33023589A patent/JPH0797412B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0797412B2 (en) | 1995-10-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7925084B1 (en) | Merge and removal in a planar map of an image | |
| US8503826B2 (en) | System and method for computer-aided image processing for generation of a 360 degree view model | |
| US8571326B2 (en) | Defining a border for an image | |
| US8452105B2 (en) | Selecting a section of interest within an image | |
| EP2286384B1 (en) | Defining a border for an image | |
| US8280171B2 (en) | Tools for selecting a section of interest within an image | |
| EP0532823A2 (en) | Method and apparatus for detecting the contour and separating a given subject from an image | |
| US8548251B2 (en) | Defining a border for an image | |
| WO2001026050A2 (en) | Improved image segmentation processing by user-guided image processing techniques | |
| KR20040050909A (en) | Method and apparatus for discriminating between different regions of an image | |
| US7929755B1 (en) | Planar map to process a raster image | |
| JP4086956B2 (en) | User-assisted identification of object boundaries in raster images | |
| US5181261A (en) | An image processing apparatus for detecting the boundary of an object displayed in digital image | |
| 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 | |
| JPH07182537A (en) | Graphic drawing apparatus and graphic drawing method | |
| JPH03174670A (en) | Image processor | |
| CN114972385B (en) | Shape clipping method, device and medium for point cloud data | |
| JPH0392978A (en) | Picture processing device | |
| JP2000182056A (en) | Picture processor | |
| JPH05250471A (en) | Image processing apparatus having contour extraction function | |
| JPH04133179A (en) | image cutting device | |
| JP2001184522A (en) | Image display method of light ray tracing system | |
| JP2001060272A (en) | Image display device applying tracking of light beam | |
| JPH08160935A (en) | Character pattern display device | |
| JPH10283485A (en) | Contour extracting device, approximation evaluating method and recording medium recording contour extracting program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |