JP2006025448A - Apparatus and method for generating key signal, image compositing device, and recording medium - Google Patents

Apparatus and method for generating key signal, image compositing device, and recording medium Download PDF

Info

Publication number
JP2006025448A
JP2006025448A JP2005228604A JP2005228604A JP2006025448A JP 2006025448 A JP2006025448 A JP 2006025448A JP 2005228604 A JP2005228604 A JP 2005228604A JP 2005228604 A JP2005228604 A JP 2005228604A JP 2006025448 A JP2006025448 A JP 2006025448A
Authority
JP
Japan
Prior art keywords
background
foreground
image
color
boundary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2005228604A
Other languages
Japanese (ja)
Other versions
JP3945524B2 (en
Inventor
Tomoo Mitsunaga
知生 光永
Migaku Yokoyama
琢 横山
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP2005228604A priority Critical patent/JP3945524B2/en
Publication of JP2006025448A publication Critical patent/JP2006025448A/en
Application granted granted Critical
Publication of JP3945524B2 publication Critical patent/JP3945524B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus and method for automatically calculating the background color of a local area and removing the background color from an image. <P>SOLUTION: A background color calculation section 6 uses information on the boundary of a foreground and a background constituting the input of an image 1 and the input of the image 1 to calculate a local background color in pixels close to the boundary of the foreground and the background. Furthermore, a background color removal section 7 removes the influence of the background color from the image on the basis of the background color calculated by this background color calculation section 6. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、入力画像から背景色の影響を除去する画像処理装置及び方法、前景と背景からなる画像からキー信号を生成するキー信号生成装置及び方法、第1の画像の前景と第2の画像の背景とを合成する画像合成装置、並びに記録媒体に関する。   The present invention relates to an image processing apparatus and method for removing the influence of a background color from an input image, a key signal generation apparatus and method for generating a key signal from an image composed of a foreground and a background, and a foreground and a second image of a first image. The present invention relates to an image synthesizing device that synthesizes the background and a recording medium.

従来から、例えば第1の画像aの前景と、背景からなる第2の画像bとを合成する処理が映画製作や、他の映像ファイルを作成する際に行われていた。   Conventionally, for example, processing for synthesizing the foreground of the first image a and the second image b consisting of the background has been performed when making a movie or creating another video file.

例えば、図12に示すように、前景と背景からなる第1の画像aと、背景からのみなる第2の画像bのうち、第1の画像aの前景と第2の画像bの背景とを合成する際には、第1の画像aから前景を抜き出すためのマスク画像cを生成しなければならなかった。   For example, as shown in FIG. 12, the foreground of the first image a and the background of the second image b out of the first image a composed of the foreground and the background and the second image b composed only of the background. When combining, a mask image c for extracting the foreground from the first image a had to be generated.

画素において前景が寄与する割合をキー信号と呼ぶが、マスク画像cはキー信号を算出すれば用意に生成することが出来る。例えばキー信号の値は、前景において1、背景において0で、前景と背景が混合する領域では0以上1以下の値になる。マスク画像cは、例えばキー信号の値を用いて、0から255までの値を取るモノクロ画像として容易に作成できる。   The ratio of the foreground contributed in the pixel is called a key signal, but the mask image c can be easily generated by calculating the key signal. For example, the value of the key signal is 1 in the foreground, 0 in the background, and 0 or more and 1 or less in a region where the foreground and the background are mixed. The mask image c can be easily created as a monochrome image taking a value from 0 to 255 using, for example, the value of the key signal.

ところで、キー信号を用いて第1の画像aから前景の画像を単純に抜き出す場合には問題がある。前景の境界付近は前景色と背景色が混合しているので、抜き出した前景画像と第2の画像b(背景)をキー信号を用いて合成してしまうと、合成画像の前景の境界付近では、境界付近に残ってしまっている第1の画像aの背景色と、第2の画像bの新しい背景色が混ざってしまうからである。   However, there is a problem when the foreground image is simply extracted from the first image a using the key signal. Since the foreground color and background color are mixed in the vicinity of the foreground boundary, if the extracted foreground image and the second image b (background) are combined using a key signal, This is because the background color of the first image a remaining in the vicinity of the boundary and the new background color of the second image b are mixed.

そのため、上記二つの画像a,bを混合する際には第1の画像aから予め第1の画像の背景色の影響を削除することが望ましい。   For this reason, when the two images a and b are mixed, it is desirable to delete the influence of the background color of the first image from the first image a in advance.

一方、画像からキー信号を算出するための従来の技術としてクロマキー法がある。クロマキーは色空間(例えばRGB空間)上でキーの値kの等値面を決定し、注目画素の色を色空間にマッピングして、マッピング後の点を通る等値面のキーの値kを算出して、これをキー信号とする方法である。   On the other hand, there is a chroma key method as a conventional technique for calculating a key signal from an image. The chroma key determines an isosurface of the key value k in a color space (for example, RGB space), maps the color of the pixel of interest into the color space, and sets the key value k on the isosurface that passes through the mapped point. This is a method of calculating and using this as a key signal.

クロマキーを用いた特許には、特許文献1に開示されている「絵柄のマスク作成方法」、特許文献2に開示されている「切き抜マスク作成方法」、特許文献3に開示されている「ディジタルラインクロマキー装置」、Vlahos.P,”Compositingsystem for recorded signal color”,US−Patent、がある。また、クロマキーを用いた論文としては、非特許文献1を始めとして多数の応用例があるが、ここでは良く知られている基本的な方法について説明する。   Patents using a chroma key include a “pattern mask creation method” disclosed in Patent Document 1, a “cutout mask creation method” disclosed in Patent Document 2, and a “Patent Mask Creation Method” disclosed in Patent Document 3. Digital Line Chroma Key Device ", Vlahos. P, “Composing system for recorded signal color”, US-Patent. In addition, as a paper using a chroma key, there are many application examples including Non-Patent Document 1, but here, a well-known basic method will be described.

クロマキーは、例えば青一色で塗り潰された部屋において人や車を撮影し、出来上がった画像から背景色となる青色を図13に示すように色空間で削除する方法である。   The chroma key is a method in which a person or a car is photographed in a room painted in blue, for example, and the blue color as a background color is deleted from the completed image in a color space as shown in FIG.

例えば、図13の右上図における画像の注目画素のキー信号を算出したい場合は、注目画素の色をRGB空間にマッピングする。ただし、背景色は青一色であるとする。RGB空間では図13の左図に示すように、背景の色を点(0,0,1)とする。また、前景だけの領域と前景と背景の混合した領域の境界を、切片bと傾きmをオペレータが指定して生成される正4角錐の4個の側面とする。ここで、キーの値kが0から1までの等値面は、キーの値kが0の点とキーの値kが1の等値面を内挿するようにして得られるような、正4角錐の4個の側面とする。   For example, when it is desired to calculate the key signal of the target pixel of the image in the upper right diagram of FIG. 13, the color of the target pixel is mapped to the RGB space. However, it is assumed that the background color is blue. In the RGB space, the background color is a point (0, 0, 1) as shown in the left diagram of FIG. In addition, the boundary between the foreground-only area and the area where the foreground and the background are mixed is defined as four side faces of a regular quadrangular pyramid generated by specifying the intercept b and the inclination m. Here, an isosurface with a key value k between 0 and 1 is a positive surface obtained by interpolating a point with a key value k of 0 and an isosurface with a key value k of 1. The four sides of the four-sided pyramid.

この場合、図13においてキーの値が1の等値面の下側で、かつ0≦R≦1,0≦G≦1,0≦B≦1で表される立方体の内側の領域に含まれる点は、全てキーの値kが1の点である。そして、画面上の各画素毎に算出されたキーの値kを、画素において前景の影響の占める割合を示すキー信号αとして、(1−α)と背景の青色を掛け合わせて画素の色から引くことにより、背景色の影響を削除した前景色のみの画像を得ることができる。   In this case, in FIG. 13, the key value is included in the area below the isosurface of 1 and inside the cube represented by 0 ≦ R ≦ 1, 0 ≦ G ≦ 1, 0 ≦ B ≦ 1. The points are all points whose key value k is 1. Then, the key value k calculated for each pixel on the screen is used as a key signal α indicating the proportion of the influence of the foreground in the pixel, and (1-α) is multiplied by the blue color of the background to obtain the color of the pixel. By drawing, an image of only the foreground color from which the influence of the background color is deleted can be obtained.

この方法では、オペレータは切片bと傾きmを調節しながら、例えば生成されたキーを用いて背景色の影響を削除した画像を見て、適当なキーの等値面を作成することが出来る。切片bと傾きmを調節することは、キーの値kが1の領域の境界を決定することなので、オペレータがRGB空間内の前景領域を決定する意味を持つ。   In this method, the operator can create an appropriate isosurface of the key by adjusting the intercept b and the inclination m while viewing the image from which the influence of the background color has been deleted using the generated key, for example. Adjusting the intercept b and the slope m is to determine the boundary of the region where the key value k is 1, so that the operator determines the foreground region in the RGB space.

特開平1−155476号公報Japanese Patent Laid-Open No. 1-155476 特開平4−68763号公報JP-A-4-68763 特開平3−5116号公報JP-A-3-5116 三島,”多面体スライスを用いたクロマキーのソフトウェア,”NICOGRAPH論文集Vo.8 pp−44−52(1992)Mishima, “Chromakey software using polyhedral slices,” NICOGRAPH papers Vo. 8 pp-44-52 (1992)

しかし、上記図12で説明したように、第1の画像aの背景に複数の色が含まれている場合には、第1の画像aから抜き出したい前景の境界付近において、例えばオペレータが背景色の均一である領域毎に背景色を指定してやる必要があったので、大変な作業量となっていた。   However, as described with reference to FIG. 12 above, when the background of the first image a includes a plurality of colors, for example, the operator selects the background color near the boundary of the foreground to be extracted from the first image a. Since it was necessary to specify the background color for each uniform area, the amount of work was very heavy.

また、上記図13を用いて説明したように、画像からキー信号を算出する際の、従来の技術であるクロマキーに代表される方法には問題があった。例えばクロマキーの様に背景色を予め指定してしまう方法では、前景と背景の境界付近において背景の中に多くの色が含まれている場合に、対応できないからである。また、キー作成の過程において、前景の中に指定した背景色(例えば青色)が混ざっている場合に、本当は前景の中の領域なのに背景と勘違いしてキーを作成してしまう。   Further, as described with reference to FIG. 13, there is a problem with a method represented by a chroma key, which is a conventional technique, when calculating a key signal from an image. This is because, for example, a method of specifying a background color in advance such as a chroma key cannot cope with a case where many colors are included in the background near the boundary between the foreground and the background. Also, in the key creation process, if the background color (for example, blue) specified in the foreground is mixed, the key is created by misunderstanding the background even though it is an area in the foreground.

これらの問題は、前景と背景の境界付近において局所的な領域毎にキーを作成することで解決するが、例えばオペレータが前景と背景の境界付近において、局所的な領域毎に前景色(前景の領域)と背景色(背景の領域)を決定することは、前景と背景の境界付近に多数の背景色が存在する場合に、オペレータの作業が膨大になってしまう。   These problems can be solved by creating a key for each local region near the foreground and background boundary.For example, the operator can foresee the foreground (foreground color) for each local region near the foreground and background boundary. The determination of the (region) and the background color (background region) makes the operator's work enormous when there are a large number of background colors near the boundary between the foreground and the background.

そこで、本発明は、上記実情に鑑みてなされたものであり、局所的な領域の背景色を自動的に算出し、画像から除去するための画像処理装置及び方法の提供を目的とし、前景と背景の境界付近において局所的な前景色と背景色とを自動的に算出し、キー信号再生時にオペレータの作業量を低減できるキー信号生成装置及び方法の提供を目的とし、上記画像処理装置及び方法、或いは上記キー信号生成装置及び方法を用いて、画像合成時にオペレータの作業量を低減させることのできる画像合成装置の提供を目的とし、また、上記画像処理方法、或いは上記キー信号生成方法に関するプログラムを記録した記録媒体を提供することで、オペレータの作業量を低減することを目的とする。   Therefore, the present invention has been made in view of the above circumstances, and an object of the present invention is to provide an image processing apparatus and method for automatically calculating a background color of a local area and removing it from an image. An object of the present invention is to provide a key signal generation apparatus and method capable of automatically calculating a local foreground color and a background color in the vicinity of a background boundary and reducing an operator's workload when reproducing the key signal. Alternatively, it is an object of the present invention to provide an image composition device capable of reducing an operator's work amount at the time of image composition by using the key signal generation device and method, and to provide a program relating to the image processing method or the key signal generation method. It is an object of the present invention to reduce the amount of work for an operator by providing a recording medium on which is recorded.

本発明に係る画像処理装置は、上記課題を解決するために、背景色算出手段が、画像を構成する前景と背景の境界に関する情報と、上記入力画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出し、背景色除去手段が、上記背景色算出手段で算出した背景色に基づいて画像から背景色の影響を除去する。   In the image processing apparatus according to the present invention, in order to solve the above-described problem, the background color calculation unit uses the information on the boundary between the foreground and the background constituting the image and the input image to detect the vicinity of the boundary between the foreground and the background. The local background color in the pixel is calculated, and the background color removing unit removes the influence of the background color from the image based on the background color calculated by the background color calculating unit.

ここで、上記背景色算出手段は、前景と背景の境界に関する情報、例えば、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域に分割するための情報や、または、パラメータで制御される曲面で表されるキーに関する情報を用いて、前景と背景が混合した領域に含まれる画素について、注目する画素の近傍に存在して、かつ、背景だけの領域に含まれる画素から自動的に背景色を算出する。また、上記背景色除去手段は、算出された背景色とキー信号を用い、自動的に画像から背景色の影響を削除する。   Here, the background color calculation means is information about the boundary between the foreground and the background, for example, information for dividing the foreground only area, the background only area, and the foreground and background mixed area, or parameters. Using the information about the key represented by the curved surface controlled by the, the pixels included in the area where the foreground and the background are mixed, from the pixels which exist in the vicinity of the pixel of interest and are included in the background only area The background color is automatically calculated. The background color removing unit automatically deletes the influence of the background color from the image using the calculated background color and key signal.

また、本発明に係る画像処理方法は、上記課題を解決するために、画像を構成する前景と背景の境界に関する情報と上記画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出し、この背景色に基づいて画像から背景色の影響を除去する。   In addition, in order to solve the above-described problem, the image processing method according to the present invention uses the information on the boundary between the foreground and the background constituting the image and the image, and uses a local background in pixels near the boundary between the foreground and the background. The color is calculated, and the influence of the background color is removed from the image based on the background color.

また、本発明に係るキー信号生成装置は、上記課題を解決するために、境界情報算出手段で前景と上記背景の境界情報を算出し、前景色算出手段で上記境界情報算出手段で算出した上記境界情報と上記画像とを用いて上記前景と上記背景の境界付近における局所的な前景色を算出し、背景色算出手段で境界情報算出手段で算出した上記境界情報と上記画像とを用いて上記前景と上記背景の境界付近における局所的な背景色を算出し、キー信号生成装置で上記前景色算出手段で算出した上記前景色と上記背景色算出手段で算出した上記背景色とを用いてキー信号を生成する。   Further, in order to solve the above problem, the key signal generation device according to the present invention calculates the boundary information between the foreground and the background by the boundary information calculation unit, and calculates the boundary information calculation unit by the boundary information calculation unit by the foreground color calculation unit. A local foreground color in the vicinity of the boundary between the foreground and the background is calculated using boundary information and the image, and the boundary information and the image calculated by the boundary information calculation unit by the background color calculation unit are used. A local background color near the boundary between the foreground and the background is calculated, and a key is generated using the foreground color calculated by the foreground color calculation means and the background color calculated by the background color calculation means in the key signal generation device. Generate a signal.

ここで、上記前景色算出手段と上記背景色算出手段は、前景と背景の境界に関する情報、例えば、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域に分割するための情報や、または、パラメータで制御される曲面で表されるキーに関する情報を用いて、前景と背景が混合した領域に含まれる画素については、注目する画素の近傍に存在して、前景だけの領域に含まれる画素から前景色を算出し、同様に、背景だけの領域に含まれる画素から背景色を算出する。また、キー信号生成手段は、算出された前景色と背景色を用いてキー信号を算出する。   Here, the foreground color calculating means and the background color calculating means are for dividing the information into the boundary between the foreground and the background, for example, the foreground only area, the background only area, and the foreground and background mixed area. For pixels included in the area where the foreground and the background are mixed using information or information about the key represented by the curved surface controlled by the parameter, the area only exists in the vicinity of the pixel of interest and is only in the foreground The foreground color is calculated from the pixels included in the image, and similarly, the background color is calculated from the pixels included in the region including only the background. The key signal generation unit calculates a key signal using the calculated foreground color and background color.

また、本発明に係るキー信号生成方法は、上記課題を解決するために、前景と上記背景の境界情報を算出し、この境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な前景色と背景色とを算出し、これら前景色と背景色とを用いて、上記キー信号を生成する。   Further, in order to solve the above problems, the key signal generation method according to the present invention calculates boundary information between the foreground and the background, and uses the boundary information and the image to determine the vicinity of the boundary between the foreground and the background. A local foreground color and a background color are calculated at, and the key signal is generated using the foreground color and the background color.

また、本発明に係る画像合成装置は、上記課題を解決するために、画像を構成する前景と背景の境界に関する情報と上記画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出する背景色算出手段と、上記背景色算出手段で算出した背景色に基づいて画像から背景色の影響を除去する背景色除去手段とを備える。   In order to solve the above problem, the image composition device according to the present invention uses the information on the boundary between the foreground and the background constituting the image and the image, and uses the local background in the pixels near the boundary between the foreground and the background. Background color calculating means for calculating a color, and background color removing means for removing the influence of the background color from the image based on the background color calculated by the background color calculating means.

ここで、上記背景色算出手段は、前景と背景の境界に関する情報、例えば、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域に分割するための情報や、または、パラメータで制御される曲面で表されるキーに関する情報を用いて、前景と背景が混合した領域に含まれる画素について、注目する画素の近傍に存在して、かつ、背景だけの領域に含まれる画素から自動的に背景色を算出する。また、上記背景色除去手段は、算出された背景色とキー信号を用い、自動的に画像から背景色の影響を削除する。   Here, the background color calculation means is information about the boundary between the foreground and the background, for example, information for dividing the foreground only area, the background only area, and the foreground and background mixed area, or parameters. Using the information about the key represented by the curved surface controlled by the, the pixels included in the area where the foreground and the background are mixed, from the pixels which exist in the vicinity of the pixel of interest and are included in the background only area The background color is automatically calculated. The background color removing unit automatically deletes the influence of the background color from the image using the calculated background color and key signal.

また、本発明に係る画像合成装置は、上記課題を解決するために、前景と上記背景の境界情報を算出する境界情報算出手段と、上記境界情報算出手段で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な前景色を算出する前景色算出手段と、上記境界情報算出手段で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な背景色を算出する背景色算出手段と、上記前景色算出手段で算出した上記前景色と上記背景色算出手段で算出した上記背景色とを用いて、上記キー信号を生成するキー信号生成手段と、上記キー信号生成手段により生成された上記キー信号を用いて、上記第1の画像の前景と、上記第2の画像の背景とを合成する合成手段とを備える。   In order to solve the above problem, the image composition device according to the present invention includes boundary information calculation means for calculating boundary information between the foreground and the background, the boundary information calculated by the boundary information calculation means, and the image. Using the foreground color calculation means for calculating a local foreground color near the boundary between the foreground and the background, and the boundary information and the image calculated by the boundary information calculation means, Using the background color calculation means for calculating a local background color in the vicinity of the background boundary, the foreground color calculated by the foreground color calculation means and the background color calculated by the background color calculation means, the key signal A key signal generating means for generating the first image, and a combining means for combining the foreground of the first image and the background of the second image using the key signal generated by the key signal generating means. .

ここで、上記前景色算出手段と上記背景色算出手段は、前景と背景の境界に関する情報、例えば、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域に分割するための情報や、または、パラメータで制御される曲面で表されるキーに関する情報を用いて、前景と背景が混合した領域に含まれる画素については、注目する画素の近傍に存在して、前景だけの領域に含まれる画素から前景色を算出し、同様に、背景だけの領域に含まれる画素から背景色を算出する。また、キー信号生成手段は、算出された前景色と背景色を用いてキー信号を算出する。   Here, the foreground color calculating means and the background color calculating means are for dividing the information into the boundary between the foreground and the background, for example, the foreground only area, the background only area, and the foreground and background mixed area. For pixels included in the area where the foreground and the background are mixed using information or information about the key represented by the curved surface controlled by the parameter, the area only exists in the vicinity of the pixel of interest and is only in the foreground The foreground color is calculated from the pixels included in the image, and similarly, the background color is calculated from the pixels included in the region including only the background. The key signal generation unit calculates a key signal using the calculated foreground color and background color.

また、本発明に係る記録媒体は、画像を構成する前景と背景の境界に関する情報と上記入力画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出する背景色算出工程と、上記背景色算出手段で算出した背景色に基づいて画像から背景色の影響を除去する背景色除去工程とを備える処理手順を記録してなる。   Further, the recording medium according to the present invention uses a background color calculation step for calculating a local background color in pixels near the boundary between the foreground and the background using the information on the boundary between the foreground and the background constituting the image and the input image. And a background color removing step for removing the influence of the background color from the image based on the background color calculated by the background color calculating means.

また、本発明に係る記録媒体は、前景と上記背景の境界情報を算出する境界情報算出工程と、上記境界情報算出工程で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な前景色を算出する前景色算出工程と、上記境界情報算出工程で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な背景色を算出する背景色算出工程と、上記前景色算出工程で算出した上記前景色と上記背景色算出工程で算出した上記背景色とを用いて、上記キー信号を生成するキー信号生成工程とを備える処理手順を記録してなる。   Further, the recording medium according to the present invention uses the boundary information calculation step for calculating the boundary information between the foreground and the background, the boundary information calculated in the boundary information calculation step, and the image, and uses the foreground and the background. A foreground color calculation step for calculating a local foreground color in the vicinity of the boundary of the image, and a local background near the boundary between the foreground and the background using the boundary information and the image calculated in the boundary information calculation step. A background color calculation step for calculating a color, and a key signal generation step for generating the key signal using the foreground color calculated in the foreground color calculation step and the background color calculated in the background color calculation step. The processing procedure to be provided is recorded.

本発明に係る画像処理装置及び方法は、局所的な領域の背景色を自動的に算出し、画像から除去するので、背景色に複数の色が含まれている場合にも、画像から背景色の影響を高い精度で取り除くことが出来る。また、オペレータが局所的な領域毎に背景色を指定する場合に比べて、作業量が大幅に削減できる。   The image processing apparatus and method according to the present invention automatically calculates the background color of the local area and removes it from the image. Therefore, even when the background color includes a plurality of colors, the background color from the image is obtained. Can be removed with high accuracy. In addition, the amount of work can be greatly reduced as compared with the case where the operator designates a background color for each local region.

また、本発明に係るキー信号生成装置及び方法は、前景と背景の境界付近において局所的な前景色と背景色とを自動的に算出してキー信号を生成するので、局所的な領域毎に正確なキー信号を算出できる効果がある。また、オペレータが局所的な領域毎に前景色と背景色を指定する場合に比べて、作業量が大幅に削減できる。   Further, the key signal generation apparatus and method according to the present invention automatically calculates a local foreground color and a background color near the boundary between the foreground and the background to generate a key signal. There is an effect that an accurate key signal can be calculated. In addition, the amount of work can be greatly reduced as compared with the case where the operator designates the foreground color and the background color for each local area.

また、本発明に係る画像合成装置は、上記画像処理装置及び方法、或いは上記キー信号生成装置及び方法を用いるので、画像合成時にオペレータの作業量を低減させることができる。   In addition, since the image composition apparatus according to the present invention uses the image processing apparatus and method or the key signal generation apparatus and method, it is possible to reduce an operator's workload during image composition.

また、本発明に係る記録媒体は、背景色除去時、又はキー信号生成時にオペレータの作業量を低減させるという効果を広く提供することができる。   In addition, the recording medium according to the present invention can widely provide an effect of reducing an operator's work amount when removing a background color or generating a key signal.

以下、本発明に係る画像処理装置及び方法、キー信号生成装置及び方法、画像合成装置、並びに記録媒体に関する実施の形態について説明する。   DESCRIPTION OF EMBODIMENTS Embodiments relating to an image processing apparatus and method, a key signal generation apparatus and method, an image composition apparatus, and a recording medium according to the present invention will be described below.

先ず、図1〜図4を用いて、本発明の実施の形態に用いられる画像処理装置及び方法が適用された背景色除去装置について説明する。   First, a background color removing apparatus to which the image processing apparatus and method used in the embodiment of the present invention are applied will be described with reference to FIGS.

この背景色除去装置は、図1に示すように、画像入力端子1からの入力画像から背景色の影響を除去する背景色除去処理を行うため、画像1入力を構成する前景と背景の境界に関する情報と、上記画像1入力を用いて前景と背景の境界付近の画素における局所的な背景色を算出する背景色算出部6と、この背景色算出部6で算出した背景色に基づいて画像から背景色の影響を除去する背景色除去部7とを備えてなる。   As shown in FIG. 1, the background color removing apparatus performs a background color removing process for removing the influence of the background color from the input image from the image input terminal 1, and therefore relates to the boundary between the foreground and the background constituting the image 1 input. Based on the information and the background color calculation unit 6 that calculates the local background color in the pixels near the boundary between the foreground and the background using the image 1 input, and from the image based on the background color calculated by the background color calculation unit 6 And a background color removing unit 7 for removing the influence of the background color.

また、この背景色除去装置は、入力端子2から供給されるキー信号α、すなわち上記前景と背景の境界に関する情報、に応じて前景だけの領域Rと、背景だけの領域Rと、前景と背景が混合した領域Rを形成する領域分割部3と、背景色を除去する対象となる注目画素pを決定する注目画素決定部4と、この注目画素決定部4で決定された注目画素pに最も近い、上記領域R上での画素qを算出する最近画素算出部5も備えてなる。 Further, the background color removing apparatus includes a foreground only region R 1 , a background only region R 3, and a foreground according to the key signal α supplied from the input terminal 2, that is, the information on the boundary between the foreground and the background. The region dividing unit 3 that forms the region R 2 in which the background is mixed, the target pixel determining unit 4 that determines the target pixel p from which the background color is to be removed, and the target pixel determined by the target pixel determining unit 4 closest to p, becomes also includes recent pixel calculation unit 5 for calculating the pixel q of on the region R 3.

そして、上記背景色算出部6は、上記最近画素算出部5で算出された最近画素qに所定の条件下で近傍であるいくつかの画素を算出し、これらのいくつかの画素の色の平均値を算出して背景色bとする。   Then, the background color calculation unit 6 calculates some pixels that are close to the nearest pixel q calculated by the nearest pixel calculation unit 5 under a predetermined condition, and averages the colors of these some pixels. The value is calculated as the background color b.

この背景色bは、背景色除去部7に供給される。背景色除去部7は、上記背景色を含んだ注目画素pの色C1と、キー信号αと、上記背景色bを用いて、背景色の影響を除去した画素の色C2を算出し、出力端子8に供給する。   The background color b is supplied to the background color removal unit 7. The background color removal unit 7 calculates the color C2 of the pixel from which the influence of the background color has been removed using the color C1 of the pixel of interest p including the background color, the key signal α, and the background color b, and outputs the result Supply to terminal 8.

この図1に示した各部での演算処理は、図2に示す中央演算部(CPU)10内部の論理演算部(ALU)11で行われる。   The arithmetic processing in each unit shown in FIG. 1 is performed by a logical operation unit (ALU) 11 inside the central processing unit (CPU) 10 shown in FIG.

CPU10は、ALU11の他、レジスタ12と、コントローラ13を有してなる。このCPU10は、インターフェース(I/F)15を介して供給される入力データを、一旦RAM18に記憶させた後、ALU11による演算後に、RAM18またはROM19を介して、出力データとして出力する。   The CPU 10 includes a register 12 and a controller 13 in addition to the ALU 11. The CPU 10 temporarily stores input data supplied via the interface (I / F) 15 in the RAM 18, and then outputs it as output data via the RAM 18 or the ROM 19 after calculation by the ALU 11.

レジスタ12は、ALU11における計算に使用されるデータや計算結果などを、一時的に記憶する。ALU11は、レジスタ12が保持するデータを読み込み、そのデータに対して所定の演算を行ない、その演算結果をレジスタ12に出力する。コントローラ13は、ROM19に記憶されているプログラムに従って、レジスタ12およびALU11を制御し、プログラムに記憶された計算などを行なわせる。   The register 12 temporarily stores data used for calculation in the ALU 11 and calculation results. The ALU 11 reads the data held in the register 12, performs a predetermined operation on the data, and outputs the operation result to the register 12. The controller 13 controls the register 12 and the ALU 11 in accordance with the program stored in the ROM 19 so as to perform calculations stored in the program.

RAM18は、CPU10を制御するプログラムを記憶する他に、CPU10から供給されるデータを保管してI/F15に出力するようになされている。ROM19は、CPU10において使用されるデータやプログラムを、一時的に記憶するようになされている。   In addition to storing a program for controlling the CPU 10, the RAM 18 stores data supplied from the CPU 10 and outputs it to the I / F 15. The ROM 19 is configured to temporarily store data and programs used in the CPU 10.

以下、図3のフローチャートと図4を用いて、図1及び図2に示した背景色除去装置の動作を説明する。   The operation of the background color removal apparatus shown in FIGS. 1 and 2 will be described below using the flowchart of FIG. 3 and FIG.

ここで、レジスタ12とコントローラ13における動作説明は省略するが、これらの各部は各ステップにおいて必要に応じて上述した範囲で動作する。   Here, explanations of operations in the register 12 and the controller 13 are omitted, but these units operate in the above-described range as necessary in each step.

また、最初に、画像とキー信号がI/F15を通じて入力され、ROM19に確保された2個の画像用の記憶領域にそれぞれ記憶されているとする。また、図4に示した画像1の境界線L,Lの2曲線を表すパラメータはROM19に記憶される。 First, it is assumed that an image and a key signal are input through the I / F 15 and stored in two image storage areas secured in the ROM 19. Further, parameters representing the two curves of the boundary lines L 0 and L 1 of the image 1 shown in FIG.

図3のフローチャートの各ステップで用いられる変数は、RAM18からレジスタ12に送られ、上記図1に詳細な構成を示したALU11によって必要な演算を施された後に、再びレジスタ12を介してRAM18に送られる。また、フローチャートにおける一連の処理を行なうプログラムがI/F15から入力されRAM18に記憶されている。   Variables used in each step of the flowchart of FIG. 3 are sent from the RAM 18 to the register 12 and are subjected to necessary calculations by the ALU 11 whose detailed configuration is shown in FIG. Sent. A program for performing a series of processes in the flowchart is input from the I / F 15 and stored in the RAM 18.

なお、この背景色除去装置に入力されるキー信号αは、本件出願人が特開平9−37153号公報にて開示した「キー信号生成装置及び方法」の技術により生成できる。この技術は、前景と背景の混合比であるキー信号の曲面を近似して算出し、複数個のパラメータで制御する方法による。この方法を用いると図4に示すように、前景と背景の混合した領域の前景側の境界線Lと背景側の境界線Lを算出できるため、画像全体を前景のみの領域Rと、前景と背景が混ざった領域Rと、背景のみの領域Rに分割することが出来る。 The key signal α input to the background color removing device can be generated by the technique of “key signal generating device and method” disclosed in Japanese Patent Laid-Open No. 9-37153 by the applicant of the present application. This technique is based on a method of calculating by approximating a curved surface of a key signal, which is a mixture ratio of foreground and background, and controlling with a plurality of parameters. As shown in FIG. 4 Using this method, it is possible to calculate the boundary L 0 border L 1 and the background side of the foreground side of the mixed area of the foreground and background, a region R 1 of the entire image foreground only The foreground and the background can be divided into a region R 2 and a background only region R 3 .

上記背景除去装置では、ALU11を構成している領域分割部3が上記キー信号αに基づいて上記境界線Lと上記境界線Lを算出し、画像全体を前景のみの領域Rと、前景と背景が混ざった領域Rと、背景のみの領域Rに分割している。 In the background removal apparatus, the area dividing unit 3 constituting the ALU 11 calculates the boundary line L 1 and the boundary line L 0 based on the key signal α, and the entire image is converted into a foreground-only area R 1 . The region is divided into a region R 2 where the foreground and the background are mixed and a region R 3 including only the background.

先ず、ステップS1で、ALU11を構成する注目画素決定部4は、画像中の画素を順に画素(1),画素(2),...,画素(n)として、画素の番号iをi=1で初期化する。具体的には、ALU11でiに1を代入する。   First, in step S1, the pixel-of-interest determination unit 4 configuring the ALU 11 sets the pixel number i as i == pixel (1), pixel (2),..., Pixel (n) in order. Initialize with 1. Specifically, 1 is substituted for i in the ALU 11.

ステップS2で、注目画素決定部4は、画素iが前景のみの領域R、前景と背景の混合した領域R、背景のみの領域Rのどれに含まれるか調べる。具体的には、番号iの画素に対応した領域をRAM18に記憶されている領域判定用のマップから算出する。ここで、領域Rに含まれると判定すればステップS3〜ステップS6を処理する。また、領域Rに含まれると判定すればステップS8に進み、領域Rに含まれると判定すればステップS9に進む。 In step S2, the pixel-of-interest determination unit 4 checks whether the pixel i is included in the foreground only region R 1 , the foreground / background mixed region R 2 , or the background only region R 3 . Specifically, the area corresponding to the pixel of number i is calculated from the area determination map stored in the RAM 18. Here, the processing at the step S3~ step S6 if determined to be included in the region R 2. Further, if determined to be included in the region R 1 proceeds to step S8, if it is determined to be included in the region R 3 proceeds to step S9.

ここで、ステップS2で画像iが領域Rに含まれると判定すると、ALU11を構成する最近画素算出部5は、ステップS3で、領域Rに含まれる画素で、画素iに最も距離が近い画素qを求める。具体的には、RAM18に記録されている領域判定用のマップから領域Rに含まれる画素を探して画素iとの距離を最近画素算出部5で算出し、画素の座標と算出した距離を一時的な変数に格納し、格納した距離より短い距離が得られた場合には、一時的な画素の座標と算出した距離を更新し、最終的に画素iに最も近い画素qを算出して、画素qの座標をRAM18に記憶する。 Here, the image i in step S2 is determined to be included in the region R 2, recently pixel calculation unit 5 constituting the ALU 11, in step S3, the pixel included in the region R 3, whose distance is close to the pixel i Find the pixel q. Specifically, a pixel included in the region R 3 is searched from the region determination map recorded in the RAM 18, the distance to the pixel i is calculated by the latest pixel calculation unit 5, and the pixel coordinates and the calculated distance are calculated. If it is stored in a temporary variable and a distance shorter than the stored distance is obtained, the coordinates of the temporary pixel and the calculated distance are updated, and finally the pixel q closest to the pixel i is calculated. The coordinates of the pixel q are stored in the RAM 18.

次に、ステップS4で、ALU11を構成する背景色算出部6は、領域Rに含まれる画素で、画素qから距離2以下、境界線Lから距離2以下という条件下での画素q,q,...を算出する。具体的には、RAM18に確保されている領域判定用のマップを用いて、領域Rに含まれる画素qを探して画素qとの距離を算出する。また、RAM18に記憶されている境界線Lのパラメータから曲線の方程式を算出して、画素qと境界線Lの距離を算出する。そして、画素qから距離2以下で、かつ境界線Lから距離2以下の画素を次々と算出して、RAM18に用意された画素用の配列に色を書き込む。 Next, in step S4, the background color calculating section 6 constituting the ALU 11, the pixel included in the region R 3, the distance 2 or less from the pixel q, pixels q 1 under conditions that the distance 2 or less from the boundary line L 0 , Q 2 ,... Specifically, using a region determination map secured in the RAM 18, the pixel q i included in the region R 3 is searched for and the distance from the pixel q is calculated. Further, the equation of the curve is calculated from the parameter of the boundary line L 0 stored in the RAM 18, and the distance between the pixel q i and the boundary line L 0 is calculated. Then, pixels that are less than or equal to the distance 2 from the pixel q and less than or equal to the distance 2 from the boundary line L 0 are calculated one after another, and the color is written in the pixel array prepared in the RAM 18.

そして、ステップS5で背景色算出部6は、画素q,q,...の色の平均値bを算出する。具体的には、RAM18に確保された画素用の配列に記憶されている全ての色の平均値を算出し、RAM18に確保された背景色用の変数bに書き込む。 In step S5, the background color calculator 6 calculates the average value b of the colors of the pixels q 1 , q 2 ,. Specifically, an average value of all the colors stored in the pixel array secured in the RAM 18 is calculated and written to the background color variable b secured in the RAM 18.

そして、ステップS6で、ALU11を構成している背景色除去部7は、画素iにおけるキー信号αを入力して、色C2を、
C2=C1−(1−α)*b
から求める。具体的には、RAM18に確保された変数C1,bと、ROM19に確保された画像用の記憶領域に記憶されたキー信号のマップを参照して、ここから得られる画素iのキー信号αを用いて、画素iから背景色の影響を除去した色C2を上記式のように算出し、RAM18に確保された画像用の記憶領域の画素iに対応する場所に書き込む。
In step S6, the background color removing unit 7 constituting the ALU 11 inputs the key signal α in the pixel i, and changes the color C2 to
C2 = C1- (1-α) * b
Ask from. Specifically, referring to the variable C1, b secured in the RAM 18 and the map of the key signal stored in the image storage area secured in the ROM 19, the key signal α of the pixel i obtained therefrom is obtained. Then, the color C2 from which the influence of the background color is removed from the pixel i is calculated as in the above equation, and written in a location corresponding to the pixel i in the image storage area secured in the RAM 18.

上記ステップS2で画素iが領域Rに含まれると判定し、ステップS8に進むと、背景色除去部7は、C2=C1とする。すなわち、RAM18から取り出した変数C2に画素iの値C1を代入する。 It determines that the pixel i in step S2 is included in the area R 1, the process proceeds to step S8, the background color removal section 7, and C2 = C1. That is, the value C1 of the pixel i is substituted for the variable C2 extracted from the RAM 18.

また、上記ステップS2で画素iが領域Rに含まれると判定し、ステップS9に進むと、背景色除去部7は、C2=0とする。すなわち、RAM18から取り出した変数C2に画素iの値0を代入する。 Further, it is determined that the pixel i in step S2 is included in the area R 3, In step S9, the background color removal section 7, and C2 = 0. That is, the value 0 of the pixel i is substituted into the variable C2 fetched from the RAM 18.

そして、ステップS7では、RAM18に記憶されている変数iに1だけ加算する。また、ステップS10では、画素i≦nか調べて、yesならステップS2に進み、noならendとし、RAM18に確保された画像用の記憶領域の色C2がI/F15を経てモニタ17に表示される。   In step S 7, 1 is added to the variable i stored in the RAM 18. Further, in step S10, it is checked whether the pixel i ≦ n. If yes, the process proceeds to step S2, if no, the end is set, and the color C2 of the image storage area secured in the RAM 18 is displayed on the monitor 17 via the I / F 15. The

このように、図1及び図2に示した背景色除去装置は、従来と比較して、前景と背景の境界付近において、局所的に背景色が自動的に決定でき、背景色に複数の色が含まれている場合にも、画像から背景色の影響を高い精度で取り除くことが出来る。このため、オペレータが局所的な領域毎に背景色を指定する場合に比べて、作業量が大幅に削減できる。   As described above, the background color removing apparatus shown in FIGS. 1 and 2 can automatically determine the background color locally in the vicinity of the boundary between the foreground and the background as compared with the conventional case, and a plurality of background colors. Even in the case where the image is included, the influence of the background color can be removed from the image with high accuracy. For this reason, compared with the case where an operator designates a background color for every local area | region, a work amount can be reduced significantly.

次に、図5〜図8を用いて、本発明の実施の形態に用いられるキー信号生成装置及び方法について説明する。   Next, the key signal generation apparatus and method used in the embodiment of the present invention will be described with reference to FIGS.

このキー信号生成装置は、前景と背景からなる画像からキー信号を生成するキー信号生成装置であり、図5に示すように、画像入力端子20から入力された画像の前景と背景の境界情報を算出する境界情報算出部21と、この境界情報算出部21で算出した上記境界情報と上記画像とを用いて、上記前景と背景の境界付近における局所的な前景色を算出する前景色算出部25と、境界情報算出部21で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な背景色を算出する背景色算出部27と、前景色算出部25で算出した上記前景色と背景色算出部27で算出した上記背景色とを用いて、上記キー信号を生成するキー信号生成部28とを備えてなる。   This key signal generation device is a key signal generation device that generates a key signal from an image composed of a foreground and a background. As shown in FIG. 5, boundary information between the foreground and background of an image input from an image input terminal 20 is obtained. A boundary information calculation unit 21 to calculate, and a foreground color calculation unit 25 to calculate a local foreground color in the vicinity of the boundary between the foreground and the background, using the boundary information calculated by the boundary information calculation unit 21 and the image. And a background color calculation unit 27 that calculates a local background color in the vicinity of the boundary between the foreground and the background using the boundary information and the image calculated by the boundary information calculation unit 21, and a foreground color calculation unit 25. And a key signal generation unit 28 for generating the key signal using the foreground color calculated in step 1 and the background color calculated by the background color calculation unit 27.

また、このキー信号生成装置は、境界情報算出部21で算出した境界情報に基づいて入力画像を前景だけの領域R、背景だけの領域R、前景と背景が混合した領域Rに分割する領域分割部22と、キー信号を生成する対象となる注目画素を決定する注目画素決定部23と、この注目画素決定部23で決定された注目画素pに最も近い、上記領域R上での画素rを算出する最近画素算出部24と、上記注目画素pに最も近い、上記領域R上での画素qを算出する最近画素算出部26も備えてなる。 In addition, the key signal generation device divides the input image into a region R 1 only for the foreground, a region R 3 only for the background, and a region R 2 where the foreground and the background are mixed based on the boundary information calculated by the boundary information calculation unit 21. On the region R 1 that is closest to the target pixel p determined by the target pixel determination unit 23, the target pixel determination unit 23 that determines the target pixel for which the key signal is to be generated, recently pixel calculation unit 24 for calculating a pixel r of the target pixel closest to p, becomes also includes recent pixel calculation unit 26 for calculating the pixel q of on the region R 3.

そして、上記前景色算出部25は、上記最近画素算出部24で算出された最近画素rに所定の条件下で近傍であるいくつかの画素を算出し、これらのいくつかの画素の色の平均値を算出して前景色fとする。   Then, the foreground color calculation unit 25 calculates some pixels that are close to the nearest pixel r calculated by the nearest pixel calculation unit 24 under a predetermined condition, and averages the colors of these some pixels. The value is calculated as the foreground color f.

また、上記背景色算出部27は、上記最近画素算出部26で算出された最近画素qに所定の条件下で近傍であるいくつかの画素を算出し、これらのいくつかの画素の色の平均値を算出して背景色bとする。   Further, the background color calculation unit 27 calculates some pixels that are close to the nearest pixel q calculated by the nearest pixel calculation unit 26 under a predetermined condition, and averages the colors of these some pixels. The value is calculated as the background color b.

キー信号生成部28は、上記前景色fと背景色bに基づいて画素pにおけるキー信号αを生成して出力端子29に供給する。   The key signal generation unit 28 generates a key signal α for the pixel p based on the foreground color f and the background color b and supplies the key signal α to the output terminal 29.

この図5に示した各部での演算処理も、上記図2に示したCPU10内部のALU11で行われる。ここで、CPU10、ALU11、レジスタ12、コントローラ13、I/F15、RAM18、ROM19における基本的な動作は、既に上述した通りである。   The arithmetic processing in each part shown in FIG. 5 is also performed by the ALU 11 inside the CPU 10 shown in FIG. Here, the basic operations of the CPU 10, ALU 11, register 12, controller 13, I / F 15, RAM 18, and ROM 19 are as described above.

以下、図6のフローチャートと図7及び図8を用いて、図5及び図2に示したキー信号生成装置の動作を説明する。   The operation of the key signal generation device shown in FIGS. 5 and 2 will be described below with reference to the flowchart of FIG. 6 and FIGS.

ここでも、レジスタ12とコントローラ13における動作説明は省略するが、これらの各部は各ステップにおいて必要に応じて上述した範囲で動作する。   Again, although explanation of the operation of the register 12 and the controller 13 is omitted, these units operate within the above-described range as necessary in each step.

最初に、入力画像がROM19に確保された画像用の記憶領域に記憶されているとする。また、図6のフローチャートにおける一連の処理を行なうプログラムがI/F15から入力されRAM18に記憶されているとする。   First, it is assumed that the input image is stored in the image storage area secured in the ROM 19. Further, it is assumed that a program for performing a series of processes in the flowchart of FIG. 6 is input from the I / F 15 and stored in the RAM 18.

そして、図6のフローチャートの各ステップで用いられる変数は、RAM18からレジスタ12に送られ、ALU11によって必要な演算を施された後に、再びレジスタ12を介してRAM18に送られる。   6 are sent from the RAM 18 to the register 12 and are subjected to necessary calculations by the ALU 11, and then sent to the RAM 18 through the register 12 again.

なお、境界情報算出部21は、本件出願人が特開平9−37153号公報で開示した「キー信号生成装置及び方法」の技術を用いて、図7に示すように、画像1におけるキー信号の中間データとして、キーの値が0の境界線Lと、キーの値が1の境界線Lを算出する。 Note that the boundary information calculation unit 21 uses the technique of “key signal generation device and method” disclosed in Japanese Patent Application Laid-Open No. 9-37153 by the applicant, as shown in FIG. As intermediate data, a boundary line L 0 with a key value of 0 and a boundary line L 1 with a key value of 1 are calculated.

そして、領域分割部22は、境界線L、Lにより図7に示すように、画像全体を前景のみの領域Rと、前景と背景が混ざった領域Rと、背景のみの領域Rに分割する。 Then, as shown in FIG. 7 by the boundary lines L 0 and L 1 , the area dividing unit 22 divides the entire image into the foreground only area R 1 , the foreground / background mixed area R 2, and the background only area R Divide into three .

先ず、ステップS11で、ALU11を構成する注目画素決定部23は、画像中の画素を順に画素(1),画素(2),...,画素(n)として、画素の番号iをi=1で初期化する。具体的には、ALU11でiに1を代入する。   First, in step S11, the pixel-of-interest determination unit 23 configuring the ALU 11 sets pixels in the image as pixels (1), pixels (2),. Initialize with 1. Specifically, 1 is substituted for i in the ALU 11.

ステップS12で、注目画素決定部23は、画素iが前景のみの領域R、前景と背景の混合した領域R、背景のみの領域Rのどれに含まれるか調べる。具体的には、番号iの画素に対応した領域をRAM18に記憶されている領域判定用のマップから算出する。ここで、領域Rに含まれると判定すればステップS13〜ステップS16を処理する。また、領域Rに含まれると判定すればステップS18に進み、領域Rに含まれると判定すればステップS19に進む。 In step S12, the pixel-of-interest determination unit 23 checks whether the pixel i is included in the foreground only region R 1 , the foreground / background mixed region R 2 , or the background only region R 3 . Specifically, the area corresponding to the pixel of number i is calculated from the area determination map stored in the RAM 18. Here, the processing at the step S13~ step S16 if determined to be included in the region R 2. Further, if determined to be included in the region R 1 proceeds to step S18, if determined to be included in the region R 3 proceeds to step S19.

ここで、ステップS12で画像iが領域R2に含まれると判定すると、ALU11を構成する最近画素算出部24は、ステップS13で、領域R1に含まれる画素で、画素iに最も距離が近い画素rを求める。具体的には、RAM18に記録されている領域判定用のマップから領域R1に含まれる画素を探して画素iとの距離を算出し、画素の座標と算出した距離を一時的な変数に格納し、格納した距離より短い距離が得られた場合には、一時的な画素の座標と算出した距離を更新し、最終的に画素iに最も近い画素rを算出して、画素rの座標をRAM18に記憶する。同様に、このステップS13で、ALU11を構成する最近画素算出部26は、領域R3に含まれる画素で、画素iに最も距離が近い画素qを求める。   If it is determined in step S12 that the image i is included in the region R2, the nearest pixel calculation unit 24 configuring the ALU 11 determines in step S13 that the pixel r is the pixel included in the region R1 and closest to the pixel i. Ask for. Specifically, the pixel included in the region R1 is searched from the region determination map recorded in the RAM 18 to calculate the distance to the pixel i, and the pixel coordinates and the calculated distance are stored in a temporary variable. When a distance shorter than the stored distance is obtained, the coordinates of the temporary pixel and the calculated distance are updated, the pixel r closest to the pixel i is finally calculated, and the coordinates of the pixel r are stored in the RAM 18. To remember. Similarly, in step S13, the nearest pixel calculation unit 26 configuring the ALU 11 obtains a pixel q that is the pixel closest to the pixel i among the pixels included in the region R3.

次に、ステップS14で、ALU11を構成する前景色算出部25は、領域Rに含まれる画素で、画素rから距離2以下、境界線Lから距離2以下の画素r,r,...を算出する。具体的には、RAM18に確保されている領域判定用のマップを用いて、領域Rに含まれる画素rを探して画素rとの距離を算出する。また、RAM18に記憶されている境界線Lのパラメータから曲線の方程式を算出して、画素rと境界線Lの距離を算出する。そして、画素rから距離2以下で、かつ境界線Lから距離2以下の画素を次々と算出して、RAM18に用意された画素用の配列に色を書き込む。同様に、背景色算出部27は、領域Rに含まれる画素で、画素qから距離2以下、境界線Lから距離2以下の画素q,q,...を算出する。 Next, in step S14, the foreground color calculation unit 25 configuring the ALU 11 includes pixels r 1 , r 2 , pixels that are included in the region R 1 and have a distance of 2 or less from the pixel r and a distance of 2 or less from the boundary line L 1 . Calculate ... Specifically, using a region determination map secured in the RAM 18, the pixel r i included in the region R 1 is searched for and the distance to the pixel r is calculated. Further, an equation of a curve is calculated from the parameters of the boundary line L 1 stored in the RAM 18, and the distance between the pixel r i and the boundary line L 1 is calculated. Then, pixels that are less than or equal to the distance 2 from the pixel r and less than or equal to the distance 2 from the boundary line L 1 are calculated one after another, and the color is written in the pixel array prepared in the RAM 18. Similarly, the background color calculation unit 27 calculates pixels q 1 , q 2 ,... That are pixels included in the region R 3 and have a distance of 2 or less from the pixel q and a distance of 2 or less from the boundary line L 0 .

そして、ステップS15で前景色算出部25は、画素r,r,...の色の平均値fを算出する。具体的には、RAM18に確保された画素用の配列に記憶されている全ての色の平均値を算出し、RAM18に確保された背景色用の変数fに書き込む。同様に、背景色算出部27は、画素q,q,...の色の平均値bを算出する。 In step S15, the foreground color calculation unit 25 calculates the average value f of the colors of the pixels r 1 , r 2 ,. Specifically, the average value of all the colors stored in the pixel array secured in the RAM 18 is calculated and written to the background color variable f secured in the RAM 18. Similarly, the background color calculation unit 27 calculates the average value b of the colors of the pixels q 1 , q 2 ,.

そして、ステップS16で、ALU11を構成しているキー信号生成部28は、画素iにおけるキー信号αを算出する。   In step S16, the key signal generation unit 28 constituting the ALU 11 calculates the key signal α in the pixel i.

このキー信号生成部28は、図8に示すように、画素pの色C1、前景色f、背景色bをRGB空間にマッピングして、点fと点bを結ぶ半直線に対して点C1の垂線の足である点gを求め、以下の式、
α=|g−b|/|f−b|
により画素pのキー信号αを算出する。
As shown in FIG. 8, the key signal generation unit 28 maps the color C1, the foreground color f, and the background color b of the pixel p to the RGB space, and points C1 with respect to the half line connecting the points f and b. The point g which is the foot of the perpendicular of
α = | g−b | / | f−b |
To calculate the key signal α of the pixel p.

上記ステップS12で画素iが領域Rに含まれると判定し、ステップS18に進むと、キー信号生成部28は、α=1とする。 Determines that the pixel i in step S12 is included in the area R 1, the process proceeds to step S18, the key signal generating section 28, and alpha = 1.

また、上記ステップS12で画素iが領域Rに含まれると判定し、ステップS19に進むと、キー信号生成部28は、α=0とする。 Also, pixel i in step S12 is judged to be included in the region R 3, the process proceeds to step S19, the key signal generating section 28, and alpha = 0.

そして、ステップS17では、RAM18に記憶されている変数iに1だけ加算する。また、ステップS20では、画素i≦nか調べて、yesならステップS12に進み、noならendとし、RAM18に確保されたキー信号αがI/F15を経てモニタ17に表示される。   In step S17, 1 is added to the variable i stored in the RAM 18. In step S20, it is checked whether the pixel i ≦ n. If yes, the process proceeds to step S12. If no, end is set, and the key signal α secured in the RAM 18 is displayed on the monitor 17 via the I / F 15.

このように、図5及び図2に示したキー信号生成装置は、従来と比較して、前景と背景の境界付近において、局所的に前景色と背景色を自動的に決定できるので、局所的な領域毎に正確なキー信号を算出できる。このため、オペレータが局所的な領域毎に前景色と背景色を指定する場合に比べて、作業量が大幅に削減できる。   As described above, the key signal generation device shown in FIGS. 5 and 2 can automatically determine the foreground color and the background color locally in the vicinity of the boundary between the foreground and the background, as compared with the prior art. An accurate key signal can be calculated for each correct area. For this reason, compared with the case where an operator designates a foreground color and a background color for each local area, the amount of work can be greatly reduced.

次に、本発明の他の実施の形態に用いられる画像処理装置及び方法について図9及び図10を参照しながら説明する。   Next, an image processing apparatus and method used in another embodiment of the present invention will be described with reference to FIGS.

この画像処理装置は、画像から背景色の影響を削除するために、局所的な背景色を自動的に算出し、画像から除去する背景色除去装置である。   This image processing apparatus is a background color removal apparatus that automatically calculates a local background color and removes it from the image in order to delete the influence of the background color from the image.

この背景色除去装置の構成は、上記図1及び図2に示した構成と基本的に同様である。異なるのは最近画素算出部5での最近画素Bの算出処理であり、図9に示すフローチャートではステップS3の処理が異なる。   The configuration of this background color removing device is basically the same as the configuration shown in FIGS. The difference is the calculation process of the nearest pixel B in the nearest pixel calculation unit 5, and the process of step S3 is different in the flowchart shown in FIG.

先ず、ステップS1で、ALU11を構成する注目画素決定部4は、上述したように画素の番号iをi=1で初期化する。   First, in step S1, the pixel-of-interest determination unit 4 configuring the ALU 11 initializes the pixel number i with i = 1 as described above.

ステップS2で、注目画素決定部4は、画素iが前景のみの領域R、前景と背景の混合した領域R、背景のみの領域Rのどれに含まれるか調べる。具体的には、本件出願人が特開平9−37153号公報で開示した「キー信号生成装置及び方法」の技術を用い、前景のキーが3次元のモデル、即ち、3次−1次のベジェ曲面が3次のパラメータの方向に連続して輪の形に繋がっている形状で生成されたとき、これをxy=0の平面に射影して、前景のみの領域R、前景と背景の混合した領域R、背景のみの領域Rに分類して、画素iが領域R,R,Rのどれに含まれるかを調べる。 In step S2, the pixel-of-interest determination unit 4 checks whether the pixel i is included in the foreground only region R 1 , the foreground / background mixed region R 2 , or the background only region R 3 . Specifically, using the technique of “key signal generation apparatus and method” disclosed by the present applicant in Japanese Patent Laid-Open No. 9-37153, the foreground key is a three-dimensional model, that is, a third-order Bezier. When the curved surface is generated in a shape that is continuously connected to the shape of a ring in the direction of the third-order parameter, this is projected onto the plane of xy = 0, and the foreground only region R 1 , the foreground and background mixed The region R 2 and the background only region R 3 are classified, and it is examined which of the regions R 1 , R 2 , and R 3 the pixel i is included in.

図10は、n個のベジェ曲面Q(1≦k≦n)が連続して繋がることで前景のキーを表したとき、この曲面の高さを平面にマッピングした図である。 FIG. 10 is a diagram in which the height of a curved surface is mapped onto a plane when n foreground keys Q k (1 ≦ k ≦ n) are continuously connected to represent a foreground key.

ここで、ベジェ曲面Q(1≦k≦n)は、前景と背景の混合した領域のキーを3次元の曲面で表したもので、前景のキーの高さ方向(xyz座標系のz方向)はキーの値kを表し、前景のキーの縦横方向(xyz座標系のxy方向)は画像上の座標(x,y)を表している。 Here, the Bezier curved surface Q k (1 ≦ k ≦ n) is a three-dimensional curved surface representing the key of the area where the foreground and the background are mixed, and the height direction of the foreground key (z direction in the xyz coordinate system). ) Represents a key value k, and the vertical and horizontal directions (xy directions in the xyz coordinate system) of the foreground key represent coordinates (x, y) on the image.

そして、ベジェ曲面Q(1≦k≦n)では、前景のキーの高さ方向(xyz座標系のz方向)をパラメータs(0≦s≦1)で、前景のキーの縦横方向(xyz座標系のxy方向)をパラメータt(0≦t≦1)で制御している。 In the Bezier curved surface Q k (1 ≦ k ≦ n), the height direction of the foreground key (z direction of the xyz coordinate system) is set to the parameter s (0 ≦ s ≦ 1), and the vertical and horizontal directions of the foreground key (xyz). The xy direction of the coordinate system is controlled by a parameter t (0 ≦ t ≦ 1).

ステップS2で画像iが領域Rに含まれると判定すると、最近画素算出部5は、ステップS3で、領域Rに含まれる画素で、画素iに最も距離が近い画素Bを求める。具体的には、画素iの中心点Pにおいて、画素iが含まれる曲面Q(1≦k≦n)の3次方向の曲線に対して法線を算出し、この法線上の画素であって、領域Rに含まれる画素で、画素iに最も距離が近い画素Bを求める。 If it is determined that the image i is included in the area R 2 in step S2, recently pixel calculation unit 5, in step S3, the pixel included in the region R 3, obtaining the pixel B whose distance is close to the pixel i. Specifically, a normal line is calculated for the curve in the cubic direction of the curved surface Q k (1 ≦ k ≦ n) including the pixel i at the center point P of the pixel i, and the pixel on this normal line is calculated. Te, the pixel included in the region R 3, obtaining the pixel B whose distance is close to the pixel i.

そして、ステップS4で背景色検出部6は、領域Rに含まれる画素で、画素Bから距離2以下、曲線Lから距離2以下の画素B,B,...を算出し、ステップS5で画素B,B,...の色の平均値bを算出する。 In step S4, the background color detection unit 6 calculates pixels B 1 , B 2 ,... That are pixels included in the region R 3 and have a distance of 2 or less from the pixel B and a distance of 2 or less from the curve L 0 . In step S5, the average value b of the colors of the pixels B 1 , B 2 ,... Is calculated.

すなわち、ステップS3〜ステップS5では、注目する画素iの中心点Pにおいて、図10に示すようにパラメータs方向の曲線に対する法線を算出し、この法線が図10におけるキー信号の値が0の曲線Lを通過した直後の画素をBとして、画素Bから距離2以内の範囲で、曲線Lから距離2以内の範囲で曲面Q(1≦k≦n)の外側に含まれる画素の平均値を背景色bとして算出する。 That is, in step S3 to step S5, a normal line with respect to the curve in the parameter s direction is calculated at the center point P of the pixel i of interest as shown in FIG. The pixel immediately after passing through the curve L 0 is B, and the pixel is included within the distance Q 2 from the pixel B and outside the curved surface Q k (1 ≦ k ≦ n) within the distance 2 from the curve L 0. Is calculated as the background color b.

そして、ステップS6で、ALU11を構成している背景色除去部7は、画素iにおけるキー信号αを入力して、色C2を、
C2=C1−(1−α)*b
から求める。
In step S6, the background color removing unit 7 constituting the ALU 11 inputs the key signal α in the pixel i, and changes the color C2 to
C2 = C1- (1-α) * b
Ask from.

上記ステップS2で画素iが領域Rに含まれると判定し、ステップS8に進むと、背景色除去部7は、C2=C1とする。 It determines that the pixel i in step S2 is included in the area R 1, the process proceeds to step S8, the background color removal section 7, and C2 = C1.

また、上記ステップS2で画素iが領域Rに含まれると判定し、ステップS9に進むと、背景色除去部7は、C2=0とする。 Further, it is determined that the pixel i in step S2 is included in the area R 3, In step S9, the background color removal section 7, and C2 = 0.

そして、ステップS7では、RAM18に記憶されている変数iに1だけ加算する。また、ステップS10では、画素i≦nか調べて、yesならステップS2に進み、noならendとし、RAM18に確保された画像用の記憶領域の色C2がI/F15を経てモニタ17に表示される。   In step S 7, 1 is added to the variable i stored in the RAM 18. Further, in step S10, it is checked whether the pixel i ≦ n. If yes, the process proceeds to step S2, if no, the end is set, and the color C2 of the image storage area secured in the RAM 18 is displayed on the monitor 17 via the I / F 15. The

このように、図9に動作を示した背景色除去装置は、従来と比較して、前景と背景の境界付近において、局所的に背景色が自動的、かつ正確に決定でき、背景色に複数の色が含まれている場合にも、画像から背景色の影響を高い精度で取り除くことが出来る。このため、オペレータが局所的な領域毎に背景色を指定する場合に比べて、作業量が大幅に削減できる。   As described above, the background color removal apparatus whose operation is shown in FIG. 9 can automatically and accurately determine the background color locally in the vicinity of the boundary between the foreground and the background. Even if the color is included, the influence of the background color can be removed from the image with high accuracy. For this reason, compared with the case where an operator designates a background color for every local area | region, a work amount can be reduced significantly.

次に、本発明に係る実施の形態に用いられる画像合成装置について図11を参照しながら説明する。   Next, the image composition apparatus used in the embodiment according to the present invention will be described with reference to FIG.

図11において、画像提供装置61及び62は、例えばビデオテーププレーヤ、或いはハードディスク装置などのディスクプレーヤなどで、所定の画像を再生して出力するようになされている。なお、ここでは、画像提供装置61が再生する前景又は背景をそれぞれF又はBとする画像T1(第1の画像)が、キー信号生成装置64及びミキサ65に供給されるようになされており、この画像T1が、キー信号を生成する対象とされている。また、画像提供装置62が再生する画像T2(第2の画像)は、ミキサ65に供給されるようになされており、この画像T2に対し、画像T1の前景Fが合成されるようになされている。   In FIG. 11, the image providing devices 61 and 62 are configured to reproduce and output a predetermined image using, for example, a video tape player or a disk player such as a hard disk device. Here, an image T1 (first image) in which the foreground or background reproduced by the image providing device 61 is F or B, respectively, is supplied to the key signal generating device 64 and the mixer 65. This image T1 is a target for generating a key signal. The image T2 (second image) reproduced by the image providing device 62 is supplied to the mixer 65, and the foreground F of the image T1 is combined with the image T2. Yes.

キー信号生成装置64は、上記図5に示したキー信号生成装置と同様に構成されており、上述したようにしてキー信号αを生成し、ミキサ65に出力する。ミキサ65は、キー信号生成装置64からのキー信号αを用いて、そこに入力される画像T1とT2とを合成する。   The key signal generation device 64 is configured in the same manner as the key signal generation device shown in FIG. 5, generates the key signal α as described above, and outputs it to the mixer 65. The mixer 65 uses the key signal α from the key signal generation device 64 to synthesize the images T1 and T2 input thereto.

ここで、ミキサ65は、上記図1に示した背景除去装置の機能を備えており、画像T1から前景Fを抜き出す際に、背景色の影響を排除している。そして、その前景Fを、画像T2に合成(はめ込む)するようになされている。   Here, the mixer 65 has the function of the background removing apparatus shown in FIG. 1 and eliminates the influence of the background color when extracting the foreground F from the image T1. Then, the foreground F is synthesized (inserted) into the image T2.

次に、その動作について説明する。画像提供装置61及び62では、画像T1及びT2がそれぞれ再生され、ミキサ65に供給される。さらに、画像提供装置61が再生する画像T1は、キー信号生成装置64にも供給される。   Next, the operation will be described. In the image providing devices 61 and 62, the images T1 and T2 are reproduced and supplied to the mixer 65, respectively. Further, the image T1 reproduced by the image providing device 61 is also supplied to the key signal generating device 64.

キー信号生成装置64では、上述したようにして、キー信号αを生成し、ミキサ65に出力する。ミキサ65では、上記背景色除去装置の機能を用い、キー信号αを用いて、そこに入力される画像T1から前景Fを抜き出す際に、背景色を削除し、その前景Fを、画像T2に合成する。これにより、画像T2に前景Fを合成した画像(合成画像)T4が生成される。   The key signal generator 64 generates the key signal α and outputs it to the mixer 65 as described above. In the mixer 65, when the foreground F is extracted from the image T1 input thereto using the key signal α by using the function of the background color removing device, the background color is deleted, and the foreground F is converted into the image T2. Synthesize. As a result, an image (synthesized image) T4 obtained by combining the foreground F with the image T2 is generated.

このように、上記画像合成装置は、画像合成時に、上記キー信号生成方法を用いたキー信号生成装置と、上記画像処理方法を用いたミキサを使って、画像を合成しているので、オペレータの作業量を低減させることができる。   As described above, the image synthesizing apparatus synthesizes the image using the key signal generating apparatus using the key signal generating method and the mixer using the image processing method at the time of image synthesis. The amount of work can be reduced.

なお、ここでは、キー信号生成装置64に本発明のキー信号生成方法、及びミキサ65に本発明の画像処理方法を適用していたが、いずれか一方のみ、すなわちキー信号生成装置64には他のキー信号生成方法を適用し、ミキサ65にのみ本発明の画像処理方法を適用してもよい。また、キー信号生成装置64に本発明のキー信号生成方法を適用し、ミキサ65では特に背景色を除去する機能を持たせなくてもよい。   Here, the key signal generation method of the present invention is applied to the key signal generation device 64, and the image processing method of the present invention is applied to the mixer 65, but only one of them, that is, the key signal generation device 64 has the other. The image processing method of the present invention may be applied only to the mixer 65. Further, the key signal generation method of the present invention is applied to the key signal generation device 64, and the mixer 65 does not have to have a function of particularly removing the background color.

尚、以上の実施の形態においては、前景と背景の境界に関する情報は、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域に分割するための情報であったが、この情報は、例えばオペレータがペイントツール等を用いて作成した画像の輪郭を、前景と背景が混合した領域とし、この輪郭の内側を前景だけの領域、この輪郭の外側を背景だけの領域とすることもできる。   In the above embodiment, the information on the boundary between the foreground and the background is information for dividing the foreground only area, the background only area, and the foreground and background mixed area. For information, for example, the contour of an image created by an operator using a paint tool or the like is a region where the foreground and the background are mixed, the inside of this contour is the region of the foreground only, and the outside of this contour is the region of the background only You can also.

また、以上の実施の形態においては、画像の局所的な領域における前景色や背景色を算出する際に、前景と背景の混合した領域に含まれる画素から、前景だけの領域、または背景だけの領域に含まれる画素の内で注目する画素に最も近い画素を算出し、算出した画素から一定距離の範囲に存在し、かつ、前景と背景が混合した領域と前景だけの領域との境界線から一定距離の範囲に存在する画素の平均値を算出して注目する画素の前景色とし、また、前景と背景が混合した領域と背景だけの領域との境界線から一定距離の範囲に存在する画素の平均値を算出して注目する画素の背景色とする方法を示したが、これ以外の方法で局所的な領域における前景色と背景色を算出する場合、即ち、注目する画素の近傍となる画素を、前景だけの領域または背景だけの領域から算出するために別の方法を用いる場合や、算出された注目する画素の近傍となる画素から、注目する画素の前景色や背景色を算出するために別の方法を用いる場合にも、本発明の方法は適用可能であることは勿論である。   Further, in the above embodiment, when calculating the foreground color and the background color in the local area of the image, from the pixels included in the mixed area of the foreground and the background, only the area of the foreground or only the background is calculated. Calculate the pixel closest to the pixel of interest from among the pixels included in the region, and use the boundary between the region where the foreground and background are mixed and the region where only the foreground is present and within a certain distance from the calculated pixel. Calculate the average value of the pixels that exist within a certain distance range as the foreground color of the pixel of interest, and the pixels that exist within a certain distance from the boundary line between the area where the foreground and the background are mixed and the area only with the background Although the method of calculating the average value of the pixel and setting it as the background color of the pixel of interest has been shown, when the foreground color and the background color in the local region are calculated by other methods, that is, in the vicinity of the pixel of interest Pixels into areas with only foreground Uses another method to calculate from the background-only region, or uses another method to calculate the foreground color and background color of the pixel of interest from the pixels in the vicinity of the calculated pixel of interest Of course, the method of the present invention is applicable.

また、本発明の実施の形態に用いられる画像処理方法、すなわち、画像を構成する前景と背景の境界に関する情報と上記画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出し、この背景色に基づいて画像から背景色の影響を除去するという方法を用いた、処理手順(プログラム)を記録媒体に記録し、このプログラムを適宜読み出すことにより、容易に、注目画素における背景色の影響を排除することができる。   Further, the image processing method used in the embodiment of the present invention, that is, the local background color in the pixels near the boundary between the foreground and the background is obtained by using the information on the boundary between the foreground and the background constituting the image and the image. The processing procedure (program) using the method of calculating and removing the influence of the background color from the image based on the background color is recorded on the recording medium, and this program is read out as appropriate, so that the pixel in the target pixel can be easily read. The influence of the background color can be eliminated.

この処理手順は、詳細に示すと、画像を構成する前景と背景の境界に関する情報と上記入力画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出する背景色算出工程と、上記背景色算出手段で算出した背景色に基づいて画像から背景色の影響を除去する背景色除去工程とからなる。   In detail, this processing procedure uses a background color calculation step of calculating a local background color in pixels near the boundary between the foreground and the background using the information on the boundary between the foreground and the background constituting the image and the input image. And a background color removing step of removing the influence of the background color from the image based on the background color calculated by the background color calculating means.

また、本発明の実施の形態に用いられるキー信号生成方法、すなわち、前景と上記背景の境界情報を算出し、この境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な前景色と背景色とを算出し、これら前景色と背景色とを用いて、上記キー信号を生成するという方法を用いた処理手順(プログラム)を記録した記録媒体から該プログラムを読み出して実行することにより、容易に、注目画素のキー信号を生成することができる。   In addition, the key signal generation method used in the embodiment of the present invention, that is, the boundary information between the foreground and the background is calculated and the local information near the boundary between the foreground and the background is calculated using the boundary information and the image. The foreground and background colors are calculated, and the foreground and background colors are used to read the program from a recording medium that records the processing procedure (program) using the method of generating the key signal. By executing this, it is possible to easily generate the key signal of the pixel of interest.

この処理手順は、詳細に示すと、前景と上記背景の境界情報を算出する境界情報算出工程と、上記境界情報算出工程で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な前景色を算出する前景色算出工程と、上記境界情報算出工程で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な背景色を算出する背景色算出工程と、上記前景色算出工程で算出した上記前景色と上記背景色算出工程で算出した上記背景色とを用いて、上記キー信号を生成するキー信号生成工程とからなる。   More specifically, the processing procedure includes a boundary information calculation step for calculating boundary information between the foreground and the background, the boundary information calculated in the boundary information calculation step, and the image. A foreground color calculation step for calculating a local foreground color in the vicinity of the boundary of the image, and a local background near the boundary between the foreground and the background using the boundary information and the image calculated in the boundary information calculation step. A background color calculation step for calculating a color, and a key signal generation step for generating the key signal using the foreground color calculated in the foreground color calculation step and the background color calculated in the background color calculation step. Become.

上述したような本発明の実施の形態に用いられる画像処理装置及び方法によれば、局所的な領域の背景色を自動的に算出し、画像から除去するので、背景色に複数の色が含まれている場合にも、画像から背景色の影響を高い精度で取り除くことが出来る。また、オペレータが局所的な領域毎に背景色を指定する場合に比べて、作業量が大幅に削減できる。   According to the image processing apparatus and method used in the embodiment of the present invention as described above, the background color of the local area is automatically calculated and removed from the image, so the background color includes a plurality of colors. Even in such a case, the influence of the background color can be removed from the image with high accuracy. In addition, the amount of work can be greatly reduced as compared with the case where the operator designates a background color for each local region.

また、本発明の実施の形態のキー信号生成装置及び方法は、前景と背景の境界付近において局所的な前景色と背景色とを自動的に算出してキー信号を生成するので、局所的な領域毎に正確なキー信号を算出できる効果がある。また、オペレータが局所的な領域毎に前景色と背景色を指定する場合に比べて、作業量が大幅に削減できる。   Further, the key signal generation apparatus and method according to the embodiment of the present invention automatically calculates a local foreground color and a background color in the vicinity of the boundary between the foreground and the background to generate a key signal. There is an effect that an accurate key signal can be calculated for each region. In addition, the amount of work can be greatly reduced as compared with the case where the operator designates the foreground color and the background color for each local area.

また、本発明の実施の形態に用いられる画像合成装置は、上記画像処理装置及び方法、或いは上記キー信号生成装置及び方法を用いるので、画像合成時にオペレータの作業量を低減させることができる。   In addition, since the image composition apparatus used in the embodiment of the present invention uses the image processing apparatus and method or the key signal generation apparatus and method, it is possible to reduce an operator's workload during image composition.

また、本発明の実施の形態に用いられる記録媒体は、背景色除去時、又はキー信号生成時にオペレータの作業量を低減させるという効果を広く提供することができる。   Further, the recording medium used in the embodiment of the present invention can widely provide an effect of reducing the amount of work for the operator when removing the background color or generating the key signal.

なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。   It should be noted that the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention.

本発明に係る実施の形態に用いられる画像処理装置及び方法となる背景色除去装置の機能ブロック図である。It is a functional block diagram of a background color removing apparatus that is an image processing apparatus and method used in an embodiment according to the present invention. 上記図1の機能ブロック図を動作させる論理演算部(ALU)を含む全体構成を示す上記背景色除去装置のブロック図である。FIG. 2 is a block diagram of the background color removal apparatus showing an overall configuration including a logical operation unit (ALU) that operates the functional block diagram of FIG. 1. 上記背景色除去装置の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the said background color removal apparatus. 上記背景色除去装置の動作を説明するための図である。It is a figure for demonstrating operation | movement of the said background color removal apparatus. 本発明に係るキー信号生成装置及び方法の実施の形態となるキー信号生成装置の機能ブロック図である。It is a functional block diagram of the key signal generation device used as the embodiment of the key signal generation device and method concerning the present invention. 上記キー信号生成装置の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the said key signal generation apparatus. 上記キー信号生成装置の動作を説明するための図である。It is a figure for demonstrating operation | movement of the said key signal generation apparatus. 上記キー信号生成装置の要部の動作を説明するための特性図である。It is a characteristic view for demonstrating operation | movement of the principal part of the said key signal generation apparatus. 本発明の他の実施の形態に用いられる背景除去装置及び方法の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the background removal apparatus and method used for other embodiment of this invention. 上記図9に示した背景除去装置及び方法の動作を説明するための図である。It is a figure for demonstrating operation | movement of the background removal apparatus and method shown in the said FIG. 本発明に係る実施の形態に用いられる画像合成装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image synthesizing | combining apparatus used for embodiment which concerns on this invention. 画像合成処理を説明するための図である。It is a figure for demonstrating an image composition process. クロマキー生成処理を説明するための図である。It is a figure for demonstrating a chroma key production | generation process.

符号の説明Explanation of symbols

5 最近(最も近い)画素算出部、6 背景色算出部、7 背景色除去部、24 最近画素算出部、25 前景色算出部、26 最近画素算出部、27 背景色算出部、28 キー信号生成部   5 Recent (closest) pixel calculation unit, 6 Background color calculation unit, 7 Background color removal unit, 24 Recent pixel calculation unit, 25 Foreground color calculation unit, 26 Recent pixel calculation unit, 27 Background color calculation unit, 28 Key signal generation Part

Claims (21)

入力画像から背景色の影響を除去する背景色除去処理を行う画像処理装置において、
上記画像を構成する前景と背景の境界に関する情報と、上記入力画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出する背景色算出手段と、
上記背景色算出手段で算出した背景色に基づいて画像から背景色の影響を除去する背景色除去手段と
を備えることを特徴とする画像処理装置。
In an image processing apparatus that performs background color removal processing to remove the influence of background color from an input image,
Information on the boundary between the foreground and the background constituting the image, and a background color calculation means for calculating a local background color in pixels near the boundary between the foreground and the background using the input image;
An image processing apparatus comprising: a background color removing unit that removes the influence of a background color from an image based on the background color calculated by the background color calculating unit.
上記境界に関する情報は、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域を形成するための情報であることを特徴とする請求項1記載の画像処理装置。   2. The image processing apparatus according to claim 1, wherein the information relating to the boundary is information for forming a region including only the foreground, a region including only the background, and a region where the foreground and the background are mixed. 上記境界情報は、パラメータで制御される曲面で表されるキーに関する情報であることを特徴とする請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the boundary information is information relating to a key represented by a curved surface controlled by a parameter. 上記境界情報を用いて上記前景と背景の境界付近の画素に対して前景の輪郭と垂直な方向を算出し、この方向に沿って上記背景色算出手段が上記背景色を算出することを特徴とする請求項3記載の画像処理装置。   A direction perpendicular to the outline of the foreground is calculated for the pixels near the boundary between the foreground and the background using the boundary information, and the background color calculating unit calculates the background color along this direction. The image processing apparatus according to claim 3. 入力画像から背景色の影響を除去するための画像処理方法において、
上記画像を構成する前景と背景の境界に関する情報と上記画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出し、この背景色に基づいて画像から背景色の影響を除去すること
を特徴とする画像処理方法。
In the image processing method for removing the influence of the background color from the input image,
Using the information on the boundary between the foreground and the background constituting the image and the image, the local background color in the pixels near the boundary between the foreground and the background is calculated, and the influence of the background color is calculated from the image based on the background color. The image processing method characterized by removing.
上記境界に関する情報は、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域を形成するための情報であることを特徴とする請求項5記載の画像処理方法。   6. The image processing method according to claim 5, wherein the information relating to the boundary is information for forming a region including only the foreground, a region including only the background, and a region where the foreground and the background are mixed. 上記境界情報は、パラメータで制御される曲面で表されるキーに関する情報であることを特徴とする請求項5記載の画像処理方法。   6. The image processing method according to claim 5, wherein the boundary information is information relating to a key represented by a curved surface controlled by a parameter. 上記境界情報を用いて上記前景と背景の境界付近の画素に対して、前景の輪郭と垂直な方向を算出し、この方向に沿って背景色を算出することを特徴とする請求項7記載の画像処理方法。   8. The background color is calculated along a direction perpendicular to the outline of the foreground for the pixels near the boundary between the foreground and the background using the boundary information. Image processing method. 前景と背景からなる画像からキー信号を生成するキー信号生成装置において、
上記前景と上記背景の境界情報を算出する境界情報算出手段と、
上記境界情報算出手段で算出した上記境界情報と上記画像とを用いて上記前景と上記背景の境界付近における局所的な前景色を算出する前景色算出手段と、
上記境界情報算出手段で算出した上記境界情報と上記画像とを用いて上記前景と上記背景の境界付近における局所的な背景色を算出する背景色算出手段と、
上記前景色算出手段で算出した上記前景色と上記背景色算出手段で算出した上記背景色とを用いて上記キー信号を生成するキー信号生成手段と
を備えることを特徴とするキー信号生成装置。
In a key signal generation device that generates a key signal from an image composed of a foreground and a background,
Boundary information calculating means for calculating boundary information between the foreground and the background;
Foreground color calculating means for calculating a local foreground color near the boundary between the foreground and the background using the boundary information and the image calculated by the boundary information calculating means;
Background color calculation means for calculating a local background color near the boundary between the foreground and the background using the boundary information calculated by the boundary information calculation means and the image;
A key signal generation device comprising: key signal generation means for generating the key signal using the foreground color calculated by the foreground color calculation means and the background color calculated by the background color calculation means.
上記境界情報算出手段が算出した境界情報は、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域を形成するための情報であることを特徴とする請求項9記載のキー信号生成装置。   10. The key according to claim 9, wherein the boundary information calculated by the boundary information calculating means is information for forming a foreground-only area, a background-only area, and a foreground-background mixed area. Signal generator. 上記境界情報算出手段が算出した境界情報は、パラメータで制御される曲面で表されるキーに関する情報であることを特徴とする請求項9記載のキー信号生成装置。   10. The key signal generation apparatus according to claim 9, wherein the boundary information calculated by the boundary information calculation means is information relating to a key represented by a curved surface controlled by a parameter. 上記境界情報を用いて上記前景と背景の境界付近の画素に対して前景の輪郭と垂直な方向を算出し、この方向に沿って上記前景色算出手段及び上記背景色算出手段が前景色及び背景色を算出することを特徴とする請求項11記載のキー信号生成装置。   A direction perpendicular to the outline of the foreground is calculated for the pixels near the boundary between the foreground and the background using the boundary information, and the foreground color calculation unit and the background color calculation unit perform the foreground color and the background color along the direction. The key signal generation device according to claim 11, wherein a color is calculated. 前景と背景からなる画像から前景のキー信号を生成するキー信号生成方法において、
上記前景と上記背景の境界情報を算出し、この境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な前景色と背景色とを算出し、これら前景色と背景色とを用いて上記キー信号を生成すること
を特徴とするキー信号生成方法。
In a key signal generation method for generating a foreground key signal from an image composed of a foreground and a background,
The boundary information between the foreground and the background is calculated, and using the boundary information and the image, a local foreground color and a background color near the boundary between the foreground and the background are calculated. A key signal generation method characterized by generating the key signal using a color.
上記境界情報は、前景だけの領域と、背景だけの領域と、前景と背景が混合した領域を形成するための情報であることを特徴とする請求項13記載のキー信号生成方法。   14. The key signal generation method according to claim 13, wherein the boundary information is information for forming a foreground only region, a background only region, and a region in which the foreground and the background are mixed. 上記境界情報は、パラメータで制御される曲面で表されるキーに関する情報であることを特徴とする請求項13記載のキー信号生成方法。   14. The key signal generation method according to claim 13, wherein the boundary information is information relating to a key represented by a curved surface controlled by a parameter. 上記境界情報を用いて上記前景と背景の境界付近の画素に対して、前景の輪郭と垂直な方向を算出し、この方向に沿って前景色及び背景色を算出することを特徴とする請求項15記載のキー信号生成方法。   The foreground color and the background color are calculated along a direction perpendicular to the outline of the foreground for the pixels near the boundary between the foreground and the background using the boundary information. 15. The key signal generation method according to 15. 少なくとも前景及び背景からなる第1の画像と、少なくとも背景からなる第2の画像とを受信し、上記第1の画像の前景と上記第2の画像の背景とを合成する画像合成装置において、
上記画像を構成する前景と背景の境界に関する情報と上記画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出する背景色算出手段と、
上記背景色算出手段で算出した背景色に基づいて画像から背景色の影響を除去する背景色除去手段と
を備えることを特徴とする画像合成装置。
In an image composition device for receiving a first image composed of at least a foreground and a background and a second image composed of at least a background and combining the foreground of the first image and the background of the second image,
A background color calculation means for calculating a local background color in a pixel near the boundary between the foreground and the background using the information on the boundary between the foreground and the background constituting the image and the image;
An image composition apparatus comprising: a background color removing unit that removes the influence of a background color from an image based on the background color calculated by the background color calculating unit.
少なくとも前景及び背景からなる第1の画像と、少なくとも背景からなる第2の画像とを受信し、上記第1の画像の前景と上記第2の画像の背景とを合成する画像合成装置において、
上記前景と上記背景の境界情報を算出する境界情報算出手段と、
上記境界情報算出手段で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な前景色を算出する前景色算出手段と、
上記境界情報算出手段で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な背景色を算出する背景色算出手段と、
上記前景色算出手段で算出した上記前景色と上記背景色算出手段で算出した上記背景色とを用いて、上記キー信号を生成するキー信号生成手段と、
上記キー信号生成手段により生成された上記キー信号を用いて、上記第1の画像の前景と、上記第2の画像の背景とを合成する合成手段と
を備えることを特徴とする画像合成装置。
In an image composition device for receiving a first image composed of at least a foreground and a background and a second image composed of at least a background and combining the foreground of the first image and the background of the second image,
Boundary information calculating means for calculating boundary information between the foreground and the background;
Foreground color calculation means for calculating a local foreground color near the boundary between the foreground and the background using the boundary information calculated by the boundary information calculation means and the image;
Using the boundary information calculated by the boundary information calculating means and the image, a background color calculating means for calculating a local background color in the vicinity of the boundary between the foreground and the background;
Key signal generating means for generating the key signal using the foreground color calculated by the foreground color calculating means and the background color calculated by the background color calculating means;
An image synthesizing apparatus comprising: synthesizing means for synthesizing the foreground of the first image and the background of the second image using the key signal generated by the key signal generating means.
上記キー信号生成手段で生成したキー信号と上記背景色算出手段で算出した背景色に基づいて、上記画像から背景色の影響を除去する背景色除去手段を備えてなり、上記合成手段では上記背景色除去手段により背景色の影響が除去された第1の画像の前景と、上記第2の画像の背景とを合成することを特徴とする請求項18記載の画像合成装置。   Based on the key signal generated by the key signal generation means and the background color calculated by the background color calculation means, the image processing apparatus includes background color removal means for removing the influence of the background color from the image. 19. The image synthesizing apparatus according to claim 18, wherein the foreground of the first image from which the influence of the background color is removed by the color removing unit and the background of the second image are synthesized. 入力画像から背景色の影響を除去する処理手順を記録している記録媒体において、
上記画像を構成する前景と背景の境界に関する情報と上記入力画像を用いて、前景と背景の境界付近の画素における局所的な背景色を算出する背景色算出工程と、
上記背景色算出手段で算出した背景色に基づいて画像から背景色の影響を除去する背景色除去工程と
を備える処理手順を記録してなることを特徴とする記録媒体。
In a recording medium recording a processing procedure for removing the influence of the background color from the input image,
A background color calculation step of calculating a local background color in pixels near the boundary between the foreground and the background using the information about the boundary between the foreground and the background constituting the image and the input image;
A recording medium comprising: a processing procedure including: a background color removing step of removing an influence of a background color from an image based on the background color calculated by the background color calculating unit.
前景と背景からなる画像から前景のキー信号を生成する処理手順を記録している記録媒体において、
上記前景と上記背景の境界情報を算出する境界情報算出工程と、
上記境界情報算出工程で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な前景色を算出する前景色算出工程と、
上記境界情報算出工程で算出した上記境界情報と上記画像とを用いて、上記前景と上記背景の境界付近における局所的な背景色を算出する背景色算出工程と、
上記前景色算出工程で算出した上記前景色と上記背景色算出工程で算出した上記背景色とを用いて、上記キー信号を生成するキー信号生成工程と
を備える処理手順を記録してなることを特徴とする記録媒体。
In a recording medium recording a processing procedure for generating a foreground key signal from an image composed of a foreground and a background,
A boundary information calculating step for calculating boundary information between the foreground and the background;
A foreground color calculation step of calculating a local foreground color near the boundary between the foreground and the background using the boundary information and the image calculated in the boundary information calculation step;
A background color calculation step for calculating a local background color near the boundary between the foreground and the background using the boundary information and the image calculated in the boundary information calculation step;
Using the foreground color calculated in the foreground color calculation step and the background color calculated in the background color calculation step to record a processing procedure including a key signal generation step for generating the key signal. A characteristic recording medium.
JP2005228604A 2005-08-05 2005-08-05 Key signal generation apparatus and method, image composition apparatus, and recording medium Expired - Fee Related JP3945524B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005228604A JP3945524B2 (en) 2005-08-05 2005-08-05 Key signal generation apparatus and method, image composition apparatus, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005228604A JP3945524B2 (en) 2005-08-05 2005-08-05 Key signal generation apparatus and method, image composition apparatus, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP20820597A Division JP3728884B2 (en) 1997-08-01 1997-08-01 Image processing apparatus and method, image composition apparatus, and recording medium

Publications (2)

Publication Number Publication Date
JP2006025448A true JP2006025448A (en) 2006-01-26
JP3945524B2 JP3945524B2 (en) 2007-07-18

Family

ID=35798312

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005228604A Expired - Fee Related JP3945524B2 (en) 2005-08-05 2005-08-05 Key signal generation apparatus and method, image composition apparatus, and recording medium

Country Status (1)

Country Link
JP (1) JP3945524B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007306560A (en) * 2006-05-11 2007-11-22 Xerox Corp Method for processing page boundary of document image data
JP2009044739A (en) * 2007-08-08 2009-02-26 Sharp Corp Method and system for determining background color in digital image
WO2010033312A1 (en) * 2008-09-17 2010-03-25 Motorola, Inc. Countermeasures against original background retrieval
JP2012515964A (en) * 2009-01-22 2012-07-12 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Pixel future hybrid fusion for PET / CT images

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007306560A (en) * 2006-05-11 2007-11-22 Xerox Corp Method for processing page boundary of document image data
JP2009044739A (en) * 2007-08-08 2009-02-26 Sharp Corp Method and system for determining background color in digital image
JP4516994B2 (en) * 2007-08-08 2010-08-04 シャープ株式会社 Method and system for determining the background color of a digital image
WO2010033312A1 (en) * 2008-09-17 2010-03-25 Motorola, Inc. Countermeasures against original background retrieval
US8111913B2 (en) 2008-09-17 2012-02-07 Motorola Solutions, Inc. Countermeasures against original background retrieval
KR101288670B1 (en) 2008-09-17 2013-07-22 모토로라 솔루션즈, 인크. Countermeasures against original background retrieval
JP2012515964A (en) * 2009-01-22 2012-07-12 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Pixel future hybrid fusion for PET / CT images
US8749579B2 (en) 2009-01-22 2014-06-10 Koninklijke Philips N.V. Pixel-feature hybrid fusion for PET/CT images

Also Published As

Publication number Publication date
JP3945524B2 (en) 2007-07-18

Similar Documents

Publication Publication Date Title
US6396491B2 (en) Method and apparatus for reproducing a shape and a pattern in a three-dimensional scene
US6522787B1 (en) Method and system for rendering and combining images to form a synthesized view of a scene containing image information from a second image
US20040176908A1 (en) Map displaying apparatus
US6429875B1 (en) Processing image data
JPH089172A (en) Color image processing unit
JP3728884B2 (en) Image processing apparatus and method, image composition apparatus, and recording medium
JP3945524B2 (en) Key signal generation apparatus and method, image composition apparatus, and recording medium
JP2007181134A (en) Image processor and table generation method
JPH1026967A (en) Picture processor
US20040164982A1 (en) Method and apparatus for editing three-dimensional model, and computer readable medium
WO2021161513A1 (en) Image processing device, image processing system, image processing method, and image processing program
JP3543209B2 (en) Elevation data drawing processing apparatus and recording medium recording elevation data drawing processing program
JP4207256B2 (en) Color image area dividing method and program storage medium
JP4211560B2 (en) Decorative image with multi-frame structure
JP2863753B1 (en) Texture acquisition method and texture acquisition system
JP4148090B2 (en) Blocked decoration image
JPH1125254A (en) Methods for picture analysis and picture edition
JP2003058885A (en) Method and device for searching correspondent point, and computer program
JPH07131817A (en) Method and device for image synthesis
JP3780587B2 (en) Color data converter
JP2584817B2 (en) Key signal generation circuit
JPH08329280A (en) Image composition device
JPH1070669A (en) Color conversion device
JPH06303507A (en) Moving picture generating device
JP2002197453A (en) Image processor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070309

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070320

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070402

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100420

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110420

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110420

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120420

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120420

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130420

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130420

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140420

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees