JPH07203299A - Color adjustment for color picture and method and device for composing picture - Google Patents

Color adjustment for color picture and method and device for composing picture

Info

Publication number
JPH07203299A
JPH07203299A JP6000660A JP66094A JPH07203299A JP H07203299 A JPH07203299 A JP H07203299A JP 6000660 A JP6000660 A JP 6000660A JP 66094 A JP66094 A JP 66094A JP H07203299 A JPH07203299 A JP H07203299A
Authority
JP
Japan
Prior art keywords
color
background
image
pixel
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP6000660A
Other languages
Japanese (ja)
Inventor
Yoshiharu Suzuki
▲祥▼治 鈴木
Wakanaga Tokuyo
稚永 徳世
Masahiro Mori
雅博 森
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP6000660A priority Critical patent/JPH07203299A/en
Publication of JPH07203299A publication Critical patent/JPH07203299A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Studio Circuits (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

PURPOSE:To obtain a smooth change in color similar to the case with an original picture by applying color mixture processing to picture element data at a position in the case where a border area is wide accordingly while using an object color as a background color. CONSTITUTION:An object desired to be extracted by-an object extract section 3 is commanded to a picture displayed on a color display device 8 or the like and an object extract section 6 obtains a picture of the object. Then a picture synthesis section 10 detects a direction of the object and background with respect to each surrounding element of the extracted object and decides the object color and the background color based on the detected direction succeedingly. Furthermore,the ratio of color mixture of the surrounding picture element is calculated based on the object color and the background color to be decided and on the picture element of each position. Data of surrounding picture elements are calculated by applying color mixing processing to a new object color and the original background color by using the color mixture ratio. Thus. a natural border similar to that of the original picture is obtained.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、画像中の任意の物体を
抽出し、更に、抽出した画像の色や形,大きさなどを変
更し、元の画像や他の背景画像に重ね合わせ(合成し)
て、新たな画像を作成するカラー画像の色調整,及び画
像合成方法,並びに、色調整,及び画像合成装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention extracts an arbitrary object in an image, changes the color, shape, size, etc. of the extracted image and superimposes it on the original image or another background image ( Synthetic)
The present invention relates to a color image color adjusting and image synthesizing method for creating a new image, and a color adjusting and image synthesizing apparatus.

【0002】物体の色を変える(色変え),物体の大き
さや形を変える(拡大・縮小・変形),物体を別の画像
と合成する,物体の認識をする(人物,車,机など)な
どのカラー画像の各種の処理は、計算機を利用した商品
デザインシステムや,コンピュータグラフィックス(C
G)の作成,更に、絵入り文書の作成(デスクトップパ
ブリッシング),印刷の原版作成など、幅広い分野で利
用されている。
Change the color of an object (color change), change the size and shape of an object (enlarge / reduce / deform), synthesize an object with another image, and recognize an object (person, car, desk, etc.) Various processing of color images, such as computer graphics (C), product design systems and computer graphics (C
It is used in a wide range of fields such as creating G), creating a document with pictures (desktop publishing), creating an original for printing.

【0003】例えば、商品(パッケージや車など)やポ
スタなどのデザインでは、計算機でCG画像を作成した
り,又は、読取装置で、元となる自然画像、特にカラー
画像を入力し、特定の物体画像を抽出し、抽出画像の大
きさや形を変えたり,色や背景を変えたりする処理を行
う。このような計算機でのカラー画像の利用において
は、高精度で簡単な、物体の抽出,色変え,拡大・縮小
・変形,合成,認識処理方法や,使いやすい計算機と人
間とのインターフェイス(ヒューマン・インターフェイ
ス)などが要望されている。
For example, in the design of products (packages, cars, etc.) and posters, a computer creates a CG image, or a reading device inputs a natural image, especially a color image, to obtain a specific object. The image is extracted, and the size and shape of the extracted image are changed, and the color and background are changed. In the use of color images on such a computer, there is a high-precision and simple method for extracting objects, changing colors, enlarging / reducing / deforming, synthesizing, recognizing processing methods, and an easy-to-use computer-human interface (human Interface) is required.

【0004】特に、上記の色変え,拡大・縮小・変形,
合成,認識などの各種処理を行った物体画像を、元の画
像や、他の背景画像に重ね合わせる(合成する)際に
は、物体と背景の境界の自然な色の変化を保存し、原画
と同様な自然な合成画像を作成することが重要である。
In particular, the above-mentioned color change, enlargement / reduction / deformation,
When an object image that has undergone various processing such as composition and recognition is overlaid (combined) with the original image or another background image, the natural color change at the boundary between the object and the background is saved, and the original image is saved. It is important to create a natural composite image similar to.

【0005】[0005]

【従来の技術】図12,図13 は、従来の物体色,背
景色の検出方法を説明する図である。従来の色変え,拡
大・縮小・変形,合成,認識などの各種処理画像と、原
画像,或いは、他の背景画像との重ね合わせや合成で
は、物体, 背景境界部分の処理を全く行わないか、或い
は、オペレータが画像をディスプレイなどで見ながら境
界部分のぼかしを行うなどの処理を行っていた。
12 and 13 are diagrams for explaining a conventional method for detecting an object color and a background color. In the conventional superimposition or combination of various processed images such as color change, enlargement / reduction / deformation, composition, recognition, etc. with the original image or other background images, is there any processing of the object and background boundary part? Alternatively, the operator performs processing such as blurring the boundary portion while viewing the image on a display or the like.

【0006】[0006]

【発明が解決しようとする課題】従来の物体,背景境界
部分の処理を全く行わない方法では、画像の質(境界の
自然さ)が原画像と比較して悪くなる(境界が不自然,
汚い,強調されたようになる)という問題がある。更
に、いくら時間をかけても、処理の経験や,色に関する
知識がないと、うまくいかないという問題もあった。
In the conventional method which does not process the boundary portion of the object and the background, the quality of the image (naturalness of the boundary) is worse than that of the original image (the boundary is unnatural,
It becomes dirty and becomes emphasized). Further, there is a problem that no matter how much time is spent, it will not be successful unless the user has processing experience and knowledge about colors.

【0007】これを改善するために本願出願人らは、処
理画像を背景画像に重ね合わせる(合成する)際に、物
体,背景境界の自然な色の変化を保存する境界の処理方
法を特開平05-120417 号公報「カラー画像の色調整及び
画像合成方法並びに装置」で開示している。上記図1
2, 図13に示した物体色,背景色の検出方法は、上記
特開平05-120417 号公報「カラー画像の色調整及び画像
合成方法並びに装置」で開示している方法を示してい
る。
In order to improve this, the applicants of the present invention have disclosed a boundary processing method for preserving the natural color change of an object / background boundary when superimposing (combining) a processed image on a background image. It is disclosed in Japanese Patent Publication No. 05-120417 "Color image color adjustment and image composition method and apparatus". Figure 1 above
2, the method for detecting the object color and the background color is the method disclosed in the above-mentioned Japanese Patent Laid-Open No. 05-120417, "Color image color adjustment and image composition method and apparatus".

【0008】先ず、抽出物体の周囲の画素(境界画素)
に対して、一定距離ずつ離れた位置{例えば、図12,
図13に示すように、2画素ずつ離れた位置,縦,横
(図12(a),(b) 参照) , 斜め方向 (図13(c) 参照)
の各方向の位置}の画素のデータを、物体色(Ro,Go,Bo)
と背景色(Rb,Gb,Bb)として検出する。次に、これらを用
いて、図13(d) に示した加法混色の式を基に、原画境
界の混色の比率Kを求める。具体的には、該境界の各位
置での画素値と、上記物体色(Ro,Go,Bo)と背景色(Rb,G
b,Bb)とを基に、上記加法混色の式により、各位置での
混色の比率Kを求める。更に、色変え後の物体色と背景
色,或いは、元の物体色と他の背景画像の背景色とを、
先に求めた混色の比率Kで混ぜ合わせて、新たな境界
(物体周囲) 画素のデータ(R,G,B) を求める。
First, pixels around the extracted object (boundary pixels)
With respect to positions {eg, in FIG.
As shown in FIG. 13, two pixels apart, vertically and horizontally
(See Figure 12 (a), (b)), Diagonal direction (See Figure 13 (c))
Pixel position data in each direction} of the object color (Ro, Go, Bo)
And the background color (Rb, Gb, Bb) is detected. Next, using these, the ratio K of the color mixture at the original image boundary is obtained based on the additive color mixture formula shown in FIG. Specifically, the pixel value at each position of the boundary, the object color (Ro, Go, Bo) and the background color (Rb, G
b, Bb), the ratio K of color mixture at each position is obtained by the above additive color mixture equation. Furthermore, the object color and the background color after the color change, or the original object color and the background color of another background image,
A new boundary is created by mixing the color mixture ratio K obtained earlier.
(Around object) Obtain pixel data (R, G, B).

【0009】以上の境界の処理の方法は、大半の画像に
対しては効果的であり、原画像と同様の自然な境界を実
現できる。然しながら、この方法では、物体, 背景境界
が不明瞭なものや,境界の色の変化領域が広いもの(広
い影があるような場合)に対しては、処理の精度が悪く
なるという問題があった。即ち、色の変化が少ないと、
図12(a),(b),図13(c) のような、固定位置の画素を
物体色と背景色とすると、混色の比率Kがノイズの影響
などで,不正確な値になってしまうことがあった。
The above boundary processing method is effective for most images and can realize a natural boundary similar to that of the original image. However, this method has a problem that the processing accuracy becomes poor for objects with unclear backgrounds and backgrounds, and for areas with a wide boundary color change area (when there is a wide shadow). It was That is, if there is little change in color,
As shown in Fig. 12 (a), (b), and Fig. 13 (c), if the pixel at the fixed position is the object color and the background color, the ratio K of the color mixture becomes an inaccurate value due to the influence of noise. There was something that happened.

【0010】本発明は上記従来の欠点に鑑み、画像中の
任意の物体を抽出し、更に、抽出した画像の色や形,大
きさなどを変更して、元の画像や、他の背景画像に重ね
合わせ(合成し)て、新たな画像を作成するカラー画像
の色調整,画像合成方法において、物体, 背景の境界が
不明瞭な場合とか、境界の色の変化領域が広いものに対
しても精度よく、混色処理を行うことができるカラー画
像の色調整,画像合成方法, 及び, 装置を提供すること
を目的とするものである。
In view of the above-mentioned conventional drawbacks, the present invention extracts an arbitrary object in an image and further changes the color, shape, size, etc. of the extracted image to obtain the original image and other background images. Create a new image by overlaying (compositing) on a color image. In the image composition method, when the boundary between the object and the background is unclear, or when the boundary color change area is wide. Another object of the present invention is to provide a color image color adjusting method, an image synthesizing method, and an apparatus capable of performing color mixing processing with high accuracy.

【0011】[0011]

【課題を解決するための手段】図1,図2は、本発明の
原理構成図である。上記の問題点は下記の如くに構成し
たカラー画像の色調整方法,及び、画像合成方法、並び
に、装置によって解決される。
1 and 2 are diagrams showing the principle of the present invention. The above problems can be solved by a color adjusting method for a color image, an image synthesizing method, and an apparatus configured as follows.

【0012】(1) 画像中の任意の物体を抽出(100) し、
前記抽出した物体の色を変更(101)し、前記色変更物体
の周囲部分を、前記画像中の背景画像境界と混色処理を
して、重ね合わせ(102) るカラー画像の色調整方法にお
いて、前記色変更物体を、元の背景画像に重ね合わせる
方法 102として、前記抽出物体の周囲画素に対して、物
体側と背景側の方向を検出(1020)し、前記周囲画素に対
応する物体色と、元の背景色、及び、色変更後の物体色
を決定(1021)し、前記物体色と背景色, 及び、色変更後
の物体色を用いて、新たな周囲画素のデータ値を求める
(1022,1023) ように構成する。
(1) Extract (100) any object in the image,
The color of the extracted object is changed (101), the peripheral portion of the color changed object is subjected to color mixing processing with the background image boundary in the image, and the color adjustment method of the color image is superimposed (102), As a method 102 for superimposing the color-changed object on the original background image, with respect to the peripheral pixels of the extracted object, the directions of the object side and the background side are detected (1020), and the object color corresponding to the peripheral pixels is detected. , The original background color and the object color after the color change are determined (1021), and the data value of a new surrounding pixel is obtained using the object color, the background color, and the object color after the color change
Configure as (1022,1023).

【0013】(2) 画像中の任意の物体を抽出(100) し、
前記抽出した物体に、所定の画像処理を施して、色,
形,大きさ等を変更(101a)し、前記画像処理物体の周囲
部分を、任意の背景画像境界と混色処理をして、重ね合
わせ(102a)るカラー画像の画像合成方法において、前記
画像処理を施した変更物体を、任意の背景画像に重ね合
わせる方法 102aとして、前記抽出物体の周囲画素に対
して、物体側と背景側の方向を検出(1020)し、前記周囲
画素に対応する物体色と、任意の背景色、及び、背景画
像の背景色を決定(1024)し、前記物体色と背景色, 及
び、背景画像の背景色を用いて、新たな周囲画素のデー
タ値を求める(1022,1023) ように構成する。
(2) Extract (100) an arbitrary object from the image,
Predetermined image processing is applied to the extracted object to obtain a color,
In the image synthesizing method of color images, the shape and size are changed (101a), the peripheral portion of the image processing object is subjected to color mixing processing with an arbitrary background image boundary, and the image processing is performed in the color image combining method. As a method 102a for superimposing the modified object subjected to the above on an arbitrary background image, the direction of the object side and the background side is detected with respect to the surrounding pixels of the extracted object (1020), and the object color corresponding to the surrounding pixels And an arbitrary background color and the background color of the background image are determined (1024), and the data value of a new surrounding pixel is obtained using the object color, the background color, and the background color of the background image (1022). , 1023).

【0014】(3) 前記(1) 項,及び(2) 項に記載の、抽
出物体の周囲画素に対して、物体側と背景側の方向を検
出する方法 1020 として、前記周囲画素から一定距離ず
つ離れた画素の組を、複数組求めて、該求めた複数組の
画素のデータの差分を計算し、前記差分が最大になる組
の方向を、物体と背景の方向とする。或いは、前記周囲
画素の位置での前記抽出物体形状に対する法線を検出
し、検出した法線方向を、物体と背景の方向と認識す
る。
(3) As a method 1020 for detecting the directions of the object side and the background side with respect to the surrounding pixels of the extracted object described in the above items (1) and (2), a constant distance from the surrounding pixels is used. A plurality of sets of pixels separated from each other is obtained, the difference between the data of the obtained plurality of sets of pixels is calculated, and the direction of the set having the maximum difference is the direction of the object and the background. Alternatively, a normal line to the extracted object shape at the positions of the surrounding pixels is detected, and the detected normal direction is recognized as the direction of the object and the background.

【0015】(4) 前記(1) 項, 及び(2) 項 に記載の、
周囲画素に対応する物体色と背景色,及び、色変更後の
物体色,又は、背景画像の背景色を決定する方法 1021
として、前記検出した物体と背景の方向の、複数画素の
隣合う画素のデータの差分を計算し、前記計算した差分
値が、予め、設定した値より小さくなる位置の画素を検
出し、前記検出した画素を基に、物体色と背景色,及
び、色変更後の物体色,又は、背景画像の背景色を決定
する。或いは、前記検出した物体と背景の方向の複数画
素を通過する直線を検出し、前記直線で決まる値と前記
物体と背景方向の画素のデータ値との差が、予め、設定
した値より大きくなる位置の画素を検出し、前記検出し
た画素を基に、物体色と背景色,及び、色変更後の物体
色,又は、背景画像の背景色を決定する。或いは、前記
検出した物体と背景の方向の複数画素を通過する画素の
画素値から、前記画素値の変化を近似する曲線を検出
し、前記曲線で決まる画素の画素値を基に、物体色と背
景色,及び色変更後の物体色,又は、背景画像の背景色
を決定する。
(4) In the above (1), (2),
A method of determining the object color and background color corresponding to the surrounding pixels, and the object color after the color change or the background color of the background image.
As the above, the difference between the data of adjacent pixels of a plurality of pixels in the direction of the detected object and the background is calculated, and the calculated difference value is detected in advance at a pixel at a position smaller than a preset value. The object color and the background color, and the object color after the color change, or the background color of the background image is determined based on the selected pixels. Alternatively, a straight line passing through a plurality of pixels in the direction of the detected object and background is detected, and the difference between the value determined by the straight line and the data value of the pixel in the object and background direction becomes larger than a preset value. The pixel at the position is detected, and the object color and the background color, and the object color after the color change, or the background color of the background image is determined based on the detected pixel. Alternatively, from a pixel value of a pixel that passes through a plurality of pixels in the direction of the detected object and background, a curve that approximates a change in the pixel value is detected, and an object color is determined based on the pixel value of the pixel determined by the curve. The background color, the object color after the color change, or the background color of the background image is determined.

【0016】(5) カラー画像の色調整,及び画像合成を
行う装置であって、RGB信号などの入力画像データを
蓄えるメモリ手段 2と、前記入力された画像中の任意の
物体を指定し、前記指定結果から物体を抽出する物体抽
出手段 3,5と、前記抽出物体の色や形,大きさなどを変
更する画像処理手段 9と、前記画像処理結果を、元の画
像、或いは、他の背景画像に重ね合わせ、同時に、物
体, 背景境界の混色処理を行う画像合成手段 10 とで構
成する。
(5) A device for performing color adjustment of a color image and image composition, which specifies a memory means 2 for storing input image data such as RGB signals and an arbitrary object in the input image, Object extracting means 3 and 5 for extracting an object from the designated result, image processing means 9 for changing the color, shape, size, etc. of the extracted object, and the image processing result as an original image or other It is composed of an image synthesizing means 10 which superimposes on a background image and, at the same time, performs color mixing processing of an object and a background boundary.

【0017】[0017]

【作用】上記問題点が発生する原因は、上記図13(d)
に示した加法混色式の、物体色と背景色の検出の精度が
悪いためである。具体的には、抽出物体の周囲の画素
(境界画素) に対して、固定した距離ずつ離れた位置、
例えば、前述の例では、2画素ずつ離れた位置で、縦,
横,斜めの方向の画素の画素値で、物体色(Ro,Bo,Go)
と、背景色(Rb,Gb,Bb)としている為である。
[Function] The cause of the above problem is as shown in FIG. 13 (d).
This is because the object color and background color detection accuracy of the additive color mixture method shown in (3) is poor. Specifically, the pixels around the extracted object
Positions that are a fixed distance apart from (boundary pixel),
For example, in the above-mentioned example, the vertical,
Object color (Ro, Bo, Go) with pixel values of horizontal and diagonal pixels
And the background color (Rb, Gb, Bb).

【0018】そこで、本発明においては、画像中の物体
の境界に関して、境界領域が広い(色の変化が広範囲に
渡る)場合は、それに応じた位置の画素のデータを物体
色と背景色とし、これらを用いて色変え後の物体と原画
像の境界、或いは、画像処理後の物体と他の背景画像の
境界部分の混色処理を行うことで、原画像と同様な滑ら
かな色の変化を実現した物体/背景境界を得るようにす
るものである。
Therefore, in the present invention, regarding the boundary of the object in the image, when the boundary area is wide (the color change is wide), the data of the pixel at the position corresponding to the boundary color is set as the object color and the background color, By using these to perform color mixing processing on the boundary between the object after the color change and the original image, or at the boundary between the object after the image processing and another background image, a smooth color change similar to the original image is realized. The object / background boundary is obtained.

【0019】このように、境界領域が広い(色の変化が
広範囲に渡る)場合は、それに応じた位置の画素のデー
タを物体色と背景色とすることで、不明瞭な境界領域
は、それに応じた、即ち、不明瞭さのない位置の画素の
画素値を物体色,背景色として検出することができるの
で、どのうような境界に対しても、高精度な混色処理が
実現できる効果がある。
As described above, when the boundary area is wide (the change in color extends over a wide range), the data of the pixel at the corresponding position is set to the object color and the background color, so that the unclear boundary area is Accordingly, the pixel value of the pixel at the position without ambiguity can be detected as the object color and the background color, so that it is possible to realize highly accurate color mixing processing for any boundary. is there.

【0020】[0020]

【実施例】以下本発明の実施例を図面によって詳述す
る。前述の図1,図2は、本発明の原理構成図であり、
図3〜図11は、本発明の一実施例を示した図であっ
て、図3,図4は、物体と背景の方向を、所定の方向の
画素値の差分を検出して求める場合を示し、図5は、物
体と背景の方向を、輪郭画素を通る直線の法線の方向
とする場合を示し、図6,図7は、物体色と背景色を決
定するのに、境界画素(輪郭上の画素)から、上記決定
された方向について、順次、隣合う画素のデータの差分
を計算し、その差分が所定の閾値より小さくなった位置
の画素の値を用いる場合を示し、図8,図9は、上記境
界画素の、上記決定された方向についての接線を求め
て、該求めた接線と、実際の画素値の差分を計算し、こ
の計算結果の所定の閾値より大きくなる位置の画素を用
いる場合を示し、図10は、上記決定された方向につい
ての画素の画素値の変化から、該画素値の変化を近似す
る曲線(例えば、3次曲線)を求めて、該近似曲線か
ら、例えば、画素値が収束する位置の画素を用いる場合
を示し、図11は、本発明の色調整,及び画像合成装置
の構成例を示している。
Embodiments of the present invention will be described in detail below with reference to the drawings. FIG. 1 and FIG. 2 described above are principle configuration diagrams of the present invention.
3 to 11 are views showing an embodiment of the present invention, and FIGS. 3 and 4 show a case where the direction of an object and the background is obtained by detecting the difference between pixel values in a predetermined direction. FIG. 5 shows the case where the direction of the object and the background is the direction of the normal line of the straight line passing through the contour pixels, and FIGS. 6 and 7 show the case where the boundary pixel ( 8 shows a case in which the difference between the data of adjacent pixels is sequentially calculated from the pixels on the contour) in the above determined direction, and the value of the pixel at the position where the difference becomes smaller than a predetermined threshold value is used. FIG. 9 shows that the tangent line of the boundary pixel in the determined direction is calculated, and the difference between the calculated tangent line and the actual pixel value is calculated. FIG. 10 shows a case where a pixel is used, and FIG. 10 shows a change in the pixel value of the pixel in the determined direction. Then, a curve (for example, a cubic curve) that approximates the change in the pixel value is obtained, and for example, the case where the pixel at the position where the pixel value converges is used from the approximate curve is shown. FIG. The example of a structure of a color adjustment and an image synthesizer is shown.

【0021】本発明においては、表示された画像に対し
て、抽出したい物体を指示して物体画像を得て、該抽出
物体の色を変更し、元の画像,又は、他の背景画像に重
ね合わせる際、抽出物体の各々の周囲画素に関して、物
体と背景の、抽出物体の輪郭に沿っていない、例えば、
上下,左右,斜め,或いは,境界画素の接線の法線な
どの方向を検出し、検出した方向において、例えば、順
次、隣合う画素のデータの差分を計算して、該差分値
が、予め、設定されている基準値より小さくなる位置の
画素を、物体色,又は、背景色とする等、境界領域の状
態に応じて、所定の位置の画素の画素値を、物体色,又
は、背景色とする方法が、本発明を実施するのに必要な
方法である。尚、全図を通して同じ符号は同じ対象物を
示している。 以下、図1,図2,及び、図3〜図11
によって、本発明のカラー画像の色調整方法,画像合成
方法,及び、その装置を説明する。
According to the present invention, an object to be extracted is designated in the displayed image to obtain an object image, the color of the extracted object is changed, and the original image or another background image is superimposed. When matching, for each surrounding pixel of the extracted object, the object and background are not along the contour of the extracted object, for example,
Vertical, horizontal, diagonal, or a direction such as a tangent normal line of a boundary pixel is detected, and in the detected direction, for example, a difference between data of adjacent pixels is sequentially calculated, and the difference value is calculated in advance. The pixel value of the pixel at a predetermined position is set to the object color or the background color according to the state of the boundary area, for example, the pixel at the position smaller than the set reference value is set as the object color or the background color. Is the method necessary for carrying out the present invention. The same reference numerals indicate the same objects throughout the drawings. Hereinafter, FIG. 1, FIG. 2, and FIG.
The color adjusting method of the color image, the image synthesizing method, and the apparatus thereof according to the present invention will be described.

【0022】図1は、本発明の請求項1に対応する、カ
ラー画像の色調整処理の原理の流れを説明する図であ
る。ディスプレイなどに表示された画像に対して、抽出
したい物体を指示して物体画像を得る。次に、抽出物体
の色を変更し、元の画像と重ね合わせる。重ね合わせの
際に、物体,背景境界部分の処理を行う。{図1の処理
ステップ 100,101,102参照}先ず、抽出物体の各々の周
囲画素に関して、物体と背景の、ある方向(抽出物体の
外形に沿っていない方向)を検出する。具体的には、そ
の方向は、上下,左右,斜めなどのどれかである。続い
て検出した方向をもとに、物体色と背景色を決定する。
更に、周囲画素(物体/背景境界)の混色の比率Kを、
各位置での画素値と、上記決定した物体色と背景色とに
基づいて、前述の加法混色の式{図13(d) 参照}で計
算する。
FIG. 1 is a diagram for explaining the flow of the principle of color adjustment processing of a color image, which corresponds to claim 1 of the present invention. An object image is obtained by pointing an object to be extracted to an image displayed on a display or the like. Next, the color of the extracted object is changed and superimposed on the original image. At the time of superimposition, processing of the object and background boundary portion is performed. {Refer to the processing steps 100, 101, 102 of FIG. 1} First, with respect to each peripheral pixel of the extracted object, a certain direction between the object and the background (a direction not along the outer shape of the extracted object) is detected. Specifically, the direction is any of up, down, left, right, and diagonal. Subsequently, the object color and the background color are determined based on the detected direction.
Furthermore, the color mixture ratio K of surrounding pixels (object / background boundary) is
Based on the pixel value at each position and the determined object color and background color, calculation is performed by the above-described additive color mixture formula (see FIG. 13 (d)).

【0023】この混色比率Kを用いて、新しい物体色
と、元の背景色との混色処理を行って周囲画素のデータ
を算出し、原画と同様の自然な境界を実現する。{図1
の処理ステップ 1020 〜1023参照}図2は、本発明の請
求項2に対応する、カラー画像の合成処理の原理の流れ
を説明する図である。ディスプレイなどに表示された画
像に対して、抽出したい物体を指示して物体画像を得
る。抽出物体の色や形を変えたり、大きさを変更するな
どの各種画像処理を行い、他の背景画像に合成処理を行
う。その際に、図1の色調整処理と同様、物体,背景境
界部分の混色処理を行う。なお一連の処理においては、
色や形の変更などの各種処理は行わないで、物体を他の
背景画像と合成するだけの場合もある。
Using this color mixture ratio K, the new object color is mixed with the original background color to calculate the data of the surrounding pixels, and a natural boundary similar to the original image is realized. {Fig. 1
Processing steps 1020 to 1023 of FIG. 2} FIG. 2 is a diagram for explaining the principle flow of the color image synthesizing process, which corresponds to claim 2 of the present invention. An object image is obtained by pointing an object to be extracted to an image displayed on a display or the like. Various kinds of image processing such as changing the color or shape of the extracted object or changing the size of the extracted object are performed, and the synthesis processing is performed on another background image. At that time, similar to the color adjustment processing of FIG. 1, the color mixing processing of the object / background boundary portion is performed. In addition, in a series of processing,
In some cases, various processes such as color and shape changes are not performed, and the object is simply combined with another background image.

【0024】図3,図4は、本発明の請求項3に対応す
る、抽出物体の周囲画素(以降境界画素と呼ぶ)に対し
て、物体側と背景側の方向を検出する方法の一つを説明
する図である。
FIGS. 3 and 4 are one of the methods for detecting the directions of the object side and the background side with respect to the surrounding pixels (hereinafter referred to as boundary pixels) of the extracted object, which correspond to claim 3 of the present invention. It is a figure explaining.

【0025】混色の処理を行うために、先ず、図3の対
象とする境界画素{具体的には、輪郭線上の画素で、例
えば、本願出願人が先願している特願平04-275593 号公
報「物体輪郭検出方法および物体抽出方法並びに画像処
理装置」で開示している方法で、輪郭線を抽出したとき
に得られる、該輪郭線上の画素}に対して、どの方向
(図の上下,左右,斜め方向)に物体の内部があり、
又、外部があるかを判断する。これをもとに、混色処理
の計算で利用する物体色や背景色を求める。 (物体色や
背景色の求め方については、後述する)上記物体側と背
景側の方向の検出方法として、本実施例では、一定距
離、図3,図4の例では、対象の境界画素から、例え
ば、2画素ずつ離れた位置の画素のデータの差分を計算
する。この計算を、例えば、上下(Y方向),左右(X
方向),斜め2方向(Z1,Z2方向)の合計4方向に
関して行う。この計算方法としては、下記のような方法
が考えられる。
In order to perform the color mixing process, first, the boundary pixel to be targeted in FIG. 3 (specifically, the pixel on the contour line, for example, the Japanese Patent Application No. 04-275593, which the applicant of the present invention has previously filed. With respect to the pixels on the contour line obtained by extracting the contour line by the method disclosed in the publication "Object contour detection method, object extraction method and image processing apparatus", which direction (up and down in the figure) , Left, right, diagonal) inside the object,
Also, it is judged whether there is an outside. Based on this, the object color and background color used in the calculation of color mixing processing are obtained. (How to obtain the object color and the background color will be described later) As a method of detecting the directions of the object side and the background side, a constant distance is used in the present embodiment, and from the target boundary pixel in the examples of FIGS. 3 and 4. For example, the difference of the data of the pixels at the positions separated by two pixels is calculated. This calculation is performed, for example, in the vertical direction (Y direction), the horizontal direction (X direction).
Direction) and two oblique directions (Z1 and Z2 directions), for a total of 4 directions. The following method can be considered as this calculation method.

【0026】1) カラーデータの各成分毎(RGBやYC
rCbなどそれぞれ毎)に計算する。 2) 明るさ成分(R+G+BやY)について計算する。 1)の方法では、一つの方向に対して、3つ(RGBな
ど)の結果を得る。従って、4方向では、12個の結果が
得られる。例えば、この12個の結果の最大の値を含む方
向を、該物体側と背景側の方向の検出結果とする。2)の
方法では、4つの内の最大の方向を検出する。
1) Each component of color data (RGB or YC
For each rCb etc.) 2) Calculate the brightness component (R + G + B or Y). In the method 1), three results (RGB, etc.) are obtained for one direction. Therefore, in 4 directions, 12 results are obtained. For example, the direction including the maximum value of these 12 results is set as the detection result of the direction of the object side and the direction of the background side. In the method 2), the maximum direction of the four is detected.

【0027】1)と2)の方法を比較すると、1)の方法は計
算量が少なく簡便である。1)の方法は、明るさが同じで
も色が異なるような場合にも対応でき、2)の方法より精
度が高い。
Comparing the methods 1) and 2), the method 1) has a small amount of calculation and is simple. The method 1) can handle cases where the brightness is the same but the colors are different, and is more accurate than the method 2).

【0028】尚、上記物体側と背景側の方向に関して
は、Zの2方向を省略し、XYの2方向としても、多少
精度は悪化するが、計算量を減少できる。図5は、本発
明の請求項4に記載の発明に対応し、抽出物体の周囲画
素に対して、物体側と背景側の方向を検出する第2の方
法を説明する図である。本実施例では、物体周囲の連続
する境界画素(物体の輪郭)に対する法線を求めること
により、物体と背景の方向を求める方法である。具体的
な方法を、図5(a),(b) に示す。図5(a) の対象の境界
画素(斜線で示す)に対し、両側の画素(A,B)の相
対位置を求める。図の例では、Aは(−1,−1)で、
Bは(1,0)である。数字は1画素を1としている。
この2点を通る直線の傾きは(−1−0)/(−1−
1)で、1/2 である。
Regarding the directions of the object side and the background side, the two directions of Z may be omitted and the two directions of XY may be omitted, but the accuracy may be somewhat deteriorated, but the amount of calculation can be reduced. FIG. 5 is a diagram corresponding to the invention described in claim 4 of the present invention, and is a diagram for explaining a second method for detecting the directions of the object side and the background side with respect to the surrounding pixels of the extracted object. The present embodiment is a method of obtaining the directions of the object and the background by obtaining the normal line to the continuous boundary pixels (outline of the object) around the object. A concrete method is shown in FIGS. 5 (a) and 5 (b). The relative positions of the pixels (A, B) on both sides of the target boundary pixel (shown by diagonal lines) in FIG. In the example of the figure, A is (-1, -1),
B is (1,0). In the numbers, 1 pixel is 1.
The slope of the straight line passing through these two points is (-1-0) / (-1-
It is 1/2 in 1).

【0029】従って、図5(b) に示したように、傾きの
角度は cos-1(1/2) =30度で、法線の角度は30度+90度
=120 度である。従って、物体と背景の方向は上下
(Y)方向,又は、斜め(Z2)方向と判断する。
Therefore, as shown in FIG. 5 (b), the angle of inclination is cos -1 (1/2) = 30 degrees, and the angle of the normal line is 30 degrees + 90 degrees = 120 degrees. Therefore, it is determined that the direction of the object and the background is the vertical (Y) direction or the diagonal (Z2) direction.

【0030】図6,図7は、本発明の請求項5に記載の
発明に対応し、対象の物体周囲画素(境界画素)に関し
て、上記のようにして、物体と背景の方向を検出した結
果をもとに、境界画素に対する物体色と背景色,及び、
色変更後の物体色,又は、新たな背景画像の背景色を決
定する方法を説明する図である。{図6(a) 参照}ここ
では、物体と背景の方向をX方向の場合を例にとり説明
する。尚、ここで説明する処理では、物体色,背景色
は、原画像{図7(b) 参照}から検出する。その際、抽
出物体画像{図7(c) 参照}を利用する。又、色変更後
の物体色は、色を変えた抽出物体画像(色変え画像、図
7(d) 参照}を利用し、新たな背景色は、新たな背景画
像{図7(e) 参照}を利用する。
FIG. 6 and FIG. 7 correspond to the invention described in claim 5 of the present invention, and the result of detecting the direction of the object and the background in the above-mentioned manner with respect to the object surrounding pixels (boundary pixels) of the object. Based on the object color and background color for the boundary pixel, and
It is a figure explaining the method of determining the object color after a color change, or the background color of a new background image. {See FIG. 6 (a)} Here, the case where the direction of the object and the background is the X direction will be described as an example. In the processing described here, the object color and the background color are detected from the original image {see FIG. 7 (b)}. At that time, the extracted object image {see FIG. 7 (c)} is used. For the object color after the color change, the extracted object image (color change image, see FIG. 7 (d)) with the changed color is used, and the new background color is the new background image {see FIG. 7 (e). } Is used.

【0031】先ず、図6(a) に示したように、対象の境
界画素からXの+方向に向かって、順次、隣合う画素の
データの差分を計算する。差分値が、予め設定した基準
値より小さくなる位置の画素を物体色, 又は、背景色と
する。同様に、Xの−方向も差分を計算し、基準値より
小さくなる位置の画素を求め、背景色, 又は、物体色と
する。
First, as shown in FIG. 6A, the difference between the data of adjacent pixels is sequentially calculated from the target boundary pixel in the + direction of X. A pixel at a position where the difference value becomes smaller than a preset reference value is set as an object color or a background color. Similarly, the difference is calculated also in the-direction of X, and the pixel at a position smaller than the reference value is obtained and set as the background color or the object color.

【0032】+−方向の検出画素の、どちらを物体色,
背景色とするかは、抽出物体画像を参考とする。即ち、
抽出物体の画像{図7(c) }では、背景のデータ (画素
値)は、予め分かっている(通常、黒か白)ことを利用
する。
Which of the detection pixels in the + -direction is the object color,
Whether to use the background color is based on the extracted object image. That is,
In the image of the extracted object {FIG. 7 (c)}, the fact that the background data (pixel value) is known in advance (usually black or white) is used.

【0033】抽出物体と、背景上において、検出した画
素と同一の位置の画素データを調べ、白か黒の位置の方
が背景色で、それ以外が物体色と判断できる。又、色変
え後の物体色は、先に、物体色と判断した画素の位置と
同じ位置の、色変え画像の画素のデータとする。更に、
新たな背景画像の背景色は、同様に、先に、背景色と判
断した画素の位置と同位置の背景画像の画素のデータと
する。
The extracted object and the pixel data at the same position as the detected pixel on the background are examined, and it can be determined that the white or black position is the background color and the others are the object colors. The object color after the color change is the pixel data of the color-changed image at the same position as the position of the pixel determined to be the object color previously. Furthermore,
Similarly, the background color of the new background image is the pixel data of the background image at the same position as the position of the pixel previously determined to be the background color.

【0034】差分の計算は、前述の図4と同様に、RG
Bのデータ毎や,明るさを利用する。RGBデータ毎の
場合は、3つのデータの最大値が、設定した基準値より
小さくなる位置を検出するようにすれば良い。
The calculation of the difference is performed in the same manner as in FIG.
Use each data of B and brightness. In the case of each RGB data, the position where the maximum value of the three data becomes smaller than the set reference value may be detected.

【0035】尚、基準値は、例えば、パソコン,ワーク
ステーション等での、通常の8ビット,256階調の画像な
ら、ノイズの影響を考慮して4〜8階調(2〜3ビッ
ト)程度が良いと考えられる。
The standard value is, for example, about 4 to 8 gradations (2 to 3 bits) in the case of a normal 8-bit, 256-gradation image on a personal computer, workstation, etc., considering the influence of noise. Is considered good.

【0036】図8,図9は、本発明の請求項6に記載の
発明に対応し、境界画素に対する物体色と背景色,及
び、色変更後の物体色,又は、新たな背景画像の背景色
を決定する第2の方法を説明する図である。前述の図
6,図7と同様に、物体と背景の方向をX方向の場合を
例にとり説明する。
8 and 9 correspond to the invention according to claim 6 of the present invention, and the object color and the background color for the boundary pixel, the object color after the color change, or the background of the new background image. It is a figure explaining the 2nd method of determining a color. Similar to FIGS. 6 and 7, the case where the direction of the object and the background is the X direction will be described as an example.

【0037】X方向のデータ(画素値)の変化を、図8
(a) のとおりとする。ここで、対象の境界画素の位置で
の、上記データ変化の傾き直線{図8(a) のデータ変化
の接線}を求める。求める方法は、境界画素を挟む両側
の画素のデータを利用するとか、図示されていないが、
該データの変化を、3次関数で近似して、該近似した3
次関数の曲線上において、最大の傾き直線を求めるよう
にしてもよい。この直線を+−方向に延長し、図8(b)
のように、順次、画素データとの差分を計算する。この
計算結果が、予め設定した基準値より大きくなる位置
を、物体色,或いは、背景色の画素とする。
The change in the data (pixel value) in the X direction is shown in FIG.
As in (a). Here, the slope line of the data change {the tangent line of the data change of FIG. 8 (a)} at the position of the target boundary pixel is obtained. The method of obtaining is to use data of pixels on both sides of a boundary pixel, or although not shown,
The change of the data is approximated by a cubic function, and the approximated 3
The maximum slope straight line may be obtained on the curve of the next function. Extend this line in the +-direction, and
As described above, the difference from the pixel data is sequentially calculated. The position where the calculation result is larger than the preset reference value is the pixel of the object color or the background color.

【0038】どちらを物体色とし、どちらを背景色とす
るかは、上記図6,図7で説明した実施例と同じで良
い。又、色変更後の物体色や,新たな背景画像の背景色
の求め方も同等である。更に、差分の計算方法に関して
も、同様に、RGBデータ毎や明るさを利用する。RG
Bデータを利用する場合は、図9(c) に示すように、求
めた直線の傾き(データの変化)が最も大きいもの(本
図ではR)を利用すると,ノイズに強い処理が実現でき
る。
Which one is the object color and which is the background color may be the same as in the embodiment described with reference to FIGS. 6 and 7. Further, the method of obtaining the object color after the color change and the background color of the new background image are the same. Further, also regarding the method of calculating the difference, similarly, each RGB data or brightness is used. RG
When B data is used, noise-resistant processing can be realized by using the one having the largest slope (change in data) of the obtained straight line (R in the figure) as shown in FIG. 9C.

【0039】図10は、本発明の請求項7に記載の発明
に対応し、境界画素に対する物体色と背景色,及び、色
変更後の物体色,又は、新たな背景画像の背景色を決定
する第3の方法を説明する図である。図6,図7,及
び、図8,図9と同様に、物体と背景の方向をX方向の
場合を例にとり説明する。
FIG. 10 corresponds to the invention described in claim 7 of the present invention, and determines the object color and background color for the boundary pixel, the object color after color change, or the background color of a new background image. It is a figure explaining the 3rd method to do. Similar to FIGS. 6, 7, 8 and 9, the case where the direction of the object and the background is the X direction will be described as an example.

【0040】X方向のデータの変化を図10(a) に示し
たものとする。ここで、対象の境界画素を含む複数の画
素のデータを利用し、データの変化を表す曲線の方程式
を求める。例えば、3次関数で近似する。曲線近似の条
件として、Xの+方向の−方向で、ある値に収束すると
いう仮定を取り入れる。この結果、求めた曲線におい
て、収束値になる位置の画素を、物体色,或いは、背景
色の画素とする{図10(b) 参照}。どちらを物体色と
し、どちらを背景色とするかは、上記図6,図7,及
び、図8,図9の実施例と同じで良い。又、色変更後の
物体色や,新たな背景画像の背景色の求め方も同等であ
る。
The change in the data in the X direction is shown in FIG. Here, using the data of a plurality of pixels including the target boundary pixel, the equation of the curve representing the change of the data is obtained. For example, it is approximated by a cubic function. As a condition of curve approximation, the assumption that the value converges to a certain value in the-direction of the + direction of X is adopted. As a result, in the obtained curve, the pixel at the position where the convergence value is obtained is set as the pixel of the object color or the background color {see FIG. 10 (b)}. Which is the object color and which is the background color may be the same as in the embodiments of FIGS. 6, 7, 8 and 9. Further, the method of obtaining the object color after the color change and the background color of the new background image are the same.

【0041】更に、差分の計算方法に関しても、同様に
RGBデータ毎や,明るさを利用する。RGBデータを
利用する場合は、収束する値の差が最も大きいものを利
用すると、ノイズに強い処理が実現できる。
Further, also regarding the method of calculating the difference, similarly, each RGB data or brightness is used. When using RGB data, noise-resistant processing can be realized by using the one having the largest difference in convergent values.

【0042】図11は、本発明の請求項8に記載の発明
に対応し、カラー画像の色調整,画像合成装置の構成を
説明する図である。イメージスキャナなどの画像入力装
置 1でカラー画像を入力し、画像データは画像保持用メ
モリ 2に保存する。マウスなどの物体抽出指示手段 3に
より抽出対象物体を指定する。物体抽出部 5により物体
を抽出する。該物体の抽出は、例えば、オペレータが、
1画素ずつ物体か、背景かの指示をして、輪郭を抽出す
るか、或いは、前述の本願出願人が先願している特願平
04-275593 号公報「物体輪郭検出方法および物体抽出方
法並びに画像処理装置」で開示している物体の輪郭検出
方法を使用して行う。
FIG. 11 is a diagram corresponding to the eighth aspect of the present invention and is a view for explaining the configuration of a color image color adjusting and image synthesizing apparatus. A color image is input by the image input device 1 such as an image scanner, and the image data is stored in the image holding memory 2. The object to be extracted is specified by the object extraction instruction means 3 such as a mouse. The object extraction unit 5 extracts the object. The extraction of the object is performed by, for example, an operator
The contour is extracted by designating an object or a background pixel by pixel, or the above-mentioned Japanese Patent Application No.
This is performed using the object contour detection method disclosed in Japanese Patent Publication No. 04-275593 “Object contour detection method, object extraction method, and image processing apparatus”.

【0043】これら物体抽出処理は、全体制御部 6によ
り、制御される。抽出された画像は、表示用メモリ 7に
送られ、カラーディスプレイ 8に表示される。表示画像
をオペレータが見て、結果をチェックする。更に、物体
データは、抽出物体の色を変えたり,形や大きさなどを
変える画像処理部 9に送られ、各種画像処理を行う。
These object extracting processes are controlled by the overall control unit 6. The extracted image is sent to the display memory 7 and displayed on the color display 8. The operator views the displayed image and checks the result. Further, the object data is sent to the image processing unit 9 which changes the color of the extracted object, changes the shape and the size, and performs various image processing.

【0044】処理済の物体画像は、画像合成部 10 に送
られ、境界部分の混色処理が行われる。混色処理は、前
述の物体と背景の方向検出,物体色や背景色などの検
出,混色比率K の計算,新たな境界画素のデータの計算
などを行う。物体を合成する画像は、元の画像, 或い
は、他の画像の画像記憶手段 11 などに保存された背景
画像を用いる。合成処理結果の画像は、表示用メモリ 7
に送られ、カラーディスプレイ 8に表示される。
The processed object image is sent to the image synthesizing unit 10 where the boundary portion is subjected to color mixing processing. In the color mixing processing, the direction of the object and the background described above, the detection of the object color and the background color, the calculation of the color mixing ratio K, the calculation of the new boundary pixel data, and the like are performed. As the image for synthesizing the object, the original image or the background image stored in the image storage means 11 of another image is used. The image of the composite processing result is displayed in the memory 7
Sent to and displayed on color display 8.

【0045】このように、本発明は、画像中の任意の物
体を抽出し、更に、抽出した画像の色や形,大きさなど
を変更して、元の画像や、他の背景画像に重ね合わせ
(合成し)て、新たな画像を作成するカラー画像の色調
整,画像合成方法であって、表示された画像に対して、
抽出したい物体を指示して物体画像を得て、該抽出物体
の色を変更し、元の画像,又は、他の背景画像に重ね合
わせる際、抽出物体の各々の周囲画素に関して、物体と
背景の、抽出物体の輪郭に沿っていない、例えば、上
下,左右,斜めなどの方向, 或いは、物体周囲の境界画
素に対する法線の方向を検出し、検出した方向におい
て、例えば、順次、隣合う画素のデータの差分を計算し
て、該差分値が、予め、設定されている基準値より小さ
くなる位置の画素を、物体色,又は、背景色とすると
か、対象の境界画素を挟む両側の画素データを含む直線
を延長し、順次画素データとの差分を計算し、その計算
結果が、基準値より大きくなる位置の画素を、物体色,
又は、背景色とするとか、或いは、対象の境界画素を含
む複数の画素のデータを利用し、データの変化を表す曲
線を、近似関数で求め、求めた曲線において、収束値に
なる位置の画素を、物体色, 或いは、背景色の画素とす
るようにしたところに特徴がある。
As described above, according to the present invention, an arbitrary object in an image is extracted, and further, the color, shape, size, etc. of the extracted image are changed so as to be superimposed on the original image or another background image. A method of adjusting the colors of a color image for combining (synthesizing) and creating a new image, and an image synthesizing method.
When an object image is obtained by designating an object to be extracted, the color of the extracted object is changed, and when superposed on the original image or another background image, with respect to each peripheral pixel of the extracted object, , The direction that is not along the contour of the extracted object, for example, the direction such as vertical, horizontal, diagonal, or the direction of the normal line to the boundary pixel around the object, and in the detected direction The difference between the data is calculated, and the pixel at the position where the difference value is smaller than the preset reference value is set as the object color or the background color, or the pixel data on both sides sandwiching the target boundary pixel. The straight line including is extended, the difference from the pixel data is sequentially calculated, and the pixel at the position where the calculation result is larger than the reference value is the object color,
Alternatively, the background color is used, or the data of a plurality of pixels including the target boundary pixel is used, and a curve representing the change in the data is obtained by an approximate function, and the pixel at the position where the convergence value is obtained in the obtained curve. Is characterized in that the pixel of the object color or the background color is used.

【0046】[0046]

【発明の効果】以上、詳細に説明したように、本発明の
カラー画像の色調整, 及び画像合成方法、並びに装置に
よれば、境界領域が広い(色の変化が広範囲に渡る)場
合は、それに応じた位置の画素のデータを物体色と背景
色とすることで、不明瞭な境界領域はそれに応じた物体
色,背景色を検出することができるので、どのうような
境界に対しても、高精度な混色処理が実現できるという
効果がある。
As described above in detail, according to the color image color adjusting method, the image synthesizing method, and the apparatus of the present invention, in the case where the boundary area is wide (the color change is wide), By setting the data of the pixel at the position corresponding to it to the object color and the background color, the object color and the background color corresponding to the unclear boundary area can be detected. The effect is that highly accurate color mixing processing can be realized.

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

【図1】本発明の原理構成図(その1)FIG. 1 is a principle configuration diagram of the present invention (No. 1)

【図2】本発明の原理構成図(その2)FIG. 2 is a principle configuration diagram of the present invention (No. 2)

【図3】本発明の一実施例を示した図(その1)FIG. 3 is a diagram showing an embodiment of the present invention (No. 1).

【図4】本発明の一実施例を示した図(その2)FIG. 4 is a diagram showing an embodiment of the present invention (part 2).

【図5】本発明の一実施例を示した図(その3)FIG. 5 is a diagram showing an embodiment of the present invention (part 3).

【図6】本発明の一実施例を示した図(その4)FIG. 6 is a diagram showing an embodiment of the present invention (No. 4).

【図7】本発明の一実施例を示した図(その5)FIG. 7 is a diagram showing an embodiment of the present invention (No. 5).

【図8】本発明の一実施例を示した図(その6)FIG. 8 is a view showing an embodiment of the present invention (No. 6).

【図9】本発明の一実施例を示した図(その7)FIG. 9 is a diagram showing an embodiment of the present invention (No. 7).

【図10】本発明の一実施例を示した図(その8)FIG. 10 is a view showing an embodiment of the present invention (No. 8).

【図11】本発明の一実施例を示した図(その9)FIG. 11 is a view showing an embodiment of the present invention (No. 9).

【図12】従来の物体色,背景色の検出方法を説明する
図(その1)
FIG. 12 is a diagram (part 1) illustrating a conventional method for detecting an object color and a background color.

【図13】従来の物体色,背景色の検出方法を説明する
図(その2)
FIG. 13 is a diagram (part 2) illustrating a conventional method for detecting an object color and a background color.

【符号の説明】[Explanation of symbols]

1 画像入力装置 2 画像保持用
メモリ 3 物体抽出指示部 (マウス) 5 物体抽出部 6 全体制御部 7 表示用メモリ 8 カラーディ
スプレイ 10 画像合成部 100 〜101,101a,102,102a,1020〜1023,1024 処理
ステップ 法線
1 Image input device 2 Image storage memory 3 Object extraction instruction unit (mouse) 5 Object extraction unit 6 Overall control unit 7 Display memory 8 Color display 10 Image synthesis unit 100 to 101, 101a, 102, 102a, 1020 to 1023, 1024 processing Step normal

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】画像中の任意の物体を抽出(100) し、前記
抽出した物体の色を変更(101) し、前記色変更物体の周
囲部分を、前記画像中の背景画像境界と混色処理をし
て、重ね合わせる(102) カラー画像の色調整方法であっ
て、 前記色変更物体を、元の背景画像に重ね合わせる方法(1
02) として、前記抽出物体の周囲画素に対して、物体側
と背景側の方向を検出(1020)し、前記周囲画素に対応す
る物体色と、元の背景色、及び、色変更後の物体色を決
定(1021)し、前記物体色と背景色, 及び、色変更後の物
体色を用いて、新たな周囲画素のデータ値を求める(102
2,1023) ことを特徴とするカラー画像の色調整方法。
1. An arbitrary object in an image is extracted (100), a color of the extracted object is changed (101), and a peripheral portion of the color-changed object is mixed with a background image boundary in the image. (102) A color image color adjustment method, wherein the color-changed object is overlaid on the original background image (1).
As 02), with respect to the surrounding pixels of the extracted object, the direction of the object side and the background side is detected (1020), the object color corresponding to the surrounding pixels, the original background color, and the object after the color change. A color is determined (1021), and a data value of a new surrounding pixel is obtained using the object color and the background color, and the object color after the color change (1021).
2,1023) A color adjustment method for color images.
【請求項2】画像中の任意の物体を抽出(100) し、前記
抽出した物体に、所定の画像処理を施して、色,形,大
きさ等を変更(101a)し、前記画像処理物体の周囲部分
を、任意の背景画像境界と混色処理をして、重ね合わせ
る(102a)カラー画像の画像合成方法であって、 前記画像処理を施した変更物体を、任意の背景画像に重
ね合わせる方法(102a)として、前記抽出物体の周囲画素
に対して、物体側と背景側の方向を検出(1020)し、前記
周囲画素に対応する物体色と、任意の背景色、及び、背
景画像の背景色を決定(1024)し、前記物体色と背景色,
及び、背景画像の背景色を用いて、新たな周囲画素のデ
ータ値を求める(1022,1023) ことを特徴とするカラー画
像の画像合成方法。
2. An arbitrary object in an image is extracted (100), the extracted object is subjected to predetermined image processing to change the color, shape, size, etc. (101a), and the image processed object is obtained. The peripheral part of the, is subjected to color mixing processing with an arbitrary background image boundary, and is superimposed (102a) is a color image image combining method, wherein the changed object subjected to the image processing is a method of superimposing it on an arbitrary background image. (102a), with respect to the surrounding pixels of the extracted object, the direction of the object side and the background side is detected (1020), the object color corresponding to the surrounding pixels, any background color, and the background of the background image. Determine the color (1024), the object color and background color,
An image synthesizing method for a color image, characterized in that data values of new surrounding pixels are obtained using the background color of the background image (1022, 1023).
【請求項3】前記請求項1,及び2に記載の、抽出物体
の周囲画素に対して、物体側と背景側の方向を検出する
方法として、 前記周囲画素から一定距離ずつ離れた画素の組を、複数
組求めて、該求めた複数組の画素のデータの差分を計算
し、前記差分が最大になる組の方向を、物体と背景の方
向とすることをカラー画像の色調整方法,及び画像合成
方法。
3. A method of detecting a direction of an object side and a background side with respect to surrounding pixels of an extracted object according to claim 1, wherein a set of pixels separated from the surrounding pixels by a predetermined distance. A color adjustment method of a color image, in which a plurality of sets are obtained, the difference between the data of the obtained plurality of sets of pixels is calculated, and the direction of the set having the largest difference is the direction of the object and the background. Image composition method.
【請求項4】前記請求項1,及び2に記載の、抽出物体
の周囲画素に対して、物体側と背景側の方向を検出する
方法として、 前記周囲画素の位置での前記抽出物体形状に対する法線
()を検出し、検出した法線方向を、物体と背景の方
向と認識することを特徴とするカラー画像の色調整方
法,及び画像合成方法。
4. A method for detecting the directions of the object side and the background side with respect to the surrounding pixels of the extracted object according to claim 1 and 2, wherein: A color adjusting method for a color image and an image synthesizing method, characterized by detecting a normal line () and recognizing the detected normal direction as a direction of an object and a background.
【請求項5】前記請求項1,及び2に記載の、周囲画素
に対応する物体色と背景色,及び、色変更後の物体色,
又は、背景画像の背景色を決定する方法として、 前記検出した物体と背景の方向の、複数画素の隣合う画
素のデータの差分を計算し、前記計算した差分値が、予
め、設定した値より小さくなる位置の画素を検出し、前
記検出した画素を基に、物体色と背景色,及び、色変更
後の物体色,又は、背景画像の背景色を決定することを
特徴とするカラー画像の色調整方法,及び画像合成方
法。
5. The object color and background color corresponding to surrounding pixels according to claim 1, and the object color after color change,
Or, as a method of determining the background color of the background image, the detected object and the direction of the background, the difference between the data of the adjacent pixels of a plurality of pixels is calculated, the calculated difference value, from the preset value A pixel at a position that becomes smaller is detected, and the object color and the background color, and the object color after the color change, or the background color of the background image is determined based on the detected pixel. Color adjustment method and image composition method.
【請求項6】前記請求項1,及び2に記載の、周囲画素
に対応する物体色と背景色,及び色変更後の物体色,又
は、背景画像の背景色を決定する方法として、 前記検出した物体と背景の方向の複数画素を通過する直
線を検出し、前記直線で決まる値と前記物体と背景方向
の画素のデータ値との差が、予め、設定した値より大き
くなる位置の画素を検出し、前記検出した画素を基に、
物体色と背景色,及び、色変更後の物体色,又は、背景
画像の背景色を決定することを特徴とするカラー画像の
色調整方法,及び画像合成方法。
6. A method for determining the object color and background color corresponding to surrounding pixels, the object color after color change, or the background color of a background image according to claim 1 or 2, wherein: A straight line that passes through a plurality of pixels in the direction of the object and the background is detected, and a pixel at a position where the difference between the value determined by the straight line and the data value of the pixel in the object and the background direction is larger than a preset value is detected. Detected, based on the detected pixels,
A color image color adjusting method and an image synthesizing method, characterized in that an object color and a background color, and an object color after color change or a background color of a background image are determined.
【請求項7】前記請求項1,及び2に記載の、周囲画素
に対応する物体色と背景色,及び色変更後の物体色,又
は、背景画像の背景色を決定する方法として、 前記検出した物体と背景の方向の複数画素を通過する画
素の画素値から、前記画素値の変化を近似する曲線を検
出し、前記曲線で決まる画素の画素値を基に、物体色と
背景色,及び色変更後の物体色,又は、背景画像の背景
色を決定することを特徴とするカラー画像の色調整方
法,及び画像合成方法。
7. A method for determining the object color and background color corresponding to surrounding pixels, the object color after color change, or the background color of a background image according to claim 1 or 2, wherein: From a pixel value of a pixel passing through a plurality of pixels in the direction of the object and the background, a curve that approximates the change in the pixel value is detected, and based on the pixel value of the pixel determined by the curve, the object color and the background color, and A color image color adjusting method and an image synthesizing method, characterized in that an object color after color change or a background color of a background image is determined.
【請求項8】カラー画像の色調整,及び画像合成を行う
装置であって、 RGB信号などの入力画像データを蓄えるメモリ手段
(2) と、前記入力された画像中の任意の物体を指定し、
前記指定結果から物体を抽出する物体抽出手段(3,5)
と、前記抽出物体の色や形,大きさなどを変更する画像
処理手段(9) と、前記画像処理結果を、元の画像、或い
は、他の背景画像に重ね合わせ、同時に、物体, 背景境
界の混色処理を行う画像合成手段 (10) とで構成される
ことを特徴とするカラー画像の色調整,及び画像合成装
置。
8. A device for performing color adjustment of a color image and image composition, which is a memory means for storing input image data such as RGB signals.
(2) and specify any object in the input image,
Object extracting means for extracting an object from the specified result (3, 5)
An image processing means (9) for changing the color, shape, size, etc. of the extracted object, and superimposing the image processing result on the original image or another background image, and at the same time, the object and the background boundary. An image synthesizing device and a color synthesizing device (10) for performing color mixing processing.
JP6000660A 1994-01-10 1994-01-10 Color adjustment for color picture and method and device for composing picture Withdrawn JPH07203299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6000660A JPH07203299A (en) 1994-01-10 1994-01-10 Color adjustment for color picture and method and device for composing picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6000660A JPH07203299A (en) 1994-01-10 1994-01-10 Color adjustment for color picture and method and device for composing picture

Publications (1)

Publication Number Publication Date
JPH07203299A true JPH07203299A (en) 1995-08-04

Family

ID=11479887

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6000660A Withdrawn JPH07203299A (en) 1994-01-10 1994-01-10 Color adjustment for color picture and method and device for composing picture

Country Status (1)

Country Link
JP (1) JPH07203299A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009253976A (en) * 2008-04-10 2009-10-29 National Chiao Tung Univ Integrated image surveillance system and image synthesis method thereof
CN112640412A (en) * 2018-09-06 2021-04-09 富士胶片株式会社 Image processing apparatus, method and program
WO2021183126A1 (en) * 2020-03-11 2021-09-16 Hewlett-Packard Development Company, L.P. Color change of information elements

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009253976A (en) * 2008-04-10 2009-10-29 National Chiao Tung Univ Integrated image surveillance system and image synthesis method thereof
TWI383680B (en) * 2008-04-10 2013-01-21 Univ Nat Chiao Tung Integrated image surveillance system and manufacturing method thereof
US8547434B2 (en) 2008-04-10 2013-10-01 National Chiao Tung University Integrated image surveillance system and image synthesis method thereof
CN112640412A (en) * 2018-09-06 2021-04-09 富士胶片株式会社 Image processing apparatus, method and program
US11403798B2 (en) 2018-09-06 2022-08-02 Fujifilm Corporation Image processing apparatus, method, and program
CN112640412B (en) * 2018-09-06 2023-03-10 富士胶片株式会社 Image processing apparatus, method and recording medium
WO2021183126A1 (en) * 2020-03-11 2021-09-16 Hewlett-Packard Development Company, L.P. Color change of information elements
TWI766417B (en) * 2020-03-11 2022-06-01 美商惠普發展公司有限責任合夥企業 Color change of information elements

Similar Documents

Publication Publication Date Title
US4965844A (en) Method and system for image transformation
US5185808A (en) Method for merging images
EP1299850B1 (en) Merging images to form a panoramic image
US6094511A (en) Image filtering method and apparatus with interpolation according to mapping function to produce final image
EP1412920B1 (en) A general purpose image enhancement algorithm which augments the visual perception of detail in digital images
EP1710746A1 (en) Makeup simulation program, makeup simulation device, and makeup simulation method
US20020150307A1 (en) Smart erasure brush
EP0990223B1 (en) Method and apparatus for changing a color of an image
US5438651A (en) Color adjustment for smoothing a boundary between color images
JPH04227585A (en) Method and apparatus for forming improved control-data line
US8023768B2 (en) Universal front end for masks, selections, and paths
US5355446A (en) Method and apparatus for preparing picture masks
JP3126046B2 (en) Color adjustment method and color adjustment device for color image
US7076112B2 (en) Image processing method
JPH07203299A (en) Color adjustment for color picture and method and device for composing picture
JPH03127284A (en) Color picture processing device
JPH04340671A (en) Antialiasing method for image synthesization
US5151686A (en) Electronic brush generation
JP2973432B2 (en) Image processing method and apparatus
KR20020084321A (en) real-time character composition method using template
JPH05120417A (en) Color adjusting and picture synthesizing method and device for color picture
JP4251766B2 (en) Image signal processing device
US5185596A (en) Electronic image modification
JPH10222649A (en) Device for composite picture
JP2756047B2 (en) Color image color adjustment method and apparatus, and image synthesis method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010403