JPH0468763A - Cutout mask generating method - Google Patents

Cutout mask generating method

Info

Publication number
JPH0468763A
JPH0468763A JP2176984A JP17698490A JPH0468763A JP H0468763 A JPH0468763 A JP H0468763A JP 2176984 A JP2176984 A JP 2176984A JP 17698490 A JP17698490 A JP 17698490A JP H0468763 A JPH0468763 A JP H0468763A
Authority
JP
Japan
Prior art keywords
evaluation function
mask
image
area
background
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.)
Pending
Application number
JP2176984A
Other languages
Japanese (ja)
Inventor
Hideaki Kobayashi
秀章 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2176984A priority Critical patent/JPH0468763A/en
Publication of JPH0468763A publication Critical patent/JPH0468763A/en
Pending legal-status Critical Current

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)

Abstract

PURPOSE:To obtain a synthesis picture with quality of a contour line close to that of an original picture by substituting a picture element in an area for a desired picture cutout to an evaluation function representing the possibility of an optional color belonging to a background and an evaluation function representing the possibility of an optional color belonging to a real body and deciding the synthesis ratio. CONSTITUTION:An evaluation function is generated to each training area based on a picture element of each training area to be inputted. Then the evaluation function is used to calculate the density of a mask as to each picture element in a cutting area thereby generating a mask data having gradation. A color of each picture element (picture element value) in the cutting area is substituted to each evaluation function, the evaluation function whose value is a minimum among the evaluation functions belonging to the background is used as a distance X from the background and similarly, the evaluation function whose value is a minimum among the evaluation functions belonging to the real body is used as a distance Y from the real body. The distances X, Y are used to calculate a parameter theta of the mask density of the relevant picture element.

Description

【発明の詳細な説明】[Detailed description of the invention] 【産業上の利用分野】[Industrial application field]

本発明は、原画像データを演算処理し、電子的な切抜き
合成処理により合成画像を作成するための切抜きマスク
を作成する方法に関する。
The present invention relates to a method for creating a cutout mask for creating a composite image by performing arithmetic processing on original image data and performing electronic cutout and composition processing.

【従来の技術1 印刷画像に種々の視覚的な効果を得るため、任意の実体
部に所望する背景部を合成して、その合成画像の印刷製
版用原版のフィルムを作成する場合がある。 このような原版を作成するに際しては、一般に、次のよ
うに合成画像を作成する2値マスク切抜き合成方法が用
いられる。この合成方法においては、まず、例えば印刷
用原稿を走査してその画素データを読込み、読込んだ画
素データを適当な方法で2値化し、各6素に対応するオ
ン、オフの2値からなるマスクデータを作成する。次い
で、その2値マスクデータを参照しながら、当該データ
がオフならば実体部となるべき画像の画素データを取出
し、一方、オンならば背景部となるべき画像から画素デ
ータを取出すことによって画像を合成する。このような
2値マスク切抜き合成方法に用いるためのマスクデータ
の作成方法は従来から種々のものが知られている。 又、2値マスクデータに基づいて、一定幅の中間調領域
を設けるようにした階調マスク作成方法がある(例えば
特公平1−31232)、即ち、この階調マスク作成方
法においては、2値マスクデータに基づいて、この2値
マスクデータの輪郭線の内部、外部、あるいは両側に一
定幅の帯状領域を設け、その帯状領域内の各画素につい
て、前景部画像及び実体部画像の合成比率を決めるため
の階調を持ったマスクデータを作成する。 r発明が解決しようとする課題】 しかしながら、前記従来の2値マスク切抜き合成方法に
おいては、次のような問題点が生じていた。 第1の問題点は、合成した画像の境界線が際立って見え
ることであり、そのように見えた場合には、合成画像が
作為的な印象を与える好ましからざるものとなっていた
。例えば写真原稿をスキャナで読込んだ、いわゆる自然
画像においては、物の輪郭線付近に背景部の色と実体部
の色との中間的な色からなるあいまいな画素を含む領域
が存在し、この領域があるおかげで背景部と実体部とが
馴染んで見える。しかしながら、前記2値マスクにより
合成された画像の境界線付近にはこのあいまいな領域が
存在しないため、境界線が不自然に際立って見えてしま
い、作為的な印象を与えるのである。 又、第2の問題点は、両会読取り時の走査方向に対して
斜め方向の輪郭線がある場合、輪郭線に画素単位で階段
状のがたつきが生じることである。 例えば前記自然画像においては、前記のあいまいな領域
が存在し、斜めの輪郭線の付近で輪郭線に沿って濃度が
徐々に変化しているため、隣り合う画素間では濃度ジャ
ンプ(急峻な濃度変化)がいずれの箇所でも小さく、こ
のため、斜めの輪郭線に対しても階段状のがたつきは見
えない。しかしながら、前記2値マスクによって合成さ
れた画像は画素間の境界線付近で大きな濃度ジャンプが
生じるため、当該境界線に階段状のがたつきが生じてい
るように見えることがある。 前記第1の問題点に対して、前記階調マスク作成方法を
用いれば、境界線付近で徐々に濃度が変化するため、あ
る程度解消できるものと考えられる。 しかしながら、前記階調マスク作成方法においては、例
えば特公平1−31232公報に記載されるように、予
めメモリ中に記憶された濃度変換率曲線により合成を行
うため、境界線付近の階調の変化の様子が前記自然画像
はど滑かにはできず、画素間の濃度ジャンプが未だ大き
いため、前記題第2の問題点は依然として残るものとな
る。これに対し、ぼけ幅を広く取ることによって濃度ジ
ャンプを小さくしようとすると、境界線がぼや番ブて見
えてしまい、輪郭のはっきりしないぼやけた合成画像と
なってしまうという別の問題が生じる。 従って、自然画像の輪郭線付近の画素のぼけ方の性質に
近い、滑かな階調変化を有するように画像を合成し得る
技術が必要とされるが、従来、このような要請に応える
技術がなかった。 本発明は、前記従来の問題点を解消するべくなされたも
ので、原画像における輪郭線付近の色の変化の状態を合
成後の画像に対しても保存することができ、従って、原
画像に近い輪郭線品質ひいては、良く馴染んだ自然に近
い合成画像が得られる切抜きマスク作成方法を提供する
ことを課題とする。
[Prior Art 1] In order to obtain various visual effects on a printed image, a desired background portion may be synthesized with an arbitrary substance portion, and a film of a printing plate master plate of the synthesized image may be created. When creating such an original, a binary mask cutting and combining method is generally used to create a composite image as follows. In this synthesis method, first, for example, a printing original is scanned and its pixel data is read in, and the read pixel data is binarized using an appropriate method to create binary values of on and off corresponding to each six pixels. Create mask data. Next, while referring to the binary mask data, if the data is off, the pixel data of the image that should be the real part is extracted, and if it is on, the pixel data of the image that should be the background part is extracted, thereby creating the image. Synthesize. Various methods have been known for creating mask data for use in such a binary mask cutting and combining method. In addition, there is a method for creating a gradation mask that creates a halftone area of a constant width based on binary mask data (for example, Japanese Patent Publication No. 1-31232). Based on the mask data, a band-shaped area of a constant width is created inside, outside, or on both sides of the contour line of this binary mask data, and for each pixel within the band-shaped area, the synthesis ratio of the foreground part image and the real part image is determined. Create mask data with gradation to determine. Problems to be Solved by the Invention However, the following problems have occurred in the conventional binary mask cutting and combining method. The first problem is that the boundaries of the composite image appear conspicuous, and when they appear that way, the composite image gives an undesirable impression of artificiality. For example, in a so-called natural image obtained by scanning a photographic original with a scanner, there is an area near the outline of the object that contains ambiguous pixels with a color intermediate between the color of the background and the color of the substance. Thanks to the area, the background part and the real part appear to blend together. However, since this ambiguous area does not exist near the boundary line of the image synthesized by the binary mask, the boundary line looks unnaturally distinct, giving an artificial impression. The second problem is that when there is a contour line that is diagonal to the scanning direction when reading both sides, step-like wobbling occurs in the contour line in pixel units. For example, in the natural image, the aforementioned ambiguous area exists, and the density gradually changes along the contour line near the diagonal contour line, so there is a density jump (sharp density change) between adjacent pixels. ) is small at all locations, and therefore, no step-like wobbling is visible even on diagonal contour lines. However, in the image synthesized using the binary mask, a large density jump occurs near the boundary line between pixels, so that the boundary line may appear to have a step-like jitter. It is thought that the first problem can be solved to some extent by using the gradation mask creation method, since the density gradually changes near the boundary line. However, in the gradation mask creation method, as described in, for example, Japanese Patent Publication No. 1-31232, since synthesis is performed using a density conversion rate curve stored in advance in memory, changes in gradation near the boundary line The natural image cannot be made smooth, and the density jump between pixels is still large, so the second problem still remains. On the other hand, if an attempt is made to reduce the density jump by widening the blur width, another problem arises in that the border lines appear blurred and blurred, resulting in a blurred composite image with unclear outlines. Therefore, there is a need for a technology that can synthesize images so that they have smooth gradation changes that are similar to the nature of the blurring of pixels near the contours of natural images. There wasn't. The present invention was made in order to solve the above-mentioned conventional problems, and it is possible to preserve the state of color change near the contour line in the original image for the combined image. It is an object of the present invention to provide a method for creating a cutout mask that can obtain a close contour line quality and, by extension, a well-blended, natural-looking composite image.

【課題を解決するための手段】[Means to solve the problem]

本発明は、原画像データを演算処理し、電子的な切抜き
合成処理により合成画像を作成するための切抜きマスク
を作成する方法において、任意の色が背頽部に属する可
能性を示す評価関数、及び、任意の色が実体部に属する
可能性を示す評価関数を作成し、画像の切抜きを所望す
る背景部と実体部とに跨る領域を指定し、指定された領
域内の全ての画素について、前記各評価関数に該画素値
を代入し、代入により得られたそれぞれの評価関数の値
に基づき、背景部と実体部とを合成する際に用いる合成
比率を決定し、算出された合成比率の値からなる階調を
もったマスクデータを作成することにより、前記課題を
解決するものである。
The present invention provides a method for creating a cutout mask for creating a composite image by performing arithmetic processing on original image data and using electronic cutout and composition processing. Then, create an evaluation function that indicates the possibility that an arbitrary color belongs to the real part, specify the area that spans the background part and the real part from which you want to cut out the image, and then, for all pixels within the specified area, Substitute the pixel value into each of the evaluation functions, determine the synthesis ratio to be used when compositing the background part and the real part based on the value of each evaluation function obtained by the substitution, and calculate the calculated synthesis ratio. The above-mentioned problem is solved by creating mask data having gradations made up of values.

【作用1 本発明においては、切抜きマスク作成方法において、任
意の色が背景部に属する可能性を示す評1iilill
l数、及び任意の色が実体部に属する可能性を示す評価
関数について、画像の切抜きを所望する領域内の画素値
(例えば画素濃度)を代入し、代入により得られたそれ
ぞれの評価関数の値に基づき合成比率を決定している。 前記評価関数により、原画像の輪郭線付近に存在する背
景部と実体部との中間的な色からなる画素について、背
景色と実体色がどれほどの比率で混合されてなった色の
画素であるかをおよそ推測することができる。このため
、前記合成比率は輪郭線付近の自然な濃度変化が反映さ
れたものになる。 従って、実体部を切抜いて別の背景画像の上に載せて合
成する際に、輪郭線付近の各画素において、原画像の自
然な階−変化に従った合成比率で原画像(切抜き対象画
像)と背景画像とを混合することかできるため、原画像
における輪郭線付近の色の変化の具合を合成後の画像に
対してもほぼ保存することができる。よって、自然画像
の輪郭線付近の画素のぼけ方の性質に近い、滑らかな階
調変化の輪郭線を有した、良く馴染んだ自然に見える合
成画像を作成することができる。又、走査方向に対して
斜方向の輪郭線に階段状のがたつきが生じることがない
。 【実施例】 以下、図面を参照して本発明の実施例を詳細に説明する
。 この実施例に係る切抜きマスク作成システムの構成を第
1図に示す。第1図に示すように、このシステムは、主
に、画像データ入力部10、画像データ格納メモリ12
、位置入力部14、トレーニングエリア格納メモリ16
、カッティングエリア格納メモリ18、評価関数作成部
20、評価関数格納メモリ22、マスク濃度計算手段2
4、マスクデータ格納メモリ26、及びマスクデータ出
力部28を備える。 前記画像データ入力部10は、切抜き合成する画像の画
素値、例えば画素濃度のデータ(このデータの集合を画
像データという)を入力するためのもので、例えば印刷
用カラー透過原稿を走査して、各画素におけるシアン(
C)、マゼンタ(M)、イエロー(Y) 、I (Bk
 )の各色濃度値からなる画像データを入力する力う−
スキャナを用いることができる。 前記画像データ格納メモリ12は、前記入力された画像
データを格納するためのものである。 前記位置入力部14は、任意の色が背景部に属する可能
性を示す評価関数、及び、任意の色が実体部に属する可
能性を示す評価関数を作成するため画像データをサンプ
リングする画像上の領域、即ちトレーニングエリアと、
切抜きを所望する対象領域、即ちカッティングエリアの
各領域を指示するためのものである。この位置入力部1
4には例えばペンレコーダ、マウス、あるいはデジタイ
ザを用いることができる。 前記トレーニングエリア格納メモリ16及びカッティン
グエアリ格納メモリ78は、それぞれ入力されたトレー
ニングエリア及びカッティングエリアの領域の位置を格
納するものである。 前記評価関数作成部2oは、前記入力されたトレーニン
グエアリの各画素値に基づき、トレーニングエアリの個
数だけ評価関数、例えば後述するマハラノビス距離など
を作成するものである。この評価関数は前記評1ifi
関数格納メモリ22に記憶される。 前記マスク濃度計算部24は、前記評価関数を用いて、
カッティングエリアの各画素についての階調マスクデー
タを作成するものである。この作成された階調マスクデ
ータは、マスクデータ格納メモリ26に格納され、格納
されたマスクデータは前記画像データの切抜きのために
必要に応じてマスクデータ出力゛部28から出力される
。 以下、実施例の作用を説明する。 この実施例に係る切抜きマスク作成システムは、第2図
に示す手順に従って階調マスクデータを作成する。 即ち、先ず画像データ入力部10から画像データを入力
して、格納メモリ12に当該画像データを格納したり、
必要に応じて図示しない表示手段に表示したりする(ス
テップ101)。 次いで、位置入力部14から入力する位置がトレーニン
グエリアのものであるか、カッティングエリアのもので
あるかの操作を選択する(ステップ102)。但し、こ
の手順の当初においては、評価関数f (γ〉を予め作
成する必要から、ステップ102に進んでトレーニング
エリアを入力することしかできない。又、−旦トレーニ
ングエリアの入力を選択しトレーニングエリアを入力し
た後は、順次カッティングエリアを選択できる。更に、
切抜き作業を進めていく過程においてトレーニングエリ
アの変更が行えるようになっている。 次いで、トレーニングエリアを入力する(ステップ10
3)。なお、このトレーニングエリア入力に際しては、
種々の方法で行うことができ、その1つの方法として、
背景部及び実体部からそれぞれ一箇所以上ずつのトレー
ニングエリアを入力する。 次いで、入力された各トレーニングエリアの画素値に基
づき、各トレーニングエリア毎に評価関数を作成する。 評価関数として、例えば次式(1)に示すマハラノビス
距離を用いることができる。 f  (y)2=(x−y)  −Cov−” (y−
y)・・・(1) 但し、×はトレーニングエリアのモード平均(ベクトル
)、COvをトレーニングエリアの濃度の共分散行列で
ある。又、tは〈ンーν)の転置行列を表わす。 このマハラノビスからなる評価関数f(y)は常に非負
の値を取り、評価関数f  (V)の値が小さいほどそ
のトレーニングエリアの色の分布に近いことを表してい
る。 なお、ステップ103及びステップ104における別の
方法としては、背景部と実体部とに跨る一箇所以上のト
レーニングエリアを取り、得られたトレーニングエリア
を1つの領域と見做してクラスタ分けを行い、次いで、
分けられた各々のクラスタが背景部あるいは実体部のい
ずれに属するかを決定し、背景部及び実体部に属すると
決定された各々のクラスタからのマハラノビス距離を評
価関数とする方法が考えられる。いずれの方法にせよ、
結果としては背景部及び実体部についてそれぞれ1つ以
上の評価関数が作成される。 次いで、カッティングエリアの入力を行う(ステップ1
05)、。 次いで、前記評価関数を用いて、カッティングエリア内
の各画素についてマスクの濃度(階調で表わす)を算出
し、階調を有するマスクデータ(N調マスクデータ)を
作成する(ステップ106)。この階調マスクデータの
作成は例えば次ようにして行う。 カッティングエリアの各画素に対して、その画素の色(
画素値)を各評価関数に代入し、背景部に属する評価関
数の値のうちその値が最小のものを背景部からの距離X
とし、実体部に関しても同様に評価関数値のうち最小の
ものを実体部からの距離Yとする。この各距離X1Yを
用いて、当該画素のマスク濃度のパラメータθを次式(
2)により算出する。 θ−arctan(Y/X)     −・・−”・<
2)一方、マスク濃度を0%マスクから100%マスク
の間で変化させる前記パラメータの最小値θmin 、
最大値θmaxを、次式(3)の関係になるように、予
め設定しておく。 Oくθmin <θalax <yr/2  − (3
)これらパラメータθヤ各設定値θ1n1θWaXから
、マスク濃度を次の(I)〜(I[l)の関係により決
定し、そのマスク濃度をマスクデータとする。 (I>もし、θ〈θ1nならばマスク濃度を0%とする
。 <II)もし、θ〉θmaxならばマスク濃度を100
%とする。 (I[[)上記(I>、(II)以外のとき(θwax
 >θ〉θsin )には、次式(4)の関係からのマ
スク濃度を求める。 ((θ−θwin ) / (θmax−θ1n))X
(100%マスク) ・・・・・・・・・ (4) これら(I)〜(I[[)の関係は、第3図のように、
距離X及びYからなる平面においてパラメータθの変化
で示される。又、第3図に示すように、0%マスクは実
体部のみの色を画素の色とし、濃度が上昇するに従って
背景部の色の割合いを高くし100%マスクでは背景部
の色のみを画素の色とする。 次いで、階調マスクデータを図示しない表示手段に表示
する(ステップ107)。この表示されたマスクが、も
し不適切なものであれば、再度光のステップ102に戻
って再び処理を続行し、適切なものであれば、階調マス
クデータとして記憶する(ステップ108)。 以上のようにして適切な階調マスクデータが作成でき、
この階調マスクデータにより実体部画像と背景部面像と
を合成することにより、輪郭線が自然画像と同様によく
馴染んだ合成画像を得ることができる。 なお、ステップ106のようにカッティングエリアの全
ての画素に対してマスクの濃度を決めた後、必要に応じ
て次の処理を施すことができる。 即ち、カッティングエリアの全ての画素を順次対象とし
、各対象画素から見て一定範囲以内に100%マスクが
1画素も存在しない場合には対象画素のマスク濃度を0
%に書換える処理を施すことができる。これは、ぼけ幅
(0%、100%以外の中間調となる画素の存在する領
域幅)を一定値以内に制限する処理である。又同時に孤
立した100%マスクを誤りであると見做して除去する
処理でもある。即ち、画像によっては実体部内部に背景
部に近い色が存在することがあり、そういう色の存在す
る箇所で不必要に中間調マスクがかかったり、散在する
点状に100%マスクがかかったりする不都合が生じる
ことがある。このような場合に、上記の処理はある程度
有効に作用して、不必要なマスクを除去できる。 なお、上記処理は、ステップ106でマスク濃度を決定
した直後のみならず、ステップ108の直前で、全画素
に対して行っても有効な処理を施せる。 なお、前記実施例では、評価関数として(1)式のマハ
ラノビス距離を用いていたが、本発明の評価関数はこれ
に限定されず、他の例えば出願人が既に提案した特願平
1−340452や同2−6647中に示したユークリ
ッド距離等いずれの評価関数を用いることができる。 f発明の効果】 以上説明した通り、本発明によれば、原画像における輪
郭線付近の色の変化の状態を合成後の画像についてもほ
ぼ保存して合成可能な切抜きマスクを得ることができ、
合成画像に原画像に近い輪郭線品質が得られる。これに
よって、合成画像が良く馴染んで自然に見えるものにな
ると共に、走査方向に対して斜めの輪郭線に階段状のが
たつきが生じることを解消できるという優れた効果が得
られる。
[Effect 1] In the present invention, in the cutout mask creation method, evaluation 1iillil indicating the possibility that an arbitrary color belongs to the background part
For the evaluation function that indicates the possibility that an arbitrary color belongs to the real part, substitute the pixel value (for example, pixel density) in the area where you want to cut out the image, and calculate the value of each evaluation function obtained by the substitution. The composition ratio is determined based on the value. According to the evaluation function, for pixels that are located near the outline of the original image and have an intermediate color between the background part and the substance part, the ratio of the background color and the substance color is mixed to determine the color of the pixel. You can roughly guess. Therefore, the synthesis ratio reflects natural density changes near the contour line. Therefore, when cutting out the real part and placing it on another background image and compositing it, the original image (image to be cropped) is set at a compositing ratio that follows the natural floor changes of the original image at each pixel near the contour line. Since it is possible to mix the background image with the background image, it is possible to preserve almost the degree of color change near the outline in the original image in the combined image. Therefore, it is possible to create a blended, natural-looking composite image that has contour lines with smooth gradation changes that are similar to the nature of blurring of pixels near the contour lines of a natural image. Further, step-like wobbling does not occur in the contour line in the diagonal direction with respect to the scanning direction. Embodiments Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The configuration of a cutout mask production system according to this embodiment is shown in FIG. As shown in FIG. 1, this system mainly consists of an image data input section 10, an image data storage memory 12,
, position input unit 14, training area storage memory 16
, cutting area storage memory 18, evaluation function creation section 20, evaluation function storage memory 22, mask density calculation means 2
4, a mask data storage memory 26, and a mask data output section 28. The image data input unit 10 is for inputting pixel values of images to be cut out and combined, such as pixel density data (a set of this data is referred to as image data). Cyan (
C), magenta (M), yellow (Y), I (Bk
) to input image data consisting of each color density value.
A scanner can be used. The image data storage memory 12 is for storing the input image data. The position input unit 14 is configured to perform a position input process on an image for sampling image data in order to create an evaluation function indicating the possibility that an arbitrary color belongs to the background part and an evaluation function indicating the possibility that an arbitrary color belongs to the substance part. area, i.e. training area;
This is for indicating the target area, that is, each area of the cutting area, for which cutting is desired. This position input section 1
For example, a pen recorder, a mouse, or a digitizer can be used for 4. The training area storage memory 16 and the cutting area storage memory 78 are for storing the positions of the input training area and cutting area, respectively. The evaluation function creation unit 2o creates evaluation functions, for example, Mahalanobis distances to be described later, as many as the number of training Airies based on each pixel value of the input training Airy. This evaluation function is the evaluation 1ifi mentioned above.
It is stored in the function storage memory 22. The mask density calculation unit 24 uses the evaluation function to
This is to create gradation mask data for each pixel in the cutting area. The created gradation mask data is stored in the mask data storage memory 26, and the stored mask data is outputted from the mask data output section 28 as necessary for cropping the image data. The effects of the embodiment will be explained below. The cutout mask creation system according to this embodiment creates gradation mask data according to the procedure shown in FIG. That is, first, image data is input from the image data input section 10 and the image data is stored in the storage memory 12,
If necessary, it may be displayed on a display means (not shown) (step 101). Next, the operator selects whether the position to be input from the position input unit 14 is in the training area or in the cutting area (step 102). However, at the beginning of this procedure, it is necessary to create the evaluation function f (γ〉) in advance, so it is only possible to proceed to step 102 and input the training area. After entering the information, you can select the cutting area in sequence.Furthermore,
The training area can be changed as the cutting process progresses. Then enter the training area (step 10)
3). Please note that when entering this training area,
This can be done in a variety of ways, one of which is
Input one or more training areas each from the background part and the real part. Next, an evaluation function is created for each training area based on the input pixel values of each training area. As the evaluation function, for example, the Mahalanobis distance shown in the following equation (1) can be used. f (y)2=(x-y) −Cov-” (y-
y)...(1) However, x is the mode average (vector) of the training area, and COv is the covariance matrix of the concentration of the training area. Further, t represents a transposed matrix of <n-v). This Mahalanobis evaluation function f(y) always takes a non-negative value, and the smaller the value of the evaluation function f(V), the closer it is to the color distribution of the training area. Note that another method in steps 103 and 104 is to take one or more training areas spanning the background part and the real part, and perform clustering by regarding the obtained training areas as one area. Then,
A possible method is to determine whether each divided cluster belongs to the background part or the substance part, and use the Mahalanobis distance from each cluster determined to belong to the background part and the substance part as the evaluation function. Either way,
As a result, one or more evaluation functions are created for each of the background part and the substance part. Next, enter the cutting area (step 1)
05),. Next, using the evaluation function, the mask density (represented by gradation) is calculated for each pixel in the cutting area, and mask data having gradation (N-tone mask data) is created (step 106). This gradation mask data is created, for example, as follows. For each pixel in the cutting area, the color of that pixel (
Pixel value) is assigned to each evaluation function, and the one with the smallest value among the evaluation function values belonging to the background part is determined as the distance from the background part
Similarly, for the real part, the minimum value among the evaluation function values is set as the distance Y from the real part. Using these distances X1Y, the mask density parameter θ of the pixel is calculated using the following formula (
Calculated according to 2). θ−arctan(Y/X) −・・−”・<
2) On the other hand, the minimum value θmin of the parameter that changes the mask concentration between 0% mask and 100% mask,
The maximum value θmax is set in advance so as to satisfy the relationship expressed by the following equation (3). Okuθmin <θalax <yr/2 − (3
) The mask density is determined from the following parameters (I) to (I[l) from the set values θ1n1θWaX of the parameters θ, and the mask density is used as mask data. (I> If θ<θ1n, set the mask density to 0%. <II) If θ>θmax, set the mask density to 100%.
%. (I[[) When other than the above (I>, (II) (θwax
>θ>θsin), the mask density is determined from the relationship of the following equation (4). ((θ−θwin) / (θmax−θ1n))X
(100% mask) ・・・・・・・・・ (4) The relationship between these (I) to (I[[) is as shown in Figure 3.
It is represented by a change in the parameter θ in a plane consisting of distances X and Y. Also, as shown in Figure 3, with a 0% mask, only the color of the real part is used as the pixel color, and as the density increases, the ratio of the color of the background part increases, and with a 100% mask, only the color of the background part is used. The color of the pixel. Next, the gradation mask data is displayed on a display means (not shown) (step 107). If the displayed mask is inappropriate, the process returns to the light step 102 to continue the process again, and if it is appropriate, it is stored as gradation mask data (step 108). Appropriate gradation mask data can be created as described above,
By combining the real part image and the background part image using this gradation mask data, it is possible to obtain a composite image in which the contour line blends in well like a natural image. Note that after determining the density of the mask for all pixels in the cutting area as in step 106, the following processing can be performed as necessary. That is, all pixels in the cutting area are sequentially targeted, and if there is no 100% mask within a certain range from each target pixel, the mask density of the target pixel is set to 0.
You can perform processing to rewrite it to %. This is a process that limits the blur width (width of a region where pixels with halftones other than 0% and 100% exist) to within a certain value. At the same time, it is also a process of removing an isolated 100% mask by regarding it as an error. In other words, depending on the image, there may be a color close to the background part inside the real part, and a halftone mask is applied unnecessarily to the part where such color exists, or a 100% mask is applied to scattered dots. This may cause some inconvenience. In such a case, the above-described process is effective to some extent, and unnecessary masks can be removed. Note that the above processing can be effectively performed not only immediately after the mask density is determined in step 106, but also when it is performed on all pixels immediately before step 108. In the above embodiment, the Mahalanobis distance of formula (1) was used as the evaluation function, but the evaluation function of the present invention is not limited to this, and may be applied to other methods, such as Japanese Patent Application No. 1-340452 already proposed by the applicant. Any evaluation function can be used, such as the Euclidean distance shown in 2003 or 2-6647. [Effects of the Invention] As explained above, according to the present invention, it is possible to obtain a cutout mask that can be synthesized by preserving almost the state of color change near the contour line in the original image in the synthesized image.
The synthesized image has contour line quality close to that of the original image. As a result, the composite image blends in well and looks natural, and the excellent effect of eliminating the step-like jitter that occurs in the contour line diagonal to the scanning direction can be obtained.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明の実施例に係る切抜きマスク作成シス
テムの概念的な構成を示すブロック図、第2図は、前記
実施例の作用を説明するための、マスクデータ作成手順
を示す流れ図、 第3図は、背景部及び実体部からの距離に基づいてマス
ク濃度を決定する手法を説明するための線図である。 10・・・画像データ入力部、 12・・・画像データ格納部、 14・・・位置入力部、 16・・・トレーニングエリア格納メモリ、18・・・
カッティングエリア格納メモリ、20・・・評価関数の
作成部、 22・・・評価関数の格納メモリ、 24・・・マスク濃度計算部、 26・・・マスクデータ格納メモリ、 28・・・マスクデータ出力部。
FIG. 1 is a block diagram showing a conceptual configuration of a cutout mask creation system according to an embodiment of the present invention, and FIG. 2 is a flowchart showing a mask data creation procedure for explaining the operation of the embodiment. FIG. 3 is a diagram for explaining a method of determining mask density based on the distance from the background part and the real part. 10... Image data input section, 12... Image data storage section, 14... Position input section, 16... Training area storage memory, 18...
Cutting area storage memory, 20...Evaluation function creation unit, 22...Evaluation function storage memory, 24...Mask density calculation unit, 26...Mask data storage memory, 28...Mask data output Department.

Claims (1)

【特許請求の範囲】[Claims] (1)原画像データを演算処理し、電子的な切抜き合成
処理により合成画像を作成するための切抜きマスクを作
成する方法において、 任意の色が背景部に属する可能性を示す評価関数、及び
、任意の色が実体部に属する可能性を示す評価関数を作
成し、 画像の切抜きを所望する背景部と実体部とにまたがる領
域を指定し、 指定された領域内の全ての画素について、前記各評価関
数に該画素値を代入し、代入により得られたそれぞれの
評価関数の値に基づき、背景部と実体部とを合成する際
に用いる合成比率を決定し、算出された合成比率の値か
らなる階調をもったマスクデータを作成することを特徴
とする切抜きマスク作成方法。
(1) In a method for creating a cutout mask for creating a composite image by performing arithmetic processing on original image data and using electronic cutout and composition processing, an evaluation function indicating the possibility that an arbitrary color belongs to the background portion; Create an evaluation function that indicates the possibility that an arbitrary color belongs to the real part, specify a region that spans the background and the real part from which you want to cut out the image, and calculate each of the above for all pixels within the specified region. Substitute the pixel value into the evaluation function, determine the synthesis ratio to be used when compositing the background part and the real part based on the value of each evaluation function obtained by the substitution, and from the calculated synthesis ratio value. A cutout mask creation method characterized by creating mask data having gradation.
JP2176984A 1990-07-04 1990-07-04 Cutout mask generating method Pending JPH0468763A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2176984A JPH0468763A (en) 1990-07-04 1990-07-04 Cutout mask generating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2176984A JPH0468763A (en) 1990-07-04 1990-07-04 Cutout mask generating method

Publications (1)

Publication Number Publication Date
JPH0468763A true JPH0468763A (en) 1992-03-04

Family

ID=16023149

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2176984A Pending JPH0468763A (en) 1990-07-04 1990-07-04 Cutout mask generating method

Country Status (1)

Country Link
JP (1) JPH0468763A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6298155B1 (en) 1997-07-31 2001-10-02 Sony Corporation Apparatus and method for generating time-series data, apparatus and method for editing curves and recording medium having program recorded thereon
US6621924B1 (en) 1999-02-26 2003-09-16 Sony Corporation Contour extraction apparatus, a method thereof, and a program recording medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6298155B1 (en) 1997-07-31 2001-10-02 Sony Corporation Apparatus and method for generating time-series data, apparatus and method for editing curves and recording medium having program recorded thereon
US6621924B1 (en) 1999-02-26 2003-09-16 Sony Corporation Contour extraction apparatus, a method thereof, and a program recording medium

Similar Documents

Publication Publication Date Title
US6094511A (en) Image filtering method and apparatus with interpolation according to mapping function to produce final image
KR100660490B1 (en) Image blending by guided interpolation
US5715331A (en) System for generation of a composite raster-vector image
KR100374019B1 (en) Image processing method and apparatus, image processing system, and storage medium
JPH04227585A (en) Method and apparatus for forming improved control-data line
JP3142550B2 (en) Graphic processing unit
JPH1023267A (en) Sharpness-processing unit for image
US6611632B1 (en) Device and method for interpolating image data and medium on which image data interpolating program is recorded
JPH0468763A (en) Cutout mask generating method
JPH0746416A (en) Color picture processing method
JP4164215B2 (en) Image processing method, apparatus, and recording medium
US20060119897A1 (en) Output apparatus and program thereof
JP4708866B2 (en) Lookup table creation device and method, and lookup table creation program
KR20020084321A (en) real-time character composition method using template
JPH07334648A (en) Method and device for processing image
JPH05336346A (en) Image processing method and storage device
JP3015075B2 (en) How to make a cutout mask
JP2006059092A (en) Catchlight synthesis method
JP2713677B2 (en) Color image color change processing method and color image synthesis processing method
JP2729278B2 (en) Image binarization expression method
JPH04122991A (en) Composing method for image and character
JP2008059122A (en) Image processing apparatus, method, program, and information recording medium
AU727553B2 (en) Improvements in Image Filtering
JP4055966B2 (en) Scanner device, document scanning method, and recording medium recording scan program
JP2716202B2 (en) Cutting device