JPH10105681A - Image processing method - Google Patents

Image processing method

Info

Publication number
JPH10105681A
JPH10105681A JP8256097A JP25609796A JPH10105681A JP H10105681 A JPH10105681 A JP H10105681A JP 8256097 A JP8256097 A JP 8256097A JP 25609796 A JP25609796 A JP 25609796A JP H10105681 A JPH10105681 A JP H10105681A
Authority
JP
Japan
Prior art keywords
image
pixel
value
original 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.)
Pending
Application number
JP8256097A
Other languages
Japanese (ja)
Inventor
Hideaki Kobayashi
小林  秀章
Koichi Kurashige
功一 倉重
Keiji Minamida
敬二 南田
Takehiko Sato
岳彦 佐藤
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 JP8256097A priority Critical patent/JPH10105681A/en
Publication of JPH10105681A publication Critical patent/JPH10105681A/en
Pending legal-status Critical Current

Links

Landscapes

  • Preparing Plates And Mask In Photomechanical Process (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent the quality degradation of a target image by performing pixel interpolation by using only the picture elements found in a source image included in the substantial area of the target image while referring the source image and both the cutting masks having the resolution of the target image. SOLUTION: A target cutting mask 5, 1st reference cutting mask 3 and 2nd reference cutting mask 4 are prepared from a source cutting mask 2. Besides, a target image 6 is prepared from a source image 1 of resolution A while referring to the 1st reference cutting mask 3 of the same resolution A and the 2nd reference cutting mask 4 of resolution B. The target cutting mask 5 is prepared by performing resolution conversion for the source cutting mask 2. At such a time, label values (s) and (t) are determined at the pixel positions of the target image and the source image and it is determined whether these pixel positions are included in the substantial area or a background area. Then, only the values of picture elements surrounding a prescribed point position in the substantial area of the source image are used for pixel interpolation. Thus, pixel values in the background area are not mixed into the pixel values in the substantial area.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、原画像の中の所定
の領域を、その原画像に対応する切り抜きマスクで切り
抜いて目的とする画像(本明細書中ではこの画像を目的
画像と称する)を得る場合の画像処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a target image obtained by cutting out a predetermined area in an original image using a cutout mask corresponding to the original image (this image is referred to as a target image in this specification). The present invention relates to an image processing method for obtaining

【0002】[0002]

【従来の技術】デジタル画像を扱う場合、変倍、回転、
変形等の画像処理を施すことは広く行われている。な
お、変倍処理は後に説明する解像度変換処理と同じ意味
である。
2. Description of the Related Art When dealing with digital images, scaling, rotation,
Performing image processing such as deformation is widely performed. The scaling process has the same meaning as the resolution conversion process described later.

【0003】このような画像処理は、一般的にいうと、
原画像の位置(x,y)における画素の値を目的画像の
位置(u,v)に写す変換ということができる。従っ
て、(u,v)から(x,y)への変換を行う関数をf
とすると、このような画像変換は、原画像に対して関数
-1の演算を施して目的画像を得る処理ということがで
きる。ここで、関数f-1は関数fの逆変換である。
[0003] Such image processing is generally described as follows.
It can be said that the pixel value at the position (x, y) of the original image is converted to the position (u, v) of the target image. Therefore, a function for converting (u, v) to (x, y) is represented by f
Then, such image conversion can be said to be a process of performing an operation of a function f -1 on an original image to obtain a target image. Here, the function f −1 is an inverse transform of the function f.

【0004】例えば関数fがFor example, if the function f is

【0005】[0005]

【数1】 (Equation 1)

【0006】で表される線形変換であるときは原画像を
a倍に変倍する変換を表す。なお、(1)式において、a
> 1なら拡大であり、0 <a< 1である場合には縮小を
示す。
[0006] When the linear transformation is represented by the following equation, it represents a transformation for scaling the original image a times. Note that, in equation (1), a
> 1 indicates enlargement, and 0 <a <1 indicates reduction.

【0007】また、関数fがThe function f is

【0008】[0008]

【数2】 (Equation 2)

【0009】で表される線形変換である場合には、角度
θだけ回転する変換を表す。
In the case of the linear transformation represented by the following equation, the transformation is rotated by the angle θ.

【0010】さて、このように原画像から関数f-1によ
って目的画像を得るための手法としては一般的に補間法
が用いられる。補間法とは、目的画像の各画素に対し
て、その位置(u,v)(u,vは整数値)に関数fに
よる変換を施して原画像上の対応する位置(x,y)を
求め、この求めた位置が原画像上の格子点、即ち原画像
の画素の位置と一致しない場合には、その位置(x,
y)の周囲の画素の値からその位置の値を求め、得られ
た値を目的画像の位置(u,v)の画素の値とする手法
であり、ニアレストネイバー(nearest neighbor)補間
法、バイリニア(bilinear)補間法、キュービックコン
ボリューション(cubic convolution)補間法等が知ら
れている。
An interpolation method is generally used as a method for obtaining a target image from an original image using the function f -1 as described above. Interpolation means that, for each pixel of a target image, the position (u, v) (u, v is an integer value) is converted by a function f to obtain a corresponding position (x, y) on the original image. If the obtained position does not match the lattice point on the original image, that is, the position of the pixel of the original image, the position (x,
This is a method in which the value of the position is obtained from the values of the pixels around y), and the obtained value is used as the value of the pixel at the position (u, v) of the target image. A bilinear interpolation method, a cubic convolution interpolation method, and the like are known.

【0011】例を示すと次のようである。なお、以下に
おいては原画像はラスタ画像のデータであるとする。
An example is as follows. In the following, the original image is assumed to be raster image data.

【0012】いま、原画像の画素が(x,y)空間に図
4のAで示すように配列されており、目的画像の画素が
(u,v)空間に図4のBで示すように配列されている
とし、目的画像の(u,v)の位置にある画素Qに対し
て関数fによる変換を施して原画像上の位置(x,y)
を求めたときPで示すようであったとすると、このPの
位置は原画像の画素の位置と一致しない。そこで、位置
Pの周囲の画素の値を用いて位置Pにおける値を補間し
て求め、その求めた値を目的画像の画素Qの画素の値と
するのである。そしてその際、補間法としてバイリニア
補間法を用いる場合には、図中Pで示す位置を取り囲む
4つの画素P1 ,P2 ,P3 ,P4 の値を用い、キュー
ビックコンボリューション補間法を用いる場合にはPで
示す位置を取り囲む16個の画素の値を用いることにな
る。
Now, the pixels of the original image are arranged in the (x, y) space as shown in FIG. 4A, and the pixels of the target image are arranged in the (u, v) space as shown in FIG. Assuming that the pixels are arrayed, the pixel Q at the position (u, v) of the target image is subjected to conversion by the function f and the position (x, y) on the original image
Is obtained, the position of P does not match the position of the pixel of the original image. Therefore, the value at the position P is obtained by interpolation using the values of the pixels around the position P, and the obtained value is used as the value of the pixel Q of the target image. In this case, when the bilinear interpolation method is used as the interpolation method, the values of the four pixels P 1 , P 2 , P 3 , and P 4 surrounding the position indicated by P in the figure are used, and the cubic convolution interpolation method is used. In this case, the values of 16 pixels surrounding the position indicated by P are used.

【0013】なお、ニアレストネイバー補間法、バイリ
ニア補間法、キュービックコンボリューション補間法に
ついては何れも周知であるので詳細な説明は省略する。
Since the nearest neighbor interpolation method, bilinear interpolation method, and cubic convolution interpolation method are all well known, detailed description will be omitted.

【0014】また、画素の値は、一般的には実数体上の
線形空間をなすものであればよいが、具体的には輝度、
濃度、色等の値である。画素の値が色である場合には
(R,G,B)の3次元ベクトル、あるいは(C,M,
Y,K)の4次元ベクトルで表されることは当然であ
る。
In general, the pixel value may be any value as long as it forms a linear space on a real number field.
These are values such as density and color. When the pixel value is a color, a three-dimensional vector of (R, G, B) or (C, M,
(Y, K) of course.

【0015】[0015]

【発明が解決しようとする課題】ところで、画像を印刷
する場合等においては、そのデザイン上の必要性から画
像を切り抜いて使用することがある。画像の切り抜きと
は、画像の中の興味の対象物を抽出し、白あるいは単色
の中にはめ込んだり、他の画像の中にはめ込んで使用す
ることをいう。
When an image is printed, the image may be cut out and used because of the necessity of the design. Image clipping refers to extracting an object of interest in an image and fitting it into white or monochrome, or fitting it into another image.

【0016】画像の切り抜きを行う場合には、画像のど
の部分を抽出するかを示すための領域の情報を記述した
データが必要となる。このデータを切り抜きマスクとい
い、そのデータ形式としては、画像の中の抽出される領
域(以下、実体領域と称す)で 0または 1の値をとり、
抽出されない領域(以下、背景領域と称す)では 1また
は 0の値をとるラスタ2値画像の形式、それをランレン
グス圧縮した形式、または実体領域と背景領域の境界線
を折れ線や曲線で表現したベクトル形式等がある。
When an image is clipped, data describing area information for indicating which part of the image is to be extracted is required. This data is called a clipping mask, and its data format takes a value of 0 or 1 in an area to be extracted in the image (hereinafter, referred to as a substantial area),
In areas that are not extracted (hereinafter referred to as background areas), a raster binary image format that takes 1 or 0, a run-length compressed form, or a boundary line between the real area and the background area is expressed by a broken line or curve There are vector formats.

【0017】また、切り抜きマスクは一般的にいえば領
域データということができるものであり、任意の位置に
対して、領域データを参照することによってその位置に
対応する領域ラベルの値が取り出せる機能を有していれ
ばよいものである。従って、領域データは2値である必
要はなく、画像を領域分割して各領域に異なる値のラベ
ルを割り当てた多値の画像であってもよいものである。
The cutout mask can be generally referred to as area data, and has a function of extracting an area label value corresponding to an arbitrary position by referring to the area data. It is only necessary to have it. Therefore, the region data need not be binary, and may be a multi-valued image in which the image is divided into regions and labels with different values are assigned to the respective regions.

【0018】以下においては、理解を容易にするため
に、切り抜きマスクはラスタ2値画像のデータ形式であ
るとするが、その他の形式であってもよいことは当然で
ある。そして、実体領域の画素は 0の値をとり、背景領
域の画素は 1の値をとるものとする。なお、切り抜きマ
スクの作成方法については、種々の方法が知られてお
り、何れも周知であるので説明は省略する。
In the following, for easy understanding, the cutout mask is assumed to be in a raster binary image data format, but it is obvious that other formats may be used. Then, it is assumed that the pixels in the real area have a value of 0 and the pixels in the background area have a value of 1. Various methods are known for the method of forming the cutout mask.

【0019】原画像と、それに対応する切り抜きマスク
の例を図5に示す。図5Aは原画像を示し、三角形と、
円と、長方形が描かれている。図5Bは切り抜きマスク
の例を示し、この例によれば原画像の中から三角形の絵
柄を抽出するように指定されている。そして、この切り
抜きマスクでは、実体領域となる三角形の中の全ての画
素の値は 0で、三角形の外の全ての画素の値は 1になっ
ている。
FIG. 5 shows an example of an original image and a cutout mask corresponding to the original image. FIG. 5A shows the original image, with a triangle and
Circles and rectangles are drawn. FIG. 5B shows an example of a cutout mask. According to this example, it is specified to extract a triangular pattern from an original image. In this cutout mask, the values of all the pixels in the triangle serving as the real region are 0, and the values of all the pixels outside the triangle are 1.

【0020】さて、切り抜きマスクによって画像の切り
抜きを行う場合、原画像の解像度と、切り抜きマスクの
解像度が異なる場合がある。このような場合には、従来
においては、まず、原画像と切り抜きマスクのそれぞれ
に対して解像度変換の処理、即ち変倍の処理を施して目
的画像の解像度と同じ解像度を有する画像と切り抜きマ
スクを作成し、次に、切り抜きマスクの 0の値を有する
画素に対応する第1変換画像の画素を抽出するようにし
ているのが通常である。
When an image is cut out using a clipping mask, the resolution of the original image may differ from the resolution of the clipping mask. In such a case, conventionally, first, a resolution conversion process, that is, a scaling process is performed on each of the original image and the clipping mask, and an image having the same resolution as the resolution of the target image and the clipping mask are formed. In general, a pixel of the first converted image corresponding to a pixel having a value of 0 in the clipping mask is extracted.

【0021】しかしながら、このような方法では抽出し
た画像の輪郭部で画質の劣化が目立つことがある。これ
は次のような理由による。
However, in such a method, the image quality may be noticeably deteriorated at the outline of the extracted image. This is for the following reasons.

【0022】いま、目的画像の画素が(u,v)空間に
図6Aに示すように配列されており、原画像の画素が
(x,y)空間に図6Bに示すように配列されていると
する。また、切り抜きマスクを目的画像と同じ解像度に
変換した場合における切り抜き線の一部が図6AのLで
示す位置にあり、切り抜き線L上にある画素及びその左
側にある画素を抽出するようになされているとする。
Now, the pixels of the target image are arranged in the (u, v) space as shown in FIG. 6A, and the pixels of the original image are arranged in the (x, y) space as shown in FIG. 6B. And Further, when the cutout mask is converted to the same resolution as the target image, a part of the cutout line is located at a position indicated by L in FIG. 6A, and a pixel on the cutout line L and a pixel on the left side thereof are extracted. Suppose

【0023】そして、目的画像の画素Qを原画像上に変
換したときPで示す位置にあり、また切り抜き線Lを原
画像上に変換したとき図6BのL′で示す位置にあった
とする。
It is assumed that the pixel Q of the target image is located at the position indicated by P when converted into the original image, and the cutout line L is located at the position indicated by L 'in FIG. 6B when converted into the original image.

【0024】このとき、上述したように、原画像のPの
位置の値をその周辺の画素の値から求め、その値を目的
画像の画素Qの値とするのであるが、その際バイリニア
補間法を用いるものとすると、Pの位置の値を求める場
合には図6BのPB1で示す画素の値を用いることになる
が、このPB1で示す画素は切り抜き線L′の右側にある
ので背景領域にある画素である。
At this time, as described above, the value of the position of P in the original image is obtained from the values of the pixels around it, and the value is used as the value of the pixel Q in the target image. When the value of the position of P is obtained, the value of the pixel indicated by P B1 in FIG. 6B is used. However, since the pixel indicated by P B1 is on the right side of the cutout line L ′, Pixels in the area.

【0025】つまり、目的画像の実体領域にある画素Q
の値には原画像の背景領域の画素PB1の値も反映されて
いるのである。この結果、画素の値が色である場合に
は、画素Qの色には原画像の背景領域にある画素PB1
色が滲み出てくることになり、切り抜かれた画像の品質
が劣化してしまうのである。
That is, the pixel Q in the substantial area of the target image
Also reflects the value of the pixel P B1 in the background area of the original image. As a result, when the value of the pixel is a color, the color of the pixel P B1 in the background area of the original image oozes out in the color of the pixel Q, and the quality of the clipped image deteriorates. It will be.

【0026】以上のことは補間法としてキュービックコ
ンボリューション補間法を用いる場合にも同様である。
The same applies to the case where the cubic convolution interpolation method is used as the interpolation method.

【0027】このように、解像度を変換するために画素
補間を行うことは、原画像のいくつかの画素の値を適当
な混合比で混ぜ合わせて目的画像の画素の値を作ること
ということができ、これによって画像の滑らかさを保持
し、輪郭部でザラつきが生じるのを抑制することができ
るのであるが、切り抜きマスクによって画像切り抜きを
行う場合には上述したような不都合が生じることがある
のである。特に画素の値が色である場合には実体領域の
色と背景領域の色とでは著しく異なることが多く、切り
抜きの輪郭部近傍では解像度変換のための画素補間によ
り双方の中間的な色の画素が作られてしまい、画質が劣
化してしまうことになるのである。
As described above, performing the pixel interpolation to convert the resolution means that the pixel values of the target image are created by mixing the values of some pixels of the original image at an appropriate mixing ratio. This makes it possible to maintain the smoothness of the image and to suppress the occurrence of graininess at the contour portion, but when performing image clipping using a clipping mask, the above-described inconvenience may occur. It is. In particular, when the pixel value is a color, the color of the real region and the color of the background region often differ significantly. Is created, and the image quality is degraded.

【0028】本発明は、上記の課題を解決するものであ
って、画像切り抜きを行う場合において目的画像の品質
を劣化させることがない画像処理方法を提供することを
目的とするものである。
An object of the present invention is to solve the above-mentioned problems, and an object of the present invention is to provide an image processing method which does not degrade the quality of a target image when performing image clipping.

【0029】[0029]

【課題を解決するための手段】ところで、上述した従来
の問題点は、目的画像の実体領域の画素を作るに際して
原画像の背景領域にある画素の値を用いていることに因
っていることが分かる。そこで、目的画像の実体領域の
画素を作るに際して原画像の実体領域にある画素の値の
みを用いれば上述した問題点を解消できることになる。
図6に即して説明すると、補間法としてバイリニア補間
法を用いるものとすると、従来では、Pで示す位置の値
を求める場合には、Pの位置を取り囲む4画素PR1,P
R2,PR3,PB1の値を用いていたのであるが、本発明に
おいては画素補間によってPで示す位置の値を求める場
合には、Pの位置を取り囲む画素であって原画像の実体
領域にある画素PR1,PR2,PR3の3画素の値のみを用
いるようにするのである。バイリニア補間法以外の補間
法を用いた場合にも同様である。
The above-mentioned conventional problem is caused by using the values of the pixels in the background area of the original image when forming the pixels in the substantial area of the target image. I understand. Therefore, the above-described problem can be solved by using only the values of the pixels in the substantial area of the original image when creating the pixels in the substantial area of the target image.
Referring to FIG. 6, assuming that a bilinear interpolation method is used as an interpolation method, conventionally, when a value of a position indicated by P is obtained, four pixels P R1 , P
Although the values of R2 , P R3 , and P B1 are used, in the present invention, when the value of the position indicated by P is obtained by pixel interpolation, it is a pixel surrounding the position of P and the actual area of the original image. Are used only the values of the three pixels P R1 , P R2 , and P R3 . The same applies when an interpolation method other than the bilinear interpolation method is used.

【0030】そこで、上記の目的を達成するために、本
発明の画像処理方法は、原画像と、原画像に対応し、所
定の解像度を有する切り抜きマスクとに基づいて、所定
の解像度を有する目的画像を作成するための画像処理方
法であって、原画像の解像度を有する切り抜きマスク
と、目的画像の解像度を有する切り抜きマスクとを作成
し、これら両方の切り抜きマスクを参照して、目的画像
の実体領域に入る原画像中の画素を求め、求めた画素の
みを用いて画素補間を行い、目的画像を得ることを特徴
とする。
Therefore, in order to achieve the above object, the image processing method of the present invention provides an object having a predetermined resolution based on an original image and a cutout mask corresponding to the original image and having a predetermined resolution. An image processing method for creating an image, comprising: creating a clipping mask having a resolution of an original image and a clipping mask having a resolution of a target image; and referencing both of these masks to create an entity of the target image. It is characterized in that a pixel in the original image that enters the region is obtained, and pixel interpolation is performed using only the obtained pixel to obtain a target image.

【0031】[0031]

【発明の実施の形態】以下、図面を参照しつつ実施の形
態について説明する。ここでは原画像の解像度はA、原
切り抜きマスクの解像度はA′、目的画像の解像度は
B、目的切り抜きマスクの解像度はB′とする。ここ
で、A=A′であってもよく、またB=B′でもよいこ
とは当然である。
Embodiments of the present invention will be described below with reference to the drawings. Here, the resolution of the original image is A, the resolution of the original clipping mask is A ', the resolution of the target image is B, and the resolution of the target clipping mask is B'. Here, it is natural that A = A 'and B = B'.

【0032】また、目的画像から原画像へ変換するため
の関数、及び目的切り抜きマスクから原切り抜きマスク
へ変換するための関数は共にfであるとし、関数fの逆
関数をf-1で表す。ここで、fは恒等写像であってもよ
いものである。
A function for converting a target image to an original image and a function for converting a target clipping mask to an original clipping mask are both f, and an inverse function of the function f is represented by f -1 . Here, f may be an identity map.

【0033】はじめに、図1に示すように、原画像1
と、それに対応する原切り抜きマスク2が用意されてい
るものとする。原切り抜きマスクは適宜な方法で作成さ
れていてよい。
First, as shown in FIG.
And an original cutout mask 2 corresponding thereto. The original cutout mask may be created by an appropriate method.

【0034】さて、まず、原切り抜きマスク2から、目
的切り抜きマスク5と、第1参照切り抜きマスク3、及
び第2参照切り抜きマスク4の3種類の切り抜きマスク
を作成する。また、原画像1から第1参照切り抜きマス
ク3と第2参照切り抜きマスク4を参照しつつ目的画像
6を作成する。第1参照切り抜きマスク3は解像度がA
の切り抜きマスク、即ち原画像1の解像度と同じ解像度
を有する切り抜きマスクであり、第2参照切り抜きマス
ク4は解像度がBの切り抜きマスク、即ち目的画像6の
解像度と同じ解像度を有する切り抜きマスクである。
First, three types of cutout masks, ie, the target cutout mask 5, the first reference cutout mask 3, and the second reference cutout mask 4, are created from the original cutout mask 2. Further, a target image 6 is created from the original image 1 while referring to the first reference clipping mask 3 and the second reference clipping mask 4. The resolution of the first reference cutout mask 3 is A
, Ie, a clipping mask having the same resolution as that of the original image 1, and the second reference clipping mask 4 is a clipping mask having a resolution B, that is, a clipping mask having the same resolution as that of the target image 6.

【0035】目的切り抜きマスク5は、原切り抜きマス
ク2にf-1の逆変換を施した後に解像度変換を施すこと
によって作成することができる。このことを図1では
「(解像度変換)○f-1」と表記している。即ち、目的
切り抜きマスク5の各画素について、その座標(u,
v)に対して変換fを施して原切り抜きマスク上の位置
(x,y)を求め、その位置(x,y)の周囲の画素の
値から適当な補間法により位置(x,y)での値を算出
し、更に適当な閾値、例えば 0.5で2値化して得られた
値を目的切り抜きマスクの座標(u,v)における値と
するという解像度変換の処理を施すことで作成すること
ができる。第2参照切り抜きマスク5も同様にして作成
することができる。また、原画像1から目的画像6の作
成も同様にして行えばよい。これに対して、第1参照切
り抜きマスク3は原切り抜きマスク2に対して解像度変
換の処理を施すだけで作成することができる。
The target cutout mask 5 can be created by subjecting the original cutout mask 2 to inverse conversion of f -1 and then to resolution conversion. This is described as “(resolution conversion) (f −1 ” in FIG. That is, for each pixel of the target clipping mask 5, the coordinates (u,
v) is subjected to conversion f to obtain a position (x, y) on the original clipping mask, and a value of pixels around the position (x, y) is calculated at a position (x, y) by an appropriate interpolation method. Is calculated, and a value obtained by binarizing the value with an appropriate threshold value, for example, 0.5, is used as a value at the coordinates (u, v) of the target cutout mask. it can. The second reference cutout mask 5 can be created in a similar manner. The creation of the target image 6 from the original image 1 may be performed in the same manner. On the other hand, the first reference cutout mask 3 can be created only by subjecting the original cutout mask 2 to resolution conversion processing.

【0036】次に、第1参照切り抜きマスク3、第2参
照切り抜きマスク4及び原画像1を用いて図2に示す処
理を行う。
Next, the processing shown in FIG. 2 is performed using the first reference clipping mask 3, the second reference clipping mask 4, and the original image 1.

【0037】まず、ステップS1では、第2参照切り抜
きマスク4から一つの画素を選択する。その画素の位置
を(u,v)とする。画素の位置は格子点上にあるので
u,vは共に整数値である。
First, in step S1, one pixel is selected from the second reference cutout mask 4. Let the position of that pixel be (u, v). Since the position of the pixel is on a grid point, u and v are both integer values.

【0038】次に、ステップS2では、その位置(u,
v)に対して変換fを施して原画像1上の位置(x,
y)を求める。x,yは実数値である。
Next, at step S2, the position (u,
v) is transformed f and the position (x,
y). x and y are real values.

【0039】ステップS3では、ステップS1で選択し
た画素位置(u,v)に対してラベル値sを決定する。
ここでは、位置(u,v)のラベル値sは、ステップS
1で選択した第2参照切り抜きマスク4の画素の値であ
るとする。
In step S3, a label value s is determined for the pixel position (u, v) selected in step S1.
Here, the label value s at the position (u, v) is
It is assumed that the value is the value of the pixel of the second reference cutout mask 4 selected in Step 1.

【0040】このラベル値sは、目的画像中の位置
(u,v)の画素が実体領域の画素であるか、背景領域
の画素であるかを示すものである。この場合、s= 0な
ら目的画像のこの位置(u,v)に位置する画素は実体
領域にあり、s= 1なら目的画像のこの位置(u,v)
に位置する画素は背景領域にあることになる。
The label value s indicates whether the pixel at the position (u, v) in the target image is a pixel in the real area or a pixel in the background area. In this case, if s = 0, the pixel located at this position (u, v) of the target image is in the substantial area, and if s = 1, this pixel (u, v) of the target image
Will be in the background area.

【0041】次に、ステップS4では、ステップS2で
求めた原画像1上の位置(x,y)の値を求めるために
用いる原画像1上の画素の位置を求める。このような原
画像1上の画素の位置はどのような補間法を用いて位置
(x,y)の値を求めるかによって異なるが、補間法に
よって一義的に定まるので容易に求めることができる。
例えば、図4に即していえば、ステップS2で図4Aの
Pで示す位置が求められたとし、このPで示す位置の値
をバイリニア補間法によって求めるとすると、ステップ
S4では図4AにおいてP1 ,P2 ,P3 ,P4 で示す
位置Pを取り囲む4つの画素の位置が求められることに
なる。そして、この求めた画素の位置を(x′,y′)
とする。このx′,y′の値は整数値である。
Next, at step S4, the position of a pixel on the original image 1 used for obtaining the value of the position (x, y) on the original image 1 obtained at step S2 is obtained. The position of such a pixel on the original image 1 differs depending on what interpolation method is used to determine the value of the position (x, y), but can be easily determined because it is uniquely determined by the interpolation method.
For example, according to FIG. 4, it is assumed that the position indicated by P in FIG. 4A is obtained in step S2, and the value of the position indicated by P is obtained by the bilinear interpolation method. In step S4, P 1 in FIG. , P 2 , P 3 , and P 4 , the positions of four pixels surrounding the position P are determined. Then, the position of the obtained pixel is represented by (x ′, y ′)
And The values of x 'and y' are integer values.

【0042】次に、ステップS5では、ステップS4で
求められた原画像1上の画素位置(x′,y′)の中か
ら一つの画素位置を選択し、第1参照切り抜きマスク2
上の同一位置(x′,y′)にある画素の値を読み込
み、その値を原画像1上の画素位置(x′,y′)にお
けるラベル値tとする。
Next, in step S5, one pixel position is selected from the pixel positions (x ', y') on the original image 1 obtained in step S4, and the first reference cutout mask 2 is selected.
The value of the pixel at the same position (x ', y') is read, and the value is set as the label value t at the pixel position (x ', y') on the original image 1.

【0043】このことから、このラベル値tは、原画像
1上の座標(x′,y′)にある画素が実体領域の画素
であるか、背景領域の画素であるかを示すものであるこ
とがわかる。この場合、t= 0なら原画像1のこの座標
(x′,y′)に位置する画素は実体領域にあり、t=
1なら原画像1のこの座標(x′,y′)に位置する画
素は背景領域にあることになる。
Thus, the label value t indicates whether the pixel at the coordinates (x ', y') on the original image 1 is a pixel in the real area or a pixel in the background area. You can see that. In this case, if t = 0, the pixel located at these coordinates (x ′, y ′) of the original image 1 is in the real area, and t =
If it is 1, the pixel located at the coordinates (x ', y') of the original image 1 is in the background area.

【0044】次に、ステップS6では、ステップS3で
決定したラベル値sの値と、ステップS5で決定したラ
ベル値tの値を比較し、s=t= 0なら原画像1上の当
該位置(x′,y′)の画素のフラグを立て(ステップ
S7)、そうでない場合にはこの原画像1上の当該位置
(x′,y′)の画素のフラグを落とす(ステップS
8)。
Next, in step S6, the value of the label value s determined in step S3 is compared with the value of the label value t determined in step S5. If s = t = 0, the corresponding position on the original image 1 ( The flag of the pixel at the position (x ', y') on the original image 1 is cleared (step S7).
8).

【0045】そして、ステップS5〜S8の処理をステ
ップS4で求められた原画像1上の画素位置の全ての画
素位置について行う。これがステップS9の判断であ
る。
Then, the processing of steps S5 to S8 is performed for all the pixel positions on the original image 1 obtained in step S4. This is the determination in step S9.

【0046】ここまでの処理によって、目的画像で実体
領域となる画素を作るために用いる原画像1の画素が選
択され、その画素に対してのみフラグが立てられること
になる。
By the processing up to this point, the pixels of the original image 1 to be used for forming the pixels that are to be the real regions in the target image are selected, and only those pixels are flagged.

【0047】例えば図6に即して説明すると次のようで
ある。なお、図6Aは第2参照切り抜きマスク4を示
し、線Lは切り抜き線の境界であり、線L上の画素及び
その左側の画素の値が 0、線Lより右側にある画素の値
は 1であるとする。また、図6Bは原画像1を示し、線
L′は第1参照切り抜きマスク2での切り抜き線の境界
であり、第1参照切り抜きマスク2においては線L′の
左側の画素の値は 0、線L′より右側にある画素の値は
1であるとする。更に、補間法としてバイリニア補間法
を用いるとする。
The following is a description, for example, with reference to FIG. FIG. 6A shows the second reference cutout mask 4, in which the line L is the boundary of the cutout line, and the value of the pixel on the line L and the pixel on the left side thereof is 0, and the value of the pixel on the right side of the line L is 1 And FIG. 6B shows the original image 1, and the line L ′ is the boundary of the cutout line in the first reference cutout mask 2. In the first reference cutout mask 2, the value of the pixel on the left side of the line L ′ is 0, The value of the pixel to the right of line L 'is
Let it be 1. Further, it is assumed that a bilinear interpolation method is used as the interpolation method.

【0048】さて、いま、ステップS1で図6AのQで
示す画素が選択されたとし、ステップS2で求めた原画
像1上の位置がPで示すようであったとすると、ステッ
プS3ではQの画素位置のラベル値sの値は 0となされ
る。なぜなら、Qの位置にある画素は目的画像において
実体領域の画素となるからである。
Now, assuming that the pixel indicated by Q in FIG. 6A is selected in step S1 and that the position on the original image 1 obtained in step S2 is as indicated by P, in step S3 the pixel of Q The value of the position label value s is set to 0. This is because the pixel at the position of Q becomes a pixel of the substantial area in the target image.

【0049】ステップS4では図6Bの位置Pを取り囲
む4つの画素PR1,PR2,PR3,PB1の位置が求められ
る。そして、これら4つの画素位置についてステップS
5〜S8の処理を施すのであるが、この中の3つの画素
R1,PR2,PR3の位置のラベル値tは 0となり、残り
の画素PB1の位置のラベル値tは 1となる。
In step S4, the positions of four pixels P R1 , P R2 , P R3 and P B1 surrounding the position P in FIG. 6B are obtained. Then, for these four pixel positions, step S
5 to S8 are performed. The label value t at the position of the three pixels P R1 , P R2 , and P R3 is 0, and the label value t at the position of the remaining pixels P B1 is 1. .

【0050】従って、原画像1上の3つの画素PR1,P
R2,PR3に対してはステップS7においてフラグが立て
られ、原画像1上の画素PB1に対してはステップS8に
おいてフラグが落とされることになる。
Therefore, three pixels P R1 , P R on the original image 1
R2, flagged in step S7 for P R3, so that the flag is dropped in step S8 to the pixel P B1 on the original image 1.

【0051】以上がステップS9までの処理であるが、
このようにして目的画像上において実体領域にある画素
の値を求めるための原画像1上の画素位置を求めると、
次に図3のステップS10の処理を実行する。
The above is the processing up to step S9.
In this way, when the pixel position on the original image 1 for obtaining the value of the pixel in the substantial area on the target image is obtained,
Next, the process of step S10 in FIG. 3 is executed.

【0052】このステップS10では、ステップS7で
フラグが立った画素について合成比を決定する。この合
成比は、例えば次のようにして決定することができる。
なおここでは、バイリニア補間法、キュービックコンボ
リューション補間法等の通常の補間法を用いるとする。
In step S10, the combination ratio is determined for the pixels for which the flag has been set in step S7. This composition ratio can be determined, for example, as follows.
Here, it is assumed that a normal interpolation method such as a bilinear interpolation method or a cubic convolution interpolation method is used.

【0053】さて、補間する画素の値を求めるために原
画像1上のn個の画素を用いるとし、それらの画素の値
をPi (i=1,2,…,n)とし、補間のために用いる通常の
補間法によって定められるPi の値の画素に対応する合
成比をai とすると、補間される画素の値Pc は一般に Pc =a11+a22+…+ajj+…+ann …(3) で表される。ここで、 a1+a2+…+aj+…+an= 1 …(4) である。バイリニア補間法の場合にはn= 4であり、キ
ュービックコンボリューション補間法の場合にはn=16
となることはいうまでもない。
Now, it is assumed that n pixels on the original image 1 are used to obtain the value of the pixel to be interpolated, the values of those pixels are set to P i (i = 1, 2,..., N), When the conventional synthesis ratio corresponding to a pixel value of P i defined by interpolation method used for the a i, the value P c of the pixel to be interpolated is generally P c = a 1 P 1 + a 2 P 2 + ... + A j P j +... + A n P n (3) Here, a 1 + a 2 +... + A j +... + A n = 1 (4). In the case of the bilinear interpolation method, n = 4, and in the case of the cubic convolution interpolation method, n = 16.
Needless to say,

【0054】ところが、上述した処理によって補間に用
いる原画像1上の画素の数はn以下であるので、ai
合成比としてそのまま用いることはできない。
However, since the number of pixels on the original image 1 used for interpolation by the above-described processing is n or less, ai cannot be used as a synthesis ratio as it is.

【0055】そこで、li という関数を導入し、ステッ
プS10で求める合成比bi を次の式で与えるものとす
る。
[0055] Thus, by introducing a function called l i, shall be given a combination ratio b i to determine in step S10 by the following equation.

【0056】 bi =aii/(a11+…+ajj+…+ann) …(5) ここで、li はステップS7でフラグが立てられた画素
については 1であり、ステップS8でフラグが立てられ
なかった画素については 0である。
B i = a i l i / (a 1 l 1 +... + A j l j +... + A n l n ) (5) where l i is the value of the pixel flagged in step S 7. It is 1 and 0 for pixels for which no flag was set in step S8.

【0057】従って、補間法としてバイリニア補間法を
用いるものとして上述した図6に即した説明を例にとれ
ば、図6BのPの位置の値を求めるためには一般的には
4つの画素PR1,PR2,PR3,PB1が選択され、これら
の画素に対して、それぞれバイリニア補間法によって合
成比a1 ,a2 ,a3 ,a4 が定まることになるが、上
述した場合にはl1 =l2 =l3 = 1,l4 = 0となる
ので、ステップS10において決定される、補間に用い
る画素PR1,PR2,PR3に対する合成比b1 ,b2 ,b
3 はそれぞれ次のようになる。
Therefore, taking as an example the description with reference to FIG. 6 assuming that the bilinear interpolation method is used as the interpolation method, in order to obtain the value of the position of P in FIG. R1, P R2, P R3, P B1 is selected, for these pixels, the synthetic ratio a 1 by bilinear interpolation method, respectively, a 2, a 3, a 4 becomes that is determined, when the above-mentioned Becomes l 1 = l 2 = l 3 = 1, l 4 = 0, so that the synthesis ratios b 1 , b 2 , b for the pixels P R1 , P R2 , P R3 used in the interpolation determined in step S10.
3 is as follows.

【0058】 b1 =a1/(a1+a2+a3) …(6) b2 =a2/(a1+a2+a3) …(7) b3 =a3/(a1+a2+a3) …(8) ここで、合成比の総和(b1+b2+b3) が 1になるこ
とは明らかである。キュービックコンボリューション補
間法を用いる場合にも同様である。
B 1 = a 1 / (a 1 + a 2 + a 3 ) (6) b 2 = a 2 / (a 1 + a 2 + a 3 ) (7) b 3 = a 3 / (a 1 + a 2) + A 3 ) (8) Here, it is clear that the sum of the synthesis ratios (b 1 + b 2 + b 3 ) becomes 1. The same applies to the case where the cubic convolution interpolation method is used.

【0059】以上のようにして合成比を求めると、次
に、図3のステップS11において、ステップS10で
求めた合成比を用いて原画像1上の位置(x,y)の値
を補間する。上述した例に即して説明すると、図6Bの
R1,PR2,PR3がそのままそれぞれの画素の値を示す
ものとすると、図6BのPで示す位置の値は、 b1R1+b2R2+b3R3 …(9) で求められることになる。
When the combination ratio is obtained as described above, next, in step S11 in FIG. 3, the value of the position (x, y) on the original image 1 is interpolated using the combination ratio obtained in step S10. . To explain according to the above-described example, assuming that P R1 , P R2 , and P R3 in FIG. 6B indicate the values of the respective pixels as they are, the value of the position indicated by P in FIG. 6B is b 1 P R1 + b 2 P R2 + b 3 P R3 (9)

【0060】次に、ステップS11で求めた値を目的画
像の位置(u,v)に書き込む(ステップS12)。そ
して、以上の処理を第2参照切り抜きマスク4の全ての
画素位置について行う。そのための判断処理がステップ
S13である。
Next, the value obtained in step S11 is written to the position (u, v) of the target image (step S12). Then, the above processing is performed for all pixel positions of the second reference cutout mask 4. The determination process for that is step S13.

【0061】以上のようにして目的画像の作成が終了す
ると、それを出力し、更に最初に作成した目的切り抜き
マスク5を出力すればよい。
When the creation of the target image has been completed as described above, the target image is output, and the target clipping mask 5 that is generated first may be output.

【0062】以上のように、本発明によれば、目的画像
の実体領域の画素の値は、原画像1の実体領域の画素の
値からのみ補間されるので、従来のように目的画像の実
体領域の画素の値に原画像1の背景領域の画素の値が混
入することはなく、目的画像の画質の劣化を防止するこ
とができる。なお、目的画像の背景領域は最終的には使
用されないのでどのような値としてもよい。例えば全て
0あるいは 1で埋めるようにすればよい。
As described above, according to the present invention, the values of the pixels in the real area of the target image are interpolated only from the values of the pixels in the real area of the original image 1, so that the real The value of the pixel in the background area of the original image 1 is not mixed with the value of the pixel in the area, and deterioration of the image quality of the target image can be prevented. Note that the background area of the target image is not used finally, so any value may be used. For example, all
Just fill in with 0 or 1.

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

【図1】 本発明による画像処理方法を示すフローチャ
ートである。
FIG. 1 is a flowchart illustrating an image processing method according to the present invention.

【図2】 本発明による画像処理方法を示すフローチャ
ートである。
FIG. 2 is a flowchart illustrating an image processing method according to the present invention.

【図3】 本発明による画像処理方法を示すフローチャ
ートである。
FIG. 3 is a flowchart illustrating an image processing method according to the present invention.

【図4】 補間法を説明するための図である。FIG. 4 is a diagram for explaining an interpolation method.

【図5】 原画像と、それに対応する切り抜きマスクの
例を示す図である。
FIG. 5 is a diagram showing an example of an original image and a cutout mask corresponding to the original image.

【図6】 従来の問題点を説明するための図である。FIG. 6 is a diagram for explaining a conventional problem.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 佐藤 岳彦 東京都新宿区市谷加賀町一丁目1番1号 大日本印刷株式会社内 ────────────────────────────────────────────────── ─── Continued on the front page (72) Inventor Takehiko Sato 1-1-1 Ichigaya Kagacho, Shinjuku-ku, Tokyo Inside Dai Nippon Printing Co., Ltd.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】原画像と、原画像に対応し、所定の解像度
を有する切り抜きマスクとに基づいて、所定の解像度を
有する目的画像を作成するための画像処理方法であっ
て、 原画像の解像度を有する切り抜きマスクと、目的画像の
解像度を有する切り抜きマスクとを作成し、これら両方
の切り抜きマスクを参照して、目的画像の実体領域に入
る原画像中の画素を求め、求めた画素のみを用いて画素
補間を行い、目的画像を得ることを特徴とする画像処理
方法。
An image processing method for creating a target image having a predetermined resolution based on an original image and a clipping mask corresponding to the original image and having a predetermined resolution, comprising: Create a clipping mask having a target image resolution and a clipping mask having the resolution of the target image, refer to both of these clipping masks, determine the pixels in the original image that fall within the substantial area of the target image, and use only the determined pixels. An image processing method for obtaining a target image by performing pixel interpolation.
JP8256097A 1996-09-27 1996-09-27 Image processing method Pending JPH10105681A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8256097A JPH10105681A (en) 1996-09-27 1996-09-27 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8256097A JPH10105681A (en) 1996-09-27 1996-09-27 Image processing method

Publications (1)

Publication Number Publication Date
JPH10105681A true JPH10105681A (en) 1998-04-24

Family

ID=17287856

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8256097A Pending JPH10105681A (en) 1996-09-27 1996-09-27 Image processing method

Country Status (1)

Country Link
JP (1) JPH10105681A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110023987A (en) * 2016-12-01 2019-07-16 韩华泰科株式会社 Image processing apparatus and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110023987A (en) * 2016-12-01 2019-07-16 韩华泰科株式会社 Image processing apparatus and method
CN110023987B (en) * 2016-12-01 2022-11-18 韩华泰科株式会社 Image processing apparatus and method

Similar Documents

Publication Publication Date Title
US5832141A (en) Image processing method and apparatus using separate processing for pseudohalf tone area
JP3882651B2 (en) Image processing apparatus and program
US5737455A (en) Antialiasing with grey masking techniques
US6556711B2 (en) Image processing apparatus and method
JP3882585B2 (en) Image processing apparatus and program
JP2000339449A (en) Picture processor and picture processing method
US6289136B1 (en) Image processing method and apparatus
JP4340888B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
JPH10105681A (en) Image processing method
JP3386203B2 (en) Image information processing method and image information processing apparatus
JP3262425B2 (en) Image processing device
JP2003087558A (en) Apparatus and method for processing image
JPH05160996A (en) Image processing method
JP2575641B2 (en) Image editing processing method
JPH05342340A (en) Method for picture processing and device therefor
JPH06348834A (en) Image processing device
JP3560124B2 (en) Image data interpolation device, image data interpolation method, and medium recording image data interpolation program
JP3054299B2 (en) Image processing apparatus and method
JP2003125197A (en) Image processing apparatus and program
JP3004245B2 (en) Halftone area detection method
JPH07336675A (en) Image encoding and decoding method
JPH07262361A (en) Method and device for image processing
JP2000196859A (en) Image processing method
JPH0468763A (en) Cutout mask generating method
JP2724177B2 (en) Halftone area separation method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040330

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060831

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061030

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20061214

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070214

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070305

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20080314