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

Image processing apparatus, method, and program Download PDF

Info

Publication number
JP5876121B2
JP5876121B2 JP2014182382A JP2014182382A JP5876121B2 JP 5876121 B2 JP5876121 B2 JP 5876121B2 JP 2014182382 A JP2014182382 A JP 2014182382A JP 2014182382 A JP2014182382 A JP 2014182382A JP 5876121 B2 JP5876121 B2 JP 5876121B2
Authority
JP
Japan
Prior art keywords
image
subject
unit
clothing
acquired
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.)
Active
Application number
JP2014182382A
Other languages
Japanese (ja)
Other versions
JP2014225301A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2014182382A priority Critical patent/JP5876121B2/en
Publication of JP2014225301A publication Critical patent/JP2014225301A/en
Application granted granted Critical
Publication of JP5876121B2 publication Critical patent/JP5876121B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)

Description

本発明の実施の形態は、画像処理装置、方法、及びプログラムに関する。   Embodiments described herein relate generally to an image processing apparatus, a method, and a program.

試着対象の衣服を着用した状態を示す仮想画像を表示する技術が種々開示されている。例えば、人体が複数の衣服を試着した状態を示す合成画像を表示する技術が開示されている。また、取得した画像中の対象物を、予め用意した基準画像を用いたテンプレートマッチングを行うことで検出し、対象物上に仮想的な画像を重畳する技術も開示されている。   Various techniques for displaying a virtual image indicating a state of wearing a clothing to be tried on have been disclosed. For example, a technique for displaying a composite image showing a state where a human body has tried on a plurality of clothes is disclosed. Also disclosed is a technique for detecting an object in an acquired image by performing template matching using a reference image prepared in advance and superimposing a virtual image on the object.

特開2010−152557号公報JP 2010-152557 A

しかしながら、テンプレートマッチングを用いた技術では、精度向上を図ることは出来るが、処理負荷が高かった。このため、精度向上を図りつつ、且つ低負荷で合成画像を提供することは困難であった。   However, the technique using template matching can improve accuracy, but the processing load is high. For this reason, it has been difficult to provide a composite image with low load while improving accuracy.

本発明が解決しようとする課題は、合成画像を精度よく且つ低負荷で作成することができる、画像処理装置、方法、及びプログラムを提供することである。   The problem to be solved by the present invention is to provide an image processing apparatus, method, and program capable of creating a composite image with high accuracy and low load.

実施の形態の画像処理装置は、第1算出部と、第2算出部と、決定部と、を備える。第1算出部は、被写体画像と重畳対象の衣服画像とに基づいて、前記被写体画像における前記衣服画像の第1位置を算出する。第2算出部は、前記被写体画像と前記衣服画像とに基づいて、前記被写体画像における前記衣服画像の第2位置であって、前記第1位置とは異なる前記第2位置を算出する。決定部は、前記第2位置を用いて重畳位置を決定する場合、前記被写体画像より前に取得された第1被写体画像に対して算出された前記第1位置を更に用いて、前記衣服画像の前記重畳位置を決定する The image processing apparatus of the embodiment includes a first calculator, a second calculator, and a determination unit. The first calculation unit, based on the clothing image superimposition target object Utsushitai image, calculates a first position of the garment image in the object image. The second calculation unit calculates a second position of the clothing image in the subject image that is different from the first position, based on the subject image and the clothing image. The determining unit, when determining the superimposed position using the second position, further uses the first position calculated for the first subject image acquired before the subject image, The superposition position is determined .

実施の形態1の画像処理システムのブロック図。1 is a block diagram of an image processing system according to a first embodiment. 画像処理システムの外観の模式図。The schematic diagram of the external appearance of an image processing system. 第1テーブルのデータ構造の図。The figure of the data structure of the 1st table. 姿勢情報及び衣服画像の一例を示す図。The figure which shows an example of posture information and a clothing image. 被写体の向きの算出方法を示す図。The figure which shows the calculation method of the direction of a to-be-photographed object. 姿勢情報の異なる3種類の衣服画像を示す図。The figure which shows three types of clothing images from which posture information differs. 特徴領域の大きさ算出の説明図。Explanatory drawing of the size calculation of a feature area. 輪郭抽出の一例を示す図。The figure which shows an example of an outline extraction. 第2位置の算出を示す模式図。The schematic diagram which shows calculation of a 2nd position. 画像処理の手順を示すフローチャート。The flowchart which shows the procedure of an image process. 調整処理の手順を示すフローチャート。The flowchart which shows the procedure of an adjustment process. 第1位置算出処理の手順を示すフローチャート。The flowchart which shows the procedure of a 1st position calculation process. 第2位置算出処理の手順を示すフローチャート。The flowchart which shows the procedure of a 2nd position calculation process. 合成画像の生成を示す説明図。Explanatory drawing which shows the production | generation of a synthesized image. 合成画像の生成を示す説明図。Explanatory drawing which shows the production | generation of a synthesized image. 画像処理システムを示す模式図。1 is a schematic diagram showing an image processing system. 画像処理装置のハードウェア構成例を示すブロック図。The block diagram which shows the hardware structural example of an image processing apparatus.

以下に添付図面を参照して、画像処理装置、画像処理方法、及び画像処理プログラムの一の実施の形態を詳細に説明する。   Hereinafter, an embodiment of an image processing apparatus, an image processing method, and an image processing program will be described in detail with reference to the accompanying drawings.

(実施の形態1)
図1は、本実施の形態の画像処理システム10の機能的構成を示すブロック図である。画像処理システム10は、画像処理装置12、撮像部14、入力部16、記憶部18、及び提示部20を備える。
(Embodiment 1)
FIG. 1 is a block diagram showing a functional configuration of an image processing system 10 according to the present embodiment. The image processing system 10 includes an image processing device 12, an imaging unit 14, an input unit 16, a storage unit 18, and a presentation unit 20.

本実施の形態では、画像処理システム10は、画像処理装置12と、撮像部14、入力部16、記憶部18、及び提示部20と、が別体として設けられた構成である場合を説明する。しかし、画像処理システム10は、画像処理装置12と、撮像部14、入力部16、記憶部18、及び提示部20の内の少なくとも1つと、が一体的に構成された形態であってもよい。   In the present embodiment, the image processing system 10 will be described with respect to a configuration in which the image processing device 12, the imaging unit 14, the input unit 16, the storage unit 18, and the presentation unit 20 are provided separately. . However, the image processing system 10 may be configured such that the image processing device 12 and at least one of the imaging unit 14, the input unit 16, the storage unit 18, and the presentation unit 20 are integrally configured. .

撮像部14は、被写体を撮像し、被写体の被写体画像を得る。撮像部14は、所定時間毎に被写体を撮像する。撮像部14は、撮像によって取得した被写体画像を、順次、画像処理装置12へ出力する。撮像部14が、連続して被写体を撮像して画像処理装置12へ出力することで、画像処理装置12は、撮像時間の異なる複数の被写体画像を含む動画像を得ることとなる。   The imaging unit 14 images a subject and obtains a subject image of the subject. The imaging unit 14 images a subject every predetermined time. The imaging unit 14 sequentially outputs the subject images acquired by imaging to the image processing device 12. The imaging unit 14 continuously captures the subject and outputs it to the image processing device 12, whereby the image processing device 12 obtains a moving image including a plurality of subject images having different imaging times.

被写体は、衣服を試着する対象である。被写体は、衣服を試着する対象であればよく、生物であってもよいし、非生物であってもよい。該生物には、例えば、人物が挙げられるが、人物に限られず、犬や猫等のペットであってもよい。また、該非生物には、人体やペットの形状を模したマネキンや、衣服、その他の物体等が挙げられるが、これに限られない。また、被写体は、衣服を着用した状態の生物や非生物であってもよい。   The subject is a subject to try on clothes. The subject only needs to be an object to try on clothes, and may be a living organism or a non-living organism. Examples of the living organism include, but are not limited to, a person, and may be a pet such as a dog or a cat. The non-living body includes, but is not limited to, a mannequin that imitates the shape of a human body or a pet, clothes, and other objects. The subject may be a living creature or a non-living creature wearing clothes.

また、衣服とは、被写体が着用可能な品物である。衣服としては、例えば、上着、スカート、ズボン、靴、帽子等が挙げられる。   Also, clothes are items that can be worn by a subject. Examples of the clothes include a jacket, a skirt, trousers, shoes, a hat, and the like.

本実施の形態では、撮像部14は、第1撮像部14A及び第2撮像部14Bを含む。   In the present embodiment, the imaging unit 14 includes a first imaging unit 14A and a second imaging unit 14B.

第1撮像部14Aは、撮像により被写体のデプス画像を取得する。第2撮像部14Bは、撮像により被写体の色画像を取得する。   The first imaging unit 14A acquires a depth image of the subject by imaging. The second imaging unit 14B acquires a color image of the subject by imaging.

色画像は、ビットマップ画像である。被写体の色画像は、画素毎に、被写体の色や輝度等を示す画素値の規定された画像である。第2撮像部14Bは、色画像を取得可能な公知の撮像装置である。   The color image is a bitmap image. The color image of the subject is an image in which pixel values indicating the color and luminance of the subject are defined for each pixel. The second imaging unit 14B is a known imaging device that can acquire a color image.

デプス画像は、距離画像と称される場合がある。被写体のデプス画像は、被写体画像を構成する画素毎に、被写体を撮像した第1撮像部14Aからの距離を規定した画像である。本実施の形態では、被写体のデプス画像は、被写体の色画像から、ステレオマッチング等の公知の方法により作成してもよいし、被写体の色画像と同じ撮影条件で、第1撮像部14Aを用いて撮像することで取得してもよい。第1撮像部14Aには、デプス画像を取得可能な公知の撮像装置を用いる。   The depth image may be referred to as a distance image. The depth image of the subject is an image that defines the distance from the first imaging unit 14A that captured the subject for each pixel constituting the subject image. In the present embodiment, the depth image of the subject may be created from the color image of the subject by a known method such as stereo matching, or the first imaging unit 14A is used under the same shooting conditions as the color image of the subject. May be obtained by imaging. A known imaging device capable of acquiring a depth image is used for the first imaging unit 14A.

本実施の形態では、第1撮像部14A及び第2撮像部14Bは、同じタイミングで被写体の撮像を行う。第1撮像部14A及び第2撮像部14Bは、図示を省略する制御部等によって、同じタイミングで同期して撮像を順次行うように制御されているものとする。そして、撮像部14は、撮像によって得た被写体のデプス画像及び被写体の色画像を含む被写体画像を、順次画像処理装置12へ出力する。   In the present embodiment, the first imaging unit 14A and the second imaging unit 14B image a subject at the same timing. It is assumed that the first imaging unit 14A and the second imaging unit 14B are controlled to sequentially perform imaging in synchronism with the same timing by a control unit (not shown) or the like. Then, the imaging unit 14 sequentially outputs a subject image including a depth image of the subject and a color image of the subject obtained by imaging to the image processing device 12.

提示部20は、各種画像を提示する装置である。本実施の形態では、提示部20は、画像処理装置12で生成された後述する合成画像を提示する。なお、提示とは、表示、印刷、及び送信等を示す。   The presentation unit 20 is a device that presents various images. In the present embodiment, the presentation unit 20 presents a composite image (described later) generated by the image processing device 12. Note that the presentation indicates display, printing, transmission, and the like.

提示部20は、例えば、液晶表示装置等の表示装置や、画像を印刷する印刷装置や、有線通信や無線通信等により外部装置へ情報を送信する公知の通信装置等である。提示部20が、表示装置である場合には、提示部20は、合成画像を表示する。また、提示部20が通信装置である場合には、提示部20は、合成画像を外部装置へと送信する。また、提示部20が印刷装置である場合には、提示部20は、合成画像を印刷する。   The presentation unit 20 is, for example, a display device such as a liquid crystal display device, a printing device that prints an image, a known communication device that transmits information to an external device by wired communication, wireless communication, or the like. When the presentation unit 20 is a display device, the presentation unit 20 displays a composite image. When the presentation unit 20 is a communication device, the presentation unit 20 transmits the composite image to the external device. When the presentation unit 20 is a printing device, the presentation unit 20 prints a composite image.

なお、本実施の形態では、提示とは、表示を示し、提示部20は、表示装置である場合を説明する。   In the present embodiment, the term “presentation” indicates display, and the presenting unit 20 will be described as a display device.

入力部16は、ユーザが各種の操作入力を行うための手段である。入力部16には、例えば、マウス、ボタン、リモコン、キーボード、マイク等の音声認識装置、及び画像認識装等の1または複数を組み合せたもの等が挙げられる。また、入力部16として、上記画像認識装置を採用する場合には、入力部16の前に対峙するユーザの身振り手振り等を、ユーザの各種指示として受け付ける装置としてもよい。この場合には、該画像認識装置では、身振りや手振り等の各動きに対応する指示情報を予め記憶し、認識した身振りや手振りに対応する指示情報を読み取ることで、ユーザによる操作指示を受け付ければよい。   The input unit 16 is a means for the user to perform various operation inputs. Examples of the input unit 16 include a combination of one or more of a voice recognition device such as a mouse, a button, a remote control, a keyboard, and a microphone, and an image recognition device. Further, when the above-described image recognition device is employed as the input unit 16, it may be a device that accepts a user's gesture gesture or the like facing the input unit 16 as various instructions of the user. In this case, the image recognition apparatus stores in advance instruction information corresponding to each movement such as gestures and hand gestures, and can read the instruction information corresponding to the recognized gestures and hand gestures to accept an operation instruction by the user. That's fine.

また、入力部16は、携帯端末等の各種情報を送信する外部装置から、ユーザの操作指示を示す信号を受け付ける通信装置であってもよい。この場合には、入力部16は、該外部装置から受信した操作指示を示す信号を、ユーザによる操作指示として受け付ければよい。   The input unit 16 may be a communication device that receives a signal indicating a user operation instruction from an external device such as a mobile terminal that transmits various types of information. In this case, the input unit 16 may accept a signal indicating an operation instruction received from the external device as an operation instruction by the user.

なお、入力部16及び提示部20は、一体的に構成されていてもよい。具体的には、入力部16及び提示部20は、入力機能及び表示機能の双方を備えたUI(User Interface)部として構成されていてもよい。UI部には、タッチパネル付LCD(Liquid Crystal Display)等がある。   In addition, the input part 16 and the presentation part 20 may be comprised integrally. Specifically, the input unit 16 and the presentation unit 20 may be configured as a UI (User Interface) unit having both an input function and a display function. The UI unit includes an LCD (Liquid Crystal Display) with a touch panel.

図2は、画像処理システム10の外観を示す模式図である。   FIG. 2 is a schematic diagram illustrating the appearance of the image processing system 10.

図2に示すように画像処理システム10における提示部20は、例えば矩形状の筐体51の一の面に組み込まれている。そして、画像処理システム10では、被写体Pが各種衣服を試着した状態を示す合成画像Wを、提示部20に表示する。人物等の被写体Pは、例えば、該提示部20に対面した位置から、該提示部20に提示された合成画像Wを視認する。   As shown in FIG. 2, the presentation unit 20 in the image processing system 10 is incorporated on one surface of a rectangular housing 51, for example. Then, in the image processing system 10, a composite image W indicating a state in which the subject P has tried on various clothes is displayed on the presentation unit 20. The subject P such as a person visually recognizes the composite image W presented on the presentation unit 20 from a position facing the presentation unit 20, for example.

また、筐体51は、入力部16、及び撮像部14(第1撮像部14A及び第2撮像部14B)を支持している。図2に示す例では、入力部16、及び第2撮像部14Bは、筐体51における、提示部20の水平方向両端部に設けられている。また、第1撮像部14Aは、筐体51における、提示部20の上部に設けられている。なお、入力部16の設置位置は、この位置に限られない。また、第1撮像部14A及び第2撮像部14Bは、被写体Pを撮像可能な位置に設けられていればよく、これらの位置に限定されない。   The casing 51 supports the input unit 16 and the imaging unit 14 (the first imaging unit 14A and the second imaging unit 14B). In the example illustrated in FIG. 2, the input unit 16 and the second imaging unit 14 </ b> B are provided at both ends in the horizontal direction of the presentation unit 20 in the housing 51. In addition, the first imaging unit 14 </ b> A is provided in the housing 51 above the presentation unit 20. The installation position of the input unit 16 is not limited to this position. The first imaging unit 14A and the second imaging unit 14B may be provided at positions where the subject P can be imaged, and are not limited to these positions.

ユーザが入力部16を操作指示することで、各種情報が入力部16を介して入力される。また、第1撮像部14A及び第2撮像部14Bは、上述したように、同じタイミングとなるように同期しながら、被写体Pを順次撮像する。そして、第1撮像部14A及び第2撮像部14Bは、撮像によって得た被写体画像を、画像処理装置12へ順次出力する。   Various information is input via the input unit 16 when the user instructs the input unit 16 to operate. In addition, as described above, the first imaging unit 14A and the second imaging unit 14B sequentially capture the subject P while synchronizing the same timing. Then, the first imaging unit 14A and the second imaging unit 14B sequentially output subject images obtained by imaging to the image processing device 12.

図1に戻り、記憶部18は、被写体画像に重畳する衣服画像を予め記憶する。本実施の形態では、記憶部18は、衣服番号と、姿勢情報と、衣服画像と、属性情報と、を対応づけた第1テーブルを記憶する場合を説明する。   Returning to FIG. 1, the storage unit 18 stores in advance a clothing image to be superimposed on the subject image. In the present embodiment, a case will be described in which the storage unit 18 stores a first table in which clothing numbers, posture information, clothing images, and attribute information are associated with each other.

図3は、第1テーブルのデータ構造の一例を示す図である。   FIG. 3 is a diagram illustrating an example of the data structure of the first table.

衣服番号は、衣服を一意に識別する情報である。衣服番号には、例えば、製品番号や、衣服の名称等が挙げられるが、これらに限られない。製品番号には、例えば、公知のJANコードを用いる。名称には、例えば、衣服の品名等を用いる。   The clothes number is information for uniquely identifying clothes. Examples of the clothing number include, but are not limited to, a product number and a clothing name. For example, a known JAN code is used as the product number. As the name, for example, the name of clothes is used.

なお、衣服番号は、衣服を一意に識別する情報である。このため、1の衣服番号に、姿勢情報の異なる複数の衣服画像が対応付けられる場合もある。   The clothing number is information that uniquely identifies the clothing. For this reason, a plurality of clothing images having different posture information may be associated with one clothing number.

姿勢情報は、衣服画像の取得時の衣服の着用対象である被写体の姿勢を示す情報である。姿勢情報は、被写体の、撮像装置14に対する被写体の向きや動き等を示す。   The posture information is information indicating the posture of the subject that is the subject of the clothing at the time of acquiring the clothing image. The posture information indicates the orientation and movement of the subject relative to the imaging device 14.

被写体の向きとは、衣服画像の取得時の、該衣服画像の衣服を着用した被写体の撮像装置14に対する向きを示す。例えば、被写体の向きとしては、顔及び身体が撮像装置14に対して正面を向いている正面方向、顔及び身体が撮像装置14に対して側面を向いている側面方向、正面方向及び側面方向以外の他の方向等がある。   The orientation of the subject indicates the orientation of the subject wearing the clothing of the clothing image with respect to the imaging device 14 when the clothing image is acquired. For example, as the direction of the subject, the front direction in which the face and the body face the front with respect to the imaging device 14, the side direction in which the face and the body face the side with respect to the imaging device 14, other than the front direction and the side direction There are other directions.

被写体の動きは、衣服画像の衣服を着用した被写体の骨格の位置を示す骨格情報によって示される。骨格情報は、衣服画像を構成する各画素の画素位置に対応する、該衣服画像の衣服を着用した被写体の骨格の位置を示す情報を、画素毎に定めた情報である。   The movement of the subject is indicated by the skeleton information indicating the position of the skeleton of the subject wearing the clothes in the clothing image. The skeleton information is information that defines, for each pixel, information indicating the position of the skeleton of the subject wearing the clothing of the clothing image corresponding to the pixel position of each pixel constituting the clothing image.

本実施の形態では、姿勢情報は、被写体の向きと、骨格情報と、を含むものとする。   In the present embodiment, the posture information includes the orientation of the subject and the skeleton information.

衣服画像は、衣服を着用した被写体の撮像によって得られる。衣服画像は、画素毎に、衣服の色や輝度等を示す画素値の規定された画像である。例えば、衣服画像には、衣服を第2撮像部14Bで撮像することによって得られた画像等を用いる。   A clothing image is obtained by imaging a subject wearing clothing. A clothing image is an image in which pixel values indicating the color, brightness, etc. of clothing are defined for each pixel. For example, an image obtained by capturing an image of clothes with the second imaging unit 14B is used as the clothes image.

属性情報は、対応する衣服画像の属性を示す情報である。属性情報は、例えば、衣服画像の衣服のサイズ、衣服の色、衣服の素材、衣服の値段等がある。   The attribute information is information indicating the attribute of the corresponding clothing image. The attribute information includes, for example, the size of clothes, the color of clothes, the material of clothes, the price of clothes, and the like.

具体的には、例えば、1種類の衣服について、正面方向から撮影された衣服画像と、側面側から撮影された衣服画像と、を画像処理システム10で取得したとする。この場合、記憶部18には、該衣服を示す衣服番号に対応づけて、被写体の向きである「正面方向」及び正面方向を向いた被写体の骨格情報を含む姿勢情報と、該姿勢情報に対応する、正面方向から撮影された衣服画像と、が予め記憶される。同様に、記憶部18には、該衣服を示す衣服番号に対応づけて、被写体の向きである「側面方向」及び側面方向を向いた被写体の骨格情報を含む姿勢情報と、該姿勢情報に対応する、該側面得方向から撮影された衣服画像と、が予め記憶される。   Specifically, for example, assume that the image processing system 10 acquires a clothing image photographed from the front direction and a clothing image photographed from the side surface for one type of clothing. In this case, the storage unit 18 associates the clothes number indicating the clothes with the posture information including the “front direction” which is the direction of the subject and the skeleton information of the subject facing the front direction, and the posture information. The clothing image photographed from the front direction is stored in advance. Similarly, the storage unit 18 is associated with the clothing number indicating the clothing, the posture information including the “side direction” that is the direction of the subject and the skeleton information of the subject facing the side direction, and the posture information. The clothing image photographed from the side acquisition direction is stored in advance.

なお、第1テーブルは、衣服番号と、姿勢情報と、衣服画像と、を対応づけたテーブルであればよく、属性情報を格納しない形態であってもよい。   Note that the first table may be a table in which clothing numbers, posture information, and clothing images are associated with each other, and may have a form that does not store attribute information.

図4は、姿勢情報及び衣服画像の一例を示す模式図である。   FIG. 4 is a schematic diagram illustrating an example of posture information and a clothing image.

図4(A)に示すように、例えば、衣服61を着用したマネキン等の被写体60を用意する。そして、この被写体60を、撮像部14で撮像することで、色画像及びデプス画像を含む被写体画像を得る。そして、撮像によって得られた色画像から、衣服領域を抽出することで、例えば、図4(B)に示す衣服画像61Aを得る。また、被写体60のデプス画像から、人体の関節位置に相当する画素位置を公知の方法により抽出し、衣服画像の各々を構成する各画素の画素位置に対応する、該衣服画像の衣服を着用した被写体の骨格の位置を示す骨格情報61Bを作成する(図4(C))。   As shown in FIG. 4A, for example, a subject 60 such as a mannequin wearing a garment 61 is prepared. The subject 60 is imaged by the imaging unit 14 to obtain a subject image including a color image and a depth image. Then, by extracting a clothing region from the color image obtained by imaging, for example, a clothing image 61A shown in FIG. 4B is obtained. Further, a pixel position corresponding to the joint position of the human body is extracted from the depth image of the subject 60 by a known method, and the clothing of the clothing image corresponding to the pixel position of each pixel constituting each of the clothing images is worn. Skeleton information 61B indicating the position of the skeleton of the subject is created (FIG. 4C).

画像処理装置12では、このようにして、重畳対象の衣服の衣服画像及び姿勢情報を含む第1テーブルを予め用意し、記憶部18に予め記憶する。   In this way, the image processing apparatus 12 prepares in advance a first table including clothes images and posture information of clothes to be superimposed, and stores them in the storage unit 18 in advance.

図1に戻り、画像処理装置12は、CPU(Central Processing Unit)、ROM(Read Only Memory)、及びRAM(Random Access Memory)などを含んで構成されるコンピュータである。   Returning to FIG. 1, the image processing apparatus 12 is a computer including a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like.

画像処理装置12は、撮像部14、入力部16、記憶部18、及び提示部20に電気的に接続されている。   The image processing device 12 is electrically connected to the imaging unit 14, the input unit 16, the storage unit 18, and the presentation unit 20.

画像処理装置12は、第1取得部22、受付部24、第2取得部26、判別部28、調整部30、抽出部32、第1算出部34、第2算出部36、決定部38、生成部40、及び提示制御部42を備える。   The image processing apparatus 12 includes a first acquisition unit 22, a reception unit 24, a second acquisition unit 26, a determination unit 28, an adjustment unit 30, an extraction unit 32, a first calculation unit 34, a second calculation unit 36, a determination unit 38, A generation unit 40 and a presentation control unit 42 are provided.

第1取得部22は、撮像部14から被写体画像を順次取得する。第1取得部22は、第3取得部22A及び第4取得部22Bを含む。第3取得部22Aは、被写体のデプス画像を順次取得する。第4取得部22Bは、色画像を順次取得する。   The first acquisition unit 22 sequentially acquires subject images from the imaging unit 14. The first acquisition unit 22 includes a third acquisition unit 22A and a fourth acquisition unit 22B. The third acquisition unit 22A sequentially acquires depth images of the subject. The fourth acquisition unit 22B sequentially acquires color images.

なお、被写体の画像は、被写体を示す画像である。第3取得部22Aは、第1撮像部14Aから取得したデプス画像から、人物領域を抽出することで、被写体のデプス画像を取得する。同様に、第4取得部22Bは、第2撮像部14Bから取得した色画像から、人物領域を抽出することで、被写体の色画像を取得する。   The subject image is an image showing the subject. The third acquisition unit 22A acquires a depth image of the subject by extracting a person region from the depth image acquired from the first imaging unit 14A. Similarly, the fourth acquisition unit 22B acquires a color image of the subject by extracting a person region from the color image acquired from the second imaging unit 14B.

第1取得部22は、例えば、デプス画像を構成する各画素の3次元位置のうち、奥行き方向の距離について閾値を設定することで、人物領域を抽出する。たとえば、第1撮像部14Aのカメラ座標系において第1撮像部14Aの位置を原点とし、Z軸正方向が、第1撮像部14Aの原点から被写体方向に伸びるカメラの光軸であるとする。この場合、デプス画像を構成する各画素の内、奥行き方向(Z軸方向)の位置座標が予め定めた閾値(例えば、2mを示す値)以上の画素を除外する。これにより、第1取得部22は、第1撮像部14Aから2mの範囲内に存在する人物領域の画素からなるデプス画像、すなわち、被写体のデプス画像を得る。   For example, the first acquisition unit 22 extracts a person region by setting a threshold for the distance in the depth direction among the three-dimensional positions of each pixel constituting the depth image. For example, in the camera coordinate system of the first image capturing unit 14A, the position of the first image capturing unit 14A is the origin, and the positive Z-axis direction is the optical axis of the camera extending from the origin of the first image capturing unit 14A toward the subject. In this case, out of the pixels constituting the depth image, pixels whose position coordinates in the depth direction (Z-axis direction) are equal to or greater than a predetermined threshold (for example, a value indicating 2 m) are excluded. As a result, the first acquisition unit 22 obtains a depth image composed of pixels of the person area existing within a range of 2 m from the first imaging unit 14A, that is, a depth image of the subject.

受付部24は、入力部16から各種情報を受け付ける。   The receiving unit 24 receives various information from the input unit 16.

第2取得部26は、第1取得部22で取得した被写体画像に重畳する対象の衣服画像を記憶部18から取得する。   The second acquisition unit 26 acquires a clothing image to be superimposed on the subject image acquired by the first acquisition unit 22 from the storage unit 18.

本実施の形態では、第2取得部26は、入力部16から、重畳対象の衣服を特定するための衣服候補情報を受け付ける。衣服候補情報には、ユーザが試着を所望する衣服の種類、サイズ、色、素材、値段等の属性情報の内の少なくとも1つ、または属性情報の少なくとも1つを特定するための情報が含まれる。   In the present embodiment, the second acquisition unit 26 receives clothes candidate information for specifying clothes to be superimposed from the input unit 16. The clothing candidate information includes information for specifying at least one of the attribute information such as the type, size, color, material, price, etc. of the clothing that the user desires to try on, or at least one of the attribute information. .

例えば、ユーザは、入力部16の操作指示によって、衣服の「種類」、「色」、「サイズ」等を衣服候補情報として入力する。   For example, the user inputs “type”, “color”, “size”, and the like of clothes as clothes candidate information according to an operation instruction of the input unit 16.

第2取得部26では、入力部16から受け付けた衣服候補情報を解析し、衣服候補情報によって特定される、または衣服候補情報に含まれる属性情報に対応する衣服画像の一覧を、記憶部18から検索する。そして、提示制御部42は、第1取得部26で検索された衣服画像の一覧を、対応する衣服番号毎に、提示部20に提示する制御を行う。すなわち、1の衣服番号に対して、姿勢情報の異なる複数種類の衣服画像が記憶部18に対応づけて記憶されている場合には、提示制御部42は、代表的な姿勢情報(例えば正面)に対応する1の衣服画像を、提示部20に提示する制御を行う。   The second acquisition unit 26 analyzes the clothing candidate information received from the input unit 16, and stores a list of clothing images corresponding to the attribute information specified by the clothing candidate information or included in the clothing candidate information from the storage unit 18. Search for. And the presentation control part 42 performs control which shows the list of the clothing image searched in the 1st acquisition part 26 to the presentation part 20 for every corresponding clothing number. That is, when a plurality of types of clothing images having different posture information are stored in association with the storage unit 18 for one clothing number, the presentation control unit 42 displays representative posture information (for example, front). Control is performed to present one clothing image corresponding to 1 to the presentation unit 20.

提示部20に衣服画像の一覧が提示されると、ユーザによる入力部16の操作指示によって、提示部20に提示された衣服画像の一覧の中から、重畳対象の衣服の衣服画像が選択される。すると、選択された衣服画像の衣服番号が、入力部16から画像処理装置12へ出力される。   When a list of clothing images is presented to the presentation unit 20, a clothing image of a clothing to be superimposed is selected from the list of clothing images presented to the presentation unit 20 according to an operation instruction of the input unit 16 by the user. . Then, the clothing number of the selected clothing image is output from the input unit 16 to the image processing device 12.

受付部24が、該選択された衣服番号を受け付けると、第2取得部26では、該受付部24で受け付けた衣服番号によって特定される衣服画像を、記憶部18から取得する。   When the reception unit 24 receives the selected clothing number, the second acquisition unit 26 acquires the clothing image specified by the clothing number received by the reception unit 24 from the storage unit 18.

抽出部32は、第1取得部22で取得した被写体画像から、骨格情報を生成する。具体的には、抽出部32は、第3取得部22Aで取得した被写体のデプス画像を構成する画素毎に人体の骨格位置を示す、骨格情報を生成する。抽出部32は、デプス画像に人体形状を当てはめることで骨格情報を生成する。   The extraction unit 32 generates skeleton information from the subject image acquired by the first acquisition unit 22. Specifically, the extraction unit 32 generates skeleton information indicating the skeleton position of the human body for each pixel constituting the depth image of the subject acquired by the third acquisition unit 22A. The extraction unit 32 generates skeleton information by applying a human body shape to the depth image.

そして、抽出部32は、第3取得部22Aで取得した被写体のデプス画像から算出した骨格情報の各画素の画素位置の座標系(すなわち、第1撮像部14Aの座標系)を、第4取得部22Bで取得した被写体の色画像の各画素位置の座標系(すなわち、第2撮像部14Bの座標系)に変換する。すなわち、抽出部32は、第1撮像部14Aで撮像した被写体のデプス画像から算出した骨格情報の各画素の画素位置の座標系を、該デプス画像と同じタイミングで第2撮像部14Bによって撮像された被写体の色画像の座標系に変換する。この座標変換は、公知のキャリブレーションを行うことにより行う。   Then, the extraction unit 32 obtains a fourth coordinate system of the pixel positions of each pixel of the skeleton information calculated from the depth image of the subject acquired by the third acquisition unit 22A (that is, the coordinate system of the first imaging unit 14A). The coordinate system of each pixel position of the color image of the subject acquired by the unit 22B (that is, the coordinate system of the second imaging unit 14B) is converted. That is, the extraction unit 32 captures the coordinate system of the pixel position of each pixel of the skeleton information calculated from the depth image of the subject imaged by the first imaging unit 14A by the second imaging unit 14B at the same timing as the depth image. To the coordinate system of the color image of the subject. This coordinate conversion is performed by performing known calibration.

調整部30は、重畳対象の衣服画像の輪郭の少なくとも一部と、被写体画像の輪郭の少なくとも一部とが一致するように、衣服画像及び被写体画像の少なくとも一方を拡大または縮小する。また、調整部30は、拡大または縮小後の衣服画像と、被写体画像と、から、後述する第1算出部34で用いる特徴領域を抽出する。   The adjustment unit 30 enlarges or reduces at least one of the clothing image and the subject image so that at least a part of the contour of the clothing image to be superimposed matches at least a part of the contour of the subject image. Further, the adjustment unit 30 extracts a feature region used in a first calculation unit 34 described later from the enlarged or reduced clothing image and the subject image.

詳細には、調整部30は、まず、抽出部32で作成された被写体の骨格情報から、被写体の向きを算出する。   Specifically, the adjustment unit 30 first calculates the orientation of the subject from the skeleton information of the subject created by the extraction unit 32.

調整部30は、抽出部32が被写体のデプス画像から算出した姿勢情報としての骨格情報によって示される各関節の位置から、被写体の向きを算出する。   The adjustment unit 30 calculates the orientation of the subject from the position of each joint indicated by the skeleton information as the posture information calculated by the extraction unit 32 from the depth image of the subject.

図5は、調整部30による被写体の向きの算出方法を示す説明図である。   FIG. 5 is an explanatory diagram illustrating a method for calculating the orientation of the subject by the adjustment unit 30.

抽出部32で算出された被写体の骨格情報によって示される、被写体の左肩に相当する画素位置の座標を、第2撮像部14Bの座標系でPslとする(図5中、画素位置72参照)。また、抽出部32で算出された姿勢情報としての骨格情報によって示される、被写体の右肩に相当する画素位置の座標を、第2撮像部14Bの座標系でPsrとする(図5中、画素位置72参照)。 Indicated skeletal information of the object calculated by the extraction unit 32, the coordinates of the pixel position corresponding to the left shoulder of the subject, and Psl in the coordinate system of the second image pickup unit 14B (in FIG. 5, reference pixel position 72 4) . Further, the coordinates of the pixel position corresponding to the right shoulder of the subject indicated by the skeletal information as the posture information calculated by the extraction unit 32 is set to Psr in the coordinate system of the second imaging unit 14B (in FIG. 5, the pixel location reference 72 3).

調整部30は、これらの座標情報から、被写体の撮像部14(第2撮像部14B)に対する向きを、下記式(1)により算出する。   The adjustment unit 30 calculates the orientation of the subject with respect to the imaging unit 14 (second imaging unit 14B) from these coordinate information by the following equation (1).

被写体の向き=arctan(Psl.z−Psr.z/Psl.x−Psr.x)
・・・・式(1)
Orientation of subject = arctan (Psl.z-Psr.z / Psl.x-Psr.x)
.... Formula (1)

式(1)中、Psl.zは、被写体の左肩に相当する画素位置のz座標値を示す。Psr.zは、被写体の右肩に相当する画素位置のz座標値を示す。また、式(1)中、Psl.xは、被写体の左肩に相当する画素位置のx座標値を示す。Psr.xは、被写体の右肩に相当する画素位置のx座標値を示す。   In formula (1), Psl. z indicates the z coordinate value of the pixel position corresponding to the left shoulder of the subject. Psr. z indicates the z coordinate value of the pixel position corresponding to the right shoulder of the subject. In the formula (1), Psl. x represents an x coordinate value of a pixel position corresponding to the left shoulder of the subject. Psr. x indicates an x coordinate value of a pixel position corresponding to the right shoulder of the subject.

なお、調整部30は、衣服画像の姿勢情報についても、同様にして得てもよい。   Note that the adjustment unit 30 may obtain the posture information of the clothing image in the same manner.

次に、調整部30は、ユーザによって選択された衣服番号に対応する衣服画像の内、被写体画像によって示される被写体の向き(被写体の姿勢情報)に対応する衣服画像を、記憶部18から取得する。   Next, the adjustment unit 30 acquires, from the storage unit 18, a clothing image corresponding to the orientation of the subject (subject orientation information) indicated by the subject image among the clothing images corresponding to the clothing number selected by the user. .

図6は、同じ衣服について、姿勢情報の異なる3種類の衣服画像が同じ衣服番号に対応づけて記憶部18に格納されている場合を示す模式図である。   FIG. 6 is a schematic diagram illustrating a case where three types of clothing images having different posture information are stored in the storage unit 18 in association with the same clothing number for the same clothing.

例えば、記憶部18に、ユーザによって選択された衣服番号に対応する衣服画像として、筐体51に設けられた第2撮像部14Bに対して正面の向きである「正面」、正面から右に20度回転した向き「+20度」、正面から右に40度回転した向き「+40度」の各々の姿勢情報に対応する、衣服画像61A(61A、61A20、61A40)が予め格納されていたとする。 For example, in the storage unit 18, “front” that is the front direction with respect to the second imaging unit 14 </ b> B provided in the casing 51 as a clothing image corresponding to the clothing number selected by the user, 20 from the front to the right. The clothing image 61A (61A 0 , 61A 20 , 61A 40 ) corresponding to each posture information of the orientation “+20 degrees” rotated by 40 degrees and the orientation “+40 degrees” rotated 40 degrees to the right from the front is stored in advance. To do.

調整部30は、被写体画像によって示される被写体の向きが、「正面」である場合には、第2取得部26が取得した、ユーザによって選択された衣服番号に対応するこれらの衣服画像61A(61A、61A20、61A40)の内、該被写体の向き「正面」に対応する衣服画像61Aを記憶部18から読み出す。 When the orientation of the subject indicated by the subject image is “front”, the adjustment unit 30 acquires these clothing images 61A (61A) corresponding to the clothing number selected by the user and acquired by the second acquisition unit 26. 0 , 61 A 20 , 61 A 40 ), the clothing image 61 A 0 corresponding to the direction “front” of the subject is read from the storage unit 18.

次に、調整部30は、第3取得部22Aで取得した被写体のデプス画像の座標系(すなわち、第1撮像部14Aの座標系)を、第4取得部22Bで取得した被写体の色画像の座標系(すなわち、第2撮像部14Bの座標系)に変換する。そして、調整部30は、座標変換後の被写体のデプス画像を構成する各画素位置の画素が、同じタイミングで取得された被写体の色画像を構成する各画素の画素位置に対応する位置となるように射影することで、被写体のデプス画像の解像度を色画像と同じ解像度に調整する。   Next, the adjustment unit 30 uses the coordinate system of the depth image of the subject acquired by the third acquisition unit 22A (that is, the coordinate system of the first imaging unit 14A) as the color image of the subject acquired by the fourth acquisition unit 22B. The coordinate system (that is, the coordinate system of the second imaging unit 14B) is converted. Then, the adjustment unit 30 causes the pixels at the respective pixel positions constituting the depth image of the subject after coordinate conversion to be positions corresponding to the pixel positions of the respective pixels constituting the color image of the subject acquired at the same timing. The resolution of the depth image of the subject is adjusted to the same resolution as that of the color image.

例えば、第1撮像部14Aによって得られた被写体のデプス画像の解像度が640×480ピクセルであり、第2撮像部14Bによって得られた被写体の色画像の解像度が1080×1920ピクセルであったとする。この場合、デプス画像を構成する各画素を、1ピクセル×1ピクセルの点として色画像上に射影すると、デプス画像を構成する各画素の間に隙間が生じてしまう。このため、調整部30では、必要に応じて、ガウシアンフィルタやモルフォロジー演算等の公知の演算を用いたフィルタを適用し、色画像上に射影されたデプス画像を構成する各画素の間に隙間が生じないように調整する。   For example, it is assumed that the resolution of the depth image of the subject obtained by the first imaging unit 14A is 640 × 480 pixels, and the resolution of the color image of the subject obtained by the second imaging unit 14B is 1080 × 1920 pixels. In this case, when each pixel constituting the depth image is projected onto the color image as a point of 1 pixel × 1 pixel, a gap is generated between the pixels constituting the depth image. For this reason, the adjustment unit 30 applies a filter using a known calculation such as a Gaussian filter or a morphological calculation as necessary, and there is a gap between each pixel constituting the depth image projected onto the color image. Adjust so that it does not occur.

次に、調整部30は、被写体の向きに対応する衣服画像における、特徴領域の大きさを算出する。   Next, the adjustment unit 30 calculates the size of the feature region in the clothing image corresponding to the orientation of the subject.

特徴領域は、衣服を試着する被写体の形状を推定可能な領域である。特徴領域には、人体の肩に対応する肩領域や、腰に対応する腰領域や、足の長さに対応する足領域等があるが、これらに限られない。本実施の形態では、特徴領域として、人体の肩に対応する肩領域を用いる場合を説明するが、肩領域に限られない。   The feature region is a region where the shape of the subject trying on clothes can be estimated. The feature region includes, but is not limited to, a shoulder region corresponding to the shoulder of the human body, a waist region corresponding to the waist, a foot region corresponding to the length of the foot, and the like. In the present embodiment, a case where a shoulder region corresponding to the shoulder of a human body is used as the feature region is described, but the feature region is not limited to the shoulder region.

例えば、調整部30は、被写体の向きに対応する衣服画像における特徴領域の大きさとして、該衣服画像における肩幅を算出する。   For example, the adjustment unit 30 calculates the shoulder width in the clothing image as the size of the feature region in the clothing image corresponding to the orientation of the subject.

図7は、調整部30による衣服画像の特徴領域の大きさ算出の説明図である。   FIG. 7 is an explanatory diagram for calculating the size of the feature region of the clothing image by the adjustment unit 30.

調整部30は、被写体の向きに対応する衣服画像における、該衣服画像に対応する姿勢情報に含まれる骨格情報から、衣服画像上の関節位置の内、左肩に相当する画素位置の画素のY座標と、右肩に相当する画素位置の画素のY座標と、の各々の位置を求める。そして、これらのY座標の平均のY座標を求める。次に、調整部30は、求めた該Y座標の位置(高さ)において、該左肩に相当する画素位置のX座標から、衣服の外側に相当する領域に向かって探索を行い、衣服の左肩側の境界線の位置を示すX座標を求める。さらに、調整部30は、求めた該Y座標の位置(高さ)において、右肩に相当する画素位置のX座標から、衣服の外側に相当する領域に向かって探索を行い、衣服の右肩側の境界線の位置を示すX座標を求める。   The adjustment unit 30 calculates the Y coordinate of the pixel at the pixel position corresponding to the left shoulder from the skeleton information included in the posture information corresponding to the clothing image in the clothing image corresponding to the orientation of the subject. And the Y coordinate of the pixel at the pixel position corresponding to the right shoulder. Then, an average Y coordinate of these Y coordinates is obtained. Next, the adjustment unit 30 performs a search from the X coordinate of the pixel position corresponding to the left shoulder to the region corresponding to the outside of the clothing at the obtained position (height) of the Y coordinate, and the left shoulder of the clothing. The X coordinate indicating the position of the side boundary line is obtained. Further, the adjustment unit 30 performs a search from the X coordinate of the pixel position corresponding to the right shoulder to the area corresponding to the outside of the clothing at the obtained position (height) of the Y coordinate, and the right shoulder of the clothing. The X coordinate indicating the position of the side boundary line is obtained.

このようにして求めた2つのX座標の差を求めることで、衣服画像上の肩幅(ピクセル数)を求めることができる(図7(A)の、衣服画像61Aにおける肩幅Sc参照)。   By obtaining the difference between the two X coordinates thus obtained, the shoulder width (number of pixels) on the clothing image can be obtained (see the shoulder width Sc in the clothing image 61A in FIG. 7A).

なお、ある1つの肩関節のY座標について算出するのではなく、肩関節のY座標を中心に、Y座標の上下方向に幅を持たせて、複数の水平方向のラインについて探索を行い、水平方向について両側の平均のX座標を求めることで、肩幅を求めてもよい。   Instead of calculating the Y coordinate of a certain shoulder joint, a search is performed for a plurality of horizontal lines with the width in the vertical direction of the Y coordinate centered on the Y coordinate of the shoulder joint, and horizontal You may obtain | require a shoulder width by calculating | requiring the average X coordinate of both sides about a direction.

次に、調整部30は、色画像と同じ解像度に調整した、被写体のデプス画像と、被写体の骨格情報と、を用いて、被写体の画像上の肩幅を算出する。   Next, the adjustment unit 30 calculates the shoulder width on the image of the subject using the depth image of the subject and the skeleton information of the subject adjusted to the same resolution as the color image.

図7(B)に示すように、調整部30は、被写体のデプス画像における、左肩に相当する画素位置のY座標と、右肩に相当する画素位置のY座標と、の平均のY座標を求める。次に、左肩に相当する画素位置のX座標から、被写体の外側に相当する領域向かって探索を行い、被写体領域の一方の境界線であるX座標を求める。   As shown in FIG. 7B, the adjustment unit 30 calculates the average Y coordinate of the Y coordinate of the pixel position corresponding to the left shoulder and the Y coordinate of the pixel position corresponding to the right shoulder in the depth image of the subject. Ask. Next, a search is performed from the X coordinate of the pixel position corresponding to the left shoulder toward the region corresponding to the outside of the subject, and the X coordinate that is one boundary line of the subject region is obtained.

さらに、調整部30は、被写体のデプス画像における、右肩に相当する画素位置のX座標から、被写体の外側に相当する領域に向かって探索を行い、被写体領域のもう一方の境界線であるX座標を求める。   Further, the adjustment unit 30 searches from the X coordinate of the pixel position corresponding to the right shoulder in the depth image of the subject toward the region corresponding to the outside of the subject, and is the other boundary line X of the subject region. Find the coordinates.

調整部30は、このようにして求めた2つのX座標の差を求めることで、被写体について、画像上の肩幅(ピクセル数)を求める(図7(B)中、被写体のデプス画像71Aの肩幅Sh参照)。   The adjustment unit 30 obtains the shoulder width (number of pixels) on the image of the subject by obtaining the difference between the two X coordinates obtained in this way (the shoulder width of the depth image 71A of the subject in FIG. 7B). See Sh).

なお、調整部30は、肩関節の1つのY座標について肩幅を求めるのではなく、肩関節のY座標を中心にY座標の上下方向に幅を持たせて、複数の水平方向のラインについて探索を行う。そして、調整部30は、水平方向について両側の平均のX座標を求めることで、肩幅を求めてもよい。   The adjustment unit 30 does not calculate the shoulder width for one Y coordinate of the shoulder joint, but searches for a plurality of horizontal lines by providing a width in the vertical direction of the Y coordinate around the Y coordinate of the shoulder joint. I do. And the adjustment part 30 may obtain | require a shoulder width by calculating | requiring the average X coordinate of both sides about a horizontal direction.

次に、調整部30は、上記で算出した特徴領域の大きさ、すなわち、衣服画像の肩幅Scと、被写体画像の肩幅Shと、を用いて、衣服画像のスケーリング値(拡大縮小率)を決定する。   Next, the adjustment unit 30 determines the clothing image scaling value (enlargement / reduction ratio) using the size of the feature region calculated above, that is, the shoulder width Sc of the clothing image and the shoulder width Sh of the subject image. To do.

具体的には、調整部30は、被写体画像の肩幅Shを、服画像の肩幅Scで除算した除算値(Sh/Sc)を、スケーリング値として算出する。スケーリング値は、衣服の実際の大きさや、衣服画像領域の幅および高さの画素数などの値を用いて、異なる式から算出してもよい。   Specifically, the adjustment unit 30 calculates a division value (Sh / Sc) obtained by dividing the shoulder width Sh of the subject image by the shoulder width Sc of the clothing image as a scaling value. The scaling value may be calculated from different expressions using values such as the actual size of the clothes and the number of pixels of the width and height of the clothes image area.

そして、調整部30は、重畳対象の衣服画像(色画像)を、該スケーリング値によって特定される拡大縮小率で、拡大または縮小する。同様に、調整部30は、重畳対象の衣服画像の姿勢情報に含まれる骨格情報についても、同じスケーリング値(Sh/Sc)で特定される拡大縮小率で、拡大または縮小する。   Then, the adjustment unit 30 enlarges or reduces the clothes image (color image) to be superimposed at the enlargement / reduction ratio specified by the scaling value. Similarly, the adjustment unit 30 enlarges or reduces the skeleton information included in the posture information of the clothing image to be superimposed at the enlargement / reduction ratio specified by the same scaling value (Sh / Sc).

次に、調整部30は、拡大または縮小後の衣服画像と、被写体画像と、から、後述する第1算出部34で用いる特徴領域を抽出する。   Next, the adjustment unit 30 extracts a feature region used in the first calculation unit 34 described later from the enlarged or reduced clothing image and the subject image.

特徴領域とは、衣服画像、及び被写体画像の各々における、被写体の形状を推定可能な領域を示す。特徴領域は、例えば、人体の肩、腰等を示す領域である。本実施の形態では、調整部30は、衣服画像及び被写体画像の各々の輪郭における、人体の肩に相当する領域(肩領域)を、特徴領域として抽出する場合を説明する。   The feature area indicates an area in which the shape of the subject can be estimated in each of the clothing image and the subject image. The characteristic area is an area indicating, for example, a shoulder or a waist of a human body. In the present embodiment, a description will be given of a case where the adjustment unit 30 extracts an area (shoulder area) corresponding to the shoulder of the human body in each contour of a clothing image and a subject image as a feature area.

まず、調整部30は、座標変換及び解像度に調整された被写体のデプス画像から、輪郭を抽出する。また、調整部30は、被写体画像と同じスケーリング値となるように拡大または縮小された衣服画像の輪郭を抽出する。なお、輪郭の抽出には、公知の方法を用いる。そして、調整部30は、これらの輪郭から、人体の肩に相当する領域(肩領域)の輪郭を、特徴領域として抽出する。   First, the adjustment unit 30 extracts a contour from the depth image of the subject adjusted to coordinate conversion and resolution. The adjustment unit 30 also extracts the outline of the clothing image that has been enlarged or reduced so as to have the same scaling value as the subject image. A known method is used to extract the contour. And the adjustment part 30 extracts the outline of the area | region (shoulder area | region) equivalent to the shoulder of a human body from these outlines as a characteristic area.

ここで、調整部30は、衣服画像の形状に応じて輪郭を抽出することが好ましい。   Here, it is preferable that the adjustment unit 30 extracts a contour according to the shape of the clothes image.

図8は、輪郭の抽出の一例を示す模式図である。   FIG. 8 is a schematic diagram illustrating an example of contour extraction.

図8(A)に示すように、衣服画像61Aが、人体の正面側に縦長の開口部を有する形状であるとする。この場合、輪郭が、図8(B)に示すように、人体の中央部にも示されることとなる。このような輪郭を用いて、後述する第1算出部34でテンプレートマッチング(詳細後述)を行うと、人体の中央部分に相当する領域のマッチング精度が低下する場合がある。   As shown in FIG. 8A, it is assumed that the clothing image 61A has a shape having a vertically long opening on the front side of the human body. In this case, the contour is also shown at the center of the human body as shown in FIG. If template matching (details will be described later) is performed by the first calculation unit 34 to be described later using such an outline, the matching accuracy of the region corresponding to the central portion of the human body may be lowered.

このため、衣服画像61Aが、人体の正面側に縦長の開口部を有する形状である場合には、調整部30は、図8(B)に示す輪郭から、人体の中央部に相当する領域の輪郭を除去することで、人体の外形に沿った部分の輪郭61Cを、衣服画像の輪郭として抽出することが好ましい(図8(D))。   For this reason, when the clothing image 61A has a shape having a longitudinally long opening on the front side of the human body, the adjustment unit 30 determines the region corresponding to the central portion of the human body from the contour shown in FIG. By removing the contour, it is preferable to extract the contour 61C of the portion along the contour of the human body as the contour of the clothing image (FIG. 8D).

なお、画像処理装置12では、衣服画像を取得したときに、該衣服画像の衣服を試着していたマネキン等の被写体のデプス画像を、該衣服画像に対応づけて記憶部18に予め記憶しておく。調整部30は、このデプス画像から、該デプス画像における輪郭に連続する内側の領域の一部を公知のモルフォルジー演算等の画像フィルタ処理により削除する。そして、この削除後のデプス画像71C(図8(C)参照)を用意する。そして、調整部30は、図8(B)に示す輪郭61Bから、デプス画像71C(図8(C)参照)と重なる領域を削除することで、人体の外形に沿った部分の輪郭61Cを、衣服画像の輪郭として抽出する(図8(D))。   In the image processing device 12, when a clothing image is acquired, a depth image of a subject such as a mannequin wearing the clothing of the clothing image is stored in advance in the storage unit 18 in association with the clothing image. deep. The adjustment unit 30 deletes a part of the inner region continuous with the contour in the depth image from the depth image by an image filtering process such as a known morphological calculation. Then, a depth image 71C (see FIG. 8C) after this deletion is prepared. And the adjustment part 30 deletes the area | region 61C along the external shape of a human body by deleting the area | region which overlaps with the depth image 71C (refer FIG.8 (C)) from the outline 61B shown in FIG.8 (B). It is extracted as the outline of the clothes image (FIG. 8D).

そして、調整部30は、これらの衣服画像、及び被写体画像(デプス画像)の各々の輪郭から、人体の肩に相当する肩領域を、特徴領域として抽出する。   Then, the adjustment unit 30 extracts a shoulder region corresponding to the shoulder of the human body as a feature region from the contours of the clothing image and the subject image (depth image).

なお、衣服画像によって特定される衣服が、タンクトップやベアトップ等、衣服画像から人体の外形に沿った形状(肩の輪郭等)を抽出することが難しい場合もある。この場合には、衣服を試着させたマネキン等の被写体のデプス画像を記憶部18に予め記憶しておき、該被写体の肩部から肩領域の輪郭を算出してもよい。   It may be difficult for the clothes specified by the clothes image to extract a shape (shoulder outline or the like) along the outer shape of the human body from the clothes image, such as a tank top or a bare top. In this case, a depth image of a subject such as a mannequin on which clothes are tried on may be stored in the storage unit 18 in advance, and the contour of the shoulder region may be calculated from the shoulder of the subject.

図1に戻り、説明を続ける。   Returning to FIG. 1, the description will be continued.

第1算出部34は、重畳対象の衣服画像における特徴領域の位置と、第1取得部22で取得された被写体画像における特徴領域の位置と、が一致するように、被写体画像における衣服画像の第1位置を算出する。   The first calculation unit 34 adjusts the position of the clothing image in the subject image so that the position of the feature region in the clothing image to be superimposed matches the position of the feature region in the subject image acquired by the first acquisition unit 22. One position is calculated.

なお、第1算出部34は、後述する判別部28によって、第1取得部22で取得された被写体画像が予め定めた第1条件を満たすと判別された場合に、第1位置の算出を行う。判別部28の判別処理及び判別の条件については、詳細を後述する。   Note that the first calculation unit 34 calculates the first position when the determination unit 28 described later determines that the subject image acquired by the first acquisition unit 22 satisfies a predetermined first condition. . Details of the determination process and the determination conditions of the determination unit 28 will be described later.

第1算出部34は、被写体画像の特徴領域に対して、衣服画像の特徴領域をテンプレートとして、公知のテンプレートマッチングを行うことで被写体画像(デプス画像)を探索する。そして、第1算出部34は、被写体画像(デプス画像)上における、衣服画像における特定領域(本実施の形態では肩領域)と一致する位置を、第1位置として算出する。   The first calculation unit 34 searches for the subject image (depth image) by performing known template matching on the feature region of the subject image using the feature region of the clothing image as a template. Then, the first calculation unit 34 calculates, as the first position, a position on the subject image (depth image) that matches the specific area (shoulder area in the present embodiment) in the clothing image.

第1位置は、被写体画像上における位置座標によって示される。具体的には、第1位置は、被写体画像上における、被写体画像の特徴領域と衣服画像の特徴領域とが一致したときの、該特徴領域の中心位置とする。本実施の形態では、第1算出部34は、被写体画像上における、被写体画像の特徴領域(肩領域)の中心位置を、第1位置として算出することとなる。   The first position is indicated by position coordinates on the subject image. Specifically, the first position is the center position of the feature region when the feature region of the subject image matches the feature region of the clothing image on the subject image. In the present embodiment, the first calculation unit 34 calculates the center position of the feature area (shoulder area) of the subject image on the subject image as the first position.

第2算出部36は、衣服画像における、前記特徴領域に応じて予め定められた特徴点の位置と、被写体画像における特徴点の位置と、が一致するように、被写体画像における衣服画像の第2位置を算出する。   The second calculation unit 36 selects the second clothing image in the subject image so that the position of the feature point predetermined according to the feature region in the clothing image matches the position of the feature point in the subject image. Calculate the position.

上述のように、第1算出部34は、特徴領域についてテンプレートマッチングを行うことで、第1位置を算出する。一方、第2算出部36では、特徴点の位置から第2位置を算出する。このため、第1算出部34は、第2算出部36に比べて高精度に第1位置を算出することができる。一方、第2算出部36では、第1算出部34に比べて第2位置の算出精度が落ちるものの、第1算出部34より低負荷で第2位置を算出することができる。   As described above, the first calculator 34 calculates the first position by performing template matching on the feature region. On the other hand, the second calculation unit 36 calculates the second position from the position of the feature point. Therefore, the first calculation unit 34 can calculate the first position with higher accuracy than the second calculation unit 36. On the other hand, the second calculation unit 36 can calculate the second position with a lower load than the first calculation unit 34, although the calculation accuracy of the second position is lower than that of the first calculation unit 34.

特徴点は、衣服を試着する被写体の体型を推定可能な位置である。特徴点は、特徴領域に応じて予め定められる。例えば、特徴点は、第1算出部34で用いる特徴領域の中央に相当する位置に定める。このため、特徴点は、第1算出部34が特徴領域として用いる領域に応じて、予め設定される。また、特徴点は、画像上の位置座標で示される。   The feature point is a position where the body shape of the subject trying on clothes can be estimated. The feature point is determined in advance according to the feature region. For example, the feature point is determined at a position corresponding to the center of the feature region used by the first calculation unit 34. For this reason, the feature points are set in advance according to the region used by the first calculation unit 34 as the feature region. The feature points are indicated by position coordinates on the image.

本実施の形態では、第1算出部34は、特徴領域として肩領域を用いている。このため、第2算出部36では、肩領域の中心位置として、人体の両肩の中央に相当する位置を、特徴点として定める場合を説明する。   In the present embodiment, the first calculation unit 34 uses a shoulder region as a feature region. Therefore, the second calculation unit 36 will describe a case where a position corresponding to the center of both shoulders of the human body is determined as the feature point as the center position of the shoulder region.

図9は、第2算出部36による第2位置の算出の一例を示す模式図である。   FIG. 9 is a schematic diagram illustrating an example of calculation of the second position by the second calculation unit 36.

第2算出部36は、例えば、図9(A)に示す衣服画像61Aの骨格情報81Aから、両肩間の中心位置Qを求める。また、第2算出部36は、図9(B)に示す被写体画像71Aの骨格情報81Bから、両肩間の中心位置Qを求める。そして、第2算出部36は、衣服画像61Aにおける、両肩間の中心位置Qと、被写体画像71Aにおける両肩間の中心位置Qと、が一致するように、衣服画像61Aの被写体画像71Aにおける第2位置を算出する。本実施の形態では、第2算出部36は、被写体画像71Aにおける両肩間の中心位置Qを、第2位置として算出することとなる。 The second calculating section 36, for example, from the backbone information 81A of the clothing image 61A shown in FIG. 9 (A), determining the center positions to Q 1 between the shoulders. The second calculating section 36, the skeleton information 81B of the subject image 71A shown in FIG. 9 (B), obtaining a center position Q 2 between the shoulders. Then, the second calculating unit 36, the clothing image 61A, the center position to Q 1 between the shoulders, the center position Q 2 between the shoulders of the subject image 71A, so that the match, a subject image of the garment image 61A The second position at 71A is calculated. In this embodiment, the second calculating section 36, the center position Q 2 between the shoulders of the subject image 71A, so that the calculating as a second position.

図1に戻り、判別部28は、第1取得部22で取得された被写体画像が、予め定めた第1条件を満たすか否かを判別する。   Returning to FIG. 1, the determination unit 28 determines whether or not the subject image acquired by the first acquisition unit 22 satisfies a predetermined first condition.

第1条件は、第1算出部34で第1位置の算出処理を実行するか否かを判断するための条件である。すなわち、第1算出部34では、第1取得部22で取得された被写体画像が、判別部28によって第1条件を満たすと判別された場合にのみ、第1位置の算出を実行する。一方、第2算出部36では、第1取得部22で取得された被写体画像が、判別部28によって第1条件を満たすと判別された場合、及び該第1条件を満たさないと判別された場合の何れにおいても、第2位置の算出を実行する。   The first condition is a condition for determining whether or not the first calculation unit 34 executes the first position calculation process. That is, the first calculation unit 34 calculates the first position only when the subject image acquired by the first acquisition unit 22 is determined to satisfy the first condition by the determination unit 28. On the other hand, in the second calculation unit 36, when the subject image acquired by the first acquisition unit 22 is determined to satisfy the first condition by the determination unit 28, and when it is determined that the first condition is not satisfied In any case, the calculation of the second position is executed.

第1条件には、下記の条件が挙げられる。なお、下記の条件の内の1つを第1条件として定めてもよいし、下記の条件の内の任意の複数の条件を第1条件として定めてもよい。   The following conditions are mentioned as 1st conditions. Note that one of the following conditions may be defined as the first condition, and any of a plurality of conditions described below may be defined as the first condition.

第1条件としては、撮像部14によって撮像される領域に存在する被写体が異なる被写体に入れ替わったとき、が挙げられる。   The first condition is when a subject existing in an area imaged by the imaging unit 14 is replaced with a different subject.

この場合、判別部28は、第1取得部22で取得された被写体画像としてのデプス画像における、被写体の関節位置の座標値から、提示部20から予め定めた距離内に被写体として人物が存在するか否かを判別する。そして、ある時刻に取得された被写体画像には被写体として人物が存在し、その後の時刻に取得された被写体画像に被者体として人物が存在せず、さらにその後の時刻に取得された被写体画像に被写体として人物が存在したと判別したときに、判別部28は、撮像部14によって撮像される領域に存在する人物が異なる人物に入れ替わったと判別する。これによって、判別部28は、取得された被写体画像が、判別部28によって予め定めた第1条件を満たすと判別する。   In this case, the determination unit 28 includes a person as a subject within a predetermined distance from the presentation unit 20 based on the coordinate value of the joint position of the subject in the depth image as the subject image acquired by the first acquisition unit 22. It is determined whether or not. The subject image acquired at a certain time includes a person as a subject, the subject image acquired at a later time does not have a person as a subject, and the subject image acquired at a later time When it is determined that a person exists as a subject, the determination unit 28 determines that the person existing in the area imaged by the imaging unit 14 has been replaced with a different person. As a result, the determination unit 28 determines that the acquired subject image satisfies the first condition predetermined by the determination unit 28.

例えば、提示部20の前に位置して試着を行う被写体が入れ替わった場合、体型等が異なることから、より精度よく位置(第1位置または第2位置)を算出することが好ましい。このため、撮像部14によって撮像される領域に存在する人物が異なる人物に入れ替わったときを、判別部28の判別の条件として設定することで、後述する重畳位置の精度向上が図れる。   For example, it is preferable to calculate the position (the first position or the second position) with higher accuracy because the body shape and the like are different when the subject to be tried on is switched in front of the presentation unit 20. For this reason, when the person who exists in the area imaged by the imaging unit 14 is changed to a different person is set as the determination condition of the determination unit 28, the accuracy of the superimposition position described later can be improved.

なお、提示部20の前に位置する人物が移動中に撮像された被写体画像から第1位置を算出すると、算出精度が低下する可能性がある。このため、判別部28は、撮像部14によって撮像される領域に存在する人物が異なる人物に入れ替わってから所定時間後に該人物の静止を検出した後に取得された被写体画像を、第1条件を満たす被写体画像と判別することが好ましい。   If the first position is calculated from the subject image captured while the person located in front of the presentation unit 20 is moving, the calculation accuracy may be reduced. Therefore, the determination unit 28 satisfies the first condition with respect to the subject image acquired after detecting the stillness of the person after a predetermined time after the person existing in the area imaged by the imaging unit 14 is changed to a different person. It is preferable to discriminate from the subject image.

これらの人物の移動や、人物の静止の検出には、公知の画像処理技術を用いればよい。   A known image processing technique may be used for the movement of these persons and the detection of the stillness of the person.

また、他の第1条件としては、ユーザによる入力部16の操作指示によって、試着対象の衣服番号として、提示中の合成画像に含まれる衣服画像とは異なる衣服番号が指示されたとき、が挙げられる。   Another first condition is when a clothing number different from the clothing image included in the composite image being presented is designated as the clothing number to be tried on by the user's operation instruction on the input unit 16. It is done.

この場合、判別部28は、第1取得部22によって取得された被写体画像が、ユーザによる入力部16の操作指示によって、新たな衣服番号が指示された直後に取得された被写体画像であるか否かを判別する。これによって、判別部28は、取得された被写体画像が、判別部28によって予め定めた第1条件を満たすと判別する。   In this case, the determination unit 28 determines whether the subject image acquired by the first acquisition unit 22 is a subject image acquired immediately after a new clothing number is instructed by an operation instruction of the input unit 16 by the user. Is determined. As a result, the determination unit 28 determines that the acquired subject image satisfies the first condition predetermined by the determination unit 28.

なお、提示部20の前に位置して試着を行う被写体が入力部16を操作指示するために移動中であるときに撮像された被写体画像から第1位置を算出すると、算出精度が低下する可能性がある。このため、判別部28は、ユーザによる入力部16の操作指示がなされたと判別してから所定時間後に人物の静止を検出した後に取得された被写体画像を、第1条件を満たす被写体画像と判別することが好ましい。   Note that if the first position is calculated from the subject image that is captured when the subject that is located in front of the presentation unit 20 and is trying to operate the input unit 16 is moving, the calculation accuracy may be reduced. There is sex. For this reason, the determination unit 28 determines that the subject image acquired after detecting the stillness of the person after a predetermined time after determining that the operation instruction of the input unit 16 by the user has been made is the subject image satisfying the first condition. It is preferable.

また、他の第1条件としては、取得した被写体画像が、第1位置算出対象の被写体画像であると前回判別されてから、予め定めた枚数の被写体画像を取得した後に取得された被写体画像であるとき、が挙げられる。   In addition, another first condition is that the acquired subject image is a subject image acquired after a predetermined number of subject images have been acquired since the previous determination that the acquired subject image is the first position calculation target subject image. There are some times.

この場合、判別部28は、第1取得部22によって取得された被写体画像が、前回、第1位置算出対象として判別した被写体画像の取得から、予め定めた枚数取得した後に取得された被写体画像であるか否かを判別する。これによって、判別部28は、取得された被写体画像が、判別部28によって第1条件を満たすと判別する。   In this case, the determination unit 28 is the subject image acquired after the subject image acquired by the first acquisition unit 22 has acquired a predetermined number of images from the acquisition of the subject image previously determined as the first position calculation target. It is determined whether or not there is. Accordingly, the determination unit 28 determines that the acquired subject image satisfies the first condition by the determination unit 28.

なお、この枚数としては、例えば、15枚(動画像である場合には15フレーム)等が挙げられるが、この数に限られない。また、この枚数は、第1算出部34の処理負荷が高くなるほど大きい値を設定してもよいし、被写体の移動量が大きいほど大きい値を設定してもよい。また、これらの設定条件を組み合わせて、第1条件を満たすと判別する取得する被写体画像の間隔を定めてもよい。   In addition, as this number of sheets, for example, 15 sheets (15 frames in the case of a moving image) can be cited, but the number is not limited thereto. In addition, this number may be set to a larger value as the processing load of the first calculation unit 34 becomes higher, or may be set to a larger value as the subject movement amount increases. Further, the interval between the acquired subject images that are determined to satisfy the first condition may be determined by combining these setting conditions.

また、判別部28は、第1取得部22によって取得された被写体画像が、前回、第1位置算出対象として判別した被写体画像の取得から、予め定めた時間経過後に取得された被写体画像であるか否かを判別してもよい。これによって、判別部28は、取得された被写体画像が、判別部28によって第1条件を満たすと判別する。   In addition, the determination unit 28 determines whether the subject image acquired by the first acquisition unit 22 is a subject image acquired after a predetermined time has elapsed since the acquisition of the subject image determined as the first position calculation target last time. It may be determined whether or not. Accordingly, the determination unit 28 determines that the acquired subject image satisfies the first condition by the determination unit 28.

この場合についても、判別部28は、被写体の移動量や第1算出部34の処理負荷に応じて、該第1条件を満たすと判別する経過時間を定めればよい。   Also in this case, the determination unit 28 may determine an elapsed time for determining that the first condition is satisfied according to the amount of movement of the subject and the processing load of the first calculation unit 34.

また、他の第1条件としては、ユーザによる入力部16の操作指示によって指示された衣服画像の姿勢情報と、被写体の姿勢情報と、が一致したとき、が挙げられる。   Another first condition is when the posture information of the clothing image instructed by the operation instruction of the input unit 16 by the user matches the posture information of the subject.

この場合、判別部28は、第1取得部22で取得された被写体画像から抽出部32で作成された骨格情報と、記憶部18に記憶されている、ユーザの入力部16の操作指示によって指示された衣服画像の姿勢情報に含まれる骨格情報と、が一致したか否かを判別する。そして、一致する場合に、判別部28は、取得された被写体画像が、判別部28によって第1条件を満たすと判別する。   In this case, the determination unit 28 is instructed by the skeleton information created by the extraction unit 32 from the subject image acquired by the first acquisition unit 22 and the operation instruction of the user input unit 16 stored in the storage unit 18. It is determined whether or not the skeleton information included in the posture information of the applied clothing image matches. If they match, the determination unit 28 determines that the acquired subject image satisfies the first condition by the determination unit 28.

被写体の姿勢と、記憶部18に記憶されている重畳対象、すなわち試着対象の衣服の衣服画像の姿勢と、が不一致である場合には、第1算出部34でテンプレートマッチングを行っても、十分な精度のマッチングを行うことが難しい場合がある。   If the orientation of the subject and the orientation of the superimposition object stored in the storage unit 18, that is, the orientation of the clothing image of the clothing to be tried on, do not match, it is sufficient even if template matching is performed by the first calculation unit 34. Accurate matching may be difficult.

そこで、ユーザによる入力部16の操作指示によって指示された衣服画像の姿勢情報と、被写体の姿勢情報と、が一致する場合に、判別部28は、取得された被写体画像が、判別部28によって予め定めた第1条件を満たすと判別することが好ましい。   Therefore, when the posture information of the clothing image instructed by the operation instruction of the input unit 16 by the user matches the posture information of the subject, the determination unit 28 determines that the acquired subject image has been acquired in advance by the determination unit 28. It is preferable to determine that the defined first condition is satisfied.

また、他の第1条件としては、被写体画像に含まれる被写体の移動量が、予め定めた値以下である場合、が挙げられる。   Another example of the first condition is that the amount of movement of the subject included in the subject image is equal to or less than a predetermined value.

この場合、判別部28は、第1取得部22で取得された被写体画像としてのデプス画像における、被写体の関節位置の座標値から、被写体画像中における被写体としての人物の位置を判別する。そして、前回取得された被写体画像としてのデプス画像における、被写体としての人物の位置と、今回取得された被写体画像としてのデプス画像における、被写体としての人物の位置と、を比較することで、該人物の移動量を算出する。そして、この人物の移動量が予め定めた値以下であると判別した場合に、判別部28は、取得された被写体画像が、判別部28によって予め定めた第1条件を満たすと判別する。   In this case, the determination unit 28 determines the position of the person as the subject in the subject image from the coordinate value of the joint position of the subject in the depth image as the subject image acquired by the first acquisition unit 22. Then, by comparing the position of the person as the subject in the depth image as the subject image acquired last time and the position of the person as the subject in the depth image as the subject image acquired this time, Is calculated. When it is determined that the movement amount of the person is equal to or less than a predetermined value, the determination unit 28 determines that the acquired subject image satisfies the first condition predetermined by the determination unit 28.

また、他の第1条件としては、取得された被写体画像に含まれる被写体としての人物が腕を下げた状態である場合、が挙げられる。   As another first condition, there is a case where a person as a subject included in the acquired subject image is in a state where his arm is lowered.

この場合、判別部28は、第1取得部22で取得された被写体のデプス画像における、被写体の関節位置の座標値から、被写体の腕部に相当する位置が、被写体の肩部より下側(足側)に伸びる方向に位置しているか否かを判別する。そして、判別部28は、取得された被写体画像(被写体のデプス画像)に含まれる被写体としての人物が腕を下げた状態である場合に、取得された被写体画像が予め定めた第1条件を満たすと判別する。   In this case, the determination unit 28 determines that the position corresponding to the arm portion of the subject is below the shoulder portion of the subject based on the coordinate value of the joint position of the subject in the depth image of the subject acquired by the first acquisition unit 22 ( It is determined whether or not it is positioned in a direction extending to the foot side). Then, when the person as a subject included in the acquired subject image (the depth image of the subject) is in a state where the arm is lowered, the determination unit 28 satisfies the first condition that is determined in advance. Is determined.

被写体としての人物が腕を上げた姿勢である場合、重畳対象の衣服画像の姿勢情報と、被写体の姿勢情報と、が異なる可能性が高い。このような姿勢の被写体の被写体画像を用いて、第1算出部34によるテンプレートマッチングを行うと、テンプレートマッチングの精度が低下する場合がある。そこで、判別部28は、被写体画像に含まれる被写体としての人物が腕を下げた状態であると判別した場合に、取得された被写体画像が予め定めた第1条件を満たすと判別することが好ましい。   When the person as the subject has a posture with his arms raised, there is a high possibility that the posture information of the clothing image to be superimposed is different from the posture information of the subject. If template matching is performed by the first calculation unit 34 using a subject image of a subject in such a posture, the accuracy of template matching may be reduced. Therefore, when the determination unit 28 determines that the person as the subject included in the subject image is in a state where the arm is lowered, it is preferable that the determination unit 28 determines that the acquired subject image satisfies the predetermined first condition. .

次に、決定部38について説明する。   Next, the determination unit 38 will be described.

決定部38は、第1取得部22で取得された被写体画像が、判別部28によって第1条件を満たすと判別された場合、第1算出部34で算出された第1位置を、該被写体画像における衣服画像の重畳位置として決定する。   When the determination unit determines that the subject image acquired by the first acquisition unit 22 satisfies the first condition, the determination unit determines the first position calculated by the first calculation unit as the subject image. Is determined as the superimposed position of the clothing image.

また、決定部38は、第1取得部22で取得された被写体画像が、判別部28によって第1条件を満たさないと判別された場合、該被写体画像より前に取得された被写体画像である第1被写体画像に対して算出された第1位置と該第1被写体画像から第2算出部36で算出された第2位置との差分から、重畳位置を決定する。   In addition, when the determination unit 28 determines that the subject image acquired by the first acquisition unit 22 does not satisfy the first condition, the determination unit 38 is a subject image acquired before the subject image. A superposition position is determined from the difference between the first position calculated for one subject image and the second position calculated by the second calculation unit 36 from the first subject image.

具体的には、決定部38は、第1取得部22で取得された被写体画像が、判別部28によって上記第1条件を満たさないと判別された場合、今回第1取得部22で取得された被写体画像に基づいて第2算出部36で算出された第2位置を、上記差分に応じてずらした位置を重畳位置として決定する。   Specifically, the determination unit 38 is acquired by the first acquisition unit 22 this time when the subject image acquired by the first acquisition unit 22 is determined not to satisfy the first condition by the determination unit 28. A position obtained by shifting the second position calculated by the second calculation unit 36 based on the subject image according to the difference is determined as a superposition position.

すなわち、差分は、今回第1取得部22で取得された被写体画像より前に、第1取得部22で取得された被写体画像が、第1条件を満たす被写体画像であるときに、該被写体画像(第1被写体画像)から第1算出部34で算出された第1位置と、該被写体画像(第1被写体画像)から第2算出部36で算出された第2位置と、の差分である。   That is, the difference is determined when the subject image acquired by the first acquisition unit 22 is a subject image satisfying the first condition before the subject image acquired by the first acquisition unit 22 this time. This is the difference between the first position calculated by the first calculation unit 34 from the first subject image) and the second position calculated by the second calculation unit 36 from the subject image (first subject image).

生成部40は、今回取得された被写体画像における、決定部38で決定された重畳位置に、衣服画像を重畳した合成画像を生成する。   The generation unit 40 generates a composite image in which the clothing image is superimposed on the superimposed position determined by the determination unit 38 in the subject image acquired this time.

詳細には、生成部40は、第1取得部22で取得した被写体画像としての、被写体の色画像上の重畳位置に、ユーザによる入力部16の操作指示によって指示され、調整部30で調整された重畳対象の衣服画像(色画像)を重畳する。これによって、生成部40は、合成画像を生成する。   Specifically, the generation unit 40 is instructed by a user's operation instruction of the input unit 16 at the superimposed position on the color image of the subject as the subject image acquired by the first acquisition unit 22 and adjusted by the adjustment unit 30. The clothing image (color image) to be superimposed is superimposed. Thereby, the generation unit 40 generates a composite image.

具体的には、生成部40は、調整部30で調整された衣服画像について、画素毎に定義された色値(Cr,Cg,Cb)、及びアルファ値(a)を参照する。なお、アルファ値aは、0以上1以下の値である。また、被写体の色画像についても、画素毎の色値(Ir,Ig,Ib)を参照する。そして、同じ画素位置の画素毎に、下記式(2)を用いて、画素毎の画素値(色値及びアルファ値)を定めることで、合成画像を生成する。   Specifically, the generation unit 40 refers to the color value (Cr, Cg, Cb) and the alpha value (a) defined for each pixel for the clothing image adjusted by the adjustment unit 30. The alpha value a is a value between 0 and 1. For the subject color image, the color values (Ir, Ig, Ib) for each pixel are referred to. Then, for each pixel at the same pixel position, a composite image is generated by determining a pixel value (color value and alpha value) for each pixel using the following formula (2).

なお、衣服画像が、被写体の色画像の一部の領域のみを占有している場合、衣服画像の占有領域外の領域では、アルファ値の値は“0”(a=0)として計算する。   When the clothing image occupies only a partial area of the color image of the subject, the alpha value is calculated as “0” (a = 0) in the area outside the occupied area of the clothing image.

Ox=(1−a)×Ix+a×Cx ・・・式(2)   Ox = (1-a) × Ix + a × Cx (2)

式(2)中、xは、r、g、bを示す。   In formula (2), x represents r, g, or b.

提示制御部42は、合成画像を提示部20に提示する制御を行う。   The presentation control unit 42 performs control for presenting the composite image to the presentation unit 20.

次に、本実施の形態の画像処理装置12で実行する画像処理を説明する。   Next, image processing executed by the image processing apparatus 12 according to the present embodiment will be described.

図10は、本実施の形態の画像処理装置12で実行する画像処理の手順を示すフローチャートである。   FIG. 10 is a flowchart illustrating a procedure of image processing executed by the image processing apparatus 12 according to the present embodiment.

画像処理装置12では、撮像部14から被写体画像を1枚(同じタイミングで撮像された、被写体のデプス画像及び被写体画像の色画像の各々を1枚)受け付ける毎に、ステップS100〜ステップS130の処理を実行する。なお、画像処理装置12が、撮像部14から複数フレームからなる動画像を受け付ける場合には、画像処理装置12は、フレーム毎にステップS100〜ステップS130の処理を実行する。   Each time the image processing apparatus 12 receives one subject image (one depth image of the subject and one color image of the subject image taken at the same timing) from the imaging unit 14, the processing in steps S <b> 100 to S <b> 130 is performed. Execute. Note that when the image processing device 12 receives a moving image including a plurality of frames from the imaging unit 14, the image processing device 12 executes the processes of steps S100 to S130 for each frame.

まず、第1取得部22が、被写体画像を取得する(ステップS100)。   First, the first acquisition unit 22 acquires a subject image (step S100).

次に、抽出部32が、抽出処理を実行する(ステップS102)。具体的には、ステップS102において、抽出部32は、ステップS100で取得された被写体のデプス画像から、骨格情報を生成する。また、本実施の形態では、抽出部32は、被写体の骨格情報の座標系(すなわち、第1撮像部14Aの座標系)を、第2撮像部14Bの座標系に変換する。   Next, the extraction part 32 performs an extraction process (step S102). Specifically, in step S102, the extraction unit 32 generates skeleton information from the depth image of the subject acquired in step S100. In the present embodiment, the extraction unit 32 converts the coordinate system of the skeleton information of the subject (that is, the coordinate system of the first imaging unit 14A) into the coordinate system of the second imaging unit 14B.

次に、判別部28が、上記ステップS100で取得した被写体画像が、第1条件を満たすか否かを判別する(ステップS104)。   Next, the determination unit 28 determines whether or not the subject image acquired in step S100 satisfies the first condition (step S104).

ステップS104で肯定判断すると(ステップS104:Yes)、ステップS106へ進む。   If an affirmative determination is made in step S104 (step S104: Yes), the process proceeds to step S106.

ステップS106では、調整部30が、調整処理を実行する(ステップS106)。ステップS106において、調整部30は、重畳対象の衣服画像の輪郭の少なくとも一部と、被写体画像の輪郭の少なくとも一部とが一致するように、衣服画像及び被写体画像の少なくとも一方を拡大または縮小する。また、調整部30は、拡大または縮小後の衣服画像と、拡大または縮小後の被写体画像と、から、第1算出部34で用いる特徴領域を抽出する。   In step S106, the adjustment unit 30 executes an adjustment process (step S106). In step S106, the adjustment unit 30 enlarges or reduces at least one of the clothing image and the subject image so that at least a part of the contour of the clothing image to be superimposed matches at least a part of the contour of the subject image. . Further, the adjustment unit 30 extracts a feature region used by the first calculation unit 34 from the enlarged or reduced clothing image and the enlarged or reduced subject image.

なお、重畳対象の衣服画像は、調整部30による調整処理中に取得される。ステップS106の調整処理の手順の詳細は、後述する。   Note that the clothing image to be superimposed is acquired during the adjustment process by the adjustment unit 30. Details of the adjustment process in step S106 will be described later.

次に、第1算出部34が、第1位置算出処理を実行する(ステップS108)。ステップS108では、第1算出部34は、調整部30で取得された重畳対象の衣服画像における特徴領域の位置と、ステップS100で取得された被写体画像における特徴領域の位置と、が一致するように、被写体画像における衣服画像の第1位置を算出する。なお、ステップS108の第1位置算出処理の手順の詳細は、後述する。   Next, the 1st calculation part 34 performs a 1st position calculation process (step S108). In step S108, the first calculation unit 34 makes the position of the feature region in the clothing image to be superimposed acquired by the adjustment unit 30 coincide with the position of the feature region in the subject image acquired in step S100. The first position of the clothing image in the subject image is calculated. Details of the procedure of the first position calculation process in step S108 will be described later.

次に、第1算出部34は、算出した第1位置を、上記ステップS100で取得した被写体画像を特定可能な情報に対応づけて記憶部18に記憶する(ステップ110)。特定可能な情報は、例えば、被写体画像の取得日時等を用いる。   Next, the first calculation unit 34 stores the calculated first position in the storage unit 18 in association with information that can identify the subject image acquired in step S100 (step 110). As the identifiable information, for example, the acquisition date of the subject image is used.

次に、第2算出部36が、第2位置算出処理を実行する(ステップS112)。ステップS112では、第2算出部36は、調整部30で取得された重畳対象の衣服画像における特徴点の位置と、被写体画像における特徴点の位置と、が一致するように、被写体画像における衣服画像の第2位置を算出する。第2位置算出処理の詳細は後述する。   Next, the 2nd calculation part 36 performs a 2nd position calculation process (step S112). In step S112, the second calculation unit 36 causes the clothing image in the subject image so that the position of the feature point in the clothing image to be superimposed acquired by the adjustment unit 30 matches the position of the feature point in the subject image. The second position of is calculated. Details of the second position calculation process will be described later.

次に、第2算出部36は、算出した第2位置を、上記ステップS100で取得した被写体画像を特定可能な情報に対応づけて記憶部18に記憶する(ステップS114)。この特定可能な情報には、ステップS110と同じ情報を用いればよい。   Next, the second calculation unit 36 stores the calculated second position in the storage unit 18 in association with information that can identify the subject image acquired in step S100 (step S114). For this identifiable information, the same information as in step S110 may be used.

次に、決定部38が、上記ステップS108で算出された第1位置と、前記ステップS112で算出された第2位置と、を記憶部18から読取り、これらの差分を算出する(ステップS116)。そそいて、決定部38は、算出した差分を、上記ステップS110及びステップS114で用いた被写体画像を特定可能な情報に対応づけて記憶部18に記憶する(ステップS118)。   Next, the determination unit 38 reads the first position calculated in step S108 and the second position calculated in step S112 from the storage unit 18, and calculates a difference between them (step S116). Accordingly, the determination unit 38 stores the calculated difference in the storage unit 18 in association with information that can identify the subject image used in Steps S110 and S114 (Step S118).

なお、決定部38は、記憶部18に、既に差分が記憶されている場合には、記憶されている差分を、ステップS116で新たに算出した差分に上書きしてもよい。このようにして、決定部38、ステップS116で算出した差分として、最新の差分のみを記憶部18に記憶してもよい。   When the difference is already stored in the storage unit 18, the determination unit 38 may overwrite the stored difference on the difference newly calculated in step S <b> 116. In this way, only the latest difference may be stored in the storage unit 18 as the difference calculated in the determination unit 38 and step S116.

次に、決定部38が、重畳位置を決定する(ステップS120)。ステップS120では、決定部38は、上記ステップS108で算出された第1位置を、ステップS100で取得した被写体画像における、上記ステップS106の調整処理によって取得した重畳対象の衣服画像の重畳位置として決定する。そして、後述するステップS126へ進む。   Next, the determination part 38 determines a superimposition position (step S120). In step S120, the determination unit 38 determines the first position calculated in step S108 as the superimposed position of the clothing image to be superimposed acquired by the adjustment process in step S106 in the subject image acquired in step S100. . And it progresses to step S126 mentioned later.

ステップS104〜ステップS120の処理によって、画像処理装置12では、ステップS100で取得された被写体画像が、判別部28によって第1条件を満たすと判別された場合、第1算出部34で算出された第1位置を、該被写体画像における衣服画像の重畳位置として決定する。   In the image processing apparatus 12, when the subject image acquired in step S <b> 100 is determined to satisfy the first condition by the processing in steps S <b> 104 to S <b> 120, the first calculation unit 34 calculates the first image. One position is determined as a superimposed position of the clothing image in the subject image.

一方、上記ステップS104で否定判断されると(ステップS104:No)、ステップS122へ進む。ステップS122では、上記ステップS112と同様にして、第2算出部36が、第2位置算出処理を実行する(ステップS122)(詳細後述)。   On the other hand, if a negative determination is made in step S104 (step S104: No), the process proceeds to step S122. In step S122, similarly to step S112, the second calculation unit 36 executes a second position calculation process (step S122) (details will be described later).

次に、決定部38が、重畳位置を決定する(ステップS124)。   Next, the determination part 38 determines a superimposition position (step S124).

具体的には、決定部38は、第1算出部34で、今回取得された被写体画像より前に取得された被写体画像(第1被写体画像)から算出された第1位置と、該第1位置の算出に用いた被写体画像(第1被写体画像)から第2算出部36で算出された第2位置と、の差分を、記憶部18から読み取る。決定部38は、記憶部18に記憶されている差分の内、最新の差分(すなわち、前回算出された差分)を読取る。そして、決定部38は、上記ステップS122で今回取得した被写体画像から算出された第2位置を、読取った該差分に応じてずらした位置を、重畳位置として決定する。   Specifically, the determination unit 38 includes a first position calculated from the subject image (first subject image) acquired before the subject image acquired this time by the first calculation unit 34, and the first position. The difference between the subject image (first subject image) used for the calculation and the second position calculated by the second calculation unit 36 is read from the storage unit 18. The determination unit 38 reads the latest difference (that is, the previously calculated difference) among the differences stored in the storage unit 18. Then, the determination unit 38 determines a position where the second position calculated from the subject image acquired this time in step S122 is shifted according to the read difference as the superposition position.

なお、上記ステップS122で今回取得した被写体画像から算出された該第2位置をずらす方向は、前回第2算出部36で算出された第2位置を始点、前回第1算出部34で算出された第1位置を終点、とする方向ベクトルに対して平行な方向である。そして、ステップS126へ進む。   Note that the direction in which the second position calculated from the subject image acquired this time in step S122 is shifted is the second position calculated by the second calculation unit 36 last time, and is calculated by the first calculation unit 34 last time. The direction is parallel to the direction vector having the first position as the end point. Then, the process proceeds to step S126.

次に、生成部40が、合成画像を生成する(ステップS126)。ステップS126では、生成部40は、上記ステップS100で取得した被写体の色画像上の重畳位置に、上記ステップS106の調整処理によって取得され且つ被写体画像に応じて拡大または縮小された重畳対象の衣服画像を重畳することで、合成画像を生成する。   Next, the generation unit 40 generates a composite image (step S126). In step S126, the generation unit 40 acquires the clothing image to be superimposed on the superimposed position on the color image of the subject acquired in step S100 and acquired by the adjustment process in step S106 and enlarged or reduced according to the subject image. Are combined to generate a composite image.

次に、提示制御部42が、上記ステップS128で生成された合成画像を、提示部20へ提示する制御を行う(ステップS128)。   Next, the presentation control unit 42 performs control to present the composite image generated in step S128 to the presentation unit 20 (step S128).

次に、画像処理装置12では、画像処理を終了するか否かを判別する(ステップS130)。画像処理装置12は、例えば、画像処理装置12の図示を省略する終了指示ボタンがユーザの操作指示によって操作されることで、終了指示を示す信号を受け付けたか否かを判別することによって行う。   Next, the image processing apparatus 12 determines whether or not to end the image processing (step S130). The image processing apparatus 12 performs, for example, by determining whether or not a signal indicating an end instruction is received by operating an end instruction button (not shown) of the image processing apparatus 12 according to a user operation instruction.

ステップS130で否定判断すると(ステップS130:No)、上記ステップS100へ戻る。ステップS130で肯定判断すると(ステップS130:Yes)、本ルーチンを終了する。   If a negative determination is made in step S130 (step S130: No), the process returns to step S100. If an affirmative determination is made in step S130 (step S130: Yes), this routine is terminated.

次に、上記ステップS106の調整処理について説明する。   Next, the adjustment process in step S106 will be described.

図11は、調整部30が実行する調整処理の手順を示すフローチャートである。   FIG. 11 is a flowchart illustrating a procedure of adjustment processing executed by the adjustment unit 30.

まず、調整部30は、ステップS102(図10参照)において抽出部32で作成された被写体の骨格情報から、被写体の向きを算出する(ステップS200)。   First, the adjustment unit 30 calculates the orientation of the subject from the skeleton information of the subject created by the extraction unit 32 in step S102 (see FIG. 10) (step S200).

次に、調整部30は、ユーザによって選択された衣服番号に対応する衣服画像の内、上記ステップS200で算出された被写体の向き(被写体の姿勢情報)に対応する姿勢情報の衣服画像を、記憶部18の第1テーブルから読み取る(ステップS202)。   Next, the adjustment unit 30 stores a clothing image having posture information corresponding to the orientation of the subject (subject orientation information) calculated in step S200 among the clothing images corresponding to the clothing number selected by the user. Read from the first table of the unit 18 (step S202).

次に、調整部30は、第3取得部22Aで取得した被写体のデプス画像を調整する(ステップS204)。具体的には、調整部30は、被写体のデプス画像の各画素の画素位置の座標系(第1撮像部14Aの座標系)を、第2撮像部14Bの座標系に変換する。そして、調整部30は、座標変換後の被写体のデプス画像を構成する各画素位置の画素が、同じタイミングで取得された被写体の色画像を構成する各画素の画素位置に対応する位置となるように射影することで、被写体のデプス画像の解像度を、被写体の色画像と同じ解像度に調整する。   Next, the adjustment unit 30 adjusts the depth image of the subject acquired by the third acquisition unit 22A (step S204). Specifically, the adjustment unit 30 converts the coordinate system of the pixel positions of each pixel of the depth image of the subject (the coordinate system of the first imaging unit 14A) into the coordinate system of the second imaging unit 14B. Then, the adjustment unit 30 causes the pixels at the respective pixel positions constituting the depth image of the subject after coordinate conversion to be positions corresponding to the pixel positions of the respective pixels constituting the color image of the subject acquired at the same timing. The resolution of the depth image of the subject is adjusted to the same resolution as the color image of the subject.

次に、調整部30は、上記ステップS202で読取った衣服画像における特徴領域の大きさ、及び被写体画像における特徴領域の大きさ、の各々を算出する(ステップS206)。上述ように、本実施の形態では、特徴領域として、肩領域を用いる。このため、本実施の形態では、調整部30は、上記ステップS202で読取った衣服画像における肩幅と、上記ステップS100(図10参照)で取得した被写体画像における肩幅と、の各々を算出する。   Next, the adjustment unit 30 calculates the size of the feature area in the clothing image read in step S202 and the size of the feature area in the subject image (step S206). As described above, in the present embodiment, the shoulder region is used as the feature region. Therefore, in the present embodiment, the adjustment unit 30 calculates each of the shoulder width in the clothing image read in step S202 and the shoulder width in the subject image acquired in step S100 (see FIG. 10).

次に、調整部30は、上記ステップS206で算出された特徴領域の大きさ、すなわち、衣服画像の肩幅と、被写体画像の肩幅と、から、衣服画像のスケーリング値(拡大縮小率)を決定する(ステップS208)。   Next, the adjustment unit 30 determines the scaling value (enlargement / reduction ratio) of the clothing image from the size of the feature region calculated in step S206, that is, the shoulder width of the clothing image and the shoulder width of the subject image. (Step S208).

次に、調整部30は、上記ステップS202で読取った衣服画像を、ステップS208で決定されたスケーリング値によって特定される拡大縮小率で、スケーリング(拡大または縮小)する(ステップS210)。同様に、調整部30は、重畳対象の衣服画像の姿勢情報に含まれる骨格情報についても、同じスケーリング値で特定される拡大縮小率で、拡大または縮小する。   Next, the adjustment unit 30 scales (enlarges or reduces) the clothing image read in step S202 with the enlargement / reduction ratio specified by the scaling value determined in step S208 (step S210). Similarly, the adjustment unit 30 enlarges or reduces the skeleton information included in the posture information of the clothing image to be superimposed at the enlargement / reduction ratio specified by the same scaling value.

次に、調整部30は、上記ステップS210で拡大または縮小された後の衣服画像と、上記ステップS100(図10参照)で取得した被写体画像と、から、特徴領域を抽出する。   Next, the adjustment unit 30 extracts a feature region from the clothing image enlarged or reduced in step S210 and the subject image acquired in step S100 (see FIG. 10).

まず、調整部30は、上記ステップS210で拡大または縮小された後の衣服画像と、上記ステップS100(図10参照)で取得した被写体画像と、の各々の輪郭を抽出する(ステップS212)。次に、調整部30は、衣服画像の輪郭と、被写体画像の輪郭と、の各々における肩領域を抽出する(ステップS214)。そして、本ルーチンを終了する。   First, the adjustment unit 30 extracts the contours of the clothing image that has been enlarged or reduced in step S210 and the subject image acquired in step S100 (see FIG. 10) (step S212). Next, the adjustment unit 30 extracts a shoulder region in each of the outline of the clothing image and the outline of the subject image (step S214). Then, this routine ends.

なお、上記ステップS208では、衣服画像のスケーリング値(拡大縮小率)を決定し、衣服画像を該スケーリング値によって特定される拡大縮小率にスケーリングする場合を説明した。しかし、衣服画像の輪郭及び被写体画像の輪郭の少なくとも一部が一致するように、衣服画像及び被写体画像の少なくとも一方の拡大縮小率を求めればよい。そして、決定した衣服画像の拡大縮小率の逆数で、該被写体画像をスケーリングしてもよい。   In step S208, the case has been described in which the clothing image scaling value (enlargement / reduction ratio) is determined and the clothing image is scaled to the enlargement / reduction ratio specified by the scaling value. However, the enlargement / reduction ratio of at least one of the clothing image and the subject image may be obtained so that at least a part of the contour of the clothing image matches the contour of the subject image. Then, the subject image may be scaled by the reciprocal of the determined enlargement / reduction ratio of the clothing image.

ステップS200〜ステップS214の処理を実行することによって、調整部30は、重畳対象の衣服画像の輪郭の少なくとも一部と、被写体画像の輪郭の少なくとも一部とが一致するように、衣服画像及び被写体画像の少なくとも一方を拡大または縮小する。また、調整部30は、拡大または縮小後の衣服画像と、拡大または縮小後の被写体画像と、から、特徴領域として、肩領域を抽出する。   By executing the processing of step S200 to step S214, the adjustment unit 30 causes the clothing image and the subject to match at least a part of the contour of the clothing image to be superimposed and at least a part of the contour of the subject image. Enlarge or reduce at least one of the images. In addition, the adjustment unit 30 extracts a shoulder region as a feature region from the enlarged or reduced clothing image and the enlarged or reduced subject image.

次に、図10のステップS108で説明した、第1算出部34が実行する第1位置算出処理の手順を説明する。   Next, the procedure of the first position calculation process executed by the first calculation unit 34 described in step S108 of FIG. 10 will be described.

図12は、第1算出部34が実行する第1位置算出処理の手順を示すフローチャートである。   FIG. 12 is a flowchart illustrating a procedure of the first position calculation process executed by the first calculation unit 34.

第1算出部34は、調整部30で抽出された、特徴領域としてとしての、被写体画像の肩領域と、衣服画像の肩領域と、を用いて、公知のテンプレートマッチングを実行する(ステップS400)。ステップS400では、第1算出部34は、テンプレートマッチングによって、調整部30で調整された被写体のデプス画像を探索し、該デプス画像上における、衣服画像における特定領域(肩領域)と一致する位置を、第1位置として算出する。   The first calculation unit 34 performs known template matching using the shoulder region of the subject image and the shoulder region of the clothing image as the feature regions extracted by the adjustment unit 30 (step S400). . In step S400, the first calculation unit 34 searches for the depth image of the subject adjusted by the adjustment unit 30 by template matching, and determines a position on the depth image that matches the specific region (shoulder region) in the clothing image. And calculated as the first position.

そして、第1算出部34は、算出した第1位置を、判別部28へ出力する(ステップS402)。そして、本ルーチンを終了する。   Then, the first calculation unit 34 outputs the calculated first position to the determination unit 28 (step S402). Then, this routine ends.

次に、図10のステップS112及びステップS122で説明した、第2算出部36が実行する第2位置算出処理の手順を説明する。   Next, the procedure of the second position calculation process executed by the second calculation unit 36 described in step S112 and step S122 in FIG. 10 will be described.

図13は、第2算出部36が実行する第2位置算出処理の手順を示すフローチャートである。   FIG. 13 is a flowchart showing the procedure of the second position calculation process executed by the second calculation unit 36.

まず、第2算出部36は、衣服画像の特徴点として、衣服画像の両肩間の中心位置を算出する(ステップS300)。   First, the 2nd calculation part 36 calculates the center position between the both shoulders of a clothing image as a feature point of a clothing image (step S300).

次に、第2算出部36は、被写体画像の両肩間の中心位置を算出する(ステップS302)。具体的には、第2算出部36は、上記ステップ106(図10参照)の処理によって抽出部32で作成された被写体の骨格情報から、被写体の両肩間の中心位置を算出する。   Next, the second calculation unit 36 calculates the center position between the shoulders of the subject image (step S302). Specifically, the second calculation unit 36 calculates the center position between both shoulders of the subject from the skeleton information of the subject created by the extraction unit 32 by the processing of step 106 (see FIG. 10).

次に、第2算出部36は、ステップS300で算出された中心位置と、ステップS302で算出された中心位置と、が一致するように、第2位置を算出する(ステップS304)。本実施の形態では、第2算出部36は、ステップS302で算出された被写体画像における両肩間の中心位置を、第2位置として算出する。   Next, the second calculation unit 36 calculates the second position so that the center position calculated in step S300 matches the center position calculated in step S302 (step S304). In the present embodiment, the second calculation unit 36 calculates the center position between both shoulders in the subject image calculated in step S302 as the second position.

そして、本ルーチンを終了する。   Then, this routine ends.

図14は、本実施の形態の画像処理装置12における合成画像の生成を模式的に示す説明図である。   FIG. 14 is an explanatory diagram schematically illustrating generation of a composite image in the image processing apparatus 12 according to the present embodiment.

例えば、重畳対象の衣服画像が衣服画像61A(図14(A)参照)であったとする。また、被写体のデプス画像が、デプス画像71C(図14(D)参照)であったとする。   For example, it is assumed that the clothing image to be superimposed is a clothing image 61A (see FIG. 14A). Further, it is assumed that the depth image of the subject is a depth image 71C (see FIG. 14D).

この場合、調整部30による調整処理によって、衣服画像61Aの輪郭61Bが抽出される(図14(B)参照)。さらに、調整部30による調整処理によって、特徴領域として、肩領域61Dが抽出される(図14(C)参照)。   In this case, the outline 61B of the clothing image 61A is extracted by the adjustment process by the adjustment unit 30 (see FIG. 14B). Further, a shoulder region 61D is extracted as a feature region by the adjustment processing by the adjustment unit 30 (see FIG. 14C).

同様に、調整部30による調整処理によって、被写体のデプス画像71Cから輪郭71Bが抽出される(図14(E)参照)。さらに、調整部30による調整処理によって、特徴領域として、肩領域71Dが抽出される(図14(F)参照)。   Similarly, the contour 71B is extracted from the depth image 71C of the subject by the adjustment processing by the adjustment unit 30 (see FIG. 14E). Further, a shoulder region 71D is extracted as a feature region by the adjustment processing by the adjustment unit 30 (see FIG. 14F).

判別部28によって被写体画像が第1条件を満たすと判別された場合、第1算出部34は、衣服画像61Aの肩領域61Dと、被写体のデプス画像71Cの肩領域71Dと、を用いたテンプレートマッチング(図14(G))を行うことで、第1位置(図14では図示省略)を算出する。決定部38は、判別部28によって被写体画像が第1条件を満たすと判別された場合、第1位置を重畳位置として決定する。   When the determination unit 28 determines that the subject image satisfies the first condition, the first calculation unit 34 performs template matching using the shoulder region 61D of the clothing image 61A and the shoulder region 71D of the subject depth image 71C. By performing (FIG. 14G), the first position (not shown in FIG. 14) is calculated. When the determination unit 28 determines that the subject image satisfies the first condition, the determination unit 38 determines the first position as the superimposed position.

そして、生成部40は、第1取得部22で取得した被写体の色画像上の重畳位置に、上記ステップS106の調整処理によって取得され且つ被写体画像に応じて拡大または縮小された重畳対象の衣服画像を、重畳することで、合成画像Wを生成する(図14(H)算出)。   Then, the generating unit 40 acquires the clothing image to be superimposed on the superimposed position on the color image of the subject acquired by the first acquiring unit 22 and acquired by the adjustment process in step S106 and enlarged or reduced according to the subject image. Are superimposed on each other to generate a composite image W (calculation in FIG. 14H).

以上説明したように、本実施の形態の画像処理装置12では、第1取得部22で取得された被写体画像が、判別部28によって第1条件を満たすと判別された場合、第1算出部34で算出された第1位置を、該被写体画像における衣服画像の重畳位置として決定する。そして、生成部40は、第1取得部22で取得した被写体の色画像上の重畳位置に、上記ステップS106の調整処理によって取得され且つ被写体画像に応じて拡大または縮小された重畳対象の衣服画像を、重畳することで、合成画像を生成する。   As described above, in the image processing apparatus 12 according to the present embodiment, when the subject image acquired by the first acquisition unit 22 is determined to satisfy the first condition by the determination unit 28, the first calculation unit 34 is used. The first position calculated in the above is determined as the superimposed position of the clothing image in the subject image. Then, the generating unit 40 acquires the clothing image to be superimposed on the superimposed position on the color image of the subject acquired by the first acquiring unit 22 and acquired by the adjustment process in step S106 and enlarged or reduced according to the subject image. Are combined to generate a composite image.

一方、画像処理装置12では、第1取得部22で取得された被写体画像が、判別部28によって第1条件を満たさないと判別された場合、該被写体画像より前に取得された被写体画像である第1被写体画像に対して算出された第1位置と該第1被写体画像から第2算出部36で算出された第2位置との差分から、重畳位置を決定する。   On the other hand, in the image processing apparatus 12, when the subject image acquired by the first acquisition unit 22 is determined not to satisfy the first condition by the determination unit 28, the subject image is acquired before the subject image. The superposition position is determined from the difference between the first position calculated for the first subject image and the second position calculated by the second calculation unit 36 from the first subject image.

なお、第1条件は、第1算出部34で第1位置の算出処理を実行するか否かを判断するための条件である。そして、生成部40は、第1取得部22で取得した被写体画像上の重畳位置に、上記ステップS106の調整処理によって取得され且つ被写体画像に応じて拡大または縮小された重畳対象の衣服画像を重畳することで、合成画像を生成する。   The first condition is a condition for determining whether or not the first calculation unit 34 executes the first position calculation process. Then, the generation unit 40 superimposes the clothing image to be superimposed acquired by the adjustment process in step S106 and enlarged or reduced according to the subject image on the superposition position on the subject image acquired by the first acquisition unit 22. By doing so, a composite image is generated.

このように、本実施の形態の画像処理装置12によれば、取得した被写体画像の内、第1条件を満たすと判別された被写体画像についてのみ、第1算出部34で第1位置の算出処理を実行する。そして、決定部38が、第1位置を重畳位置として決定する。一方、第1条件を満たさないと判別された被写体画像については、第1算出部34で第1位置の算出処理を行わず、第1算出部34で前回算出された第1位置と該第1位置の算出に用いた被写体画像(第1被写体画像)から第2算出部36で算出された第2位置との差分から、重畳位置を決定する。   As described above, according to the image processing device 12 of the present embodiment, the first calculation unit 34 calculates the first position only for the subject images determined to satisfy the first condition among the acquired subject images. Execute. Then, the determination unit 38 determines the first position as the overlapping position. On the other hand, for a subject image determined not to satisfy the first condition, the first calculation unit 34 does not perform the first position calculation process, and the first calculation unit 34 calculates the first position and the first position. The superimposed position is determined from the difference between the subject image (first subject image) used for calculating the position and the second position calculated by the second calculating unit 36.

従って、本実施の形態の画像処理装置12は、精度向上を図りつつ、且つ低負荷で合成画像を提供することができる。   Therefore, the image processing apparatus 12 according to the present embodiment can provide a composite image with a low load while improving accuracy.

なお、本実施の形態の画像処理装置12では、調整部30は、第1取得部22で取得された被写体画像が、判別部28によって第1条件を満たすと判別された場合に、調整処理を行う場合を説明した。しかし、調整部30は、第1取得部22で取得された被写体画像が、第1条件を満たすか否かに拘らず、上述した調整処理を実行してもよい。しかし、調整部30による上記調整処理は、第1算出部34より処理負荷が低いものの、第2算出部36より処理負荷が高い。このため、調整部30による調整処理は、上記実施の形態で示したように、第1取得部22で取得された被写体画像が、判別部28によって第1条件を満たすと判別された場合に実行することが好ましい。   In the image processing apparatus 12 according to the present embodiment, the adjustment unit 30 performs the adjustment process when it is determined by the determination unit 28 that the subject image acquired by the first acquisition unit 22 satisfies the first condition. Explained when to do. However, the adjustment unit 30 may execute the adjustment process described above regardless of whether the subject image acquired by the first acquisition unit 22 satisfies the first condition. However, the adjustment process performed by the adjustment unit 30 has a lower processing load than the first calculation unit 34 but a higher processing load than the second calculation unit 36. For this reason, the adjustment processing by the adjustment unit 30 is executed when the subject image acquired by the first acquisition unit 22 is determined to satisfy the first condition by the determination unit 28 as described in the above embodiment. It is preferable to do.

なお、本実施の形態では、調整部30は、抽出した特徴領域について、被写体の姿勢情報に応じた重み付処理を行ってもよい。この場合、第1算出部34は、重み付処理された特徴領域を用いて、テンプレートマッチングを行う。   In the present embodiment, the adjustment unit 30 may perform a weighting process on the extracted feature area according to the posture information of the subject. In this case, the first calculation unit 34 performs template matching using the weighted feature region.

具体的には、調整部30は、被写体のデプス画像から抽出した輪郭から、特徴領域を抽出するときに、被写体画像の撮像時により撮像部14に近い位置に位置していた領域ほど、輝度値の高い輪郭となるように、肩領域の輪郭を抽出する。   Specifically, when the adjustment unit 30 extracts a feature region from the contour extracted from the depth image of the subject, the luminance value of the region located closer to the imaging unit 14 when the subject image is captured is larger. The contour of the shoulder region is extracted so that the contour becomes high.

例えば、被写体が撮像部14に対して左に傾いた方向を向いている場合、被写体の左肩は右肩に比べて撮像部14に近い状態で撮像される。このため、被写体画像の姿勢情報が、撮像部14に対して正面を向いた姿勢から左方向に傾いた姿勢であることを示す場合には、調整部30は、被写体のデプス画像から抽出した輪郭における、左肩に相当する領域の輪郭を右肩に相当する領域の輪郭に比べて輝度値を高くするように、重み付処理を行う。   For example, when the subject is facing the direction tilted to the left with respect to the imaging unit 14, the left shoulder of the subject is imaged in a state closer to the imaging unit 14 than the right shoulder. For this reason, when the posture information of the subject image indicates that the posture is tilted to the left from the posture facing the front with respect to the imaging unit 14, the adjustment unit 30 extracts the contour extracted from the depth image of the subject. The weighting process is performed so that the brightness value of the contour of the region corresponding to the left shoulder is higher than the contour of the region corresponding to the right shoulder.

なお、調整部30は、重み付処理を行う対象の画素位置の画素の画素値に、予め定めた定数を乗算することで、重み付処理を行う。なお、調整部30は、デプス画像から、より撮像部14に近い画素位置の画素を求め、撮像部14に近い画素位置の画素ほど高い定数を用いて、重み付処理を行ってもよい。   The adjustment unit 30 performs the weighting process by multiplying the pixel value of the pixel at the target pixel position to be subjected to the weighting process by a predetermined constant. Note that the adjustment unit 30 may obtain a pixel at a pixel position closer to the imaging unit 14 from the depth image, and perform the weighting process using a higher constant for a pixel at a pixel position closer to the imaging unit 14.

同様に、調整部30は、衣服画像についても、衣服画像から抽出した輪郭から特徴領域を抽出するときに、重畳対象の衣服画像における撮像時に撮像部14により近い位置に位置していた領域ほど、輝度値の高い輪郭となるように、肩領域の輪郭を抽出する。   Similarly, when the adjustment unit 30 extracts a feature region from the contour extracted from the clothing image, the adjustment unit 30 is closer to the imaging unit 14 at the time of imaging in the clothing image to be superimposed. The contour of the shoulder region is extracted so that the contour has a high luminance value.

このような重み付けを行うことで、第1算出部34によるテンプレートマッチング処理においては、より撮像部14側により近い領域の精度が高くなるように、第1位置を算出することができる。このため、さらなる精度向上が図れる。   By performing such weighting, in the template matching process by the first calculation unit 34, the first position can be calculated so that the accuracy of the region closer to the imaging unit 14 side becomes higher. For this reason, further improvement in accuracy can be achieved.

図15は、調整部30が重み付処理を行う場合の、合成画像の生成を模式的に示す説明図である。   FIG. 15 is an explanatory diagram schematically illustrating generation of a composite image when the adjustment unit 30 performs weighting processing.

例えば、重畳対象の衣服画像が衣服画像61A(図15(A)参照)であったとする。また、被写体のデプス画像が、デプス画像71C(図15(D)参照)であったとする。このように、被写体が、撮像部14(図15では図示省略)に対して左肩が右肩に比べて撮像部14に近くなるように傾いた姿勢で撮像されたとする。この場合、上述したように、画像処理装置12では、この傾いた姿勢に対応する衣服画像が記憶部18から読み取られる。 For example, it is assumed that the clothing image to be superimposed is a clothing image 61A 2 (see FIG. 15A). Further, it is assumed that the depth image of the subject is the depth image 71C 2 (see FIG. 15D). As described above, it is assumed that the subject is imaged with a posture inclined such that the left shoulder is closer to the imaging unit 14 than the right shoulder with respect to the imaging unit 14 (not illustrated in FIG. 15). In this case, as described above, the image processing apparatus 12 reads the clothing image corresponding to the tilted posture from the storage unit 18.

この場合、調整部30による調整処理によって、衣服画像61Aの輪郭61Bが抽出される(図15(B)参照)。さらに、調整部30による調整処理によって、特徴領域として、肩領域61Dが抽出される(図15(C)参照)。このとき、調整部30は、左肩に相当する領域SAに重み付処理を行った上で、肩領域61Dを抽出する。このため、肩領域61Dは、図15(C)に示すように、人体の左肩に相当する領域SAの輝度値が高くなるように重み付処理された輪郭となる。 In this case, the adjustment process by adjusting unit 30, the outline 61B 2 of the clothing image 61A 2 are extracted (see FIG. 15 (B)). Moreover, the adjustment process by the adjusting unit 30, as a characteristic region, the shoulder region 61D 2 are extracted (see FIG. 15 (C)). In this case, the adjusting section 30, after performing weighted processing area SA corresponding to the left shoulder, it extracts the shoulder region 61D 2. Therefore, the shoulder region 61D 2, as shown in FIG. 15 (C), a contour which has been treated weighted so that the brightness value of the region SA corresponding to the human body left shoulder is higher.

同様に、調整部30による調整処理によって、被写体のデプス画像71Cから輪郭71Bが抽出される(図15(E)参照)。さらに、調整部30による調整処理によって、特徴領域として、肩領域71Dが抽出される(図15(C)参照)。このとき、調整部30は、左肩に相当する領域SBに重み付処理を行った上で、肩領域71Dを抽出する。このため、肩領域71Dは、図15(F)に示すように、人体の左肩に相当する領域SBの輝度値が高くなるように補正された輪郭となる。 Similarly, the adjustment process by adjusting unit 30, the outline 71B 2 from the depth image 71C 2 of the object is extracted (see FIG. 15 (E)). Moreover, the adjustment process by the adjusting unit 30, as a characteristic region, the shoulder region 71D 2 are extracted (see FIG. 15 (C)). In this case, the adjusting section 30, after performing weighted processing region SB corresponding to the left shoulder, it extracts the shoulder region 71D 2. Therefore, the shoulder region 71D 2, as shown in FIG. 15 (F), a corrected contoured so that the luminance value of the region SB corresponding to the human body left shoulder is higher.

判別部28によって被写体画像が第1条件を満たすと判別された場合、第1算出部34は、衣服画像61Aの肩領域61Dと、被写体のデプス画像71Cの肩領域71Dと、を用いたテンプレートマッチング(図15(G))を行うことで、第1位置(図15では図示省略)を算出する。 If the subject image by the discrimination unit 28 is determined as the first condition is satisfied, the first calculating section 34, a shoulder region 61D 2 of the garment image 61A 2, the shoulder region 71D 2 of the depth image 71C 2 of the object, the The first position (not shown in FIG. 15) is calculated by performing the used template matching (FIG. 15G).

このとき、衣服画像61Aの肩領域61Dと、被写体のデプス画像71Cの肩領域71Dと、は、より撮像部14側に近い領域である左肩に相当する領域の輝度値が高くなるように重み付処理された輪郭となっている。このため、第1算出部34では、この左肩に相当する領域の探索精度が高くなるように、テンプレートマッチングを行うことができる。 In this case, the shoulder region 61D 2 of the garment image 61A 2, the shoulder region 71D 2 of the depth image 71C 2 of the object, is higher luminance value of the region corresponding to the left shoulder is more area close to the imaging unit 14 side Thus, the contour is weighted. For this reason, the first calculation unit 34 can perform template matching so that the search accuracy of the region corresponding to the left shoulder is increased.

決定部38は、判別部28によって被写体画像が第1条件を満たすと判別された場合、第1位置を重畳位置として決定する。   When the determination unit 28 determines that the subject image satisfies the first condition, the determination unit 38 determines the first position as the superimposed position.

そして、生成部40は、第1取得部22で取得した被写体の色画像上の重畳位置に、上記ステップS106の調整処理によって取得され且つ被写体画像に応じて拡大または縮小された重畳対象の衣服画像を、重畳することで、合成画像WAを生成する(図15(H)参照)。   Then, the generating unit 40 acquires the clothing image to be superimposed on the superimposed position on the color image of the subject acquired by the first acquiring unit 22 and acquired by the adjustment process in step S106 and enlarged or reduced according to the subject image. Are superimposed on each other to generate a composite image WA (see FIG. 15H).

このように、調整部30が重み付処理を行うことによって、さらなる精度向上が図れる。   As described above, the adjustment unit 30 performs the weighting process, thereby further improving accuracy.

なお、本実施の形態では、特徴領域として、肩領域を用いる場合を説明した。これは、本実施の形態では、重畳対象の衣服画像として、人体の上半身側に試着する衣服の衣服画像を一例として挙げたためである。   In the present embodiment, the case where the shoulder region is used as the feature region has been described. This is because, in the present embodiment, as an example of a clothing image to be superimposed, a clothing image of clothing to be tried on the upper body side of the human body is given as an example.

しかし、上述したように、特徴領域は、衣服を試着する被写体の形状を推定可能な領域であればよく、肩領域に限られない。   However, as described above, the feature region is not limited to the shoulder region as long as the shape of the subject trying on clothes can be estimated.

また、特徴領域は、画像処理装置12で取得した被写体画像の被写体の姿勢に応じて設定してもよい。   The feature area may be set according to the posture of the subject of the subject image acquired by the image processing device 12.

例えば、撮像部14に対して真横を向いた姿勢の被写体の被写体画像を取得した場合、被写体の両肩部分の輪郭を抽出することは難しく、肩領域を特徴領域として用いることが難しい場合がある。   For example, when a subject image of a subject in a posture facing right side with respect to the imaging unit 14 is acquired, it is difficult to extract the contours of both shoulder portions of the subject, and it may be difficult to use the shoulder region as a feature region. .

そこで、画像処理装置12では、被写体画像の被写体の姿勢情報(被写体の向きを含む)と、姿勢情報に対応する特徴領域と、該特徴領域に応じた特徴点と、を予め記憶部18に記憶してもよい。この場合、姿勢情報に対応する特徴領域には、対応する姿勢情報の姿勢の被写体から該被写体の形状を推定可能な領域を予め定めればよい。例えば、撮像部14に対して横向きであることを示す姿勢情報には、腰領域または首領域を、特徴領域として予め定める。また、上述したように、特徴点は、対応する特徴領域に応じて予め定めればよい。   In view of this, the image processing apparatus 12 stores in advance in the storage unit 18 the orientation information (including the orientation of the subject) of the subject image, the feature region corresponding to the orientation information, and the feature point corresponding to the feature region. May be. In this case, an area in which the shape of the subject can be estimated from the subject having the posture of the corresponding posture information may be determined in advance as the feature region corresponding to the posture information. For example, a waist region or a neck region is determined in advance as a feature region in the posture information indicating that it is lateral to the imaging unit 14. Further, as described above, the feature points may be determined in advance according to the corresponding feature region.

そして、調整部30では、第1取得部22で取得された被写体画像から被写体の向きを算出した後、該被写体の向きの姿勢情報に対応する特徴領域及び特徴点を記憶部18から読取る。そして、調整部30は、読取った特徴領域を用いて、上記調整処理を実行する。また、調整部30は、読取った特徴領域を第1算出部34へ出力し、読取った特徴点を第2算出部36へ出力する。第1算出部34及び第2算出部36では、調整部30から受け付けた特徴領域及び特徴点を各々用いて、上記算出処理を実行すればよい。   Then, the adjustment unit 30 calculates the orientation of the subject from the subject image acquired by the first acquisition unit 22, and then reads the feature area and feature point corresponding to the orientation information of the orientation of the subject from the storage unit 18. Then, the adjustment unit 30 performs the adjustment process using the read feature area. Further, the adjustment unit 30 outputs the read feature area to the first calculation unit 34 and outputs the read feature points to the second calculation unit 36. The first calculation unit 34 and the second calculation unit 36 may perform the calculation process using the feature regions and feature points received from the adjustment unit 30.

また、本実施の形態では、第1撮像部14Aで取得した被写体のデプス画像を、第2撮像部14Bの座標系に変換した後に、第2撮像部14Bで取得した被写体の色画像上の重畳位置に、衣服画像を重畳した合成画像を生成する場合を説明した。   In the present embodiment, the depth image of the subject acquired by the first imaging unit 14A is converted into the coordinate system of the second imaging unit 14B, and then superimposed on the color image of the subject acquired by the second imaging unit 14B. A case has been described in which a composite image in which a clothing image is superimposed on a position is generated.

しかし、画像処理装置12では、衣服画像として、第1撮像部14Aにより撮像された衣服のデプス画像と、第2撮像部14Bにより撮像された衣服の色画像と、を用いて画像処理を行ってもよい。この場合、衣服のデプス画像と、被写体のデプス画像と、の位置合わせを第1撮像部14Aの座標系上で行った後に、衣服画像の重畳位置を第1撮像部14Aの座標系から第2撮像部14Bの座標系に変換する。   However, the image processing device 12 performs image processing using the clothes depth image captured by the first imaging unit 14A and the clothing color image captured by the second imaging unit 14B as the clothing image. Also good. In this case, after aligning the depth image of the clothes and the depth image of the subject on the coordinate system of the first image pickup unit 14A, the superimposed position of the clothes image is second from the coordinate system of the first image pickup unit 14A. Conversion to the coordinate system of the imaging unit 14B is performed.

この処理において、衣服の撮像時の第1撮像部14Aと、被写体の撮像時の第1撮像部14Aと、の位置が異なる場合であっても、公知の手法により座標変換を行うことが可能である。   In this process, even if the position of the first imaging unit 14A when capturing clothes is different from the position of the first imaging unit 14A when capturing a subject, coordinate conversion can be performed by a known method. is there.

(実施の形態2)
図16は、画像処理システム10Aを示す模式図である。
(Embodiment 2)
FIG. 16 is a schematic diagram showing the image processing system 10A.

画像処理システム10Aは、記憶装置72と、処理装置11と、が通信回線74を介して接続されている。   In the image processing system 10 </ b> A, a storage device 72 and a processing device 11 are connected via a communication line 74.

記憶装置72は、実施の形態1における記憶部18を備えた装置であり、公知のパーソナルコンピュータ等である。処理装置11は、実施の形態1における、画像処理装置12、撮像部14、入力部16、及び提示部20を備えた装置である。なお、実施の形態1と同じ機能部には同じ符号を付与して詳細な説明を省略する。通信回線74は、インターネット等の通信回線であり、有線通信回線や、無線通信回線がある。   The storage device 72 is a device including the storage unit 18 in the first embodiment, and is a known personal computer or the like. The processing device 11 is a device including the image processing device 12, the imaging unit 14, the input unit 16, and the presentation unit 20 in the first embodiment. In addition, the same code | symbol is provided to the same function part as Embodiment 1, and detailed description is abbreviate | omitted. The communication line 74 is a communication line such as the Internet, and includes a wired communication line and a wireless communication line.

図16に示すように、記憶部18を、通信回線74を介して処理装置11(画像処理装置12)に接続された記憶装置72に設けた構成とすることで、複数の処理装置(画像処理装置12)から同じ記憶部18にアクセスすることができ、記憶部18に記憶されているデータの一元管理が可能となる。   As shown in FIG. 16, the storage unit 18 is provided in a storage device 72 connected to the processing device 11 (image processing device 12) via a communication line 74, so that a plurality of processing devices (image processing) are provided. The same storage unit 18 can be accessed from the apparatus 12), and centralized management of data stored in the storage unit 18 becomes possible.

なお、処理装置11は、任意の箇所に設置可能である。例えば、処理装置11を、ユーザが合成画像を視認する場所、例えば、店舗等に設置してもよい。また、処理装置11の各機能を、公知の携帯端末に搭載してもよい。   In addition, the processing apparatus 11 can be installed in arbitrary places. For example, you may install the processing apparatus 11 in the place where a user visually recognizes a synthesized image, for example, a shop. Moreover, you may mount each function of the processing apparatus 11 in a well-known portable terminal.

(実施の形態2)
次に、本実施の形態1及び実施の形態2の画像処理装置12のハードウェア構成について説明する。図17は、本実施の形態の画像処理装置12のハードウェア構成例を示すブロック図である。
(Embodiment 2)
Next, the hardware configuration of the image processing apparatus 12 according to the first embodiment and the second embodiment will be described. FIG. 17 is a block diagram illustrating a hardware configuration example of the image processing apparatus 12 according to the present embodiment.

実施の形態1及び実施の形態2の画像処理装置12は、提示部80、通信I/F部82、撮像部84、入力部94、CPU(Central Processing Unit)86、ROM(Read Only Memory)88、RAM(Random Access Memory)90、及びHDD92等がバス96により相互に接続されており、通常のコンピュータを利用したハードウェア構成となっている。   The image processing apparatus 12 according to the first and second embodiments includes a presentation unit 80, a communication I / F unit 82, an imaging unit 84, an input unit 94, a CPU (Central Processing Unit) 86, and a ROM (Read Only Memory) 88. A RAM (Random Access Memory) 90, an HDD 92, and the like are connected to each other by a bus 96, and have a hardware configuration using a normal computer.

CPU86は、画像処理装置12の全体の処理を制御する演算装置である。RAM90は、CPU86による各種処理に必要なデータを記憶する。ROM88は、CPU86による各種処理を実現するプログラム等を記憶する。HDD92は、上述した記憶部18に格納されるデータを記憶する。通信I/F部82は、外部装置や外部端末に通信回線等を介して接続し、接続した外部装置や外部端末との間でデータを送受信するためのインタフェースである。提示部80は、上述した提示部20に相当する。撮像部84は、上述した撮像部14に相当する。入力部94は、上述した入力部16に相当する。   The CPU 86 is an arithmetic device that controls the overall processing of the image processing apparatus 12. The RAM 90 stores data necessary for various processes by the CPU 86. The ROM 88 stores a program for realizing various processes by the CPU 86 and the like. The HDD 92 stores data stored in the storage unit 18 described above. The communication I / F unit 82 is an interface for connecting to an external device or an external terminal via a communication line or the like and transmitting / receiving data to / from the connected external device or external terminal. The presentation unit 80 corresponds to the presentation unit 20 described above. The imaging unit 84 corresponds to the imaging unit 14 described above. The input unit 94 corresponds to the input unit 16 described above.

本実施の形態1及び実施の形態2の画像処理装置12で実行される上記各種処理を実行するためのプログラムは、ROM88等に予め組み込んで提供される。   A program for executing the various processes executed by the image processing apparatus 12 according to the first and second embodiments is provided by being incorporated in advance in the ROM 88 or the like.

なお、本実施の形態1及び実施の形態2で実行されるプログラムは、これらの装置にインストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供するように構成してもよい。   The program executed in the first and second embodiments is a file in a format that can be installed in these devices or in an executable format, and is a CD-ROM, flexible disk (FD), CD-R, DVD. (Digital Versatile Disk) or the like may be provided by being recorded on a computer-readable recording medium.

また、本実施の形態1及び実施の形態2で実行されるプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、本実施の形態1及び実施の形態2の画像処理装置12における上記各処理を実行するためのプログラムを、インターネット等のネットワーク経由で提供または配布するように構成してもよい。   Further, the program executed in the first embodiment and the second embodiment may be configured to be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network. The program for executing each of the above processes in the image processing apparatus 12 according to the first and second embodiments may be configured to be provided or distributed via a network such as the Internet.

本実施の形態1及び実施の形態2で実行される上記各種処理を実行するためのプログラムは、上述した各部が主記憶装置上に生成されるようになっている。   In the program for executing the various processes executed in the first embodiment and the second embodiment, the above-described units are generated on the main storage device.

なお、上記HDD92に格納されている各種情報、すなわち記憶部18に格納されている各種情報は、外部装置(例えばサーバ)に格納してもよい。この場合には、該外部装置とCPU86と、を、ネットワーク等を介して接続した構成とすればよい。   Various information stored in the HDD 92, that is, various information stored in the storage unit 18, may be stored in an external device (for example, a server). In this case, the external device and the CPU 86 may be connected via a network or the like.

なお、上記には、本発明のいくつかの実施の形態を説明したが、これらの実施の形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施の形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施の形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   In addition, although several embodiment of this invention was described above, these embodiment is shown as an example and is not intending limiting the range of invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

12 画像処理装置
14 撮像部
16 入力部
18 記憶部
20 提示部
22 第1取得部
26 第2取得部
28 判別部
30 調整部
32 抽出部
34 第1算出部
36 第2算出部
38 決定部
40 生成部
12 image processing device 14 imaging unit 16 input unit 18 storage unit 20 presentation unit 22 first acquisition unit 26 second acquisition unit 28 determination unit 30 adjustment unit 32 extraction unit 34 first calculation unit 36 second calculation unit 38 determination unit 40 generation Part

Claims (6)

写体画像と重畳対象の衣服画像とに基づいて、前記被写体画像における前記衣服画像の第1位置を算出する第1算出部と、
前記被写体画像と前記衣服画像とに基づいて、前記被写体画像における前記衣服画像の第2位置であって、前記第1位置とは異なる前記第2位置を算出する第2算出部と、
前記第2位置を用いて重畳位置を決定する場合、前記被写体画像より前に取得された第1被写体画像に対して算出された前記第1位置を更に用いて、前記衣服画像の前記重畳位置を決定する決定部と
備えた画像処理装置。
Based on the superimposition target clothing image and the Utsushitai image, a first calculation unit for calculating a first position of the garment image in the object image,
A second calculation unit that calculates a second position of the clothing image in the subject image, which is different from the first position, based on the subject image and the clothing image;
When determining the superimposition position using the second position, the superimposition position of the clothing image is further determined using the first position calculated for the first subject image acquired before the subject image. a decision unit for determining,
The image processing apparatus provided with.
前記被写体画像における前記重畳位置に、前記衣服画像を重畳した合成画像を生成する生成部を更に備える、
請求項1に記載の画像処理装置。
A generator for generating a composite image in which the clothing image is superimposed at the superposition position in the subject image;
The image processing apparatus according to claim 1.
前記決定部は、
前記第1位置または前記第2位置を用いて、前記被写体画像における前記衣服画像の前記重畳位置を決定し、所定の第1条件に基づいて、前記第1位置を用いて前記衣服画像の前記重畳位置を決定するか、前記第2位置と前記第1被写体画像に対して算出された前記第1位置とを用いて前記衣服画像の前記重畳位置を決定するか、を切り替える、
請求項に記載の画像処理装置。
The determination unit
Using said first position or said second position, determine the superimposing position of the garment image in the object image, based on a predetermined first condition, the superposition of the garment image using the first position Switching between determining a position or determining the superimposed position of the clothing image using the second position and the first position calculated for the first subject image;
The image processing apparatus according to claim 1 .
前記第1算出部は、
前記被写体画像における被写体の形状を推定可能な特徴領域の位置と、前記衣服画像における前記特徴領域の位置と、が一致するように、前記第1位置を算出し、
前記第2算出部は、
前記被写体画像における前記特徴領域に応じて予め定められた特徴点の位置と、前記衣服画像における前記特徴点の位置と、が一致するように、前記第2位置を算出する、
請求項1に記載の画像処理装置。
The first calculation unit includes:
Calculating the first position so that the position of the feature region in which the shape of the subject in the subject image can be estimated matches the position of the feature region in the clothing image;
The second calculator is
Calculating the second position so that a position of a feature point predetermined according to the feature region in the subject image matches a position of the feature point in the clothing image;
The image processing apparatus according to claim 1.
写体画像と重畳対象の衣服画像とに基づいて、前記被写体画像における前記衣服画像の第1位置を算出し、
前記被写体画像と前記衣服画像とに基づいて、前記被写体画像における前記衣服画像の第2位置であって、前記第1位置とは異なる前記第2位置を算出し、
前記第2位置を用いて重畳位置を決定する場合、前記被写体画像より前に取得された第1被写体画像に対して算出された前記第1位置を更に用いて、前記衣服画像の前記重畳位置を決定する、
像処理方法。
Based on the superimposition target clothing image and the Utsushitai image, it calculates a first position of the garment image in the object image,
Based on the subject image and the clothing image, the second position of the clothing image in the subject image, which is different from the first position, is calculated,
When determining the superimposition position using the second position, the superimposition position of the clothing image is further determined using the first position calculated for the first subject image acquired before the subject image. decide,
Images processing method.
コンピュータを
写体画像と重畳対象の衣服画像とに基づいて、前記被写体画像における前記衣服画像の第1位置を算出する手段と、
前記被写体画像と前記衣服画像とに基づいて、前記被写体画像における前記衣服画像の第2位置であって、前記第1位置とは異なる前記第2位置を算出する手段と、
前記第2位置を用いて重畳位置を決定する場合、前記被写体画像より前に取得された第1被写体画像に対して算出された前記第1位置を更に用いて、前記衣服画像の前記重畳位置を決定する手段と
て機能させる画像処理プログラム。
The computer,
Means for, based on the superimposition target clothing image and the Utsushitai image, calculates a first position of the garment image in the object image,
Means for calculating the second position of the clothing image in the subject image, which is different from the first position, based on the subject image and the clothing image;
When determining the superimposition position using the second position, the superimposition position of the clothing image is further determined using the first position calculated for the first subject image acquired before the subject image. Means to determine ,
The image processing program causing to function.
JP2014182382A 2014-09-08 2014-09-08 Image processing apparatus, method, and program Active JP5876121B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014182382A JP5876121B2 (en) 2014-09-08 2014-09-08 Image processing apparatus, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014182382A JP5876121B2 (en) 2014-09-08 2014-09-08 Image processing apparatus, method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2012214991A Division JP5613741B2 (en) 2012-09-27 2012-09-27 Image processing apparatus, method, and program

Publications (2)

Publication Number Publication Date
JP2014225301A JP2014225301A (en) 2014-12-04
JP5876121B2 true JP5876121B2 (en) 2016-03-02

Family

ID=52123867

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014182382A Active JP5876121B2 (en) 2014-09-08 2014-09-08 Image processing apparatus, method, and program

Country Status (1)

Country Link
JP (1) JP5876121B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3190380B1 (en) 2014-09-03 2022-03-23 Nikon Corporation Image pickup device, information processing device, and image pickup system
JPWO2017154706A1 (en) * 2016-03-09 2018-12-27 株式会社ニコン Detection apparatus, information processing apparatus, detection method, detection program, and detection system
TWI775006B (en) * 2019-11-01 2022-08-21 財團法人工業技術研究院 Imaginary face generation method and system, and face recognition method and system using the same

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005256232A (en) * 2004-03-12 2005-09-22 Nippon Telegr & Teleph Corp <Ntt> Method, apparatus and program for displaying 3d data
JP5722603B2 (en) * 2010-12-03 2015-05-20 新日鉄住金ソリューションズ株式会社 Augmented reality presentation device, augmented reality presentation method and program

Also Published As

Publication number Publication date
JP2014225301A (en) 2014-12-04

Similar Documents

Publication Publication Date Title
JP5613741B2 (en) Image processing apparatus, method, and program
JP6490430B2 (en) Image processing apparatus, image processing system, image processing method, and program
US9996909B2 (en) Clothing image processing device, clothing image display method and program
JP5583087B2 (en) Image processing apparatus, method, and program
JP2016054450A (en) Image processing device, image processing system, image processing method, and program
US9767611B2 (en) Information processing apparatus and method for estimating depth values using an approximate plane
US9836130B2 (en) Operation input device, operation input method, and program
JP6362085B2 (en) Image recognition system, image recognition method and program
JP6002058B2 (en) Image processing apparatus, method, and program
JP6109288B2 (en) Information processing apparatus, information processing method, and program
KR101256046B1 (en) Method and system for body tracking for spatial gesture recognition
JP5876121B2 (en) Image processing apparatus, method, and program
CN111801725A (en) Image display control device and image display control program
JP2004062393A (en) Method and device for determining attention
JP5373128B2 (en) Person identification device, person identification method, and person identification program
JP7024876B2 (en) Detection device, processing device, detection method, and processing program
JP2010244090A (en) Person information extraction device, person information extraction method, and person information extraction program
JP2014179135A (en) Image processing system, method and program
JP6287527B2 (en) Information processing apparatus, method, and program
JP6483782B2 (en) Image processing apparatus, method, and program
JP7397282B2 (en) Stationary determination system and computer program
JP2018005727A (en) Information processing apparatus, information processing method, and program
WO2020026765A1 (en) Processing device, posture analysis system, processing method and processing program
JP2023026293A (en) Information processor, information processing system, information processing method, and program
JP2016015182A (en) Image processor, method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140908

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150612

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150616

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150805

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20151102

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160120

R151 Written notification of patent or utility model registration

Ref document number: 5876121

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313114

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350