JP4399462B2 - Image processing apparatus, method, and program - Google Patents

Image processing apparatus, method, and program Download PDF

Info

Publication number
JP4399462B2
JP4399462B2 JP2006536313A JP2006536313A JP4399462B2 JP 4399462 B2 JP4399462 B2 JP 4399462B2 JP 2006536313 A JP2006536313 A JP 2006536313A JP 2006536313 A JP2006536313 A JP 2006536313A JP 4399462 B2 JP4399462 B2 JP 4399462B2
Authority
JP
Japan
Prior art keywords
image
background
area
pixel
silhouette
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006536313A
Other languages
Japanese (ja)
Other versions
JPWO2006033178A1 (en
Inventor
史和 松原
健一 星野
Original Assignee
ポリゴンマジック株式会社
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 ポリゴンマジック株式会社 filed Critical ポリゴンマジック株式会社
Publication of JPWO2006033178A1 publication Critical patent/JPWO2006033178A1/en
Application granted granted Critical
Publication of JP4399462B2 publication Critical patent/JP4399462B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3872Repositioning or masking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Studio Circuits (AREA)

Description

本発明は、撮影した画像から特定の画像を抽出して、別の画像と合成する技術に係り、特に、合成画像のノイズを軽減して、ゲームなどのリアルタイム性が要求される条件でも使用することのできる画像処理装置、方法、およびプログラムに関する。   The present invention relates to a technique for extracting a specific image from a photographed image and synthesizing it with another image. In particular, the present invention reduces noise of the synthesized image and is used even under conditions that require real-time performance such as a game. The present invention relates to an image processing apparatus, method, and program.

従来、撮影した画像から人物などの特定の画像を抽出して、任意の背景画像と合成する手法をして、いわゆるブルーバックと呼ばれる技術がある。これは、撮影する画像の背景を青色にしておき、この青色に相当する部分を色彩認識手段によって背景とみなして、この部分を別の背景画像に置き換えるというものである。この特定色を認識して背景に置き換えれば良いので、青色以外の色彩でも可能であるが、人物画像を抽出するときは、背景に置き換える色を青色にしておけば、人物の肌の色と補色関係に近くなり、顔などの一部が背景になる、すなわち、ノイズが乗る可能性を低減することができる。   Conventionally, there is a so-called blue back technique for extracting a specific image such as a person from a photographed image and combining it with an arbitrary background image. This means that the background of the image to be photographed is blue, the portion corresponding to this blue is regarded as the background by the color recognition means, and this portion is replaced with another background image. Since it is sufficient to recognize this specific color and replace it with the background, colors other than blue are also possible, but when extracting a person image, if the color to be replaced with the background is blue, the color of the person's skin and the complementary color It is possible to reduce the possibility that the relationship is close and a part of the face or the like becomes the background, that is, noise is added.

このブルーバック技術は、たとえば抽出する人物がその背景に置き換わる色と同じ色の模様を有する衣服を着用していると、その模様は背景に置き換わってしまうという問題がある。   This blue back technique has a problem that, for example, if a person to be extracted wears clothes having the same color pattern as that of the background, the pattern is replaced by the background.

これに対して、背景のみの画像と、人物などの抽出対象をその背景と共に写した画像を撮影し、両画像の差分から抽出対象のみを抽出して、ノイズ処理を行う技術が提案されている。(特許文献1参照)。この技術は、両画像のピクセル情報(たとえばRGBデータ)の差分からマスク画像(シルエット画像)を作成して、ノイズを編集によって削除するというものである。
特開2000−36032号公報
On the other hand, a technique has been proposed in which a background only image and an image in which an extraction target such as a person is copied together with the background are photographed, and only the extraction target is extracted from the difference between the two images to perform noise processing. . (See Patent Document 1). In this technique, a mask image (silhouette image) is created from a difference between pixel information (for example, RGB data) of both images, and noise is deleted by editing.
JP 2000-36032 A

ところで、上述の従来の技術は、コンピュータによって自動的にノイズを検出して除去することを目的としたものではないため、たとえば、動画のゲームとして、予めゲームのシナリオに応じて記録した背景画像に、常時カメラで撮影しているゲームプレーヤである人物の画像のみを抽出してそのゲームの背景画像と合成して表示させようとすると、CPUに負荷がかかりすぎて、リアルタイム性が損なわれるという問題がある。また、ゲーム装置などコンピュータによって画像処理を実行する装置にはメモリ容量の制約もある。   By the way, the above-described conventional technique is not intended to automatically detect and remove noise by a computer. For example, as a video game, a background image recorded in advance according to a game scenario is used. When extracting only the image of a person who is a game player who is always shooting with a camera and combining it with the background image of the game, the CPU is overloaded and the real-time performance is impaired. There is. Also, a device that executes image processing by a computer such as a game device has a memory capacity limitation.

本発明は、上記のかかる事情に鑑みてなされたものであり、撮影した画像から背景部分を消去して別の画像と合成する際に、コンピュータに負荷をかけずに、自動的に画像ノイズを検出して、除去または緩和することのできる画像処理装置、方法、およびプログラムを提供することを目的とする。   The present invention has been made in view of the above-described circumstances, and automatically eliminates image noise without imposing a load on a computer when a background portion is deleted from a captured image and combined with another image. An object is to provide an image processing apparatus, method, and program that can be detected and removed or alleviated.

上記の目的を達成するため、本発明に係わる画像処理装置は、背景画像と、この背景画像と同じ背景で抽出対象を含む抽出対象画像とを入力する画像入力手段と、背景画像と抽出対象画像のピクセル値の差分に基づいて非背景ピクセルと背景ピクセルを有するシルエット画像を作成する画像分離手段と、このシルエット画像を入力し、この入力画像のラインごとに非背景ピクセルに囲まれた領域をマークし、このマーク領域が隣接する行または列の背景ピクセルに接する場合は、当該マーク領域を背景領域に順次変更していき、残ったマーク領域を非背景領域に変換してシルエット画像を編集する背景ノイズ除去手段と、数値化された非背景度に基づいて、背景ノイズ除去手段によって編集されたシルエット画像の画像領域の端からピクセルごとに当該ピクセルの近傍領域の非背景度の平均化処理を順次行い、その後画像領域範囲を補正するノイズ緩和手段と、平均化処理された非背景度と抽出対象画像をもとにα合成用画像を作成し、別に入力された背景画像と共に出力する画像出力手段とを備えたことを特徴とする。   In order to achieve the above object, an image processing apparatus according to the present invention includes a background image, an image input means for inputting an extraction target image including the extraction target in the same background as the background image, and the background image and the extraction target image. An image separation means for creating a silhouette image having a non-background pixel and a background pixel based on the difference between the pixel values of the image, and inputting the silhouette image, and marking an area surrounded by the non-background pixels for each line of the input image If this mark area touches a background pixel in an adjacent row or column, the mark area is sequentially changed to a background area, and the remaining mark area is converted to a non-background area to edit the silhouette image. Pixels from the edge of the image area of the silhouette image edited by the noise removal means and the background noise removal means based on the digitized non-background degree In addition, a noise mitigation means that sequentially performs non-background degree averaging processing on the neighboring area of the pixel and then corrects the image area range, and for alpha synthesis based on the non-background degree that has been averaged and the extraction target image Image output means for generating an image and outputting the image together with a separately input background image is provided.

本発明の基本的な考え方は、次の如くである。
背景画像と抽出対象画像の差分をとったときに発生するノイズとしては、抽出対象の一部を背景とみなしてしまう背景ノイズ、背景の一部を抽出対象とみなしてしまう非背景ノイズ、抽出対象と背景の境界部分が他の領域に食い込んでしまうエッジノイズがある。
The basic idea of the present invention is as follows.
Noise that occurs when the difference between the background image and the extraction target image is taken as background noise that considers part of the extraction target as the background, non-background noise that considers part of the background as the extraction target, and extraction target And there is edge noise that the background boundary part bites into other areas.

このうち、背景ノイズについては、非背景領域中の閉じた背景領域をノイズと捉え、閉じた背景領域を走査し、非背景に変換することによって、ノイズを除去する。一方、非背景ノイズとエッジノイズについては、これらが小さい領域、細い領域である傾向を考慮して、エッジ部分で半透明のグラデーションをかけることで、目立たなくするというものである。   Among these, regarding the background noise, the closed background area in the non-background area is regarded as noise, and the closed background area is scanned and converted into the non-background, thereby removing the noise. On the other hand, non-background noise and edge noise are made inconspicuous by applying a semi-transparent gradation at the edge portion in consideration of the tendency that these are small regions and thin regions.

本発明によれば、背景ノイズについては除去でき、また、非背景ノイズとエッジノイズについては緩和することができ、CPUに負荷をかけずに画像処理の品質を向上させることができる。また、背景画像と非背景画像との境界にグラデーションがかかることになるので、非背景画像が背景画像になじんで自然な合成画像が作成できる。   According to the present invention, background noise can be removed, non-background noise and edge noise can be reduced, and image processing quality can be improved without imposing a load on the CPU. In addition, since gradation is applied to the boundary between the background image and the non-background image, a natural composite image can be created with the non-background image familiar with the background image.

また、本発明では、シルエット画像の複製を保存する必要が無く、その画像を直接編集しながらノイズの除去ないし緩和処理を行うことができるため、メモリ容量が少なくてすみ、ハードウェア資源の節約を図ることができる。   Further, in the present invention, it is not necessary to store a copy of the silhouette image, and noise can be removed or reduced while directly editing the image. Therefore, the memory capacity can be reduced, and hardware resources can be saved. Can be planned.

本発明に係わる画像処理装置は、さらに、画像分離手段によって作成されたシルエット画像のエッジを抽出した画像(エッジ抽出画像)を作成し、当該エッジ抽出画像とシルエット画像とを合成することによって非背景領域が拡大したシルエット画像を作成する前処理手段を備え、背景ノイズ除去手段は、この前処理手段によって作成されたシルエット画像を入力画像として、背景ノイズの除去処理を行うことを特徴とする。
非背景領域が拡大したシルエット画像を作成することによって、エッジノイズの非背景領域と背景領域の境界のいわゆる口の部分を閉じて背景ノイズに変換して、背景ノイズ除去手段によってこの背景ノイズを除去する。これによって、エッジノイズを除去することができるので画質が向上する。
The image processing apparatus according to the present invention further creates an image (edge extracted image) obtained by extracting the edges of the silhouette image created by the image separating means, and combines the edge extracted image and the silhouette image to create a non-background. The image processing apparatus includes preprocessing means for creating a silhouette image with an enlarged region, and the background noise removal means performs background noise removal processing using the silhouette image created by the preprocessing means as an input image.
By creating a silhouette image in which the non-background area is enlarged, the so-called mouth part of the boundary between the non-background area of the edge noise and the background area is closed and converted to background noise, and this background noise is removed by means of background noise removal. To do. As a result, the edge noise can be removed, thereby improving the image quality.

なお、非背景領域を拡大させて、エッジノイズを背景ノイズに変換させ、背景ノイズ除去処理を実行した後に、この非背景領域を元のサイズに向けて縮小処理するのが好ましい。   Note that it is preferable to enlarge the non-background area, convert the edge noise into background noise, perform the background noise removal process, and then reduce the non-background area toward the original size.

また、本発明に係わる画像処理装置では、さらに、画像分離手段によって作成されたシルエット画像の縦方向または横方向のヒストグラムを取り、当該ヒストグラムの幅に基づいて背景ノイズ除去手段またはノイズ緩和手段によって編集または補正する範囲を決定するシルエット領域抽出手段を備えたことを特徴とする。   The image processing apparatus according to the present invention further takes a vertical or horizontal histogram of the silhouette image created by the image separation means, and edits the background noise removal means or noise mitigation means based on the width of the histogram. Alternatively, a silhouette region extracting means for determining a correction range is provided.

シルエット領域を限定することによってノイズの除去や緩和などのフィルタリング処理に要する計算機の負荷を減少させることができる。   By limiting the silhouette region, it is possible to reduce the load on the computer required for filtering processing such as noise removal and mitigation.

本発明に係わる画像処理装置において、好ましくは、画像分離手段は、背景画像と抽出対象画像のピクセル値の差分を閾値と比較することによって非背景ピクセルであるか、または、背景ピクセルであるかを判定し、かつ、閾値に基づいて作成されノイズ度合いの判定可能な画像を表示し、入力部から入力される閾値の変更要求に基づいて閾値を変更するする閾値調整手段を備えるのがよい。   In the image processing apparatus according to the present invention, preferably, the image separation means determines whether the pixel is a non-background pixel or a background pixel by comparing a difference between pixel values of the background image and the extraction target image with a threshold value. It is preferable to include a threshold adjustment unit that determines and displays an image that can be determined based on the threshold and can determine the degree of noise, and that changes the threshold based on a threshold change request input from the input unit.

これによって、ノイズをある程度抑えた状態でノイズ処理を行うことができ、合成後の品質を予測することができる。   Thereby, noise processing can be performed in a state in which noise is suppressed to some extent, and the quality after synthesis can be predicted.

より好ましくは、ノイズ度合いを表示させた状態で抽出対象の範囲指定を行うようにする。このようにすれば、範囲外は、無条件に背景とし、範囲内のノイズ処理のみを行えば良いので、コンピュータの負担が減ると共に、画像処理の速度を上げることができる。さらに、操作者(ユーザ)が背景ノイズ、非背景ノイズ、エッジノイズのいずれかのノイズ処理を実行するかを設定可能にすることにより、コンピュータの負荷を軽減して操作者の要求に合った品質の画像処理が可能となる。   More preferably, the range of the extraction target is specified with the noise level displayed. In this way, the outside of the range is unconditionally set as the background and only noise processing within the range needs to be performed, so that the burden on the computer is reduced and the speed of the image processing can be increased. Furthermore, by enabling the operator (user) to perform noise processing of background noise, non-background noise, or edge noise, the computer's load is reduced and the quality meets the operator's requirements. Image processing becomes possible.

なお、操作者が抽出対象の範囲を入力するのに替えて、予め表示部に抽出対象領域を指示する範囲指定情報(たとえば枠線)を表示しておき、画像入力手段は、この範囲指定情報に基づいて当該範囲の抽出対象画像を入力して処理するようにしてもよい。   Instead of inputting the extraction target range by the operator, range designation information (for example, a frame line) indicating the extraction target area is displayed in advance on the display unit, and the image input means displays the range designation information. Based on the above, an extraction target image in the range may be input and processed.

ここで、「画像処理装置」は、画像処理機能を有する装置の意味であり、汎用的なコンピュータ装置の他、当該機能を有するゲーム装置、テレビ電話、カメラ等の撮像装置なども含む趣旨である。   Here, the “image processing device” means a device having an image processing function, and includes a general-purpose computer device, a game device having the function, a video phone, an imaging device such as a camera, and the like. .

また、「非背景度」とは、抽出対象画像のピクセルごとまたはピクセル群ごと設定され、当該ピクセルまたはピクセル群が非背景(抽出対象)である度合いを示すものである。非背景度を8ビットで表した場合には、0から255の間の値をとる。なお、実質的に非背景度の意義を有すれば足りる。したがって、背景度なども含まれる趣旨である。   The “non-background degree” is set for each pixel or pixel group of the extraction target image, and indicates the degree to which the pixel or pixel group is non-background (extraction target). When the non-background level is represented by 8 bits, it takes a value between 0 and 255. In addition, it is sufficient if it has the significance of non-background level. Therefore, the background level is also included.

本発明に係わる画像処理方法は、入力した画像から特定の画像を抽出して、別の画像と合成する画像処理方法であって、背景画像と、この背景画像と同じ背景で抽出対象を含む抽出対象画像とを入力するステップと、背景画像と抽出対象画像のピクセル値の差分に基づいて非背景ピクセルと背景ピクセルを有するシルエット画像を作成するステップと、このシルエット画像のラインごとに非背景ピクセルに囲まれた領域をマークし、その領域が隣接する行または列の背景ピクセルに接する場合は、背景領域に順次変更していき、残ったマーク領域を非背景領域に変換してシルエット画像を編集した後、数値化された非背景度に基づいて、当該シルエット画像の画像領域の端からピクセルごとに当該ピクセルの近傍領域の非背景度の平均化処理を順次行い、その後画像領域範囲を補正するステップと、平均化処理された非背景度と抽出対象画像をもとにα合成用画像を生成し、別に入力された背景画像と共に出力するステップと、を含むことを特徴とする。   An image processing method according to the present invention is an image processing method for extracting a specific image from an input image and synthesizing it with another image, and includes a background image and an extraction target including the same background as the background image. A target image, a step of creating a silhouette image having a non-background pixel and a background pixel based on a difference between pixel values of the background image and the extraction target image, and a non-background pixel for each line of the silhouette image. When the enclosed area is marked, and the area touches the background pixel of the adjacent row or column, it is changed to the background area sequentially, and the remaining mark area is converted to the non-background area and the silhouette image is edited. Then, based on the digitized non-background degree, the non-background degree averaging process of the neighboring area of the pixel for each pixel from the edge of the image area of the silhouette image Performing sequentially, then correcting the image area range, and generating an α composition image based on the non-background degree averaged and the extraction target image, and outputting together with the separately input background image. It is characterized by including.

本発明によれば、ノイズの除去、および、緩和についての一連の処理が、シルエット画像を直接編集しながら行うことができるので、メモリの節約になる。   According to the present invention, a series of processes for noise removal and mitigation can be performed while directly editing a silhouette image, thus saving memory.

また、本発明に係わるプログラムは、カメラで撮影されたゲームプレーヤの画像をゲームの背景中に表示してゲームを進行するコンピュータゲーム用プログラムであって、背景画像を入力して保存する処理と、背景画像と同じ背景でプレーヤを含む抽出対象画像を入力する処理と、保存されている背景画像と抽出対象画像のピクセル値の差分に基づいて非背景ピクセルと背景ピクセルを有するシルエット画像を作成する画像分離処理と、このシルエット画像のラインごとに非背景ピクセルに囲まれた領域をマークし、その領域が隣接する行または列の背景ピクセルに接する場合は、背景領域に順次変更していき、残ったマーク領域を非背景領域に変換してシルエット画像を編集する背景ノイズ除去処理と、数値化された非背景度に基づいて、背景ノイズ除去手段によって編集されたシルエット画像の画像領域の端からピクセルごとに当該ピクセルの近傍領域の非背景度を平均化する処理を順次行い、その後画像領域範囲を補正するノイズ緩和処理と、平均化処理された非背景度と抽出対象画像をもとにα合成用画像を作成し、ゲームの進行を実行する処理によって作成され、または、外部記憶装置から入力された背景画像と共に出力する画像出力処理と、をコンピュータに実行させることを特徴とする。   A program according to the present invention is a computer game program for displaying a game player image taken by a camera in the background of a game and playing the game, and a process of inputting and storing the background image; An image that creates a silhouette image having non-background pixels and background pixels based on the process of inputting an extraction target image including a player with the same background as the background image and the difference between the pixel values of the stored background image and the extraction target image For each line of this silhouette image, mark an area surrounded by non-background pixels, and if that area touches a background pixel in an adjacent row or column, it will be changed to the background area in order and remain Based on the background noise removal process that edits the silhouette image by converting the mark area to the non-background area, and the non-background degree that is digitized, A noise reduction process that averages the non-background degree of the neighboring area of the pixel for each pixel from the edge of the image area of the silhouette image edited by the background noise removing means, and then corrects the image area range, and the average Output based on the non-background level and the extraction target image that have been processed, and output together with the background image that is created by the process of executing the game or input from the external storage device And causing the computer to execute the processing.

一連のノイズ処理がシルエット画像を直接編集しながら行うことができゲーム装置のメモリの節約を図ることができる。また、ノイズの緩和処理については、ピクセルの近傍領域の非背景度を平均化するため、ヒット率が上がり、処理速度が向上する。   A series of noise processing can be performed while directly editing the silhouette image, and the memory of the game apparatus can be saved. In addition, the noise mitigation process averages the non-background degree in the vicinity of the pixels, so that the hit rate is increased and the processing speed is improved.

なお、好ましくは、α合成用画像の作成処理と、ゲームの進行を実行する処理とを独立に動作可能にする。ゲームプレーヤの表示が必要になった時点で保存されているα合成用画像を用いるため、ゲーム中の応答性の向上を図ることができる。   Preferably, the α composition image creation processing and the game execution processing can be operated independently. Since the α composition image stored when the game player needs to be displayed is used, the responsiveness during the game can be improved.

本発明によれば、自動的に画像ノイズ検出して、背景ノイズについては除去、非背景ノイズとエッジノイズについては緩和することができる。また、一連のノイズ処理は、シルエット画像を直接編集しながら行うことができるので、メモリ領域の節約を図ることができる。   According to the present invention, it is possible to automatically detect image noise, remove background noise, and mitigate non-background noise and edge noise. Further, since a series of noise processing can be performed while directly editing the silhouette image, it is possible to save the memory area.

また、ゲーム用プログラムにおいては、ゲームの背景画像にカメラで撮影したゲームプレーヤなど前影画像(非背景画像)を合成する際、境界部分にグラデーションがかかるため、ゲームプレーヤをゲームの背景に溶け込ますことができて、より臨場感のあるゲームを提供することができる。   In addition, in the game program, when a foreshadow image (non-background image) such as a game player shot with a camera is combined with a background image of the game, a gradation is applied to the boundary portion, so the game player blends into the game background. It is possible to provide a more realistic game.

以下、本発明の実施形態を説明する。
<第1の実施形態>
図1は、本発明の第1の実施形態による画像処理装置1のブロック図である。ここで、画像処理装置1は、カメラ51によって撮影された映像信号を入力してデジタル信号に変換するA/D変換手段11、画像処理を実行する処理部12、画像データを記憶するメモリ13、テレビモニタ52へ送る表示用データを記憶する表示用メモリ14、デジタル信号をテレビモニタ用の信号に変換するD/A変換手段15、CD−ROMやDVD−ROMなどの記憶媒体の駆動装置(外部記憶装置)16、および、マウスやキーボードなどの入力部17を備えている。
Embodiments of the present invention will be described below.
<First Embodiment>
FIG. 1 is a block diagram of an image processing apparatus 1 according to the first embodiment of the present invention. Here, the image processing apparatus 1 includes an A / D conversion unit 11 that inputs a video signal captured by the camera 51 and converts it into a digital signal, a processing unit 12 that executes image processing, a memory 13 that stores image data, Display memory 14 for storing display data to be sent to the TV monitor 52, D / A conversion means 15 for converting a digital signal into a signal for a TV monitor, and a drive device for a storage medium such as a CD-ROM or DVD-ROM (external Storage device) 16 and an input unit 17 such as a mouse or a keyboard.

処理部12は、図2に示すように画像入力手段(処理)21、画像分離手段(処理)22、閾値調整手段(処理)23、背景ノイズ除去手段(処理)24、ノイズ緩和手段(処理)25、および、画像出力手段(処理)26を有している。また、メモリ13には、予め背景画像が記憶されているものとする。   As shown in FIG. 2, the processing unit 12 includes an image input means (process) 21, an image separation means (process) 22, a threshold adjustment means (process) 23, a background noise removal means (process) 24, and a noise mitigation means (process). 25 and image output means (processing) 26. In addition, it is assumed that a background image is stored in the memory 13 in advance.

次に、各手段の動作を説明する。以下の説明において、画像データは、便宜上RGB系で説明するが、カメラ51やテレビモニタ52の仕様等によって必要ならばYCrCb系など他の単位系に適宜変換するものとする。   Next, the operation of each means will be described. In the following description, the image data is described in the RGB system for the sake of convenience. However, it is assumed that it is appropriately converted to another unit system such as a YCrCb system if necessary according to the specifications of the camera 51 and the television monitor 52.

[画像入力処理]
まず、入力部17からの要求によって、処理部12の画像入力手段21が起動され、カメラ51で撮影された画像データを入力してメモリ13に保存する。このとき、人物などの抽出対象を含まない背景のみの画像(背景画像)と、抽出対象を含む画像(抽出対象画像)をそれぞれ撮影してメモリ13に保存するようにする。図3は背景画像、図4は抽出対象画像の例である。図4は、図3と同じ背景をバックに抽出対象の人物(たとえばゲームのプレーヤ)が撮影されている。
[Image input processing]
First, in response to a request from the input unit 17, the image input unit 21 of the processing unit 12 is activated, and image data captured by the camera 51 is input and stored in the memory 13. At this time, an image of only the background (background image) not including an extraction target such as a person and an image including the extraction target (extraction target image) are respectively photographed and stored in the memory 13. 3 is a background image, and FIG. 4 is an example of an extraction target image. In FIG. 4, a person to be extracted (for example, a game player) is photographed with the same background as in FIG.

[画像分離処理]
次に、画像分離手段22によって、背景画像と抽出対象画像のピクセルごとの差分をとる。つまり、背景画像と抽出対象画像のRGB各8ビット(計24ビット)のRGBそれぞれの差分の合計値を計算する。そして、その合計値が所定の閾値以下のときは、そのピクセルに対応する値(非背景度)を8ビットのデータAで表して、A=0とする。一方、合計値が所定の閾値より大きいときは、そのピクセルを抽出対象(非背景)とし、A=255とする。
[Image separation processing]
Next, a difference for each pixel between the background image and the extraction target image is obtained by the image separation unit 22. In other words, the total value of the differences between the background image and the extraction target image for each of RGB of 8 bits for each of RGB (24 bits in total) is calculated. When the total value is equal to or less than a predetermined threshold value, the value (non-background degree) corresponding to the pixel is represented by 8-bit data A, and A = 0. On the other hand, when the total value is larger than the predetermined threshold, the pixel is set as an extraction target (non-background), and A = 255.

このように背景画像と抽出対象画像をもとに2値化したシルエット画像を作成する。なお、閾値との比較の仕方は上記に限らず、RGB値のそれぞれの差分の平均値を閾値とするなど、色相、彩度、明度について両画像の差に基づいて2値化するようにすれば良い。   In this way, a binarized silhouette image is created based on the background image and the extraction target image. The method of comparison with the threshold value is not limited to the above, and binarization is performed based on the difference between the two images, such as the average value of the differences between the RGB values as a threshold value. It ’s fine.

図5は、シルエット画像の説明図である。ここで、黒く塗りつぶした部分が背景(A=0)、白抜きの部分が抽出対象(A=255)である。   FIG. 5 is an explanatory diagram of a silhouette image. Here, the blacked out part is the background (A = 0) and the white part is the extraction target (A = 255).

しかしながら、実際のシルエット画像は、図6に示すようにノイズが乗っているため、このノイズ処理が必要になる。ノイズの種類としては、図6(a)に示す抽出対象の一部を背景とみなしてしまう背景ノイズ、図6(b)に示す背景の一部を抽出対象とみなしてしまう非背景ノイズ、図6(c)に示す抽出対象と背景の境界部分が互いに他の領域に食い込んでしまうエッジノイズがある。   However, since the actual silhouette image has noise as shown in FIG. 6, this noise processing is required. As types of noise, background noise that considers part of the extraction target shown in FIG. 6A as the background, non-background noise that considers part of the background shown in FIG. 6B as the extraction target, There is edge noise in which the boundary between the extraction target and the background shown in 6 (c) bites into another region.

背景ノイズは、操作者の服装と背景の色が近いときなどに現れる。非背景ノイズは、蛍光灯のちらつきなどによる背景ピクセルの誤差で現れ、背景の任意の場所にポツポツとして出現する。エッジノイズは、背景ノイズ・非背景ノイズの出現原因が複合して現れ、エッジの部分がぎざぎざになったような状態になる。   Background noise appears when the operator's clothes are close to the background color. Non-background noise appears due to background pixel errors due to flickering of fluorescent lamps, etc., and appears as an arbitrary spot in the background. Edge noise appears as a combination of background noise and non-background noise, and the edges become jagged.

これらのノイズは、閾値調整手段23によって、閾値を調整することにより、ある程度は削減可能であるが、背景と抽出対象の色彩が近似している場合などは、完全に除去できない場合がある。また、背景ノイズを減らそうとすると非背景ノイズが増加するなど一定の限界がある。したがって、残存するこれらのノイズの除去ないし緩和が必要になる。   These noises can be reduced to some extent by adjusting the threshold value by the threshold value adjusting means 23, but may not be completely removed when the background and the color to be extracted are approximated. In addition, there is a certain limit such that non-background noise increases when background noise is reduced. Therefore, it is necessary to remove or mitigate these remaining noises.

以下、これらのノイズ処理の手順を図17乃至図22を用いて説明する。
[背景ノイズ除去処理]
背景ノイズ除去処理は、図17のステップS301〜ステップ304の各処理で構成される。
Hereinafter, the noise processing procedure will be described with reference to FIGS.
[Background noise removal]
The background noise removal process includes the processes in steps S301 to 304 in FIG.

まず、背景ノイズ候補領域マーク処理において、シルエット画像の 画像中の全ての横方向のラインに対して、非背景ピクセル(A=255)にはさまれた背景ピクセル(A=0)をマークする(S401,S402)。マークとしては、たとえば、グレー(例えばA=128)を割り当てる。図7は、背景ノイズ除去処理の説明図である。この図において、黒く塗りつぶされたピクセル(図中の単位正方形)は背景ピクセル、白抜きのピクセルは非背景ピクセルである。各ラインごとにステップS401とS402の処理を行い、これを全ラインに対して実施した後の状態は図7(b)となる。ここで、グレー(灰色)のピクセルはマークされたピクセルである。   First, in background noise candidate region mark processing, a background pixel (A = 0) sandwiched between non-background pixels (A = 255) is marked for all horizontal lines in the silhouette image ( S401, S402). For example, gray (for example, A = 128) is assigned as the mark. FIG. 7 is an explanatory diagram of the background noise removal process. In this figure, pixels filled in black (unit squares in the figure) are background pixels, and white pixels are non-background pixels. FIG. 7B shows a state after the processing of steps S401 and S402 is performed for each line and this is performed for all lines. Here, the gray pixel is a marked pixel.

そして、候補領域上方確認処理において、全てのラインに対して上から下にマークされた線分を走査して、マークされた線分のうち少なくともひとつのピクセルに対して、そのひとつ上のピクセルが背景(A=0)の場合は、そのピクセルに接するマーク部分全体を背景に塗り替える(S501、S502)。つまりマークされたピクセルのA値を128から0に変更するのである。図7(c)は途中のラインまで処理を終えた状態、図7(d)は全ラインについて処理を完了した後の状態を示す。   Then, in the candidate area upper confirmation process, the line segment marked from the top to the bottom is scanned for all lines, and for at least one pixel of the marked line segments, the pixel one above is scanned. In the case of the background (A = 0), the entire mark portion in contact with the pixel is repainted with the background (S501, S502). That is, the A value of the marked pixel is changed from 128 to 0. FIG. 7C shows a state where the process has been completed up to an intermediate line, and FIG. 7D shows a state after the process has been completed for all lines.

最下行のラインについて上記の処理が完了すると、次は、候補領域下方確認処理において、全てのラインに対して逆方向、すなわち、下から上にマークされた線分を走査する。そして、マークされた線分のうち少なくともひとつのピクセルに対して、そのひとつ下のピクセルが背景の場合は、マークされた線分全体について背景に塗り替える(S601、S602)。図7(e)(f)は途中のラインまで終了した状態、図7(g)は全ラインについて処理を完了した後の状態である。   When the above processing is completed for the lowermost line, next, in the candidate area lower confirmation processing, all lines are scanned in the reverse direction, that is, the line segment marked from the bottom to the top. If at least one pixel of the marked line segment is the background, the entire marked line segment is painted with the background (S601, S602). FIGS. 7E and 7F show a state where the process has been completed up to the middle line, and FIG. 7G shows a state after the process has been completed for all the lines.

上記が全て終了した段階で、マークとして残っているピクセルは、背景ノイズなので、非背景として塗り替える(S701、S702)。図7(h)は、背景ノイズ除去処理後のシルエット画像の状態である。
以上の処理によって、背景ノイズを除去する。
When all of the above are completed, the pixels remaining as marks are background noise and are repainted as non-background (S701, S702). FIG. 7H shows the state of the silhouette image after the background noise removal process.
Background noise is removed by the above processing.

[非背景ノイズ・エッジノイズの緩和処理]
次に、図8および図22を用いて非背景ノイズとエッジノイズの緩和処理の手順を説明する。
[Reduction of non-background noise and edge noise]
Next, the procedure for mitigating non-background noise and edge noise will be described with reference to FIGS.

イメージ上の全てのピクセルに対して、右下方向に4x4ピクセルの領域を走査し、その領域のA値の平均で置き換える(S801、S802)。たとえば、図8(b)の○部分のピクセルは背景ピクセル(A=0)だが、平均を取るとA=255*3/16=48となる。ここで、記号「*」は乗算、「/」は除算を意味している。   For all the pixels on the image, a 4 × 4 pixel area is scanned in the lower right direction and replaced with the average of the A values in the area (S801, S802). For example, the circled pixels in FIG. 8B are background pixels (A = 0), but when averaged, A = 255 * 3/16 = 48. Here, the symbol “*” means multiplication, and “/” means division.

また、図8(c)のピクセルは非背景ピクセル(A=255)だが、平均を取ると、図8(b)と同様にA=255*3/16=48となる。   Further, although the pixel in FIG. 8C is a non-background pixel (A = 255), the average is A = 255 * 3/16 = 48 as in FIG. 8B.

この平均化処理を、まず、最上位のラインの左から右のピクセルについて実行し、それが完了すると順に下のラインついて実行していく。この処理を、最下行のラインの右端のピクセルまで繰り返す。図8(d)は、一連の平均化処理の完了後の状態である。   This averaging process is first performed for the pixels from the left to the right of the uppermost line, and when this is completed, the lower line is sequentially performed. This process is repeated until the rightmost pixel of the bottom line. FIG. 8D shows a state after completion of a series of averaging processes.

なお、演算領域の境界部分の精度が問題になる場合は、演算領域を十分含む形で予め画像を取得しておくようにするとよい。境界部分の精度があまり問題にならなければ、最下行(最も下のライン)から上4行目の平均化処理を行った後、その下のラインはその上のピクセル値と同じ値で埋めるようにしても良い。   If the accuracy of the boundary portion of the calculation area becomes a problem, an image may be acquired in advance so as to sufficiently include the calculation area. If the accuracy of the boundary does not matter so much, after averaging from the bottom row (bottom line) to the top four rows, the bottom line is filled with the same value as the pixel above it Anyway.

以上の平均化処理の結果、シルエット画像は左上方向にずれた形になるので、例えば右下方向に2ピクセル、すなわち、平均計算の単位領域4×4の半分だけ全体をずらすことでフィルタを適正な位置にすることができる(S803)。(図8(e)の状態)   As a result of the above averaging process, the silhouette image is shifted in the upper left direction. For example, the right pixel is shifted by 2 pixels in the lower right direction, that is, by shifting the whole of the average calculation unit area 4 × 4. (S803). (State of FIG. 8 (e))

なお、この位置の移動は、実際にメモリ上のピクセルの値を書き直す必要は無く、シルエット画像の格納されている領域のアドレス情報を2×2だけ左上にずらすのみでよい。   It is not necessary to actually rewrite the pixel value on the memory, and the address information of the area in which the silhouette image is stored need only be shifted to the upper left by 2 × 2.

上記の説明において便宜上、横、縦という表現をしたが、画像データをX軸、Y軸の座標で表したときにどちらを縦または横にして上記の処理を行っても良いがピクセル情報を保存するアドレスが連番になる方向を横方向に取ると処理プログラムを作成しやすくなる。   In the above description, for the sake of convenience, the terms “horizontal” and “vertical” are used. However, when the image data is expressed by the coordinates of the X axis and the Y axis, either of the above processing may be performed vertically or horizontally, but pixel information is stored. If the direction in which the addresses to be processed are arranged in the horizontal direction, a processing program can be easily created.

[画像出力処理]
上述の一連のノイズ処理後のシルエット画像をαチャンネル用データとして図4の抽出対象画像データを用いてα合成(アルファブレンディング)用画像データを作成する。
[Image output processing]
Image data for α synthesis (alpha blending) is created using the extraction target image data of FIG. 4 using the silhouette image after the series of noise processing described above as α channel data.

ここで、α合成用画像データは、ピクセルごとにR:G:B:Aの各8ビット(計32ビット)のデータの配列として構成されている。   Here, the image data for α synthesis is configured as an array of data of 8 bits each of R: G: B: A (32 bits in total) for each pixel.

そして、外部記憶装置16のCD−ROMから読み込んだ合成用の背景データを表示用メモリ14に書き込み、また、α合成用画像データを同様に表示用メモリ14に書き込んだ後に、表示出力コマンドを出すことによって、両画像データがテレビモニタ52上に合成されて表示される。図9は、この説明図である。RGB値による抽出対象画像データとA値によるシルエット画像データによってα合成用画像データを作成し(図9(a))、これとRGB値による背景データ(図9(b))を画像合成する。具体的には、図9(b)の背景データを描画した上に図9(a)のα合成用画像データを上書きする。これによって合成画像が表示される(図9(c))。このこのとき、背景上に表示される抽出対象画像は、ピクセルに対応するA値によって、完全透明(A=0)、完全不透明(A=255)、中間状態(0<A<255)となる。   Then, the composition background data read from the CD-ROM of the external storage device 16 is written in the display memory 14, and the image data for α composition is similarly written in the display memory 14, and then a display output command is issued. As a result, both image data are combined and displayed on the television monitor 52. FIG. 9 is an explanatory diagram of this. Image data for α synthesis is created from the image data to be extracted based on RGB values and silhouette image data based on A values (FIG. 9A), and this is combined with background data based on RGB values (FIG. 9B). Specifically, the background data in FIG. 9B is drawn and the image data for α composition in FIG. 9A is overwritten. As a result, a composite image is displayed (FIG. 9C). At this time, the extraction target image displayed on the background is completely transparent (A = 0), completely opaque (A = 255), and in an intermediate state (0 <A <255) depending on the A value corresponding to the pixel. .

上記のノイズ処理の結果、背景ノイズに関しては除去され、非背景ノイズ・エッジノイズに関しては緩和されると共に、背景と対象画像との境界部分についてA値が中間値となりグラデーションがかかるため、対象画像が背景になじみ、自然な合成画像となる。   As a result of the above noise processing, background noise is removed, non-background noise and edge noise are alleviated, and the A value becomes an intermediate value and gradation is applied to the boundary portion between the background and the target image. It becomes familiar with the background and becomes a natural composite image.

なお、処理部12の各手段については、都度入力部からの要求によって起動するようにしてもよいが、前処理の完了によって自動的に起動されるようにしてもよい。   Note that each unit of the processing unit 12 may be activated by a request from the input unit every time, but may be automatically activated upon completion of the preprocessing.

本実施形態によれば、CPUに負荷をかけずに自動的にノイズ処理を施して画像の合成を行うことができる。   According to the present embodiment, it is possible to automatically perform noise processing without applying a load to the CPU to perform image synthesis.

特に背景ノイズ除去処理については、まず、ラインごとに非背景ピクセルに囲まれた領域をマークし、その領域が隣接する行または列の背景ピクセルに接する場合は、背景領域に順次変更していき、残ったマーク領域を背景ノイズとして除去するようにしたので、シルエット画像自体を編集しながら処理を行うことができ、処理用一時メモリを確保する必要が無いのでメモリの節約を図ることができる。また、走査するメモリ領域と書き込むメモリ領域が近いためキャッシュヒット率が上がり速度の向上が見込める。   For background noise removal processing in particular, first mark the area surrounded by non-background pixels for each line, and if the area touches the background pixel of the adjacent row or column, then change to the background area sequentially, Since the remaining mark area is removed as background noise, processing can be performed while editing the silhouette image itself, and it is not necessary to secure a temporary memory for processing, so that memory can be saved. In addition, since the memory area to be scanned and the memory area to be written are close to each other, the cache hit rate is increased and the speed can be improved.

また、ノイズ緩和処理については、領域の端から順次平均化処理を行い、最後に領域範囲を補正するようにしたので、背景ノイズ除去処理の出力画像をそのまま編集していくことができ、処理用一時メモリを確保する必要がない。また、背景ノイズ除去処理と同様に、走査するメモリ領域と書き込むメモリ領域が近いためキャッシュヒット率が上がり速度の向上が見込める。   In addition, with regard to noise reduction processing, averaging processing is performed sequentially from the edge of the region, and finally the region range is corrected. Therefore, the output image of the background noise removal processing can be edited as it is, for processing. There is no need to reserve temporary memory. Similarly to the background noise removal process, since the memory area to be scanned and the memory area to be written are close to each other, the cache hit rate is increased and the speed can be improved.

<第2の実施形態>
次に、第2の実施形態を説明する。
構成は、図1および図2と同様であるが、図1の画像処理装置1はゲーム装置として機能するものである。また、入力部17としては、ゲーム用コントローラが用いられる。
<Second Embodiment>
Next, a second embodiment will be described.
The configuration is the same as in FIGS. 1 and 2, but the image processing device 1 in FIG. 1 functions as a game device. As the input unit 17, a game controller is used.

CD−ROMやDVD−ROMなどの記憶媒体には、ゲームプログラムおよびゲーム映像の背景として表示される画像データが保存されている。また、ゲーム映像の各フレームに関連付けられてゲームプレーヤ(抽出対象)の画像の挿入位置情報が記憶されている。   A storage medium such as a CD-ROM or a DVD-ROM stores game data and image data to be displayed as the background of the game video. Further, information on the insertion position of the image of the game player (extraction target) is stored in association with each frame of the game video.

記憶媒体には、画像入力手段(処理)21、画像分離手段(処理)22、閾値調整手段(処理)23、背景ノイズ除去手段(処理)24、ノイズ緩和手段(処理)25、画像処理手段(処理)26のほか、ゲームの進行を行うゲーム実行手段(処理)27をコンピュータに実行させるためのプログラムが格納されている。   The storage medium includes image input means (process) 21, image separation means (process) 22, threshold adjustment means (process) 23, background noise removal means (process) 24, noise mitigation means (process) 25, image processing means ( In addition to (processing) 26, a program for causing a computer to execute game execution means (processing) 27 for progressing the game is stored.

記憶媒体を外部記憶装置16に挿入して起動すると、CD−ROMに保存されている必要なプログラムが、メモリ13のプログラム領域にローディングされ、処理部12によって起動される。   When the storage medium is inserted into the external storage device 16 and activated, necessary programs stored in the CD-ROM are loaded into the program area of the memory 13 and activated by the processing unit 12.

[事前準備段階]
まず、ゲームスタート前の事前準備として、背景画像と抽出対象画像(プレーヤ画像)を入力して、画像分離手段によって、両画像の差分を取ってシルエット画像を作成する。
なお、背景画像はメモリ13に保存し、この後のゲーム実行中の画像分離に使用する。 そして、シルエット画像のA値(0または255)の閾値を調整する。
[Preparation stage]
First, as a pre-preparation before starting the game, a background image and an extraction target image (player image) are input, and a silhouette image is created by taking a difference between the two images by an image separation unit.
The background image is stored in the memory 13 and used for image separation during the subsequent game execution. Then, the threshold value of the A value (0 or 255) of the silhouette image is adjusted.

なお、プレーヤ画像を入力するときは、プレーヤ(操作者)に立って欲しい位置を限定するために、図11に示すように、プレーヤを含む画像にシルエットを表示し、プレーヤの位置を誘導するのが好ましい。図11では、画面中に「シルエットの位置に立ってプレイしてください」という誘導指示が表示されている。画像中でプレーヤが存在する位置を限定することで、画像解析の範囲を限定しCPUの処理負荷を軽減することができる。   When inputting a player image, in order to limit the position at which the player (operator) wants to stand, as shown in FIG. 11, a silhouette is displayed on the image including the player to guide the position of the player. Is preferred. In FIG. 11, a guidance instruction “Please stand and play in silhouette” is displayed on the screen. By limiting the position where the player exists in the image, the range of image analysis can be limited and the processing load on the CPU can be reduced.

[閾値調整処理]
背景・非背景分離のための閾値は経験からある程度固定的に設定可能だが、プレーヤを含む画像を生成する環境を限定することができないため、操作者が調整する機能を搭載するのが好ましい。閾値の大体の目安は0〜255の範囲で40程度の値である。
[Threshold adjustment processing]
Although the threshold for background / non-background separation can be set to a certain degree based on experience, it is not possible to limit the environment for generating an image including the player. A rough threshold is a value of about 40 in the range of 0-255.

閾値調整用のユーザ画面として、一つは、図12に例示するように、スライダーを表示して、微調整を可能にする方法がある。プレーヤは、画面上のスライダーを左右に移動させることで、閾値を変更し、変更結果の合成画像を画面上で直接確認する。図12(a)は、閾値が低い、すなわち、背景画像と抽出対象画像とのピクセル値の差が小さい場合でも非背景(抽出対象)と判定するため、非背景ノイズが大きく発生している。図12(b)は、閾値が適正で、ほとんどノイズが発生していない例である。図12(c)は、閾値が高い場合は、ピクセル値の差が大きくないと非背景とみなさないため、エッジノイズによって、抽出対象が背景に食い込まれている。   As one example of the user screen for threshold adjustment, there is a method of enabling fine adjustment by displaying a slider as illustrated in FIG. The player changes the threshold by moving the slider on the screen to the left and right, and directly confirms the composite image of the change result on the screen. In FIG. 12A, since the threshold value is low, that is, even when the difference between the pixel values of the background image and the extraction target image is small, it is determined as non-background (extraction target), and thus non-background noise is greatly generated. FIG. 12B is an example in which the threshold is appropriate and almost no noise is generated. In FIG. 12C, when the threshold value is high, it is not regarded as non-background unless the difference in pixel values is large, and therefore, the extraction target is bitten into the background by edge noise.

もう一つは、図13に例示するように代表的な閾値を複数個サンプリングし、それぞれの設定ボタンを用意し、プレーヤがボタンを選ぶことで大まかに設定する方法がある。例えば、3つのボタンそれぞれに低め(20くらい)中くらい(40くらい)高め(60くらい)の閾値を割り当て、それぞれの設定ボタンに対応する合成画像を表示するようにして、適正なボタンを選択する。これによって選択されたボタンの閾値がセットされる。   The other is a method of sampling a plurality of representative threshold values as shown in FIG. 13, preparing respective setting buttons, and roughly setting the player by selecting the button. For example, assign a low (about 20), medium (about 40), and high (about 60) threshold to each of the three buttons, and select the appropriate button by displaying the composite image corresponding to each setting button. . As a result, the threshold value of the selected button is set.

この事前準備が終了すると、ゲームが開始される。
ゲーム中の画像処理として、プレーヤ画像抽出処理とゲームの背景画像と合成して出力する画像出力処理が独立して行われる。
When this advance preparation is completed, the game is started.
As image processing during the game, player image extraction processing and image output processing that is combined with the game background image and output are performed independently.

[プレーヤ画像抽出処理]
プレーヤの画像を周期的に取り込み画像入力処理、画像分離処理、背景ノイズ除去処理、ノイズ緩和処理を実行する(S105〜S108)。
[Player image extraction processing]
The player's image is periodically fetched, and image input processing, image separation processing, background noise removal processing, and noise reduction processing are executed (S105 to S108).

なお、画像入力処理では、カメラ51を通してプレーヤ画像を入力し、この画像と事前処理でメモリ13に保存した背景画像とを用いて画像分離処理以降の処理を実行する。
これらの処理手順は、第1の実施形態と同様であるため説明を割愛する。
ノイズ緩和処理の出力としては、α合成用画像データが作成され、メモリ13に保存される。
In the image input process, the player image is input through the camera 51, and the process after the image separation process is executed using this image and the background image stored in the memory 13 by the pre-processing.
Since these processing procedures are the same as those in the first embodiment, a description thereof will be omitted.
As the output of the noise reduction processing, image data for α synthesis is created and stored in the memory 13.

[画像出力処理]
次にゲーム実行中の画像出力処理について説明する。なお、画像出力のためにゲームモジュール(ゲームを実行するプログラム)から渡されるデータは、図15に示すように、フレーム画像と出力位置情報および変形情報である。ここで、出力位置情報は、プレーヤ画像の出力位置を指定する情報で、画面上の座標(アドレス範囲)で表される。また、変形情報は、縦長、横長に変形する場合の他、画像の一部のみを切り出してクリップ画像としてその拡大、縮小、回転や色彩の変化も含まれる。なお、これらの情報のほかに、プレーヤ画像を出力するか否かのフラグを設けてもよい。
[Image output processing]
Next, image output processing during game execution will be described. Note that the data passed from the game module (program for executing the game) for image output is a frame image, output position information, and deformation information, as shown in FIG. Here, the output position information is information for designating the output position of the player image, and is represented by coordinates (address range) on the screen. Further, the deformation information includes not only the case where the image is deformed vertically and horizontally, but also a part of the image that is cut out and enlarged, reduced, rotated, and color change as a clip image. In addition to these pieces of information, a flag indicating whether or not to output a player image may be provided.

テレビモニタ52への画像出力処理において、まず、ゲームの背景フレームの画像データを出力する(S201)。次に、プレーヤ画像の出力が必要か否かをフラグまたはプレーヤ画像の出力位置情報の有無によって判定して、不要の場合(S202で「N」)は、表示出力コマンドを送出して(S206)、次のフレームの出力処理に移る。   In the image output process to the television monitor 52, first, image data of a game background frame is output (S201). Next, it is determined whether or not output of the player image is necessary based on the presence of the flag or the output position information of the player image. If not necessary (“N” in S202), a display output command is sent (S206). Then, the process proceeds to the next frame output process.

一方、プレーヤ画像の出力が必要な場合(S202で「Y」)は、出力位置情報と変形情報を取得する(S203)。そして、メモリ13に保存されているα合成用画像データを取得して、変形情報に基づいて編集する(S204)。その後、出力位置情報の座標位置へ出力して(S205)、表示出力コマンドを送出する(S206)。以上の処理を表示フレームごとに繰り返す。   On the other hand, when it is necessary to output the player image (“Y” in S202), output position information and deformation information are acquired (S203). Then, the α composition image data stored in the memory 13 is acquired and edited based on the deformation information (S204). Then, it outputs to the coordinate position of output position information (S205), and sends a display output command (S206). The above processing is repeated for each display frame.

(α合成等に関する補足説明)
上記は、RGB系の場合の説明であるが、YCrCb 系の場合は、以下のようになる。
YCrCb系では、Y:Cr:Cb = 8:8:8 bitであり、これを、R:G:B = 8:8:8 bitにコンバートし、生成した A = 8 bit を合成して、R:G:B:A = 8:8:8:8 bitのピクセル情報とする。
(Supplementary explanation regarding α composition etc.)
The above is an explanation for the RGB system, but for the YCrCb system, it is as follows.
In the YCrCb system, Y: Cr: Cb = 8: 8: 8 bit, this is converted to R: G: B = 8: 8: 8 bit, and the generated A = 8 bit is synthesized, and R : G: B: A = 8: 8: 8: 8 bit pixel information.

このとき、α合成(アルファブレンド)の式は、下記のとおりとなる。基本的には、グラフィックチップにハードウェアインプリメントされているものである。   At this time, the formula of α composition (alpha blend) is as follows. Basically, the hardware is implemented in the graphic chip.

(Cs - Cd) * As + Cd ・・・(1)
ここで、
Cs : 書き込み元の RGB 値
Cd : 書き込み先の RGB 値
As : ソースのアルファ値(理論的には 0〜1 の値をとる)
Cs, Cd はそれぞれ RGB ごとに 0〜255 の値
上記(1)式に基づいて、合成処理が行われる。
(Cs-Cd) * As + Cd (1)
here,
Cs: Source RGB value
Cd: RGB value to write to
As: Source alpha value (theoretically takes a value between 0 and 1)
Cs and Cd are each a value between 0 and 255 for each RGB. The composition processing is performed based on the above equation (1).

本実施形態によれば、プレーヤ画像抽出処理とゲーム中の画像出力処理を独立に実行させて、画像出力処理でプレーヤ画像との合成が必要になったときにその時点でメモリに保存されているプレーヤのα合成用画像データを用いるようにしたので、プレーヤ画像の抽出処理による待ち時間を削減できるのでリアルタイム性を向上させることができる。   According to this embodiment, the player image extraction process and the image output process during the game are executed independently, and when the image output process needs to be combined with the player image, it is stored in the memory at that time. Since the player's α composition image data is used, the waiting time due to the player image extraction process can be reduced, so that the real-time property can be improved.

また、背景ノイズ除去処理とノイズ緩和処理は、取り込んだ原画像データの複製を取る必要が無く、原画像データ自体を直接変更しながら処理を行うことができるため、メモリ容量の節約を図ることができる。   In addition, the background noise removal processing and noise reduction processing do not require copying of the captured original image data, and the processing can be performed while directly changing the original image data itself, so that the memory capacity can be saved. it can.

なお、CGの背景とプレーヤのクリップ画像を合成する際にプレーヤのクリップ画像を回転拡大縮小することで、より臨場感のある合成画像を生成できる。   Note that when the player's clip image is combined with the CG background, the player's clip image is rotated and enlarged / reduced to generate a more realistic composite image.

<第3の実施形態>
次に第3の実施形態を説明する。
本実施形態は、第1または第2の実施形態に対して、エッジ処理に関して前処理を実行することによって、細いエッジについては除去し、またエッジノイズを背景ノイズ化して、背景ノイズ除去手段24によってその背景ノイズの除去を可能にするものである。
<Third Embodiment>
Next, a third embodiment will be described.
In the present embodiment, by performing preprocessing with respect to edge processing with respect to the first or second embodiment, thin edges are removed, and edge noise is converted into background noise. The background noise can be removed.

図23は、本実施形態による画像処理装置のブロック図である。図2の構成に対して、シルエット画像の非背景領域の範囲を抽出するシルエット領域抽出手段28と、背景ノイズ除去手段24の前後に前処理手段29と後処理手段30を夫々追加している。   FIG. 23 is a block diagram of the image processing apparatus according to the present embodiment. 2, a pre-processing unit 29 and a post-processing unit 30 are added before and after the silhouette region extracting unit 28 for extracting the range of the non-background region of the silhouette image and the background noise removing unit 24, respectively.

図24は、本実施形態の画像処理装置1の処理手順を示すフローチャートである。この図において、ステップS901、ステップS906、ステップS908、および、ステップS909の各処理は、第1の実施形態と同様である。   FIG. 24 is a flowchart illustrating a processing procedure of the image processing apparatus 1 according to the present embodiment. In this figure, each process of step S901, step S906, step S908, and step S909 is the same as that of the first embodiment.

以下、図24〜図34を用いて本実施形態による画像処理装置1の動作について、第1の実施形態との違いを中心に説明する。   Hereinafter, the operation of the image processing apparatus 1 according to the present embodiment will be described with reference to FIGS. 24 to 34, focusing on differences from the first embodiment.

[画像分離処理](図24のステップS902)
画像分離手段22は、画像入力手段21の出力である背景画像と抽出対象画像を用いて第1の実施形態で説明した手順によってシルエット画像を作成し、次にシルエット領域抽出手段28を起動する。
[Image Separation Processing] (Step S902 in FIG. 24)
The image separation unit 22 creates a silhouette image by the procedure described in the first embodiment using the background image and the extraction target image that are the outputs of the image input unit 21, and then activates the silhouette region extraction unit 28.

[シルエット領域抽出処理](ステップS903)
シルエット領域抽出手段28は、このシルエット画像に対してヒストグラムを取り、予め定められた所定の閾値と比較して、それよりも幅の狭い領域をノイズと判定して除去する。
[Silhouette Area Extraction Processing] (Step S903)
The silhouette area extraction means 28 takes a histogram for this silhouette image, compares it with a predetermined threshold value, and determines that the area narrower than that is noise and removes it.

図25は、シルエット領域抽出手段28の処理手順を示すフローチャートである。この図において、シルエット領域抽出手段28は、起動されると、まず、シルエット画像の縦方向のヒストグラムを生成する(S1001)。図29は、シルエット領域抽出処理の説明図である。図29(a)のシルエット画像において、中央の白抜きの部分は、非背景領域であり、左上の複数の白丸は、背景領域に現れた非背景ノイズを示している。このシルエット画像の縦方向のヒストグラムは、図29(b)のようになる。この図の白い部分は、図29(a)の対応する縦(列)方向の非背景ピクセル数もしくはその出現割合を意味している。   FIG. 25 is a flowchart showing the processing procedure of the silhouette region extraction means 28. In this figure, when activated, the silhouette area extraction means 28 first generates a vertical histogram of a silhouette image (S1001). FIG. 29 is an explanatory diagram of silhouette region extraction processing. In the silhouette image of FIG. 29 (a), the white part at the center is a non-background area, and a plurality of white circles at the upper left indicate non-background noise that appears in the background area. The vertical histogram of this silhouette image is as shown in FIG. The white portion in this figure means the number of non-background pixels in the corresponding vertical (column) direction in FIG.

そして、非背景抽出処理として、縦方向の非背景ピクセルのヒストグラムの値が0の区域とそうでない区域に分割し、0でない区域のうち、予め定められた所定値以上の幅を持った区域(図29(b)中Aの区域)を選びこの区域をシルエット領域として分割する(S1002)。図29(c)は、この処理によって図29(a)のシルエット画像の両サイドを縦方向に分割した(切り取った)図である。この図で、ヒストグラムの値が0ではないが予め定められた所定値以下の区域(図29(b)中Bの区域)は、非背景ノイズ領域として排除され、ヒストグラムの値が0の区域(図29(b)中Cの区域)は、背景領域として排除されている。   Then, as a non-background extraction process, a vertical non-background pixel histogram value is divided into an area where the value of the histogram is 0 and an area where the histogram is not, and an area having a width equal to or greater than a predetermined value among the non-zero areas The area A in FIG. 29B is selected, and this area is divided into silhouette areas (S1002). FIG. 29C is a diagram in which both sides of the silhouette image of FIG. 29A are divided (cut) in the vertical direction by this processing. In this figure, the area where the histogram value is not 0 but is equal to or smaller than a predetermined value (area B in FIG. 29B) is excluded as a non-background noise area, and the area where the histogram value is 0 ( The area C in FIG. 29B is excluded as a background area.

次に、図29(c)のシルエット画像に対して、横方向のヒストグラムを生成する(S1003)。図29(d)は、横方向のヒストグラムを示している。このヒストグラムをもとに、上記と同様に非背景区域を抽出してシルエット領域として分割する(S1004)。以上のステップS1001からステップS1004の処理を所定の回数繰り返して、シルエット領域を順次分割しつつ最終のシルエット領域を抽出する。所定回数繰り返す替りに、新しい非背景ノイズ領域が見つからなければ、抽出処理を終了するようにしてもよい。図29(e)は抽出されたシルエット領域を示している。そして、このシルエット領域以外の領域を背景領域として、背景ピクセル値で埋める(S1005)。   Next, a horizontal histogram is generated for the silhouette image of FIG. 29C (S1003). FIG. 29D shows a horizontal histogram. Based on this histogram, a non-background area is extracted and divided as a silhouette area in the same manner as described above (S1004). The processes from step S1001 to step S1004 are repeated a predetermined number of times, and the final silhouette region is extracted while sequentially dividing the silhouette region. Instead of repeating a predetermined number of times, if no new non-background noise region is found, the extraction process may be terminated. FIG. 29E shows the extracted silhouette region. Then, an area other than the silhouette area is filled with a background pixel value as a background area (S1005).

[前処理](ステップS904、S905)
前処理手段29は、シルエット画像の中のシルエット領域抽出手段28で抽出された領域に対して細いエッジの除去やエッジノイズの背景化処理を実行する。
[Preprocessing] (Steps S904 and S905)
The pre-processing unit 29 performs thin edge removal and edge noise backgrounding processing on the region extracted by the silhouette region extraction unit 28 in the silhouette image.

1.細いエッジノイズ(背景ノイズ)の除去処理(ステップS904)
背景にサッシなどの窓枠があり、これと操作者の髪の毛などが重なった場合などに操作者シルエットの内側にできてしまう細いエッジノイズの例を図30(a)に示す。図30(a)のA部がそのエッジノイズである。
1. Thin edge noise (background noise) removal process (step S904)
FIG. 30A shows an example of thin edge noise that occurs inside the operator silhouette when there is a window frame such as a sash in the background and the operator's hair overlaps. The A part in FIG. 30A is the edge noise.

以下、図26に従って、このような細いノイズをシルエット(図30(a)の白抜きの部分)のエッジ抽出と合成によって埋めるときの手順を説明する。
まず、シルエット画像に対して輪郭線抽出フィルタを適用し、シルエットのエッジを抽出する(S1101)。エッジの抽出には、たとえば、図33の重み付けのラプラシアンフィルタを用いる。この処理によって、エッジ抽出された画像を図30(b)に示す。
In the following, a procedure for filling such fine noise by edge extraction and synthesis of silhouettes (outlined portions in FIG. 30A) will be described.
First, an outline extraction filter is applied to the silhouette image to extract silhouette edges (S1101). For the edge extraction, for example, a weighted Laplacian filter shown in FIG. 33 is used. FIG. 30B shows an image extracted by this process.

次に、エッジ抽出された画像(図30(b))と、元のシルエット画像(図30(a))を合成する(S1102)。
シルエット部分とエッジ部分は共に255の値を持っているので、重ねると、シルエットのエッジが1ピクセル分拡張された画像になる。
細いエッジノイズは、通常1, 2ピクセル程度の幅しかないので、上記の処理を適用することで、図30(c)に示すように非背景として埋めることができる。
Next, the edge extracted image (FIG. 30B) and the original silhouette image (FIG. 30A) are combined (S1102).
Since both the silhouette part and the edge part have a value of 255, when they are overlapped, the silhouette edge is expanded by one pixel.
Since the thin edge noise is usually only about 1 or 2 pixels wide, by applying the above processing, it can be filled as non-background as shown in FIG.

2.エッジノイズの背景ノイズ化処理
大きな穴になってしまっているエッジノイズの例を図31(a)に示す。このエッジノイズは、背景が広い単色領域で、操作者の服装と色が近い場合などに出やすいノイズである。このノイズについては、ノイズの口(図中B部)の部分を閉じて、背景ノイズ化することで、第1の実施形態で説明した背景ノイズの除去アルゴリズムで除去することができるようになる。
2. Edge Noise Background Noise Processing FIG. 31A shows an example of edge noise that has become a large hole. This edge noise is a noise that is likely to be generated when the background is a single color region having a wide background and the color of the clothes is similar to that of the operator. This noise can be removed by the background noise removal algorithm described in the first embodiment by closing the noise mouth (B portion in the figure) to make background noise.

以下、図27を用いてノイズの口の部分を閉じる際の手順を説明する。
まず、シルエット画像(図31(a))に輪郭線抽出フィルタを適用してエッジ画像(図31(b))を生成し(S1201)、このエッジ画像と元のシルエット画像を合成した画像(図31(c))を生成する(S1202)。さらに、この合成したシルエット画像に対して、ステップS1201〜ステップS1202の処理を複数回繰り返す。(図31(d)(e))。口が小さいノイズなので、複数回繰り返すと、エッジが膨らみ、口が閉じる。
Hereinafter, the procedure for closing the mouth portion of the noise will be described with reference to FIG.
First, an edge image (FIG. 31B) is generated by applying a contour extraction filter to a silhouette image (FIG. 31A) (S1201), and an image (FIG. 31) that combines the edge image and the original silhouette image. 31 (c)) is generated (S1202). Further, the processing from step S1201 to step S1202 is repeated a plurality of times for this synthesized silhouette image. (FIGS. 31D and 31E). Since the mouth is a small noise, if it is repeated several times, the edge swells and the mouth closes.

口が閉じた段階で、このシルエット画像について、背景ノイズの除去処理を行うことで、このエッジノイズを除去することができる。(図31(f))
なお、状況によって、ノイズの口の大きさは様々なので、何回エッジの拡張を繰り返すかは操作者が指定できるようにするとよい。
The edge noise can be removed by performing background noise removal processing on the silhouette image when the mouth is closed. (Fig. 31 (f))
Note that since the size of the mouth of the noise varies depending on the situation, it is preferable that the operator can specify how many times the edge extension is repeated.

たとえば、第2の実施形態で説明した閾値設定手段23を用いて、図12に例示する画面に相当する閾値設定画面を繰り返し回数別に表示して、操作者の設定した繰り返し回数を設定登録するようにすれば、適切な繰り返し数を用いて画像処理を行うことができる。   For example, by using the threshold setting unit 23 described in the second embodiment, a threshold setting screen corresponding to the screen illustrated in FIG. 12 is displayed for each repetition count, and the repetition count set by the operator is set and registered. By doing so, it is possible to perform image processing using an appropriate number of repetitions.

上記の前処理によって、細いエッジについては除去し、大きな穴になってしまっているエッジノイズについては、ノイズの口を閉じて背景ノイズ化したシルエット画像を作成する。   By the above pre-processing, a thin edge is removed, and for edge noise that has become a large hole, a noise image is closed to create a silhouette image with background noise.

[背景ノイズ除去処理](ステップS906)
次に、前処理手段29で作成されたシルエット画像に対して、背景ノイズ除去手段24によって背景ノイズの除去を行う。この処理は第1の実施の形態と同様であるので説明を割愛する。背景ノイズ除去処理によって、シルエット画像の背景ノイズが除去される。
[Background Noise Removal Processing] (Step S906)
Next, background noise is removed from the silhouette image created by the preprocessing means 29 by the background noise removing means 24. Since this process is the same as in the first embodiment, a description thereof will be omitted. The background noise of the silhouette image is removed by the background noise removal process.

[後処理](ステップS907)
上記の処理で作成されたシルエット画像は、ノイズが除去されているものの、元のシルエット画像に対して拡張している。このため、後処理手段30を起動して、図28に示す手順によって、この拡張されたシルエット画像を元のシルエット画像に近づける。
[Post-processing] (Step S907)
The silhouette image created by the above processing is expanded with respect to the original silhouette image although noise is removed. For this reason, the post-processing means 30 is activated and this expanded silhouette image is brought close to the original silhouette image by the procedure shown in FIG.

まず、輪郭線抽出フィルタを適用して、シルエット画像の内側のエッジを抽出する(S1301)。この際、図34に例示するラプラシアンフィルタを適用するとよい。次に、元のシルエット画像(拡張画像)のピクセル値からこのフィルタを適用して作ったエッジ画像のピクセル値を引く(S1302)。そして、ピクセルの値が 0 より小さくなった場合は 0 にする(S1303、S1304)。 この処理によって、エッジ部分が1ピクセル分縮小されることになる。以上のステップS1301〜ステップS1304の処理を、適用した拡張処理の回数分だけ繰り返す。   First, an outline extraction filter is applied to extract the inner edge of the silhouette image (S1301). At this time, a Laplacian filter illustrated in FIG. 34 may be applied. Next, the pixel value of the edge image created by applying this filter is subtracted from the pixel value of the original silhouette image (extended image) (S1302). If the pixel value is smaller than 0, it is set to 0 (S1303, S1304). By this processing, the edge portion is reduced by one pixel. The processes in steps S1301 to S1304 are repeated as many times as the number of applied expansion processes.

[ノイズ緩和処理、画像出力処理](ステップS908、S909)
また、ノイズ緩和手段25によって、残った非背景ノイズやエッジノイズの緩和処理を行い(S908)、画像出力手段26によって合成画像の出力を行う(S909)。これらの手段25、26の処理手順は第1の実施形態と同様であるので説明を割愛する。
[Noise mitigation processing, image output processing] (steps S908 and S909)
Moreover, the remaining non-background noise and edge noise are reduced by the noise reduction means 25 (S908), and the composite image is output by the image output means 26 (S909). Since the processing procedures of these means 25 and 26 are the same as those in the first embodiment, description thereof will be omitted.

以上、本実施形態による画像処理装置の動作を第1の実施形態との違いを中心に説明したが、第2の実施形態に対して本実施形態の前処理手段29や後処理手段30等を設けることも可能である。   The operation of the image processing apparatus according to the present embodiment has been described above with a focus on differences from the first embodiment. However, the pre-processing unit 29, the post-processing unit 30 and the like of the present embodiment are added to the second embodiment. It is also possible to provide it.

本実施形態では、シルエット領域抽出手段によってノイズと判定できない領域のみに対してフィルタリング(ノイズの除去、緩和)処理を適用するためフィルタリングの速度が向上する。   In the present embodiment, the filtering (noise removal, mitigation) process is applied only to the region that cannot be determined as noise by the silhouette region extraction means, so that the filtering speed is improved.

また、前処理手段によって、予め細いエッジノイズについては除去し、口の部分が狭く非背景領域に大きな広がりを持つようなエッジノイズについては口を閉じて背景ノイズ化し、以降の背景ノイズ除去手段によってそのノイズを除去するため、第1の実施形態のノイズ緩和効果に比べて品質の良い合成画像を得ることができる。   Also, thin edge noise is removed in advance by the pre-processing means, and edge noise that has a narrow mouth portion and a large spread in the non-background area is closed to become background noise, and subsequent background noise removing means In order to remove the noise, it is possible to obtain a composite image with better quality than the noise mitigation effect of the first embodiment.

本発明は上述した実施形態に限定されるものではなく、その要旨を逸脱しない範囲内において、種々変形して実施することができる。たとえば、上記の背景ノイズ除去手段と、ノイズ緩和手段を両方実行する場合は、上記の順に実行する必要があるが、CPUの性能等によって背景ノイズ除去手段とノイズ緩和手段のいずれか一方を実行するのみでもノイズ削減効果がある。また、後処理手段30は、背景ノイズ除去処理以降ならば、いずれのタイミングで起動しても一定の効果は得られる。たとえば、ノイズ緩和処理の後に起動するようにしても良い。なお、前処理手段によるエッジ拡大処理のループ回数が少ない場合は、後処理手段を省略することも可能である。   The present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention. For example, when both the background noise removing means and the noise mitigating means are executed, it is necessary to execute them in the above order, but either the background noise removing means or the noise mitigating means is executed depending on the CPU performance or the like. Only has a noise reduction effect. Further, the post-processing means 30 can obtain a certain effect even if it is activated at any timing after the background noise removal processing. For example, you may make it start after a noise mitigation process. If the number of loops of the edge enlargement process by the pre-processing means is small, the post-processing means can be omitted.

本発明による画像処理装置や画像処理方法は、人物などの特定の画像を抽出し、それ以外の背景部分を他の画像に置き換えるような用途のもの全般に利用することができる。上記の実施形態で説明したゲーム機以外に、たとえば、テレビ電話において、通話者のみを抽出し、背景を他の画像に置き換えるとか、カメラ撮影において特定の被写体のみを抽出して背景を他のものに置き換えるということが可能となる。画像処理装置は、このような機能を有するゲーム機、テレビ電話、カメラなども含む趣旨である。   The image processing apparatus and the image processing method according to the present invention can be used for all purposes such as extracting a specific image such as a person and replacing other background portions with other images. In addition to the game machine described in the above embodiment, for example, in a videophone, only the caller is extracted and the background is replaced with another image, or only a specific subject is extracted in camera shooting and other backgrounds are extracted. It becomes possible to replace with. The image processing apparatus is intended to include game machines, videophones, cameras, and the like having such functions.

本発明の第1の実施形態による画像処理装置のブロック図である。1 is a block diagram of an image processing apparatus according to a first embodiment of the present invention. 図1の処理部の機能ブロック図である。It is a functional block diagram of the process part of FIG. 図2の画像入力手段によって入力される背景画像例である。It is an example of a background image input by the image input means of FIG. 図3の背景をバックに撮影された抽出対象(人物)を含む抽出対象画像例である。It is an example of an extraction object image containing the extraction object (person) image | photographed against the background of FIG. 図2の画像分離手段で作成されるシルエット画像の説明図である。It is explanatory drawing of the silhouette image produced with the image separation means of FIG. 図5のシルエット画像に発生するノイズの説明図であり、図6(a)は背景ノイズの説明図、図6(b)は非背景ノイズの説明図、図6(c)はエッジノイズの説明図である。FIG. 6A is an explanatory diagram of background noise, FIG. 6B is an explanatory diagram of non-background noise, and FIG. 6C is an explanatory diagram of edge noise. FIG. 図2の背景ノイズ除去手段の処理手順の説明図である。It is explanatory drawing of the process sequence of the background noise removal means of FIG. 図2のノイズ緩和手段の処理手順の説明図である。It is explanatory drawing of the process sequence of the noise mitigation means of FIG. 図2の画像出力手段による画像合成の説明図である。It is explanatory drawing of the image composition by the image output means of FIG. 本発明の第2の実施形態による画像処理装置処理部の機能ブロック図である。It is a functional block diagram of the image processing apparatus process part by the 2nd Embodiment of this invention. 本発明の第2の実施形態による事前準備段階でのプレーヤの立ち位置限定のしかたの説明図である。It is explanatory drawing of how to limit a player's standing position in the preliminary preparation stage by the 2nd Embodiment of this invention. 本発明の第2の実施形態による閾値設定画面の説明図である。図12(a)は、閾値が低い場合でノイズが多く発生している例である。図12(b)は、閾値が適正で、ほとんどノイズが発生していない例である。図12(c)は、閾値が高い場合に、エッジノイズによって、抽出対象が背景に食い込まれている例である。It is explanatory drawing of the threshold value setting screen by the 2nd Embodiment of this invention. FIG. 12A shows an example in which a lot of noise is generated when the threshold is low. FIG. 12B is an example in which the threshold is appropriate and almost no noise is generated. FIG. 12C is an example in which the extraction target is bitten by the background due to edge noise when the threshold is high. 本発明の第2の実施形態による他の閾値設定画面の説明図である。図13(a)は、閾値低の図、図13(b)は、閾値中の図、図13(c)は、閾値高の図である。It is explanatory drawing of the other threshold value setting screen by the 2nd Embodiment of this invention. 13A is a diagram showing a low threshold value, FIG. 13B is a diagram showing a threshold value, and FIG. 13C is a diagram showing a high threshold value. 本発明の第2の実施形態によるゲームプレーヤの画像処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the image processing of the game player by the 2nd Embodiment of this invention. 本発明の第2の実施形態によるプレーヤ画像とゲーム背景フレームとを関連付けるデータの例である。It is an example of the data which link | relates the player image and game background frame by the 2nd Embodiment of this invention. 図10の画像出力手段の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the image output means of FIG. 図2および図10の背景ノイズ除去手段の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the background noise removal means of FIG. 2 and FIG. 図17の背景ノイズ候補領域マーク処理ルーチンのフローチャートである。It is a flowchart of the background noise candidate area | region mark processing routine of FIG. 図17の候補領域上方確認処理ルーチンのフローチャートである。It is a flowchart of the candidate area | region upper confirmation process routine of FIG. 図17の候補領域下方確認処理ルーチンのフローチャートである。It is a flowchart of the candidate area | region downward confirmation process routine of FIG. 図17の候補領域変換処理ルーチンのフローチャートである。It is a flowchart of the candidate area | region conversion process routine of FIG. 図2および図10のノイズ緩和手段の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the noise mitigation means of FIG. 2 and FIG. 本発明の第3の実施形態による画像処理装置処理部の機能ブロック図である。It is a functional block diagram of the image processing apparatus process part by the 3rd Embodiment of this invention. 図23の処理部の各手段によって実行される処理手順のフローチャートである。It is a flowchart of the process sequence performed by each means of the process part of FIG. 図23のシルエット領域抽出手段の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the silhouette area | region extraction means of FIG. 図23の前処理手段によって実行される細いエッジノイズの除去処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the thin edge noise removal process performed by the pre-processing means of FIG. 図23の前処理手段によって実行されるエッジノイズ背景ノイズ化処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the edge noise background noise conversion process performed by the pre-processing means of FIG. 図23の前処理手段によって実行される拡張されたエッジの縮小処理の手順を示すフローチャートである。24 is a flowchart showing a procedure of extended edge reduction processing executed by the preprocessing means of FIG. 図25のシルエット領域抽出処理の説明図である。It is explanatory drawing of the silhouette area | region extraction process of FIG. 図26の細いエッジノイズの除去処理の説明図である。It is explanatory drawing of the removal process of the thin edge noise of FIG. 図27のエッジノイズ背景ノイズ化処理の説明図である。It is explanatory drawing of the edge noise background noise conversion process of FIG. 図28の拡張されたエッジの縮小処理の説明図である。FIG. 29 is an explanatory diagram of the extended edge reduction processing of FIG. 28. 図26の細いエッジノイズの除去処理または図27のエッジノイズ背景ノイズ化処理で用いられる重み付けラプラシアンフィルタの例である。FIG. 28 is an example of a weighted Laplacian filter used in the thin edge noise removal process of FIG. 26 or the edge noise background noise conversion process of FIG. 27; 図28の拡張されたエッジの縮小処理で用いられる重み付けラプラシアンフィルタの例である。FIG. 29 is an example of a weighted Laplacian filter used in the extended edge reduction process of FIG. 28.

符号の説明Explanation of symbols

1 画像処理装置(ゲーム装置)
11 A/D変換手段
12 処理部
13 メモリ
14 表示用メモリ
15 D/A変換手段
16 外部記憶装置
17 入力部
21 画像入力手段
22 画像分離手段
23 閾値調整手段
24 背景ノイズ除去手段
25 ノイズ緩和手段
26 画像出力手段
27 ゲーム実行手段
28 シルエット領域抽出手段
29 前処理手段
30 後処理手段
51 カメラ
52 テレビモニタ
1 Image processing device (game device)
DESCRIPTION OF SYMBOLS 11 A / D conversion means 12 Processing part 13 Memory 14 Display memory 15 D / A conversion means 16 External storage device 17 Input part 21 Image input means 22 Image separation means 23 Threshold adjustment means 24 Background noise removal means 25 Noise reduction means 26 Image output means 27 Game execution means 28 Silhouette region extraction means 29 Pre-processing means 30 Post-processing means 51 Camera 52 Television monitor

Claims (8)

背景画像と、この背景画像と同じ背景で抽出対象を含む抽出対象画像とを入力する画像入力手段と、
前記背景画像と前記抽出対象画像のピクセル値の差分に基づいて非背景ピクセルと背景ピクセルを有するシルエット画像を作成する画像分離手段と、
前記シルエット画像を入力し、この入力画像のラインごとに非背景ピクセルに囲まれた領域をマークし、このマーク領域が隣接する行または列の背景ピクセルに接する場合は、当該マーク領域を背景領域に順次変更していき、残ったマーク領域を非背景領域に変換してシルエット画像を編集する背景ノイズ除去手段と、
数値化された非背景度に基づいて、前記背景ノイズ除去手段によって編集されたシルエット画像の画像領域の端からピクセルごとに当該ピクセルの近傍領域の非背景度の平均化処理を順次行い、その後画像領域範囲を補正するノイズ緩和手段と、
前記平均化処理された非背景度と前記抽出対象画像をもとにα合成用画像を作成し、別に入力された背景画像と共に出力する画像出力手段と、
を備えたことを特徴とする画像処理装置。
An image input means for inputting a background image and an extraction target image including the extraction target in the same background as the background image;
Image separation means for creating a silhouette image having a non-background pixel and a background pixel based on a difference between pixel values of the background image and the extraction target image;
When the silhouette image is input, an area surrounded by non-background pixels is marked for each line of the input image, and when the mark area touches a background pixel in an adjacent row or column, the mark area is set as a background area. A background noise removing means that sequentially changes, converts the remaining mark area into a non-background area and edits the silhouette image,
Based on the digitized non-background degree, the non-background degree averaging process of the neighboring area of the pixel is sequentially performed for each pixel from the edge of the image area of the silhouette image edited by the background noise removing unit, and then the image Noise mitigation means for correcting the area range;
An image output means for creating an α composition image based on the averaged non-background degree and the extraction target image, and outputting the image together with a separately input background image;
An image processing apparatus comprising:
前記画像分離手段によって作成されたシルエット画像のエッジ抽出画像を作成し、当該エッジ抽出画像と前記シルエット画像とを合成して前記シルエット画像の非背景領域を拡大させることによってエッジノイズを背景ノイズに変換する前処理手段を備え、
前記背景ノイズ除去手段は、前記前処理手段によって作成されたシルエット画像を入力画像とすることを特徴とする請求項1記載の画像処理装置。
An edge extracted image of the silhouette image created by the image separating means is created, and the edge extracted image and the silhouette image are combined to expand the non-background region of the silhouette image, thereby converting the edge noise into the background noise. Pre-processing means to perform,
The image processing apparatus according to claim 1, wherein the background noise removing unit uses the silhouette image created by the preprocessing unit as an input image.
前記画像分離手段によって作成されたシルエット画像の縦方向または横方向のヒストグラムを取り、当該ヒストグラムの幅に基づいて前記背景ノイズ除去手段または前記ノイズ緩和手段によって編集または補正する範囲を決定するシルエット領域抽出手段を備えたことを特徴とする請求項1記載の画像処理装置。  A silhouette region extraction that takes a vertical or horizontal histogram of a silhouette image created by the image separating means and determines a range to be edited or corrected by the background noise removing means or the noise mitigating means based on the width of the histogram The image processing apparatus according to claim 1, further comprising: means. 前記画像分離手段は、背景画像と抽出対象画像のピクセル値の差分を閾値と比較することによって非背景ピクセルであるか、または、背景ピクセルであるかを判定し、かつ、
前記閾値に基づいて作成されノイズ度合いの判定可能な画像を表示し、入力部から入力される前記閾値の変更要求に基づいて前記閾値を変更するする閾値調整手段を備えることを特徴とする請求項1ないし3のいずれか一に記載の画像処理装置。
The image separating means determines whether the pixel is a non-background pixel or a background pixel by comparing a difference between pixel values of the background image and the extraction target image with a threshold value; and
The image forming apparatus includes: a threshold adjustment unit configured to display an image that can be determined based on the threshold value and that can determine a noise degree, and to change the threshold value based on a change request for the threshold value input from an input unit. The image processing apparatus according to any one of 1 to 3.
表示部に抽出対象領域を指示する範囲指定情報を表示する手段を備え、
前記画像入力手段は、この範囲指定情報に基づいて当該範囲の抽出対象画像を入力することを特徴とする請求項1ないし3のいずれか一に記載の画像処理装置。
Means for displaying range designation information indicating an extraction target area on the display unit;
The image processing apparatus according to claim 1, wherein the image input unit inputs an extraction target image in the range based on the range designation information.
入力した画像から特定の画像を抽出して、別の画像と合成する画像処理方法であって、
背景画像と、この背景画像と同じ背景で抽出対象を含む抽出対象画像とを入力するステップと、
前記背景画像と前記抽出対象画像のピクセル値の差分に基づいて非背景ピクセルと背景ピクセルを有するシルエット画像を作成するステップと
このシルエット画像のラインごとに非背景ピクセルに囲まれた領域をマークし、このマーク領域が隣接する行または列の背景ピクセルに接する場合は、当該マーク領域を背景領域に順次変更していき、残ったマーク領域を非背景領域に変換してシルエット画像を編集した後、数値化された非背景度に基づいて、当該シルエット画像の画像領域の端からピクセルごとに当該ピクセルの近傍領域の非背景度を平均化する処理を順次行い、その後画像領域範囲を補正するステップと、
前記平均化処理された非背景度と前記抽出対象画像をもとにα合成用画像を生成し、別に入力された背景画像と共に出力するステップと、
を含むことを特徴とする画像処理方法。
An image processing method for extracting a specific image from an input image and combining it with another image,
Inputting a background image and an extraction target image including an extraction target in the same background as the background image;
Creating a silhouette image having a non-background pixel and a background pixel based on a difference between pixel values of the background image and the extraction target image; and marking an area surrounded by non-background pixels for each line of the silhouette image; If this mark area touches a background pixel in an adjacent row or column, the mark area is sequentially changed to a background area, the remaining mark area is converted to a non-background area, and the silhouette image is edited. A step of sequentially averaging the non-background degree of the neighboring area of the pixel for each pixel from the edge of the image area of the silhouette image based on the converted non-background degree, and then correcting the image area range;
Generating an α synthesis image based on the averaged non-background degree and the extraction target image, and outputting the image together with a separately input background image;
An image processing method comprising:
入力した画像から特定の画像を抽出して、別の画像と合成する画像処理方法であって、
背景画像と、この背景画像と同じ背景で抽出対象を含む抽出対象画像とを入力するステップと、
前記背景画像と前記抽出対象画像のピクセル値の差分に基づいて非背景ピクセルと背景ピクセルを有するシルエット画像を作成するステップと、
このシルエット画像の非背景領域を拡大させることによってエッジノイズを背景ノイズに変換するステップと、
このシルエット画像のラインごとに非背景ピクセルに囲まれた領域をマークし、このマーク領域が隣接する行または列の背景ピクセルに接する場合は、当該マーク領域を背景領域に順次変更していき、残ったマーク領域を非背景領域に変換してシルエット画像を編集した後、数値化された非背景度に基づいて、当該シルエット画像の画像領域の端からピクセルごとに当該ピクセルの近傍領域の非背景度を平均化する処理を順次行い、その後画像領域範囲を補正するステップと、
前記平均化処理された非背景度と前記抽出対象画像をもとにα合成用画像を生成し、別に入力された背景画像と共に出力するステップと、
を含むことを特徴とする画像処理方法。
An image processing method for extracting a specific image from an input image and combining it with another image,
Inputting a background image and an extraction target image including an extraction target in the same background as the background image;
Creating a silhouette image having a non-background pixel and a background pixel based on a difference between pixel values of the background image and the extraction target image;
Converting edge noise into background noise by enlarging the non-background region of the silhouette image;
If this silhouette image line is marked with an area surrounded by non-background pixels and this mark area touches a background pixel in an adjacent row or column, the mark area is sequentially changed to a background area, and the remaining area remains. After editing the silhouette image by converting the marked area to a non-background region, based on the digitized non-background degree, the non-background degree of the neighboring area of the pixel for each pixel from the edge of the image area of the silhouette image Sequentially performing the process of averaging, and then correcting the image area range;
Generating an α synthesis image based on the averaged non-background degree and the extraction target image, and outputting the image together with a separately input background image;
An image processing method comprising:
カメラで撮影されたゲームプレーヤの画像をゲームの背景中に表示してゲームを進行するコンピュータゲーム用プログラムであって、
背景画像を入力して保存する処理と、
前記背景画像と同じ背景でプレーヤを含む抽出対象画像を入力する処理と、
前記保存されている背景画像と前記抽出対象画像のピクセル値の差分に基づいて非背景ピクセルと背景ピクセルを有するシルエット画像を作成する画像分離処理と、
このシルエット画像のラインごとに非背景ピクセルに囲まれた領域をマークし、このマーク領域が隣接する行または列の背景ピクセルに接する場合は、当該マーク領域を背景領域に順次変更していき、残ったマーク領域を非背景領域に変換してシルエット画像を編集する背景ノイズ除去処理と、
数値化された非背景度に基づいて、前記背景ノイズ除去手段によって編集されたシルエット画像の画像領域の端からピクセルごとに当該ピクセルの近傍領域の非背景度を平均化する処理を順次行い、その後画像領域範囲を補正するノイズ緩和処理と、
前記平均化処理された非背景度と前記抽出対象画像をもとにα合成用画像を作成し、ゲームの進行を実行する処理によって作成され、または、外部記憶装置から入力された背景画像と共に出力する画像出力処理と、
をコンピュータに実行させるためのプログラム。
A computer game program for displaying a game player image captured by a camera in a game background and playing the game,
Input and save a background image,
A process of inputting an extraction target image including a player with the same background as the background image;
An image separation process for creating a silhouette image having a non-background pixel and a background pixel based on a difference between pixel values of the stored background image and the extraction target image;
If this silhouette image line is marked with an area surrounded by non-background pixels and this mark area touches a background pixel in an adjacent row or column, the mark area is sequentially changed to a background area, and the remaining area remains. Background noise removal processing to edit the silhouette image by converting the marked area into a non-background area,
Based on the digitized non-background degree, a process of sequentially averaging the non-background degree of the neighboring area of the pixel for each pixel from the edge of the image area of the silhouette image edited by the background noise removing unit is performed. Noise reduction processing to correct the image area range,
An α composition image is created based on the averaged non-background level and the extraction target image, and is generated by a process of executing a game, or output together with a background image input from an external storage device Image output processing to
A program that causes a computer to execute.
JP2006536313A 2004-09-22 2005-03-14 Image processing apparatus, method, and program Expired - Fee Related JP4399462B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2004276252 2004-09-22
JP2004276252 2004-09-22
PCT/JP2005/004469 WO2006033178A1 (en) 2004-09-22 2005-03-14 Image processing device, method, and program

Publications (2)

Publication Number Publication Date
JPWO2006033178A1 JPWO2006033178A1 (en) 2008-05-15
JP4399462B2 true JP4399462B2 (en) 2010-01-13

Family

ID=36089944

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006536313A Expired - Fee Related JP4399462B2 (en) 2004-09-22 2005-03-14 Image processing apparatus, method, and program

Country Status (2)

Country Link
JP (1) JP4399462B2 (en)
WO (1) WO2006033178A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200097572A (en) * 2019-02-08 2020-08-19 한양대학교 산학협력단 Training data generation method and pose determination method for grasping object

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9079104B2 (en) 2006-06-26 2015-07-14 Sony Computer Entertainment America Llc Creation of game-based scenes
JP4760973B2 (en) * 2008-12-16 2011-08-31 カシオ計算機株式会社 Imaging apparatus and image processing method
JP5729963B2 (en) * 2010-10-07 2015-06-03 キヤノン株式会社 Image composition processing apparatus and control method thereof
CN106056532B (en) * 2016-05-20 2020-04-07 深圳市奥拓电子股份有限公司 Method and device for removing background image
JP7207957B2 (en) * 2018-11-07 2023-01-18 キヤノン株式会社 Image processing device, image processing method, and program
JP7256719B2 (en) * 2019-09-13 2023-04-12 富士フイルム株式会社 Image processing device, imaging device, image processing method, and image processing program
CN110827300B (en) * 2019-11-08 2022-08-26 恒信东方文化股份有限公司 Image segmentation method and corresponding separation device thereof
CN111932566B (en) * 2020-05-27 2024-02-20 杭州群核信息技术有限公司 Model contour diagram generation method, device and system
JP7456702B1 (en) 2023-11-07 2024-03-27 リベラルロジック株式会社 Programs, information processing systems and information processing methods

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3371521B2 (en) * 1994-03-16 2003-01-27 カシオ計算機株式会社 Signal generation apparatus and signal generation method
JP3832971B2 (en) * 1998-06-01 2006-10-11 キヤノン株式会社 Image processing apparatus and method, and image processing system
JP3608715B2 (en) * 1998-08-31 2005-01-12 日立ソフトウエアエンジニアリング株式会社 Image composition apparatus and image composition method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200097572A (en) * 2019-02-08 2020-08-19 한양대학교 산학협력단 Training data generation method and pose determination method for grasping object
KR102178013B1 (en) * 2019-02-08 2020-11-12 한양대학교 산학협력단 Training data generation method and pose determination method for grasping object

Also Published As

Publication number Publication date
JPWO2006033178A1 (en) 2008-05-15
WO2006033178A1 (en) 2006-03-30

Similar Documents

Publication Publication Date Title
JP4399462B2 (en) Image processing apparatus, method, and program
US9955038B2 (en) Image processing apparatus, image processing method, and program
JP3539539B2 (en) Image processing apparatus, image processing method, and recording medium recording image processing program
EP2525561B1 (en) Data-generating device, data-generating method, data-generating program, and recording medium
KR101743861B1 (en) Methods of image fusion for image stabilization
JP2002135592A (en) Image processing apparatus and recording medium
CN102151118A (en) Image processing device, endoscope system, program, and image processing method
JP4821642B2 (en) Image processing method, image processing apparatus, digital camera, and image processing program
JP2008522555A (en) Reduce artifacts in digital video
JP5385059B2 (en) Image display method, program, image display apparatus, and imaging apparatus
JP5853466B2 (en) Image processing system and image processing program
US7095417B2 (en) Line drawing image generating device, storage medium, and line drawing image generating method
JP6056511B2 (en) Image processing apparatus, method, program, and imaging apparatus
JP2010193154A (en) Image processor and method
JP5245991B2 (en) BRIGHTNESS CORRECTION PROGRAM, BRIGHTNESS CORRECTION METHOD, AND BRIGHTNESS CORRECTION DEVICE
JP5232107B2 (en) Image display method, program, image display apparatus, and imaging apparatus
JP2005275765A (en) Image processor, image processing method, image processing program and recording medium recording the program
JP2011053456A (en) Image display method, program, image display device, and imaging apparatus with the image display device
JP2002300404A (en) Image processing method and image processor
JP2008269131A (en) Image processor and image processing program
JP5459072B2 (en) Image processing apparatus, image processing method, and image processing program
JP5761386B2 (en) Image processing apparatus, image processing method, and image processing program
JP2005217721A (en) Apparatus and method for generating still picture
JP4008715B2 (en) Form reading device and form reading processing program
JP2005274887A (en) Image display system, image display program and image display method

Legal Events

Date Code Title Description
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: 20090929

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091026

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

Free format text: PAYMENT UNTIL: 20121030

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4399462

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20221030

Year of fee payment: 13

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees