[go: up one dir, main page]

JP2016071682A - Object arrangement device, object arrangement method, and program - Google Patents

Object arrangement device, object arrangement method, and program Download PDF

Info

Publication number
JP2016071682A
JP2016071682A JP2014201150A JP2014201150A JP2016071682A JP 2016071682 A JP2016071682 A JP 2016071682A JP 2014201150 A JP2014201150 A JP 2014201150A JP 2014201150 A JP2014201150 A JP 2014201150A JP 2016071682 A JP2016071682 A JP 2016071682A
Authority
JP
Japan
Prior art keywords
image
unit
original image
restoration
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014201150A
Other languages
Japanese (ja)
Inventor
聡 田端
Satoshi Tabata
聡 田端
伸也 北岡
Shinya Kitaoka
伸也 北岡
明日香 岩越
Asuka Iwakoshi
明日香 岩越
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2014201150A priority Critical patent/JP2016071682A/en
Publication of JP2016071682A publication Critical patent/JP2016071682A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain a high quality composite image that suppresses costs by use of a two-dimensional image while allowing a user to confirm the compatibility of a design or a color of an object with a background including furniture and interior accessories which the user owns at the time of renewing furniture or interior accessories, to help the user make a decision.SOLUTION: An object arrangement device 1 stores a plurality of objects and extracts the image data of a target object from an original image(S101), receives a selection of a specific object (102), determines an arrangement position of the object (S105), reverses the binary image of the object, acquires the logical product of the reversed image and the binary image of the target object, calculates a restoration part (S106), complements the pixel data belonging to the restoration part of the original image with pixel data in the vicinity of the restoration part in the original image, generates a restoration image (S107), and combines the image data of the object with the restoration image (S108).SELECTED DRAWING: Figure 3

Description

本発明は、部屋等の背景画像に家具やインテリア等の画像を合成する技術に係り、特に、背景画像に含まれる家具やインテリア等の画像と置き換えて合成する技術に関する。   The present invention relates to a technique for synthesizing an image such as furniture or interior with a background image such as a room, and more particularly to a technique for synthesizing an image such as furniture or interior included in a background image.

消費者が、家具やインテリア(以下、オブジェクトともいう。)を購入する、または買い替える際、配置想定の場所に収まるかどうか(部屋の空間サイズとオブジェクトのサイズの確認)、使い心地はどうか(椅子の座り心地、ソファのフカフカ具合等)、ブランド、価格に加え、そのオブジェクトのデザインやカラーと、既に持っている他の家具やインテリアとの親和性はどうかということが重要な判断ポイントとなる。   When a consumer purchases or replaces furniture or interior (hereinafter also referred to as an object), whether it fits in the expected location (confirmation of the space size of the room and the size of the object), and how comfortable it is (chair In addition to the comfort and comfort of the sofa, brand and price, the design and color of the object and the affinity of the furniture and interior that you already have are important points to judge.

デザインやカラーと、既に持っているものとの親和性について、ユーザは、ショールームの実物やカタログ、パンフレット、Webサイトの画像を見て、自分の家や部屋に置き換えて想像し、これを購入し、配置したらどうなるかを頭の中でイメージし、検討する。しかし、実際に購入して配置してみると、購入前に抱いたイメージと異なっていたり、既に持っているものとの親和性が悪く、がっかりしたりすることも多々ある。   About the affinity of design and color with what you already have, users can see and replace their homes and rooms by looking at the actual showroom, catalogs, brochures, and website images. Think about what happens when you place it in your head. However, when you actually purchase and place it, you may find it dissatisfied with the image you had before purchase, or the affinity with what you already have.

このような問題を解決するため、オブジェクト配置シミュレーションシステムがある。オブジェクト配置シミュレーションシステムには、3D(3次元)シミュレーションと2D(2次元)シミュレーションとがある。   In order to solve such a problem, there is an object arrangement simulation system. Object placement simulation systems include 3D (three-dimensional) simulation and 2D (two-dimensional) simulation.

3Dシミュレーションでは、CG(Computer Graphics)をベースとしているため、3次元情報やライティングなどの情報が活用できるので、自然な合成画像を作成することができる。   Since 3D simulation is based on CG (Computer Graphics), information such as 3D information and lighting can be used, so that a natural composite image can be created.

例えば、特許文献1には、既存のCAD(Computer Aided Design)モデルと3D CADソフトを用いて、利用者が所有するインテリアの画像と、店舗にあるインテリア(オブジェクト)の画像とを合成した画像を作成する発明が開示されている。   For example, Patent Document 1 discloses an image obtained by combining an image of an interior owned by a user and an image of an interior (object) in a store using an existing CAD (Computer Aided Design) model and 3D CAD software. The invention to be created is disclosed.

また、特許文献2には、カメラの撮影画像から認識した奥行き情報を利用して、現実空間中の物体による隠れを考慮して、仮想空間画像(オブジェクト)と現実空間画像とを重畳し、仮想空間画像のうち隠れを考慮せずに表示するべきものをさらに重畳して画像を生成する画像生成装置の発明が開示されている。   Further, in Patent Document 2, a virtual space image (object) and a real space image are superimposed using depth information recognized from an image captured by a camera in consideration of hiding by an object in the real space. An invention of an image generation apparatus that generates an image by superimposing images to be displayed without considering hiding in a spatial image is disclosed.

一方、2Dシミュレーションでは、CGのようなコンテンツを制作する必要がなく、撮影するだけなので、コンテンツ制作・更新にコストかからない。また、実写画像なので、コンテンツのクオリティも高い。   On the other hand, in 2D simulation, it is not necessary to produce content such as CG, and only shooting is performed, so there is no cost for content creation / update. Also, since it is a live-action image, the quality of the content is high.

例えば、特許文献3には、撮影した画像から平行線が収束する消失点を求めて撮像位置の推定を行い、3次元空間情報を疑似的に算出することで、3Dシミュレーションのように自然な合成画像を作成することを可能にする画像合成装置の発明が開示されている。   For example, in Patent Document 3, a vanishing point where parallel lines converge from a photographed image is obtained, an imaging position is estimated, and three-dimensional spatial information is calculated in a pseudo manner so that natural synthesis is performed as in 3D simulation. An invention of an image composition device that enables creation of an image is disclosed.

また、特許文献4には、撮影角度及び視線角度に基づいて、配置オブジェクトの画像の水平領域及び垂直領域を変形させて、会場オブジェクトの画像に合成することで、違和感なく自然に見える合成画像を作成する発明が開示されている。   Further, in Patent Document 4, a horizontal image and a vertical region of an image of a placement object are deformed based on a shooting angle and a line-of-sight angle, and synthesized with a venue object image, a synthesized image that looks natural without a sense of incongruity. The invention to be created is disclosed.

特開2005−202797JP2005-202797 特許第4401728号Japanese Patent No. 4401728 特許第3693735号Japanese Patent No. 3693735 特許第4984257号Patent No. 4984257

しかし、特許文献1や特許文献2の発明では、画像のクオリティを出すには3DのCGコンテンツを高精細に作成しなければならないため、既存の流用できるコンテンツがない場合や、新たに大量のコンテンツを追加しようとした場合に、コンテンツの制作コストが膨大となってしまうという問題がある。   However, in the inventions of Patent Document 1 and Patent Document 2, 3D CG content must be created with high definition in order to achieve image quality. Therefore, when there is no existing content that can be diverted or a large amount of content is newly created. When trying to add, there is a problem that the production cost of the content becomes enormous.

また、特許文献3や特許文献4の発明では、もともと背景に何もオブジェクトが存在しない空のシーンを想定しているが、背景にオブジェクトがある場合には、考慮されていないという問題がある。そして、ユーザが配置想定の場所を撮影する場合や、新居に引っ越して撮影する場合には、空のシーンを撮影することができるが、家具やインテリアを買い替える際は、買い替え前のものが配置してある場合がほとんどであり、買い替え時に空のシーンを撮影することは非常に難しい。   The inventions of Patent Literature 3 and Patent Literature 4 originally assume an empty scene in which no object exists in the background, but there is a problem that this is not considered when there is an object in the background. And when a user takes a picture of a place that is supposed to be placed, or moves to a new house and takes a picture, an empty scene can be taken, but when replacing furniture or interior, the one before replacement is placed. In most cases, it is very difficult to shoot an empty scene at the time of replacement.

また、特許文献3や特許文献4の発明では、背景とオブジェクトの撮影環境が同一、もしくは、ある基準に沿っている場合を想定している。このため、異なる撮影環境や撮像装置で撮影された背景とオブジェクトとが合成される場合に、オブジェクトがうまく背景になじまずに浮いて見えるような、不自然な画像が作成されてしまうという問題がある。   In the inventions of Patent Document 3 and Patent Document 4, it is assumed that the background and the shooting environment of the object are the same or are in accordance with a certain standard. For this reason, when a background and an object shot with different shooting environments or imaging devices are combined, an unnatural image is created in which the object appears to float well without matching the background. is there.

本発明は、かかる課題を解決するためになされたものであり、2D画像を用いてコストを抑えつつ、家具やインテリアの買い替え時であっても、オブジェクトのデザインやカラーと、既に持っている家具やインテリアを含めた背景との親和性を確認することができ、ユーザの意思決定を手助けできるような高品質な合成画像を得ることのできる技術を提供することを目的とする。   The present invention has been made to solve such a problem. The design and color of an object and the furniture already possessed even at the time of replacement of furniture and interior while suppressing cost by using 2D images. It is an object of the present invention to provide a technology capable of confirming the affinity with the background including the interior and the interior, and obtaining a high-quality composite image that can assist the user's decision making.

前述した課題を解決するために第1の発明は、複数のオブジェクトを記憶する記憶手段と、対象物を含む元画像から前記対象物の画像を抽出する抽出手段と、前記記憶手段により記憶される複数のオブジェクトから特定のオブジェクトの選択を受け付ける受付手段と、前記受付手段により受け付けられるオブジェクトを前記元画像における前記対象物の位置に配置し、前記対象物の画像の範囲内で前記オブジェクトの画像が重ならない部分を修復部として算出する算出手段と、前記元画像の前記修復部に位置する画素データを、前記元画像の近傍の画素データで補完し、修復画像を生成する生成手段と、前記修復画像に対して、前記オブジェクトの画像を合成する合成手段と、を具備することを特徴とするオブジェクト配置装置である。第1の発明により、オブジェクトの画像を、元画像に含まれる対象物の画像と違和感なく置換して、オブジェクトの画像を元画像に合成することができる。従って、一般消費者が、買い替え対象の家具やインテリアなどが設置された自分の部屋を撮影し、新たな家具やインテリアを配置した高品質な合成画像を得ることができる。   In order to solve the above-described problem, the first invention is stored by a storage unit that stores a plurality of objects, an extraction unit that extracts an image of the object from an original image including the object, and the storage unit. A receiving unit that receives selection of a specific object from a plurality of objects, and an object that is received by the receiving unit is arranged at the position of the target in the original image, and the image of the object is within the range of the target image. A calculation unit that calculates a non-overlapping portion as a restoration unit, a generation unit that complements pixel data located in the restoration unit of the original image with pixel data in the vicinity of the original image, and generates a restoration image; and the restoration An object placement apparatus comprising: a combining unit that combines the image of the object with the image. According to the first invention, the object image can be replaced with the image of the object included in the original image without a sense of incongruity, and the object image can be synthesized with the original image. Accordingly, a general consumer can take a picture of his / her room in which furniture or interior to be replaced is installed, and obtain a high-quality composite image in which new furniture or interior is arranged.

第1の発明は、前記受付手段により受け付けられるオブジェクトを前記対象物の大きさに応じてリサイズするリサイズ手段、を更に具備し、前記算出手段は、前記リサイズ手段によってリサイズされるオブジェクトを前記元画像における前記対象物の位置に配置し、前記修復部を算出することが望ましい。これによって、一般消費者は、新たな家具やインテリアを配置した場合の空間の広さを正確に確認することができる。   The first invention further comprises resizing means for resizing the object received by the receiving means according to the size of the object, wherein the calculating means displays the object resized by the resizing means as the original image. It is desirable to calculate the restoration part by arranging the object at the position of the object. As a result, the general consumer can accurately confirm the size of the space when new furniture or interior is arranged.

第1の発明における前記リサイズ手段は、前記オブジェクトの外接矩形及び前記対象物の外接矩形に基づいて、前記オブジェクトをリサイズすることが望ましい。これによって、必ずしも対象物の正面方向から撮影する必要はなく、好きな方向から撮影できるので便利である。   The resizing means in the first invention preferably resizes the object based on a circumscribed rectangle of the object and a circumscribed rectangle of the object. Thus, it is not always necessary to shoot from the front direction of the object, and it is convenient because it can shoot from a favorite direction.

第1の発明における前記算出手段は、前記オブジェクトのマスク画像の反転画像と、前記対象物のマスク画像との論理積を求めて、前記修復部を算出することが望ましい。これによって、画像合成に伴って修復すべき領域を容易に算出することができる。   In the first aspect of the invention, it is preferable that the calculation unit calculates the restoration unit by obtaining a logical product of an inverted image of the mask image of the object and a mask image of the object. As a result, it is possible to easily calculate a region to be repaired along with image synthesis.

第1の発明における前記生成手段は、前記元画像の前記修復部に属する特定の着目画素に対して、前記着目画素の周辺画素群をテンプレートとし、テンプレートマッチングにより最も近いパッチを求めることによって、前記着目画素の画素データを補完することが望ましい。これによって、高速な処理を実現することができる。   In the first invention, the generation means obtains the closest patch by template matching using a peripheral pixel group of the target pixel as a template for the specific target pixel belonging to the restoration unit of the original image. It is desirable to complement the pixel data of the pixel of interest. As a result, high-speed processing can be realized.

第1の発明における前記合成手段は、前記元画像の画像に基づいてポアソンブレンディングにより前記オブジェクトの画像を変換し、前記修復画像に合成することが望ましい。オブジェクト(家具やインテリア)を元画像の色味に合わせることで、自然な合成画像を得ることができる。   The synthesizing means in the first invention preferably transforms the image of the object by Poisson blending based on the image of the original image and synthesizes it with the repaired image. A natural composite image can be obtained by matching an object (furniture or interior) to the color of the original image.

第2の発明は、複数のオブジェクトを記憶する記憶部を備えるコンピュータの制御部が、対象物を含む元画像から前記対象物の画像を抽出する抽出ステップと、前記記憶部により記憶される複数のオブジェクトから特定のオブジェクトの選択を受け付ける受付ステップと、前記受付ステップにより受け付けられるオブジェクトを前記元画像における前記対象物の位置に配置し、前記対象物の画像の範囲内で前記オブジェクトの画像が重ならない部分を修復部として算出する算出ステップと、前記元画像の前記修復部に位置する画素データを、前記元画像の近傍の画素データで補完し、修復画像を生成する生成ステップと、前記修復画像に対して、前記オブジェクトの画像を合成する合成ステップと、を実行することを特徴とするオブジェクト配置方法である。第2の発明により、第1の発明と同様の効果を得ることができる。   According to a second aspect of the present invention, there is provided an extraction step in which a control unit of a computer including a storage unit that stores a plurality of objects extracts an image of the target object from an original image including the target object, and a plurality of storage units stored by the storage unit An accepting step for accepting selection of a specific object from the objects, and an object accepted by the accepting step is arranged at the position of the object in the original image, and the image of the object does not overlap within the range of the image of the object A calculation step of calculating a portion as a restoration unit, a generation step of generating a restoration image by complementing pixel data located in the restoration unit of the original image with pixel data in the vicinity of the original image, and And a synthesis step of synthesizing the image of the object. It is a 置方 method. According to the second invention, the same effect as that of the first invention can be obtained.

第3の発明は、コンピュータを、複数のオブジェクトを記憶する記憶手段と、対象物を含む元画像から前記対象物の画像を抽出する抽出手段と、前記記憶手段により記憶される複数のオブジェクトから特定のオブジェクトの選択を受け付ける受付手段と、前記受付手段により受け付けられるオブジェクトを前記元画像における前記対象物の位置に配置し、前記対象物の画像の範囲内で前記オブジェクトの画像が重ならない部分を修復部として算出する算出手段と、前記元画像の前記修復部に位置する画素データを、前記元画像の近傍の画素データで補完し、修復画像を生成する生成手段と、前記修復画像に対して、前記オブジェクトの画像を合成する合成手段として機能させるためのプログラムである。第3の発明のプログラムを汎用のコンピュータにインストールすることによって、第1の発明のオブジェクト配置装置を得ることができ、第2の発明のオブジェクト配置方法を実行することができる。   According to a third aspect of the invention, a computer is specified from storage means for storing a plurality of objects, extraction means for extracting an image of the object from an original image including the object, and a plurality of objects stored by the storage means A receiving unit that accepts selection of the object, and an object that is received by the receiving unit is arranged at the position of the object in the original image, and a portion in which the image of the object does not overlap within the range of the image of the object is repaired A calculation means for calculating as a part, pixel data located in the restoration part of the original image is supplemented with pixel data in the vicinity of the original image, and a generation means for generating a repair image; It is a program for functioning as a combining means for combining the images of the object. By installing the program of the third invention on a general-purpose computer, the object placement device of the first invention can be obtained, and the object placement method of the second invention can be executed.

本発明により、2D画像を用いてコストを抑えつつ、家具やインテリアの買い替え時であっても、オブジェクトのデザインやカラーと、既に持っている家具やインテリアを含めた背景との親和性を確認することができ、ユーザの意思決定を手助けできるような高品質な合成画像を得ることができる。   According to the present invention, it is possible to check the affinity between the design and color of an object and the background including the furniture and interior already possessed even when replacing furniture or interior while reducing the cost by using 2D images. Therefore, it is possible to obtain a high-quality composite image that can assist the user in making decisions.

オブジェクト配置装置のハードウェア構成を示すブロック図Block diagram showing the hardware configuration of the object placement device オブジェクト配置装置の記憶部に記憶される内容の例を示す図The figure which shows the example of the content memorize | stored in the memory | storage part of an object arrangement | positioning apparatus オブジェクト配置装置によるオブジェクト配置処理の流れを示すフローチャートThe flowchart which shows the flow of the object arrangement | positioning process by an object arrangement | positioning apparatus. オブジェクト配置装置へ入力される情報の例を示す図The figure which shows the example of the information input into an object arrangement | positioning apparatus オブジェクト配置装置の二値化処理の例を示す図The figure which shows the example of the binarization process of an object arrangement | positioning apparatus オブジェクト配置装置の矩形算出処理の例を示す図The figure which shows the example of the rectangle calculation process of an object arrangement | positioning apparatus オブジェクト配置装置のリサイズ処理の例を示す図The figure which shows the example of the resizing process of an object arrangement | positioning apparatus オブジェクト配置装置のレイアウト処理の例を示す図The figure which shows the example of the layout process of an object arrangement | positioning apparatus オブジェクト配置装置の修復部算出処理の例を示す図The figure which shows the example of the restoration | repair part calculation process of an object arrangement | positioning apparatus オブジェクト配置装置の画像修復処理の例を示す図The figure which shows the example of the image restoration process of an object arrangement | positioning apparatus オブジェクト配置装置の画像合成処理の例を示す図The figure which shows the example of the image compositing process of an object arrangement | positioning apparatus オブジェクト配置装置の画像合成処理を説明する図The figure explaining the image compositing process of an object arrangement | positioning apparatus

以下図面に基づいて、本発明の実施形態を詳細に説明する。図1は、オブジェクト配置装置1のハードウェア構成を示すブロック図である。尚、図1のハードウェア構成は一例であり、用途、目的に応じて様々な構成を採ることが可能である。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a hardware configuration of the object placement apparatus 1. Note that the hardware configuration in FIG. 1 is an example, and various configurations can be adopted depending on the application and purpose.

図1に示すように、オブジェクト配置装置1は、制御部11、記憶部12、メディア入出力部13、通信制御部14、入力部15、表示部16、周辺機器I/F部17等が、バス18を介して接続される。   As shown in FIG. 1, the object placement apparatus 1 includes a control unit 11, a storage unit 12, a media input / output unit 13, a communication control unit 14, an input unit 15, a display unit 16, a peripheral device I / F unit 17, and the like. Connection is made via a bus 18.

制御部11は、CPU(Central Processing Unit)、ROM(Read Only
Memory)、RAM(Random Access Memory)等によって構成される。CPUは、記憶部12、ROM、記録媒体等に格納されるプログラムをRAM上のワークメモリ領域に呼び出して実行し、バス18を介して接続された各装置を駆動制御し、オブジェクト配置装置1が行う後述する処理を実現する。ROMは、不揮発性メモリであり、コンピュータのブートプログラムやBIOS等のプログラム、データ等を恒久的に保持している。RAMは、揮発性メモリであり、記憶部12、ROM、記録媒体等からロードしたプログラム、データ等を一時的に保持するとともに、制御部11が各種処理を行う為に使用するワークエリアを備える。
The control unit 11 includes a CPU (Central Processing Unit) and a ROM (Read Only).
Memory), RAM (Random Access Memory), etc. The CPU calls a program stored in the storage unit 12, ROM, recording medium, etc. to the work memory area on the RAM and executes it, drives and controls each device connected via the bus 18, and the object placement device 1 The process to be described later is realized. The ROM is a non-volatile memory and permanently holds a computer boot program, a program such as BIOS, data, and the like. The RAM is a volatile memory, and temporarily stores programs, data, and the like loaded from the storage unit 12, ROM, recording medium, and the like, and includes a work area used by the control unit 11 for performing various processes.

記憶部12は、HDD(Hard Disk Drive)等であり、制御部11が実行するプログラム、プログラム実行に必要なデータ、OS(Operating System)等が格納される。プログラムに関しては、OSに相当する制御プログラムや、後述する処理をコンピュータに実行させるためのアプリケーションプログラムが格納されている。これらの各プログラムコードは、制御部11により必要に応じて読み出されてRAMに移され、CPUに読み出されて各種の手段として実行される。   The storage unit 12 is an HDD (Hard Disk Drive) or the like, and stores a program executed by the control unit 11, data necessary for program execution, an OS (Operating System), and the like. As for the program, a control program corresponding to the OS and an application program for causing a computer to execute processing to be described later are stored. Each of these program codes is read by the control unit 11 as necessary, transferred to the RAM, read by the CPU, and executed as various means.

メディア入出力部13(ドライブ装置)は、データの入出力を行い、例えば、CDドライブ(−ROM、−R、−RW等)、DVDドライブ(−ROM、−R、−RW等)等のメディア入出力装置を有する。通信制御部14は、通信制御装置、通信ポート等を有し、コンピュータとネットワーク間の通信を媒介する通信インタフェースであり、ネットワークを介して、他のコンピュータ間との通信制御を行う。ネットワークは、有線、無線を問わない。   The media input / output unit 13 (drive device) inputs / outputs data, for example, media such as a CD drive (-ROM, -R, -RW, etc.), DVD drive (-ROM, -R, -RW, etc.) Has input / output devices. The communication control unit 14 includes a communication control device, a communication port, and the like, and is a communication interface that mediates communication between a computer and a network, and performs communication control between other computers via the network. The network may be wired or wireless.

入力部15は、データの入力を行い、例えば、キーボード、マウス等のポインティングデバイス、テンキー等の入力装置を有する。入力部15を介して、コンピュータに対して、操作指示、動作指示、データ入力等を行うことができる。表示部16は、液晶パネル等のディスプレイ装置、ディスプレイ装置と連携してコンピュータのビデオ機能を実現するための論理回路等(ビデオアダプタ等)を有する。尚、入力部15及び表示部16は、タッチパネルディスプレイのように、一体となっていても良い。   The input unit 15 inputs data and includes, for example, a keyboard, a pointing device such as a mouse, and an input device such as a numeric keypad. An operation instruction, an operation instruction, data input, and the like can be performed on the computer via the input unit 15. The display unit 16 includes a display device such as a liquid crystal panel, and a logic circuit or the like (video adapter or the like) for realizing a video function of the computer in cooperation with the display device. The input unit 15 and the display unit 16 may be integrated like a touch panel display.

周辺機器I/F(Interface)部17は、コンピュータに周辺機器を接続させるためのポートであり、周辺機器I/F部17を介してコンピュータは周辺機器とのデータの送受信を行う。周辺機器I/F部17は、USB(Universal Serial Bus)やIEEE1394やRS−232C等によって構成されており、通常複数の周辺機器I/Fを有する。周辺機器との接続形態は有線、無線を問わない。バス18は、各装置間の制御信号、データ信号等の授受を媒介する経路である。   The peripheral device I / F (Interface) unit 17 is a port for connecting a peripheral device to the computer, and the computer transmits and receives data to and from the peripheral device via the peripheral device I / F unit 17. The peripheral device I / F unit 17 is configured by USB (Universal Serial Bus), IEEE 1394, RS-232C, or the like, and usually includes a plurality of peripheral devices I / F. The connection form with the peripheral device may be wired or wireless. The bus 18 is a path that mediates transmission / reception of control signals, data signals, and the like between the devices.

オブジェクト配置装置1は、1台のコンピュータで構成されても良いし、複数のコンピュータがネットワークを介して構成されても良い。例えば、オブジェクト配置装置1が、サーバとクライアント端末で構成される場合、クライアント端末においてデータの入力を受け付けて、サーバが各種の算出処理を行い、クライアント端末が算出結果を表示するようにしても良い。以下では、混乱を避けるために、オブジェクト配置装置1は、1台のコンピュータで構成されているものとして説明する。   The object placement apparatus 1 may be configured by a single computer, or a plurality of computers may be configured via a network. For example, when the object placement device 1 is configured by a server and a client terminal, the client terminal may receive data input, the server may perform various calculation processes, and the client terminal may display the calculation result. . In the following, in order to avoid confusion, the object placement apparatus 1 will be described as being composed of one computer.

図2は、オブジェクト配置装置1の記憶部12に記憶される内容の例を示す図である。オブジェクト配置装置1の記憶部12には、複数のオブジェクトに関する情報が記憶される。オブジェクトとは、例えば、椅子などの家具やインテリアである。オブジェクトに関する情報は、例えば、オブジェクトの画像、マスク画像、サイズ情報である。オブジェクトに関する情報は、家具やインテリアのカタログデータから取得しても良いし、ユーザが入力部15等を介して登録しても良い。   FIG. 2 is a diagram illustrating an example of contents stored in the storage unit 12 of the object placement device 1. Information relating to a plurality of objects is stored in the storage unit 12 of the object placement device 1. The object is, for example, furniture such as a chair or interior. The information on the object is, for example, an object image, a mask image, and size information. Information about the object may be acquired from furniture or interior catalog data, or may be registered by the user via the input unit 15 or the like.

例えば、図2には、「オブジェクト1」に関する情報として、オブジェクトの画像21(オブジェクトを含む画像23)、マスク画像25、「幅:550mm、高さ:1000mm」が図示されている。   For example, FIG. 2 illustrates an object image 21 (an image 23 including an object), a mask image 25, and “width: 550 mm, height: 1000 mm” as information related to “object 1”.

オブジェクトの画像21は、例えば、オブジェクトを正面から撮影した2次元画像である。マスク画像25は、例えば、オブジェクトを含む画像23のうち、オブジェクトの画像21に属する画素を「白」、それ以外の画素を「黒」とした二値画像である。尚、図2に示すマスク画像25では、オブジェクトの画像21に属さない画素の領域が、「黒」ではなく「網掛け」で図示されている。以下、他の図面においても、「黒」ではなく「網掛け」で図示するものとする。また、マスク画像25は、オブジェクトの画像21に属する画素を「黒」、それ以外の画素を「白」としても良い。   The object image 21 is, for example, a two-dimensional image obtained by photographing the object from the front. The mask image 25 is, for example, a binary image in which the pixel belonging to the object image 21 is “white” and the other pixels are “black” in the image 23 including the object. In the mask image 25 shown in FIG. 2, the pixel region that does not belong to the object image 21 is illustrated as “shaded” instead of “black”. Hereinafter, in other drawings, “black” is used instead of “black”. In the mask image 25, the pixels belonging to the image 21 of the object may be “black” and the other pixels may be “white”.

サイズ情報は、オブジェクトの画像21に係るオブジェクトの実際の大きさを示している。すなわち、図2に示す「オブジェクト1」の例では、椅子(オブジェクト)の実寸の幅が「550mm」、実寸の高さが「1000mm」であることを意味している。   The size information indicates the actual size of the object related to the object image 21. That is, in the example of “object 1” shown in FIG. 2, it means that the actual width of the chair (object) is “550 mm” and the actual height is “1000 mm”.

図3は、オブジェクト配置装置1によるオブジェクト配置処理の流れを示すフローチャートである。図3に示すように、オブジェクト配置装置1の制御部11は、ユーザから元画像の入力を受け付けて、元画像から対象物の画像データを抽出する(ステップS101)。   FIG. 3 is a flowchart showing the flow of object placement processing by the object placement device 1. As illustrated in FIG. 3, the control unit 11 of the object placement device 1 receives an input of an original image from a user and extracts image data of an object from the original image (step S <b> 101).

元画像は、例えば、ユーザがオブジェクトの配置を想定している部屋の2次元画像であり、ユーザが予め撮影したものである。本発明の実施の形態では、ユーザがオブジェクト(家具やインテリア)を買い替える際のオブジェクト配置シミュレーションを想定しており、元画像には買い替え対象のオブジェクトが含まれているものとする。従って、本発明の実施の形態では、対象物とは、元画像に含まれる買い替え対象のオブジェクトを意味する。   The original image is, for example, a two-dimensional image of a room in which the user assumes an object arrangement, and is taken in advance by the user. In the embodiment of the present invention, an object arrangement simulation when a user replaces an object (furniture or interior) is assumed, and an object to be replaced is included in the original image. Therefore, in the embodiment of the present invention, the target means an object to be replaced that is included in the original image.

図4は、オブジェクト配置装置1へ入力される情報の例を示す図である。図4(a)には、ユーザによって入力される元画像31の例が示されている。元画像31には、対象物33として、買い替え対象の椅子が含まれている。   FIG. 4 is a diagram illustrating an example of information input to the object placement apparatus 1. FIG. 4A shows an example of the original image 31 input by the user. The original image 31 includes a chair for replacement by purchase as the object 33.

例えば、オブジェクト配置装置1の入力部15及び表示部16はタッチパネルディスプレイとする。図4(b)に示すように、ユーザは、自らの指又はタッチペンによって、対象物33の輪郭を大まかになぞっていき、対象物33全体を囲う輪郭線35を描く。オブジェクト配置装置1の制御部11は、輪郭線35の入力を受け付けると、後述する図5に示す処理によって、対象物33の領域を「白」、それ以外の領域を「黒」とする二値画像を作成する。この二値画像は、元画像31に含まれる対象物33のマスク画像である。制御部11は、対象物33のマスク画像を生成する際、輪郭線35内(閉領域)のオクルージョン(手前にある物体が背後にある物体を隠している領域)、影、映りこみなどのあいまいな領域については全て「白」で塗りつぶす。「白」で塗りつぶされた領域は、後述する処理において修復処理が施されるか、又はオブジェクトの画像が合成される領域であるから、あいまいな領域を「白」で塗りつぶしても問題はない。   For example, the input unit 15 and the display unit 16 of the object placement device 1 are touch panel displays. As shown in FIG. 4B, the user roughly traces the outline of the object 33 with his / her finger or touch pen, and draws an outline 35 surrounding the entire object 33. When receiving the input of the contour line 35, the control unit 11 of the object placement device 1 performs binary processing to set the area of the object 33 to “white” and the other areas to “black” by the process shown in FIG. Create an image. This binary image is a mask image of the object 33 included in the original image 31. When the control unit 11 generates a mask image of the target object 33, the occlusion within the outline 35 (closed region) (region where the object in the foreground hides the object behind), shadow, reflection, etc. Fill all white areas with “white”. Since the area filled with “white” is an area where a restoration process is performed in a process described later or an object image is synthesized, there is no problem even if an ambiguous area is filled with “white”.

制御部11は、輪郭線35の入力を受け付ける際、対象物33に関するサイズ情報の入力も受け付ける。対象物33に関するサイズ情報は、例えば、元画像31の撮影方向から見た対象物33の実寸の幅及び高さである。図4(c)には、対象物33に関するサイズ情報として、「幅:800mm、高さ:700mm」が図示されている。   When the control unit 11 receives an input of the contour line 35, the control unit 11 also receives an input of size information regarding the object 33. The size information regarding the object 33 is, for example, the actual size width and height of the object 33 viewed from the photographing direction of the original image 31. In FIG. 4C, “width: 800 mm, height: 700 mm” is illustrated as size information regarding the object 33.

図5は、オブジェクト配置装置1の二値化処理の例を示す図である。制御部11は、ユーザによって入力される輪郭線35を「白」、それ以外を「黒」とする二値画像41を生成する。   FIG. 5 is a diagram illustrating an example of the binarization process of the object placement apparatus 1. The control unit 11 generates a binary image 41 in which the outline 35 input by the user is “white” and the others are “black”.

次に、制御部11は、図5(a)に示す二値画像41に対して、エッジ抽出処理及びラベリング処理を実施する。制御部11は、ラベリング処理において、背景領域が「黒」、前景領域が「白」、不確定領域(輪郭線35)が「灰色」の3色のラベル画像を生成する。このラベル画像が、後述する処理におけるトライマップ画像43となる。図5(b)には、輪郭線(灰色)37を含むトライマップ画像43が図示されている。   Next, the control unit 11 performs an edge extraction process and a labeling process on the binary image 41 illustrated in FIG. In the labeling process, the control unit 11 generates a three-color label image in which the background area is “black”, the foreground area is “white”, and the indeterminate area (outline 35) is “gray”. This label image becomes a trimap image 43 in the processing described later. FIG. 5B shows a trimap image 43 including a contour line (gray) 37.

次に、制御部11は、不確定領域を「黒」か「白」のいずれかに決定する。例えば、最小コスト切断問題(Graph Cut)として定式化する方法が挙げられる。この方法によれば、制御部11は、灰色の領域内の画素を基点として、隣接する複数の前景領域及び背景領域の画素との類似度を用いた最少コスト切断問題として定式化し、最もコストが小さくなる切断軌跡を求め、切断軌跡に基づいて不確定領域を「黒」か「白」のいずれかに決定する。尚、本発明は、この手法に限られるものではなく、他の公知の技術を用いても良い。図5(c)には、元画像31に含まれる対象物33のマスク画像45が図示されている。   Next, the control unit 11 determines the indeterminate region to be “black” or “white”. For example, there is a method of formulation as a minimum cost cutting problem (Graph Cut). According to this method, the control unit 11 is formulated as a least cost cutting problem using similarity between a plurality of adjacent foreground and background pixels, with a pixel in the gray region as a base point, and the cost is the highest. A cutting trajectory that becomes smaller is obtained, and the indeterminate area is determined as “black” or “white” based on the cutting trajectory. The present invention is not limited to this method, and other known techniques may be used. FIG. 5C shows a mask image 45 of the object 33 included in the original image 31.

図3の説明に戻る。次に、制御部11は、ユーザから特定のオブジェクトの選択を受け付けて、オブジェクトが選択されたか否かを確認する(ステップS102)。例えば、制御部11は、記憶部12から複数のオブジェクトを読み出して、表示部16に表示する。これに対して、ユーザは、表示部16に表示されているオブジェクトのいずれかを選択する。   Returning to the description of FIG. Next, the control part 11 receives selection of a specific object from a user, and confirms whether the object was selected (step S102). For example, the control unit 11 reads a plurality of objects from the storage unit 12 and displays them on the display unit 16. On the other hand, the user selects one of the objects displayed on the display unit 16.

選択されていない場合(ステップS102のNo)、制御部11は、引き続きユーザからのオブジェクトの選択を受け付ける。選択された場合(ステップS102のYes)、制御部11は、対象物とオブジェクトの外接矩形を算出する(ステップS103)。   If not selected (No in step S102), the control unit 11 continues to accept selection of an object from the user. When selected (Yes in Step S102), the control unit 11 calculates a circumscribed rectangle between the object and the object (Step S103).

図6は、オブジェクト配置装置1の矩形算出処理の例を示す図である。図6(a)は、対象物33のマスク画像45から外接矩形51を算出する処理を示している。図6(b)は、オブジェクトのマスク画像25から外接矩形53を算出する処理を示している。   FIG. 6 is a diagram illustrating an example of a rectangle calculation process of the object placement device 1. FIG. 6A shows a process for calculating the circumscribed rectangle 51 from the mask image 45 of the object 33. FIG. 6B shows processing for calculating the circumscribed rectangle 53 from the mask image 25 of the object.

制御部11は、マスク画像45やマスク画像25に対して、上下左右の4方向から走査し、最初に「白」の画素がある位置を求めることによって、外接矩形51や外接矩形53を算出する。すなわち、外接矩形51や外接矩形53は、(1)左から走査していき、最初に「白」の画素がある位置を通る上下方向の直線を左辺、(2)右から走査していき、最初に「白」の画素がある位置を通る上下方向の直線を右辺、(3)上から走査していき、最初に「白」の画素がある位置を通る左右方向の直線を上辺、(4)下から走査していき、最初に「白」の画素がある位置を通る左右方向の直線を下辺、とする矩形である。   The control unit 11 scans the mask image 45 and the mask image 25 from four directions, up, down, left, and right, and calculates a circumscribed rectangle 51 and a circumscribed rectangle 53 by first obtaining a position where a “white” pixel is present. . That is, the circumscribed rectangle 51 and the circumscribed rectangle 53 are (1) scanned from the left, and first, a vertical straight line passing through the position where the “white” pixel is located is scanned from the left side and (2) from the right, First, the vertical line passing through the position where the “white” pixel is located is scanned from the right side, (3), and the straight line passing through the position where the “white” pixel is located is the upper side, (4 ) A rectangle that scans from the bottom and first has a “white” pixel passing through a certain position in the horizontal direction as the lower side.

図3の説明に戻る。次に、制御部11は、ステップS103において算出された外接矩形を基にして、対象物の大きさに応じてオブジェクトをリサイズする(ステップS104)。   Returning to the description of FIG. Next, the control unit 11 resizes the object according to the size of the object based on the circumscribed rectangle calculated in step S103 (step S104).

図7は、オブジェクト配置装置1のリサイズ処理の例を示す図である。制御部11は、図7(a)に示すオブジェクトのマスク画像25及び外接矩形53に対して、図7(b)に示すリサイズされた外接矩形55と、図7(c)に示すリサイズされたオブジェクト画像21a及びリサイズされたマスク画像25aを生成する。   FIG. 7 is a diagram illustrating an example of the resizing process of the object placement device 1. For the mask image 25 and circumscribed rectangle 53 of the object shown in FIG. 7A, the control unit 11 resized the circumscribed rectangle 55 shown in FIG. 7B and the resized rectangle shown in FIG. 7C. An object image 21a and a resized mask image 25a are generated.

最初に、制御部11は、オブジェクトのリサイズに用いるリサイズレートを決定する。元画像に含まれる対象物の実寸幅(mm)をW_bg_ex、元画像に含まれる対象物の画素幅(pixel)をW_bg_px、オブジェクトの実寸幅(mm)をW_ob_ex、
オブジェクトの画像の画素幅(pixel)をW_ob_pxとすると、幅のリサイズレートW_Rは、W_R=(W_bg_ex×W_bg_px)/(W_ob_ex×W_ob_px)によって求められる。高さのリサイズレートH_Rについても、同様に求められる。
First, the control unit 11 determines a resizing rate used for resizing an object. W_bg_ex is the actual width (mm) of the object included in the original image, W_bg_px is the pixel width (pixel) of the object included in the original image, W_ob_ex is the actual width (mm) of the object,
If the pixel width (pixel) of the image of the object is W_ob_px, the width resizing rate W_R is obtained by W_R = (W_bg_ex × W_bg_px) / (W_ob_ex × W_ob_px). The height resize rate H_R is also obtained in the same manner.

次に、制御部11は、リサイズレートに基づいて、外接矩形53をリサイズし、リサイズされた外接矩形55を算出する。また、制御部11は、リサイズレートに基づいて、オブジェクトの画像21及びマスク画像25をリサイズし、リサイズされたオブジェクト画像21a及びリサイズされたマスク画像25aを生成する。   Next, the control unit 11 resizes the circumscribed rectangle 53 based on the resizing rate, and calculates the resized circumscribed rectangle 55. Further, the control unit 11 resizes the object image 21 and the mask image 25 based on the resizing rate, and generates the resized object image 21a and the resized mask image 25a.

対象物の大きさに応じてリサイズされたオブジェクト画像21aを元画像に合成することによって、一般消費者は、新たな家具やインテリアを配置した場合の部屋の広さを正確に確認することができる。   By synthesizing the resized object image 21a according to the size of the object with the original image, the general consumer can accurately confirm the size of the room when new furniture or interior is arranged. .

また、外接矩形に基づいてオブジェクトをリサイズすることにより、元画像における対象物の向き、また、オブジェクトの画像21及びマスク画像25におけるオブジェクトの向きに関係なくリサイズ処理を行うことができる。従って、必ずしも対象物の正面方向から撮影した元画像を用意する必要はなく、また、オブジェクトの画像21及びマスク画像25もオブジェクトの正面方向からの画像でなくてもよい。さらに、元画像における対象物の向きと、オブジェクトの画像21及びマスク画像25におけるオブジェクトの向きとは一致している必要もない。   Further, by resizing the object based on the circumscribed rectangle, the resizing process can be performed regardless of the orientation of the object in the original image and the orientation of the object in the object image 21 and the mask image 25. Therefore, it is not always necessary to prepare an original image taken from the front direction of the object, and the object image 21 and the mask image 25 do not have to be images from the front direction of the object. Furthermore, the orientation of the object in the original image and the orientation of the object in the object image 21 and the mask image 25 do not need to match.

尚、オブジェクト配置装置1は、ステップS104の処理に代えて、オブジェクトごとに、大きさの異なる画像及び外接矩形のデータを数多く記憶部12に記憶させておき、制御部11が記憶部12を検索し、元画像に含まれる対象物の外接矩形の大きさに最も近いデータを取得し、リサイズされた外接矩形55、リサイズされたオブジェクト画像21a及びリサイズされたマスク画像25aとしても良い。   The object placement apparatus 1 stores a large number of images and circumscribed rectangle data of different sizes in the storage unit 12 for each object instead of the process of step S104, and the control unit 11 searches the storage unit 12. Then, data closest to the size of the circumscribed rectangle of the target object included in the original image may be acquired, and the resized circumscribed rectangle 55, the resized object image 21a, and the resized mask image 25a may be used.

図3の説明に戻る。次に、制御部11は、ステップS104においてリサイズされたオブジェクトの配置位置を決定する(ステップS105)。   Returning to the description of FIG. Next, the control unit 11 determines the arrangement position of the object resized in step S104 (step S105).

図8は、オブジェクト配置装置1のレイアウト処理の例を示す図である。制御部11は、オブジェクトを元画像における対象物の位置に配置するため、位置合わせを行う。左右方向の位置合わせは、例えば、(1)左に合わせる、(2)中央に合わせる、(3)右に合わせる、の3通りである。どの位置合わせを行うかについては、予め設定情報として記憶部12に記憶させておいても良いし、ユーザから選択を受け付けるようにしても良い。   FIG. 8 is a diagram illustrating an example of layout processing of the object placement device 1. The control unit 11 performs alignment in order to place the object at the position of the object in the original image. The alignment in the left-right direction is, for example, three ways: (1) align to the left, (2) align to the center, and (3) align to the right. Which position is to be aligned may be stored in advance in the storage unit 12 as setting information, or a selection may be received from the user.

制御部11は、図8(a)に示すリサイズされたマスク画像25aの外接矩形55に対して位置合わせを行う。(1)左に合わせる場合、図8(b)に示すように、制御部11は、オブジェクトのリサイズされた外接矩形55の左辺と、対象物の外接矩形51の左辺とが重なる位置にオブジェクトを配置する。(2)中央に合わせる場合、図8(c)に示すように、制御部11は、オブジェクトのリサイズされた外接矩形55の上下方向に伸びる二等分線と、対象物の外接矩形51の上下方向に伸びる二等分線とが重なる位置にオブジェクトを配置する。(3)右に合わせる場合、図8(d)に示すように、制御部11は、オブジェクトのリサイズされた外接矩形55の右辺と、対象物の外接矩形51の右辺とが重なる位置にオブジェクトを配置する。   The control unit 11 aligns the circumscribed rectangle 55 of the resized mask image 25a shown in FIG. (1) When adjusting to the left, as shown in FIG. 8B, the control unit 11 moves the object to a position where the left side of the resized circumscribed rectangle 55 of the object and the left side of the circumscribed rectangle 51 of the object overlap. Deploy. (2) In the case of matching with the center, as shown in FIG. 8C, the control unit 11 causes the bisector extending in the vertical direction of the resized circumscribed rectangle 55 of the object and the upper and lower sides of the circumscribed rectangle 51 of the target object. The object is arranged at a position where the bisector extending in the direction overlaps. (3) When aligning to the right, as shown in FIG. 8D, the control unit 11 moves the object to a position where the right side of the resized circumscribed rectangle 55 of the object and the right side of the circumscribed rectangle 51 of the object overlap. Deploy.

尚、図8に示す例では、上下方向の位置合わせは、いずれも下に合わせるものとしたが、これに限定されるものではない。左右方向の位置合わせと同様、上下方向の位置合わせも、(1)上に合わせる、(2)中央に合わせる、(3)下に合わせる、の3通りの方法が可能である。その場合、制御部11による処理内容も、左右方向の位置合わせと同様である。   In the example shown in FIG. 8, the vertical alignment is performed downward, but is not limited to this. Similar to the horizontal alignment, the vertical alignment can be performed in three ways: (1) align to the top, (2) align to the center, and (3) align to the bottom. In this case, the processing content by the control unit 11 is the same as that in the horizontal alignment.

図3の説明に戻る。次に、制御部11は、オブジェクトの二値画像を反転し、反転画像と対象物の二値画像との論理積を求め、修復部を算出する(ステップS106)。すなわち、制御部11は、対象物の画像の範囲内でオブジェクトの画像が重ならない部分を修復部として算出する。本実施の形態では、修復部は、元画像(家具が配置されている部屋)において、対象物(買い替え対象の家具)を除外し、オブジェクト(購入を希望する家具)を配置した場合に空白となる領域を意味する。   Returning to the description of FIG. Next, the control unit 11 inverts the binary image of the object, obtains a logical product of the inverted image and the binary image of the object, and calculates a restoration unit (step S106). That is, the control unit 11 calculates, as a restoration unit, a portion where the object image does not overlap within the range of the target image. In the present embodiment, the restoration unit excludes the object (furniture to be replaced) in the original image (room where the furniture is arranged) and places an object (furniture desired to be purchased) as blank. Means an area.

図9は、オブジェクト配置装置1の修復部算出処理の例を示す図である。制御部11は、図9(a)に示すオブジェクトのマスク画像25a(二値画像)を反転し、図9(b)に示すマスク画像25aの反転画像61とする。次に、制御部11は、図9(c)に示すように、ステップS105において決定されたオブジェクトの配置位置に基づいて、オブジェクトの外接矩形55を、対象物のマスク画像45に配置する。そして、制御部11は、図9(d)に示すように、反転画像61と対象物のマスク画像45(二値画像)との論理積画像63を生成し、「白」の部分を修復部65とする。このように、論理演算で処理を行うことによって、修復部65を容易に算出することができる。   FIG. 9 is a diagram illustrating an example of the restoration unit calculation process of the object arrangement device 1. The control unit 11 inverts the mask image 25a (binary image) of the object shown in FIG. 9A to obtain an inverted image 61 of the mask image 25a shown in FIG. 9B. Next, as shown in FIG. 9C, the control unit 11 arranges the circumscribed rectangle 55 of the object on the mask image 45 of the object based on the arrangement position of the object determined in step S105. Then, as shown in FIG. 9D, the control unit 11 generates a logical product image 63 of the reverse image 61 and the mask image 45 (binary image) of the object, and restores the “white” portion to the restoration unit. 65. In this way, the restoration unit 65 can be easily calculated by performing the processing with the logical operation.

図3の説明に戻る。次に、制御部11は、元画像の修復部に属する画素データを、元画像の近傍の画素データで補完し、修復画像を生成する(ステップS107)。例えば、制御部11は、元画像の修復部に位置する特定の着目画素に対して、着目画素の周辺画素群をテンプレートとし、テンプレートマッチングにより最も近いパッチを求めることによって、前記着目画素の画素データを補完する。尚、画像修復処理の手法は、テンプレートマッチングに限るものではなく、他の公知の技術を用いても良い。   Returning to the description of FIG. Next, the control unit 11 complements pixel data belonging to the restoration unit of the original image with pixel data in the vicinity of the original image, and generates a restoration image (step S107). For example, the control unit 11 uses the peripheral pixel group of the target pixel as a template for a specific target pixel located in the restoration unit of the original image, and obtains the closest patch by template matching, thereby obtaining pixel data of the target pixel. To complement. Note that the image restoration processing method is not limited to template matching, and other known techniques may be used.

図10は、オブジェクト配置装置1の画像修復処理の例を示す図である。図10(a)に示すように、制御部11は、修復部65に属する画素の中から着目画素67を順次選択し、着目画素の周辺画素群からなるテンプレート69を決定する。テンプレート69は、例えば、図10(b)に示すように、着目画素67を中心として、上下左右方向にそれぞれ2画素ずつ含む5×5のグリッドである。ここで、テンプレート69に含まれる各画素の画素値は、修復部65に属する画素を除き、元画像の画素値である。また、パッチに含まれる各画素の画素値は、元画像の画素値である。尚、修復部65に属する画素の画素値は、補完されるまではNULL(値なし)であるため、テンプレートの中に、まだ補完されていない修復部の画素が含まれている場合、差の2乗の和の計算対象から外す。一方、補完されている修復部の画素については、差の2乗の和の計算対象としても良い。   FIG. 10 is a diagram illustrating an example of image restoration processing of the object placement apparatus 1. As shown in FIG. 10A, the control unit 11 sequentially selects the target pixel 67 from the pixels belonging to the restoration unit 65, and determines a template 69 including a peripheral pixel group of the target pixel. For example, as illustrated in FIG. 10B, the template 69 is a 5 × 5 grid that includes two pixels in the vertical and horizontal directions around the target pixel 67. Here, the pixel value of each pixel included in the template 69 is the pixel value of the original image, excluding the pixels belonging to the restoration unit 65. Further, the pixel value of each pixel included in the patch is the pixel value of the original image. Since the pixel values of the pixels belonging to the restoration unit 65 are NULL (no value) until they are complemented, if the template includes pixels of the restoration unit that have not yet been complemented, Remove from the sum of squares. On the other hand, the pixel of the repaired portion that is complemented may be a calculation target of the sum of the squares of the differences.

次に、制御部11は、テンプレート69を用いて、元画像に対するテンプレートマッチングを実施する。図10(c)に示すように、制御部11は、最も近いパッチ70を求め、そのパッチ70に基づいて着目画素67の画素値を決定する。制御部11は、この処理を修復部65に属する全ての画素に対して実行し、図10(d)に示す修復画像71を生成する。これによって、高速な処理を実現することができる。尚、修復画像71には修復部65に属さなかった対象物(残りの画像)33が残存するが、後述する合成処理によって、この領域にはオブジェクトの画像データが重畳されるため、問題はない。   Next, the control unit 11 performs template matching on the original image using the template 69. As illustrated in FIG. 10C, the control unit 11 obtains the closest patch 70 and determines the pixel value of the pixel of interest 67 based on the patch 70. The control unit 11 executes this process for all the pixels belonging to the restoration unit 65, and generates a restoration image 71 shown in FIG. As a result, high-speed processing can be realized. Note that the target object (remaining image) 33 that does not belong to the repair unit 65 remains in the repair image 71. However, there is no problem because the image data of the object is superimposed on this area by the synthesis process described later. .

テンプレート69とパッチ70との類似度の判定基準は、例えば、次式に示す画素値の差の二乗の合計SSSDを用いる。ここで、g(x,y):元画像、f(x,y):テンプレート69、g(d,d):パッチ70、i:x方向カウンタ、j:y方向カウンタである。 Criterion of the similarity between the template 69 and the patch 70 may, for example, a total S SSD of square of the difference between the pixel values shown in the following equation. Here, g (x, y): original image, f (x, y): template 69, g (d x , dy ): patch 70, i: x direction counter, j: y direction counter.

Figure 2016071682
Figure 2016071682

図3の説明に戻る。次に、制御部11は、修復画像にオブジェクトの画像データを合成(なじませ合成)する(ステップS108)。   Returning to the description of FIG. Next, the control unit 11 combines the image data of the object with the repaired image (step S108).

図11は、オブジェクト配置装置1の画像合成処理の例を示す図である。制御部11は、図11(a)に示す修復画像71の外接矩形55内に、図11(b)に示すリサイズされたオブジェクトの画像21aを合成し、図11(c)に示す合成画像73を生成する。   FIG. 11 is a diagram illustrating an example of image composition processing of the object placement device 1. The control unit 11 synthesizes the resized object image 21a shown in FIG. 11B in the circumscribed rectangle 55 of the repair image 71 shown in FIG. 11A, and forms a composite image 73 shown in FIG. Is generated.

例えば、制御部11は、元画像の画像データに基づいてポアソンブレンディング(又は、「Poisson Image Editing」とも言う。)によりオブジェクトの画像データを変換し、修復画像に合成する。尚、画像合成処理の手法は、ポアソンブレンディングに限るものではなく、他の公知の技術を用いても良い。   For example, the control unit 11 converts the image data of the object by Poisson blending (also referred to as “Poisson Image Editing”) based on the image data of the original image, and synthesizes it with the repaired image. Note that the method of image composition processing is not limited to Poisson blending, and other known techniques may be used.

図12は、オブジェクト配置装置1の画像合成処理を説明する図である。ポアソンブレンディングでは、色味は貼り付け先の画像(修復画像)のものに依存させ、画像の勾配は貼り付け元の画像(オブジェクトの画像)のものを用いて合成する手法である。ポアソンブレンディングでは、貼り付け元の画像データを微分値の集まりとして扱い、なるべく微分値を保存して、貼り付けの境界の値を合わせ、自然な画像合成を行う。これを実現するものが連立微分方程式(ポアソン方程式)であり、ガウスザイデル法によって解くことが可能である。   FIG. 12 is a diagram for explaining image composition processing of the object placement apparatus 1. Poisson blending is a technique in which the color is made dependent on the image of the pasting destination (restored image), and the gradient of the image is synthesized using the image of the pasting source (image of the object). In Poisson blending, the image data of the pasting source is treated as a collection of differential values, the differential values are stored as much as possible, the values of the pasting boundaries are matched, and natural image synthesis is performed. What realizes this is a simultaneous differential equation (Poisson equation), which can be solved by the Gauss-Seidel method.

図12では、ポアソンブレンディングによる処理のイメージを示している。図12(a)は、ポアソンブレンディングによる処理を行う前、図12(b)は、ポアソンブレンディングによる処理を行った後のイメージを示している。   FIG. 12 shows an image of processing by Poisson blending. 12A shows an image before processing by Poisson blending, and FIG. 12B shows an image after processing by Poisson blending.

図12(a)では、貼り付け元の画像データ81をそのまま貼り付け先の画像データ83に配置している。従って、貼り付け範囲85の両端、すなわち貼り付けの境界87において、両者の画像データの値に大きな差異がある。このような差異があると、実際の画像においては、貼り付け元の画像データ81が浮いた感じになり、違和感が生じる。   In FIG. 12A, the paste-source image data 81 is arranged in the paste-destination image data 83 as it is. Accordingly, there is a large difference between the values of the image data at both ends of the pasting range 85, that is, at the pasting boundary 87. If there is such a difference, in the actual image, the image data 81 of the pasting source will feel floating, and a sense of incongruity will occur.

一方、図12(b)では、ポアソンブレンディングによって、色味を貼り付け先の画像データ83に依存させる形で貼り付け元の画像データ81を変換している。従って、貼り付けの境界87において、変換後の貼り付け元の画像データ89と貼り付け先の画像データ83との値に大きな差異がない。これによって、実際の画像ではあまり違和感が生じない。   On the other hand, in FIG. 12B, the paste-source image data 81 is converted by Poisson blending so that the color depends on the paste-destination image data 83. Accordingly, at the pasting boundary 87, there is no significant difference between the values of the pasted source image data 89 and the pasted destination image data 83. As a result, the actual image does not feel uncomfortable.

このように、敢えて、オブジェクト(買い替えを希望する家具)の画像の色合いを変換し、元画像の色合いに近づけることによって、ユーザは、買い替えを希望する家具単体ではなく、部屋の壁紙、床、他の家具などの色も総合的に考慮して、買い替えを希望する家具の色を選択することができる。   In this way, by changing the color of the image of the object (furniture desired to be replaced) and bringing it closer to the color of the original image, the user can change the wallpaper of the room, floor, etc. The color of furniture desired to be replaced can be selected by comprehensively considering the color of the furniture.

以上、オブジェクト配置装置1は、図3に示すフローチャートに従って、オブジェクト配置処理を実行する。本発明の実施の形態におけるオブジェクト配置装置1によって、2D画像を用いてコストを抑えつつ、家具やインテリアの買い替え時であっても、オブジェクトのデザインやカラーと、既に持っている家具やインテリアを含めた背景との親和性を確認することができ、ユーザの意思決定を手助けできるような高品質な合成画像を得ることができる。   As described above, the object placement apparatus 1 executes the object placement processing according to the flowchart shown in FIG. The object placement device 1 according to the embodiment of the present invention includes the design and color of an object and the furniture and interior that the user already has, even at the time of replacement of furniture and interior, while reducing costs by using 2D images. Therefore, it is possible to confirm the affinity with the background and to obtain a high-quality composite image that can assist the user in making decisions.

以上、添付図面を参照しながら、本発明に係るオブジェクト配置装置等の好適な実施形態について説明したが、本発明はかかる例に限定されない。当業者であれば、本願で開示した技術的思想の範疇内において、各種の変更例又は修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   The preferred embodiments of the object placement device and the like according to the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to such examples. It will be apparent to those skilled in the art that various changes or modifications can be conceived within the scope of the technical idea disclosed in the present application, and these naturally belong to the technical scope of the present invention. Understood.

1………オブジェクト配置装置
21………オブジェクトの画像
21a………リサイズされたオブジェクトの画像
23………オブジェクトを含む画像
25………マスク画像
25a………リサイズされたマスク画像
31………元画像
33………対象物
35………輪郭線
37………輪郭線(灰色)
41………二値画像
43………トライマップ画像
45………マスク画像
51………外接矩形
53………外接矩形
55………リサイズされた外接矩形
61………マスク画像25aの反転画像
63………反転画像61とマスク画像45の論理積画像
65………修復部
67………着目画素
69………テンプレート
70………パッチ
71………修復画像
73………合成画像
DESCRIPTION OF SYMBOLS 1 ......... Object arrangement | positioning apparatus 21 ......... Object image 21a ......... Resized object image 23 ......... Image including object 25 ......... Mask image 25a ......... Resized mask image 31 ... ... original image 33 ...... object 35 ......... contour line 37 ......... contour line (gray)
41... Binary image 43... Trimap image 45... Mask image 51... Circumscribed rectangle 53... Circumscribed rectangle 55... Resized circumscribed rectangle 61. Image 63... AND image of inverted image 61 and mask image 45 65... Restoration unit 67... Pixel of interest 69... Template 70... Patch 71.

Claims (8)

複数のオブジェクトを記憶する記憶手段と、
対象物を含む元画像から前記対象物の画像を抽出する抽出手段と、
前記記憶手段により記憶される複数のオブジェクトから特定のオブジェクトの選択を受け付ける受付手段と、
前記受付手段により受け付けられるオブジェクトを前記元画像における前記対象物の位置に配置し、前記対象物の画像の範囲内で前記オブジェクトの画像が重ならない部分を修復部として算出する算出手段と、
前記元画像の前記修復部に位置する画素データを、前記元画像の近傍の画素データで補完し、修復画像を生成する生成手段と、
前記修復画像に対して、前記オブジェクトの画像を合成する合成手段と、
を具備することを特徴とするオブジェクト配置装置。
Storage means for storing a plurality of objects;
Extracting means for extracting an image of the object from an original image including the object;
Receiving means for receiving selection of a specific object from a plurality of objects stored by the storage means;
A calculating unit that arranges an object received by the receiving unit at the position of the target in the original image, and calculates a portion in which the image of the object does not overlap within the range of the image of the target as a restoration unit;
Generating means for complementing pixel data located in the restoration unit of the original image with pixel data in the vicinity of the original image and generating a restored image;
A combining means for combining the image of the object with the repaired image;
An object placement apparatus comprising:
前記受付手段により受け付けられるオブジェクトを前記対象物の大きさに応じてリサイズするリサイズ手段、を更に具備し、
前記算出手段は、前記リサイズ手段によってリサイズされるオブジェクトを前記元画像における前記対象物の位置に配置し、前記修復部を算出することを特徴とする請求項1に記載のオブジェクト配置装置。
Resizing means for resizing the object received by the receiving means according to the size of the object;
The object placement apparatus according to claim 1, wherein the calculation unit places the object resized by the resizing unit at a position of the target in the original image, and calculates the restoration unit.
前記リサイズ手段は、前記オブジェクトの外接矩形及び前記対象物の外接矩形に基づいて、前記オブジェクトをリサイズすることを特徴とする請求項2に記載のオブジェクト配置装置。   The object resizing device according to claim 2, wherein the resizing unit resizes the object based on a circumscribed rectangle of the object and a circumscribed rectangle of the object. 前記算出手段は、前記オブジェクトのマスク画像の反転画像と、前記対象物のマスク画像との論理積を求めて、前記修復部を算出することを特徴とする請求項1乃至請求項3のいずれか1項に記載のオブジェクト配置装置。   4. The calculation unit according to claim 1, wherein the calculation unit calculates the restoration unit by calculating a logical product of a reverse image of the mask image of the object and a mask image of the object. The object arrangement device according to item 1. 前記生成手段は、前記元画像の前記修復部に属する特定の着目画素に対して、前記着目画素の周辺画素群をテンプレートとし、テンプレートマッチングにより最も近いパッチを求めることによって、前記着目画素の画素データを補完することを特徴とする請求項1乃至請求項4のいずれか1項に記載のオブジェクト配置装置。   The generating means obtains the closest patch by template matching for a specific pixel of interest belonging to the restoration unit of the original image and using a peripheral pixel group of the pixel of interest as a template, thereby obtaining pixel data of the pixel of interest The object placement device according to any one of claims 1 to 4, wherein the object placement device is supplemented. 前記合成手段は、前記元画像の画像に基づいてポアソンブレンディングにより前記オブジェクトの画像を変換し、前記修復画像に合成することを特徴とする請求項1乃至請求項5のいずれか1項に記載のオブジェクト配置装置。   The said synthesis | combination means converts the image of the said object by Poisson blending based on the image of the said original image, and synthesize | combines it with the said restored image. Object placement device. 複数のオブジェクトを記憶する記憶部を備えるコンピュータの制御部が、
対象物を含む元画像から前記対象物の画像を抽出する抽出ステップと、
前記記憶部により記憶される複数のオブジェクトから特定のオブジェクトの選択を受け付ける受付ステップと、
前記受付ステップにより受け付けられるオブジェクトを前記元画像における前記対象物の位置に配置し、前記対象物の画像の範囲内で前記オブジェクトの画像が重ならない部分を修復部として算出する算出ステップと、
前記元画像の前記修復部に位置する画素データを、前記元画像の近傍の画素データで補完し、修復画像を生成する生成ステップと、
前記修復画像に対して、前記オブジェクトの画像を合成する合成ステップと、
を実行することを特徴とするオブジェクト配置方法。
A control unit of a computer including a storage unit that stores a plurality of objects,
An extraction step of extracting an image of the object from an original image including the object;
An accepting step of accepting selection of a specific object from a plurality of objects stored by the storage unit;
A calculation step of arranging an object received by the reception step at a position of the target in the original image, and calculating a portion in which the image of the object does not overlap within a range of the target image as a restoration unit;
A generation step of complementing pixel data located in the restoration unit of the original image with pixel data in the vicinity of the original image, and generating a restored image;
A synthesis step of synthesizing the image of the object with the repaired image;
An object placement method characterized by executing
コンピュータを、
複数のオブジェクトを記憶する記憶手段と、
対象物を含む元画像から前記対象物の画像を抽出する抽出手段と、
前記記憶手段により記憶される複数のオブジェクトから特定のオブジェクトの選択を受け付ける受付手段と、
前記受付手段により受け付けられるオブジェクトを前記元画像における前記対象物の位置に配置し、前記対象物の画像の範囲内で前記オブジェクトの画像が重ならない部分を修復部として算出する算出手段と、
前記元画像の前記修復部に位置する画素データを、前記元画像の近傍の画素データで補完し、修復画像を生成する生成手段と、
前記修復画像に対して、前記オブジェクトの画像を合成する合成手段として機能させるためのプログラム。
Computer
Storage means for storing a plurality of objects;
Extracting means for extracting an image of the object from an original image including the object;
Receiving means for receiving selection of a specific object from a plurality of objects stored by the storage means;
A calculating unit that arranges an object received by the receiving unit at the position of the target in the original image, and calculates a portion in which the image of the object does not overlap within the range of the image of the target as a restoration unit;
Generating means for complementing pixel data located in the restoration unit of the original image with pixel data in the vicinity of the original image and generating a restored image;
A program for causing the repaired image to function as a combining unit that combines the image of the object.
JP2014201150A 2014-09-30 2014-09-30 Object arrangement device, object arrangement method, and program Pending JP2016071682A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014201150A JP2016071682A (en) 2014-09-30 2014-09-30 Object arrangement device, object arrangement method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014201150A JP2016071682A (en) 2014-09-30 2014-09-30 Object arrangement device, object arrangement method, and program

Publications (1)

Publication Number Publication Date
JP2016071682A true JP2016071682A (en) 2016-05-09

Family

ID=55866938

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014201150A Pending JP2016071682A (en) 2014-09-30 2014-09-30 Object arrangement device, object arrangement method, and program

Country Status (1)

Country Link
JP (1) JP2016071682A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020081252A1 (en) * 2018-10-15 2020-04-23 Shutterstock, Inc. Image editor for merging images with generative adversarial networks
CN111191116A (en) * 2019-12-11 2020-05-22 珠海格力电器股份有限公司 Consumption push air conditioner display method based on binocular camera detection home environment
JP2020098409A (en) * 2018-12-17 2020-06-25 ヤフー株式会社 Image processing apparatus, image processing method, and image processing program
US10699458B2 (en) 2018-10-15 2020-06-30 Shutterstock, Inc. Image editor for merging images with generative adversarial networks
US10943377B2 (en) 2018-10-15 2021-03-09 Shutterstock, Inc. Creating images using image anchors and generative adversarial networks
KR20210053600A (en) * 2019-11-04 2021-05-12 주식회사 헬스맥스 Method for providing house management information
JP2022113269A (en) * 2021-01-25 2022-08-04 キヤノン株式会社 IMAGE PROCESSING DEVICE, CONTROL METHOD AND PROGRAM FOR IMAGE PROCESSING DEVICE
JP7807768B1 (en) 2025-11-08 2026-01-28 アクチュアル株式会社 Reform image generation system, method, program and device.

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004246729A (en) * 2003-02-14 2004-09-02 Japan Science & Technology Agency Person moving image generation system
JP2012252437A (en) * 2011-06-01 2012-12-20 Sony Corp Image processing apparatus, image processing method, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004246729A (en) * 2003-02-14 2004-09-02 Japan Science & Technology Agency Person moving image generation system
JP2012252437A (en) * 2011-06-01 2012-12-20 Sony Corp Image processing apparatus, image processing method, and program

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020081252A1 (en) * 2018-10-15 2020-04-23 Shutterstock, Inc. Image editor for merging images with generative adversarial networks
US10699458B2 (en) 2018-10-15 2020-06-30 Shutterstock, Inc. Image editor for merging images with generative adversarial networks
US10943377B2 (en) 2018-10-15 2021-03-09 Shutterstock, Inc. Creating images using image anchors and generative adversarial networks
JP2020098409A (en) * 2018-12-17 2020-06-25 ヤフー株式会社 Image processing apparatus, image processing method, and image processing program
JP7139236B2 (en) 2018-12-17 2022-09-20 ヤフー株式会社 Image processing device, image processing method and image processing program
KR20210053600A (en) * 2019-11-04 2021-05-12 주식회사 헬스맥스 Method for providing house management information
KR102373780B1 (en) * 2019-11-04 2022-03-15 주식회사 헬스맥스 Method for providing house management information
CN111191116A (en) * 2019-12-11 2020-05-22 珠海格力电器股份有限公司 Consumption push air conditioner display method based on binocular camera detection home environment
JP2022113269A (en) * 2021-01-25 2022-08-04 キヤノン株式会社 IMAGE PROCESSING DEVICE, CONTROL METHOD AND PROGRAM FOR IMAGE PROCESSING DEVICE
JP7807768B1 (en) 2025-11-08 2026-01-28 アクチュアル株式会社 Reform image generation system, method, program and device.

Similar Documents

Publication Publication Date Title
JP2016071682A (en) Object arrangement device, object arrangement method, and program
CN109872379B (en) Data processing device and method
EP3357238B1 (en) Volumetric depth video recording and playback
KR102638526B1 (en) Modifying scenes in augmented reality using parameterized markers
KR102230416B1 (en) Image processing device, image generation method, and computer program
US8487926B2 (en) Method and apparatus for generating 3D image using 2D photograph images
JP5299173B2 (en) Image processing apparatus, image processing method, and program
US9202309B2 (en) Methods and apparatus for digital stereo drawing
CN105321171B (en) Image segmentation for live camera feeds
JP7208549B2 (en) VIRTUAL SPACE CONTROL DEVICE, CONTROL METHOD THEREOF, AND PROGRAM
KR101851303B1 (en) Apparatus and method for reconstructing 3d space
JP7743579B2 (en) Image processing device and image processing method using the image processing device
KR20210032549A (en) Image processing apparatus, image processing method, and computer program
EP4285313A1 (en) Three-dimensional modelling from photographs in series
JP6555755B2 (en) Image processing apparatus, image processing method, and image processing program
JP6357412B2 (en) Information processing apparatus, information processing system, information processing method, and program
JP6011567B2 (en) Information processing apparatus, control method thereof, and program
JP2017188071A (en) Pattern change simulation apparatus, pattern change simulation method, and program
JP7119854B2 (en) Changed pixel region extraction device, image processing system, changed pixel region extraction method, image processing method and program
JP2010033397A (en) Image composition device and method
KR20120118462A (en) Concave surface modeling in image-based visual hull
JP6962242B2 (en) Information processing device, superimposition display program, superimposition display method
Hanusch A new texture mapping algorithm for photorealistic reconstruction of 3D objects
JP5994320B2 (en) Depth production support apparatus, depth production support method, and program
JP7119853B2 (en) Changed pixel region extraction device, image processing system, changed pixel region extraction method, image processing method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170727

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180918

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20190312