JP2004005721A - Method and device for composing image - Google Patents

Method and device for composing image Download PDF

Info

Publication number
JP2004005721A
JP2004005721A JP2003271371A JP2003271371A JP2004005721A JP 2004005721 A JP2004005721 A JP 2004005721A JP 2003271371 A JP2003271371 A JP 2003271371A JP 2003271371 A JP2003271371 A JP 2003271371A JP 2004005721 A JP2004005721 A JP 2004005721A
Authority
JP
Japan
Prior art keywords
image
background
subject
subject image
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003271371A
Other languages
Japanese (ja)
Inventor
Shigeo Akiyama
秋山 恵穂
Yasushi Ozawa
男澤 康
Shigehiro Fukase
深瀬 茂寛
Naoto Baba
馬場 直人
Yoshihiro Naito
内藤 義浩
Toru Baba
馬場 亨
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.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP2003271371A priority Critical patent/JP2004005721A/en
Publication of JP2004005721A publication Critical patent/JP2004005721A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Studio Circuits (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent a residual background color from being generated when a subject is cut out to provide a natural composition result. <P>SOLUTION: This image composition method wherein a subject image with the background light portion is removed is cut from the subject image photographed under the condition of a background color of a specified color, and wherein the cut-out subject image is composed with a preliminarily selected background image to output a composed image therein is provided with the first step for generating a mask image of which the outline is expanded by a prescribed picture element number after the outline of the subject image is extracted when the subject image is cut out, the second step for cutting out the background light portion of the subject image by the generated mask image, and the third step for contracting, by the prescribed picture element number, the outline of the subject image with the background light portion cut out, to remove the outline. <P>COPYRIGHT: (C)2004,JPO

Description

 本発明は、簡易な構成で解像度の高い自然な合成結果を得る画像合成方法および装置に関するものである。 The present invention relates to an image synthesizing method and apparatus for obtaining a high-resolution natural synthesis result with a simple configuration.

 従来、画像合成システムは放送局や映画の撮影スタディオなどで利用されることが多い。特にクロマキー合成による処理を用いての画像合成は天気予報やニュースまたは特撮などの映画に多く利用されている。クロマキー合成とは、合成用の画像内の被写体と背景色との色相差を判別し、画像切り抜き用の信号を得る方法であり、合成しようとする被写体をその被写体のもつ色とできるだけ色相の異なる(遠い)色の背景を用いて、合成用画面として撮像する。そして、背景の色を判別して波形処理を行なうことで被写体の輪郭情報を示すキー信号を作成し、そのキー信号を用いてベース画面のはめ込み部の切り抜き処理、および合成用画面の背景の切り落とし処理を行った後に背景と合成しようとする人物を重ね合わせることで画像合成を行なうことである。 Conventionally, image synthesis systems are often used in broadcasting stations and movie shooting studios. In particular, image synthesis using processing by chroma key synthesis is widely used for movies such as weather forecasts, news, and special effects. Chroma-key synthesis is a method of determining a hue difference between a subject in an image for synthesis and a background color and obtaining a signal for image clipping. The object to be synthesized has a hue that differs from the color of the object as much as possible. An image is taken as a synthesis screen using a (distant) color background. Then, a key signal indicating contour information of the subject is created by performing waveform processing by determining the color of the background, and using the key signal, clipping processing of the inset portion of the base screen and clipping of the background of the synthesis screen are performed. Image synthesis is performed by superimposing a person to be synthesized with the background after performing the processing.

 図32は、通常のクロマキー処理を行なうときの照明と人物と背景との関連を示す図であり、クロマキー合成処理を用いて画像合成を行なう場合、カメラ3200で撮影しようとする人物3201の背景に人の肌色の補色であるブルーの布や、ブルーに着色された大きなポリエステルの板3202を立てて、撮影しようとする人物に対して複数の照明光源3203を用いて多方向から照明を当てていた。 FIG. 32 is a diagram illustrating the relationship between illumination, a person, and a background when performing normal chroma key processing. In a case where image synthesis is performed using the chroma key synthesizing processing, the background of a person 3201 to be photographed by the camera 3200 is displayed. A blue cloth, which is a complementary color of human flesh color, or a large polyester plate 3202 colored blue, is erected, and a plurality of illumination light sources 3203 are used to illuminate the person to be photographed from multiple directions. .

また、街頭で見受けられる画像プリント装置として、例えば実用新案登録第3034012号に記載されたもの、あるいは図33のブロック図に示すように構成されたものがあるが、いずれも、簡易撮影装置(いわゆるスピード写真撮影機)などで印画紙に写真をプリントするのとほぼ同様のシステムであり、撮影したユーザの肖像に背景画面、枠画像、キャラクタなどの別途用意された額縁画像を合成してプリントシールの形態でユーザに提供するか、もしくは、単に証明写真のように上半身のみの写真を提供していた。この場合、装置外観としては、画像プリント装置本体に撮影時の外来光を遮断するための「ひさし状」のカーテンが撮影部前面に設置された構成となっている。 As an image printing apparatus that can be seen on the street, for example, there is an apparatus described in Utility Model Registration No. 3034012 or an apparatus configured as shown in the block diagram of FIG. 33. This is almost the same system as printing a photo on photographic paper with a speed photographing machine, etc., and combining a portrait image of the photographed user with a separately prepared frame image such as a background screen, frame image, character, etc. To the user, or a photo of only the upper body, such as an ID photo. In this case, the appearance of the apparatus is configured such that an “eave-shaped” curtain for blocking external light during photographing is installed on the front of the photographing unit in the image printing apparatus main body.

 図33に示す従来の画像プリント作成装置は、CPU3301と、タッチパネルや各種の操作ボタン、ジョイスティック装置などから成る操作部3302、CCDカメラなどで構成される画像入力装置3303、ユーザの肖像(顔画像)等を表示する表示部3304、スピーカおよび合成音声を発生するための音声ROMを備えた音声操作部3305、プリントシートまたはシールを印刷出力するプリント手段3306、使用料を精算するためのコイン検知部を備えた入金装置3307、背景パターンデータ,合成パターンデータおよび画像合成処理のためのプログラムを記憶したROM3308、画像入力装置3303で撮影したユーザの肖像の画像信号をディジタルの画像データに変換するAD変換機3310、変換後の画像データを画像メモリ3309に記憶させるI/Oインタフェース3311、画像データの編集等を行なうためのRAM3312、各種のデータ等を記憶したハードディスク3313や補助記憶媒体3314などで構成されている。
実用新案登録第3034012号公報
The conventional image print creating apparatus shown in FIG. 33 includes a CPU 3301, an operation unit 3302 including a touch panel, various operation buttons, a joystick device, and the like, an image input device 3303 including a CCD camera and the like, and a portrait (face image) of a user. , A voice operation unit 3305 having a speaker and a voice ROM for generating a synthesized voice, a printing unit 3306 for printing out a print sheet or a sticker, and a coin detecting unit for adjusting a usage fee. A depositing device 3307 provided, a ROM 3308 storing background pattern data, combined pattern data, and a program for image combining processing, and an AD converter for converting an image signal of a portrait of a user photographed by the image input device 3303 into digital image data. 3310, image data after conversion I / O interface 3311 is stored in memory 3309, for performing editing of the image data RAM3312, it is composed of a hard disk 3313 or the auxiliary storage medium 3314 for storing various data.
Japanese Utility Model Registration No. 3034012

 上記従来技術では、放送局や撮影スタディオなどでクロマキー処理を行なう場合、被写体の背景をブルーバックに設定し、なお、人物の陰影がそのブルーの背景に写らないように、多方向から複数の照明を当て、無影状態を作る必要があった。しかしながら、このようなブルーバックを利用したクロマキー処理を用いた画像合成には無影状態を作り出すために多数の照明機器を設置する必要があり、ある程度の広さを有するスタディオや、多方向からの照明機器の設置が必要だった。したがって、学校の放送室や、CATVなどのローカル局ではクロマキー処理を用いた画像合成を処理する場合に必要となる十分な設備を準備できないという問題点があった。 In the above-described conventional technology, when performing chroma key processing at a broadcasting station or a shooting studio, the background of a subject is set to a blue background, and a plurality of illuminations from multiple directions are set so that a shadow of a person is not reflected on the blue background. To create a shadowless state. However, image synthesis using chroma key processing using such a blue background requires a large number of lighting devices to be installed in order to create a shadowless state. Lighting equipment needed to be installed. Therefore, there is a problem that sufficient facilities required for processing image synthesis using chroma key processing cannot be prepared in a broadcasting room of a school or a local station such as a CATV.

 同様に、従来の画像プリント装置において、画像の合成結果が自然な状態に見えるような結果を得ることができるように合成を行ないたい場合、上述のクロマキー処理を用いた画像合成を利用することが考えられるが、筐体の空間が限られてしまうため、無影状態を作り出すための多方向からの照明機器を筐体内に設けることはできないという問題点があった。さらに、スタディオ等の撮影では、撮影対象が移動するたびに照明条件が変化し、背景の明度が変化して合成がうまくいかないという問題点があった。 Similarly, in the conventional image printing apparatus, when it is desired to perform synthesis so that the synthesized result of the image looks natural, it is possible to use the image synthesis using the above-described chroma key processing. It is conceivable, however, that the space of the housing is limited, so that there is a problem that it is not possible to provide lighting devices from multiple directions for creating a shadowless state in the housing. Further, in the shooting of a studio or the like, there is a problem that the lighting condition changes every time the shooting target moves, the brightness of the background changes, and the composition is not successful.

 このような問題を解決するには、背景と撮影対象の距離を大きくとり、背景自身に直接照明を当て、さらに背景色と類似の色の服装を避け、キーとなる色の彩度、明度の幅を大きくとるなどの面倒な対策を講じなければならないという問題があった。 To solve this problem, increase the distance between the background and the subject, illuminate the background itself directly, avoid clothing with colors similar to the background color, and adjust the saturation and brightness of the key colors. There was a problem that it was necessary to take troublesome measures such as increasing the width.

 また、従来の画像プリント装置では、背景と撮影した被写体を単に重ね合わせるだけの合成であるため、背景に対して、被写体が浮かび上がるような合成結果となり、合成結果が不自然であり、背景に対して自然に溶け込むような結果を得ることができないという問題があった。
 また、背景色の彩度や明度を調整したとしても、被写体の切り抜き処理を行った場合に、背景色の抜け残りが発生し、自然な合成結果が得られないという問題があった。
In addition, in the conventional image printing apparatus, since the composition is such that the background and the photographed subject are simply superimposed, the composition result is such that the subject emerges with respect to the background, and the composition result is unnatural. On the other hand, there is a problem that a result that naturally dissolves cannot be obtained.
Further, even if the saturation or brightness of the background color is adjusted, there is a problem that when the subject is cut out, the background color remains unremoved, and a natural synthesis result cannot be obtained.

 本発明の目的は、上記の問題点に鑑み、特に、被写体の切り抜き処理を行った場合に、背景色の抜け残りが発生するのを防止し、自然な合成結果を得ることができる画像合成方法および装置を提供することにある。 SUMMARY OF THE INVENTION In view of the above problems, an object of the present invention is to provide an image synthesis method that can prevent a background color from being left behind when a subject is cut out, and can obtain a natural synthesis result. And to provide a device.

 上記目的を達成するために、本発明の画像合成方法は、特定色の背景光の照明状態で撮影した被写体画像から背景光部分を除いた被写体画像を切り出し、その切り出した被写体画像と予め選択した背景画像とを合成し、その合成画像を出力する画像合成方法において、
 前記被写体画像を切り出す際に、前記被写体画像の輪郭線を抽出した後、該輪郭線を所定画素数だけ膨張させたマスク画像を生成する第1のステップと、生成したマスク画像によって被写体画像の背景光部分を切り取る第2のステップと、背景光部分を切り取った被写体画像の輪郭線を所定画素数だけ収縮させて輪郭線を除去する第3のステップとを備えることを特徴とする。
 また、輪郭線を除去した前記被写体画像の周縁画素に対し平滑フィルタリング処理を施す第4のステップをさらに備えることを特徴とする。
In order to achieve the above object, the image synthesizing method of the present invention cuts out a subject image excluding a background light portion from a subject image taken in a lighting state of a specific color of background light, and selects the cut-out subject image and a preselected subject image. In an image combining method of combining a background image and outputting the combined image,
When extracting the subject image, a first step of extracting a contour line of the subject image and generating a mask image obtained by expanding the contour line by a predetermined number of pixels, and a background of the subject image based on the generated mask image The method is characterized by including a second step of cutting out the light part and a third step of contracting the outline of the subject image from which the background light part has been cut out by a predetermined number of pixels to remove the outline.
The image processing apparatus further includes a fourth step of performing a smooth filtering process on a peripheral pixel of the subject image from which the contour is removed.

 本発明に係る画像合成装置は、特定色の背景光の照明状態で撮影した被写体画像から背景光部分を除いた被写体画像を切り出し、その切り出した被写体画像と予め選択した背景画像とを合成し、その合成画像を出力する画像合成装置において、前記被写体画像を切り出す際に、前記被写体画像の輪郭線を抽出した後、該輪郭線を所定画素数だけ膨張させたマスク画像を生成する第1の手段と、生成したマスク画像によって被写体画像の背景光部分を切り取る第2の手段と、背景光部分を切り取った被写体画像の輪郭線を所定画素数だけ収縮させて輪郭線を除去する第3の手段とを備えることを特徴とする。
 また、輪郭線を除去した前記被写体画像の周縁画素に対し平滑フィルタリング処理を施す第4の手段をさらに備えることを特徴とする。
The image synthesizing apparatus according to the present invention cuts out a subject image excluding a background light portion from a subject image captured in an illumination state of a background light of a specific color, and combines the cut-out subject image with a previously selected background image, In the image synthesizing apparatus for outputting the synthesized image, when cutting out the subject image, after extracting a contour line of the subject image, a first means for generating a mask image in which the contour line is expanded by a predetermined number of pixels Second means for cutting out the background light portion of the subject image by the generated mask image, and third means for removing the contour line by shrinking the contour line of the subject image from which the background light portion has been cut out by a predetermined number of pixels. It is characterized by having.
The image processing apparatus may further include a fourth unit that performs a smooth filtering process on a peripheral pixel of the subject image from which the contour is removed.

 本発明によれば、被写体の切り抜き処理を行った場合に、背景色の抜け残りが発生するのを防止し、被写体が背景の中に自然に溶け込んでいるように見える合成画像を得ることができる。 ADVANTAGE OF THE INVENTION According to this invention, when clipping processing of a subject is performed, generation | occurrence | production of the missing of a background color can be prevented from occurring, and the synthetic | combination image which looks as if the subject melt | dissolves in the background naturally can be obtained. .

 以下、図面を参照して本発明の一実施の形態を詳細に説明する。
 図1および図2は、本発明の原理構造を示す図であり、図1は本発明の装置を上方から見た場合の筐体内部平面図、図2は図1のA−A方向から見た筐体内部側面図である。
これらの図において、筐体内部には、被写体(人物)の全身が視野内に入るような上方位置にカメラ101が設定されている。そして、カメラ101の撮影方向の前面部の照明器具102a〜102dと、天井部の照明器具103から人物(被写体)104に対して照明を当て、さらに人物104の背面及び底面部(床面)に設置した面発光表示板105、106を発光させることにより、人物104の背面及び足元に生じる影を面発光表示板105、106の発光によって相殺するように構成されている。人物104の撮影は、当該人物104の背面及び足元に生じた影を相殺した状態で行われる。なお、図面に記載されている各数値は、影を相殺するのに適した数値ではあるが、人物の大きさ、外枠を囲う筐体の大きさ、照明の照度によって適宜に変更される。
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
1 and 2 are diagrams showing the principle structure of the present invention. FIG. 1 is a plan view of the inside of a casing when the device of the present invention is viewed from above, and FIG. It is the housing | casing inside side view.
In these figures, the camera 101 is set inside the housing at an upper position such that the whole body of the subject (person) enters the field of view. Then, lighting is performed on the person (subject) 104 from the lighting devices 102a to 102d on the front side in the shooting direction of the camera 101 and the lighting device 103 on the ceiling, and further on the back surface and bottom surface (floor surface) of the person 104. By illuminating the installed surface-emitting display panels 105 and 106, shadows generated on the back and feet of the person 104 are offset by the emission of the surface-emitting display panels 105 and 106. The photographing of the person 104 is performed in a state where the shadows generated on the back and feet of the person 104 are canceled. Each numerical value described in the drawings is a numerical value suitable for canceling a shadow, but is appropriately changed depending on the size of a person, the size of a housing surrounding an outer frame, and the illuminance of illumination.

 図3は、上述した原理的な構造を適用した画像合成装置300の一実施形態を示す内部側面図であり、外部筐体301の内部には、人物302の全身が視野内に入るような上方位置にカメラ303が設置され、また天井部には人物302に対して頭部方向から照明を当てる照明器具304が設置されている。さらに、人物104の背面及び底面部(床面)には図1の面発光表示板105、106に該当する面発光表示板305、306が設置されている。 FIG. 3 is an internal side view showing an embodiment of the image synthesizing apparatus 300 to which the above-described principle structure is applied. A camera 303 is installed at the position, and a lighting fixture 304 that illuminates the person 302 from the head direction is installed at the ceiling. Further, surface light emitting panels 305 and 306 corresponding to the surface light emitting panels 105 and 106 of FIG. 1 are provided on the back surface and bottom surface (floor surface) of the person 104.

 この場合、特に背面部の面発光表示板305は少なくとも被写体である人物302を頭部から足元まで充分にカバーできる大きさであることが望ましい。さらに、底面部の面発光表示板306は足元に生じる影を相殺するうえで面発光表示板305が設置されている筐体背面部から少なくとも30cm〜50cmは占有していることが望ましい。 In this case, in particular, it is desirable that the surface light emitting display panel 305 on the rear side be large enough to cover at least the person 302 as the subject from the head to the feet. Further, it is preferable that the surface light emitting display panel 306 at the bottom portion occupies at least 30 cm to 50 cm from the rear surface of the housing where the surface light emitting display plate 305 is installed in order to cancel the shadow generated at the foot.

 また、カメラ303の下方には、表示画面表面にタッチパネルを有し、合成画像を表示する表示装置307が設けられ、さらにその下方には合成画像をプリント出力するプリンタ308が設けられている。また、表示装置307の背面側には画像合成処理を含む装置全体の制御を行なう制御装置309が設置されている。なお、図3においては、人物302を前方から照らす照明器具は図示を省略している。 Further, below the camera 303, a display device 307 that has a touch panel on the display screen surface and displays a composite image is provided, and further below the camera 303, a printer 308 that prints out the composite image is provided. On the back side of the display device 307, a control device 309 for controlling the entire device including image synthesis processing is provided. Note that, in FIG. 3, a lighting device that illuminates the person 302 from the front is omitted.

 図4は、機能構成を示すブロック図である。この実施形態にかかる画像合成装置は、全体の制御を行なうCPU(中央処理装置)1を備えている。このCPU1は、メモリ2、I/O制御部3、データ記憶部4、画像出力部5、画像処理部6、パターンメモリ7、画像入力部8に接続されている。I/O制御部3は、通信制御I/F(インタフェース)9、デジタルカメラI/F(インタフェース)10、インバータ11、センサ12、タッチパネル13、コイン制御部14、背面部と底面部に設けられた面発光体、および人物302を前方から照らす照明器具の発光を調整する発光部/調光部15に接続され、これら全体の制御を行なう。 FIG. 4 is a block diagram showing a functional configuration. The image synthesizing apparatus according to this embodiment includes a CPU (Central Processing Unit) 1 that performs overall control. The CPU 1 is connected to a memory 2, an I / O control unit 3, a data storage unit 4, an image output unit 5, an image processing unit 6, a pattern memory 7, and an image input unit 8. The I / O control unit 3 is provided on a communication control I / F (interface) 9, a digital camera I / F (interface) 10, an inverter 11, a sensor 12, a touch panel 13, a coin control unit 14, a back surface and a bottom surface. It is connected to the light emitting unit / light adjusting unit 15 that adjusts the light emission of the surface illuminator and the lighting fixture that illuminates the person 302 from the front, and controls the whole.

 データ記憶部4には、フロッピィディスクなどの補助記憶媒体20との間で各種のデータを送受する。画像出力部5は、ビデオプリンタ18、表示装置19にそれぞれ接続されている。 (4) The data storage unit 4 sends and receives various data to and from the auxiliary storage medium 20 such as a floppy disk. The image output unit 5 is connected to a video printer 18 and a display device 19, respectively.

 I/O制御部3は、インバータ11を制御し、発光部/調光部15に対して接続されている面発光表示板305、306に電圧を加え、発光面全体を一様に発光させる。画像入力部8は、CCDカメラ17で撮影した画像データをA/D変換装置(図示しない)によりアナログ信号からディジタル信号に変換する。CCDカメラ17には、広角レンズが装着されているため、近距離でも縦横、撮影範囲の広い映像が撮影できる。さらに背面、底面部に設置してある面発光表示板305、306からの発光の彩度、明度を測定する。 The I / O control unit 3 controls the inverter 11 to apply a voltage to the surface-emitting display panels 305 and 306 connected to the light-emitting unit / light-adjusting unit 15 to cause the entire light-emitting surface to emit light uniformly. The image input unit 8 converts image data captured by the CCD camera 17 from an analog signal to a digital signal using an A / D converter (not shown). Since the CCD camera 17 is equipped with a wide-angle lens, it is possible to capture images in a wide range of images both vertically and horizontally even at a short distance. Further, the saturation and lightness of light emitted from the surface light emitting display panels 305 and 306 installed on the back and the bottom are measured.

 CPU1は、画像入力装置200及び、デジタルカメラI/F(インタフェース)10からの圧縮ディジタル信号を受信し、被撮影者の全身画像の輪郭を抽出し、その撮影された全身画像の歪み補正を行い、さらに面発光表示板305、306による背景色と撮影した画像の明度と彩度の比較を行い、背景色の彩度と明度に適合するように全身画像の彩度と明度の補正を行った後、メモリ2に格納してあるプログラムによって、利用者が予め選択した任意の背景画像と合成し、ビデオプリンタ18ヘプリント出力処理を行なう。さらに、このデータはフロッピィディスクやPDやMOなどの補助記憶媒体20に格納される。格納する場合にはPGPなどの暗号プログラムにより、暗号化される。なお、ここで暗号化されるのは画像および、入力装置(タッチパネル)から入力された氏名、電話番号などのプライバシーに関わるデータとなる。 The CPU 1 receives compressed digital signals from the image input device 200 and the digital camera I / F (interface) 10, extracts a contour of the whole body image of the subject, and performs distortion correction of the taken whole body image. Further, the background color by the surface-emitting display panels 305 and 306 was compared with the brightness and saturation of the captured image, and the saturation and brightness of the whole-body image were corrected so as to match the saturation and brightness of the background color. Thereafter, the program is combined with an arbitrary background image selected in advance by the user according to the program stored in the memory 2 and the print output processing is performed on the video printer 18. Further, this data is stored in an auxiliary storage medium 20, such as a floppy disk, PD, or MO. When stored, it is encrypted by an encryption program such as PGP. The data to be encrypted here is privacy-related data such as an image and a name and a telephone number input from an input device (touch panel).

 メモリ2には、画像入力部8から取り込んだ画像データが記憶されるほか、CPU1に発する命令と画像合成装置の制御手順となる命令群がプログラムとして記憶されている。また、CPU1の処理データもワークデータとして一時的に記憶する。さらに、撮影時に点灯される背景、底面に設置された面発光表示板305、306からの光の彩度、明度のデータを記憶する。 The memory 2 stores the image data taken in from the image input unit 8, and also stores, as a program, a command issued to the CPU 1 and a command group for controlling the image synthesizing apparatus. The processing data of the CPU 1 is also temporarily stored as work data. Further, data of the background illuminated at the time of shooting and the saturation and brightness of light from the surface light emitting display panels 305 and 306 installed on the bottom surface are stored.

 パターンメモリ7には、被写体の画像と重ね合せる背景画像データが記憶されと共に、表示装置19に表示する操作メニューのガイドが記憶されている。このパターンメモリ7の内容はデータ記憶部4によって書き換え可能になっている。通信制御I/F9は、外部ネットワークとの接続に用いられる。本装置は通信制御I/F9により専用回線を介して、外部にある機器管理サーバに接続される。この機器管理サーバ(図示しない)は故障の有無を管理することを目的とする。 The pattern memory 7 stores background image data to be superimposed on the image of the subject, and also stores a guide for an operation menu to be displayed on the display device 19. The contents of the pattern memory 7 can be rewritten by the data storage unit 4. The communication control I / F 9 is used for connection with an external network. This device is connected to an external device management server by a communication control I / F 9 via a dedicated line. The purpose of this device management server (not shown) is to manage the presence or absence of a failure.

 また、新しい背景画像やキャラクタ画像を機器管理サーバから送信し、I/O制御部3を介してデータ記憶部4に記憶する。データ記憶部4ではパターンメモリ7に書き込まれたデータの日付と照合し、データ記憶部4に記憶されたデータが新しいものであれば、パターンメモリ7内のデータを書き換える。また、後述するが、光通信制御I/Fを設けることで、PDAなどの携帯情報端末やパソコンなどが直接、接続でき、プログラムなどのバイナリーデータのやりとりもすることができるようになっている。 {Circle around (2)} Also, a new background image or character image is transmitted from the device management server and stored in the data storage unit 4 via the I / O control unit 3. The data storage unit 4 checks the date of the data written in the pattern memory 7 and, if the data stored in the data storage unit 4 is new, rewrites the data in the pattern memory 7. As will be described later, by providing the optical communication control I / F, a portable information terminal such as a PDA or a personal computer can be directly connected, and binary data such as a program can be exchanged.

 タッチパネル13は表示装置19の表示画面表面に設けられており、例えば、表示装置画面に操作メニューを表示し、種々の選択条件を押圧操作によって入力するために使用するものであり、例えば、表示装置画面に密着させてセツトし、表示させた操作メニューの位置を押圧操作した時の抵抗値をCPU1がA/D変換装置を介して検知し、画面上の座標を算出し、これにより、ユーザがどのボタンを選択したかを判定するようになっている。センサ12は、例えば赤外線センサによって、操作部位のユーザの存否を検知し、ユーザがコイン投入後、所定の位置にいるかどうか、また、存在するユーザは単数であるか複数であるかを確認するためのものである。コイン制御部14は、コインの投入の有無や、不正コインの投入などをCPU1からの制御に従って検知するものであり、投入されたコインの形状と重さを計測し、真正コインではないコインに対し、さらにコインの表裏の模様を判定し、投入されたコインが真正コインか、不正コインや偽造コインであるかどうかを判別する。 The touch panel 13 is provided on the surface of the display screen of the display device 19, and is used, for example, to display an operation menu on the display device screen and to input various selection conditions by a pressing operation. The CPU 1 detects, via the A / D converter, a resistance value when the operation menu is pressed and pressed at the position of the displayed operation menu, which is set in close contact with the screen, and calculates the coordinates on the screen. Which button is selected is determined. The sensor 12 detects the presence or absence of a user at the operation site by, for example, an infrared sensor, and confirms whether or not the user is at a predetermined position after inserting a coin, and whether or not there is one or more users. belongs to. The coin control unit 14 detects whether or not a coin has been inserted and whether or not an illegal coin has been inserted, under the control of the CPU 1, measures the shape and weight of the inserted coin, and determines whether the coin is not a genuine coin. Then, the pattern of the front and back of the coin is determined, and it is determined whether the inserted coin is a genuine coin, a fraudulent coin, or a counterfeit coin.

 インバータ11は、面発光表示板305、306に対してのちらつき防止制御を行なう。外部調光に応じて、手動でちらつき防止周期を変更することもできる。発光部/調光部15は、撮像手段としてのCCDカメラ17に電圧を加える点弧角を制御するために発光機能/調光機能を付加するものである。面発光表示板305、306は、具体的にはEL板やPISなどを用いる。また、これらの面発光表示板305、306の全面にブルーのフィルムやグリーンのフィルムを圧着し、ブルー、グリーン等の白色や肌色以外の色彩を発光させる。また、表面反射を防止するためにアクリルなどで表面の加工を行なう。もちろん、ビーズ加工等であっても構わない。 (4) The inverter 11 performs flicker prevention control on the surface-emitting display panels 305 and 306. The flicker prevention period can be manually changed according to the external light control. The light emitting unit / light adjusting unit 15 adds a light emitting function / light adjusting function in order to control a firing angle for applying a voltage to the CCD camera 17 as an imaging unit. Specifically, the surface-emitting display plates 305 and 306 use an EL plate, a PIS, or the like. Further, a blue film or a green film is pressed on the entire surface of the surface light-emitting display panels 305 and 306 to emit a color other than white or flesh color such as blue or green. The surface is processed with acrylic or the like to prevent surface reflection. Of course, bead processing or the like may be used.

 画像処理部6は、メモリ2に記憶させた被写体の画像データとパターンメモリ7に格納した顔の色データから顔の輪郭を抽出し、メモリ2上の空間の任意の位置に配置する処理や任意の背景画像との合成処理をCPU1と共同してまたは単独で行い、合成した画像データをビデオプリンタ18に送るなどの処理を行なう。ビデオプリンタ18は、カラー画像を葉書もしくはシールに印刷し、出力する。 The image processing unit 6 extracts the contour of the face from the image data of the subject stored in the memory 2 and the color data of the face stored in the pattern memory 7, and arranges the face at an arbitrary position in the space on the memory 2. Is performed in cooperation with the CPU 1 or independently, and processing such as sending the synthesized image data to the video printer 18 is performed. The video printer 18 prints and outputs a color image on a postcard or a sticker.

 メモリ2に記憶させた前記画像データとパターンメモリ7に格納した顔の色データから顔の輪郭を抽出し、メモリ2上の空間の任意の位置に配置する処理も行なう。タイマ21は、外部にある機器管理サーバと専用線で接続できる環境にないときに装置本体内に設けられ、CPU1の命令により動作する。光通信制御I/F22は赤外線通信を行なうIrDAの制御や、光ファイバを利用した通信が行なう場合の制御を行なう。このインタフェースを用いることでプログラムなどのバイナリーデータのやり取りができ、PDAなどの情報携帯端末や、ノート型パーソナルコンピュータと直接接続することができ、情報携帯端末やパーソナルコンピュータ内に本発明の画像合成装置のプログラムやデータを取り込むことができる。また、パーソナルコンピュータで作成したデータやプログラムを本実施形態の画像合成装置に送って、背景パターンやキャラクタに任意に変更することができる。 {Circle around (2)} A process of extracting a face contour from the image data stored in the memory 2 and the face color data stored in the pattern memory 7 and arranging the contour at an arbitrary position in the space on the memory 2 is also performed. The timer 21 is provided in the apparatus main body when there is no environment in which the timer 21 can be connected to an external device management server by a dedicated line, and operates according to an instruction from the CPU 1. The optical communication control I / F 22 controls IrDA for performing infrared communication and controls when communication using an optical fiber is performed. By using this interface, binary data such as a program can be exchanged, and it can be directly connected to a personal digital assistant such as a PDA or a notebook personal computer. Programs and data. Further, data or a program created by a personal computer can be sent to the image synthesizing apparatus of the present embodiment, and can be arbitrarily changed to a background pattern or a character.

 ユーザの撮影は、コイン投入後、ユーザへの撮影指示が表示装置18の表示画面で指示されたときに、CCDカメラ17により行われる。撮像装置としては、CCDカメラ16のほかにC-MOS搭載カメラや通常のビデオカメラ等を用いてもよい。CCDカメラ16等の画像入力装置200により撮影した画像データは、CCDカメラ17等に内蔵されたAE(オートアイリス)機能により露出調整されてメモリ2に記憶される。また、撮像装置として例えば、Ir−DA光通信機能を有するデジタルスティルカメラを用いてもよい。その場合には、予め撮影した画像データを受信し転送できるIr−DA光通信機能と複数枚の画像データが格納できるバッファメモリにより、ユーザにメニュー画像の選択条件となるアイコンを選択させて、JPEG圧縮した複数枚の静止画を容易に合成することができるようになる。 (4) The photographing of the user is performed by the CCD camera 17 when the photographing instruction to the user is instructed on the display screen of the display device 18 after the coin is inserted. As the imaging device, a camera equipped with a C-MOS, a normal video camera, or the like may be used in addition to the CCD camera 16. Image data captured by the image input device 200 such as the CCD camera 16 is subjected to exposure adjustment by an AE (auto iris) function built in the CCD camera 17 and the like, and is stored in the memory 2. In addition, for example, a digital still camera having an Ir-DA optical communication function may be used as the imaging device. In this case, an Ir-DA optical communication function that can receive and transfer previously captured image data and a buffer memory that can store a plurality of image data allow the user to select an icon serving as a selection condition of a menu image, and perform JPEG A plurality of compressed still images can be easily synthesized.

 なお、センサ12によって、ユーザが操作部に立ったことを検知した場合、その検知信号により、CPU1に割り込みを発生させて表示装置19の表示をデモンストレーション用画面から操作ガイド画面に切り換えるようにする。さらに、コインを投入させることで、背面および底面の面発光表示板305、306を発光準備状態に制御し、CCDカメラ17のシャッターが切れるタイミング、つまり、撮影タイミングに同期して背面および底面の面発光表示板305、306が発光するように制御される。なお、面発光表示板305、306は、ユーザがコインを投入した段階で発光開始とするようにしてもよい。 When the sensor 12 detects that the user is standing on the operation unit, the detection signal causes the CPU 1 to generate an interrupt so that the display on the display device 19 is switched from the demonstration screen to the operation guide screen. Further, by inserting coins, the back and bottom surface light-emitting display panels 305 and 306 are controlled to be ready for light emission, and the shutter of the CCD camera 17 is released, that is, the back and bottom surfaces are synchronized in synchronization with the shooting timing. The light emitting display panels 305 and 306 are controlled to emit light. Note that the surface light-emitting display plates 305 and 306 may start emitting light at the stage when the user inserts a coin.

 撮影料金は、コイン制御部14で受け付けるが、料金受納手段は、コイン検知器に限られず、紙幣読取器、プリペイドカード読取器、クレジットカード等を用いることも可能である。撮影された画像データは、撮影後、RGBデータに変換され、画像出力部5を介して、表示装置19に表示される。表示装置19の画面解像度は、例えば、1画面あたり、320×240画素のものが適当である。 The photographing fee is received by the coin control unit 14, but the fee receiving means is not limited to the coin detector, and a bill reader, a prepaid card reader, a credit card, or the like can be used. The photographed image data is converted into RGB data after photographing, and displayed on the display device 19 via the image output unit 5. A suitable screen resolution of the display device 19 is, for example, 320 × 240 pixels per screen.

 本画像合成装置に具備する表示装置18には、ユーザが操作する段階で必要なメニュー画面を表示してユーザの作成した合成画像等が適切であるかを確認する表示が必要である。これらの画面表示は、CPU1により制御され、表示される。また、画面への表示や画像処理などは、CPU1によって動作状態が管理されているため、プリント処理中は、予めパターンメモリ7に記憶させてある画像や映像に切り換えて表示することができる。操作画面が不要な時には、メニュー表示を切り換えてコマーシャルや商品広告などを放映する。表示装置18は、CRT型表示装置に限定するものではなく、例えば液晶型LCD表示装置やLED発光による文字表示装置でもよい。なお、図4の各回路ブロックのうち、破線で囲む回路ブロックは、例えば、公知の半導体集積回路応用技術によって半導体基板上、またはガラスエポキシ基板上に形成されるものである。そして、図3の制御装置309内に設置される。 (4) The display device 18 provided in the present image synthesizing device needs to display a menu screen required at the stage of operation by the user and confirm whether the synthesized image or the like created by the user is appropriate. These screen displays are controlled and displayed by the CPU 1. Further, since the operation states of display on the screen, image processing, and the like are managed by the CPU 1, during the print processing, the display can be switched to an image or video stored in the pattern memory 7 in advance. When the operation screen is unnecessary, the menu is switched to broadcast commercials, product advertisements, and the like. The display device 18 is not limited to a CRT display device, but may be a liquid crystal LCD display device or a character display device using LED light emission. 4 are formed on a semiconductor substrate or a glass epoxy substrate by a known semiconductor integrated circuit application technique, for example. And it is installed in the control device 309 of FIG.

 図5は、本発明における面発光表示板305、306の色調の初期設定を示すフローチャートである。
 まず、朝などに最初に装置の電源をいれる(ステップ501)。電源が入ると、装置筐体前面部、天井部に設けられた照明機器と、背面部と底面部にある面発光表示板305、306に電圧が加えられ、発光を始める(ステップ502)。面発光表示板305、306が発光すると、本体装置側に設けられているCCDカメラ17が一度、面発光表示板305,306の彩度と明度を測定するために自動的に撮影を行なう(ステップ503)。撮影された画像から彩度と明度を記憶し(ステップ504)、クロマキー処理時に用いる画像の切り出す画像の基調色を調整する。記憶された色調情報をメモリ2に登録し、初期設定とする(ステップ505)。
FIG. 5 is a flowchart showing the initial setting of the color tone of the surface emitting display panels 305 and 306 in the present invention.
First, the apparatus is first turned on in the morning or the like (step 501). When the power is turned on, a voltage is applied to the illuminating devices provided on the front and the ceiling of the device housing and the surface emitting display panels 305 and 306 on the back and the bottom, and light emission is started (step 502). When the surface-emitting display panels 305 and 306 emit light, the CCD camera 17 provided on the main unit automatically performs photographing once to measure the saturation and brightness of the surface-emitting display panels 305 and 306 (step). 503). The saturation and brightness are stored from the photographed image (step 504), and the base color of the image to be cut out of the image used in the chroma key processing is adjusted. The stored color tone information is registered in the memory 2 and initialized (step 505).

 図6は、本発明における画像処理を示す概略フローチャートである。撮影された画像をメモリ2上に取り込む(ステップ601)。取り込まれた画像に対して、最初にユーザによって全身画像であるか、上半身画像であるかを選択された情報を参照して、歪み補正を行なうかどうかを判定する(ステップ602)。全身画像が選択されていた場合、不自然な歪みが発生しているので歪み補正を行なう(ステップ603)。ステップ602で半身画像が選択されていた場合はステップ604に移る。撮影された被写体の色調と選択された背景の色調を比較し(ステップ604)、被写体側の色調を背景側の色調に合わせ色調の補正を行い(ステップ605)、補正結果を踏まえ、背景との合成を行なう。合成された結果を表示し(ステップ606)、その結果を印刷し出力する。 FIG. 6 is a schematic flowchart showing image processing in the present invention. The captured image is taken into the memory 2 (step 601). It is determined whether or not distortion correction is to be performed on the captured image with reference to information on whether the image is a whole-body image or an upper-body image at first by the user (step 602). If the whole-body image has been selected, distortion correction is performed because unnatural distortion has occurred (step 603). If a half-body image has been selected in step 602, the process proceeds to step 604. The color tone of the photographed subject is compared with the color tone of the selected background (step 604), and the color tone of the subject is adjusted to match the color tone of the background side (step 605). Perform synthesis. The combined result is displayed (step 606), and the result is printed and output.

 次に、図7から図11を用いて、画像の歪み補正について説明する。本発明における画像合成装置の場合、近距離から全身画像を撮影するため、CCDカメラ17のレンズに広角レンズを使用することになる。近接距離から広角レンズを使用するために「あおり」(カメラの光軸の存角に起因する)により、レンズ中心部が大きくみえる寸詰まりのような歪みが発生してしまい、画像が不自然になってしまう。ただし、歪みはレンズの歪曲収差だけで起こるわけではなく、多岐にわたる原因によっては発生する。そのため、単一、単純な関数では歪み補正を行なうための補正後の座標系を定義することができない。 Next, image distortion correction will be described with reference to FIGS. In the case of the image synthesizing apparatus according to the present invention, a wide-angle lens is used as the lens of the CCD camera 17 in order to take a whole-body image from a short distance. Because of the use of a wide-angle lens from a close distance, “tilt” (due to the angle of the optical axis of the camera) causes distortion, such as close clogging, in which the center of the lens looks large, resulting in an unnatural image. turn into. However, the distortion is not caused only by the distortion of the lens, but is caused by various causes. For this reason, a corrected coordinate system for performing distortion correction cannot be defined by a single and simple function.

 このような画像の幾何学的変換では原画像の各画素を変換式を用いて変換画素に対応させると言う方法を用いるが、そうすると変換画素の間に値が求まらない画素が出来たり、2つ以上の画素が同じ画素に対応したりするため、変換画像上の各画素の値を濃度補間を用いて求める。濃度補間とは1組の座標を与え、その周りの4つの画素値を用いて線形補間を用いてその濃度値を求めていく。線形補間は近傍の4点の距離の比から濃度値を求めることを意味する。 In such a geometric transformation of the image, a method is used in which each pixel of the original image is made to correspond to the transformed pixel by using a transformation formula. Since two or more pixels correspond to the same pixel, the value of each pixel on the converted image is determined using density interpolation. In the density interpolation, a set of coordinates is given, and the density value is obtained by using linear interpolation using four pixel values around the coordinates. The linear interpolation means that a density value is obtained from a ratio of distances of four neighboring points.

 本発明では、実際に撮影した座標上の点Pn(Xn,Yn)と補正後の対応点P’n(X’n,Y’n)のペアの集合から各点の対応点を算出し、線形補正と濃度補正を利用することで不自然に見える画像を自然に見える画像に補正する。 In the present invention, a corresponding point of each point is calculated from a set of pairs of a point Pn (Xn, Yn) and a corrected corresponding point P'n (X'n, Y'n) on the actually captured coordinates, An image that looks unnatural is corrected to an image that looks natural by using linear correction and density correction.

 図7は実際に撮影した座標上の点Pn(Xn、Yn)と補正後の対応点Pn(Xn,Yn)のペアの集合から各点の対応点を算出したものである。図8は実際に撮影された画像を補正した結果を示す図である。図9は図8で示される補正結果はどのように処理の結果によるものかを示す図である。本発明ではあらかじめ、図7で示される撮影座標系と補正後座標系の全ての補正データを用意しておく。図7で得られる補正データを利用して補正後座標系の点(X’,Y’)に対応する撮影座標系上の点(X,Y)の求め方を説明する。 FIG. 7 shows the calculated corresponding points of each point from a set of pairs of points Pn (Xn, Yn) on the actually photographed coordinates and corresponding points Pn (Xn, Yn) after correction. FIG. 8 is a diagram showing a result of correcting an actually photographed image. FIG. 9 is a diagram showing how the correction result shown in FIG. 8 is based on the processing result. In the present invention, all correction data of the photographing coordinate system and the corrected coordinate system shown in FIG. 7 are prepared in advance. A method of obtaining a point (X, Y) on the photographing coordinate system corresponding to the point (X ', Y') on the corrected coordinate system using the correction data obtained in FIG. 7 will be described.

 まず、(X,Y)を探すために撮影座標から補正データを利用して、補正後座標系を求め、撮影座標と対応する補正座標の近傍の4点を求める。この場合、補正後座標上の対応点は格子状に配列された点とであると仮定する。補正座標上の4点を求め、さらに撮影座標上にある(Xp,Yp)、(Xq,Yq)を下記式によって求める。この(Xp,Yp)、(Xq,Yq)を求めることで(X’,Y’)に対応する(X,Y)が求まる。 First, in order to find (X, Y), a corrected coordinate system is obtained by using the correction data from the shooting coordinates, and four points near the shooting coordinates and the corresponding correction coordinates are obtained. In this case, it is assumed that the corresponding points on the corrected coordinates are points arranged in a grid. Four points on the correction coordinates are obtained, and (Xp, Yp) and (Xq, Yq) on the shooting coordinates are obtained by the following equations. By obtaining (Xp, Yp) and (Xq, Yq), (X, Y) corresponding to (X ', Y') is obtained.

  計算例
  Xp=X1+(X2―X1)(X−Xa)/(Xb−Xa) Yp=Y1+(Y2―Y1)(Y−Ya)/(Yb−Ya) Xq=X3+(X4―X3)(X−Xa)/(Xb−Xa) Yq=X3+(Y4―Y3)(Y−Ya)/(Yb−Ya)
 (X,Y)の求め方
  X=Xp+(Xq−Xp)/(Y−Ya)/(Yb−Ya) Y=Yp+(Yq−Yp)/(X−Xa)/(Xb−Xa)実際の線形補正による計算結果は図10に示す。図10によって撮影座標上の点(X,Y)が求まる。
Calculation example Xp = X1 + (X2-X1) (X-Xa) / (Xb-Xa) Yp = Y1 + (Y2-Y1) (Y-Ya) / (Yb-Ya) Xq = X3 + (X4-X3) (X −Xa) / (Xb−Xa) Yq = X3 + (Y4-Y3) (Y−Ya) / (Yb−Ya)
How to calculate (X, Y) X = Xp + (Xq−Xp) / (Y−Ya) / (Yb−Ya) Y = Yp + (Yq−Yp) / (X−Xa) / (Xb−Xa) FIG. 10 shows the calculation result by the linear correction. The point (X, Y) on the photographing coordinates is obtained from FIG.

 次に、求められた(X,Y)から濃度補間を用いて図10では(68.84,116.13)となる。従って(X,Y)((68.84,116.13))に対応する(X’,Y’)(100,100)の濃度は撮影座標上の点(68.84,1163.13)の近傍点すなわち、(68,116)、(68,117)、(69,116)(69,117)の4つの格子点上の濃度値から算出される。補正後座標系上の点(100,100)の濃度d’(100,100)は、d’(100,100)=d(68.84,116.13)=4点((68,116)、(69,116)、(68,117)、(69,117))の濃度を線形補間して求めることになる。 {Next, FIG. 10 shows (68.84, 116.13) using density interpolation from the obtained (X, Y). Therefore, the density of (X ′, Y ′) (100, 100) corresponding to (X, Y) ((68.84, 116.13)) is the density of the point (68.84, 1163.13) on the shooting coordinates. It is calculated from the density values on four neighboring grid points, that is, (68,116), (68,117), (69,116), and (69,117). The density d ′ (100, 100) of the point (100, 100) on the coordinate system after correction is d ′ (100, 100) = d (68.84, 116.13) = 4 points ((68, 116) , (69,116), (68,117), (69,117)) are obtained by linear interpolation.

 図11の(a)は実際に補正前に撮影された画像の座標を示す図であり、(b)は補正後の座標を示す図である。図11で示すデータはあくまで座標空間上の一部の領域、格子状に配列された点であり、したがって、格子状に配列されていない点も座標空間上に存在する。この場合、撮影座標上にない領域での補正は格子点の対応データを外挿して求めることになる。本発明における画像の歪み補正では、近傍の4点から補正後の座標を求める線形補間法を利用することが望ましいと思われる。 (A) of FIG. 11 is a diagram showing the coordinates of the image actually taken before the correction, and (b) is a diagram showing the coordinates after the correction. The data shown in FIG. 11 is only a part of the area in the coordinate space, points arranged in a grid, and therefore, points not arranged in the grid exist in the coordinate space. In this case, the correction in the area not on the shooting coordinates is obtained by extrapolating the corresponding data of the grid points. In the image distortion correction according to the present invention, it may be desirable to use a linear interpolation method for obtaining corrected coordinates from four neighboring points.

 次に、図12を用いて画像合成の詳細を説明する。撮影された被写体(人物)の画像に対して中心座標を設け、背景に対して位置合わせを行なう(ステップ1201)。この位置合わせとは、光源に対して行なうものである。位置合わせを行った被写体画像の輪郭の切り出しを行なう(ステップ1202)。抽出された輪郭と中心座標から被写体のもっとも肌色が多く分布される領域を決定し、画像の色調を決定する(ステップ1203)。 Next, details of image composition will be described with reference to FIG. The center coordinates are provided for the image of the photographed subject (person), and the position is aligned with the background (step 1201). This alignment is performed on the light source. The contour of the aligned subject image is cut out (step 1202). A region where the skin color of the subject is distributed most is determined from the extracted contour and the center coordinates, and the color tone of the image is determined (step 1203).

 決定された色調とユーザによって最初の操作で選択された背景の画像の色調を比較する(ステップ1204)。比較結果に基づいて、被写体の画像の色調を背景の色調に対応するように補正する(ステップ1205)。補正が終了したら、被写体画像と背景画像を合成する。 (4) The determined color tone is compared with the color tone of the background image selected by the user in the first operation (step 1204). Based on the comparison result, the color tone of the image of the subject is corrected so as to correspond to the color tone of the background (step 1205). When the correction is completed, the subject image and the background image are combined.

 次に、図12の画像合成の各ステップを機能単位で詳細に説明する。本発明の目的である人物と背景を違和感のないように合成するにはどのように行なえばいいのかは次にあげる4つの項目が必須の要素となる。 Next, each step of the image synthesis in FIG. 12 will be described in detail for each function. For the purpose of the present invention, the following four items are indispensable factors in how to combine a person and a background so as not to give a sense of discomfort.

 (1)色調、彩度、明るさを合わせること(2)光源位置があっていること(3)人物の位置、大きさが適切であること(4)人物の輪郭がぼやけていること。 (1) Match the color tone, saturation, and brightness. (2) The light source position is appropriate. (3) The position and size of the person are appropriate. (4) The outline of the person is blurred.

 以上の項目について、特に(1)と(4)についての本発明の手法を説明する。ちなみに(2)は通常の画像合成装置にはすでに最適な位置の光源位置が決定しているので省略する。また、(3)については画像合成装置を使用するユーザの身体的特徴はそれぞれ、個別のものでありユーザごとに背景画像からの自動位置、大きさを決定することは不可能であるため、選択された背景画像に応じて撮影された人物の画像を背景画像に対して埋め込む位置を固定値としてもたせておくこととする。 手法 With respect to the above items, the method of the present invention particularly for (1) and (4) will be described. Incidentally, the description of (2) is omitted because the light source position at the optimum position has already been determined for the ordinary image synthesizing apparatus. In the case of (3), since the physical characteristics of the user who uses the image synthesizing apparatus are individual, and it is impossible to determine the automatic position and size from the background image for each user, the selection is made. The position where the image of the person photographed according to the background image is embedded in the background image is set as a fixed value.

 まず、クロマキー合成について説明する。被写体の切り抜きは指定した色との差を考慮して色合成を行なうソフトキークロマキー処理と呼ばれる処理を使用する。色データの指定方法としては、RGBとHSVによる指定方式を使用する。 First, chroma key synthesis will be described. For clipping the subject, a process called soft key chroma key process for performing color synthesis in consideration of a difference from a designated color is used. As a method of specifying color data, a specification method using RGB and HSV is used.

 図13はRGB方式での色を範囲を指定するパラメータである。通常のRGB方式では手動でR、G、Bそれぞれの色の範囲を決定する。決定する場合にはR(Red)の最大値と最小値かつ、G(Green)の最大値と最小値かつ、B(Blue)の最小値の画素を取り除かれた範囲の中で決定する。 FIG. 13 shows parameters for specifying a range of colors in the RGB system. In a normal RGB system, the ranges of R, G, and B colors are manually determined. When the pixel is determined, it is determined within the range from which the pixels of the maximum value and the minimum value of R (Red), the maximum value and the minimum value of G (Green), and the minimum value of B (Blue) are removed.

 図13ではRedの色範囲指定は他のGreen,Blueより濃い階調を指定し、Greenの色範囲指定は薄い階調から広範囲に指定し、Blueの色範囲の指定では濃い階調を狭範囲に指定する。これらの色範囲の指定は抜き出そうとする被写体の持つ色によってその範囲を可変することができる。クロマキー合成時では抜き出そうとする画像の輪郭がもっとも明確になるのは、他の色ともっとも離れた色「青」が利用される。そのため、背景が青の場合は理想的数値としてはRGB=(0,0,255)であり、この数値を中心に、ある範囲を持たせて色を抜く。RGB方式の場合、通常の画像データがRGB形式であるため、変換の必要がなく、変換の手間を必要としない。欠点として選択した背景色の分布が大きいとRGBの色幅を大きくしなくてはならない。そのため、予想もしない人の服の色や肌も抜けてしまう可能性がある。 In FIG. 13, the color range of Red designates a darker gradation than other Green and Blue, the color range of Green designates a wide range from a lighter gradation, and the designation of a color range of Blue designates a darker gradation as a narrower range. To be specified. The specification of these color ranges can be varied depending on the color of the subject to be extracted. At the time of chroma key synthesis, the outline of the image to be extracted is most clearly determined using the color “blue” which is the most distant from the other colors. Therefore, when the background is blue, the ideal numerical value is RGB = (0, 0, 255), and the color is extracted with a certain range around this numerical value. In the case of the RGB system, since ordinary image data is in the RGB format, there is no need for conversion and no need for conversion. As a disadvantage, if the distribution of the background color selected is large, the color width of RGB must be increased. Therefore, there is a possibility that the color and skin of the clothes of the unexpected person may come off.

 図14は、HSV形式の概念図を示す図である。HSV方式ではH(色相)、S(彩度)、V(輝度)というように色の感じ方を3つの変数で表わしている。H,Sはそれぞれ独立した変数である。各変数ともに中心から遠ざかるほどにその変数値は低くなる。つまり、H(色相)は薄くなり、S(彩度)も薄くなり、V(輝度)は暗くなる。HSV形式の場合、色が連続的に変化するので被写体の背景にあるブルーバックの基調色である青色に対して青の色調の幅を広げて入った時には青っぽい色は抜けるが連続性のない黄色や赤などはぬけないという特徴がある。欠点としては、画像データは通常RGB形式であるため、変換の必要性があり、そのため、変換に時間がかかってしまうという問題点がある。 FIG. 14 is a conceptual diagram of the HSV format. In the HSV method, a color perception is represented by three variables such as H (hue), S (saturation), and V (luminance). H and S are independent variables. The value of each variable decreases as the distance from the center increases. That is, H (hue) decreases, S (saturation) decreases, and V (luminance) decreases. In the case of the HSV format, since the color changes continuously, when the width of the blue color is broadened with respect to the blue color which is the base color of the blue background in the background of the subject, a bluish color is lost but yellow without discontinuity There is a characteristic that can not be extinguished and red. As a disadvantage, image data is usually in RGB format, so there is a need for conversion, and the conversion takes a long time.

 また、使用する画像データがJPEGの場合にJPEG圧縮時のブロックが色彩にでてしまう。本発明ではRGB,HSV形式のいずれかを用いた色の指定により被写体画像を抽出することとなり2つの方式を被写体の持つ色に合わせて切り換えて使用することがもっとも好ましいが、実際にはRGB形式を用いて、輪郭画像の抽出を行なうこととする。 ブ ロ ッ ク Also, when the image data to be used is JPEG, the block at the time of JPEG compression appears in color. In the present invention, a subject image is extracted by specifying a color using one of the RGB and HSV formats, and it is most preferable to use the two systems by switching them according to the color of the subject. Is used to extract a contour image.

 次に(1)色調、彩度、明るさを合わせること、すなわち、背景画像と被写体画像の色調、彩度、明るさの調整について説明する。図15(a)は背景画像の輝度の分布を示すヒストグラムであり、図15(b)は被写体である人物画像の輝度の分布を示すヒストグラムである。図15(a)と図15(b)を比較すると背景の輝度の分布と一致していないことがわかる。図15(a)の背景画像の明るさが平均的に分散しているのに対し、図15(b)の人物画像はある特定の個所だけ明るく、他の部分が暗いことがわかる。この場合、背景画像の分散された明るさを被写体画像に反映させる必要があるため、背景の輝度のヒストグラムから、輝度の重心、偏りを求める。これは輝度のパラメータを合わせることで求めることができる。 Next, (1) adjusting the color tone, saturation, and brightness, that is, adjusting the color tone, saturation, and brightness of the background image and the subject image will be described. FIG. 15A is a histogram showing the distribution of the luminance of the background image, and FIG. 15B is a histogram showing the distribution of the luminance of the human image as the subject. Comparison between FIG. 15A and FIG. 15B shows that the distribution does not match the distribution of the luminance of the background. It can be seen that the brightness of the background image in FIG. 15A is dispersed on average, while the person image in FIG. 15B is bright at a certain specific place and the other parts are dark. In this case, since it is necessary to reflect the dispersed brightness of the background image in the subject image, the center of gravity and the bias of the luminance are obtained from the histogram of the luminance of the background. This can be determined by matching the luminance parameters.

 求めた重心、偏りデータから被写体のヒストグラムの変換関数f(x)(図16 (b)を作成する。次に被写体の輝度値をf(x)によって変換する。 変 換 A conversion function f (x) (FIG. 16B) of the histogram of the subject is created from the obtained center of gravity and bias data. Next, the brightness value of the subject is converted by f (x).

 図16(a)は被写体画像の輝度変換前を示す図であり、図16(c)は変換関数f(x)によって輝度変換後を示す図である。この変換関数によって、背景画像の輝度分布が被写体である人物画像に反映されたことがわかる。 FIG. 16A is a diagram showing a subject image before brightness conversion, and FIG. 16C is a diagram showing a subject image after brightness conversion by a conversion function f (x). It can be seen that the luminance distribution of the background image was reflected on the person image as the subject by this conversion function.

 図17は輝度変換のヒストグラム関数を示すもので、この変換関数は背景画像の輝度分布により自動生成される。ここでは全体の階調に対して平均的に輝度を分布させる曲線と、ある階調以上に対しては輝度レベルを変更させない変換関数を示している。 FIG. 17 shows a histogram function of luminance conversion, and this conversion function is automatically generated based on the luminance distribution of the background image. Here, a curve for distributing the luminance on average over the entire gradation and a conversion function that does not change the luminance level for a certain gradation or higher are shown.

 次に、彩度の調整について説明する。背景画像が鮮やかな色使いである場合は、背景画像を前述のHSV形式に変換し、S(彩度)の平均をとり、被写体画像のSの平均値が背景のSより低い値のときはSの値をあげてから、RGBに変換する。 Next, the adjustment of the saturation will be described. If the background image has vivid colors, the background image is converted to the above-described HSV format, the average of S (saturation) is calculated, and when the average value of S of the subject image is lower than that of the background, After increasing the value of S, it is converted to RGB.

 図18を用いてHSVデータでの彩度変換について説明する。HSVデータによる色彩変換の場合はまず、被写体画像と背景画像の彩度ヒストグラムを求め、各ヒストグラムの重心位置を求める。図18(a)では背景画像の重心はGreenに近い色に置かれている。次に、図18(b)のBlue、Red、Greenのそれぞれの各重心を求める。図18(a)からわかるように、ここではBlueとGreenの色彩が突出しているので図18(b)ではBlueとGreenの重心を求める。求まったそれぞれの重心から中間を求め、この中間色に対する補色を求める。求まった中間色の補色の位置を境にして被写体ヒストグラムの変換を行なう。ここでは背景画像がBlueとGreenの彩度が強いため、これら彩度の中間色の補色を境にして被写体である人物画像に対して、彩度を反映させることになる。 彩 Saturation conversion using HSV data will be described with reference to FIG. In the case of the color conversion based on the HSV data, first, the saturation histogram of the subject image and the background image is obtained, and the position of the center of gravity of each histogram is obtained. In FIG. 18A, the center of gravity of the background image is placed in a color close to Green. Next, the respective centers of gravity of Blue, Red, and Green in FIG. 18B are obtained. As can be seen from FIG. 18A, since the colors of Blue and Green are prominent here, the center of gravity of Blue and Green is obtained in FIG. 18B. An intermediate is determined from the determined centroids, and a complementary color to the intermediate color is determined. The subject histogram is converted at the position of the obtained intermediate color complementary color. Here, since the background image has a strong saturation of Blue and Green, the saturation is reflected on a person image as a subject with a boundary between complementary colors of intermediate colors of these saturations.

 図12のステップ1402では被写体の切り抜き処理を行なうが、切り抜いた後に背景色の抜け残りが発生し、背景色が残ってしまうことがある。背景色の抜け残りが発生するのは、(1)人物の輪郭付近(2)暗く影がおちているところに多い。これは被写体の輪郭付近には影が落ちやすいということ、被写体と背景色の境界線には違う色がでてしまうことが考えられる。影が落ちている部分だけを抜く色の範囲を指定しようとすると、色範囲の指定幅が大きくなり、背景色に酷似した服の色(背景が青の場合、紺色等)自体も抜けやすくなってしまう。また、境界線に異なる色、たとえば、青と黄色の境界線にはオレンジ色がでてしまう現象はカメラの光学的特性によるものであり、したがって、照明条件を調整するだけでは問題の解決にはいたらない。そのために、以下の手法を用いて補正を行なう。 で は In step 1402 of FIG. 12, the subject is cut out. However, after the cut-out, the background color may be left behind and the background color may remain. Background color missing often occurs in (1) the vicinity of the outline of a person, and (2) where the shadow is dark. This may be because a shadow is likely to fall near the contour of the subject, and a different color appears on the boundary between the subject and the background color. If you try to specify a color range that removes only the shaded areas, the color range becomes wider and the colors of the clothes that are very similar to the background color (dark blue, etc. when the background is blue) tend to fall out. Would. Also, the phenomenon that different colors appear on the border, for example, the orange color appears on the blue and yellow borders, is due to the optical characteristics of the camera, so adjusting the lighting conditions alone will not solve the problem. I don't care. For this purpose, correction is performed using the following method.

 次に、画像処理による輪郭の削り方を説明する。クロマキー合成を行なうときには、まず、2値のマスク画像を生成する。この生成時に2値画像に対するノイズ除去の手法である膨張・収縮をおこない、輪郭を数ピクセル膨張させてから輪郭を削る。まず、ノイズ除去の手法である膨張・収縮のアルゴリズムについて図19を用いて説明する。隣接する画素(8画素)に1画素でも白があれば、自分の位置に白に書き換えられるのが膨張、逆に1画素でも黒があれば、自分の位置も黒に置き換えられるのが縮小である。 Next, a method of shaving the contour by image processing will be described. When performing chroma key synthesis, first, a binary mask image is generated. At the time of this generation, expansion and contraction, which are techniques for removing noise from the binary image, are performed, and the outline is expanded by several pixels before the outline is cut. First, an algorithm for dilation / contraction, which is a technique for removing noise, will be described with reference to FIG. If even one pixel is white in the adjacent pixels (8 pixels), it is expanded to be rewritten to white at its own position. Conversely, if even one pixel is black, its position is also replaced by black. is there.

 図20は、もう一つの手法として、隣接する面積によるノイズ除去を示す図である。注目する画素の8近傍について自分と同じ属性(白、黒)の画素の個数を数え、同じ属性の画素がある一定個数以下(あらかじめ、閾値を設けておく)の場合に、その画素を反転させることで輪郭を膨張させる。この操作を画面全体に施すことによってノイズを除去する。図19の膨張・収縮のアルゴリズムを使用したノイズ除去と、図20の隣接する面積によるノイズ除去では処理時間の短いのは隣接する面積によるノイズ除去を使用した方法であるが、きれいにノイズを除去できるのは膨張・収縮のアルゴリズムを使用した方法である。また、隣接する面積によるノイズ除去では閾値となる数を大きくすると、連鎖的に画素が消えて行く現象が起こり、不自然な画像となってしまうことがある。これに対して、膨張・収縮のアルゴリズムを使用したノイズ除去では輪郭が丸くなる傾向がみられ、より輪郭が自然に見える。 FIG. 20 is a diagram showing noise removal by an adjacent area as another method. Count the number of pixels with the same attribute (white, black) as the own in eight neighborhoods of the pixel of interest, and invert the pixel if the pixel with the same attribute is a certain number or less (a threshold is set in advance). This expands the contour. By performing this operation on the entire screen, noise is removed. In the noise elimination using the dilation / shrinkage algorithm in FIG. 19 and the noise elimination in the adjacent area in FIG. 20, the processing time is short using the noise elimination in the adjacent area. Is a method using an expansion / contraction algorithm. In addition, if the number of thresholds is increased in noise removal based on adjacent areas, a phenomenon in which pixels disappear in a chain may occur, resulting in an unnatural image. On the other hand, in the noise removal using the expansion / contraction algorithm, the outline tends to be rounded, and the outline looks more natural.

 図21は、輪郭付近の背景を画像処理によって、輪郭を膨張させた上で輪郭を削り取ることで輪郭線の抜け残りをなくすことを示す図である。 FIG. 21 is a diagram showing that the background near the contour is image-processed, the contour is expanded, and then the contour is scraped off so that the contour line is eliminated.

 クロマキー合成を行う際、背景画像と人物画像との境界、つまり輪郭線が途中で切れたり、光学的ムラによりはっきりしなくなってしまい、うまく輪郭を抽出することができない場合がある。本発明では図19.20で示すように抽出しようとする人物画像の輪郭部分をトレースし、輪郭線の2値のマスク画像を生成し、1から4ピクセル分、膨張させることでマスク画像を大きくする。その後でその輪郭線上のマスク画像を削ることで、クロマキー合成時の背景の抜けをなくす。 When performing chroma key synthesis, the boundary between the background image and the human image, that is, the outline may be cut off in the middle or may not be clear due to optical unevenness, and the outline may not be extracted properly. In the present invention, as shown in FIG. 19.20, the outline of a person image to be extracted is traced, a binary mask image of the outline is generated, and the mask image is enlarged by 1 to 4 pixels to enlarge the mask image. I do. Thereafter, the mask image on the outline is cut off, thereby eliminating the omission of the background when the chroma key is synthesized.

 図22は輪郭ぼかしを示す図である。画像合成を行なう場合にレンズの収差で、光学的に色や輝度の差が被写体と背景色の境界線に違う色が起こしてしまう現象、いわゆるジャギーを起こすことがある。本発明では図21で示すように背景画像から人物画像を抽出するために輪郭線部分にマスク処理により、輪郭線を膨張させる。このときにこの輪郭線部分に図21で示すようにまず、輪郭線部分にマスク画像を生成し、生成したマスク画像を横方向、縦方向相互にスキャンし、信号の変化する位置、つまり、輪郭線の画像が読みこまれる位置にエッジ情報を書き込む。エッジとは、隣接する領域の濃度分布に顕著な差が生じている事が見えることを意味する。輪郭線上に5×5平滑フィルタをかけ、輪郭線に暈し効果を加える。5×5平滑フィルタとは図20で示されるようにある画素を中心値とし、その中心値の画素値を8近傍の画素の平均に置き換えるフィルタである。検出されるエッジは1ピクセル幅であり、そのエッジ上にのみ「ぼかし効果」を行っても効果は低いので前述の膨張処理を用いて、エッジを3ピクセルに膨張させ、このエッジに対して前述の平滑フィルタをかける。平滑フィルタをかけることによって、輪郭線がぼけることとなり、ジャギーをなくすことができる。 FIG. 22 is a diagram showing contour blurring. When performing image synthesis, a phenomenon in which a difference in color or luminance optically causes a different color to occur on a boundary line between a subject and a background color due to aberration of a lens, that is, so-called jagging may occur. In the present invention, as shown in FIG. 21, in order to extract a person image from a background image, the outline is expanded by masking the outline. At this time, as shown in FIG. 21, a mask image is first generated in the outline portion, and the generated mask image is scanned in the horizontal and vertical directions, and the position where the signal changes, that is, the outline is generated. Edge information is written at a position where a line image is read. An edge means that a noticeable difference occurs in the density distribution between adjacent areas. A 5 × 5 smoothing filter is applied to the contour to add a blurring effect to the contour. The 5 × 5 smoothing filter is a filter that, as shown in FIG. 20, sets a certain pixel as a center value and replaces the pixel value of the center value with the average of eight neighboring pixels. The detected edge is 1 pixel wide, and the effect is low even if the “blurring effect” is performed only on the edge. Therefore, the edge is expanded to 3 pixels using the expansion processing described above. Apply a smoothing filter. By applying the smoothing filter, the outline is blurred, and jaggies can be eliminated.

 次に背景画像の色合いを被写体の持つ色合いに影響、反映させる色調合わせについて説明する。背景画像の色合いが極端な緑色や、赤色、黄色等の色合いを持っている場合、その色合いの影響が被写体に及んでいたほうが自然に見える。では背景の色合いの影響を被写体の色合いにあわせるにはどうすべきか。これは背景画像のRGBのヒストグラムから自動的にその色合いのパラメータを抽出し、色調補正を行なうことにより背景の色合いの影響を被写体の色合いにあわせることができる。 Next, a description will be given of a color tone adjustment that affects and reflects the color tone of the background image on the color tone of the subject. When the color of the background image has an extreme color such as green, red, or yellow, it is more natural to see the effect of the color on the subject. So how do you match the effect of the background color to the color of the subject? In this method, the effect of the hue of the background can be adjusted to the hue of the subject by automatically extracting the parameters of the hue from the RGB histogram of the background image and correcting the hue.

 まず、背景画像における抽出したある色の図23のRGBヒストグラム(0〜255の256レベル)を作成する。縦軸はRGBそれぞれの色階調を示し、横軸は明るさの度合いを示し、値が上がるほど、明るくなる。次に、各ヒストグラムのレベル128以上の総度数をカウントし、その中心値を求める。次に各RGB値の変換関数を決定する。 First, an RGB histogram (256 levels from 0 to 255) of a certain color extracted from the background image in FIG. 23 is created. The vertical axis indicates the color gradation of each of RGB, and the horizontal axis indicates the degree of brightness. As the value increases, the brightness increases. Next, the total frequency of each histogram of level 128 or more is counted, and the center value is obtained. Next, a conversion function of each RGB value is determined.

 図24ではY=aXという一次変換を使用している。図24ではこの一次変換の係数aは変換に基準値となる変数Bをもたせ、レベル128以上でのヒストグラムの中心位置をpとすると、直線の傾きaは以下のような式になる。a=p/Bヒストグラムの中心値がBより上位の色(R,G,B)はヒストグラムが全体的に右へ移動する。また、傾きaには上限と下限を決定し、係数aのとりうる範囲を制限する。これは極端な色補正を行なわないようにするためである。極端に色補正してしまうと背景からの影響が被写体の色に大きく影響し、そのため合成結果が非常に不自然なものとなってしまうからである。 で は In FIG. 24, a primary conversion of Y = aX is used. In FIG. 24, assuming that the coefficient a of the primary conversion has a variable B as a reference value in the conversion and the center position of the histogram at level 128 or higher is p, the slope a of the straight line is expressed by the following equation. a = p / B For the colors (R, G, B) in which the center value of the histogram is higher than B, the histogram moves to the right as a whole. Also, an upper limit and a lower limit are determined for the slope a, and the range of the coefficient a is limited. This is to prevent extreme color correction. This is because if the color is corrected excessively, the influence from the background greatly affects the color of the subject, so that the synthesis result becomes very unnatural.

 次に、図25から図30を用いて本発明の画像合成装置の操作手順を説明する。図25はユーザによる撮影数、背景フレームなどの設定を決定する手順を示す図である。デモ画面ではユーザによるコインの投入待ち状態となっている(ステップ2501)。この時に音楽や装置自体が現在、利用されていないことを意味するメッセージを流していてもよい。ユーザによってコインが投入された場合、画面メッセージが変化し、投入されたコインが少ない場合には足りない金額がいくらであるか、補充金額を表示する(ステップ2502)。また、音声によって、不足金を指摘してもよい。所定のコインが投入された場合、撮影方法の選択画面が表示される(ステップ2503)。本発明では撮影を行なうとするユーザが複数、一人全身、一人半身なのかをいずれか一つを選択させる。次に背景となるバックの画面を表示する。ここでは具体的には図示しないが、背景はたとえば、海の中や、国内外の有名観光地、映画のワンシーンなどであり、左右のボタンを押すことでスクロールし、複数の画面から選択することができる(ステップ2504)。また、本発明による装置には、装置前面部にデジタルカメラI/Fを設けておき、ユーザ所有のデジタルカメラを接続し、自分で撮影した画像を背景とすることもできる。 Next, the operation procedure of the image synthesizing apparatus of the present invention will be described with reference to FIGS. FIG. 25 is a diagram showing a procedure for determining settings such as the number of shots and the background frame by the user. The demo screen is in a state of waiting for a user to insert a coin (step 2501). At this time, a message indicating that the music or the device itself is not currently used may be played. When coins are inserted by the user, the screen message changes, and when the number of inserted coins is small, the amount of the shortage is displayed, and the replenishment amount is displayed (step 2502). In addition, the shortage may be indicated by voice. When a predetermined coin is inserted, a screen for selecting a shooting method is displayed (step 2503). In the present invention, the user who wants to take a picture is asked to select any one of a plurality of persons, one body, one body and one and a half. Next, a background screen as a background is displayed. Although not specifically shown here, the background is, for example, the sea, a famous tourist spot in or outside the country, a scene of a movie, etc., and scrolls by pressing the left and right buttons to select from a plurality of screens. (Step 2504). In the apparatus according to the present invention, a digital camera I / F may be provided on the front side of the apparatus, a digital camera owned by a user may be connected, and an image photographed by the user may be used as a background.

 図26は撮影画面の変遷を示す図である。前述の図25の手順で撮影を行なおうとする背景画面を決定すると、撮影モードになる(ステップ2601)。次に現在、撮影をしようとしているユーザをCCDカメラ17によって表示装置画面に表示する(ステップ2601)。ここでは、図25のステップ2504でユーザによって選択された背景がすでに画面上に表示されており、ここでユーザは画面に表示された背景にあわせて、自分の立ち位置などを調整する。撮影は自動で3回撮影することになり、ユーザは撮影された結果でもっとも好むものを選択する(ステップ2603)。次に、選択した画面に対して、ユーザによって色の変更や落書きモード(レタッチ機能選択画面)に移行する(ステップ2604、2605)。ユーザの意図に応じて画面に対して何も修正しないで次の入力画面に移行してもよい。色の変更はカラー、セピア、白黒等ユーザの好みによって選択できる。また、落書きモードでは単に落書きするだけではなく、文字なども入力することもできる。 FIG. 26 is a diagram showing the transition of the shooting screen. When the background screen to be photographed is determined according to the procedure shown in FIG. 25, the photographing mode is set (step 2601). Next, the user who is currently taking a picture is displayed on the display device screen by the CCD camera 17 (step 2601). Here, the background selected by the user in step 2504 of FIG. 25 has already been displayed on the screen, and here the user adjusts his or her standing position according to the background displayed on the screen. The photographing is automatically performed three times, and the user selects the most preferable one of the photographed results (step 2603). Next, the user switches to the color change or graffiti mode (retouch function selection screen) for the selected screen (steps 2604 and 2605). The screen may be shifted to the next input screen without any modification to the screen according to the user's intention. The color change can be selected according to the user's preference such as color, sepia, black and white. In the graffiti mode, characters can be input as well as graffiti.

 図27は、出力サイズを選択する画面を示す図である。いくつかの異なるサイズをユーザが選択することができる(ステップ2701,2702)。なお、ポストカードや絵葉書等を出力する場合には、縦横の指定ができる選択画面が表示される。 FIG. 27 is a diagram showing a screen for selecting an output size. Several different sizes can be selected by the user (steps 2701, 2702). When a postcard, a postcard, or the like is output, a selection screen that allows the user to specify the vertical and horizontal directions is displayed.

 図28は、ユーザに関する個人情報の入力を示すフローチャートである。まず、名前とニックネームの入力を行なう(ステップ2801)。このフローチャートでの入力項目はすべて任意であり、入力したくない場合はキャンセルすることができる。次に年齢の入力を行い(2802)、電話番号を入力する。(ステップ2803)電話番号の入力の際に携帯電話、PHSなどの電話携帯の種別も選択する(ステップ2804)。入力した内容が正しいかどうかを確認させるため、入力した内容を再度表示する(ステップ2805)。なお、ここで入力させる年齢は蓄積された年齢データから、設置されている場所に応じた年齢による利用度を解析し、後々の背景やフレームパターンなどの開発資料となる。 FIG. 28 is a flowchart showing the input of personal information regarding the user. First, a name and a nickname are input (step 2801). All input items in this flowchart are arbitrary, and can be canceled if the user does not want to input. Next, an age is input (2802), and a telephone number is input. (Step 2803) When inputting a telephone number, the type of mobile phone such as a mobile phone or PHS is also selected (Step 2804). In order to confirm whether or not the input content is correct, the input content is displayed again (step 2805). The age to be input here is analyzed from the accumulated age data, based on the age-based usage according to the installed location, and becomes development data such as a background and a frame pattern later.

 図29は、雑誌への掲載承認を示すフローチャートである。まず、撮影した画像を雑誌に掲載させるかさせないかのユーザの希望を確認する(ステップ2901)。掲載させないを選択した場合にはそのまま、プリント中確認画面へ移行する。雑誌に掲載させることを希望した場合、図27と同じように個人情報を入力させる(ステップ2902)。この入力画面では雑誌等への投稿であるので本名は連絡の必要性があり、英数文字、漢字、平仮名、カナ文字のいずれかでの入力が要求される(ステップ2903)。名前の入力が終了したらニックネームを入力させる(ステップ2904、2905)。 FIG. 29 is a flowchart showing approval for publication in a magazine. First, the user confirms whether or not the photographed image is to be published in a magazine (step 2901). If the user selects not to publish, the screen shifts to the printing confirmation screen. If the user wants to be published in a magazine, he or she is required to input personal information in the same manner as in FIG. 27 (step 2902). On this input screen, the real name needs to be contacted because it is a post to a magazine or the like, and an input is required in any of alphanumeric characters, kanji, hiragana, and kana characters (step 2903). When the input of the name is completed, the nickname is input (steps 2904 and 2905).

 図30はアンケートの入力と掲載希望雑誌の選択を示すフローチャートである。まず、図29で入力させた雑誌への掲載承認を再度、確認させる(ステップ3001)。これは児童、学生などの未成年がユーザである場合があり、雑誌等の掲載は両親、学校の許可を要することを示唆している。次に、掲載予定の雑誌に記載されているアンケートの番号を知っているかどうかを確認し(ステップ3002)、知っている場合はそのアンケート結果を番号によって回答させる(ステップ3003)。次に、どの雑誌に掲載させたいか、その希望雑誌を入力させて(ステップ3004)プリント画面に移行する。 FIG. 30 is a flowchart showing the input of a questionnaire and the selection of a magazine desired to be published. First, the publication approval to the magazine input in FIG. 29 is confirmed again (step 3001). This suggests that minors such as children and students may be users, and that publication of magazines and the like requires permission from parents and school. Next, it is confirmed whether or not the questionnaire number described in the magazine to be published is known (step 3002). If the questionnaire number is known, the questionnaire result is answered by the number (step 3003). Next, the user inputs the desired magazine to which magazine the user wants to publish (step 3004) and shifts to the print screen.

 図31はプリント中の画面遷移を示すフローチャートである。プリントを行っている間は「プリント中」と表示を行なう(ステップ3101)。ここでは単にプリント中と表示するだけでなく、キャラクタやCM等を流していてもかまわない。合成された画像がポストカード、もしくはシールに印刷が完了すると、「プリント完成」が表示される(ステップ3102)。音声でユーザに確認させてもかまわない。次に、装置の使用を継続するかどうかを確認させる(ステップ3103)。ここでは、ある一定の期間を表示させる。たとえば、表示画面上にカウントダウンを表示し、終了する場合には終了確認をユーザに行なわせる。継続する場合にはカウントダウン中に追加の金額を投入させる。ここで、今まで撮影、合成した同じ画像をもう一度、プリントさせるのか、別途もう一度、新しく写真を撮り直すかどうか確認する(ステップ3104)。終了する場合にはユーザに対して、終了の表示を行い、プリントが出力されたことを確認させ、終了する(ステップ3105)。 FIG. 31 is a flowchart showing screen transition during printing. While printing is being performed, "printing" is displayed (step 3101). Here, it is not only displayed that printing is being performed, but a character, a CM, or the like may be flowing. When printing of the combined image is completed on a post card or a sticker, "print completed" is displayed (step 3102). The user may confirm by voice. Next, it is confirmed whether to continue using the device (step 3103). Here, a certain period is displayed. For example, a countdown is displayed on the display screen, and when ending, the user is asked to confirm the end. If you continue, you will be charged additional money during the countdown. Here, it is confirmed whether to print the same image which has been shot and synthesized up to now, or to take a new photo again (step 3104). If the printing is to be ended, the user is informed of the end, and the user is made to confirm that the print is output, and the processing is ended (step 3105).

 なお、上記実施形態においては、合成画像をプリント要旨に印刷して出力する例を挙げて説明したが、本発明はこれに限定されるものではない。例えば、学校の放送室や小規模の撮影スタディオなど、無影状態を作り出すスペースが確保できない環境において、合成画像を作成する場合にも適用することができる。 In the above embodiment, an example has been described in which the composite image is printed and output in the print gist, but the present invention is not limited to this. For example, the present invention can be applied to a case where a composite image is created in an environment where a space for creating a shadowless state cannot be secured, such as a broadcast room in a school or a small-scale shooting studio.

本発明の原理構成を示す筐体内部平面図である。FIG. 2 is a plan view of the inside of the housing showing the principle configuration of the present invention. 本発明による原理構成を示す筐体内部側面図である。FIG. 3 is a side view of the inside of a housing showing a principle configuration according to the present invention. 本発明による画像合成装置の位置実施形態を示す筐体内部側面図である。It is an inside side view of a case showing an embodiment of an image composition device by the present invention. 図3の画像構成装置の機能構成を示すブロック図である。FIG. 4 is a block diagram illustrating a functional configuration of the image configuration device of FIG. 3. 本発明における初期設定を示すフローチャートである。6 is a flowchart illustrating an initial setting according to the present invention. 本発明における画像処理手順の概要を示すフローチャートである。5 is a flowchart illustrating an outline of an image processing procedure according to the present invention. 実際に撮影した座標点と補正後の対応点を示す説明図である。FIG. 4 is an explanatory diagram showing actually photographed coordinate points and corresponding points after correction. 本発明において撮影した画像を補正した結果を示す説明図である。FIG. 9 is an explanatory diagram showing a result of correcting an image captured in the present invention. 本発明において補正を利用した座標の変換結果を示す説明図である。FIG. 9 is an explanatory diagram showing a result of coordinate conversion using correction in the present invention. 実際の座標変換の実例を示す説明図である。It is an explanatory view showing an example of actual coordinate conversion. 補正結果の一例を示す説明図である。FIG. 9 is an explanatory diagram illustrating an example of a correction result. 本発明における画像処理の詳細を示すフローチャートである。5 is a flowchart illustrating details of image processing according to the present invention. RGBによる色指定を示す説明図である。FIG. 9 is an explanatory diagram showing color designation by RGB. HSVによる色指定を示す概念図である。FIG. 3 is a conceptual diagram illustrating color designation by HSV. 背景と人物の輝度のヒストグラムを示す図である。It is a figure showing a histogram of the brightness of a background and a person. 輝度変換の遷移を示す説明図である。FIG. 9 is an explanatory diagram showing transition of luminance conversion. ヒストグラム関数を示す説明図である。FIG. 4 is an explanatory diagram showing a histogram function. 色調の調整を示す説明図である。It is explanatory drawing which shows adjustment of a color tone. 膨張アルゴリズムを示す説明図である。It is explanatory drawing which shows an expansion algorithm. 隣接するノイズ除去を示す説明図である。It is explanatory drawing which shows adjacent noise removal. 輪郭削り出しを示す説明図である。It is explanatory drawing which shows contour cutting. 輪郭ぼかしを示す説明図である。It is explanatory drawing which shows a contour blur. RGBのヒストグラムを示す図である。It is a figure showing a histogram of RGB. 色調変換関数を示す説明図である。FIG. 3 is an explanatory diagram showing a color tone conversion function. 本発明における画像合成装置の操作手順を示すフローチャートである。5 is a flowchart illustrating an operation procedure of the image composition device according to the present invention. 本発明における画像合成装置の操作手順を示すフローチャートである。5 is a flowchart illustrating an operation procedure of the image composition device according to the present invention. 本発明における画像合成装置の操作手順を示すフローチャートである。5 is a flowchart illustrating an operation procedure of the image composition device according to the present invention. 本発明における画像合成装置の操作手順を示すフローチャートである。5 is a flowchart illustrating an operation procedure of the image composition device according to the present invention. 本発明における画像合成装置の操作手順を示すフローチャートである。5 is a flowchart illustrating an operation procedure of the image composition device according to the present invention. 本発明における画像合成装置の操作手順を示すフローチャートである。5 is a flowchart illustrating an operation procedure of the image composition device according to the present invention. 本発明における画像合成装置の操作手順を示すフローチャートである。5 is a flowchart illustrating an operation procedure of the image composition device according to the present invention. 従来のスタディオ撮影での照明の当てかたを示す説明図である。It is explanatory drawing which shows the lighting method in the conventional studio photography. 従来の画像合成装置のブロック構成を示す図である。FIG. 10 is a diagram illustrating a block configuration of a conventional image synthesizing device.

符号の説明Explanation of reference numerals

  1  CPU
  2  メモリ、
  3  I/O制御部
  4  データ記憶部
  5  画像出力部
  6  画像処理部
  7  パターンメモリ
  8  画像入力部
  9  通信制御I/F
  10 デジタルカメラI/F
  11 インバータ
  12 センサ
  13 タッチパネル
  14 コイン制御部
  15 発光部/調光部
  17 CCDカメラ
  18 ビデオプリンタ
  19 表示装置
  20 補助記憶媒体
  21 モデム
  22 タイマ
  305、306 面発光表示板
1 CPU
2 memory,
3 I / O control unit 4 Data storage unit 5 Image output unit 6 Image processing unit 7 Pattern memory 8 Image input unit 9 Communication control I / F
10 Digital camera I / F
DESCRIPTION OF SYMBOLS 11 Inverter 12 Sensor 13 Touch panel 14 Coin control part 15 Light emission part / dimming part 17 CCD camera 18 Video printer 19 Display device 20 Auxiliary storage medium 21 Modem 22 Timer 305,306 Surface-emitting display board

Claims (4)

 特定色の背景光の照明状態で撮影した被写体画像から背景光部分を除いた被写体画像を切り出し、その切り出した被写体画像と予め選択した背景画像とを合成し、その合成画像を出力する画像合成方法において、
 前記被写体画像を切り出す際に、前記被写体画像の輪郭線を抽出した後、該輪郭線を所定画素数だけ膨張させたマスク画像を生成する第1のステップと、
 生成したマスク画像によって被写体画像の背景光部分を切り取る第2のステップと、
 背景光部分を切り取った被写体画像の輪郭線を所定画素数だけ収縮させて輪郭線を除去する第3のステップと
を備えることを特徴とする画像合成方法。
An image synthesizing method for cutting out a subject image excluding a background light portion from a subject image taken in a lighting state of a specific color background light, combining the cut out subject image with a previously selected background image, and outputting the synthesized image At
A first step of extracting a contour line of the subject image when extracting the subject image, and then generating a mask image obtained by expanding the contour line by a predetermined number of pixels;
A second step of cutting out a background light portion of the subject image by the generated mask image;
A third step of contracting the contour of the subject image from which the background light portion has been cut out by a predetermined number of pixels to remove the contour.
 輪郭線を除去した前記被写体画像の周縁画素に対し平滑フィルタリング処理を施す第4のステップをさらに備えることを特徴とする請求項1に記載の画像合成方法。 2. The image synthesizing method according to claim 1, further comprising a fourth step of performing a smooth filtering process on a peripheral pixel of the subject image from which the contour is removed.  特定色の背景光の照明状態で撮影した被写体画像から背景光部分を除いた被写体画像を切り出し、その切り出した被写体画像と予め選択した背景画像とを合成し、その合成画像を出力する画像合成装置において、
 前記被写体画像を切り出す際に、前記被写体画像の輪郭線を抽出した後、該輪郭線を所定画素数だけ膨張させたマスク画像を生成する第1の手段と、
 生成したマスク画像によって被写体画像の背景光部分を切り取る第2の手段と、
 背景光部分を切り取った被写体画像の輪郭線を所定画素数だけ収縮させて輪郭線を除去する第3の手段と
を備えることを特徴とする画像合成装置。
An image synthesizing apparatus that cuts out a subject image obtained by removing a background light portion from a subject image captured in a lighting state of a specific color background light, combines the cut subject image with a previously selected background image, and outputs the combined image. At
First means for extracting a contour of the subject image when extracting the subject image, and then generating a mask image obtained by expanding the contour by a predetermined number of pixels;
Second means for cutting out the background light portion of the subject image by the generated mask image;
An image synthesizing apparatus comprising: a third unit configured to shrink the outline of the subject image obtained by cutting out the background light portion by a predetermined number of pixels and remove the outline.
 輪郭線を除去した前記被写体画像の周縁画素に対し平滑フィルタリング処理を施す第4の手段をさらに備えることを特徴とする請求項3に記載の画像合成装置。 4. The image synthesizing apparatus according to claim 3, further comprising: fourth means for performing a smooth filtering process on a peripheral pixel of the subject image from which the contour line has been removed.
JP2003271371A 1998-08-31 2003-07-07 Method and device for composing image Pending JP2004005721A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003271371A JP2004005721A (en) 1998-08-31 2003-07-07 Method and device for composing image

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP24587998 1998-08-31
JP2003271371A JP2004005721A (en) 1998-08-31 2003-07-07 Method and device for composing image

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP22416999A Division JP3608715B2 (en) 1998-08-31 1999-08-06 Image composition apparatus and image composition method

Publications (1)

Publication Number Publication Date
JP2004005721A true JP2004005721A (en) 2004-01-08

Family

ID=30445470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003271371A Pending JP2004005721A (en) 1998-08-31 2003-07-07 Method and device for composing image

Country Status (1)

Country Link
JP (1) JP2004005721A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111210450A (en) * 2019-12-25 2020-05-29 北京东宇宏达科技有限公司 Method for processing infrared image for sea-sky background

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111210450A (en) * 2019-12-25 2020-05-29 北京东宇宏达科技有限公司 Method for processing infrared image for sea-sky background

Similar Documents

Publication Publication Date Title
JP3608715B2 (en) Image composition apparatus and image composition method
US6674485B2 (en) Apparatus and method for image compositing
US8123363B2 (en) Projector device, portable telephone and camera
JP3959433B2 (en) Photo sticker vending method and apparatus
US20200404132A1 (en) Background replacement system and methods
CN109005346A (en) Control method, device, electronic equipment and computer readable storage medium
JP2004007770A (en) Image compositing method, and its device
JP6614644B2 (en) Photo shooting game device, photo sticker creating device, photo shooting game device control method, and photo shooting game device control program
JP2006254214A (en) Automatic photographic equipment, photographing method, and image processing program
JP3499862B1 (en) Photo print providing apparatus and method, and program
JP2009083457A (en) Method and device for making photograph seal
JP2004005721A (en) Method and device for composing image
JP2004032803A (en) Image synthesizing apparatus
JPH11327012A (en) Photographic system
JP5870431B2 (en) Photography game machine and its control program
JP2006350621A (en) Image processor and image processing program
JPH1093859A (en) Image processing unit and image processing method
JP5854333B2 (en) Image output device
JP2015130589A (en) image editing apparatus, image editing method, and control program
JP2004193967A (en) Photoprint provider
JP2002010066A (en) Image reproducer
JP2004320077A (en) Photographic print providing apparatus and method, and print paper unit
JP2006003652A (en) Photograph printing apparatus
JP5776031B2 (en) Image processing apparatus, image processing method, and computer program
JP2006308708A (en) Automatic device for preparing photographic sticker

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080122

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080602