JP4943400B2 - Background replacement device and photographing system - Google Patents

Background replacement device and photographing system Download PDF

Info

Publication number
JP4943400B2
JP4943400B2 JP2008246699A JP2008246699A JP4943400B2 JP 4943400 B2 JP4943400 B2 JP 4943400B2 JP 2008246699 A JP2008246699 A JP 2008246699A JP 2008246699 A JP2008246699 A JP 2008246699A JP 4943400 B2 JP4943400 B2 JP 4943400B2
Authority
JP
Japan
Prior art keywords
background
subject
unit
captured image
pixel value
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
JP2008246699A
Other languages
Japanese (ja)
Other versions
JP2010081252A (en
Inventor
杭 傅
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2008246699A priority Critical patent/JP4943400B2/en
Publication of JP2010081252A publication Critical patent/JP2010081252A/en
Application granted granted Critical
Publication of JP4943400B2 publication Critical patent/JP4943400B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、被写体を撮影して撮影画像を取得し、その撮影画像中の背景を別の背景に置換して背景置換画像を作成する背景置換装置、および、この背景置換画像の作成に好適な撮影システムに関する。   The present invention captures a subject to acquire a captured image, replaces the background in the captured image with another background, and creates a background replacement image, and is suitable for creating this background replacement image. It relates to a photographing system.

従来、写真館等では、背景幕を使った撮影が行なわれていることが多い。しかし、このような撮影は、背景を確実に作り出すために大きな背景幕が使われ、広い撮影スペースを必要とする。また、背景幕の交換等には手間がかかり、結果的に撮影コストが高くなる。   Conventionally, in a photo studio or the like, photography using a background curtain is often performed. However, in such shooting, a large backdrop is used to reliably create a background, and a large shooting space is required. Also, the replacement of the background curtain takes time and results in an increase in shooting cost.

そこで、もっと手軽に撮影を楽しむことができるように、従来のような大きな背景幕や広い撮影スペースが不要な、小型で簡易の撮影システムの開発が望まれている。   Therefore, there is a demand for the development of a small and simple photographing system that does not require a large background screen and a wide photographing space as in the past so that photographing can be performed more easily.

このような小型の撮影システムでは、前記のような背景幕の代わりに、何らかの仮の背景の前で撮影が行なわれ、撮影で得られた撮影画像に対して、撮影画像中の背景を顧客が所望する背景に差替えるという背景置換処理が行われる。   In such a small photographing system, instead of the background curtain as described above, photographing is performed in front of some temporary background, and the background in the photographed image is set by the customer with respect to the photographed image obtained by photographing. Background replacement processing is performed in which the background is replaced with a desired background.

このような背景置換処理に関する技術の一例として、例えば、青色等に塗られた背景パネル等を被写体の背後に配置して撮影を行ない、その撮影で得られた撮影画像において、背景パネルの色と同色の部分と、異なる色の部分とを、それぞれ撮影画像中の背景と被写体として区別し、撮影画像中の背景に区別された部分を所望の背景に置換するクロマキー処理と呼ばれる処理が知られている。   As an example of the technology related to such background replacement processing, for example, a background panel painted in blue or the like is placed behind the subject to perform shooting, and in the captured image obtained by the shooting, the color of the background panel A process called chroma key processing is known in which the same color part and the different color part are distinguished from each other as the background and the subject in the photographed image, and the part distinguished from the background in the photographed image is replaced with a desired background. Yes.

このクロマキー処理では、撮影画像中の背景パネル上に被写体の影が写っていると、この影が、被写体と背景との区別を妨げてしまうことがある。そこで、クロマキー処理の対象となる撮影画像を撮影する際には、背景として、面発光する背景パネルを用いることで、背景パネル上の被写体の影を、この背景パネルが発する光で打ち消すという技術が提案されている(例えば、特許文献1参照。)
上記クロマキー処理を含めて、従来の背景置換処理では、被写体がきれいに写ることに主眼が置かれた撮影光条件の下で撮影された撮影画像が用いられて、その撮影画像中の被写体と背景との区別を行うことが多いが、そのような撮影光条件下で得られた撮影画像自体は、そもそも、被写体と背景との区別に適さない画像であることが多い。
特開2000−224410号公報(第3−10頁、図3)
In this chroma key process, if a shadow of a subject appears on the background panel in the captured image, this shadow may interfere with the distinction between the subject and the background. Therefore, when shooting a photographic image that is subject to chroma key processing, there is a technology that uses a background panel that emits light as a background to cancel the shadow of the subject on the background panel with the light emitted by the background panel. (For example, see Patent Document 1)
In the conventional background replacement process including the chroma key process described above, a photographed image taken under the photographing light condition that is focused on clearly showing the subject is used, and the subject and background in the photographed image are used. However, in many cases, the captured image itself obtained under such a photographing light condition is an image that is not suitable for distinguishing between the subject and the background.
JP 2000-224410 A (page 3-10, FIG. 3)

そのため、撮影画像中の被写体と背景とを良好に区別するために、被写体がきれいに写っている撮影画像を得たときの撮影光条件とは相違する撮影光条件下で同一の被写体が撮影された撮影画像を用いることが考えられ、それらの撮影光条件の相違は極端な方が望ましい。   Therefore, in order to distinguish the subject in the photographed image from the background, the same subject was photographed under a photographing light condition different from the photographing light condition obtained when the photographed image in which the subject was clearly captured was obtained. It is conceivable to use photographed images, and it is desirable that the difference in the photographing light conditions is extreme.

例えば、被写体の背面側から光を照らして被写体のシルエットを作ると被写体と背景との区別が容易である。しかしながら、種々の被写体でそのようなシルエットを確実に作るためには、被写体に光が写り込まないように回りを暗幕で囲むなどの配慮が必要となり、小型で簡易という流れに逆行することとなる。   For example, if a silhouette of a subject is created by illuminating light from the back side of the subject, it is easy to distinguish between the subject and the background. However, in order to reliably create such a silhouette with various subjects, it is necessary to consider surrounding the subject with a dark curtain so that light does not appear on the subject, which goes against the trend of being small and simple. .

そこで、撮影システムの小型化、簡易化に貢献できるように、より簡便な撮影条件下の撮影画像で、より確実に被写体と背景とを区別することができる技術が望まれている。   Therefore, there is a demand for a technique that can more reliably distinguish a subject and a background with a photographed image under simpler photographing conditions so as to contribute to downsizing and simplification of the photographing system.

本発明は、前記事情に鑑み、簡便な撮影条件下の撮影画像であっても確実に被写体と背景とを区別することができる背景置換装置、および、小型化、簡易化が容易な撮影システムを提供することを目的とする。   In view of the above circumstances, the present invention provides a background replacement device that can reliably distinguish a subject and a background even in a captured image under simple capturing conditions, and a capturing system that can be easily reduced in size and simplified. The purpose is to provide.

上記目的を達成する本発明の背景置換装置は、
撮像装置で被写体が撮影されて得られた撮影画像を、画素値の集合で画像を表現した形式で取得する撮影画像取得部と、
上記被写体に対する背景は上記撮影画像中で所定の一様さを有しているとの前提でこの背景の画素値を、この被写体に隠れた背後も含めて推定する背景推定部と、
上記撮影画像の各画素値から、上記背景推定部で推定された画素値を差し引く背景差し引き部と、
上記背景差し引き部による差し引き結果に基づいて、上記撮影装置で上記被写体と同じ被写体が撮影されて得られた撮影画像中の領域を、上記被写体が写っている被写体領域と、この被写体領域を除いた背景領域とに区別する領域区別部と、
上記領域区別部による領域の区別に基づいて、上記撮影画像中の背景を別の背景に置換する背景置換部とを備えたことを特徴とする。
The background replacement device of the present invention that achieves the above object is as follows.
A captured image acquisition unit that acquires a captured image obtained by capturing an image of a subject with an imaging device in a format that represents the image with a set of pixel values;
A background estimation unit that estimates a pixel value of the background including a background hidden behind the subject on the assumption that the background of the subject has a predetermined uniformity in the captured image;
A background subtraction unit that subtracts the pixel value estimated by the background estimation unit from each pixel value of the captured image;
Based on the result of subtraction by the background subtracting unit, a region in the captured image obtained by photographing the same subject as the subject is excluded from the subject region in which the subject is reflected and the subject region. An area discriminator for distinguishing from the background area;
And a background replacement unit that replaces the background in the captured image with another background based on the region discrimination by the region discrimination unit.

従来の技術では、背景と被写体とが極端に異なる色や明るさを有していることが前提となっている。そのため、被写体の一部に背景と紛らわしい色や明るさが存在すると区別の精度は低下する。しかし、本発明の背景置換装置では、被写体に隠れた背後も含めて推定し、推定画素値と被写体の画素値との差で被写体と背景とを区別しているので撮影画像上の被写体の画素値とその被写体に隠れた背後の推定画素値とに僅かでも差があれば、被写体の一部や背景の一部にやや紛らわしい部分が生じてしまうような簡便な撮影条件が用いられても被写体領域と背景領域とを区別できる。したがって、本発明の背景置換装置によれば、高精度に背景置換が行なえて、小型で簡易の撮影システムの実現に寄与することができる。尚、ここにいう「所定の一様」とは、一様な変化の他にも均一をも含む概念である。また、ここにいう「画素値」とは、画素毎に数値として付与された情報であれば、明るさでも色でも、その他のいわゆる特徴量でもよい。   In the conventional technique, it is assumed that the background and the subject have extremely different colors and brightness. For this reason, if there is a color or brightness that is confusing with the background in a part of the subject, the accuracy of the discrimination decreases. However, in the background replacement device of the present invention, the estimation is made including the back behind the subject, and the subject and the background are distinguished by the difference between the estimated pixel value and the subject pixel value. If there is a slight difference between the estimated pixel value hidden behind the subject and the subject, even if a simple shooting condition is used that causes a somewhat confusing part of the subject or part of the background, the subject area And the background area. Therefore, according to the background replacement device of the present invention, the background replacement can be performed with high accuracy, which can contribute to the realization of a small and simple photographing system. The term “predetermined uniformity” as used herein is a concept including uniformity as well as uniform change. Further, the “pixel value” herein may be brightness, color, or other so-called feature amount as long as it is information given as a numerical value for each pixel.

ここで、上記領域区別部が、上記背景差し引き部によって上記撮影画像の各画素値から上記背景の画素値が差し引かれて得られる差し引き画素値と所定の閾値との比較によって上記被写体領域と上記背景領域とを区別することが好ましい。   Here, the region discriminating unit compares the subtracted pixel value obtained by subtracting the background pixel value from each pixel value of the captured image by the background subtracting unit and a predetermined threshold value, and compares the subject region and the background. It is preferable to distinguish the region.

この様にすると、領域の区別を簡易に行うことができる。   In this way, it is possible to easily distinguish the areas.

また、本発明の背景置換装置が、上記撮影画像取得部で取得された撮影画像中で所定方向に延びる各ラインについて解析し、このライン上に被写体が存在するか否かを確認する被写体確認部を備え、
上記背景推定部が、上記被写体確認部で被写体の存在が確認されたラインについて、上記背景の画素値を、この被写体確認部で被写体の不存在が確認されたラインの画素値を用いて推定するものであることも好ましい態様である。
The background replacement device of the present invention analyzes each line extending in a predetermined direction in the captured image acquired by the captured image acquisition unit, and confirms whether or not the subject exists on the line. With
The background estimation unit estimates the pixel value of the background using the pixel value of the line where the absence of the subject is confirmed by the subject confirmation unit for the line where the presence of the subject is confirmed by the subject confirmation unit. It is also a preferable aspect that it is a thing.

この様にすると、一層高精度に背景を推定することができる。   In this way, the background can be estimated with higher accuracy.

また、上記背景推定部が、被写体を挟む両側の上記背景ラインに基づいてこの被写体の背景の画素値を推定するものであることが好ましい。   In addition, it is preferable that the background estimation unit estimates a pixel value of the background of the subject based on the background lines on both sides sandwiching the subject.

この様にすると、より一層高精度に背景を推定することができる。   In this way, the background can be estimated with higher accuracy.

ここで、上記背景推定部が、上記背景の明るさが上記撮影画像中で所定の一様さを有しているとの前提でこの背景の明るさを表す画素値を推定するものであることが好ましい。   Here, the background estimation unit estimates a pixel value representing the brightness of the background on the assumption that the brightness of the background has a predetermined uniformity in the captured image. Is preferred.

色より明るさの方が一様性が作り易いことから、この様にすると、被写体と背景との差も作りやすい。   This makes it easier to create the difference between the subject and the background because brightness is easier to create than color.

上記目的を達成する本発明の撮影システムは、
被写体を撮影し、画素値の集合で画像を表現した形式で撮影画像を得る撮影装置;
上記被写体を、この被写体を挟んで上記撮影装置とは反対側に位置する面からの、この面に沿って所定の一様さを有する光で照らす照明装置;および
上記撮影装置で得られた撮影画像を取得する撮影画像取得部と、
上記被写体に対する背景は上記撮影画像中で上記一様さを有しているとの前提でこの背景の画素値を、この被写体に隠れた背後も含めて推定する背景推定部と、
上記撮影画像の各画素値から、上記背景推定部で推定された画素値を差し引く背景差し引き部と、
上記背景差し引き部による差し引き結果に基づいて、上記撮影画像中の領域を、上記被写体が写っている被写体領域と、この被写体領域を除いた背景領域とに区別する領域区別部と、
上記領域区別部による領域の区別に基づいて、上記撮影装置で上記被写体と同じ被写体が撮影されて得られた撮影画像中の背景を別の背景に置換する背景置換部とを備えた背景置換装置;
を備えたことを特徴とする。
The photographing system of the present invention that achieves the above object provides:
An imaging device that captures a subject and obtains a captured image in a format that represents an image with a set of pixel values;
An illumination device that illuminates the subject with light having a predetermined uniformity along the surface from a surface on the opposite side of the photographing device across the subject; and photographing obtained by the photographing device A captured image acquisition unit for acquiring images;
A background estimation unit that estimates a pixel value of the background including the background hidden behind the subject on the assumption that the background of the subject has the uniformity in the captured image;
A background subtraction unit that subtracts the pixel value estimated by the background estimation unit from each pixel value of the captured image;
An area discriminating unit that discriminates an area in the captured image into a subject area in which the subject is captured and a background area excluding the subject area based on a subtraction result by the background subtraction unit;
A background replacement device comprising: a background replacement unit that replaces a background in a captured image obtained by photographing the same subject as the subject with the photographing device based on the region distinction by the region distinguishing unit. ;
It is provided with.

本発明の撮影システムによれば、小型化、簡易化が容易な撮影システムを提供することができる。   According to the imaging system of the present invention, it is possible to provide an imaging system that can be easily reduced in size and simplified.

ここで、上記照明装置が、上記面に沿った所定の第1方向について一様に変化し、この面に沿った、この第1方向に交わる所定の第2方向については均一の光で上記被写体を照らすものであり、
上記背景置換装置が、上記撮影画像取得部で取得された撮影画像中で上記第1方向に延びる各ラインについて解析し、このライン上に被写体が存在するか否かを確認する被写体確認部を備えたものであり、
上記背景置換装置の背景推定部が、上記被写体確認部で被写体の存在が確認されたラインについて、上記背景の画素値を、この被写体確認部で被写体の不存在が確認されたラインの画素値を用いて推定するものであることが好ましい。
Here, the illuminating device changes uniformly in a predetermined first direction along the surface, and the subject is irradiated with uniform light in a predetermined second direction along the surface that intersects the first direction. Illuminate
The background replacement device includes a subject confirmation unit that analyzes each line extending in the first direction in the captured image acquired by the captured image acquisition unit and confirms whether or not a subject exists on the line. And
The background estimation unit of the background replacement device uses the pixel value of the background for the line for which the presence of the subject has been confirmed by the subject confirmation unit, and the pixel value of the line for which the absence of the subject has been confirmed by the subject confirmation unit. It is preferable to use it for estimation.

この様にすると、より一層高精度な背景置換が行われる、小型化、簡易化が進んだ撮影システムを提供することができる。   In this way, it is possible to provide an imaging system that is further miniaturized and simplified, in which background replacement with higher accuracy is performed.

また、上記照明装置が、上記面に沿って明るさが所定の一様さを有する光で上記被写体を照らすものであり、
上記背景推定部が、上記背景の明るさが上記撮影画像中で上記一様さを有しているとの前提でこの背景の明るさを表す画素値を推定するものであってもよい。
Further, the illumination device illuminates the subject with light having a predetermined uniformity in brightness along the surface,
The background estimation unit may estimate a pixel value representing the brightness of the background on the assumption that the brightness of the background has the uniformity in the captured image.

本発明によれば、簡便な撮影条件下の撮影画像であっても確実に被写体と背景とを区別することができる背景置換装置、および、小型化、簡易化が容易な撮影システムを提供することができる。   According to the present invention, it is possible to provide a background replacement device that can reliably distinguish a subject and a background even in a photographed image under simple photographing conditions, and a photographing system that can be easily reduced in size and simplified. Can do.

以下、本発明の実施形態を説明する。   Embodiments of the present invention will be described below.

図1は、撮影システムを示す図である。   FIG. 1 is a diagram illustrating an imaging system.

この図1に示す撮影システム1は、被写体を撮影して撮影画像を取得する撮影セット10と、その撮影画像における被写体と背景とを区別して、撮影画像中の背景を所望の背景に置換して背景置換画像を作成するパーソナルコンピュータ20と、パーソナルコンピュータ20で作成された背景置換画像を出力するプリンタ30と、置換用の背景画像がストックされているサーバ40とを備えている。この撮影システム1が、本発明の撮影システムの一実施形態であり、パーソナルコンピュータ20が、本発明の背景置換装置の第1実施形態である。   The photographing system 1 shown in FIG. 1 distinguishes between a photographing set 10 for photographing a subject and obtaining a photographed image, and the subject and background in the photographed image, and replaces the background in the photographed image with a desired background. A personal computer 20 that creates a background replacement image, a printer 30 that outputs the background replacement image created by the personal computer 20, and a server 40 in which the replacement background image is stocked. The photographing system 1 is an embodiment of the photographing system of the present invention, and the personal computer 20 is a first embodiment of the background replacement device of the present invention.

撮影セット10は、デジタルカメラ11と、第1閃光発光装置12と、撮影台13とを備えており、撮影台13の内部には、第2閃光発光装置130が備えられている。   The photographing set 10 includes a digital camera 11, a first flash light emitting device 12, and a photographing stand 13, and a second flash light emitting device 130 is provided inside the photographing stand 13.

デジタルカメラ11は、連写機能を有しており、撮影者がシャッタボタンを1回押すと、短時間に自動で被写体Pを2回撮影する。1回毎の撮影によって得られた撮影画像は、デジタルカメラ11内のメモリに一時的に保管されるが、撮影システム1では、デジタルカメラ11がパーソナルコンピュータ20に接続されており、2回の撮影が終了した時点で、この2回の撮影で得られた撮影画像は、このパーソナルコンピュータ20に直ちに送られる。また、デジタルカメラ11は、撮影の際、第1閃光発光装置12および第2閃光発光装置に対して、閃光発光を指示する指示信号を個別に発信できるようになっており、上記2回の撮影のうち最初の撮影の際には第1閃光発光装置12に対してのみ上記指示信号が発信され、2回目撮影の際には第2閃光発光装置130に対してのみ上記指示信号が発信される。   The digital camera 11 has a continuous shooting function. When the photographer presses the shutter button once, the digital camera 11 automatically photographs the subject P twice in a short time. A photographed image obtained by each photographing is temporarily stored in a memory in the digital camera 11, but in the photographing system 1, the digital camera 11 is connected to the personal computer 20, and two photographings are performed. At the point of time, the photographed image obtained by the two photographings is immediately sent to the personal computer 20. Further, the digital camera 11 can individually transmit an instruction signal for instructing flash emission to the first flash light emitting device 12 and the second flash light emitting device at the time of shooting. In the first shooting, the instruction signal is transmitted only to the first flash light emitting device 12, and in the second shooting, the instruction signal is transmitted only to the second flash light emitting device 130. .

撮影台13は、被写体Pが載せられる、厚みの薄い乳白色のプラスティック板131と、このプラスティック板131を保持する筐体132、および、その筐体132内に内蔵された第2閃光発光装置130を備えている。尚、プラスティック板131上には被写体Pであるお椀が奥側にもう1つ並べられている。   The imaging stand 13 includes a milky white plastic plate 131 on which a subject P is placed, a casing 132 that holds the plastic plate 131, and a second flash light emitting device 130 that is built in the casing 132. I have. On the plastic plate 131, another bowl, which is the subject P, is arranged on the back side.

ここで、この撮影システム1の撮影セット10では、上述したように、1回目の撮影は第1閃光発光装置12のみが閃光を発した状態で行なわれ、2回目の撮影は第2閃光発光装置130のみが閃光を発した状態で行なわれる。その結果、1回目の撮影では、デジタルカメラ11側から被写体Pを照らすという順光状態での撮影により、被写体Pがきれいに写った撮影画像が得られる。また、この1回目の撮影に連続して行なわれる2回目の撮影では、第2閃光発光装置130からの閃光が、図1に示すように湾曲した乳白色のプラスティック板131の背面側から発光されることで、このプラスティック板131からは図1における奥行き方向および上下方向に均一な明るさの光が出射されるが、湾曲したプラスティック板131上の各箇所の向きとデジタルカメラ11の向きとの関係により、撮影画像上では、被写体はシャドウ側に偏るのに対し、背景は左右方向には均一で上下方向には下方に向かって一様に暗くなる。   Here, in the photographing set 10 of the photographing system 1, as described above, the first photographing is performed in a state where only the first flash light emitting device 12 emits a flash, and the second photographing is performed in the second flash light emitting device. Only 130 is performed with a flashing light. As a result, in the first photographing, a photographed image in which the subject P is clearly captured is obtained by photographing in a direct light state where the subject P is illuminated from the digital camera 11 side. Further, in the second shooting performed continuously after the first shooting, the flash light from the second flash light emitting device 130 is emitted from the back side of the curved milky white plastic plate 131 as shown in FIG. Thus, light having uniform brightness is emitted from the plastic plate 131 in the depth direction and the vertical direction in FIG. 1, but the relationship between the orientation of each portion on the curved plastic plate 131 and the orientation of the digital camera 11. Thus, on the captured image, the subject is biased toward the shadow side, whereas the background is uniform in the left-right direction and uniformly darker in the vertical direction downward.

パーソナルコンピュータ20では、デジタルカメラ11から送信されてきた上述の2つの撮影画像を基に背景置換画像が作成される。この背景置換画像の作成については後述する。   In the personal computer 20, a background replacement image is created based on the above-described two captured images transmitted from the digital camera 11. The creation of the background replacement image will be described later.

図2は、図1に示すパーソナルコンピュータの外観斜視図である。   FIG. 2 is an external perspective view of the personal computer shown in FIG.

図2に示すパーソナルコンピュータ20は、外観構成上、フレキシブルディスク(以降、FDと呼ぶ)やCD−ROMの装填口を有し、その装填口に装填されたFDやCD−ROMへのアクセス機能を有する本体装置210、その本体装置210からの指示に応じて表示画面220a上に画像を表示する画像表示装置220、本体装置210にキー操作に応じた各種の情報を入力するキーボード230、表示画面220a上の任意の位置を指定することにより、その位置に表示された、例えばアイコン等に応じた指示を入力するマウス240、および、デジタルカメラ等で撮影画像の記憶に用いられる小型記憶メディアが装填され、その小型記憶メディアをアクセスするメディアドライブ250を備えている。   The personal computer 20 shown in FIG. 2 has a loading port for a flexible disk (hereinafter referred to as FD) and a CD-ROM due to its external configuration, and has an access function to the FD and CD-ROM loaded in the loading port. Main body device 210, image display device 220 that displays an image on display screen 220a according to an instruction from main body device 210, keyboard 230 that inputs various information according to key operations to main body device 210, display screen 220a By designating an arbitrary position above, a mouse 240 for inputting an instruction corresponding to, for example, an icon or the like displayed at that position, and a small storage medium used for storing a photographed image by a digital camera or the like are loaded And a media drive 250 for accessing the small storage medium.

プリンタ30は、パーソナルコンピュータ20から送られてくる画像をプリントするものであり、撮影システム1では、パーソナルコンピュータ20によって作成された背景置換画像をプリントする役割を担っている。   The printer 30 prints an image sent from the personal computer 20, and the imaging system 1 plays a role of printing a background replacement image created by the personal computer 20.

図1に示すサーバ40には、パーソナルコンピュータ20で実行される背景置換における、置換背景となる複数の背景候補が格納されている。この背景候補は、表示画面220a上に表示されることによって提示される。また、この撮影システム1では、サーバ40内に格納されている背景以外にも、前記のCD−ROMや前記の小型記憶メディア等といった何らかの入力用記憶媒体を介して提供される背景も、表示画面220aを通じて提示される。   The server 40 shown in FIG. 1 stores a plurality of background candidates that become replacement backgrounds in the background replacement executed by the personal computer 20. This background candidate is presented by being displayed on the display screen 220a. In addition to the background stored in the server 40, the photographing system 1 also displays a background provided via some input storage medium such as the CD-ROM or the small storage medium. Presented through 220a.

次に、この図1に示す撮影システム1で実行される作業の流れについて説明する。尚、以下の説明では、図1に示す要素については特に図番を断らずに図1中の符号を使って参照する。   Next, the flow of work executed in the photographing system 1 shown in FIG. 1 will be described. In the following description, the elements shown in FIG. 1 are referred to by using the reference numerals in FIG.

図3は、図1の撮影システムで実行される作業の流れを示す図である。   FIG. 3 is a diagram showing a flow of work executed in the imaging system of FIG.

まず、撮影者が、プラスティック板131上に載せられた被写体Pに対するピントや露光の調節等を行なった後にデジタルカメラ11のシャッタボタンを押すと、被写体Pに対する撮影が2回連続して行なわれる。まず1回目の撮影では、デジタルカメラ11から発信される指示信号に応じて第1閃光発光装置12のみ閃光発光させて、被写体Pが撮影される(ステップS1)。続いて、2回目の撮影が、第2閃光発光装置130のみ閃光発光させて行なわれる(ステップS2)。   First, when the photographer presses the shutter button of the digital camera 11 after adjusting the focus or exposure of the subject P placed on the plastic plate 131, the subject P is photographed twice consecutively. First, in the first shooting, only the first flash light emitting device 12 is flashed in accordance with an instruction signal transmitted from the digital camera 11, and the subject P is shot (step S1). Subsequently, the second shooting is performed by flashing only the second flash light emitting device 130 (step S2).

これら2回の撮影それぞれで得られた2つの撮影画像は、デジタルカメラ11内のメモリに一時的に保管された後、パーソナルコンピュータ20に送信される。また、パーソナルコンピュータ20に対する操作により、顧客が所望する背景がサーバ40あるいは何らかの入力用記憶媒体から読み出される(ステップS3)。続いて、これら2つの撮影画像を基に背景置換画像を作成するという、詳しくは後述する背景置換処理が実行される(ステップS4)。そして、この背景置換処理で作成された背景置換画像を表わす画像データが、まず画像表示装置220に転送され、さらに、プリンタ30と、顧客が希望する出力用記憶媒体とのうちの少なくとも1つに転送される(ステップS5)。続いて、背景置換画像が表示画面220a上に表示される(ステップS6)。   The two captured images obtained by each of these two shootings are temporarily stored in the memory in the digital camera 11 and then transmitted to the personal computer 20. Further, the background desired by the customer is read from the server 40 or some input storage medium by an operation on the personal computer 20 (step S3). Subsequently, a background replacement process, which will be described in detail later, is executed to create a background replacement image based on these two captured images (step S4). The image data representing the background replacement image created by the background replacement processing is first transferred to the image display device 220, and further to at least one of the printer 30 and the output storage medium desired by the customer. Transferred (step S5). Subsequently, the background replacement image is displayed on the display screen 220a (step S6).

さらに、画像データがプリンタ30に転送された場合には、プリンタ30において、その画像データに基づいて背景置換画像がプリントされる(ステップS7)。   Further, when the image data is transferred to the printer 30, the background replacement image is printed based on the image data in the printer 30 (step S7).

以下では、これらの処理を実行するパーソナルコンピュータ20と、パーソナルコンピュータ20における背景置換処理の詳細について説明する。   Hereinafter, the details of the personal computer 20 that executes these processes and the background replacement process in the personal computer 20 will be described.

まず、このパーソナルコンピュータ20の内部構成について説明する。   First, the internal configuration of the personal computer 20 will be described.

図4は、図1に示すパーソナルコンピュータのハードウェア構成図である。   FIG. 4 is a hardware configuration diagram of the personal computer shown in FIG.

この図4に示すように、本体装置210の内部には、各種プログラムを実行するCPU211、各種プログラムやデータ等が保存されたハードディスク装置213、ハードディスク装置213に格納されたプログラムが読み出されCPU211での実行のために展開される主メモリ212、FD520が装填され、その装填されたFD520をアクセスするFDドライブ214、CD−ROM510をアクセスするCD−ROMドライブ215、図1のサーバ40やデジタルカメラ11と接続され、これらの機器から置換用の背景や撮影画像等を受け取る入力インタフェース216、および、図1のプリンタ30と接続され、背景置換画像等を出力する出力インタフェース217が内蔵されている。これらの各種要素と、さらに図1にも示す画像表示装置220、キーボード230、マウス240、および、小型記憶メディア530をアクセスするメディアドライブ250は、バス260を介して相互に接続されている。   As shown in FIG. 4, inside the main unit 210, a CPU 211 that executes various programs, a hard disk device 213 storing various programs and data, and a program stored in the hard disk device 213 are read out by the CPU 211. 1 is loaded with a main memory 212, an FD 520 that accesses the loaded FD 520, a CD-ROM drive 215 that accesses a CD-ROM 510, the server 40 and the digital camera 11 in FIG. And an input interface 216 that receives a replacement background, a captured image, and the like from these devices, and an output interface 217 that is connected to the printer 30 of FIG. 1 and outputs the background replacement image and the like. These various elements, and the image display device 220, the keyboard 230, the mouse 240, and the media drive 250 for accessing the small storage medium 530, which are also shown in FIG.

ここで、CD−ROM510には、パーソナルコンピュータ20を、本発明にいう背景置換装置の一例として動作させるための背景置換プログラムが記憶されている。そして、その背景置換プログラムが記憶されたCD−ROM510がCD−ROMドライブ215に装填されると、そのCD−ROM510に記憶された背景置換プログラムがこのパーソナルコンピュータ20にアップロードされてハードディスク装置213に書き込まれる。これにより、パーソナルコンピュータ20は背景置換装置として動作する。   Here, the CD-ROM 510 stores a background replacement program for operating the personal computer 20 as an example of the background replacement device according to the present invention. When the CD-ROM 510 storing the background replacement program is loaded into the CD-ROM drive 215, the background replacement program stored in the CD-ROM 510 is uploaded to the personal computer 20 and written to the hard disk device 213. It is. Thereby, the personal computer 20 operates as a background replacement device.

次に、この背景置換プログラムについて説明する。   Next, the background replacement program will be described.

図5は、CD−ROMの概念図である。   FIG. 5 is a conceptual diagram of a CD-ROM.

図5に示すCD−ROM510には、図1等に示すパーソナルコンピュータ20を、本発明にいう背景置換装置の一例として動作させるための背景置換プログラムが記憶されている。   A CD-ROM 510 shown in FIG. 5 stores a background replacement program for operating the personal computer 20 shown in FIG. 1 or the like as an example of the background replacement device according to the present invention.

図5に示すCD−ROM510には背景置換プログラム600が記憶されており、この背景置換プログラム600は、画像取得部610、置換処理部620、画像データ転送部630、および画像表示部640で構成されている。   A background replacement program 600 is stored in the CD-ROM 510 shown in FIG. 5, and this background replacement program 600 includes an image acquisition unit 610, a replacement processing unit 620, an image data transfer unit 630, and an image display unit 640. ing.

この背景置換プログラム600の各部の詳細については、本発明にいう背景置換装置の一例の各部の作用と併せて説明する。尚、以下の説明では、図1、図4、および図5に示す要素については特に図番を断らずに各図中の符号を使って参照する。   Details of each part of the background replacement program 600 will be described together with the operation of each part of an example of the background replacement apparatus according to the present invention. In the following description, the elements shown in FIG. 1, FIG. 4, and FIG.

図6は、パーソナルコンピュータが本発明にいう背景置換装置の一例として動作するときの機能を表わす機能ブロック図である。尚、図5に示す背景置換プログラムが図1等に示すパーソナルコンピュータにインストールされることで、パーソナルコンピュータは、本発明にいう背景置換装置の一例として動作する。   FIG. 6 is a functional block diagram showing functions when the personal computer operates as an example of the background replacement device according to the present invention. When the background replacement program shown in FIG. 5 is installed in the personal computer shown in FIG. 1 or the like, the personal computer operates as an example of the background replacement device according to the present invention.

図6には、図1にも示す、デジタルカメラ11、第1閃光発光装置12、および第2閃光発光装置130を備えた撮影セット10や、プリンタ30、サーバ40も示されている。   6 also shows the photographing set 10 including the digital camera 11, the first flash light emitting device 12, and the second flash light emitting device 130, the printer 30, and the server 40, which are also shown in FIG.

この図6に示す背景置換装置700では、上述したように、撮影セット10のデジタルカメラ11によって撮影された2つの撮影画像を取得し、これらの2つの撮影画像のうち、第2閃光発光装置130のみを閃光発光させて得られた撮影画像(以下、この撮影画像を逆光画像と称す。)に基づいて、第1閃光発光装置12のみを閃光発光させて得られた撮影画像(以下、この撮影画像を通常画像と称す。)を被写体領域と背景領域とに区別して、その背景領域を所望の背景に置換するという背景置換処理が実行され、この背景置換装置700には、画像取得部710、背景置換処理部720、画像データ転送部730、および画像表示部740が備えられている。   In the background replacement device 700 illustrated in FIG. 6, as described above, two captured images captured by the digital camera 11 of the capturing set 10 are acquired, and the second flash light emitting device 130 among these two captured images is acquired. Based on a photographed image obtained by flashing only the first flash light emitting device 12 (hereinafter, this photographed image is referred to as a backlight image), a photographed image obtained by flashing only the first flash light emitting device 12 (hereinafter, this photographed image). An image is referred to as a normal image.) A background replacement process is performed in which a subject area and a background area are distinguished and the background area is replaced with a desired background. The background replacement apparatus 700 includes an image acquisition unit 710, A background replacement processing unit 720, an image data transfer unit 730, and an image display unit 740 are provided.

画像取得部710では、まず、デジタルカメラ11で撮影され、そのデジタルカメラ11から送信される、2つの撮影画像を表すRGB値をそれぞれ受け取る。また、この画像取得部710では、顧客が所望する背景を、サーバ40から、あるいは、CD−ROMや小型記憶メディア等といった入力用記憶媒体540から読み出す。この画像取得部710は、実質的には、パーソナルコンピュータ20のCPU211が、背景置換プログラム600の画像取得部610に従って、入力インタフェース216、FDドライブ214、CD−ROMドライブ215、およびメディアドライブ250を制御することによって構成される。   The image acquisition unit 710 first receives RGB values representing two captured images that are captured by the digital camera 11 and transmitted from the digital camera 11. The image acquisition unit 710 reads a background desired by the customer from the server 40 or from an input storage medium 540 such as a CD-ROM or a small storage medium. In this image acquisition unit 710, the CPU 211 of the personal computer 20 substantially controls the input interface 216, the FD drive 214, the CD-ROM drive 215, and the media drive 250 in accordance with the image acquisition unit 610 of the background replacement program 600. It is composed by doing.

背景置換処理部720では、画像取得部710により取得された2つの撮影画像(逆光画像および通常画像)に基づいて背景置換画像が作成される。背景置換処理部720は、実質的には、パーソナルコンピュータ20のCPU211が、背景置換プログラム600の置換処理部630に従って動作することによって構成される。   The background replacement processing unit 720 creates a background replacement image based on the two captured images (backlight image and normal image) acquired by the image acquisition unit 710. The background replacement processing unit 720 is substantially configured by the CPU 211 of the personal computer 20 operating according to the replacement processing unit 630 of the background replacement program 600.

画像データ転送部730では、背景置換処理部720で作成された背景置換画像を表わす画像データを、プリンタ30および顧客が希望する出力用記憶媒体550のうちの少なくとも一方と、この背景置換装置700の画像表示部740とに転送する。この画像データ転送部730は、実質的には、パーソナルコンピュータ20のCPU211が、背景置換プログラム600の画像データ転送部630に従って、出力インタフェース217、FDドライブ214、CD−ROMドライブ215、およびメディアドライブ250を制御することによって構成される。   In the image data transfer unit 730, image data representing the background replacement image created by the background replacement processing unit 720 is sent to at least one of the printer 30 and the output storage medium 550 desired by the customer, and the background replacement device 700. The image is transferred to the image display unit 740. In the image data transfer unit 730, the CPU 211 of the personal computer 20 is substantially controlled by the output interface 217, the FD drive 214, the CD-ROM drive 215, and the media drive 250 in accordance with the image data transfer unit 630 of the background replacement program 600. It is configured by controlling.

画像表示部740では、画像データ転送部730から転送されてくる画像データが表す背景置換画像を表示画面220aに表示し、画像表示部740は、実質的には、パーソナルコンピュータ20のCPU211が、背景置換プログラム600の画像表示部640に従って画像表示装置220を制御することによって構成される。   In the image display unit 740, the background replacement image represented by the image data transferred from the image data transfer unit 730 is displayed on the display screen 220a. The image display unit 740 is substantially configured such that the CPU 211 of the personal computer 20 It is configured by controlling the image display device 220 according to the image display unit 640 of the replacement program 600.

また、前記の画像データ転送部730からプリンタ30に背景置換画像を表わす画像データが出力された場合には、プリンタ30では、この画像データに基づく背景置換画像がプリントされ、前記の画像データ転送部730から、何らかの出力用記憶媒体550に背景置換画像を表わす画像データが出力された場合には、この画像データがその出力用記憶媒体550に書き込まれる。そして、背景置換画像がプリントされたプリント紙と、背景置換画像を表わす画像データが書き込まれた出力用記憶媒体550との両方、あるいは一方が、顧客の希望に応じて提供される。   When image data representing a background replacement image is output from the image data transfer unit 730 to the printer 30, the printer 30 prints a background replacement image based on the image data, and the image data transfer unit When image data representing a background replacement image is output from 730 to any output storage medium 550, the image data is written to the output storage medium 550. Then, both or one of the print paper on which the background replacement image is printed and the output storage medium 550 on which the image data representing the background replacement image is written is provided according to the customer's request.

次に、背景置換処理部720の詳細について説明する。   Next, details of the background replacement processing unit 720 will be described.

図7は、図6に1つのブロックで示される背景置換処理部の詳細を示す図である。   FIG. 7 is a diagram showing details of the background replacement processing unit shown by one block in FIG.

図7に示される背景置換処理部720は、背景推定部721、差し引き部722、調整部725、2値化部723、および背景置換作成部724を備えている。尚、以下では、画像取得部710が取得した、2つの撮影画像のRGB値群のうち、第1閃光発光装置12のみを利用して撮影された撮影画像(通常画像)を表すRGB値群を第1RGB値群と称し、第2閃光発光装置130のみを利用して撮影された撮影画像(逆光画像)を表すRGB値群を第2RGB値群と称す。また、顧客が所望した背景のRGB値を背景RGB値群と称す。尚、図7中に示される第3RGB値群については後述する。   The background replacement processing unit 720 illustrated in FIG. 7 includes a background estimation unit 721, a subtraction unit 722, an adjustment unit 725, a binarization unit 723, and a background replacement creation unit 724. Hereinafter, among the RGB value groups of the two captured images acquired by the image acquisition unit 710, an RGB value group representing a captured image (normal image) captured using only the first flash light emitting device 12 is used. The RGB value group representing the captured image (backlight image) captured using only the second flash light emitting device 130 is referred to as a first RGB value group. The background RGB values desired by the customer are referred to as a background RGB value group. The third RGB value group shown in FIG. 7 will be described later.

ここで、図8は、図7に示される各部で生成される画像を観念的に示す図である。   Here, FIG. 8 is a diagram conceptually showing an image generated by each unit shown in FIG.

図8(a)には、第2RGB値群によって表される画像(逆光画像)が示されており、ここには、上から下にかけて一様なグラデーションを有する背景と、この背景の上部よりもシャドウ側に寄った被写体とが示されている。図8(b)には、図7中に示される背景推定部721において、第2RGB値群に基づいて被写体の背後については背景推定がされて作成された第3RGB値群が表す背景画像が示されている。図8(c)には、差し引き部722において、第2RGB値群から第3RGB値群の各値が差し引かれた結果のRGB値群で表された画像が示されており、ここには、ベタ黒の背景に被写体Pがうっすら浮かび上がっている様子が示されている。図8(d)には、差し引かれた結果のRGB値群が調整部725での調整を終え、その後、2値化部723において2値化処理された、その処理済みのRGB値群が表す画像が示されている。   FIG. 8 (a) shows an image (backlight image) represented by the second RGB value group, which includes a background having a uniform gradation from the top to the bottom and an upper portion of the background. A subject close to the shadow side is shown. FIG. 8B shows a background image represented by the third RGB value group created by estimating the background behind the subject based on the second RGB value group in the background estimation unit 721 shown in FIG. Has been. FIG. 8C shows an image represented by the RGB value group as a result of subtracting each value of the third RGB value group from the second RGB value group in the subtracting unit 722. A state in which the subject P slightly appears on the black background is shown. FIG. 8D shows the processed RGB value group that has been subjected to binarization processing by the binarization unit 723 after the RGB value group resulting from the subtraction has been adjusted by the adjustment unit 725. An image is shown.

以下では、図7に示される各部の動作について、図8〜図10を参照しながらさらに詳細に説明する。   Hereinafter, the operation of each unit illustrated in FIG. 7 will be described in more detail with reference to FIGS.

まず、図7に示される背景推定部721には、図8(a)に示される撮影画像を表す第2RGB値群が入力され、この第2RGB値群に基づいて、図8(a)に示される逆光の撮影画像から、被写体Pに隠れた背後の領域のRGB値の推定が行われる。   First, the second RGB value group representing the captured image shown in FIG. 8A is input to the background estimation unit 721 shown in FIG. 7, and the second RGB value group shown in FIG. The RGB values of the area behind the subject P are estimated from the backlit captured image.

図9は、被写体に隠れた背後の領域のRGB値の推定の手法を概念的に示す図である。尚、図9に示されている画像は、明暗の図示が省略されているが、図8(a)と同じ図であるとして話を進める。   FIG. 9 is a diagram conceptually showing a method of estimating the RGB value of the region behind the subject. The image shown in FIG. 9 is omitted from the illustration of brightness and darkness, but the description will be made assuming that the image is the same as FIG.

背景推定部721では、入力されてきた第2RGB値群から、まず、図9に示される画像の左側の1列目の上端に位置する画素から下端に位置する画素までの各画素における輝度を順に読み出しつつ、これ以降に輝度を読み出す画素の輝度推定を外挿法により行い、推定した輝度(以下、この推定した輝度を推定輝度と称す。)と、実際に読み出した輝度(以下、この読み出した輝度を読出輝度と称す。)との間に所定値以上のズレがあるか否かを判定し、これら輝度の読み出し、輝度の推定、および判定を、図9に示す撮影画像の左端から右端に架けて行う。その結果、読出輝度と推定輝度との差が全て所定値未満の画素からなる列は、背景領域のみを通過する列として認識される。一方、列の中に、読出輝度と推定輝度との差が所定値以上である画素が存在する列は被写体領域を通過する列として認識され、その列上の、被写体領域に属する画素の輝度は、被写体領域を通過する列の直前の、背景領域に通過する列の対応する画素の読出輝度に置き換えられる。この様にして被写体Pの背後の領域の輝度が推定により決定される。尚、被写体Pの背後の領域の輝度の推定において、輝度の読み出しを撮影画像の上端から開始するのは、この撮影セット10において撮影される撮影画像の背景は前述したように上方が明るく下方に行くほど暗くなっており、背景領域に、例えば、背景の周縁が黒枠として写っている場合でも、所定の閾値を下回る暗い部分は除外しつつ所定の閾値以上の明るさが読み取れた画素を背景領域の始まりの画素とすることができるからである。また、この背景推定部721は、本発明にいう背景推定部の一例と、被写体確認部の一例とを併せたものに相当する。   In the background estimation unit 721, first, the luminance in each pixel from the pixel located at the upper end of the first column on the left side of the image shown in FIG. The luminance of the pixels from which the luminance is read out after this is read out by extrapolation, and the estimated luminance (hereinafter, this estimated luminance is referred to as estimated luminance) and the actually read luminance (hereinafter, this read out luminance) The luminance is referred to as “read luminance”.) Is determined whether there is a deviation of a predetermined value or more, and the luminance reading, luminance estimation, and determination are performed from the left end to the right end of the photographed image shown in FIG. Do it. As a result, a column composed of pixels in which the difference between the read luminance and the estimated luminance is all less than a predetermined value is recognized as a column that passes only through the background area. On the other hand, a column in which a pixel in which the difference between the read luminance and the estimated luminance is greater than or equal to a predetermined value is recognized as a column that passes through the subject region, and the luminance of the pixel belonging to the subject region on the column is The read luminance of the corresponding pixel in the column passing through the background region immediately before the column passing through the subject region is replaced. In this way, the luminance of the area behind the subject P is determined by estimation. In the estimation of the luminance of the area behind the subject P, the luminance reading starts from the upper end of the photographed image because the background of the photographed image photographed in the photographing set 10 is bright upward and downward as described above. For example, even when the background edge is shown as a black frame in the background area, pixels whose brightness is equal to or higher than the predetermined threshold are excluded while excluding dark portions below the predetermined threshold. This is because it can be the pixel at the beginning of the. The background estimation unit 721 corresponds to a combination of an example of the background estimation unit according to the present invention and an example of a subject confirmation unit.

図10は、撮影画像上の上下方向の位置と読出輝度との関係を示す図である。   FIG. 10 is a diagram illustrating the relationship between the vertical position on the captured image and the read luminance.

図10(a)には、横軸に図9に示す逆光撮影の画像上の上下方向の位置、縦軸に輝度(0〜255)をとった場合の、この画像の背景領域に属する列の上下位置と読出輝度との関係が示されており、ここには、列の上端では、255に近い‘明’側の読出輝度が、列の下端に近づくにつれて0に近い‘暗’側へなだらかに変化していく様子が示されている。また、図9に示される、背景領域を通過する列のうち代表的な列A、B、C、E、F、およびGにおける上下位置と読出輝度との関係がほぼ同じであることで、図10(a)には、プロットがほぼ同じ位置に重ねて行われている様子が示されている。このことは、つまり、図9に示される撮影画像の背景が左右方向に均一であることを表している。   FIG. 10A shows a column belonging to the background region of this image when the horizontal axis indicates the vertical position on the backlight image shown in FIG. 9 and the vertical axis indicates the luminance (0 to 255). The relationship between the vertical position and the readout brightness is shown. Here, the readout brightness on the “bright” side close to 255 at the top of the column gently decreases toward the “dark” side near 0 toward the bottom of the column. It shows how it changes. Further, the relationship between the vertical position and the readout luminance in the representative columns A, B, C, E, F, and G among the columns passing through the background area shown in FIG. 10 (a) shows a state in which the plots are overlaid at substantially the same position. This means that the background of the captured image shown in FIG. 9 is uniform in the left-right direction.

図10(b)には、被写体領域を通過する列の中から代表的に抽出した列Dについて得られた、列Dにおける上下位置と読出輝度との関係が示されている。この列Dについては、位置a手前までの画素は背景領域に属しているものの、位置aから位置bまでの間の画素が被写体領域に属していることで外挿法による推定輝度と読出輝度とのズレが所定値以上となる。このため、この範囲内の読出輝度が、背景領域のみを通過する列のうち最も近い列である列Cの対応する範囲の読出輝度に置き換えられる。図10(b)には、読出輝度の置き換えが行われた範囲が点線で示されている。以上説明したようにして、背景推定部721では、被写体Pに隠れた背後の画素の輝度推定を行った上で、背景全体のRGB値群である第3RGB値群を作成する。図7に示す差し引き部722では、第2RGB値群から第3RGB値群が差し引かれる。   FIG. 10B shows the relationship between the vertical position in the column D and the readout luminance obtained for the column D typically extracted from the column passing through the subject area. For this column D, the pixels before position a belong to the background area, but the pixels between position a and position b belong to the subject area. Is greater than or equal to a predetermined value. For this reason, the read luminance within this range is replaced with the read luminance in the corresponding range of column C, which is the closest column among columns passing only the background region. In FIG. 10B, the range in which the read luminance is replaced is indicated by a dotted line. As described above, the background estimation unit 721 creates the third RGB value group that is the RGB value group of the entire background after estimating the luminance of the pixels behind the subject P. In the subtraction unit 722 shown in FIG. 7, the third RGB value group is subtracted from the second RGB value group.

従来の背景置換技術では、背景と被写体とが極端に異なる色や明るさを有していることが背景置換処理を高精度に行うための要件となっている。そのため、被写体と背景との境目の色や明るさに明らかな差がないと、背景と被写体との区別の精度は低下する。しかし、この背景置換処理部720では、被写体を逆光で撮影して得られた第2RGB値群から、被写体Pに隠れた背後については推定を用いた背景画像を表す第3RGB値群を差し引くことで得られた差分により被写体領域と背景領域とを区別する。つまり、背景置換処理部720によれば、被写体と背景との境目の色や明るさに明らかな差がなくても、被写体領域のRGB値群と、その被写体領域に隠れた背後の領域について推定されたRGB値群とに僅かでも差があれば被写体領域と背景領域とを区別することができる。   In the conventional background replacement technique, it is a requirement for the background replacement processing to be performed with high accuracy that the background and the subject have extremely different colors and brightness. Therefore, if there is no obvious difference in the color or brightness at the boundary between the subject and the background, the accuracy of distinguishing between the background and the subject is lowered. However, the background replacement processing unit 720 subtracts the third RGB value group representing the background image using the estimation behind the subject P from the second RGB value group obtained by photographing the subject with the backlight. The subject area and the background area are distinguished based on the obtained difference. That is, according to the background replacement processing unit 720, even if there is no clear difference in the color or brightness of the boundary between the subject and the background, the RGB value group of the subject region and the background region hidden behind the subject region are estimated. The subject area and the background area can be distinguished if there is a slight difference from the RGB value group.

図7に示す調整部725では、第2RGB値群から第3RGB値群が差し引かれた後のRGB値群に対する、オペレータによる調整が可能となっている。   In the adjustment unit 725 shown in FIG. 7, the operator can adjust the RGB value group after the third RGB value group is subtracted from the second RGB value group.

ここで、図11は、コンピュータの画像表示装置の画面表示を示す図である。   Here, FIG. 11 is a diagram showing a screen display of the image display device of the computer.

本発明の背景置換装置の第1実施形態であるコンピュータ20では、第2RGB値群から第3RGB値群が差し引かれた後のRGB値群に対し、光の写り込み等によるノイズ成分の除去をオペレータが調整部725を介して手動で行えるようになっており、図11(a)には、この手動による調整が行われる際の画面表示が示されている。   In the computer 20 which is the first embodiment of the background replacement device of the present invention, the operator removes noise components by reflection of light on the RGB value group after the third RGB value group is subtracted from the second RGB value group. Can be manually performed via the adjustment unit 725, and FIG. 11A shows a screen display when this manual adjustment is performed.

図11(a)には、第2RGB値群から第3RGB値群が差し引かれた後のRGB値群が表す画像が表示された画面220aが示されており、この画面220aには、入力欄221a、‘実行’ボタン222a、および‘OK’ボタン223aも表示されている。   FIG. 11A shows a screen 220a on which an image represented by the RGB value group after the third RGB value group is subtracted from the second RGB value group is displayed. The screen 220a includes an input field 221a. , An “execute” button 222a and an “OK” button 223a are also displayed.

図11(a)に示される入力欄221aには、ノイズ成分除去のための閾値が入力される。例えば、この入力欄221aに値‘10’が入力され、‘実行’ボタン222aが操作されると、まず、周囲とRGB値が異なる孤立した画素群の検出が行われ、検出した画素群の中で群を構成する画素数が、入力欄221aで指定されている値(ここに示す例では‘10’)以下の画素群については、ノイズ成分によるものとし、その画素群のRGB値はその周囲の画素のRGB値と同じRGB値に置き換えられる。このように、このコンピュータ20では、第2RGB値群から第3RGB値群が差し引かれた後のRGB値群に対するノイズ成分の除去の判断基準となる画素数のオペレータによる変更が可能となっている。図11(a)に示される‘OK’ボタン223aは、ノイズ成分が除去されたRGB値群を2値化部723(図7参照)に送る際に操作されるボタンである。   In the input field 221a shown in FIG. 11A, a threshold value for noise component removal is input. For example, when the value “10” is input to the input field 221a and the “execute” button 222a is operated, first, an isolated pixel group having a different RGB value from that of the surrounding area is detected. In the pixel group in which the number of pixels constituting the group is equal to or less than the value specified in the input field 221a ('10' in the example shown here), the pixel group is assumed to be a noise component, and the RGB value of the pixel group is the surrounding area. It is replaced with the same RGB value as the RGB value of this pixel. As described above, in the computer 20, the operator can change the number of pixels serving as a criterion for removing noise components from the RGB value group after the third RGB value group is subtracted from the second RGB value group. The “OK” button 223a shown in FIG. 11A is a button operated when sending the RGB value group from which the noise component is removed to the binarization unit 723 (see FIG. 7).

その後、画面220aには、図11(b)に示すように、調整部725でノイズ成分が除去されたRGB値群に対して、2値化部723における2値化処理が施されたRGB値群により表される画像が表示される。   Thereafter, on the screen 220a, as shown in FIG. 11B, RGB values obtained by performing binarization processing in the binarization unit 723 on the RGB value group from which the noise component is removed by the adjustment unit 725 are displayed. An image represented by the group is displayed.

2値化部723では、調整部725から送られてきた、ノイズ成分が除去されたRGB値群から輝度を読み出し、閾値A未満の輝度については輝度を‘0’とし、閾値A以上の輝度については輝度を‘255’としている。この閾値としては、デフォルトで、ノイズ成分が除去されたRGB値群から読み出された輝度の出現頻度の分布における最大輝度と最小輝度の中間値が設定されるようになっている。   The binarization unit 723 reads the luminance from the RGB value group sent from the adjustment unit 725 and from which the noise component has been removed. The luminance less than the threshold A is set to “0”, and the luminance greater than the threshold A is obtained. Has a luminance of '255'. As this threshold value, an intermediate value between the maximum luminance and the minimum luminance in the distribution of the appearance frequency of luminance read from the RGB value group from which the noise component has been removed is set by default.

ここで、このコンピュータ20では、調整部725でのノイズ成分の除去処理がなされた後のRGB値群に対する2値化処理についての調整を、オペレータが調整部725を介して手動で行えるようになっており、図11(b)には、この手動による調整が行われる際の画面表示が示されている。   Here, in the computer 20, the operator can manually adjust the binarization processing for the RGB value group after the noise component removal processing is performed by the adjustment unit 725 via the adjustment unit 725. FIG. 11B shows a screen display when this manual adjustment is performed.

図11(b)に示される‘ヒストグラム’ボタン224aは、調整部725から送られてきたRGB値群の輝度を出現頻度の分布で表す際に操作されるボタンである。   A 'histogram' button 224a shown in FIG. 11B is a button operated when the luminance of the RGB value group sent from the adjustment unit 725 is represented by the appearance frequency distribution.

図11(c)には、‘ヒストグラム’ボタン224aが操作されたことによる画面表示が示されている。ここには、調整部725から送られてきたRGB値群から読み出された輝度の出現頻度の分布が示されており、ノイズ成分が除去されたRGB値群の輝度の分布における最大輝度である‘2A’と最小輝度である値‘0’の中間値である‘A’が現在の閾値となっている様子が図中の直線Sで示されている。オペレータは、マウス240を使用してこの直線Sをつまみながら左右に移動することで閾値を変更できるようになっている。図11(b)に示される‘実行’ボタン222aは、オペレータが新たに設定した閾値を基準として2値化処理を行う際に操作される。また、図11(b)に示される‘OK’ボタン223aは、2値化処理がなされたRGB値群を背景置換画像作製部724に送る際に操作されるボタンである。図11(c)に示される‘決定’ボタン225aは、マウス240を使用して直線Sを移動させた後、それを閾値として設定するために操作されるボタンである。‘戻る’ボタン226aは、図11(c)に示される画面表示から図11(b)に示される画面表示に戻る際に操作されるボタンである。   FIG. 11C shows a screen display when the 'histogram' button 224a is operated. Here, the distribution of the appearance frequency of the luminance read from the RGB value group sent from the adjustment unit 725 is shown, and is the maximum luminance in the luminance distribution of the RGB value group from which the noise component has been removed. A straight line S in the figure shows that “A” which is an intermediate value between “2A” and the value “0” which is the minimum luminance is the current threshold value. The operator can change the threshold value by moving left and right using the mouse 240 while pinching the straight line S. The “execute” button 222a shown in FIG. 11B is operated when the binarization process is performed based on a threshold value newly set by the operator. Also, an “OK” button 223 a shown in FIG. 11B is a button operated when sending the binarized RGB value group to the background replacement image creating unit 724. A “decision” button 225a shown in FIG. 11C is a button operated to move the straight line S using the mouse 240 and set it as a threshold value. The 'return' button 226a is a button operated when returning from the screen display shown in FIG. 11C to the screen display shown in FIG. 11B.

2値化部723により2値化処理されたRGB値群の輝度については、設定された閾値に基づいて、閾値未満の輝度は‘0’とされ、閾値以上の輝度は‘255’とされて、画像上ではそれぞれ‘ベタ黒’と‘白’とで表される。   Regarding the luminance of the RGB value group binarized by the binarization unit 723, the luminance below the threshold is set to “0” and the luminance above the threshold is set to “255” based on the set threshold. In the image, they are represented by 'solid black' and 'white', respectively.

図7に示す背景置換画像作成部724では、2値化部723により輝度が‘255’とされた被写体領域のRGB値については、第1RGB値群の対応するRGB値に置き換えられ、2値化部723により輝度が‘0’とされた背景領域のRGB値については、顧客が所望した背景RGB値群の対応するRGB値に置き換えられる。これにより、順光できれいに撮影された被写体と、顧客が所望する背景とが組み合わさった背景置換画像が作成される。   In the background replacement image creating unit 724 shown in FIG. 7, the RGB value of the subject area whose luminance is set to “255” by the binarizing unit 723 is replaced with the corresponding RGB value of the first RGB value group, and binarized. The RGB value of the background area whose luminance is set to “0” by the unit 723 is replaced with the corresponding RGB value of the background RGB value group desired by the customer. As a result, a background replacement image is created in which a subject photographed beautifully with direct light and a background desired by the customer are combined.

このようにして作成された背景置換画像を表わすRGB値群が、図6に示される画像データ転送部730に送信され、各出力デバイスや出力用記憶媒体550(図6参照)に転送される。   The RGB value group representing the background replacement image created in this way is transmitted to the image data transfer unit 730 shown in FIG. 6 and transferred to each output device and output storage medium 550 (see FIG. 6).

以上説明したように、本実施形態のコンピュータ20では、被写体Pを挟んでデジタルカメラ11とは反対側に位置するプラスティック板131からの、このプラスティック板131に沿って所定の一様さを有する光で照らされたこの被写体Pを撮影した逆光画像に基づいて、被写体Pに隠れた背後については推定して背景全体のRGB値群を得、逆光画像を表すRGB値群から背景全体のRGB値群を差し引くことで被写体領域が高精度に検出されて背景置換が行われる。したがって、本実施形態のコンピュータ20によれば、小型で簡易の撮影システム1の実現に寄与することができる。   As described above, in the computer 20 of this embodiment, light having a predetermined uniformity along the plastic plate 131 from the plastic plate 131 located on the opposite side of the digital camera 11 with the subject P interposed therebetween. The background behind the subject P is estimated based on the backlight image obtained by photographing the subject P illuminated with the light to obtain the RGB value group of the entire background, and the RGB value group of the entire background from the RGB value group representing the backlight image By subtracting, the subject area is detected with high accuracy and background replacement is performed. Therefore, according to the computer 20 of the present embodiment, it is possible to contribute to the realization of a small and simple photographing system 1.

次に、この撮影システム1に備えられている、本発明の背景置換装置の第1実施形態であるパーソナルコンピュータ20との置換が可能な、本発明の背景置換装置の第2実施形態であるパーソナルコンピュータ21について説明する。   Next, the personal computer which is the second embodiment of the background replacement device of the present invention, which can be replaced with the personal computer 20 which is the first embodiment of the background replacement device of the present invention provided in the photographing system 1. The computer 21 will be described.

第2実施形態のパーソナルコンピュータ21と、第1実施形態のパーソナルコンピュータ20との相違点は、被写体の背後の背景推定の方法にあるので、以下では、第2実施形態のパーソナルコンピュータ21における背景推定の方法についてのみ説明する。   Since the difference between the personal computer 21 of the second embodiment and the personal computer 20 of the first embodiment is in the background estimation method behind the subject, the background estimation in the personal computer 21 of the second embodiment will be described below. Only the method will be described.

図12は、本発明の背景置換装置の第2実施形態であるパーソナルコンピュータにおける背景推定の対象である逆光画像を示す図である。   FIG. 12 is a diagram showing a backlight image that is a target of background estimation in the personal computer that is the second embodiment of the background replacement device of the present invention.

図12には、画角の中央に1つの被写体が配置された逆光画像が示されている。   FIG. 12 shows a backlight image in which one subject is arranged at the center of the angle of view.

第2実施形態のパーソナルコンピュータ21では、入力されてきた、図12に示される逆光画像を表す第2RGB値群から、まず、図12に示される画像の左側の1列目の上端に位置する画素から下端に位置する画素までの各画素における輝度を順に読み出し、読み出した1列分の読出輝度に基づいて曲線を近似し、この近似曲線と読出輝度との差分の平均値が所定値未満であるか否かを判定し、これら輝度の読み出し、曲線近似、および判定を、図12に示す撮影画像の左端の列から右端の列にかけて行う。この判定の結果、平均値が所定値未満であればその列は背景領域のみを通過する列と認識され、平均値が所定値以上であればその列は被写体領域を通過する列と認識される。被写体領域を通過する列上の、被写体領域に属する画素の輝度は、被写体領域を通過する列の直前の、背景領域のみを通過する列の対応する画素の読出輝度に置き換えられる。第2実施形態のパーソナルコンピュータ21では、この様に、被写体Pの背後の領域の輝度が、近似曲線を利用して推定される。   In the personal computer 21 according to the second embodiment, from the input second RGB value group representing the backlight image shown in FIG. 12, first, the pixel located at the upper end of the first column on the left side of the image shown in FIG. Sequentially read the luminance in each pixel from the pixel located at the lower end to approximate the curve based on the read luminance for one column read, and the average value of the difference between the approximate curve and the read luminance is less than a predetermined value The luminance reading, curve approximation, and determination are performed from the leftmost column to the rightmost column of the photographed image shown in FIG. As a result of this determination, if the average value is less than the predetermined value, the column is recognized as a column that passes only the background region, and if the average value is equal to or greater than the predetermined value, the column is recognized as a column that passes through the subject region. . The luminance of the pixel belonging to the subject area on the column passing through the subject area is replaced with the readout luminance of the corresponding pixel in the column passing only the background area immediately before the column passing through the subject area. In the personal computer 21 of the second embodiment, the luminance of the area behind the subject P is estimated in this way using the approximate curve.

次に、この撮影システム1に備えられている、本発明の背景置換装置の第1実施形態であるパーソナルコンピュータ20との置換が可能な、本発明の背景置換装置の第3実施形態であるパーソナルコンピュータ22について説明する。   Next, the personal computer which is the third embodiment of the background replacement device of the present invention, which can be replaced with the personal computer 20 which is the first embodiment of the background replacement device of the present invention provided in the photographing system 1. The computer 22 will be described.

第3実施形態のパーソナルコンピュータ22と、第1実施形態のパーソナルコンピュータ20との相違点も、被写体の背後の背景推定の方法にあるので、以下では、第3実施形態のパーソナルコンピュータ22における、被写体の背後の背景推定の方法についてのみ説明する。   Since the difference between the personal computer 22 of the third embodiment and the personal computer 20 of the first embodiment is also the background estimation method behind the subject, the subject in the personal computer 22 of the third embodiment will be described below. Only the background estimation method behind will be described.

第3実施形態であるパーソナルコンピュータ22では、まず、第2実施形態であるパーソナルコンピュータ21で行われている、輝度の読み出し、曲線近似、および判定が、左端から右端にかけてと右端から左端にかけてとの双方で、上記差分の平均値が所定値以上となる列が検出されるまで行なわれる。   In the personal computer 22 according to the third embodiment, first, the luminance readout, curve approximation, and determination performed by the personal computer 21 according to the second embodiment are performed from the left end to the right end and from the right end to the left end. In both cases, the process is repeated until a column in which the average value of the differences is equal to or greater than a predetermined value is detected.

左端から右端にかけて行った上述の判定で上記差分の平均値が所定値以上となる列(以下では、その検出した列を列L1と称す。)が検出され、また、右端から左端にかけて行った上述の判定で上記差分の平均値が所定値以上となる列(以下では、その検出した列を列R1と称す。)が検出されると、これら列L1と列R1とを含め、列1と列R1との間に位置する各列も、被写体領域を通過する列として認識される。被写体領域を通過する各列上の画素の輝度は、背景領域のみを通過する列であって被写体領域に最も近い列である、列L1の左隣の列(以下では、その列をL0と称す。)および列R1の右隣の列(以下では、その列をR0と称す。)から距離の比に応じて重み付け平均がされた新たな輝度(以下では、この新たな輝度を推定輝度と称す。)に置き換えられる。例えば、被写体領域に属する、列L0からの距離と列R0からの距離との比がm:nの位置にある列X上の所定画素xの推定輝度は、列L0上の、所定画素xに対応する画素の輝度Lxと、列R0上の、所定画素xに対応する画素の輝度Rxとに基づいて、式(m*Rx+n*Lx)/(m+n)で算出される。この様な距離の比に応じた重み付け平均がされているのは、左右方向における背景領域の輝度のムラを、輝度を推定する領域にも反映させるためである。第3実施形態のパーソナルコンピュータ22によれば、図12に示されるような被写体が1つの場合の背景置換を高精度に行うことができる。尚、上記では、被写体領域を通過する列か否かの判定を、近似曲線からの差分の平均値に基づいて行っている場合を例に挙げたが、被写体領域を通過する列か否かの判定としては、近似曲線からの差分の最大値に基づいて行ってもよい。尚、第3実施形態では、上述のR1およびL1を、第2実施形で説明した近似曲線により検出した場合を例に挙げたが、R1およびL1の検出としては第1実施形態で説明した外挿法による検出を採用してもよい。   In the above-described determination performed from the left end to the right end, a column in which the average value of the differences is equal to or greater than a predetermined value (hereinafter, the detected column is referred to as column L1) is detected, and the above-described determination performed from the right end to the left end. If a column in which the average value of the differences is equal to or greater than a predetermined value is detected in the determination (hereinafter, the detected column is referred to as column R1), column 1 and column including these column L1 and column R1 are included. Each column positioned between R1 and R1 is also recognized as a column that passes through the subject area. The luminance of the pixel on each column that passes through the subject area is the column that passes only the background area and is the column closest to the subject area, the column adjacent to the left of the column L1 (hereinafter, this column is referred to as L0). .) And a new luminance (hereinafter, this new luminance is referred to as an estimated luminance) that is weighted and averaged according to the distance ratio from the column on the right side of the column R1 (hereinafter, the column is referred to as R0). .). For example, the estimated luminance of the predetermined pixel x on the column X that belongs to the subject region and whose ratio of the distance from the column L0 to the distance from the column R0 is m: n is the predetermined pixel x on the column L0. Based on the luminance Lx of the corresponding pixel and the luminance Rx of the pixel corresponding to the predetermined pixel x on the column R0, it is calculated by the equation (m * Rx + n * Lx) / (m + n). The reason why the weighted average according to the ratio of distances is performed is to reflect the luminance unevenness of the background area in the left-right direction also in the area where the luminance is estimated. According to the personal computer 22 of the third embodiment, background replacement can be performed with high accuracy when there is one subject as shown in FIG. In the above description, the case where the determination of whether or not the column passes through the subject area is performed based on the average value of the difference from the approximate curve. The determination may be performed based on the maximum value of the difference from the approximate curve. In the third embodiment, the case where the above-described R1 and L1 are detected by the approximate curve described in the second embodiment is taken as an example. However, the detection of R1 and L1 is the same as that described in the first embodiment. Detection by insertion may be employed.

次に、本発明の背景置換装置の第4実施形態であるパーソナルコンピュータ23について説明する。このパーソナルコンピュータ23も、この撮影システム1に備えられている、本発明の背景置換装置の第1実施形態であるパーソナルコンピュータ20との置換が可能なものである。   Next, a personal computer 23 which is a fourth embodiment of the background replacement device of the present invention will be described. The personal computer 23 can also be replaced with the personal computer 20 that is provided in the photographing system 1 and is the first embodiment of the background replacement device of the present invention.

第4実施形態のパーソナルコンピュータ23と、第1実施形態のパーソナルコンピュータ20との相違点も、被写体の背後の背景推定の方法にあるので、以下では、第4実施形態のパーソナルコンピュータ23における、被写体の背後の背景推定の方法についてのみ説明する。   Since the difference between the personal computer 23 of the fourth embodiment and the personal computer 20 of the first embodiment is also the background estimation method behind the subject, the subject in the personal computer 23 of the fourth embodiment will be described below. Only the background estimation method behind will be described.

第4実施形態のパーソナルコンピュータ23では、第2実施形態であるパーソナルコンピュータ21で行われている、輝度の読み出し、曲線近似、および判定が、左端から右端にかけてと右端から左端にかけてとに加え、上端から下端にかけてと下端から上端にかけてとの双方についても、上記差分の平均値が所定値以上となる列が検出されるまで行なわれる。   In the personal computer 23 according to the fourth embodiment, the luminance reading, curve approximation, and determination performed by the personal computer 21 according to the second embodiment are performed in addition to the upper end in addition from the left end to the right end and from the right end to the left end. This is performed for both from the lower end to the lower end and from the lower end to the upper end until a row in which the average value of the differences is equal to or greater than a predetermined value is detected.

第4実施形態のパーソナルコンピュータ23では、上述の判定を上端から下端にかけて行った場合に上記差分の平均値が所定値以上となる列の一列上の列(以下では、この列を列U0と称す。)、および、上述の判定を下端から上端にかけて行った場合に上記差分の平均値が所定値以上となる列の一列下の列(以下では、この列を列D0と称す。)からの距離に基づいて重み付け平均した、被写体領域に属する各画素の輝度と、前述のL0およびR0からの距離に基づいて重み付け平均した、被写体領域に属する各画素の輝度との平均を上述の推定輝度とする。第4実施形態であるパーソナルコンピュータ23におけるこの背景推定は、左右方向と上下方向とのいずれの方向に背景の明るさが均一であるのかが不明である場合に有効となる。尚、第3実施形態では、上述の列R1、L1、U1、およびD1を、第2実施形で説明した近似曲線により検出した場合を例に挙げたが、これを第1実施形態で説明した外挿法による検出を採用してもよい。   In the personal computer 23 according to the fourth embodiment, when the above determination is performed from the upper end to the lower end, the upper row of the row in which the average value of the differences is not less than a predetermined value (hereinafter, this row is referred to as row U0). .), And the distance from a column below the column in which the average value of the differences is equal to or greater than a predetermined value when the above determination is performed from the lower end to the upper end (hereinafter, this column is referred to as column D0). The average of the luminance of each pixel belonging to the subject area, which is weighted averaged based on the above, and the luminance of each pixel belonging to the subject area, which is weighted averaged based on the distance from the above-described L0 and R0, is used as the above-described estimated luminance. . This background estimation in the personal computer 23 according to the fourth embodiment is effective when it is unclear whether the brightness of the background is uniform in the left-right direction or the up-down direction. In the third embodiment, the case where the above-described columns R1, L1, U1, and D1 are detected by the approximate curve described in the second embodiment is taken as an example, but this has been described in the first embodiment. Detection by extrapolation may be employed.

尚、以上の実施形態では、本発明にいう背景の所定の一様さの一例として、明るさが左右方向に均一、かつ上下方向に一様に変化する例を挙げているが、本発明にいう背景の所定の一様さは、背景の推定が可能であれば、明るさが上下方向に均一、かつ左右方向に一様に変化するものであってもよく、さらには、上下左右に均一であってもよい。   In the above embodiment, as an example of the predetermined uniformity of the background referred to in the present invention, an example is given in which the brightness is uniform in the horizontal direction and uniform in the vertical direction. As long as the background can be estimated, the predetermined uniformity of the background may be one in which the brightness is uniform in the vertical direction and uniform in the horizontal direction, and is uniform in the vertical and horizontal directions. It may be.

また、以上の実施形態では、本発明にいう背景推定の一例として、画素の輝度を検出する例を挙げているが、本発明にいう背景推定は、画素の輝度ではなく、画素の色を検出してもよい。さらには、ライン毎ではなく2次元的に推定しても良い。   In the above embodiment, an example of detecting the luminance of a pixel is given as an example of the background estimation according to the present invention. However, the background estimation according to the present invention detects not the pixel luminance but the pixel color. May be. Furthermore, it may be estimated two-dimensionally instead of for each line.

撮影システムを示す図である。It is a figure which shows an imaging | photography system. 図1に示すパーソナルコンピュータの外観斜視図である。FIG. 2 is an external perspective view of the personal computer shown in FIG. 1. 図1の撮影システムで実行される作業の流れを示す図である。It is a figure which shows the flow of the work performed with the imaging | photography system of FIG. 図1に示すパーソナルコンピュータのハードウェア構成図である。It is a hardware block diagram of the personal computer shown in FIG. CD−ROMの概念図である。It is a conceptual diagram of CD-ROM. パーソナルコンピュータが本発明にいう背景置換装置の一例として動作するときの機能を表わす機能ブロック図である。It is a functional block diagram showing a function when a personal computer operates as an example of the background replacement device according to the present invention. 図6に1つのブロックで示す置換処理部の詳細を示す図である。It is a figure which shows the detail of the replacement process part shown by one block in FIG. 図7に示される各部で生成される画像を観念的に示す図である。It is a figure which shows the image produced | generated by each part shown by FIG. 7 notionally. 被写体に隠れた背後の領域のRGB値の推定の手法を概念的に示す図である。It is a figure which shows notionally the method of estimation of the RGB value of the area | region behind a subject. 撮影画像上の上下位置と輝度との関係を示す図である。It is a figure which shows the relationship between the up-and-down position on a picked-up image, and a brightness | luminance. コンピュータの画像表示装置の画面表示を示す図である。It is a figure which shows the screen display of the image display apparatus of a computer. 本発明の背景置換装置の第3実施形態であるパーソナルコンピュータにおける背景推定の対象である逆光画像を示す図である。It is a figure which shows the backlight image which is the object of the background estimation in the personal computer which is 3rd Embodiment of the background replacement apparatus of this invention.

符号の説明Explanation of symbols

1 撮影システム
10 撮影セット
11 デジタルカメラ
12 第1閃光発光装置
13 撮影台
130 第2閃光発光装置
131 プラスティック板
132 筐体
20 パーソナルコンピュータ
600 背景置換プログラム
610 画像取得部
620 置換処理部
630 画像データ転送部
640 画像表示部
700 背景置換装置
710 画像取得部
720 背景置換処理部
721 背景推定部
722 差し引き部
723 2値化部
724 背景置換画像作成部
725 調整部
730 画像データ転送部
740 画像表示部
DESCRIPTION OF SYMBOLS 1 Shooting system 10 Shooting set 11 Digital camera 12 First flash light emitting device 13 Shooting stand 130 Second flash light emitting device 131 Plastic plate 132 Case 20 Personal computer 600 Background replacement program 610 Image acquisition unit 620 Replacement processing unit 630 Image data transfer unit 640 Image display unit 700 Background replacement device 710 Image acquisition unit 720 Background replacement processing unit 721 Background estimation unit 722 Subtraction unit 723 Binarization unit 724 Background replacement image creation unit 725 Adjustment unit 730 Image data transfer unit 740 Image display unit

Claims (8)

撮像装置で被写体が撮影されて得られた撮影画像を、画素値の集合で画像を表現した形式で取得する撮影画像取得部と、
前記被写体に対する背景は前記撮影画像中で所定の一様さを有しているとの前提で該背景の画素値を、該被写体に隠れた背後も含めて推定する背景推定部と、
前記撮影画像の各画素値から、前記背景推定部で推定された画素値を差し引く背景差し引き部と、
前記背景差し引き部による差し引き結果に基づいて、前記撮影装置で前記被写体と同じ被写体が撮影されて得られた撮影画像中の領域を、前記被写体が写っている被写体領域と、該被写体領域を除いた背景領域とに区別する領域区別部と、
前記領域区別部による領域の区別に基づいて、前記撮影画像中の背景を別の背景に置換する背景置換部とを備えたことを特徴とする背景置換装置。
A captured image acquisition unit that acquires a captured image obtained by capturing an image of a subject with an imaging device in a format that represents the image with a set of pixel values;
A background estimation unit that estimates a pixel value of the background including a background hidden behind the subject on the assumption that the background of the subject has a predetermined uniformity in the captured image;
A background subtraction unit that subtracts the pixel value estimated by the background estimation unit from each pixel value of the captured image;
Based on the subtraction result by the background subtraction unit, the area in the captured image obtained by photographing the same subject as the subject by the photographing apparatus is excluded from the subject area in which the subject is reflected and the subject area. An area discriminator for distinguishing from the background area;
A background replacement device, comprising: a background replacement unit that replaces a background in the captured image with another background based on the region discrimination by the region discrimination unit.
前記領域区別部が、前記背景差し引き部によって前記撮影画像の各画素値から前記背景の画素値が差し引かれて得られる差し引き画素値と所定の閾値との比較によって前記被写体領域と前記背景領域とを区別するものであることを特徴とする請求項1記載の背景置換装置。   The region distinguishing unit compares the subject region and the background region by comparing a subtracted pixel value obtained by subtracting the background pixel value from each pixel value of the photographed image by the background subtracting unit and a predetermined threshold value. The background replacement device according to claim 1, wherein the background replacement device is distinguished. 前記撮影画像取得部で取得された撮影画像中で所定方向に延びる各ラインについて解析し、該ライン上に被写体が存在するか否かを確認する被写体確認部を備え、
前記背景推定部が、前記被写体確認部で被写体の存在が確認された被写体ラインについて、前記背景の画素値を、該被写体確認部で被写体の不存在が確認された背景ラインの画素値を用いて推定するものであることを特徴とする請求項1又は2記載の背景置換装置。
Analyzing each line extending in a predetermined direction in the captured image acquired by the captured image acquisition unit, and a subject confirmation unit that confirms whether or not a subject exists on the line,
The background estimation unit uses the pixel value of the background for the subject line for which the presence of the subject has been confirmed by the subject confirmation unit, and the pixel value of the background line for which the absence of the subject has been confirmed by the subject confirmation unit. The background replacement device according to claim 1, wherein the background replacement device is an estimation device.
前記背景推定部が、被写体を挟む両側の前記背景ラインに基づいて該被写体の背景の画素値を推定するものであることを特徴とする請求項3記載の背景置換装置。   4. The background replacement device according to claim 3, wherein the background estimation unit estimates a pixel value of a background of the subject based on the background lines on both sides sandwiching the subject. 前記背景推定部が、前記背景の明るさが前記撮影画像中で所定の一様さを有しているとの前提でこの背景の明るさを表す画素値を推定するものであることを特徴とする請求項1から4のうちのいずれか1項記載の背景置換装置。   The background estimation unit estimates a pixel value representing the brightness of the background on the assumption that the brightness of the background has a predetermined uniformity in the captured image. The background replacement device according to any one of claims 1 to 4. 被写体を撮影し、画素値の集合で画像を表現した形式で撮影画像を得る撮影装置;
前記被写体を、該被写体を挟んで前記撮影装置とは反対側に位置する面からの、該面に沿って所定の一様さを有する光で照らす照明装置;および
前記撮影装置で得られた撮影画像を取得する撮影画像取得部と、
前記被写体に対する背景は前記撮影画像中で前記一様さを有しているとの前提で該背景の画素値を、該被写体に隠れた背後も含めて推定する背景推定部と、
前記撮影画像の各画素値から、前記背景推定部で推定された画素値を差し引く背景差し引き部と、
前記背景差し引き部による差し引き結果に基づいて、前記撮影画像中の領域を、前記被写体が写っている被写体領域と、該被写体領域を除いた背景領域とに区別する領域区別部と、
前記領域区別部による領域の区別に基づいて、前記撮影装置で前記被写体と同じ被写体が撮影されて得られた撮影画像中の背景を別の背景に置換する背景置換部とを備えた背景置換装置;
を備えたことを特徴とする撮影システム。
An imaging device that captures a subject and obtains a captured image in a form in which the image is represented by a set of pixel values;
An illumination device that illuminates the subject with light having a predetermined uniformity along the surface from a surface located on the opposite side of the photographing device across the subject; and photographing obtained by the photographing device A captured image acquisition unit for acquiring images;
A background estimation unit that estimates the pixel value of the background including the back behind the subject on the assumption that the background of the subject has the uniformity in the captured image;
A background subtraction unit that subtracts the pixel value estimated by the background estimation unit from each pixel value of the captured image;
An area discriminating unit for discriminating an area in the captured image into a subject area in which the subject is reflected and a background area excluding the subject area, based on a subtraction result by the background subtraction unit;
A background replacement device comprising a background replacement unit that replaces a background in a captured image obtained by capturing the same subject as the subject with the imaging device based on the region distinction by the region distinction unit. ;
An imaging system characterized by comprising:
前記照明装置が、前記面に沿った所定の第1方向について一様に変化し、該面に沿った、該第1方向に交わる所定の第2方向については均一の光で前記被写体を照らすものであり、
前記背景置換装置が、前記撮影画像取得部で取得された撮影画像中で前記第1方向に延びる各ラインについて解析し、該ライン上に被写体が存在するか否かを確認する被写体確認部を備えたものであり、
前記背景置換装置の背景推定部が、前記被写体確認部で被写体の存在が確認されたラインについて、前記背景の画素値を、該被写体確認部で被写体の不存在が確認されたラインの画素値を用いて推定するものであることを特徴とする請求項6記載の撮影システム。
The illumination device uniformly changes in a predetermined first direction along the surface, and illuminates the subject with uniform light in a predetermined second direction along the surface and intersecting the first direction. And
The background replacement device includes a subject confirmation unit that analyzes each line extending in the first direction in the captured image acquired by the captured image acquisition unit and confirms whether or not a subject exists on the line. And
The background estimation unit of the background replacement device uses the pixel value of the background for the line where the presence of the subject is confirmed by the subject confirmation unit, and the pixel value of the line where the absence of the subject is confirmed by the subject confirmation unit. The photographing system according to claim 6, wherein the photographing system is used for estimation.
前記照明装置が、前記面に沿って明るさが所定の一様さを有する光で前記被写体を照らすものであり、
前記背景推定部が、前記背景の明るさが前記撮影画像中で前記一様さを有しているとの前提でこの背景の明るさを表す画素値を推定するものであることを特徴とする請求項6又は7記載の撮影システム。
The illumination device illuminates the subject with light having a predetermined uniformity of brightness along the surface;
The background estimation unit estimates a pixel value representing the brightness of the background on the assumption that the brightness of the background has the uniformity in the captured image. The imaging system according to claim 6 or 7.
JP2008246699A 2008-09-25 2008-09-25 Background replacement device and photographing system Expired - Fee Related JP4943400B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008246699A JP4943400B2 (en) 2008-09-25 2008-09-25 Background replacement device and photographing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008246699A JP4943400B2 (en) 2008-09-25 2008-09-25 Background replacement device and photographing system

Publications (2)

Publication Number Publication Date
JP2010081252A JP2010081252A (en) 2010-04-08
JP4943400B2 true JP4943400B2 (en) 2012-05-30

Family

ID=42211204

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008246699A Expired - Fee Related JP4943400B2 (en) 2008-09-25 2008-09-25 Background replacement device and photographing system

Country Status (1)

Country Link
JP (1) JP4943400B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422825A (en) * 2020-11-16 2021-02-26 珠海格力电器股份有限公司 Intelligent photographing method, device, equipment and computer readable medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3608715B2 (en) * 1998-08-31 2005-01-12 日立ソフトウエアエンジニアリング株式会社 Image composition apparatus and image composition method
JP2003058873A (en) * 2001-08-13 2003-02-28 Olympus Optical Co Ltd Device and method for extracting form and segmenting image

Also Published As

Publication number Publication date
JP2010081252A (en) 2010-04-08

Similar Documents

Publication Publication Date Title
JP4301656B2 (en) Color normalization method for surface image and system suitable therefor
US9036223B2 (en) Systems and methods for edge detection during an imaging operation
US8547457B2 (en) Camera flash mitigation
US20040233301A1 (en) Digital camera
JP4539318B2 (en) Image information evaluation method, image information evaluation program, and image information evaluation apparatus
CN110196576B (en) Image processing system and setting method
JP2008227569A (en) Photographing device, electronic device, photography control method and photography control program
JP2007074578A (en) Image processor, photography instrument, and program
US7830543B2 (en) Photographic image region extracting apparatus and copying apparatus
JP4943400B2 (en) Background replacement device and photographing system
JP2009027223A (en) Image display device, image display method, and program
JP2010102507A (en) Background replacement equipment, background replacement program, background replacement method and photographing system
JP5482817B2 (en) Photo sticker making apparatus and photo sticker making method
JP2010081253A (en) Background replacing device, and photographing system
JP2008204474A (en) Reduced image display control device and method
JP2005071192A (en) Projection type display device, program and recording medium
JP2010093373A (en) Method of checking photographing environment
JP5323443B2 (en) Synchro signal processor
JP2010093372A (en) Method of checking photographing environment
JP2010087995A (en) Photographic environment confirmation method and photographic environment confirming apparatus
JP2010004300A (en) Image processing method, image processing apparatus, image processing program, and printer
KR101367103B1 (en) Apparatus and method for determining back light
JP2010093503A (en) Background replacing device and photographing system
JP2010098678A (en) Background replacement device, program, method, and photography system
JP2006081087A (en) Imaging apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120201

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: 20120207

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: 20120229

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150309

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees