JP2578431B2 - How to make a picture mask - Google Patents

How to make a picture mask

Info

Publication number
JP2578431B2
JP2578431B2 JP14793087A JP14793087A JP2578431B2 JP 2578431 B2 JP2578431 B2 JP 2578431B2 JP 14793087 A JP14793087 A JP 14793087A JP 14793087 A JP14793087 A JP 14793087A JP 2578431 B2 JP2578431 B2 JP 2578431B2
Authority
JP
Japan
Prior art keywords
area
density
closed
image
mask
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
Application number
JP14793087A
Other languages
Japanese (ja)
Other versions
JPS63313279A (en
Inventor
佐藤  明
清貴 中川
真一 彦坂
靖夫 久保田
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 JP14793087A priority Critical patent/JP2578431B2/en
Publication of JPS63313279A publication Critical patent/JPS63313279A/en
Application granted granted Critical
Publication of JP2578431B2 publication Critical patent/JP2578431B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Preparing Plates And Mask In Photomechanical Process (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は絵柄のマスク作成方法、特にコンピュータを
用いた絵柄のマスク作成方法に関する。
Description: TECHNICAL FIELD The present invention relates to a method for creating a pattern mask, and more particularly to a method for creating a pattern mask using a computer.

〔従来の技術〕[Conventional technology]

印刷の分野では、画像中の必要な絵柄だけを抽出して
印刷に用いるという手法がよく用いられる。この場合、
画像中の必要な絵柄以外の部分(以下背景部分という)
を覆うためのマスクが必要になる。例えば、第2図
(a)に示すような画像がフィルムの形で与えられ、こ
の中のコーヒーカップの部分だけを抽出して印刷に用い
る場合を考える。この場合、コーヒーカップの部分が必
要な絵柄となり、それ以外の部分(ケーキの絵柄部分を
含めて)は背景部分となる。そこで第2図(b)に示す
ようにハッチング部分を遮蔽しうるマスクを作成し、こ
のマスクで第2図(a)に示す画像の背景部分を覆い、
必要な絵柄のみを抽出することになる。
In the field of printing, a technique of extracting only a required picture from an image and using the extracted pattern for printing is often used. in this case,
The part other than the necessary pattern in the image
Requires a mask to cover the surface. For example, consider a case where an image as shown in FIG. 2 (a) is given in the form of a film, and only the coffee cup portion in the image is extracted and used for printing. In this case, the portion of the coffee cup becomes a necessary pattern, and the other portions (including the portion of the cake) become the background. Therefore, as shown in FIG. 2 (b), a mask capable of shielding the hatched portion is created, and the mask covers the background portion of the image shown in FIG. 2 (a).
Only the necessary patterns are extracted.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

従来、このようなマスクの作成は、絵柄の輪郭線を人
手でトレースすることによって行なっていた。ところが
このようなトレースによるマスク作成は、多大な労力を
必要とし、また、精確なマスク作成が困難であるという
問題点がある。特に、樹木等の輪郭線が複雑な絵柄の場
合、忠実なトレースが非常に困難となる。
Conventionally, such a mask has been created by manually tracing the outline of a picture. However, there is a problem that such a trace-based mask preparation requires a great deal of labor, and it is difficult to form a precise mask. In particular, when a contour of a tree or the like is a complicated pattern, it is very difficult to faithfully trace the image.

そこで本発明は精確なマスク作成を容易に行なうこと
ができる絵柄のマスク作成方法を提供することを目的と
する。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a method for producing a mask for a picture, which can easily produce a precise mask.

〔問題点を解決するための手段〕[Means for solving the problem]

本発明は、絵柄を有する画像を複数の画素に分割し、
各画素のもつ濃度値をデータとして入力する画像入力段
階と、画像中に絵柄を囲う外枠線を定義する段階と、こ
の外枠線上の画素のもつ濃度値についてのヒストグラム
を作成する段階と、このヒストグラムについて、頻度が
所定数を超える第1の濃度領域と、頻度が前記所定数以
下となる第2の濃度領域との2つの濃度領域を設定する
段階と、全画像のそれぞれについて、入力した濃度値を
参照し、2つの濃度領域のどちらに所属するかを判断
し、画像を第1の濃度領域に所属する画素の集合から成
る第1属性の閉領域と、第2の濃度領域に所属する画素
の集合から成る第2属性の閉領域とで表現する段階と、
各第1属性の閉領域および各第2属性の閉領域のそれぞ
れについて、絵柄を構成する領域であるか否かを入力
し、画像から絵柄を構成する絵柄構成領域を抽出する段
階と、この抽出した絵柄構成領域と画像とを重畳して表
示する段階と、この表示に基づいてオペレータが指定さ
れた閉領域に関する情報を入力する段階と、この入力し
た閉領域を新たに絵柄構成領域に加え、この更新した絵
柄構成領域に基づいてマスクを作成する段階と、によっ
て絵柄のマスクを作成するようにしたものである。
The present invention divides an image having a pattern into a plurality of pixels,
An image input step of inputting the density value of each pixel as data, a step of defining an outer frame line surrounding the picture in the image, and a step of creating a histogram of the density values of the pixels on the outer frame line, For this histogram, two density areas, a first density area whose frequency exceeds a predetermined number and a second density area whose frequency is equal to or less than the predetermined number, are set. Referring to the density value, it is determined which of the two density areas belongs to, and the image belongs to a closed area of the first attribute composed of a set of pixels belonging to the first density area and to the second density area. Expressed by a second attribute closed region consisting of a set of pixels
For each of the first attribute closed area and the second attribute closed area, it is input whether or not the area is a picture constituting area, and a picture constituting area constituting the picture is extracted from the image. A step of superimposing and displaying the image composed area and the image, a step of inputting information on the specified closed area by the operator based on the display, and newly adding the input closed area to the image composed area, A step of creating a mask based on the updated pattern configuration region, thereby creating a mask of the pattern.

〔作 用〕(Operation)

画像は濃度値をもった画素の集合としてコンピュータ
に取り込まれる。この取込まれた画素について、絵柄内
の画素か背景内の画素かがコンピュータによって判断さ
れるため、トレースのような人手を必要とすることなし
に、絵柄の抽出が可能である。上記判断は、絵柄を囲う
外枠線上の画素を背景内の基準画素として取出し、この
基準画素の濃度ヒストグラムを参照して行なわれる。し
かも、抽出された絵柄構成領域は画像に重畳されて表示
される。オペレータはこの表示を見ながら、絵柄構成領
域を修正することができ、精確な絵柄の抽出が可能であ
る。
An image is taken into a computer as a set of pixels having density values. Since the computer determines whether the captured pixel is a pixel in the picture or a pixel in the background, the picture can be extracted without the need for a manual operation such as a trace. The above determination is made by taking a pixel on the outer frame line surrounding the picture as a reference pixel in the background and referring to the density histogram of this reference pixel. In addition, the extracted picture configuration area is displayed superimposed on the image. The operator can correct the picture configuration area while watching this display, and can extract a precise picture.

〔実施例〕〔Example〕

以下本発明を図示する実施例に基づいて詳述する。第
1図は本発明に係るマスク作成方法の手順を示す流れ図
である。なお、ここで述べる手順のうちステップS6まで
の手順は、本願と同一出願人によって出願された昭和61
年特許願第211947号に開示された手順と全く同じであ
る。
Hereinafter, the present invention will be described in detail with reference to the illustrated embodiments. FIG. 1 is a flowchart showing a procedure of a mask producing method according to the present invention. The procedure up to step S6 in the procedure described here is the same as the one shown in 1986 by the same applicant as the present application.
The procedure is exactly the same as that disclosed in Japanese Patent Application No. 211947.

いま、例えば第2図(a)に示すような画像につい
て、同図(b)に示すようなマスクを作成する場合を考
える。まずステップS1において、画像の入力を行なう。
即ち、第2図(a)に示すような画像を複数の画素に分
割し、各画素のもつ濃度値をデータとして入力するので
ある。これは例えばスキャナ等の入力装置を用いて画像
を光学的に走査し、各画素のもつ濃度値をデジタルデー
タとしてコンピュータに取込めばよい。一般にこの濃度
値は、2のべき乗の階調数を有するデジタルデータで表
現される。例えば各画素を0〜255の濃度値で表現すれ
ばよい。この入力した各画素のデータはコンピュータ内
のメモリに記憶される。
Now, consider the case where a mask as shown in FIG. 2B is created for an image as shown in FIG. 2A. First, in step S1, an image is input.
That is, the image as shown in FIG. 2A is divided into a plurality of pixels, and the density value of each pixel is input as data. For example, an image may be optically scanned using an input device such as a scanner, and the density value of each pixel may be captured as digital data by a computer. Generally, this density value is represented by digital data having a power-of-two gradation number. For example, each pixel may be represented by a density value of 0 to 255. The input data of each pixel is stored in a memory in the computer.

次にステップS2において、外枠線の定義を行なう。こ
の外枠線は画像中の絵柄を囲う線で、例えば第2図
(c)に一点鎖線で示すような四角形の枠を外枠線Fと
して定義すればよい。このような定義は、メモリ内に記
憶された各画素のデータに基づいて第2図(c)に示す
ような画面のディスプレイ上に表示させ、オペレータが
タブレット等の入力手段を用いてディスプレイ画面上で
定義すればよい。この外枠線上の画素が、以後の手順で
背景部分を代表する画素となる。従って、この外枠線は
必ずしも四角形である必要はなく、また閉じた線である
必要もない。ただ、背景部分を代表する画素をできる限
り広い領域にわたってできる限り数多くサンプリングす
るためには、第2図(c)に示すように四角形とするの
が好ましい。
Next, in step S2, an outer frame line is defined. This outer frame line is a line surrounding the picture in the image. For example, a rectangular frame as shown by a dashed line in FIG. 2 (c) may be defined as the outer frame line F. Such a definition is displayed on the screen display as shown in FIG. 2 (c) based on the data of each pixel stored in the memory, and the operator uses the input means such as a tablet to display the definition on the display screen. Can be defined as The pixels on the outer frame line become the pixels representing the background portion in the subsequent procedure. Therefore, the outer frame line does not necessarily have to be a quadrangle, nor does it need to be a closed line. However, in order to sample as many pixels as possible representing the background portion over as large a region as possible, it is preferable to make the pixels rectangular as shown in FIG. 2 (c).

続いてステップS3において、濃度値のヒストグラム作
成が行なわれる。即ち、外枠線F上のすべての画素のも
つ濃度値についての頻度を求めるのである。このヒスト
グラムは例えば第3図(a)のようになる。一般にこの
ようなヒストグラムはいくつかのピークをもったグラフ
となる。第3図(a)は通常得られる典型的なヒストグ
ラムを示し、頻度0の濃度領域と頻度1以上の濃度領域
とがはっきり分けられている。
Subsequently, in step S3, a histogram of density values is created. That is, the frequency for the density values of all the pixels on the outer frame line F is obtained. This histogram is, for example, as shown in FIG. Generally, such a histogram is a graph having several peaks. FIG. 3 (a) shows a typical histogram which is usually obtained, in which a density region having a frequency of 0 and a density region having a frequency of 1 or more are clearly separated.

次にステップS4において、濃度領域の設定を行なう。
即ち、頻度について所定数aを設定し、ステップS3で作
成したヒストグラムについて、頻度が所定数aを超える
第1の濃度領域と、頻度が所定数a以下となる第2の濃
度領域との2つの濃度領域を設定する。例えば第3図
(a)に示すヒストグラムでは、所定数a=0とすれ
ば、第3図(b)に示されるように、属性“0"で示され
る第1の濃度領域(頻度0を超える領域)と、属性“1"
で示される第2の濃度領域(頻度0の領域)とが設定さ
れる。また、例えば第3図(c)に示すヒストグラムで
は、ピークの部分が第1の濃度領域となるように適当に
所定数aを決定し、2つの濃度領域を図のように設定す
ればよい。
Next, in step S4, a density area is set.
That is, a predetermined number a is set for the frequency, and the histogram created in step S3 is divided into a first density area where the frequency exceeds the predetermined number a and a second density area where the frequency is equal to or less than the predetermined number a. Set the density area. For example, in the histogram shown in FIG. 3 (a), if the predetermined number a = 0, as shown in FIG. 3 (b), the first density region indicated by the attribute “0” (frequency exceeding 0) Area) and attribute "1"
And a second density area (area with a frequency of 0) indicated by. Further, for example, in the histogram shown in FIG. 3 (c), the predetermined number a may be appropriately determined so that the peak portion becomes the first density area, and the two density areas may be set as shown in the figure.

次にステップS5において、属性“0"の領域内の濃度値
を有する画素の集合から成る属性“0"の閉領域と、属性
“1"の領域内の濃度値を有する画素の集合から成る属性
“1"の閉領域とを形成する。これにより、例えば第2図
(d)に示すような閉領域A〜Eが形成されることにな
る。ここで閉領域Aは属性“0"を有する背景部分の閉領
域であり、閉領域Bは属性“1"を有する必要な絵柄(コ
ーヒーカップ)部分の閉領域である。また、閉領域Cは
属性“0"を有する背景部分の閉領域である。このよう
に、一般に背景部分の閉領域は属性“0"、必要な絵柄部
分の閉領域は属性“1"となる。
Next, in step S5, an attribute “0” closed region consisting of a set of pixels having a density value in the region of the attribute “0” and an attribute consisting of a set of pixels having a density value in the region of the attribute “1” A closed area of “1” is formed. As a result, for example, closed areas A to E as shown in FIG. 2D are formed. Here, the closed area A is a closed area of a background part having the attribute “0”, and the closed area B is a closed area of a necessary picture (coffee cup) part having the attribute “1”. Further, the closed region C is a closed region of the background portion having the attribute “0”. As described above, generally, the closed region of the background portion has the attribute “0”, and the closed region of the required picture portion has the attribute “1”.

ところが、閉領域Dのように、必要な絵柄部分内の閉
領域であるにもかかわらず、たまたまその画素の濃度値
分布が背景部分の濃度値分布に類似していると、ステッ
プS5の段階では属性“0"が割当てられてしまう。また、
逆に閉領域Eのように、必要でない絵柄部分について
は、本来背景部分と同等に扱わねらばならないのに属性
“1"が割当てられてしまう。このようなことから、背景
部分の属性は“0"、必要な絵柄部分の属性は“1"と画一
的に処理すると不都合が生じる可能性がある。そこでス
テップS6において、絵柄構成領域の抽出を行なう。例え
ば第2図(d)に示すように、背景とすべき閉領域A,C,
E内の任意の1点P,Q,Rを、グラフィックタブレット等の
入力手段によってオペレータが指示するようにすればよ
い。逆に必要な絵柄となるべき閉領域B,Dの方を指示す
るようにしてもよい。この操作によって、すべての閉領
域が背景となるべき閉領域か、または必要な絵柄を構成
するべき閉領域か、のどちらかに確定することになる。
従って第2図(b)に示すようなマスクの作成をコンピ
ュータによって自動的に行なうことができる。
However, if the density value distribution of the pixel happens to be similar to the density value distribution of the background portion even though it is a closed region in a necessary picture portion like the closed region D, in the step S5, Attribute "0" is assigned. Also,
Conversely, an unnecessary pattern portion, such as the closed region E, is assigned the attribute “1” although it should be treated as if it were originally a background portion. For this reason, if the attribute of the background part is uniformly processed as "0" and the attribute of the required picture part as "1", inconvenience may occur. Therefore, in step S6, a pattern configuration area is extracted. For example, as shown in FIG. 2 (d), closed areas A, C,
The operator may designate any one point P, Q, R in E by input means such as a graphic tablet. Conversely, the closed areas B and D to be the required picture may be indicated. By this operation, all the closed areas are determined to be either the closed areas to be the background or the closed areas to form the required picture.
Therefore, a mask as shown in FIG. 2B can be automatically created by a computer.

なお、上述の実施例では、画像がモノクロである場合
を例にとって本発明を説明したが、カラー画像について
も同様に本発明を適用できる。この場合、カラー画像を
R,G,B(赤,緑,青)またはY,M,C(黄,マゼンタ,シア
ン)等の基準色に分け、各基準色ごとに複数の画素に分
割してステップS1の画像入力を行なえばよい。続いてス
テップS2〜S4については、各基準色ごとに手順を進めて
ゆく。例えばR,G,Bを三基準色として用いた場合には、
R,G,Bのそれぞれについて第3図(b)に示すようなヒ
ストグラムが得られ、それぞれについて属性“0"で示さ
れる第1の濃度領域と属性“1"で示される第2の濃度領
域とが設定される。次にステップS5において、閉領域の
形成を行なうが、このとき、ある画素の全基準色につい
ての属性の論理和をとったものをその画素の属性と定義
する。即ち、各基準色のすべてに関して属性“0"で示さ
れる濃度領域に所属する画素を属性“0"の画素とし、こ
の属性“0"の画素の集合から成る閉領域を属性“0"の閉
領域とし、一方、各基準色のいずれかに関して属性“1"
で示される濃度領域に所属する画素を属性“1"の画素と
し、この属性“1"の画素の集合体から成る閉領域を属性
“1"の閉領域とするこになる。別言すれば、R,G,Bそれ
ぞれについてのヒストグラムを重ね、ピークが3つとも
重なり当った濃度領域に属する画素が属性“0"の画素と
なり、それ以外の画素が属性“1の画素となる。続いて
ステップS6における絵柄構成領域の抽出をモノクロ画像
と同様に行なえばカラー画像についてのマスク作成を行
なうことができる。
In the above-described embodiment, the present invention has been described by taking an example in which an image is monochrome, but the present invention can be similarly applied to a color image. In this case, the color image
Divide into reference colors such as R, G, B (red, green, blue) or Y, M, C (yellow, magenta, cyan), divide into multiple pixels for each reference color, and Just do it. Subsequently, in steps S2 to S4, the procedure proceeds for each reference color. For example, when R, G, B are used as three reference colors,
A histogram as shown in FIG. 3 (b) is obtained for each of R, G, and B, and for each, a first density area indicated by an attribute “0” and a second density area indicated by an attribute “1” Is set. Next, in step S5, a closed area is formed. At this time, a logical sum of the attributes of all the reference colors of a certain pixel is defined as the attribute of the pixel. That is, pixels belonging to the density area indicated by the attribute “0” for all of the reference colors are defined as pixels having the attribute “0”, and a closed area including a set of pixels having the attribute “0” is defined as a closed area having the attribute “0”. Area, while attribute "1" for any of the reference colors
Pixels belonging to the density area indicated by are defined as pixels having the attribute “1”, and a closed area formed of a group of pixels having the attribute “1” is defined as a closed area having the attribute “1”. In other words, the histograms for each of R, G, and B are superimposed, and the pixels belonging to the density region where all three peaks overlap are the pixels with the attribute “0”, and the other pixels are the pixels with the attribute “1”. Subsequently, if the extraction of the picture configuration area in step S6 is performed in the same manner as the monochrome image, a mask can be created for the color image.

前述のように、ここまでの手順は昭和61年特許願第21
1947号に開示した技術と同じものであるが、本発明では
これを更に改良してマスクの修正作業を行なえるように
している。理想的な画像であれば、ステップS6までの手
順によって第2図(b)に示すような完全なマスクの作
成ができるが、実際には画像によって完全なマスクが得
られないことがある。たとえば、第4図(a)に示すよ
うに、ちょうどコーヒーカップの口の部分に相当する閉
領域Gの濃度分布が背景領域Hの濃度分布に近い場合、
背景領域Hと閉領域Gとが同一の領域として取扱われ、
同図(b)に示すようにステップS6で完成したマスクが
部分的に欠けたものとなってしまうのである。本発明に
係る方法では、このような不完全なマスクを次のように
して修正することができる。
As described above, the procedure up to this point is based on Patent Application No. 21 of 1986.
The technique is the same as the technique disclosed in Japanese Patent No. 1947, but is further improved in the present invention so that the mask can be repaired. In the case of an ideal image, a complete mask as shown in FIG. 2B can be created by the procedure up to step S6, but a complete mask may not actually be obtained depending on the image. For example, as shown in FIG. 4 (a), when the density distribution of the closed region G corresponding to the mouth portion of the coffee cup is close to the density distribution of the background region H,
The background area H and the closed area G are treated as the same area,
As shown in FIG. 6B, the mask completed in step S6 is partially missing. With the method according to the invention, such imperfect masks can be corrected as follows.

まず、ステップS7において、絵柄構成領域と画像とを
ディスプレイ装置上で重畳表示する。この重畳表示は種
々の方法で行うことができる。たとえば、この実施例で
は第4図(c)に示すように、画像を構成する各部分の
うち絵柄構成領域と重畳している部分を赤のモノトーン
表示で示している。すなわち、第4図(c)の画像はRG
Bの三原色で表されるカラー画面としてディスプレイ装
置上に表示されているが、ハッチングの施された重畳部
分はRの色要素だけによる階調によって表されている。
これは、ステップS6において、絵柄構成領域を抽出した
あと、この領域の画素のもつRGBの各濃度値の平均値を
Rの濃度値とし、GおよびBの濃度値を0とするような
演算処理を行えばよい。第4図(c)でのハッチング領
域は、赤いセロファンを通して画像を見ているような状
態となる。なお、重畳表示は、このようなモノトーンに
よる表示に限定されるわけではなく、重畳部分をハッチ
ング表示するとか、高輝度表示するとか、種々の方法で
行うことができる。
First, in step S7, the picture configuration area and the image are superimposed on the display device. This superimposed display can be performed by various methods. For example, in this embodiment, as shown in FIG. 4 (c), of the respective parts constituting the image, the part overlapping the picture forming area is shown in red monotone display. That is, the image in FIG.
The color screen represented by the three primary colors B is displayed on the display device, and the superimposed portion with hatching is represented by the gradation using only the R color element.
This is because, in step S6, after extracting the picture forming region, the average value of the RGB density values of the pixels in this region is set to the R density value, and the G and B density values are set to 0. Should be performed. The hatched area in FIG. 4 (c) is in a state where an image is viewed through a red cellophane. Note that the superimposed display is not limited to such a monotone display, and the superimposed portion can be displayed by hatching, high-luminance display, or various other methods.

オペレータはこのような重畳表示を見ながら、マスク
の不完全な部分がどこであるかを認識することができ
る。そこでステップS8において、不完全な閉領域を補う
べく、この不完全領域についての情報の入力が行われ
る。たとえば、第4図(c)の例では、オペレータは閉
領域Gに関する情報を入力することになる。この実施例
では、この入力を閉領域に対応する多角形の頂点座標の
入力によって行っている。すなわち、タブレットなどの
座標入力装置から入力した座標に基づいて、ディスプレ
イ装置上にカーソルを表示させ、オペレータの指示によ
って座標値を登録するようにする。第4図(d)に示す
ように、オペレータは表示画面を見ながらタブレットを
操作し、閉領域Gの輪郭線上の数点を登録してゆくこと
になる。この例では、点P1〜P6の6つの点を登録して6
角形で閉領域Gを近似しているが、実際には登録する点
の数を増やして、より正確な多角形近似を行うようにす
る。
The operator can recognize where the incomplete portion of the mask is while watching such superimposed display. Therefore, in step S8, information on the incomplete region is input to compensate for the incomplete closed region. For example, in the example of FIG. 4 (c), the operator inputs information on the closed area G. In this embodiment, this input is performed by inputting the vertex coordinates of the polygon corresponding to the closed area. That is, a cursor is displayed on a display device based on coordinates input from a coordinate input device such as a tablet, and coordinate values are registered according to an instruction of an operator. As shown in FIG. 4 (d), the operator operates the tablet while watching the display screen, and registers several points on the contour of the closed area G. In this example, six points P1 to P6 are registered and 6 points are registered.
Although the closed area G is approximated by a polygon, the number of points to be registered is actually increased to perform more accurate polygonal approximation.

このようにして、多角形の頂点座標が入力されると、
コンピュータはこの多角形によって閉領域を確定するこ
とができる。この閉領域を新たに絵柄構成領域として扱
うことにより、第2図(b)に示すような完全なマスク
が得られるのである(ステップS9)。
In this way, when the vertex coordinates of the polygon are input,
The computer can determine the closed area by the polygon. By completely treating this closed area as a picture forming area, a complete mask as shown in FIG. 2B is obtained (step S9).

第5図は別な方法で修正を行う手順の説明図である。
いま、第5図(a)のように、閉領域Iの濃度分布が背
景領域Hの濃度分布に近いために、同図(b)に示すよ
うに不完全なマスクが形成された場合を考える。この場
合ステップS7の重畳表示は第5図(c)のようになる。
閉領域Iの部分はモノトーン表示されておらず、オペレ
ータはこの領域についての修正入力をすべきであること
を認識し、ステップS8において修正入力を行う。前述の
ように、多角形の頂点座標の入力を行うこともできる
が、このような小領域についての修正入力は次のように
すると容易である。すなわち、入力しようとする小領域
Iを包含するような大きさをもった塗潰し枠Jを表示さ
せ、タブレットなどの座標入力装置からの入力に基づい
てこの塗潰し枠Jを画面上で移動させるようにするので
ある。そして、塗潰し枠Jに包含された閉領域を新たに
絵柄構成領域として扱うようにすればよい。この処理
は、塗潰しJの枠の座標値と、各閉領域の輪郭線の座標
値とに基づいて、後者が前者に包含されたか否かの判断
をコンピュータによって行うことによってなされる。オ
ペレータがタブレットを用いて、塗潰し枠Jを第5図
(d)に示すような位置にまで移動させると、コンピュ
ータは小領域Iを新たに絵柄構成領域に加えることにな
る。このような修正方法は、特に修正対象となる閉領域
が小さな領域の場合に便利である。オペレータは、いわ
ば虫食いの領域を塗潰し枠のブラシをもって塗潰す作業
を行うことになる。修正作業が終了したら、最終的な絵
柄構成領域に基づいてステップS9におけるマスク作成が
行われ、第2図(b)に示すような完全なマスクが作成
される。
FIG. 5 is an explanatory diagram of a procedure for performing correction by another method.
Now, consider a case where the density distribution of the closed region I is close to the density distribution of the background region H as shown in FIG. 5A, and an incomplete mask is formed as shown in FIG. 5B. . In this case, the superimposed display in step S7 is as shown in FIG.
The portion of the closed region I is not displayed in monotone, and the operator recognizes that a correction input should be made for this region, and makes a correction input in step S8. As described above, the coordinates of the vertices of the polygon can be input. However, the correction input for such a small area can be easily performed as follows. That is, a filled frame J having a size including the small area I to be input is displayed, and the filled frame J is moved on the screen based on an input from a coordinate input device such as a tablet. To do so. Then, the closed area included in the filled frame J may be newly treated as a picture configuration area. This processing is performed by the computer determining whether or not the latter is included in the former based on the coordinate values of the frame of the fill J and the coordinate values of the outline of each closed region. When the operator moves the paint frame J to a position as shown in FIG. 5D using the tablet, the computer newly adds the small area I to the picture composition area. Such a correction method is convenient particularly when the closed region to be corrected is a small region. The operator performs the work of painting the insect-eating area with the brush of the painting frame. When the correction work is completed, a mask is created in step S9 based on the final pattern configuration area, and a complete mask as shown in FIG. 2 (b) is created.

以上、修正後の絵柄構成領域データに基づいてマスク
作成が行われる例を示したが、ここで作成されるマスク
は物理的実体のあるマスクとして利用されるだけでな
く、ソフトウェア上のデータとしての概念的なマスクと
しても利用できる。後者の利用方法の一例としては、作
成されたソフトウェア上のマスクデータを利用して、ス
テップS1で入力した画像データから特定の絵柄データの
みを抽出することができる。すなわち、第2図(a)に
示すようなフィルムから入力した一画面のラスターデー
タから、コーヒーカップならコーヒーカップ単独の絵柄
としてのラスターデータを生成することができるのであ
る。このような絵柄単独のラスターデータが得られれ
ば、ディスプレイ装置上で絵柄の割作作業を容易に行う
こともできるようになる。
As described above, the example in which the mask is created on the basis of the corrected pattern configuration area data has been described. However, the mask created here is not only used as a mask having a physical substance, but also as data on software. It can also be used as a conceptual mask. As an example of the latter use method, only specific pattern data can be extracted from the image data input in step S1, using the created mask data on the software. That is, raster data as a picture of a coffee cup alone can be generated for a coffee cup from raster data of one screen input from a film as shown in FIG. 2 (a). If such raster data of a single pattern is obtained, it is possible to easily perform a splitting operation of the pattern on the display device.

〔発明の効果〕〔The invention's effect〕

以上のとおり本発明によれば、絵柄のマスク作成方法
において、絵柄を有する画像を画素の集合としてコンピ
ュータに取込み、絵柄を囲う外枠線上の画素を背景内の
基準画素として取出し、この基準画素の濃度ヒストグラ
ムを参照して絵柄の抽出を自動的に行なうようにし、こ
のあとで絵柄構成領域と画像とを重畳表示して修正を行
なえるようにしたため、精確なマスク作成を容易に行な
うことができるようになる。
As described above, according to the present invention, in a pattern mask creating method, an image having a pattern is taken into a computer as a set of pixels, and pixels on an outer frame line surrounding the pattern are taken out as reference pixels in a background. The pattern is automatically extracted by referring to the density histogram, and then the pattern composition region and the image are superimposed and corrected so that accurate mask creation can be easily performed. Become like

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

第1図は本発明に係るマスク作成方法の手順を示す流れ
図、第2図は本発明に係るマスク作成方法の一実施例の
手順説明図、第3図は第1図におけるステップS3で作成
されたヒストグラムの一例を示す図、第4図および第5
図は第1図におけるステップS7〜S9の作業を示す説明図
である。 A〜I……閉領域、F……外枠線、J……塗潰し枠、 P〜R……指示点
FIG. 1 is a flowchart showing a procedure of a mask making method according to the present invention, FIG. 2 is an explanatory view of a procedure of an embodiment of a mask making method according to the present invention, and FIG. 3 is made at step S3 in FIG. FIG. 4 and FIG.
The figure is an explanatory diagram showing the operations of steps S7 to S9 in FIG. A to I: closed area, F: outer frame line, J: filled frame, P to R: designated point

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭63−66557(JP,A) 特開 昭58−22886(JP,A) 特開 昭58−166348(JP,A) 特開 昭58−176638(JP,A) 特開 昭60−117375(JP,A) ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-63-66557 (JP, A) JP-A-58-22886 (JP, A) JP-A-58-166348 (JP, A) JP-A-58-228 176638 (JP, A) JP-A-60-117375 (JP, A)

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】絵柄を有する画像を複数の画素に分割し各
画素のもつ濃度値をデータとして入力する画像入力段階
と、前記画像中に前記絵柄を囲う外枠線を定義する段階
と、前記外枠線上の画素のもつ濃度値についてのヒスト
グラムを作成する段階と、前記ヒストグラムについて、
頻度が所定数を超える第1の濃度領域と、頻度が前記所
定数以下となる第2の濃度領域との2つの濃度領域を設
定する段階と、前記全画素のそれぞれについて、入力し
た濃度値を参照し、前記2つの濃度領域のどちらに所属
するかを判断し、前記画像を前記第1の濃度領域に所属
する画素の集合から成る第1属性の閉領域と、前記第2
の濃度領域に所属する画素の集合から成る第2属性の閉
領域とで表現する段階と、前記各第1属性の閉領域およ
び/または前記各第2属性の閉領域のそれぞれについ
て、前記絵柄を構成する領域であるか否かを入力し、前
記画像から絵柄を構成する絵柄構成領域を抽出する段階
と、前記画像と前記絵柄構成領域とを重畳して表示する
段階と、前記表示に基づいてオペレータが指定した閉領
域に関する情報を入力する段階と、前記入力した閉領域
を新たに絵柄構成領域に加え、この更新した絵柄構成領
域に基づいてマスクを作成する段階と、 を有することを特徴とする絵柄のマスク作成方法。
An image input step of dividing an image having a picture into a plurality of pixels and inputting a density value of each pixel as data; a step of defining an outer frame line surrounding the picture in the image; Creating a histogram for the density values of the pixels on the outer frame, and for the histogram,
Setting two density areas, a first density area whose frequency exceeds a predetermined number, and a second density area whose frequency is equal to or less than the predetermined number; It is determined which of the two density areas belongs to the image by referring to the closed area having a first attribute including a set of pixels belonging to the first density area and the second attribute.
And a second attribute closed region consisting of a set of pixels belonging to the density region of the first and second attributes, and for each of the first attribute closed region and / or each of the second attribute closed regions, Entering whether or not it is an area to configure, extracting a pattern configuration area that configures a pattern from the image, and displaying the image and the pattern configuration area in a superimposed manner, based on the display Inputting information about the closed area specified by the operator, and adding the input closed area to a new pattern configuration area, and creating a mask based on the updated pattern configuration area. How to make a mask for a picture.
【請求項2】カラー画像を所定の基準色ごとに複数の画
素に分割し、前記各基準色ごとに2つの濃度領域を設定
し、前記各基準色のすべてに関して第1の濃度領域に所
属する画素の集合から成る閉領域を第1属性の閉領域と
し、前記各基準色のいずれかに関して第2の濃度領域に
所属する画素の集合から成る閉領域を第2属性の閉領域
とすることを特徴とする特許請求の範囲第1項記載の絵
柄のマスク作成方法。
2. A color image is divided into a plurality of pixels for each predetermined reference color, two density areas are set for each of the reference colors, and all of the reference colors belong to the first density area. A closed region consisting of a set of pixels is defined as a closed region of a first attribute, and a closed region consisting of a set of pixels belonging to a second density region with respect to any of the reference colors is defined as a closed region of a second attribute. 2. The method for producing a picture mask according to claim 1, wherein:
【請求項3】各画素のもつ濃度値を、2のべき乗の階調
数を有するデジタルデータで表現して入力することを特
徴とする特許請求の範囲第1項または第2項記載の絵柄
のマスク作成方法。
3. The pattern according to claim 1, wherein the density value of each pixel is represented by digital data having a power-of-two gradation number and input. How to make a mask.
【請求項4】ヒストグラムの頻度に関する所定数を零と
することを特徴とする特許請求の範囲第1項乃至第3項
のいずれかに記載の絵柄のマスク作成方法。
4. The method according to claim 1, wherein a predetermined number relating to the frequency of the histogram is set to zero.
【請求項5】閉領域に関する情報の入力を、閉領域に対
応する多角形の頂点座標の入力によって行うことを特徴
とする特許請求の範囲第1項乃至第4項のいずれかに記
載の絵柄のマスク作成方法。
5. The picture according to claim 1, wherein the input of the information on the closed area is performed by inputting the vertex coordinates of a polygon corresponding to the closed area. How to make a mask.
【請求項6】閉領域に関する情報の入力を、その領域を
包含する別な閉領域を指定することによって行うことを
特徴とする特許請求の範囲第1項乃至第4項のいずれか
に記載の絵柄のマスク作成方法。
6. The information processing apparatus according to claim 1, wherein the input of the information on the closed area is performed by designating another closed area including the area. How to make a picture mask.
【請求項7】画像と絵柄構成領域との重畳表示を、画像
の重畳部分をモノトーン表示することによって行うこと
を特徴とする特許請求の範囲第1項乃至第6項のいずれ
かに記載の絵柄のマスク作成方法。
7. The pattern according to claim 1, wherein the superimposed display of the image and the pattern constituting area is performed by displaying a superimposed portion of the image in monotone. How to make a mask.
JP14793087A 1987-06-16 1987-06-16 How to make a picture mask Expired - Lifetime JP2578431B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14793087A JP2578431B2 (en) 1987-06-16 1987-06-16 How to make a picture mask

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14793087A JP2578431B2 (en) 1987-06-16 1987-06-16 How to make a picture mask

Publications (2)

Publication Number Publication Date
JPS63313279A JPS63313279A (en) 1988-12-21
JP2578431B2 true JP2578431B2 (en) 1997-02-05

Family

ID=15441286

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14793087A Expired - Lifetime JP2578431B2 (en) 1987-06-16 1987-06-16 How to make a picture mask

Country Status (1)

Country Link
JP (1) JP2578431B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110246567B (en) * 2018-03-07 2023-07-25 中山大学 Medical image preprocessing method

Also Published As

Publication number Publication date
JPS63313279A (en) 1988-12-21

Similar Documents

Publication Publication Date Title
DE4343362C2 (en) Process for creating harmonious color corrections
EP0986896B1 (en) Color transformation system based on target color image
KR20000068697A (en) Image data processing device and method, and transmission medium
JPH04172770A (en) Picture overlap processing method
JPH08186727A (en) Device and method for processing picture
JPH05250472A (en) Method and device for preparing fine mask of boundary on image in concerned area so as to separate area from remaining parts of image
JP2578431B2 (en) How to make a picture mask
US5559903A (en) Method for generating geometric masks with a digital color computer
JP2936599B2 (en) Color image processing equipment
KR20020084321A (en) real-time character composition method using template
JPH11110577A (en) Device and method for processing image data, and transmission medium thereof
JPH08123940A (en) Method and device for extracting picture area
JPS6366557A (en) Generating method for mask with pattern
JPH077442B2 (en) Image processing method
JP2511731B2 (en) Halftone image processor
JPH01259363A (en) Image contour data generating method
JP3302855B2 (en) Region extraction method and apparatus
JP2685458B2 (en) Image processing method
DE4343581C2 (en) Process for generating geometric masks using a digital color calculator
JPH05250471A (en) Picture processor with contour extraction function
JPH02183873A (en) Picture editing device
JPH05204348A (en) Color image color changing processing system and color image synthesizing processing system
JPH05290133A (en) Color image processor
JPH0240777A (en) Preparing method for image outline data and display method for its preparing process
JPH0642709B2 (en) Method of forming combined image