JP2016139201A - Image processing device, image processing method, and program - Google Patents

Image processing device, image processing method, and program

Info

Publication number
JP2016139201A
JP2016139201A JP2015012562A JP2015012562A JP2016139201A JP 2016139201 A JP2016139201 A JP 2016139201A JP 2015012562 A JP2015012562 A JP 2015012562A JP 2015012562 A JP2015012562 A JP 2015012562A JP 2016139201 A JP2016139201 A JP 2016139201A
Authority
JP
Japan
Prior art keywords
virtual
unit
dimensional
image
shape
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
JP2015012562A
Other languages
Japanese (ja)
Inventor
岡本 拓也
Takuya Okamoto
拓也 岡本
吉田 浩之
Hiroyuki Yoshida
浩之 吉田
里江子 石原
Rieko Ishihara
里江子 石原
祐貴 河田
Yuki Kawada
祐貴 河田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2015012562A priority Critical patent/JP2016139201A/en
Publication of JP2016139201A publication Critical patent/JP2016139201A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily provide an image showing a state in which a virtual object is pasted to a virtual stereoscopic object of an optional shape.SOLUTION: A photographing unit 12 acquires a photographed image. An acquisition unit 14D acquires bent shape information obtained by a bent shape of a virtual object to be arranged in a virtual three-dimensional space represented by two-dimensional device coordinates representing a display surface of a display unit 20. A shape calculation unit 14E calculates a three-dimensional shape of the virtual stereoscopic object showing a pasting object of the virtual object in accordance with the bent shape information. A projection unit 14F generates an object image projected to a two-dimensional space. A display control unit 14H displays an overlapping image obtained by overlapping an object image on the photographed image in the display unit 20.SELECTED DRAWING: Figure 4

Description

本発明は、画像処理装置、画像処理方法、およびプログラムに関する。   The present invention relates to an image processing device, an image processing method, and a program.

現実空間の事象に対してコンピュータによる情報を付加する拡張現実(AR:Augmented Reality)技術が知られている。AR技術として、カメラで撮影した撮影画像上に仮想オブジェクトを合成して表示する技術も開示されている。   Augmented reality (AR) technology for adding information by a computer to an event in a real space is known. As an AR technique, a technique for combining and displaying a virtual object on a photographed image photographed by a camera is also disclosed.

また、仮想物体の立体形状を示す三次元データを用意し、用意した仮想立体物の表面に繊維シートを貼り付けたものを、所定の視点から観察した投影画像を生成する技術が開示されている(例えば、特許文献1参照)。   In addition, a technique is disclosed in which three-dimensional data indicating a three-dimensional shape of a virtual object is prepared, and a projection image in which a fiber sheet is pasted on the surface of the prepared virtual three-dimensional object is observed from a predetermined viewpoint. (For example, refer to Patent Document 1).

しかし、従来では、繊維シートなどの仮想オブジェクトを貼り付ける三次元データを別途用意する必要があり、仮想オブジェクトを任意の形状の仮想立体物に貼り付けた状態を示す画像を提供することは困難であった。   However, conventionally, it is necessary to separately prepare three-dimensional data for attaching a virtual object such as a fiber sheet, and it is difficult to provide an image showing a state in which the virtual object is attached to a virtual solid object having an arbitrary shape. there were.

上述した課題を解決し、目的を達成するために、本発明に係る画像処理装置は、撮影画像を得る撮影部と、仮想三次元空間に配置する仮想オブジェクトの曲げ形状を、表示部の表示面を表す二次元デバイス座標で表した、曲げ形状情報を取得する取得部と、前記曲げ形状情報に応じて、前記仮想オブジェクトの貼り付け対象を示す仮想立体物の三次元形状を算出する形状算出部と、前記仮想立体物の表面に貼り付けた前記仮想オブジェクトを、二次元空間に射影したオブジェクト画像を生成する射影部と、前記撮影画像に前記オブジェクト画像を重畳した重畳画像を前記表示部へ表示する表示制御部と、を備える。   In order to solve the above-described problems and achieve the object, an image processing apparatus according to the present invention includes a photographing unit that obtains a photographed image, a bending shape of a virtual object that is arranged in a virtual three-dimensional space, and a display surface of the display unit. An acquisition unit that acquires bending shape information represented by two-dimensional device coordinates representing a shape, and a shape calculation unit that calculates a three-dimensional shape of a virtual three-dimensional object indicating a pasting target of the virtual object according to the bending shape information A projecting unit that generates an object image obtained by projecting the virtual object pasted on the surface of the virtual three-dimensional object into a two-dimensional space, and a superimposed image obtained by superimposing the object image on the captured image is displayed on the display unit. A display control unit.

本発明は、仮想オブジェクトを任意の形状の仮想立体物に貼り付けた状態を示す画像を容易に提供することができる、という効果を奏する。   The present invention has an effect that an image showing a state in which a virtual object is pasted on a virtual solid object having an arbitrary shape can be easily provided.

図1は、本実施の形態の画像処理装置の模式図である。FIG. 1 is a schematic diagram of an image processing apparatus according to the present embodiment. 図2は、画像処理装置の外観の概略図である。FIG. 2 is a schematic view of the appearance of the image processing apparatus. 図3は、表示処理の概要を示す図である。FIG. 3 is a diagram showing an overview of the display process. 図4は、画像処理装置の機能構成を示すブロック図である。FIG. 4 is a block diagram illustrating a functional configuration of the image processing apparatus. 図5は、重畳画像生成の説明図である。FIG. 5 is an explanatory diagram of superimposed image generation. 図6は、仮想立体物の三次元形状算出の説明図である。FIG. 6 is an explanatory diagram for calculating the three-dimensional shape of the virtual three-dimensional object. 図7は、仮想立体物の形状算出の詳細な説明図である。FIG. 7 is a detailed explanatory diagram of the calculation of the shape of the virtual three-dimensional object. 図8は、曲げ方向の説明図である。FIG. 8 is an explanatory diagram of the bending direction. 図9は、オブジェクト画像の説明図である。FIG. 9 is an explanatory diagram of an object image. 図10は、仮想オブジェクトの移動の説明図である。FIG. 10 is an explanatory diagram of the movement of the virtual object. 図11は、三次元形状算出の説明図である。FIG. 11 is an explanatory diagram of the calculation of the three-dimensional shape. 図12は、仮想立体物の形状算出の説明図である。FIG. 12 is an explanatory diagram for calculating the shape of the virtual three-dimensional object. 図13は、オブジェクト画像の説明図である。FIG. 13 is an explanatory diagram of an object image. 図14は、オブジェクト画像の移動の説明図である。FIG. 14 is an explanatory diagram of the movement of the object image. 図15は、姿勢補正の説明図である。FIG. 15 is an explanatory diagram of posture correction. 図16は、オブジェクト画像の形状変化の説明図である。FIG. 16 is an explanatory diagram of a change in the shape of the object image. 図17は、表示処理の手順を示すフローチャートである。FIG. 17 is a flowchart showing the procedure of the display process. 図18は、第1の割り込み処理の手順を示すフローチャートである。FIG. 18 is a flowchart showing the procedure of the first interrupt process. 図19は、第2の割り込み処理の手順を示すフローチャートである。FIG. 19 is a flowchart showing the procedure of the second interrupt process. 図20は、画像処理装置のハードウェア構成図である。FIG. 20 is a hardware configuration diagram of the image processing apparatus.

以下、実施形態である画像処理装置10について説明する。   Hereinafter, the image processing apparatus 10 according to the embodiment will be described.

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

図1は、本実施の形態の画像処理装置10の模式図である。   FIG. 1 is a schematic diagram of an image processing apparatus 10 according to the present embodiment.

画像処理装置10は、プレビュー画像を表示部20へ表示する装置である。   The image processing apparatus 10 is an apparatus that displays a preview image on the display unit 20.

画像処理装置10は、撮影部12、表示処理部14、記憶部16、入力部18、表示部20、および検知部25を備える。撮影部12、表示処理部14、記憶部16、入力部18、表示部20、および検知部25は、バス22により電気的に接続されている。   The image processing apparatus 10 includes a photographing unit 12, a display processing unit 14, a storage unit 16, an input unit 18, a display unit 20, and a detection unit 25. The imaging unit 12, the display processing unit 14, the storage unit 16, the input unit 18, the display unit 20, and the detection unit 25 are electrically connected by a bus 22.

なお、画像処理装置10は、撮影部12、表示処理部14、および検知部25と、記憶部16、入力部18、および表示部20の少なくとも1つと、を別体として設けた構成であってもよい。   The image processing apparatus 10 has a configuration in which the photographing unit 12, the display processing unit 14, and the detection unit 25 are provided separately from at least one of the storage unit 16, the input unit 18, and the display unit 20. Also good.

また、画像処理装置10は、携帯可能な携帯端末であってもよいし、固定型の端末であってもよい。本実施の形態では、一例として、画像処理装置10は、撮影部12と、表示処理部14と、記憶部16と、入力部18と、表示部20と、検知部25と、を一体的に備えた携帯可能な携帯端末である場合を説明する。また、画像処理装置10は、外部装置と通信するための通信部などの他の機能部を更に設けた構成であってもよい。   Further, the image processing apparatus 10 may be a portable terminal or a fixed terminal. In the present embodiment, as an example, the image processing apparatus 10 integrally includes a photographing unit 12, a display processing unit 14, a storage unit 16, an input unit 18, a display unit 20, and a detection unit 25. A case where the portable terminal is provided will be described. Further, the image processing apparatus 10 may be configured to further include other functional units such as a communication unit for communicating with an external device.

撮影部12は、画像処理装置10の位置する実空間を撮影し、撮影画像を取得する。実空間は、例えば、室内などである。更に、例えば、実空間は、複数の壁面で構成された室内であり、一例としては、床面、天井面、床面と天井面とに連続する4つの壁面で構成された立方体状の室内である。なお、実空間は、画像処理装置10の位置する現実の空間であればよく、室内に限定されない。撮影部12は、撮影によって画像データ(撮影画像)を得る公知の撮影装置である。   The imaging unit 12 captures a real space where the image processing apparatus 10 is located and acquires a captured image. The real space is, for example, a room. Further, for example, the real space is a room composed of a plurality of wall surfaces. For example, the real space is a cubic room composed of a floor surface, a ceiling surface, and four wall surfaces continuous to the floor surface and the ceiling surface. is there. The real space may be an actual space where the image processing apparatus 10 is located, and is not limited to a room. The photographing unit 12 is a known photographing device that obtains image data (photographed image) by photographing.

表示部20は、各種画像を表示する。表示部20は、LCD(Liquid Crystal Display)や、画像を投影するプロジェクタ等、公知の表示装置である。本実施の形態では、表示部20には、後述する重畳画像が表示される。   The display unit 20 displays various images. The display unit 20 is a known display device such as an LCD (Liquid Crystal Display) or a projector that projects an image. In the present embodiment, a superimposed image described later is displayed on the display unit 20.

また、本実施の形態では、一例として、表示部20と撮影部12は、画像処理装置10の筐体において、表示部20の表示方向と、撮影部12の撮影方向と、が、反対方向(180°の関係)である場合を説明する。   Moreover, in this Embodiment, as an example, the display part 20 and the imaging | photography part 12 in the housing | casing of the image processing apparatus 10 WHEREIN: The display direction of the display part 20 and the imaging | photography direction of the imaging | photography part 12 are opposite directions ( The case of 180 ° relationship) will be described.

図2は、画像処理装置10の外観の概略図である。図2(A)は、画像処理装置10を表示部20側からみた平面図である。図2(B)は、画像処理装置10を側面方向(撮影部12と表示部20との対向方向に直交する方向)から視認した状態を示す平面図である。画像処理装置10の筐体11には、撮影部12と表示部20が設けられている。なお、筐体11の内部には、検知部25や表示処理部14や記憶部16などが設けられている。   FIG. 2 is a schematic view of the appearance of the image processing apparatus 10. FIG. 2A is a plan view of the image processing apparatus 10 as viewed from the display unit 20 side. FIG. 2B is a plan view showing a state in which the image processing apparatus 10 is viewed from the side surface direction (a direction orthogonal to the facing direction of the imaging unit 12 and the display unit 20). The housing 11 of the image processing apparatus 10 is provided with a photographing unit 12 and a display unit 20. Note that a detection unit 25, a display processing unit 14, a storage unit 16, and the like are provided inside the housing 11.

図1に戻り、入力部18は、ユーザから各種操作を受け付ける。入力部18は、例えば、マウス、マイクによる音声認識、ボタン、リモコン、およびキーボード等である。   Returning to FIG. 1, the input unit 18 receives various operations from the user. The input unit 18 is, for example, voice recognition using a mouse or a microphone, buttons, a remote controller, a keyboard, and the like.

なお、入力部18と表示部20とを一体的に構成してもよい。本実施の形態では、入力部18と表示部20とを一体的に構成し、UI部19とする場合を説明する。UI部19は、例えば、表示機能と入力機能の双方を備えたタッチパネルである。   In addition, you may comprise the input part 18 and the display part 20 integrally. In the present embodiment, a case where the input unit 18 and the display unit 20 are integrally configured to form the UI unit 19 will be described. The UI unit 19 is, for example, a touch panel having both a display function and an input function.

このため、ユーザは、UI部19に表示された画像を確認しながら、UI部19上を操作することで、各種入力を行うことができる。具体的には、ユーザは、UI部19における表示部20の表示面上を操作指示することで、操作指示に応じた各種入力を行うことができる。なお、表示部20の表示面は、二次元の平面である。   For this reason, the user can perform various inputs by operating on the UI unit 19 while confirming the image displayed on the UI unit 19. Specifically, the user can perform various inputs according to the operation instruction by instructing operation on the display surface of the display unit 20 in the UI unit 19. Note that the display surface of the display unit 20 is a two-dimensional plane.

記憶部16は、メモリやハードディスクドライブ装置(HDD)等の記憶媒体であり、後述する各処理を実行するための各種プログラムや、各種データを記憶する。   The storage unit 16 is a storage medium such as a memory or a hard disk drive (HDD), and stores various programs and various data for executing processes described later.

検知部25は、実空間における撮影部12の姿勢を検出する。なお、上述したように、画像処理装置10には、撮影部12とUI部19(表示部20)が設けられている。このため、撮影部12の姿勢は、画像処理装置10に設けられた表示部20およびUI部19の姿勢と同様の意味である。   The detection unit 25 detects the posture of the photographing unit 12 in the real space. As described above, the image processing apparatus 10 includes the photographing unit 12 and the UI unit 19 (display unit 20). For this reason, the posture of the photographing unit 12 has the same meaning as the postures of the display unit 20 and the UI unit 19 provided in the image processing apparatus 10.

検知部25は、傾きや方角(角度)を検知可能な公知の検知装置である。例えば、検知部25は、ジャイロセンサ(3軸加速度計)、電子コンパス、重力加速度計などである。   The detection unit 25 is a known detection device that can detect an inclination and a direction (angle). For example, the detection unit 25 is a gyro sensor (3-axis accelerometer), an electronic compass, a gravitational accelerometer, or the like.

なお、検知部25は、実空間における位置(具体的には、ワールド座標における位置)を検出する公知の機器を更に含む構成であってもよい。例えば、検知部25は、GPS(Global Positioning System)を備えた構成であってもよい。この場合、検知部25は、姿勢に加えて、実空間における撮影部12の位置(緯度、経度、高度)を検知することができる。   The detection unit 25 may be configured to further include a known device that detects a position in real space (specifically, a position in world coordinates). For example, the detection unit 25 may be configured to include a GPS (Global Positioning System). In this case, the detection unit 25 can detect the position (latitude, longitude, altitude) of the imaging unit 12 in real space in addition to the posture.

図1に戻り、表示処理部14は、CPU(Central Processing Unit)、ROM(Read Only Memory)、およびRAM(Random Access Memory)などを含んで構成されるコンピュータである。なお、表示処理部14は、汎用のCPU以外の回路などであってもよい。表示処理部14は、画像処理装置10に設けられた装置各部を制御する。   Returning to FIG. 1, the display processing unit 14 is a computer including a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. The display processing unit 14 may be a circuit other than a general-purpose CPU. The display processing unit 14 controls each unit provided in the image processing apparatus 10.

表示処理部14は、重畳画像を表示部20へ表示する制御を行う。重畳画像は、実空間を撮影した撮影画像に、仮想オブジェクトのオブジェクト画像を重畳した画像である。   The display processing unit 14 performs control to display the superimposed image on the display unit 20. The superimposed image is an image obtained by superimposing an object image of a virtual object on a captured image obtained by capturing a real space.

仮想オブジェクトは、実空間には含まれない仮想のオブジェクトである。仮想オブジェクトは、例えば、表示処理部14で扱う事の可能な画像データである。仮想オブジェクトの画像データは、例えば、外部装置や表示処理部14などで別途作成された画像や印刷物の画像データや、実空間画像の撮影とは異なるタイミングで撮影された撮影画像の画像データなどであるが、これらに限定されない。   The virtual object is a virtual object that is not included in the real space. The virtual object is, for example, image data that can be handled by the display processing unit 14. The image data of the virtual object is, for example, an image created separately by an external device or the display processing unit 14, image data of a printed matter, image data of a photographed image photographed at a timing different from the photographing of the real space image, or the like. Although there is, it is not limited to these.

オブジェクト画像は、仮想三次元空間に配置された仮想オブジェクトを、二次元空間に射影した画像である。言い換えると、オブジェクト画像は、仮想三次元空間に配置された仮想オブジェクトを、予め定めた視点位置から視認した二次元画像に変換した画像である。   An object image is an image obtained by projecting a virtual object placed in a virtual three-dimensional space into a two-dimensional space. In other words, the object image is an image obtained by converting a virtual object placed in the virtual three-dimensional space into a two-dimensional image viewed from a predetermined viewpoint position.

表示処理部14は、例えば、グラフィックス処理のためのプログラミングインターフェースを用いた3Dグラフィックエンジンを用いて、仮想オブジェクトを二次元画像に変換する。例えば、表示処理部14は、OpenGL(Open Graphics Library)などの3Dエンジンにより、表示処理を実現する。   The display processing unit 14 converts a virtual object into a two-dimensional image using, for example, a 3D graphic engine using a programming interface for graphics processing. For example, the display processing unit 14 realizes display processing by a 3D engine such as OpenGL (Open Graphics Library).

具体的には、表示処理部14は、変換関数を用いて、仮想三次元空間における三次元座標によって示される仮想オブジェクトを、二次元空間における二次元座標によって示されるオブジェクト画像に射影する。変換関数は、オブジェクト画像を取得するための関数、すなわち、仮想オブジェクトを表示面に射影するための関数である。変換関数は、一般に、行列で表される。   Specifically, the display processing unit 14 projects the virtual object indicated by the three-dimensional coordinates in the virtual three-dimensional space onto the object image indicated by the two-dimensional coordinates in the two-dimensional space using the conversion function. The conversion function is a function for acquiring an object image, that is, a function for projecting a virtual object onto the display surface. The conversion function is generally represented by a matrix.

図3は、表示処理部14による表示処理の概要を示す図である。表示処理部14は、撮影部12で撮影した撮影画像53に、オブジェクト画像30を重畳した重畳画像54を表示する。   FIG. 3 is a diagram showing an outline of display processing by the display processing unit 14. The display processing unit 14 displays a superimposed image 54 in which the object image 30 is superimposed on the captured image 53 captured by the capturing unit 12.

本実施の形態の画像処理装置10では、オブジェクト画像30の形状を、画像処理装置10の姿勢の変化に応じて、あたかも現実の空間に配置されている物体を撮影しているように変化させる。例えば、図3に示すように、画像処理装置10は、実空間には存在しない印刷物が壁31に貼り付けているかのように、画像処理装置10の姿勢の変化に応じてオブジェクト画像30の形状を変化させる。   In the image processing apparatus 10 of the present embodiment, the shape of the object image 30 is changed as if an object placed in an actual space is photographed in accordance with a change in the attitude of the image processing apparatus 10. For example, as illustrated in FIG. 3, the image processing apparatus 10 has a shape of the object image 30 in accordance with a change in the posture of the image processing apparatus 10 as if a printed material that does not exist in the real space is pasted on the wall 31. To change.

また、本実施の形態の画像処理装置10では、ユーザによって指定された、実際には存在しない仮想立体物の三次元形状に応じて、オブジェクト画像30が該仮想立体物に貼り付けられているかのような表示を行う。画像処理装置10の表示処理部14では、仮想立体物の表面に、オブジェクト画像30に対応する仮想オブジェクト42を貼り付けた状態を、二次元空間に投影することで、オブジェクト画像30を表示する(詳細後述)。   In the image processing apparatus 10 according to the present embodiment, whether the object image 30 is pasted on the virtual three-dimensional object according to the three-dimensional shape of the virtual three-dimensional object that is specified by the user and does not actually exist. Display like this. The display processing unit 14 of the image processing apparatus 10 displays the object image 30 by projecting the state in which the virtual object 42 corresponding to the object image 30 is pasted on the surface of the virtual three-dimensional object onto the two-dimensional space ( Details will be described later).

表示処理部14について詳細を説明する。   Details of the display processing unit 14 will be described.

図4は、画像処理装置10の機能構成を示すブロック図である。上述したように画像処理装置10は、検知部25、撮影部12、記憶部16、UI部19、および表示処理部14を備える。検知部25、撮影部12、記憶部16、およびUI部19は、表示処理部14に信号やデータ授受可能に接続されている。   FIG. 4 is a block diagram illustrating a functional configuration of the image processing apparatus 10. As described above, the image processing apparatus 10 includes the detection unit 25, the imaging unit 12, the storage unit 16, the UI unit 19, and the display processing unit 14. The detection unit 25, the imaging unit 12, the storage unit 16, and the UI unit 19 are connected to the display processing unit 14 so as to be able to exchange signals and data.

表示処理部14は、姿勢検出部14Aと、撮影画像取得部14Bと、設定部14Cと、取得部14Dと、形状算出部14Eと、射影部14Fと、合成部14Gと、受付部14Iと、移動部14Lと、姿勢補正部14Nと、光源設定部14Oと、表示制御部14Hと、を備える。   The display processing unit 14 includes a posture detection unit 14A, a captured image acquisition unit 14B, a setting unit 14C, an acquisition unit 14D, a shape calculation unit 14E, a projection unit 14F, a synthesis unit 14G, a reception unit 14I, A moving unit 14L, an attitude correcting unit 14N, a light source setting unit 14O, and a display control unit 14H are provided.

姿勢検出部14A、撮影画像取得部14B、設定部14C、取得部14D、形状算出部14E、射影部14F、合成部14G、受付部14I、移動部14L、姿勢補正部14N、姿勢補正部14N、光源設定部14O、および表示制御部14Hの一部またはすべては、例えば、CPUなどの処理装置にプログラムを実行させること、すなわち、ソフトウェアにより実現してもよいし、IC(Integrated Circuit)などのハードウェアにより実現してもよいし、ソフトウェアおよびハードウェアを併用して実現してもよい。   Posture detection unit 14A, captured image acquisition unit 14B, setting unit 14C, acquisition unit 14D, shape calculation unit 14E, projection unit 14F, composition unit 14G, reception unit 14I, movement unit 14L, posture correction unit 14N, posture correction unit 14N, A part or all of the light source setting unit 14O and the display control unit 14H may be realized by causing a processing device such as a CPU to execute a program, that is, by software, or a hardware such as an IC (Integrated Circuit). It may be realized by hardware, or may be realized by using software and hardware together.

姿勢検出部14Aは、撮影部12の初期姿勢からの姿勢変化を表す姿勢情報を検出する。詳細には、姿勢情報は、撮影部12の初期姿勢の撮影方向(光軸の方向)からの向きの変化を検出する。   The posture detection unit 14 </ b> A detects posture information representing a posture change from the initial posture of the photographing unit 12. Specifically, the posture information detects a change in direction of the initial posture of the photographing unit 12 from the photographing direction (the direction of the optical axis).

具体的には、姿勢検出部14Aは、検知部25による初期姿勢時の検知結果と、検知部25による現在の検知結果と、を用いて、姿勢情報を検出する。姿勢情報は、例えば、初期姿勢からの回転角の変化量(ロール角の変化量α、ピッチ角の変化量βおよびヨー角の変化量γ)で表される。   Specifically, the posture detection unit 14A detects posture information using the detection result at the initial posture by the detection unit 25 and the current detection result by the detection unit 25. The posture information is represented by, for example, a change amount of the rotation angle from the initial posture (a change amount α of the roll angle, a change amount β of the pitch angle, and a change amount γ of the yaw angle).

設定部14Cは、初期姿勢を設定する。設定部14Cは、撮影開始に先立ち、初期姿勢を設定する。ユーザは、所望のタイミングでUI部19を操作することにより、初期姿勢の設定指示を入力する。設定部14Cは、ユーザにより初期姿勢の設定指示が入力されたときの、撮影部12(UI部19、画像処理装置10)の姿勢を、初期姿勢として設定する。   The setting unit 14C sets an initial posture. The setting unit 14C sets an initial posture prior to the start of shooting. The user inputs an initial posture setting instruction by operating the UI unit 19 at a desired timing. The setting unit 14C sets the posture of the photographing unit 12 (the UI unit 19 and the image processing device 10) when the user inputs an initial posture setting instruction as the initial posture.

このため、画像処理装置10では、初期姿勢におけるオブジェクト画像30の形状を基準とし、初期姿勢からの姿勢変化量に基づきオブジェクト画像30の形状を変化させることができる。   Therefore, the image processing apparatus 10 can change the shape of the object image 30 based on the posture change amount from the initial posture with the shape of the object image 30 in the initial posture as a reference.

撮影画像取得部14Bは、撮影部12から撮影画像を取得する。   The captured image acquisition unit 14 </ b> B acquires a captured image from the imaging unit 12.

取得部14Dは、曲げ形状情報を取得する。曲げ形状情報は、仮想三次元空間に配置する仮想オブジェクト42の曲げ形状を、表示部20(UI部19)の表示面を表す二次元デバイス座標で表した情報である。   The acquisition unit 14D acquires bending shape information. The bending shape information is information in which the bending shape of the virtual object 42 arranged in the virtual three-dimensional space is represented by two-dimensional device coordinates representing the display surface of the display unit 20 (UI unit 19).

表示部20の表示面を表す二次元デバイス座標とは、二次元の板状である表示部20の表示面上の、二次元座標である。すなわち、ユーザがUI部19の表示面上を操作指示することで、操作指示されたUI部19の表示面上の位置に応じた二次元座標が、操作指示として入力される。   The two-dimensional device coordinates representing the display surface of the display unit 20 are two-dimensional coordinates on the display surface of the display unit 20 having a two-dimensional plate shape. That is, when the user gives an operation instruction on the display surface of the UI unit 19, two-dimensional coordinates corresponding to the position on the display surface of the UI unit 19 instructed for operation are input as an operation instruction.

曲げ形状情報は、ユーザによるUI部19の操作によって入力される。ユーザは、UI部19の表示面を操作することで、表示面上の二次元座標によって示される、仮想オブジェクト42の曲げ形状を操作入力する。取得部14Dは、ユーザによる各種操作指示をUI部19から受け付ける受付部14Iを介して、UI部19から曲げ形状情報を取得する。   The bending shape information is input by the user operating the UI unit 19. The user operates and inputs the bending shape of the virtual object 42 indicated by the two-dimensional coordinates on the display surface by operating the display surface of the UI unit 19. The acquisition unit 14 </ b> D acquires bending shape information from the UI unit 19 via the reception unit 14 </ b> I that receives various operation instructions from the user from the UI unit 19.

形状算出部14Eは、曲げ形状情報に応じて、仮想オブジェクト42の貼り付け対象を示す仮想立体物の三次元形状を算出する。   The shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object indicating the pasting target of the virtual object 42 according to the bending shape information.

射影部14Fは、形状算出部14Eで算出された三次元形状の仮想立体物の表面に、仮想オブジェクト42を貼り付ける。そして、射影部14Fは、仮想立体物の表面に貼り付けた仮想オブジェクト42を、二次元空間に射影したオブジェクト画像を生成する。   The projecting unit 14F pastes the virtual object 42 on the surface of the three-dimensional virtual solid object calculated by the shape calculating unit 14E. Then, the projection unit 14F generates an object image obtained by projecting the virtual object 42 pasted on the surface of the virtual three-dimensional object into the two-dimensional space.

合成部14Gは、重畳画像を生成する。図5は、重畳画像生成の説明図である。合成部14Gは、撮影画像53上に、射影部14Fで生成されたオブジェクト画像30を合成する。これによって、合成部14Gは、撮影画像53にオブジェクト画像30を重畳した重畳画像54を生成する。   The synthesizing unit 14G generates a superimposed image. FIG. 5 is an explanatory diagram of superimposed image generation. The combining unit 14G combines the object image 30 generated by the projecting unit 14F on the captured image 53. Thereby, the synthesizing unit 14G generates a superimposed image 54 in which the object image 30 is superimposed on the captured image 53.

図4に戻り、受付部14Iは、ユーザによるUI部19の各種操作を受け付ける。受付部14Iは、第1受付部14Jおよび第2受付部14Kを含む。第1受付部14Jおよび第2受付部14Kの詳細は後述する。   Returning to FIG. 4, the receiving unit 14 </ b> I receives various operations of the UI unit 19 by the user. The reception unit 14I includes a first reception unit 14J and a second reception unit 14K. Details of the first reception unit 14J and the second reception unit 14K will be described later.

表示制御部14Hは、各種画像をUI部19へ表示する制御を行う。本実施の形態では、表示制御部14Hは、合成部14Gで合成された重畳画像54を、UI部19(表示部20)へ表示する制御を行う。   The display control unit 14 </ b> H performs control to display various images on the UI unit 19. In the present embodiment, the display control unit 14H performs control to display the superimposed image 54 synthesized by the synthesis unit 14G on the UI unit 19 (display unit 20).

図6は、形状算出部14Eによる、仮想立体物の三次元形状算出の説明図である。なお、図6は、貼り付け対象の仮想立体物40の形状が、曲面を有する(具体的には、例えば、円柱状)である場合を説明する。なお、仮想立体物40が円柱状などの曲面を有する場合を、仮想立体物40Aとして説明する。また、仮想立体物40Aに貼り付ける仮想オブジェクト42を、仮想オブジェクト42A、仮想オブジェクト42Aに対応するオブジェクト画像30をオブジェクト画像30Aとして説明する。   FIG. 6 is an explanatory diagram of the calculation of the three-dimensional shape of the virtual three-dimensional object by the shape calculation unit 14E. FIG. 6 illustrates a case where the shape of the virtual solid object 40 to be pasted has a curved surface (specifically, for example, a cylindrical shape). A case where the virtual solid object 40 has a curved surface such as a columnar shape will be described as a virtual solid object 40A. The virtual object 42 to be pasted on the virtual three-dimensional object 40A will be described as a virtual object 42A, and the object image 30 corresponding to the virtual object 42A will be described as an object image 30A.

なお、仮想立体物(仮想立体物40A、後述する仮想立体物40Bなど)を総称して説明する場合、単に仮想立体物40と称して説明する。同様に、オブジェクト画像、仮想オブジェクトの各々を総称して説明する場合についても、オブジェクト画像30、仮想オブジェクト42と称して説明する。   In addition, when generically describing a virtual three-dimensional object (a virtual three-dimensional object 40A, a virtual three-dimensional object 40B, which will be described later), it will be simply referred to as a virtual three-dimensional object 40. Similarly, the case where the object image and the virtual object are collectively described will be referred to as the object image 30 and the virtual object 42.

例えば、表示制御部14Hは、貼り付け対象の仮想オブジェクト42Aのオブジェクト画像30AをUI部19に表示する。貼り付け対象の仮想オブジェクト42Aは、例えば、ユーザによるUI部19の操作指示によって選択すればよい。具体的には、記憶部16に、予め、仮想オブジェクト42として用いる1または複数の画像データを記憶する。そして、表示制御部14Hは、これらの画像データの画像を選択可能にUI部19へ表示する。ユーザは、UI部19に表示された画像の一覧から1つを選択することで、貼り付け対象の仮想オブジェクト42Aを選択する。   For example, the display control unit 14H displays the object image 30A of the virtual object 42A to be pasted on the UI unit 19. For example, the virtual object 42A to be pasted may be selected by an operation instruction of the UI unit 19 by the user. Specifically, one or a plurality of image data used as the virtual object 42 is stored in the storage unit 16 in advance. Then, the display control unit 14H displays these image data images on the UI unit 19 so as to be selectable. The user selects the virtual object 42A to be pasted by selecting one from the list of images displayed on the UI unit 19.

射影部14Fは、選択された仮想オブジェクト42Aを二次元空間に射影することによって、オブジェクト画像30Aを生成する。表示制御部14Hは、選択された仮想オブジェクト42Aのオブジェクト画像30AをUI部19に表示する。オブジェクト画像30(30A)は、射影部14Fによって仮想オブジェクト42(42A)を射影することで得られたものである。   The projection unit 14F generates the object image 30A by projecting the selected virtual object 42A to the two-dimensional space. The display control unit 14H displays the object image 30A of the selected virtual object 42A on the UI unit 19. The object image 30 (30A) is obtained by projecting the virtual object 42 (42A) by the projection unit 14F.

図6(A)は、選択された仮想オブジェクト42Aのオブジェクト画像30AがUI部19に表示された状態の一例を示す図である。図6に示す例では、オブジェクト画像30Aが矩形状である場合を一例として説明する。   FIG. 6A is a diagram illustrating an example of a state in which the object image 30A of the selected virtual object 42A is displayed on the UI unit 19. In the example illustrated in FIG. 6, a case where the object image 30A has a rectangular shape will be described as an example.

ユーザは、UI部19に表示されたオブジェクト画像30Aを用いて、該オブジェクト画像30に対応する仮想オブジェクト42Aの曲げ形状を操作入力する。図6に示す例では、ユーザは、UI部19の表示面上を操作することで、UI部19に表示されたオブジェクト画像30Aの4頂点の内の2頂点の位置を調整する。例えば、図6(B)に示すように、オブジェクト画像30Aの4頂点(30、30、30、30)の内、頂点30を3010の位置に移動させ、頂点30を頂点3020の位置に移動させることがユーザによって操作指示されたとする。例えば、ユーザは、オブジェクト画像30Aの4頂点をピンチイン/ピンチアウト操作などにより調整することで、各頂点の位置を移動させる。 The user uses the object image 30 </ b> A displayed on the UI unit 19 to input the bending shape of the virtual object 42 </ b> A corresponding to the object image 30. In the example illustrated in FIG. 6, the user adjusts the position of two vertices among the four vertices of the object image 30 </ b> A displayed on the UI unit 19 by operating the display surface of the UI unit 19. For example, as shown in FIG. 6B, among the four vertices (30 1 , 30 2 , 30 3 , 30 4 ) of the object image 30A, the vertex 30 1 is moved to the position of 30 10 , and the vertex 30 2 is moved. and moving the position of the vertex 30 20 is an operation instruction by a user. For example, the user moves the positions of the vertices by adjusting the four vertices of the object image 30A by a pinch-in / pinch-out operation or the like.

すると、取得部14Bは、移動後の2つの頂点3010および頂点3020の、表示面における二次元デバイス座標を含む、曲げ形状情報を取得する。 Then, the acquisition unit 14B acquires bending shape information including the two-dimensional device coordinates on the display surface of the two vertices 30 10 and 30 20 after the movement.

形状算出部14Eは、曲げ形状情報に応じた三次元曲線に沿った曲面を有する、仮想立体物の三次元形状を算出する。詳細には、形状算出部14Eは、三次元曲線の曲率の初期値を予め設定する(以下、初期曲率と称する)。そして、形状算出部14Eは、曲げ形状情報、すなわち、ピンチ操作の操作量に応じて、初期曲率を変化させることで、操作量に応じた三次元曲率を算出する。ピンチ操作の操作量は、例えば、移動前の2頂点に対する移動後の2頂点の操作量に相当する。   The shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object having a curved surface along the three-dimensional curve corresponding to the bending shape information. Specifically, the shape calculation unit 14E presets an initial value of the curvature of the three-dimensional curve (hereinafter referred to as initial curvature). And the shape calculation part 14E calculates the three-dimensional curvature according to the operation amount by changing the initial curvature according to the bending shape information, that is, the operation amount of the pinch operation. The operation amount of the pinch operation corresponds to, for example, the operation amount of the two vertices after the movement with respect to the two vertices before the movement.

例えば、図6(B)に示すように、ユーザによるピンチ操作後の2次元曲率が、二次曲線Q1によって示される曲率であったとする。この場合、形状算出部14Eは、ピンチ操作の操作量に応じて、初期曲率を変化させることで、曲げ形状情報に応じた三次元曲線Q2(図6(C)参照)に沿った曲面を有する、仮想立体物40Aの三次元形状を算出する。すなわち、仮想立体物40Aの表面の曲率は、ユーザによる操作量に応じた曲率を示す。   For example, as shown in FIG. 6B, it is assumed that the two-dimensional curvature after the pinch operation by the user is the curvature indicated by the quadratic curve Q1. In this case, the shape calculation unit 14E has a curved surface along the three-dimensional curve Q2 (see FIG. 6C) corresponding to the bending shape information by changing the initial curvature according to the operation amount of the pinch operation. Then, the three-dimensional shape of the virtual three-dimensional object 40A is calculated. That is, the curvature of the surface of the virtual three-dimensional object 40A indicates a curvature corresponding to the operation amount by the user.

このように、ユーザによるUI部19の操作指示によって、UI部19(表示部20)の二次元デバイス座標によって表される曲げ形状情報が操作入力される。すなわち、ユーザは、任意の曲げ形状を、UI部19の二次元デバイス座標を用いて操作入力することができる。そして、形状算出部14Eは、操作入力された曲げ形状情報を用いて、仮想立体物40の三次元形状を算出する。図6に示す例では、形状算出部14Eは、図6(C)に示す、三次元曲線Q2に沿った曲面を有する、仮想立体物40Aの三次元形状を算出する。   As described above, the bending shape information represented by the two-dimensional device coordinates of the UI unit 19 (display unit 20) is operated and input according to the operation instruction of the UI unit 19 by the user. That is, the user can input an arbitrary bending shape using the two-dimensional device coordinates of the UI unit 19. And the shape calculation part 14E calculates the three-dimensional shape of the virtual solid object 40 using the bending shape information input by operation. In the example illustrated in FIG. 6, the shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40A having a curved surface along the three-dimensional curve Q2 illustrated in FIG.

図7は、仮想立体物の形状算出の詳細な説明図である。ユーザによって曲げ形状が操作入力されていない状態では、仮想オブジェクト42Aは、仮想三次元空間におけるXY平面に沿って平面状に配置される(図7(A)参照)。形状算出部14Eは、仮想オブジェクト42Aを、複数の短冊状の領域に分割して処理する。すなわち、形状算出部14Eは、仮想オブジェクト42Aを構成する各短冊状の領域の各々を用いて、操作入力された曲げ形状を表現する(図7(B)、図7(C)参照)。   FIG. 7 is a detailed explanatory diagram of the calculation of the shape of the virtual three-dimensional object. In a state where the bending shape is not operated and input by the user, the virtual object 42A is arranged in a planar shape along the XY plane in the virtual three-dimensional space (see FIG. 7A). The shape calculation unit 14E processes the virtual object 42A by dividing it into a plurality of strip-shaped regions. That is, the shape calculation unit 14E expresses the bending shape input by the operation using each of the strip-like regions constituting the virtual object 42A (see FIGS. 7B and 7C).

ユーザによるUI部19の操作指示により、UI部19の表示面上で仮想オブジェクト42Aに対応するオブジェクト画像30Aの頂点の位置が調整されることで、曲げ形状の曲率が設定される。例えば、形状算出部14Eは、ユーザの指によるピンチ操作などによって設定された曲率の二次元曲線から、三次元曲線を算出する。そして、形状算出部14Eは、算出した三次元曲線に沿った曲面を有する、例えば、円柱状の仮想立体物40Aを算出する(図7(B)参照)。 The curvature of the bent shape is set by adjusting the position of the vertex of the object image 30 </ b> A corresponding to the virtual object 42 </ b> A on the display surface of the UI unit 19 according to an operation instruction of the UI unit 19 by the user. For example, the shape calculation unit 14E calculates a 3D curve from a 2D curve of curvature set by a pinch operation with a user's finger. The shape calculating unit 14E has a curved surface along the calculated three-dimensional curve, for example, calculates the cylindrical virtual three-dimensional object 40A 2 (see FIG. 7 (B)).

また、ユーザの指によるピンチ操作などによって曲率が変更されると、形状算出部14Eは変更後の曲率の二次元曲線から算出した三次元曲線に沿った曲面を有する、円柱状の仮想立体物40Aを算出する(図7(C)参照)。 When the curvature is changed by a pinch operation with a user's finger or the like, the shape calculation unit 14E has a curved virtual three-dimensional object 40A having a curved surface along a three-dimensional curve calculated from the two-dimensional curve of the changed curvature. 3 is calculated (see FIG. 7C).

このため、ユーザは、UI部19の表示面上のピンチイン/ピンチアウトなどの簡易な操作によって、仮想オブジェクト42の貼り付け対象の仮想立体物40の、三次元形状を容易に操作入力することができる。例えば、ユーザは、UI部19の表示面上のピンチイン操作で曲率を大きくし、ピンチアウト操作で曲率を小さくするように、操作入力することができる。   For this reason, the user can easily input the three-dimensional shape of the virtual three-dimensional object 40 to which the virtual object 42 is pasted by a simple operation such as pinch-in / pinch-out on the display surface of the UI unit 19. it can. For example, the user can perform an operation input so that the curvature is increased by a pinch-in operation on the display surface of the UI unit 19 and the curvature is decreased by a pinch-out operation.

そして、形状算出部14Eは、ユーザによるUI部19の操作指示によって操作入力された、UI部19の表示面の二次元座標で表される曲げ形状情報に応じて、仮想立体物40の三次元形状を容易に算出することができる。   Then, the shape calculation unit 14E performs the three-dimensional operation of the virtual three-dimensional object 40 according to the bending shape information represented by the two-dimensional coordinates on the display surface of the UI unit 19 that is input by the user's operation instruction on the UI unit 19. The shape can be easily calculated.

また、曲げ形状情報は、仮想オブジェクト42の曲げ方向を更に含んでいてもよい。   The bending shape information may further include the bending direction of the virtual object 42.

図8は、曲げ方向の説明図である。例えば、ユーザは、UI部19の表示面上で、仮想オブジェクト42に対応する表示されたオブジェクト画像30の頂点の位置を調整することで、曲げ方向を操作入力する。   FIG. 8 is an explanatory diagram of the bending direction. For example, the user operates and inputs the bending direction by adjusting the position of the vertex of the displayed object image 30 corresponding to the virtual object 42 on the display surface of the UI unit 19.

すなわち、ユーザによるUI部19の操作指示により、UI部19の表示面上で仮想オブジェクト42Aに対応するオブジェクト画像30Aの頂点の位置が調整されることで、曲げ形状の曲率、および曲げ方向が設定される。例えば、ユーザは、オブジェクト画像30の4頂点の何れかの位置を調整することで、曲げ方向を操作入力する。   That is, the curvature of the bending shape and the bending direction are set by adjusting the position of the vertex of the object image 30A corresponding to the virtual object 42A on the display surface of the UI unit 19 according to an operation instruction of the UI unit 19 by the user. Is done. For example, the user operates and inputs the bending direction by adjusting the position of any of the four vertices of the object image 30.

曲げ方向には、例えば、4通りの方向がある。例えば、図8(A)に示すように、平面状の仮想オブジェクト42をX軸方向が長辺となるように仮想三次元空間に配置し、三次元座標のZ軸方向に凸状に湾曲させる、曲げ方向がある。また、図8(B)に示すように、平面状の仮想オブジェクト42をY軸方向が長辺となるように仮想三次元空間に配置し、三次元座標のZ軸方向に凸状に湾曲させる、曲げ方向がある。また、図8(C)に示すように、平面状の仮想オブジェクト42をX軸方向が長辺となるように仮想三次元空間に配置し、三次元座標の−Z軸方向に凸状に湾曲させる、曲げ方向がある。また、図8(D)に示すように、平面状の仮想オブジェクト42をY軸方向が長辺となるように仮想三次元空間に配置し、三次元座標の−Z軸方向に凸状に湾曲させる、曲げ方向がある。   For example, there are four bending directions. For example, as shown in FIG. 8A, a planar virtual object 42 is arranged in a virtual three-dimensional space so that the X-axis direction becomes a long side, and is curved in a convex shape in the Z-axis direction of three-dimensional coordinates. There is a bending direction. Further, as shown in FIG. 8B, the planar virtual object 42 is arranged in the virtual three-dimensional space so that the Y-axis direction becomes the long side, and is curved convexly in the Z-axis direction of the three-dimensional coordinates. There is a bending direction. Further, as shown in FIG. 8C, a planar virtual object 42 is arranged in a virtual three-dimensional space so that the X-axis direction becomes a long side, and is curved convexly in the −Z-axis direction of the three-dimensional coordinates. There is a bending direction. Also, as shown in FIG. 8D, a planar virtual object 42 is arranged in a virtual three-dimensional space so that the Y-axis direction is the long side, and is curved in a convex shape in the −Z-axis direction of the three-dimensional coordinates. There is a bending direction.

曲げ形状情報が曲げ方向を含む場合、形状算出部14Eは、該曲げ形状情報に含まれる曲げ方向に曲がった曲面を有する仮想立体物40の三次元形状を算出すればよい。   When the bending shape information includes the bending direction, the shape calculation unit 14E may calculate the three-dimensional shape of the virtual three-dimensional object 40 having a curved surface bent in the bending direction included in the bending shape information.

そして、射影部14Fは、形状算出部14Eで算出された仮想立体物40の表面に仮想オブジェクト42を貼り付ける。このため、図6(C)に示すように、仮想オブジェクト42(例えば、仮想オブジェクト42A)は、形状算出部14Eで算出された三次元形状の仮想立体物40(例えば、仮想立体物40A)の表面に貼り付けられた状態となる。   Then, the projection unit 14F pastes the virtual object 42 on the surface of the virtual three-dimensional object 40 calculated by the shape calculation unit 14E. For this reason, as shown in FIG. 6C, the virtual object 42 (for example, the virtual object 42A) is a virtual three-dimensional object 40 (for example, the virtual three-dimensional object 40A) calculated by the shape calculating unit 14E. It will be in the state stuck on the surface.

そして、射影部14Fは、この仮想立体物40の表面に貼り付けられた仮想オブジェクト42を、二次元空間に射影したオブジェクト画像30を生成する。図9は、オブジェクト画像30の説明図である。図9では、仮想オブジェクト42Aを仮想立体物40Aに貼り付けた状態を示すオブジェクト画像30Aを、一例として示した。   Then, the projecting unit 14F generates an object image 30 in which the virtual object 42 pasted on the surface of the virtual three-dimensional object 40 is projected into a two-dimensional space. FIG. 9 is an explanatory diagram of the object image 30. In FIG. 9, an object image 30A showing a state in which the virtual object 42A is pasted on the virtual three-dimensional object 40A is shown as an example.

図9(A)に示すように、オブジェクト画像30Aは、仮想三次元空間において仮想オブジェクト42Aを仮想立体物40Aの表面に貼り付けた状態を示す、二次元画像である。すなわち、オブジェクト画像30Aは、オブジェクト画像30Aを仮想三次元空間に配置した仮想オブジェクト42Aを、仮想の仮想立体物40Aの表面に貼り付けたかのような形状で示した、二次元画像である。   As shown in FIG. 9A, the object image 30A is a two-dimensional image showing a state in which the virtual object 42A is pasted on the surface of the virtual three-dimensional object 40A in the virtual three-dimensional space. That is, the object image 30A is a two-dimensional image in which the virtual object 42A in which the object image 30A is arranged in the virtual three-dimensional space is shown in a shape as if pasted on the surface of the virtual virtual three-dimensional object 40A.

このため、UI部19(表示部20)には、実際には、仮想立体物40(仮想立体物40A)は表示されず、オブジェクト画像30Aが、表示されない仮想立体物40の表面に貼り付けられているかのような形状で表示されることとなる。   Therefore, the virtual three-dimensional object 40 (virtual three-dimensional object 40A) is not actually displayed on the UI unit 19 (display unit 20), and the object image 30A is pasted on the surface of the virtual three-dimensional object 40 that is not displayed. It will be displayed as if it were.

そして、合成部14Gは、撮影画像53上にオブジェクト画像30Aを合成した重畳画像54を生成する。表示制御部14Hは、重畳画像54を、UI部19へ表示することとなる。   Then, the combining unit 14G generates a superimposed image 54 obtained by combining the object image 30A on the captured image 53. The display control unit 14 </ b> H displays the superimposed image 54 on the UI unit 19.

ここで、更に、本実施の形態の表示処理部14では、ユーザによるUI部19の操作指示により、オブジェクト画像30を仮想オブジェクト42上で移動させた状態を表示することが可能である。   Here, the display processing unit 14 of the present embodiment can further display a state in which the object image 30 is moved on the virtual object 42 in accordance with an operation instruction of the UI unit 19 by the user.

図4に戻り、具体的には、第1受付部14Jは、オブジェクト画像30の仮想立体物40上での移動量および移動方向を、二次元座標で示す第1移動指示を受付ける。この二次元座標は、UI部19(表示部20)の表示面上の二次元座標である。   Returning to FIG. 4, specifically, the first reception unit 14 </ b> J receives a first movement instruction indicating the movement amount and movement direction of the object image 30 on the virtual three-dimensional object 40 in two-dimensional coordinates. The two-dimensional coordinates are two-dimensional coordinates on the display surface of the UI unit 19 (display unit 20).

例えば、ユーザは、UI部19に表示されたオブジェクト画像30をスライド操作する。UI部19は、オブジェクト画像30のスライド操作を受け付ける。すると、UI部19は、スライド操作によって示されるUI部19の表示面上におけるオブジェクト画像30の移動量および移動方向を、オブジェクト画像30の仮想立体物40上での移動量および移動方向として受け付け、第1移動指示として受付部14Iへ出力する。   For example, the user performs a slide operation on the object image 30 displayed on the UI unit 19. The UI unit 19 receives a slide operation of the object image 30. Then, the UI unit 19 accepts the movement amount and movement direction of the object image 30 on the display surface of the UI unit 19 indicated by the slide operation as the movement amount and movement direction of the object image 30 on the virtual three-dimensional object 40, It outputs to the reception part 14I as a 1st movement instruction | indication.

受付部14Iの第1受付部14Jは、UI部19から、第1移動指示を受付ける。   The first receiving unit 14J of the receiving unit 14I receives a first movement instruction from the UI unit 19.

移動部14Lは、UI部19に表示されているオブジェクト画像30に対応する仮想オブジェクト42を、受付けた第1移動指示に応じた移動量分、該第1移動指示に応じた移動方向へ、仮想立体物40上で移動させる。   The moving unit 14L virtually moves the virtual object 42 corresponding to the object image 30 displayed on the UI unit 19 in the moving direction corresponding to the first moving instruction by the moving amount corresponding to the received first moving instruction. Move on the three-dimensional object 40.

詳細には、移動部14Lは、第1移動指示に含まれる、二次元座標によって示される移動量および移動方向から、上述した逆変換関数を用いて、仮想三次元空間における三次元座標によって示される移動量および移動方向を算出する。そして、移動部14Lは、UI部19に表示されているオブジェクト画像30に対応する仮想オブジェクト42を、該仮想オブジェクト42の貼り付けられた仮想立体物40上で、算出した三次元座標によって示される移動量および移動方向に移動させる。   Specifically, the moving unit 14L is indicated by the three-dimensional coordinates in the virtual three-dimensional space using the inverse transformation function described above from the movement amount and the movement direction indicated by the two-dimensional coordinates included in the first movement instruction. The movement amount and the movement direction are calculated. Then, the moving unit 14L indicates the virtual object 42 corresponding to the object image 30 displayed on the UI unit 19 on the virtual three-dimensional object 40 to which the virtual object 42 is pasted by the calculated three-dimensional coordinates. Move in the amount and direction of movement.

図9を用いて具体的に説明する。例えば、オブジェクト画像30Bの下方向への移動がユーザによるUI部19の操作指示によって操作入力されたとする。この場合、第1受付部14Jは、UI部19から、該下方向への移動を示す第1移動指示を受付ける。   This will be specifically described with reference to FIG. For example, it is assumed that a downward movement of the object image 30B is input by an operation instruction from the UI unit 19 by the user. In this case, the first reception unit 14 </ b> J receives a first movement instruction indicating the downward movement from the UI unit 19.

すると、移動部14Lは、UI部19に表示されているオブジェクト画像30Aに対応する仮想オブジェクト42Aを、受付けた第1移動指示に応じた移動量分、該第1移動指示に応じた移動方向へ、仮想立体物40A上で移動させる。このため、例えば、表示部20には、ユーザによる操作指示に応じた移動方向(下方向)および移動量、仮想立体物40A上を下方向に移動させたオブジェクト画像30Aが表示されることとなる(図9(B)参照)。   Then, the moving unit 14L moves the virtual object 42A corresponding to the object image 30A displayed on the UI unit 19 by the amount of movement corresponding to the received first movement instruction in the movement direction corresponding to the first movement instruction. And move on the virtual three-dimensional object 40A. For this reason, for example, the display unit 20 displays the moving image (downward) and moving amount according to the operation instruction from the user, and the object image 30A moved downward on the virtual three-dimensional object 40A. (See FIG. 9B).

ここで、第1受付部14Jが、仮想立体物40の曲率方向に沿った移動方向を含む第1移動指示を受付けたとする。ここで、仮想立体物40が円柱状であると仮定する。この場合、移動部14Lは、円柱状の仮想立体物40の円中心(円状の断面の中心)を回転中心として、仮想オブジェクト42Aを、操作指示された移動方向に応じた回転方向に回転させる(図9(C)参照)。   Here, it is assumed that the first reception unit 14J receives a first movement instruction including a movement direction along the curvature direction of the virtual three-dimensional object 40. Here, it is assumed that the virtual three-dimensional object 40 is cylindrical. In this case, the moving unit 14L rotates the virtual object 42A in the rotation direction corresponding to the movement direction instructed to operate with the center of the circle (the center of the circular cross section) of the cylindrical virtual three-dimensional object 40 as the rotation center. (See FIG. 9C).

図10は、仮想オブジェクト42Aの移動の説明図である。例えば、移動部14Lは、図9(A)に示す位置に位置する仮想オブジェクト42Aを、仮想立体物40Aの円中心を回転中心として、算出した移動方向(回転方向)に回転させる(図10(B)参照)。   FIG. 10 is an explanatory diagram of the movement of the virtual object 42A. For example, the moving unit 14L rotates the virtual object 42A located at the position illustrated in FIG. 9A in the calculated movement direction (rotation direction) with the circle center of the virtual three-dimensional object 40A as the rotation center (FIG. 10 ( B)).

そして、射影部14Fは、第1受付部14Jが第1移動指示を受付けた場合、仮想立体物40上の、該第1移動指示に応じて移動部14Lによって移動された位置に貼り付けられた仮想オブジェクト42A(図10(B)参照)を、二次元空間に射影したオブジェクト画像30Aを生成すればよい(図9(C)参照)。   Then, when the first reception unit 14J receives the first movement instruction, the projection unit 14F is pasted on the virtual three-dimensional object 40 at a position moved by the movement unit 14L according to the first movement instruction. What is necessary is just to produce | generate the object image 30A which projected the virtual object 42A (refer FIG.10 (B)) to two-dimensional space (refer FIG.9 (C)).

そして、表示制御部14Hは、撮影画像53にオブジェクト画像30Aを重畳した重畳画像54を表示部20(UI部19)へ表示すればよい。   Then, the display control unit 14H may display the superimposed image 54 in which the object image 30A is superimposed on the captured image 53 on the display unit 20 (UI unit 19).

このように、オブジェクト画像30に対応する仮想オブジェクト42を、円柱状の仮想立体物40の中心を円中心として回転させることで、オブジェクト画像30に対応する仮想オブジェクト42が、仮想三次元空間上の仮想立体物40の表面に沿って移動したかのような表示を行うことができる。このため、表示処理部14は、ユーザに対して、様々な角度に配置した仮想オブジェクト42の状態を、二次元のオブジェクト画像30で確認可能に提供することができる。   In this way, by rotating the virtual object 42 corresponding to the object image 30 around the center of the cylindrical virtual solid object 40, the virtual object 42 corresponding to the object image 30 is displayed in the virtual three-dimensional space. The display as if it moved along the surface of the virtual three-dimensional object 40 can be performed. Therefore, the display processing unit 14 can provide the user with the state of the virtual object 42 arranged at various angles so that the user can confirm the state with the two-dimensional object image 30.

このとき、表示制御部14Hは、仮想オブジェクト42を射影したオブジェクト画像30における、該仮想オブジェクト42の貼り付けられた仮想立体物40の表示面側とは反対側の背面側の領域を非表示としたオブジェクト画像30を、撮影画像53に重畳した重畳画像54を表示部20へ表示することが好ましい。   At this time, the display control unit 14H does not display the region on the back side opposite to the display surface side of the virtual three-dimensional object 40 to which the virtual object 42 is pasted in the object image 30 in which the virtual object 42 is projected. The superimposed image 54 obtained by superimposing the object image 30 on the captured image 53 is preferably displayed on the display unit 20.

すなわち、図10(B)に示すように、仮想オブジェクト42Aの一部の領域が、視点位置ZA側(すなわち、表示面側)から見たときに、仮想立体物40Aの背面側に位置する場合がある。図10(B)に示す例では、仮想オブジェクト42Aにおける、領域PAは仮想立体物40Aの前面側に位置しているが、領域PBは仮想立体物40Aの背面側に位置している。   That is, as shown in FIG. 10B, when a partial region of the virtual object 42A is located on the back side of the virtual three-dimensional object 40A when viewed from the viewpoint position ZA side (that is, the display surface side). There is. In the example shown in FIG. 10B, the region PA in the virtual object 42A is located on the front side of the virtual three-dimensional object 40A, but the region PB is located on the back side of the virtual three-dimensional object 40A.

この場合、表示制御部14Hは、仮想オブジェクト42Aにおける、仮想立体物40Aの背面側の領域PBを非表示とすることが好ましい。   In this case, the display control unit 14H preferably hides the area PB on the back side of the virtual three-dimensional object 40A in the virtual object 42A.

このため、図9(C)に示すように、表示制御部14Hは、仮想オブジェクト42Aにおける、仮想立体物40Aの前面側の領域PAのみを二次元空間に射影したオブジェクト画像30Aを、表示部20に表示することとなる。   For this reason, as shown in FIG. 9C, the display control unit 14H displays an object image 30A obtained by projecting only the area PA on the front side of the virtual three-dimensional object 40A in the two-dimensional space in the virtual object 42A. Will be displayed.

このため、本実施の形態の画像処理装置10では、オブジェクト画像30Aの位置に応じて、オブジェクト画像30Aの一部が、あたかも仮想立体物40Aの背面側に隠れているかのような表示することが可能となる。また、画像処理装置10では、遠近感を考慮した、オブジェクト画像30Aの表示が可能となる。   Therefore, in the image processing apparatus 10 according to the present embodiment, a part of the object image 30A is displayed as if it is hidden behind the virtual three-dimensional object 40A according to the position of the object image 30A. It becomes possible. Further, the image processing apparatus 10 can display the object image 30A in consideration of perspective.

なお、仮想オブジェクト42の貼り付け対象の仮想立体物40の形状は、円柱状などの曲面を有する形状に限定されない。例えば、仮想立体物40の形状は、隣接する2平面を含む形状であってもよい。具体的には、仮想立体物40の形状は、四角柱などの、複数の平面を有する形状であってもよい。   Note that the shape of the virtual solid object 40 to which the virtual object 42 is pasted is not limited to a shape having a curved surface such as a cylindrical shape. For example, the shape of the virtual three-dimensional object 40 may be a shape including two adjacent planes. Specifically, the shape of the virtual three-dimensional object 40 may be a shape having a plurality of planes such as a quadrangular prism.

図11は、仮想立体物40が四角柱である場合の、三次元形状算出の説明図である。なお、仮想立体物40が四角柱である場合を、仮想立体物40Bとして説明する。また、仮想立体物40Bに貼り付ける仮想オブジェクト42を、仮想オブジェクト42Bとして説明する。   FIG. 11 is an explanatory diagram for calculating a three-dimensional shape when the virtual three-dimensional object 40 is a quadrangular prism. A case where the virtual solid object 40 is a quadrangular prism will be described as a virtual solid object 40B. The virtual object 42 to be pasted on the virtual three-dimensional object 40B will be described as the virtual object 42B.

例えば、表示制御部14Hは、貼り付け対象の仮想オブジェクト42Bのオブジェクト画像30BをUI部19に表示する。貼り付け対象の仮想オブジェクト42Bは、例えば、ユーザによるUI部19の操作指示によって選択すればよい。射影部14Fは、選択された仮想オブジェクト42Bを二次元空間に射影することによって、オブジェクト画像30Bを生成する。   For example, the display control unit 14H displays the object image 30B of the virtual object 42B to be pasted on the UI unit 19. The virtual object 42B to be pasted may be selected, for example, by an operation instruction of the UI unit 19 by the user. The projection unit 14F generates the object image 30B by projecting the selected virtual object 42B to the two-dimensional space.

表示制御部14Hは、選択された仮想オブジェクト42Bのオブジェクト画像30BをUI部19に表示する。オブジェクト画像30Bは、射影部14Fによって仮想オブジェクト42Bを射影することで得られたものである。   The display control unit 14H displays the object image 30B of the selected virtual object 42B on the UI unit 19. The object image 30B is obtained by projecting the virtual object 42B by the projecting unit 14F.

図11(A)は、選択された仮想オブジェクト42Bのオブジェクト画像30BがUI部19に表示された状態の一例を示す図である。図11に示す例では、仮想オブジェクト42Bが矩形状である場合を一例として説明する。   FIG. 11A is a diagram illustrating an example of a state in which the object image 30B of the selected virtual object 42B is displayed on the UI unit 19. In the example illustrated in FIG. 11, a case where the virtual object 42B is rectangular will be described as an example.

ユーザは、UI部19に表示されたオブジェクト画像30Bを用いて、該オブジェクト画像30Bに対応する仮想オブジェクト42Bの曲げ形状を操作入力する。図11に示す例では、ユーザは、UI部19の表示面上を操作することで、UI部19に表示されたオブジェクト画像30Bの曲げ位置を調整する。   The user uses the object image 30B displayed on the UI unit 19 to input the bending shape of the virtual object 42B corresponding to the object image 30B. In the example illustrated in FIG. 11, the user adjusts the bending position of the object image 30 </ b> B displayed on the UI unit 19 by operating the display surface of the UI unit 19.

例えば、表示制御部14Hは、仮想直線L1を表示する。ユーザは、画像処理装置10に表示されたオブジェクト画像30Bにおける、曲げ対象の領域を仮想直線L1に一致させるように、オブジェクト画像30Bの表示位置をドラッグ操作などにより移動させる。なお、表示制御部14Hは、撮影画像53を解析し、直線状の領域を公知の画像処理によって抽出してもよい。そして、表示制御部14Hは、撮影画像53をUI部19に表示し、抽出した直線状の領域を、仮想直線L1として用いてもよい。   For example, the display control unit 14H displays the virtual straight line L1. The user moves the display position of the object image 30B by a drag operation or the like so that the region to be bent in the object image 30B displayed on the image processing apparatus 10 matches the virtual straight line L1. Note that the display control unit 14H may analyze the captured image 53 and extract a linear region by known image processing. Then, the display control unit 14H may display the captured image 53 on the UI unit 19 and use the extracted linear area as the virtual straight line L1.

取得部14Dは、UI部19に表示されたオブジェクト画像30Bにおける、仮想直線L1に相当する位置を曲げ位置として示す、曲げ形状情報を取得する。   The acquisition unit 14D acquires bending shape information indicating a position corresponding to the virtual straight line L1 in the object image 30B displayed on the UI unit 19 as a bending position.

この場合、形状算出部14Eは、オブジェクト画像30Bに対応する仮想オブジェクト42Bを、曲げ形状情報に含まれる曲げ位置で折り曲げた隣接する2平面を含む、仮想立体物40Bの三次元形状を算出する。   In this case, the shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40B including two adjacent planes obtained by bending the virtual object 42B corresponding to the object image 30B at the bending position included in the bending shape information.

具体的には、図11(B)に示すように、形状算出部14Eは、オブジェクト画像30Bに対応する仮想オブジェクト42Bを、曲げ形状情報に含まれる曲げ位置で折り曲げた2平面を含む、立方体状の仮想立体物40Bを算出する。   Specifically, as illustrated in FIG. 11B, the shape calculation unit 14E includes a cubic shape including two planes obtained by bending the virtual object 42B corresponding to the object image 30B at the bending position included in the bending shape information. The virtual three-dimensional object 40B is calculated.

このように、ユーザによるUI部19の操作指示によって、UI部19(表示部20)の二次元デバイス座標を用いて、曲げ位置を含む曲げ形状情報が入力される。このため、ユーザは、任意の曲げ位置を、UI部19の二次元デバイス座標を用いて入力することができる。   As described above, according to an operation instruction of the UI unit 19 by the user, bending shape information including a bending position is input using the two-dimensional device coordinates of the UI unit 19 (display unit 20). For this reason, the user can input an arbitrary bending position using the two-dimensional device coordinates of the UI unit 19.

射影部14Fは、形状算出部14Eによって算出された形状(例えば、立方体状)の仮想物体40Bの表面における、2平面の境界に操作指示された曲げ位置が一致するように、仮想オブジェクト42Bを貼り付ける(図11(C)参照)。そして、形状算出部14Eは、この仮想立体物40Bの表面に貼り付けた仮想オブジェクト42Bを、二次元空間に射影したオブジェクト画像30Bを生成する。そして、表示制御部14Hは、撮影画像53にオブジェクト画像30Bを重畳した重畳画像54を、UI部19(表示部20)へ表示する。   The projecting unit 14F pastes the virtual object 42B so that the bending position instructed to operate is aligned with the boundary between the two planes on the surface of the virtual object 40B having the shape (for example, cubic shape) calculated by the shape calculating unit 14E. (See FIG. 11C). Then, the shape calculation unit 14E generates an object image 30B obtained by projecting the virtual object 42B pasted on the surface of the virtual three-dimensional object 40B into a two-dimensional space. Then, the display control unit 14H displays a superimposed image 54 obtained by superimposing the object image 30B on the captured image 53 on the UI unit 19 (display unit 20).

図12は、仮想立体物40の形状算出の説明図である。ユーザによって曲げ位置が操作入力されていない状態では、仮想オブジェクト42Bは、仮想三次元空間におけるXY平面に沿って平面状に配置される。形状算出部14Eは、仮想オブジェクト42Bを、曲げ形状情報によって示される曲げ位置で、y軸に沿って90°折り曲げる。ユーザによるUI部19の操作指示によって入力された折り曲げ位置を変えることで、仮想オブジェクト42Bが、仮想立体物40Bの隣接する2平面の境界で折り曲げられながら、仮想立体物40Bの表面を貼り付いた状態で該仮想立体物40B上を移動しているかのような表示を行うことが可能となる(図12(A)、図12(B)、および図12(C)参照)。   FIG. 12 is an explanatory diagram for calculating the shape of the virtual three-dimensional object 40. In a state where the bending position is not input by the user, the virtual object 42B is arranged in a plane along the XY plane in the virtual three-dimensional space. The shape calculation unit 14E bends the virtual object 42B by 90 ° along the y-axis at the bending position indicated by the bending shape information. By changing the folding position input by the user operating the UI unit 19, the virtual object 42B is attached to the surface of the virtual three-dimensional object 40B while being bent at the boundary between two adjacent planes of the virtual three-dimensional object 40B. It is possible to display as if moving on the virtual three-dimensional object 40B in a state (see FIGS. 12A, 12B, and 12C).

図11に戻り、曲げ形状情報は、曲げ角度を含んでもよい。ユーザは、UI部19の操作指示によって、曲げ位置を指定すると共に、曲げ角度を操作入力する。例えば、ユーザは、UI部19の操作指示によって曲げ位置を指定した後に、UI部19の操作指示によって、オブジェクト画像30Bの4頂点の内の2頂点の、折り曲げ後の位置を操作入力する。すると、取得部14Dは、曲げ角度を更に含む曲げ形状情報を取得する。   Returning to FIG. 11, the bending shape information may include a bending angle. The user designates a bending position and inputs a bending angle by an operation instruction from the UI unit 19. For example, after the user designates the bending position by the operation instruction of the UI unit 19, the user inputs the position after bending of the two vertices of the four vertices of the object image 30B by the operation instruction of the UI unit 19. Then, the acquisition unit 14D acquires bending shape information that further includes a bending angle.

この場合、形状算出部14Eは、隣接する2平面の成す角度が、曲げ形状情報に含まれる曲げ角度を示す、仮想立体物40Bの三次元形状を算出すればよい。   In this case, the shape calculation unit 14E may calculate the three-dimensional shape of the virtual three-dimensional object 40B in which the angle formed by the two adjacent planes indicates the bending angle included in the bending shape information.

この場合、図11(B)に示すように、形状算出部14Eは、隣接する2平面の成す角度が、曲げ形状情報に含まれる曲げ角度θを示す、仮想立体物40Bの三次元形状を算出する。   In this case, as shown in FIG. 11B, the shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40B in which the angle formed by the two adjacent planes indicates the bending angle θ included in the bending shape information. To do.

また、形状算出部14Eは、仮想オブジェクト42Bにおける、取得した曲げ形状情報に含まれる曲げ位置から曲げ方向の一方の辺までの長さを、2平面の一方の平面の長さとし、曲げ位置から他方の辺までの長さを2平面の他方の平面の長さとする、仮想立体物40Bの三次元形状を算出することが好ましい。   Further, the shape calculation unit 14E sets the length from the bending position included in the acquired bending shape information to one side in the bending direction in the virtual object 42B as the length of one of the two planes, and from the bending position to the other. It is preferable to calculate the three-dimensional shape of the virtual three-dimensional object 40B in which the length to the side is the length of the other two planes.

仮想オブジェクト42Bにおける、曲げ位置から曲げ方向の一方の辺、とは、仮想オブジェクト42Bを、操作入力された曲げ位置で折り曲げたときに、該仮想オブジェクト42Bの該折り曲げ位置に沿った直線に略平行な2辺の内の一方の辺である。そして、上記他方の辺とは、この2辺の内の他方の辺である。   One side of the virtual object 42B from the bending position to the bending direction is substantially parallel to a straight line along the bending position of the virtual object 42B when the virtual object 42B is bent at the bending position input by the operation. One of the two sides. The other side is the other side of the two sides.

このため、ユーザは、UI部19の表示面上で仮想オブジェクト42Bに対応するオブジェクト画像30Bの形状を調整することで、仮想オブジェクト42Aの貼り付け対象の仮想立体物40Bの三次元形状(幅、奥行き、2平面の成す角度)を容易に操作入力することができる。   For this reason, the user adjusts the shape of the object image 30B corresponding to the virtual object 42B on the display surface of the UI unit 19 to thereby adjust the three-dimensional shape (width, It is possible to easily input a depth (an angle formed by two planes).

また、上記と同様に、曲げ形状情報は、仮想オブジェクト42Bの曲げ方向を更に含んでいてもよい。   Similarly to the above, the bending shape information may further include the bending direction of the virtual object 42B.

そして、射影部14Fは、形状算出部14Eで算出された三次元形状の仮想立体物40Bの表面に、仮想オブジェクト42Bを貼り付ける。このため、図11(C)に示すように、仮想オブジェクト42Bは、形状算出部14Eで算出された三次元形状の仮想立体物40Bの表面の2平面に、曲げ位置L1で折り曲げられて貼り付けられた状態となる。   Then, the projecting unit 14F pastes the virtual object 42B on the surface of the three-dimensional virtual three-dimensional object 40B calculated by the shape calculating unit 14E. For this reason, as shown in FIG. 11C, the virtual object 42B is bent and pasted on the two planes of the surface of the three-dimensional virtual three-dimensional object 40B calculated by the shape calculating unit 14E at the bending position L1. It will be in the state.

そして、射影部14Fは、この仮想立体物40Bの表面に貼り付けられた仮想オブジェクト42Bを、二次元空間に射影したオブジェクト画像30Bを生成する。図13は、オブジェクト画像30Bの説明図である。   Then, the projecting unit 14F generates an object image 30B obtained by projecting the virtual object 42B pasted on the surface of the virtual three-dimensional object 40B into a two-dimensional space. FIG. 13 is an explanatory diagram of the object image 30B.

図13(A)に示すように、オブジェクト画像30Bは、仮想三次元空間において仮想オブジェクト42Bを仮想立体物40Bの表面に貼り付けた状態を示す、二次元画像である。合成部14Gは、撮影画像53上にオブジェクト画像30を合成した重畳画像54を生成する。表示制御部14Hは、重畳画像54を、UI部19へ表示することとなる。   As shown in FIG. 13A, the object image 30B is a two-dimensional image showing a state in which the virtual object 42B is pasted on the surface of the virtual three-dimensional object 40B in the virtual three-dimensional space. The combining unit 14G generates a superimposed image 54 obtained by combining the object image 30 on the captured image 53. The display control unit 14 </ b> H displays the superimposed image 54 on the UI unit 19.

なお、仮想立体物40は、あくまでの仮想オブジェクト42の貼り付け対象であって、仮想オブジェクト42の形状を決定するために用いるものであり、仮想立体物40はUI部19へ表示されない。   Note that the virtual solid object 40 is a target to which the virtual object 42 is pasted, and is used to determine the shape of the virtual object 42, and the virtual solid object 40 is not displayed on the UI unit 19.

また、第1受付部14Jは、オブジェクト画像30Bの仮想立体物40B上での移動量および移動方向を、二次元座標で示す第1移動指示を受付ける。受付部14Iの第1受付部14Jは、UI部19から、第1移動指示を受付ける。   In addition, the first reception unit 14J receives a first movement instruction indicating the movement amount and movement direction of the object image 30B on the virtual three-dimensional object 40B in two-dimensional coordinates. The first receiving unit 14J of the receiving unit 14I receives a first movement instruction from the UI unit 19.

移動部14Lは、UI部19に表示されているオブジェクト画像30Bに対応する仮想オブジェクト42Bを、受付けた第1移動指示に応じた移動量分、該第1移動指示に応じた移動方向へ、仮想立体物40B上で移動させる。   The moving unit 14L virtually moves the virtual object 42B corresponding to the object image 30B displayed on the UI unit 19 by a movement amount corresponding to the received first movement instruction in the movement direction corresponding to the first movement instruction. Move on the three-dimensional object 40B.

そして、射影部14Fは、第1受付部14Jが第1移動指示を受付けた場合、仮想立体物40B上の、移動部14Lによって移動された位置に貼り付けられた仮想オブジェクト42B(図13(A)、図13(B)参照)を、二次元空間に射影したオブジェクト画像30を生成すればよい。   Then, when the first receiving unit 14J receives the first movement instruction, the projection unit 14F receives the virtual object 42B (FIG. 13A) pasted at the position moved by the moving unit 14L on the virtual three-dimensional object 40B. ), See FIG. 13B), and the object image 30 projected onto the two-dimensional space may be generated.

そして、表示制御部14Hは、撮影画像53にオブジェクト画像30を重畳した重畳画像54を表示部20(UI部19)へ表示する。   Then, the display control unit 14H displays a superimposed image 54 in which the object image 30 is superimposed on the captured image 53 on the display unit 20 (UI unit 19).

このため、オブジェクト画像30Bが、仮想立体物40B上を第1指示に応じた移動量分、かつ移動方向へ移動した状態が、UI部19に表示されることとなる。   For this reason, the state in which the object image 30B has moved in the movement direction in the movement direction according to the first instruction on the virtual three-dimensional object 40B is displayed on the UI unit 19.

なお、仮想立体物40が立方体状の仮想立体物40Bである場合についても同様に、曲げ形状情報は、仮想オブジェクト42Bの曲げ方向を更に含んでいてもよい。この場合、形状算出部14Eは、曲げ形状情報に含まれる曲げ方向に、該曲げ形状情報に含まれる曲げ位置で曲げた2平面を有する仮想立体物40Bの三次元形状を算出すればよい。   Similarly, when the virtual three-dimensional object 40 is a cubic virtual three-dimensional object 40B, the bending shape information may further include the bending direction of the virtual object 42B. In this case, the shape calculation unit 14E may calculate the three-dimensional shape of the virtual three-dimensional object 40B having two planes bent at the bending position included in the bending shape information in the bending direction included in the bending shape information.

なお、仮想立体物40が立方体状である場合についても同様に、表示制御部14Hは、仮想オブジェクト42を射影したオブジェクト画像30における、該仮想オブジェクト42の貼り付けられた仮想立体物40の表示面とは反対側の背面側の領域を非表示とすることが好ましい。   Similarly, when the virtual three-dimensional object 40 has a cubic shape, the display control unit 14H displays the display surface of the virtual three-dimensional object 40 to which the virtual object 42 is pasted in the object image 30 in which the virtual object 42 is projected. It is preferable that the area on the back side opposite to the above is not displayed.

図4に戻り説明を続ける。   Returning to FIG.

第2受付部14Kは、オブジェクト画像30の、UI部19の表示面上での移動量および移動方向を、二次元座標で示す第2移動指示を受付ける。第2移動指示は、オブジェクト画像30を、仮想立体物40上ではなく、UI部19の表示面内で移動させることを示す。言い換えると、第2移動指示は、オブジェクト画像30に対応する仮想オブジェクト42を、仮想立体物40に貼り付けた状態のままで、表示面内を移動させることを示す。   The second reception unit 14K receives a second movement instruction that indicates the movement amount and movement direction of the object image 30 on the display surface of the UI unit 19 in two-dimensional coordinates. The second movement instruction indicates that the object image 30 is moved on the display surface of the UI unit 19 instead of on the virtual three-dimensional object 40. In other words, the second movement instruction indicates that the virtual object 42 corresponding to the object image 30 is moved within the display surface while being attached to the virtual three-dimensional object 40.

関数補正部14Mは、第2移動指示に応じた移動量および方向に、仮想オブジェクト42が二次元座標上で移動するように、仮想オブジェクト42を二次元空間に射影するための変換関数を補正する。   The function correction unit 14M corrects a conversion function for projecting the virtual object 42 into the two-dimensional space so that the virtual object 42 moves on the two-dimensional coordinates in the movement amount and direction according to the second movement instruction. .

例えば、関数補正部14Mは、二次元座標での平行移動量を、変換関数の逆関数により三次元座標での平行移動量に変換する。そして、関数補正部14Mは、変換した三次元座標での平行移動量分、仮想オブジェクト42を移動させるように変換関数を補正する。   For example, the function correction unit 14M converts the parallel movement amount in the two-dimensional coordinates into the parallel movement amount in the three-dimensional coordinates by using an inverse function of the conversion function. Then, the function correction unit 14M corrects the conversion function so that the virtual object 42 is moved by the amount of parallel movement in the converted three-dimensional coordinates.

この場合、射影部14Fは、関数補正部14Mで補正された変換関数に基づいて、オブジェクト画像30を生成する。   In this case, the projection unit 14F generates the object image 30 based on the conversion function corrected by the function correction unit 14M.

図14は、オブジェクト画像30の移動の説明図である。例えば、ユーザによるUI部19の操作指示によって、オブジェクト画像30の図14(A)中右方向への移動が操作指示されたとする。この場合、関数補正部14Mが補正した変換関数を用いて、射影部14Fがオブジェクト画像30を生成する。すると、図14(B)に示すように、オブジェクト画像30が操作指示によって指示された方向に移動した重畳画像54が、UI部19に表示されることとなる。   FIG. 14 is an explanatory diagram of the movement of the object image 30. For example, it is assumed that an operation instruction to move the object image 30 to the right in FIG. 14A is given by an operation instruction of the UI unit 19 by the user. In this case, the projection unit 14F generates the object image 30 using the conversion function corrected by the function correction unit 14M. Then, as illustrated in FIG. 14B, the superimposed image 54 in which the object image 30 is moved in the direction instructed by the operation instruction is displayed on the UI unit 19.

光源設定部14Oは、光源の光源効果を示す光源情報を設定する。本実施の形態では、光源設定部14Oは、受付部14Iで受け付けた光源情報を設定する。ユーザは、UI部19を操作することで、オブジェクト画像30に付与する光源効果を示す光源情報を入力する。受付部14Iは、UI部19から光源情報を受付け、光源設定部14Oは、受付けた光源情報を設定する。   The light source setting unit 14O sets light source information indicating the light source effect of the light source. In the present embodiment, the light source setting unit 14O sets the light source information received by the receiving unit 14I. The user operates the UI unit 19 to input light source information indicating the light source effect to be applied to the object image 30. The reception unit 14I receives light source information from the UI unit 19, and the light source setting unit 14O sets the received light source information.

受付部14Iが光源情報を受け付け、光源設定部14Oが光源情報を設定した場合、表示制御部14Hは、オブジェクト画像30に、光源情報によって示される光源効果を付与することが好ましい。光源効果の付与には、Open GLを用いればよい。   When the reception unit 14I receives light source information and the light source setting unit 14O sets light source information, the display control unit 14H preferably gives the object image 30 the light source effect indicated by the light source information. For providing the light source effect, Open GL may be used.

姿勢補正部14Nは、仮想オブジェクト42の姿勢を補正する。図15は、姿勢補正の説明図である。姿勢補正部14Nは、姿勢検出部14Aが検出した姿勢情報に応じて、仮想オブジェクト42の姿勢を補正する。   The posture correction unit 14N corrects the posture of the virtual object 42. FIG. 15 is an explanatory diagram of posture correction. The posture correction unit 14N corrects the posture of the virtual object 42 according to the posture information detected by the posture detection unit 14A.

具体的には、実空間における画像処理装置10の撮影部12の、初期設定時における初期姿勢からの変化量(姿勢変換量)をA=(α,β,γ)とした場合、姿勢補正部14Nは、仮想オブジェクト42の姿勢を、姿勢変換量Aに逆符号を乗じた姿勢補正量B=(−α,−β,−γ)分、基準姿勢から回転補正する。   Specifically, when the amount of change (posture conversion amount) from the initial posture at the time of initial setting of the photographing unit 12 of the image processing apparatus 10 in real space is A = (α, β, γ), the posture correction unit 14N rotationally corrects the posture of the virtual object 42 from the reference posture by a posture correction amount B = (− α, −β, −γ) obtained by multiplying the posture conversion amount A by an opposite sign.

具体的には、姿勢検出部14Aが、姿勢情報として、互いに直交するx軸、y軸およびz軸のそれぞれを中心とした、初期姿勢からの回転角の変化量(ロール角の変化量α、ピッチ角の変化量βおよびヨー角の変化量γ)を検出する。そして、姿勢補正部14Nは、三次元座標において、仮想オブジェクト42のロール角、ピッチ角およびヨー角のそれぞれを、予め設定されている基準姿勢から、姿勢情報とは逆符号の回転角分(−α,−β,−γ)、回転させる。これにより、姿勢補正部14Nは、仮想オブジェクト42の姿勢を画像処理装置10の撮影部12の姿勢の変化とは逆に動かすように補正する。   Specifically, the posture detection unit 14A uses, as posture information, the amount of change in the rotation angle from the initial posture (the amount of change in the roll angle α, around the x axis, the y axis, and the z axis orthogonal to each other). A pitch angle change amount β and a yaw angle change amount γ) are detected. Then, the posture correction unit 14N determines the roll angle, the pitch angle, and the yaw angle of the virtual object 42 in the three-dimensional coordinates from the preset reference posture by a rotation angle (-) opposite to the posture information. α, -β, -γ), rotate. Accordingly, the posture correction unit 14N corrects the posture of the virtual object 42 so as to move in the opposite direction to the change in the posture of the photographing unit 12 of the image processing apparatus 10.

図16は、姿勢変化に応じた、オブジェクト画像30の形状変化の説明図である。姿勢補正部14Nが仮想オブジェクトの姿勢を補正した結果、画像処理装置10は、撮影方向が変化した場合であっても、静止している物体を異なる方向から撮影したように、オブジェクト画像30の形状を変化させることができる。   FIG. 16 is an explanatory diagram of a change in the shape of the object image 30 in accordance with the change in posture. As a result of the posture correction unit 14N correcting the posture of the virtual object, the image processing apparatus 10 can capture the shape of the object image 30 as if the stationary object was photographed from different directions even when the photographing direction was changed. Can be changed.

例えば、図16に示すように、画像処理装置10は、撮影方向を例えばA1,A2,A3のように変化させた場合には、オブジェクト画像30が壁31に貼り付いているかのように、オブジェクト画像30の形状を変化させることができる。   For example, as illustrated in FIG. 16, when the image processing apparatus 10 changes the shooting direction, for example, A1, A2, and A3, the object image 30 appears as if it is attached to the wall 31. The shape of the image 30 can be changed.

次に、表示処理部14で実行する表示処理を説明する。   Next, display processing executed by the display processing unit 14 will be described.

図17は、本実施の形態の表示処理部14で実行する表示処理の手順を示すフローチャートである。   FIG. 17 is a flowchart showing a procedure of display processing executed by the display processing unit 14 of the present embodiment.

まず、受付部14Iが、貼り付け対象の仮想オブジェクト42の選択をUI部19から受け付ける(ステップS100)。次に、撮影部12が撮影を開始する(ステップS102)。ステップS102の処理によって、撮影画像の取得が開始される。   First, the reception unit 14I receives selection of the virtual object 42 to be pasted from the UI unit 19 (step S100). Next, the photographing unit 12 starts photographing (step S102). Acquisition of a captured image is started by the processing in step S102.

次に、受付部14Iが、UI部19から曲げ形状の操作入力を取得したか否かを判断する(ステップS104)。ステップS104で否定判断すると(ステップS104:No)、本ルーチンを終了する。一方、ステップS104で肯定判断すると(ステップS104:Yes)ステップS106へ進む。   Next, the reception unit 14I determines whether or not a bending shape operation input has been acquired from the UI unit 19 (step S104). If a negative determination is made in step S104 (step S104: No), this routine ends. On the other hand, if an affirmative determination is made in step S104 (step S104: Yes), the process proceeds to step S106.

ステップS106では、取得部14Dが、曲げ形状情報を取得する(ステップS106)。次に、形状算出部14Eが、ステップS106で取得した曲げ形状情報に応じて、仮想立体物40の三次元形状を算出する(ステップS108)。   In step S106, the acquisition unit 14D acquires bending shape information (step S106). Next, the shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40 according to the bending shape information acquired in Step S106 (Step S108).

次に、射影部14Fが、ステップS108で算出された三次元形状の仮想立体物40の表面に、ステップS100で受け付けた仮想オブジェクト42を貼り付ける。そして、貼り付けた仮想オブジェクト42を二次元空間に射影したオブジェクト画像30を生成する(ステップS110)。   Next, the projection unit 14F pastes the virtual object 42 received in step S100 on the surface of the three-dimensional virtual three-dimensional object 40 calculated in step S108. Then, an object image 30 obtained by projecting the pasted virtual object 42 into the two-dimensional space is generated (step S110).

次に、合成部14Gが、撮影画像53とステップS110で生成されたオブジェクト画像30と、を合成した重畳画像54を生成する(ステップS112)。表示制御部14Hは、ステップS112で生成された重畳画像54をUI部19(表示部20)へ表示する(ステップS114)。   Next, the combining unit 14G generates a superimposed image 54 obtained by combining the captured image 53 and the object image 30 generated in step S110 (step S112). The display control unit 14H displays the superimposed image 54 generated in step S112 on the UI unit 19 (display unit 20) (step S114).

次に、表示処理部14は、表示処理を終了するか否かを判断する(ステップS116)。ステップS116の判断は、例えば、UI部19から終了を示す操作指示がユーザによって操作入力されたか否かを判別することで行う。ステップS116で否定判断すると(ステップS116:No)、ステップS104へ戻る。一方、ステップS116で肯定判断すると(ステップS116:Yes)、本ルーチンを終了する。   Next, the display processing unit 14 determines whether or not to end the display process (step S116). The determination in step S116 is performed, for example, by determining whether or not an operation instruction indicating termination is input from the UI unit 19 by the user. If a negative determination is made in step S116 (step S116: No), the process returns to step S104. On the other hand, if an affirmative determination is made in step S116 (step S116: Yes), this routine ends.

表示処理部14では、図17の表示処理時に、図18および図19に示す割り込み処理(第1の割り込み処理、第2の割り込み処理)を実行する。   The display processing unit 14 executes the interrupt processing (first interrupt processing and second interrupt processing) shown in FIGS. 18 and 19 during the display processing of FIG.

図18は、第1の割り込み処理の手順を示すフローチャートである。   FIG. 18 is a flowchart showing the procedure of the first interrupt process.

まず、第1受付部14Jが、第1移動指示をUI部19から受け付けたか否かを判断する(ステップS200)。ステップS200で否定判断すると(ステップS200:No)、本ルーチンを終了する。一方、ステップS200で肯定判断すると(ステップS200:Yes)、ステップS202へ進む。   First, the first receiving unit 14J determines whether or not a first movement instruction has been received from the UI unit 19 (step S200). If a negative determination is made in step S200 (step S200: No), this routine ends. On the other hand, if an affirmative determination is made in step S200 (step S200: Yes), the process proceeds to step S202.

ステップS202では、移動部14Lが、ステップS200で受け付けた第1移動指示に応じた移動量分、該第1移動指示に応じた移動方向へ、仮想オブジェクト42を仮想立体物40上で移動させる(ステップS202)。   In step S202, the moving unit 14L moves the virtual object 42 on the virtual three-dimensional object 40 in the movement direction corresponding to the first movement instruction by the movement amount corresponding to the first movement instruction received in step S200 ( Step S202).

射影部14Fは、仮想立体物40上の、ステップS202による処理によって移動された位置に貼り付けられた仮想オブジェクト42を二次元空間に射影した、オブジェクト画像30を生成する(ステップS204)。   The projecting unit 14F generates an object image 30 obtained by projecting the virtual object 42 pasted on the virtual three-dimensional object 40 at the position moved by the process in step S202 to the two-dimensional space (step S204).

合成部14Gは、撮影画像53上に、ステップS204で生成されたオブジェクト画像30を合成した重畳画像54を生成する(ステップS206)。次に、表示制御部14Hは、重畳画像54をUI部19(表示部20)へ表示する(ステップS208)。そして、本ルーチンを終了する。   The combining unit 14G generates a superimposed image 54 obtained by combining the object image 30 generated in step S204 on the captured image 53 (step S206). Next, the display control unit 14H displays the superimposed image 54 on the UI unit 19 (display unit 20) (step S208). Then, this routine ends.

図19は、第2の割り込み処理の手順を示すフローチャートである。   FIG. 19 is a flowchart showing the procedure of the second interrupt process.

まず、第2受付部14Kが、第2移動指示をUI部19から受け付けたか否かを判断する(ステップS300)。ステップS300で否定判断すると(ステップS300:No)、本ルーチンを終了する。ステップS300で肯定判断すると(ステップS300:Yes)、ステップS302へ進む。   First, the second receiving unit 14K determines whether a second movement instruction has been received from the UI unit 19 (step S300). If a negative determination is made in step S300 (step S300: No), this routine ends. If an affirmative determination is made in step S300 (step S300: Yes), the process proceeds to step S302.

ステップS302では、姿勢補正部14Nが、ステップS300で受け付けた第2移動指示に応じた移動量および方向に、仮想オブジェクト42が二次元座標上で移動するように、仮想オブジェクト42を二次元空間に射影するための変換関数を補正する(ステップS302)。また、姿勢補正部14Nはが、姿勢検出部14Aで検出された姿勢に応じて、仮想オブジェクト42の姿勢を補正する。   In step S302, the posture correction unit 14N moves the virtual object 42 into the two-dimensional space so that the virtual object 42 moves on the two-dimensional coordinates in the movement amount and direction according to the second movement instruction received in step S300. The conversion function for projecting is corrected (step S302). In addition, the posture correction unit 14N corrects the posture of the virtual object 42 according to the posture detected by the posture detection unit 14A.

次に、射影部14Fは、ステップS302で補正された変換関数を用いて、姿勢を補正された仮想オブジェクト42を射影し、オブジェクト画像30を生成する(ステップS304)。次に、合成部14Gが、撮影画像53上に、ステップS304で生成されたオブジェクト画像30を合成した重畳画像54を生成する(ステップS306)。次に、表示制御部14Hが、重畳画像54をUI部19(表示部20)へ表示する(ステップS308)。そして、本ルーチンを終了する。   Next, the projecting unit 14F projects the virtual object 42 whose posture is corrected using the conversion function corrected in step S302, and generates an object image 30 (step S304). Next, the synthesizing unit 14G generates a superimposed image 54 obtained by synthesizing the object image 30 generated in step S304 on the captured image 53 (step S306). Next, the display control unit 14H displays the superimposed image 54 on the UI unit 19 (display unit 20) (step S308). Then, this routine ends.

なお、表示処理部14では、姿勢検出部14Aが新たな姿勢情報を検出する度に、姿勢補正部14Nが、仮想オブジェクト42の姿勢を補正する割り込み処理を更に実行する。そして、表示制御部14Hは、姿勢補正部14Nによって姿勢が補正されると、補正後の姿勢の仮想オブジェクト42を二次元空間に射影したオブジェクト画像30を表示部20へ表示すればよい。   In the display processing unit 14, the posture correcting unit 14N further executes an interrupt process for correcting the posture of the virtual object 42 every time the posture detecting unit 14A detects new posture information. When the posture is corrected by the posture correction unit 14N, the display control unit 14H may display the object image 30 obtained by projecting the corrected virtual object 42 in the two-dimensional space on the display unit 20.

以上説明したように、本実施の形態の画像処理装置10は、撮影部12と、取得部14Dと、形状算出部14Eと、射影部14Fと、表示制御部14Hと、を備える。撮影部12は、撮影画像53を得る。取得部14Dは、仮想三次元空間に配置する仮想オブジェクト42の曲げ形状を、表示部20の表示面を表す二次元デバイス座標で表した、曲げ形状情報を取得する。形状算出部14Eは、曲げ形状情報に応じて、仮想オブジェクト42の貼り付け対象を示す仮想立体物40の三次元形状を算出する。射影部14Fは、仮想立体物40の表面に貼り付けた仮想オブジェクト42を、二次元空間に射影したオブジェクト画像30を生成する。表示制御部14Hは、撮影画像53にオブジェクト画像30を重畳した重畳画像54を、表示部20へ表示する。   As described above, the image processing apparatus 10 according to the present embodiment includes the photographing unit 12, the acquisition unit 14D, the shape calculation unit 14E, the projection unit 14F, and the display control unit 14H. The imaging unit 12 obtains a captured image 53. The acquisition unit 14D acquires bending shape information in which the bending shape of the virtual object 42 arranged in the virtual three-dimensional space is represented by two-dimensional device coordinates representing the display surface of the display unit 20. The shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40 indicating the object to which the virtual object 42 is pasted according to the bending shape information. The projection unit 14F generates an object image 30 obtained by projecting the virtual object 42 pasted on the surface of the virtual three-dimensional object 40 into a two-dimensional space. The display control unit 14 </ b> H displays a superimposed image 54 in which the object image 30 is superimposed on the captured image 53 on the display unit 20.

このように、本実施の形態の画像処理装置10では、ユーザによるUI部19の操作指示によって操作入力された、UI部19(表示部20)の表示面を表す二次元デバイス座標で表される曲げ形状情報を取得する。そして、画像処理装置10の形状算出部14Eは、曲げ形状情報に応じて、仮想オブジェクト42の貼り付け対象である仮想立体物40の三次元形状を算出する。そして、画像処理装置10では、算出した三次元形状の仮想立体物40に貼り付けられた状態の仮想オブジェクト42に対応するオブジェクト画像30を、表示部20に表示する。   As described above, in the image processing apparatus 10 according to the present embodiment, it is represented by two-dimensional device coordinates representing the display surface of the UI unit 19 (display unit 20), which is input by a user operation instruction on the UI unit 19. Get bending shape information. Then, the shape calculation unit 14E of the image processing apparatus 10 calculates the three-dimensional shape of the virtual three-dimensional object 40 to which the virtual object 42 is pasted according to the bending shape information. Then, the image processing apparatus 10 displays the object image 30 corresponding to the virtual object 42 in a state of being pasted on the calculated three-dimensional virtual solid object 40 on the display unit 20.

従って、本実施の形態の画像処理装置10では、仮想オブジェクト42を任意の形状の仮想立体物40に貼り付けた状態を示す画像を容易に提供することができる。   Therefore, the image processing apparatus 10 according to the present embodiment can easily provide an image showing a state where the virtual object 42 is pasted on the virtual solid object 40 having an arbitrary shape.

また、形状算出部14Eは、曲げ形状情報に応じた三次元曲線に沿った曲面を有する、仮想立体物40の三次元形状を算出する。   In addition, the shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40 having a curved surface along the three-dimensional curve corresponding to the bending shape information.

また、曲げ形状情報は、仮想オブジェクト42の曲げ方向を含む。そして、形状算出部14Eは、この曲げ方向に曲がった曲面を有する、仮想立体物40の三次元形状を算出する。   Further, the bending shape information includes the bending direction of the virtual object 42. Then, the shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40 having a curved surface bent in the bending direction.

また、曲げ形状情報は、仮想オブジェクト42の曲げ位置を含む。形状算出部14Eは、曲げ位置で折り曲げた隣接する2平面を含む、仮想立体物40の三次元形状を算出する。そして、射影部14Fは、仮想立体物40の表面における、2平面の境界に曲げ位置が一致するように貼り付けた仮想オブジェクト42を二次元空間に射影したオブジェクト画像30を生成する。   The bending shape information includes the bending position of the virtual object 42. The shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40 including two adjacent planes bent at the bending position. Then, the projecting unit 14F generates an object image 30 in which the virtual object 42 pasted so that the bending position coincides with the boundary between the two planes on the surface of the virtual three-dimensional object 40 is projected into the two-dimensional space.

また、曲げ形状情報は、曲げ角度を含む。そして、形状算出部14Eは、隣接する2平面の成す角度が、曲げ形状情報に含まれる曲げ角度を示す仮想立体物40の三次元形状を算出する。   The bending shape information includes a bending angle. Then, the shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40 in which the angle formed by the two adjacent planes indicates the bending angle included in the bending shape information.

形状算出部14Eは、仮想オブジェクト42の、曲げ位置から曲げ方向の一方の辺までの長さを2平面の一方の平面の長さとし、曲げ位置から他方の辺までの長さを2平面の他方の平面の長さとする、仮想立体物40の三次元形状を算出する。   The shape calculation unit 14E sets the length from the bending position to one side in the bending direction of the virtual object 42 as the length of one plane of the two planes, and the length from the bending position to the other side as the other side of the two planes. The three-dimensional shape of the virtual three-dimensional object 40 is calculated as the length of the plane.

また、曲げ形状情報は、仮想オブジェクト42の曲げ方向を含む。形状算出部14Eは、曲げ方向に曲がった2平面を含む、仮想立体物40の三次元形状を算出する。   Further, the bending shape information includes the bending direction of the virtual object 42. The shape calculation unit 14E calculates the three-dimensional shape of the virtual three-dimensional object 40 including two planes bent in the bending direction.

表示制御部14Hは、仮想オブジェクト42を射影したオブジェクト画像30における、該仮想オブジェクト42の貼り付けられた仮想立体物40の表示面側とは反対側の背面側の領域を非表示としたオブジェクト画像30を、撮影画像53に重畳した重畳画像54を表示部20へ表示する。   The display control unit 14H hides the area on the back side opposite to the display surface side of the virtual three-dimensional object 40 to which the virtual object 42 is pasted in the object image 30 projected from the virtual object 42. 30 is displayed on the display unit 20 by superimposing 30 on the captured image 53.

また、画像処理装置10は、第1受付部14Jと、移動部14Lと、を更に備える。第1受付部14Jは、オブジェクト画像30の仮想立体物40上での移動量および移動方向を、二次元座標で示す第1移動指示を受付ける。移動部14Lは、仮想オブジェクト42を、第1移動指示に応じた移動量分、第1移動指示に応じた移動方向へ、仮想立体物40上で移動させる。射影部14Fは、第1受付部14Jが第1移動指示を受付けた場合、仮想立体物40上の移動された位置に貼り付けられた仮想オブジェクト42を二次元空間に射影したオブジェクト画像30を生成する。   The image processing apparatus 10 further includes a first receiving unit 14J and a moving unit 14L. The first accepting unit 14J accepts a first movement instruction that indicates the movement amount and movement direction of the object image 30 on the virtual three-dimensional object 40 using two-dimensional coordinates. The moving unit 14L moves the virtual object 42 on the virtual three-dimensional object 40 in the movement direction corresponding to the first movement instruction by the movement amount corresponding to the first movement instruction. When the first receiving unit 14J receives the first movement instruction, the projecting unit 14F generates an object image 30 in which the virtual object 42 pasted at the moved position on the virtual three-dimensional object 40 is projected into the two-dimensional space. To do.

また、画像処理装置10は、第2受付部14Kと、関数補正部14Mと、を備える。第2受付部14Kは、オブジェクト画像30の表示面上での移動量および移動方向を二次元座標で示す第2移動指示を受付ける。関数補正部14Mは、第2移動指示に応じた移動量および方向に、仮想オブジェクト42が二次元座標上で移動するように、仮想オブジェクト42を二次元空間に射影するための変換関数を補正する。第2受付部14Kが第2移動指示を受付けた場合、射影部14Fは、関数補正部14Mによって補正された変換関数に基づき、オブジェクト画像30を生成する。   Further, the image processing apparatus 10 includes a second reception unit 14K and a function correction unit 14M. The second receiving unit 14K receives a second movement instruction that indicates the movement amount and movement direction of the object image 30 on the display surface in two-dimensional coordinates. The function correction unit 14M corrects a conversion function for projecting the virtual object 42 into the two-dimensional space so that the virtual object 42 moves on the two-dimensional coordinates in the movement amount and direction according to the second movement instruction. . When the second reception unit 14K receives the second movement instruction, the projection unit 14F generates the object image 30 based on the conversion function corrected by the function correction unit 14M.

次に、上述した画像処理装置10のハードウェア構成について説明する。   Next, the hardware configuration of the image processing apparatus 10 described above will be described.

図20は、画像処理装置10のハードウェア構成図である。画像処理装置10は、ハードウェア構成として、装置全体を制御するCPU2901と、各種データや各種プログラムを記憶するROM2902と、各種データや各種プログラムを記憶するRAM2903と、UI装置2904と、撮影装置2905と、検出器2906と、を主に備えており、通常のコンピュータを利用したハードウェア構成となっている。なお、UI装置2904は、図1のUI部19に相当し、撮影装置2905は、撮影部12に相当し、検出器2906は、検知部25に相当する。   FIG. 20 is a hardware configuration diagram of the image processing apparatus 10. The image processing apparatus 10 includes, as a hardware configuration, a CPU 2901 that controls the entire apparatus, a ROM 2902 that stores various data and various programs, a RAM 2903 that stores various data and various programs, a UI apparatus 2904, and a photographing apparatus 2905. The detector 2906 is mainly provided and has a hardware configuration using a normal computer. The UI device 2904 corresponds to the UI unit 19 in FIG. 1, the imaging device 2905 corresponds to the imaging unit 12, and the detector 2906 corresponds to the detection unit 25.

上記実施の形態の画像処理装置10で実行されるプログラムは、インストール可能な形式または実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されてコンピュータプログラムプロダクトとして提供される。   The program executed by the image processing apparatus 10 of the above-described embodiment is an installable or executable file, such as a CD-ROM, a flexible disk (FD), a CD-R, a DVD (Digital Versatile Disk), or the like. The program is recorded on a computer-readable recording medium and provided as a computer program product.

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

また、上記実施の形態の画像処理装置10で実行されるプログラムを、ROM等に予め組み込んで提供するように構成してもよい。   In addition, the program executed by the image processing apparatus 10 according to the above-described embodiment may be provided by being incorporated in advance in a ROM or the like.

上記実施の形態の画像処理装置10で実行されるプログラムは、上述した各部を含むモジュール構成となっており、実際のハードウェアとしてはCPU(プロセッサ)が上記記録媒体からプログラムを読み出して実行することにより上記各部が主記憶装置上にロードされ、上記各部が主記憶装置上に生成されるようになっている。   The program executed by the image processing apparatus 10 of the above embodiment has a module configuration including the above-described units, and as actual hardware, a CPU (processor) reads the program from the recording medium and executes it. Thus, each unit is loaded on the main memory, and each unit is generated on the main memory.

なお、本発明は上記実施の形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施の形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施の形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施の形態にわたる構成要素を適宜組み合わせてもよい。また、種々の変形が可能である。   Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the components without departing from the scope of the invention in the implementation stage. Various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiments. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined. Various modifications are possible.

10 画像処理装置
14D 取得部
14E 形状算出部
14F 射影部
14H 表示制御部
14J 第1受付部
14K 第2受付部
14L 移動部
14M 関数補正部
19 UI部
20 表示部
25 検知部
30、30A、30B オブジェクト画像
40、40A、40B 仮想立体物
42、42A、42B 仮想オブジェクト
53 撮影画像
54 重畳画像
DESCRIPTION OF SYMBOLS 10 Image processing apparatus 14D Acquisition part 14E Shape calculation part 14F Projection part 14H Display control part 14J 1st reception part 14K 2nd reception part 14L Movement part 14M Function correction part 19 UI part 20 Display part 25 Detection part 30, 30A, 30B Object Images 40, 40A, 40B Virtual three-dimensional object 42, 42A, 42B Virtual object 53 Captured image 54 Superposed image

特開2007−048084号公報JP 2007-048084 A

Claims (12)

撮影画像を得る撮影部と、
仮想三次元空間に配置する仮想オブジェクトの曲げ形状を、表示部の表示面を表す二次元デバイス座標で表した、曲げ形状情報を取得する取得部と、
前記曲げ形状情報に応じて、前記仮想オブジェクトの貼り付け対象を示す仮想立体物の三次元形状を算出する形状算出部と、
前記仮想立体物の表面に貼り付けた前記仮想オブジェクトを、二次元空間に射影したオブジェクト画像を生成する射影部と、
前記撮影画像に前記オブジェクト画像を重畳した重畳画像を前記表示部へ表示する表示制御部と、
を備えた画像処理装置。
A shooting unit for obtaining a shot image;
An acquisition unit for acquiring bending shape information, which represents a bending shape of a virtual object arranged in a virtual three-dimensional space by two-dimensional device coordinates representing a display surface of the display unit;
In accordance with the bending shape information, a shape calculation unit that calculates a three-dimensional shape of a virtual three-dimensional object indicating the virtual object paste target;
A projection unit that generates an object image obtained by projecting the virtual object pasted on the surface of the virtual three-dimensional object into a two-dimensional space;
A display control unit that displays on the display unit a superimposed image in which the object image is superimposed on the captured image;
An image processing apparatus.
前記形状算出部は、前記曲げ形状情報に応じた三次元曲線に沿った曲面を有する、前記仮想立体物の三次元形状を算出する、請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the shape calculation unit calculates a three-dimensional shape of the virtual three-dimensional object having a curved surface along a three-dimensional curve corresponding to the bending shape information. 前記曲げ形状情報は、前記仮想オブジェクトの曲げ方向を含み、
前記形状算出部は、前記曲げ方向に曲がった前記曲面を有する、前記仮想立体物の三次元形状を算出する、請求項2に記載の画像処理装置。
The bending shape information includes a bending direction of the virtual object,
The image processing apparatus according to claim 2, wherein the shape calculation unit calculates a three-dimensional shape of the virtual three-dimensional object having the curved surface bent in the bending direction.
前記曲げ形状情報は、前記仮想オブジェクトの曲げ位置を含み、
前記形状算出部は、前記曲げ位置で折り曲げた隣接する2平面を含む、前記仮想立体物の三次元形状を算出し、
前記射影部は、前記仮想立体物の表面における、前記2平面の境界に前記曲げ位置が一致するように貼り付けた前記仮想オブジェクトを二次元空間に射影した前記オブジェクト画像を生成する、
請求項1に記載の画像処理装置。
The bending shape information includes a bending position of the virtual object,
The shape calculation unit calculates a three-dimensional shape of the virtual three-dimensional object including two adjacent planes bent at the bending position,
The projection unit generates the object image obtained by projecting the virtual object pasted so that the bending position coincides with a boundary between the two planes on the surface of the virtual three-dimensional object into a two-dimensional space.
The image processing apparatus according to claim 1.
前記曲げ形状情報は、曲げ角度を含み、
前記形状算出部は、隣接する前記2平面の成す角度が前記曲げ角度を示す、前記仮想立体物の三次元形状を算出する、
請求項4に記載の画像処理装置。
The bending shape information includes a bending angle,
The shape calculation unit calculates a three-dimensional shape of the virtual three-dimensional object, wherein an angle formed by the two adjacent planes indicates the bending angle;
The image processing apparatus according to claim 4.
前記形状算出部は、前記仮想オブジェクトの、前記曲げ位置から曲げ方向の一方の辺までの長さを前記2平面の一方の平面の長さとし、前記曲げ位置から他方の辺までの長さを前記2平面の他方の平面の長さとする、前記仮想立体物の三次元形状を算出する、
請求項4または請求項5に記載の画像処理装置。
The shape calculation unit uses the length from the bending position to one side in the bending direction of the virtual object as the length of one plane of the two planes, and the length from the bending position to the other side as the length. Calculating the three-dimensional shape of the virtual three-dimensional object as the length of the other of the two planes;
The image processing apparatus according to claim 4 or 5.
前記曲げ形状情報は、前記仮想オブジェクトの曲げ方向を含み、
前記形状算出部は、前記曲げ方向に曲がった前記2平面を含む、前記仮想立体物の三次元形状を算出する、請求項4〜請求項6の何れか1項に記載の画像処理装置。
The bending shape information includes a bending direction of the virtual object,
The image processing apparatus according to claim 4, wherein the shape calculation unit calculates a three-dimensional shape of the virtual three-dimensional object including the two planes bent in the bending direction.
前記表示制御部は、
前記仮想オブジェクトを射影した前記オブジェクト画像における、該仮想オブジェクトの貼り付けられた前記仮想立体物の表示面側とは反対側の背面側の領域を非表示とした前記オブジェクト画像を、前記撮影画像に重畳した前記重畳画像を前記表示部へ表示する、
請求項1〜請求項7の何れか1項に記載の画像処理装置。
The display control unit
In the object image obtained by projecting the virtual object, the object image in which a region on the back side opposite to the display surface side of the virtual three-dimensional object to which the virtual object is pasted is not displayed on the captured image. Displaying the superimposed image on the display unit;
The image processing apparatus according to claim 1.
前記オブジェクト画像の前記仮想立体物上での移動量および移動方向を、前記二次元座標で示す第1移動指示を受付ける第1受付部と、
前記仮想オブジェクトを、前記第1移動指示に応じた移動量分、前記第1移動指示に応じた移動方向へ、前記仮想立体物上で移動させる移動部と、
を更に備え、
前記射影部は、前記第1移動指示を受付けた場合、前記仮想立体物上の移動された位置に貼り付けられた前記仮想オブジェクトを二次元空間に射影した前記オブジェクト画像を生成する、
請求項1〜請求項8の何れか1項に記載の画像処理装置。
A first reception unit that receives a first movement instruction indicating the movement amount and movement direction of the object image on the virtual three-dimensional object by the two-dimensional coordinates;
A moving unit that moves the virtual object on the virtual three-dimensional object in a movement direction according to the first movement instruction by a movement amount according to the first movement instruction;
Further comprising
When the projection unit receives the first movement instruction, the projection unit generates the object image obtained by projecting the virtual object pasted at the moved position on the virtual three-dimensional object into a two-dimensional space.
The image processing apparatus according to claim 1.
前記オブジェクト画像の前記表示面上での移動量および移動方向を、前記二次元座標で示す第2移動指示を受付ける第2受付部と、
前記第2移動指示に応じた移動量および方向に、前記仮想オブジェクトが前記二次元座標上で移動するように、前記仮想オブジェクトを二次元空間に射影するための変換関数を補正する関数補正部と、
をさらに備え、
前記射影部は、前記第2移動指示を受付けた場合、補正された前記変換関数に基づき、前記オブジェクト画像を生成する、
請求項1〜請求項9の何れか1項に記載の画像処理装置。
A second reception unit that receives a second movement instruction indicating the movement amount and movement direction of the object image on the display surface by the two-dimensional coordinates;
A function correction unit that corrects a conversion function for projecting the virtual object into a two-dimensional space so that the virtual object moves on the two-dimensional coordinates in a movement amount and a direction according to the second movement instruction; ,
Further comprising
When the projection unit receives the second movement instruction, the projection unit generates the object image based on the corrected conversion function.
The image processing apparatus according to claim 1.
撮影画像を得るステップと、
仮想三次元空間に配置する仮想オブジェクトの曲げ形状を、表示部の表示面を表す二次元デバイス座標で表した、曲げ形状情報を取得するステップと、
前記曲げ形状情報に応じて、前記仮想オブジェクトの貼り付け対象を示す仮想立体物の三次元形状を算出するステップと、
前記仮想立体物の表面に貼り付けた前記仮想オブジェクトを、二次元空間に射影したオブジェクト画像を生成するステップと、
前記撮影画像に前記オブジェクト画像を重畳した重畳画像を前記表示部へ表示するステップと、
を含む、画像処理方法。
Obtaining a captured image;
A step of acquiring bending shape information representing a bending shape of a virtual object arranged in the virtual three-dimensional space by two-dimensional device coordinates representing a display surface of the display unit;
Calculating a three-dimensional shape of a virtual three-dimensional object indicating a pasting target of the virtual object according to the bending shape information;
Generating an object image obtained by projecting the virtual object pasted on the surface of the virtual three-dimensional object into a two-dimensional space;
Displaying a superimposed image in which the object image is superimposed on the captured image on the display unit;
Including an image processing method.
撮影画像を得るステップと、
仮想三次元空間に配置する仮想オブジェクトの曲げ形状を、表示部の表示面を表す二次元デバイス座標で表した、曲げ形状情報を取得するステップと、
前記曲げ形状情報に応じて、前記仮想オブジェクトの貼り付け対象を示す仮想立体物の三次元形状を算出するステップと、
前記仮想立体物の表面に貼り付けた前記仮想オブジェクトを、二次元空間に射影したオブジェクト画像を生成するステップと、
前記撮影画像に前記オブジェクト画像を重畳した重畳画像を前記表示部へ表示するステップと、
をコンピュータに実行させるためのプログラム。
Obtaining a captured image;
A step of acquiring bending shape information representing a bending shape of a virtual object arranged in the virtual three-dimensional space by two-dimensional device coordinates representing a display surface of the display unit;
Calculating a three-dimensional shape of a virtual three-dimensional object indicating a pasting target of the virtual object according to the bending shape information;
Generating an object image obtained by projecting the virtual object pasted on the surface of the virtual three-dimensional object into a two-dimensional space;
Displaying a superimposed image in which the object image is superimposed on the captured image on the display unit;
A program that causes a computer to execute.
JP2015012562A 2015-01-26 2015-01-26 Image processing device, image processing method, and program Pending JP2016139201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015012562A JP2016139201A (en) 2015-01-26 2015-01-26 Image processing device, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015012562A JP2016139201A (en) 2015-01-26 2015-01-26 Image processing device, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2016139201A true JP2016139201A (en) 2016-08-04

Family

ID=56560235

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015012562A Pending JP2016139201A (en) 2015-01-26 2015-01-26 Image processing device, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2016139201A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113674430A (en) * 2021-08-24 2021-11-19 上海电气集团股份有限公司 Virtual model positioning and registering method and device, augmented reality equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113674430A (en) * 2021-08-24 2021-11-19 上海电气集团股份有限公司 Virtual model positioning and registering method and device, augmented reality equipment and storage medium

Similar Documents

Publication Publication Date Title
JP6476657B2 (en) Image processing apparatus, image processing method, and program
JP4508049B2 (en) 360 ° image capturing device
US9516223B2 (en) Motion-based image stitching
JP2011239361A (en) System and method for ar navigation and difference extraction for repeated photographing, and program thereof
JP6849634B2 (en) Terminal device and control method of terminal device
US20160063713A1 (en) Information terminal apparatus, information processing method, and system
JP6812128B2 (en) Information processing device and information processing method
JP6088260B2 (en) Processing apparatus, processing system, processing method, and program
JP6488591B2 (en) Image processing apparatus, image processing method, and program
JP2006318095A (en) Image processing method and image processor
KR101875047B1 (en) System and method for 3d modelling using photogrammetry
JP6875196B2 (en) Mobile platforms, flying objects, support devices, mobile terminals, imaging assist methods, programs, and recording media
JP6295296B2 (en) Complex system and target marker
JP4835243B2 (en) Image composition apparatus and image composition program
US9348542B2 (en) Display processing apparatus, display processing method, and computer-readable recording medium
JP2018010473A (en) Image processing apparatus, image processing method, and image processing program
JP2010128931A (en) Remote control system and remote control apparatus
JP2009217115A (en) Camera picture simulator program
JP2016139199A (en) Image processing device, image processing method, and program
JP2004140845A (en) Projector
JP6405539B2 (en) Label information processing apparatus for multi-viewpoint image and label information processing method
JP2013008257A (en) Image composition program
JP2016139201A (en) Image processing device, image processing method, and program
JP2013092888A (en) Data processor
JP2008203991A (en) Image processor