JP2016162034A - Three-dimensional model generation system, three-dimensional model generation apparatus, and three-dimensional model generation method - Google Patents

Three-dimensional model generation system, three-dimensional model generation apparatus, and three-dimensional model generation method Download PDF

Info

Publication number
JP2016162034A
JP2016162034A JP2015037889A JP2015037889A JP2016162034A JP 2016162034 A JP2016162034 A JP 2016162034A JP 2015037889 A JP2015037889 A JP 2015037889A JP 2015037889 A JP2015037889 A JP 2015037889A JP 2016162034 A JP2016162034 A JP 2016162034A
Authority
JP
Japan
Prior art keywords
depth
dimensional model
depth data
axis
voxel
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
JP2015037889A
Other languages
Japanese (ja)
Inventor
モラヴェク アイヴォ
Moravec Ivo
モラヴェク アイヴォ
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2015037889A priority Critical patent/JP2016162034A/en
Publication of JP2016162034A publication Critical patent/JP2016162034A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent an unreal three-dimensional model from being generated.SOLUTION: A three-dimensional model generation system includes: a plurality of imaging apparatuses installed in different positions for capturing a shooting scene, to acquire depth data indicating a depth of the shooting scene; a depth data acquisition section for acquiring the depth data from the imaging apparatuses; a depth adjustment section which adjusts a depth indicated by the depth data, on the basis of the depth data of the imaging apparatuses; and a three-dimensional model generation section which generates a three-dimensional model of an object, on the basis of the depth data with the adjusted depth.SELECTED DRAWING: Figure 4

Description

本発明は、3次元モデル生成システム、3次元モデル生成装置および3次元モデル生成方法に関する。   The present invention relates to a three-dimensional model generation system, a three-dimensional model generation device, and a three-dimensional model generation method.

従来、複数の撮影部によって同一のシーンを撮影し、シーン内に存在する物体の3次元モデルを生成する技術が知られている。例えば、特許文献1には、撮影シーンに仮想的にボクセル(三次元空間内の格子によって形成される立方体)を設け、奥行きデータが示す奥行きより遠いボクセルに加点し、4台の撮影部で撮影された奥行きデータによって4点となったボクセルを物体に対応したボクセルと見なす構成が開示されている。   2. Description of the Related Art Conventionally, a technique is known in which the same scene is photographed by a plurality of photographing units and a three-dimensional model of an object existing in the scene is generated. For example, in Patent Document 1, virtual voxels (cubes formed by lattices in a three-dimensional space) are virtually provided in a shooting scene, and points are added to voxels farther than the depth indicated by the depth data, and shooting is performed with four shooting units. A configuration is disclosed in which voxels that have become four points based on the obtained depth data are regarded as voxels corresponding to an object.

特開2011−149952号公報JP 2011-149952 A

上述した従来技術においては、各撮影部において発生する奥行きデータの誤差が考慮されていない。すなわち、異なる位置に設置された撮像部の奥行きデータにおいて誤差が含まれると、物体に対応するボクセルの位置が不正確になる。そして、誤差が含まれる状態で物体に対応したボクセルが定義されると、3次元モデルにおいて、本来は曲面である部位に凹凸が生じるなどの不都合が生じ、非現実的な3次元モデルが生成される場合がある。   In the prior art described above, the error of the depth data generated in each photographing unit is not taken into consideration. That is, if an error is included in the depth data of the imaging units installed at different positions, the position of the voxel corresponding to the object becomes inaccurate. If a voxel corresponding to an object is defined in a state where an error is included, in the 3D model, inconveniences such as unevenness occur in a portion that is originally a curved surface, and an unrealistic 3D model is generated. There is a case.

本発明は、上記課題にかんがみてなされたもので、非現実的な3次元モデルが生成されることを抑制することを目的とする。   The present invention has been made in view of the above problems, and an object thereof is to suppress the generation of an unreal three-dimensional model.

上記目的を達成するための3次元モデル生成システムは、撮影シーンを撮影して当該撮影シーンの奥行きを示す奥行きデータを取得する、異なる複数の位置に設置された複数の撮影装置と、前記撮影装置から撮影シーンの奥行きを示す奥行きデータを取得する奥行きデータ取得部と、複数の前記撮影装置の前記奥行きデータに基づいて、前記奥行きデータが示す奥行きを調整する奥行き調整部と、奥行きが調整された前記奥行きデータに基づいて撮影対象の3次元モデルを生成する3次元モデル生成部と、を備える。   A three-dimensional model generation system for achieving the above object includes a plurality of photographing devices installed at a plurality of different positions, which capture a photographing scene and acquire depth data indicating the depth of the photographing scene, and the photographing device A depth data acquisition unit that acquires depth data indicating the depth of the shooting scene from the depth, a depth adjustment unit that adjusts the depth indicated by the depth data based on the depth data of the plurality of imaging devices, and the depth is adjusted A three-dimensional model generation unit that generates a three-dimensional model to be imaged based on the depth data.

すなわち、複数の撮影装置で撮影された奥行きデータに基づいて、撮影シーン内の撮影対象の3次元モデルを生成する構成において、奥行き調整部は、3次元モデルが生成される前の、奥行きデータの段階で奥行きを調整する。従って、奥行きデータに誤差が含まれていたとしても、当該誤差に起因して3次元モデルが生成する前に誤差を解消するような調整を行うことも可能になり、非現実的な3次元モデルが生成されることを抑制することが可能である。   That is, in the configuration for generating the 3D model of the shooting target in the shooting scene based on the depth data shot by the plurality of shooting devices, the depth adjustment unit performs the depth data before the 3D model is generated. Adjust the depth in stages. Therefore, even if an error is included in the depth data, it is possible to perform adjustment so as to eliminate the error before the three-dimensional model is generated due to the error. Can be prevented from being generated.

また、3次元モデルが生成される際には2次元座標から3次元座標への変換などの処理が行われること等に伴って精度が低下する。例えば、撮影装置が複数の画素からなる2次元センサーを備え、各画素の奥行きデータが各画素で撮影された撮影対象についての奥行きを示している構成と、撮影シーンの空間を再現するために設定された仮想的なボクセルに基づいて3次元モデルが生成される構成とを想定する。この場合、ボクセルに基づいて3次元モデルが生成されることに伴う精度低下は、2次元センサーから撮影対象までの距離に大きく依存する。   In addition, when a three-dimensional model is generated, the accuracy decreases due to processing such as conversion from two-dimensional coordinates to three-dimensional coordinates. For example, the imaging device has a two-dimensional sensor composed of a plurality of pixels, and the depth data of each pixel is set to reproduce the space of the shooting scene, and the configuration showing the depth of the shooting object shot by each pixel A configuration is assumed in which a three-dimensional model is generated based on the virtual voxels that have been generated. In this case, the decrease in accuracy due to the generation of the three-dimensional model based on the voxels largely depends on the distance from the two-dimensional sensor to the imaging target.

例えば、2次元センサーから撮影対象の表面に相当するボクセルまでの距離が特定の距離である場合に、ボクセル1個に相当する空間が画素1個で撮影される状況を想定する。この状況において、2次元センサーから撮影対象の表面に相当するボクセルまでの距離が当該特定の距離より近ければ、ボクセル1個に相当する空間が複数個の画素で撮影される。従って、この場合、複数個の画素が示す複数の奥行き情報が1個のボクセルで代表されることになり、奥行きデータに含まれる多くの情報が丸められた状態で1個のボクセルの情報が決定される。   For example, a situation is assumed in which a space corresponding to one voxel is captured by one pixel when the distance from the two-dimensional sensor to the voxel corresponding to the surface of the imaging target is a specific distance. In this situation, if the distance from the two-dimensional sensor to the voxel corresponding to the surface to be imaged is shorter than the specific distance, a space corresponding to one voxel is imaged by a plurality of pixels. Therefore, in this case, a plurality of depth information indicated by a plurality of pixels is represented by one voxel, and information of one voxel is determined in a state where a lot of information included in the depth data is rounded. Is done.

このため、3次元モデルが生成される際には情報の精度が低下する。従って、3次元モデルが生成されるボクセルの状態で各種の調整が行われたとしても、奥行きデータの情報の正確性が減殺された後に調整が行われることになり、非現実的な3次元モデルが生成され得る。しかし、奥行き調整部は、3次元モデルが生成される前の段階である奥行きデータに基づいて奥行きデータが示す奥行きを調整するため、情報の精度が低下する前に調整を行うことができる。従って、非現実的な3次元モデルが生成されることを抑制することが可能である。   For this reason, the accuracy of information decreases when a three-dimensional model is generated. Therefore, even if various adjustments are performed in the state of the voxel in which the three-dimensional model is generated, the adjustment is performed after the accuracy of the depth data information is reduced. Can be generated. However, since the depth adjustment unit adjusts the depth indicated by the depth data based on the depth data that is the stage before the generation of the three-dimensional model, the adjustment can be performed before the accuracy of the information is reduced. Therefore, it is possible to suppress generation of an unreal three-dimensional model.

ここで、撮影装置は、撮影シーンを撮影して当該撮影シーンの奥行きを示す奥行きデータを取得することができればよい。すなわち、撮影装置は、撮影シーンを撮影することにより、撮影された像の部分毎の奥行きを示す奥行きデータを取得する。奥行きは、撮影装置から撮影シーンを見た場合の視線方向における基準点からの距離であれば良く、基準点は種々の点を想定可能である。例えば、撮影装置において光学的に決定される光学中心やセンサーの位置等を基準点として想定可能である。   Here, it is only necessary for the photographing apparatus to obtain a depth data indicating a depth of the photographing scene by photographing the photographing scene. That is, the photographing apparatus obtains depth data indicating the depth of each portion of the photographed image by photographing the photographing scene. The depth may be a distance from the reference point in the line-of-sight direction when the photographic scene is viewed from the imaging apparatus, and various reference points can be assumed. For example, it is possible to assume an optical center, a sensor position, or the like optically determined in the photographing apparatus as a reference point.

また、撮影装置においては、3次元モデルを生成するために、複数の部分毎の奥行き情報が得られるように撮影シーンを撮影可能であることが好ましい。例えば、撮影装置が、複数の画素を備える2次元センサーによって撮影シーンを撮影する構成等を採用可能である。なお、奥行きは種々の方式によって決定されて良く、例えば、TOF(Time of Flight)方や構造光法等を採用可能である。   Further, in the photographing apparatus, it is preferable that the photographing scene can be photographed so as to obtain depth information for each of a plurality of portions in order to generate a three-dimensional model. For example, it is possible to adopt a configuration in which the photographing apparatus photographs a photographing scene with a two-dimensional sensor including a plurality of pixels. The depth may be determined by various methods. For example, a TOF (Time of Flight) method, a structured light method, or the like can be employed.

また、撮影装置は、異なる複数の位置に設置される。すなわち、1個の撮影装置で撮影シーン内に存在する立体の撮影対象を撮影した場合、撮影装置から見た撮影対象の裏側を撮影することはできない。そこで、撮影対象を異なる複数の位置に設置することにより、撮影対象に生じる死角ができるだけ少なくなるように構成される。なお、撮影シーンは、撮影対象(立体物等)とその背景(撮影対象が存在する空間の壁や床等)によって構成される。   In addition, the photographing devices are installed at a plurality of different positions. That is, when a three-dimensional shooting target existing in a shooting scene is shot with one shooting device, the back side of the shooting target viewed from the shooting device cannot be shot. Therefore, the blind spots generated in the shooting target are configured to be as small as possible by installing the shooting targets at a plurality of different positions. The shooting scene is composed of a shooting target (such as a three-dimensional object) and its background (such as a wall or floor of a space where the shooting target exists).

奥行き調整部は、複数の撮影装置の奥行きデータに基づいて、奥行きデータが示す奥行きを調整することができればよい。すなわち、複数の撮影装置の奥行きデータを解析すれば、誤差の存在が明らかになる。そこで、奥行き調整部が、例えば、当該誤差によるによる3次元モデルへの悪影響が減殺されるように奥行きを調整すれば、非現実的な3次元モデルが生成されることを抑制することができる。   The depth adjustment unit only needs to be able to adjust the depth indicated by the depth data based on the depth data of the plurality of imaging devices. That is, if the depth data of a plurality of photographing devices is analyzed, the existence of an error becomes clear. Therefore, if the depth adjustment unit adjusts the depth so that adverse effects on the three-dimensional model due to the error are reduced, for example, generation of an unrealistic three-dimensional model can be suppressed.

なお、奥行きを調整する際には、調整の結果、非現実的な3次元モデルが生成されることを抑制することができればよい。このための構成としては、種々の構成を採用可能であり、例えば、奥行き調整部が、複数の撮影装置の奥行きデータに矛盾が生じている場合に、矛盾が生じている奥行きの一方を、異なる撮影装置から取得された奥行きに一致するように調整する構成としても良い。すなわち、複数の撮影装置で奥行きデータを撮影した場合において、少なくとも1台の撮影装置で撮影された奥行きデータの少なくとも一部に誤差が含まれると、他の撮影装置で撮影された奥行きデータと矛盾が生じる場合がある。例えば、ある撮影装置で捉えた表面が他の撮影装置で捉えた表面の内側に存在するように奥行きデータが取得される場合がある。   Note that when adjusting the depth, it is only necessary to suppress generation of an unreal three-dimensional model as a result of the adjustment. As a configuration for this, various configurations can be adopted. For example, when the depth adjustment unit has a contradiction in the depth data of a plurality of photographing apparatuses, one of the depths in which the conflict occurs is different. A configuration may be adopted in which adjustment is performed so as to match the depth acquired from the imaging apparatus. That is, when depth data is captured by a plurality of imaging devices, if at least part of the depth data captured by at least one imaging device includes an error, the depth data is inconsistent with the depth data captured by another imaging device. May occur. For example, the depth data may be acquired such that the surface captured by a certain imaging device exists inside the surface captured by another imaging device.

この場合、奥行きデータは互いに矛盾しており、この矛盾を解消せずに3次元モデルが生成されると、本来存在しない段差が表面に存在するように3次元モデルが生成されるなど、非現実的な3次元モデルが生成され得る。そこで、このような場合に、奥行き調整部が、矛盾が生じている奥行きの一方を、異なる撮影装置から取得された奥行きに一致するように調整すれば、矛盾を解消することができる。従って、この状態で3次元モデルが生成されることにより、非現実的な3次元モデルが生成されることを抑制することができる。   In this case, the depth data are inconsistent with each other. If a 3D model is generated without eliminating the inconsistency, the 3D model is generated such that a step that does not exist originally exists on the surface. A typical three-dimensional model can be generated. Therefore, in such a case, if the depth adjustment unit adjusts one of the depths where the contradiction occurs to match the depth acquired from a different photographing apparatus, the contradiction can be resolved. Therefore, the generation of the unreal 3D model can be suppressed by generating the 3D model in this state.

3次元モデル生成部は、奥行きが調整された奥行きデータに基づいて撮影対象の3次元モデルを生成することができればよい。すなわち、奥行きデータは、同一の撮影対象を異なる撮影装置で撮影した個別のデータであるため、異なる座標系で定義された複数のデータである。そこで、3次元モデル生成部は、これらのデータから共通の座標系(3次元座標系)で撮影対象を示す情報を生成することにより、3次元モデルを生成することができればよい。   The three-dimensional model generation unit only needs to be able to generate a three-dimensional model to be imaged based on depth data whose depth has been adjusted. That is, since the depth data is individual data obtained by photographing the same subject with different photographing devices, the depth data is a plurality of data defined in different coordinate systems. Therefore, the three-dimensional model generation unit only needs to be able to generate a three-dimensional model by generating information indicating a subject to be photographed from these data in a common coordinate system (three-dimensional coordinate system).

3次元モデルを定義するための情報の態様は種々の態様を採用可能であり、例えば、上述のボクセルにおいて撮影対象である立体物の表面を示す情報(表面の内部は充填されている)であっても良いし、当該表面の情報から複数の多面体(ポリゴン)によって撮影対象を表現し、当該多面体を示す情報によって3次元モデルを定義しても良く,種々の構成を採用可能である。むろん、3次元モデルには、表面の模様(テクスチャー)が含まれていても良く、表面の模様が含まれる場合には、表面の模様を撮影装置によって撮影し、撮影された模様を表面に対応づける構成等を採用可能である。   Various forms of information for defining a three-dimensional model can be adopted, for example, information indicating the surface of a three-dimensional object to be imaged in the above-described voxel (the inside of the surface is filled). Alternatively, the imaging target may be expressed by a plurality of polyhedrons (polygons) from the information on the surface, and a three-dimensional model may be defined by information indicating the polyhedron, and various configurations may be employed. Of course, the 3D model may include a surface pattern (texture). If the surface pattern is included, the surface pattern is captured by the camera and the captured pattern is applied to the surface. It is possible to adopt a configuration to attach.

さらに、奥行き調整部が、撮影装置が備える各画素に対して撮影シーンから入力する光の方向を示す軸線に沿って、奥行きを調整する構成を採用してもよい。すなわち、奥行きデータには種々の誤差が含まれ得るが、誤差によって奥行きの値が変動した場合、撮影対象の表面の位置が奥行き方向に変動する。そして、当該奥行き方向は、撮影装置が複数の画素からなる2次元センサーによって奥行きデータを撮影する構成において、各画素に入力する光軸に沿った方向である。そこで、各画素に入力する光の方向を示す軸線に沿って、奥行きを調整する構成とすれば、誤差によって奥行きが不正確となったことに起因して3次元モデルが非現実的な形状となることを抑制することができる。   Furthermore, a configuration may be employed in which the depth adjustment unit adjusts the depth along an axis indicating the direction of light input from the shooting scene with respect to each pixel included in the shooting apparatus. That is, various errors may be included in the depth data, but when the depth value fluctuates due to the error, the position of the surface of the imaging target fluctuates in the depth direction. The depth direction is a direction along the optical axis that is input to each pixel in a configuration in which the imaging apparatus captures depth data using a two-dimensional sensor including a plurality of pixels. Therefore, if the depth is adjusted along the axis indicating the direction of the light input to each pixel, the three-dimensional model has an unrealistic shape due to an inaccurate depth due to an error. It can be suppressed.

なお、軸線は撮影シーンから入力する光の方向を示していれば良く、画素で撮影される撮影対象の部位と画素中心とを結ぶ線であれば良く、奥行きデータが示す奥行きが当該軸線方向の奥行きを示していると見なすことができればよい。従って、軸線方向に基準点から奥行きだけ離れた位置に撮影対象が存在すると見なすことによって3次元モデルが構築されるように、軸線が定義されていれば良い。従って、3次元モデルが構築可能な範囲であれば、実際の光の光軸と厳密に一致していない線が軸線と見なされる構成が採用されていてもよい。   The axis only needs to indicate the direction of light input from the shooting scene, and may be any line connecting the part to be imaged captured by the pixel and the center of the pixel, and the depth indicated by the depth data corresponds to the axis direction. What is necessary is just to be able to consider that it shows the depth. Accordingly, it is only necessary to define the axis line so that the three-dimensional model is constructed by regarding that the imaging target exists at a position away from the reference point in the axial direction by the depth. Therefore, as long as a three-dimensional model can be constructed, a configuration may be employed in which a line that does not exactly match the actual optical axis is regarded as an axis.

さらに、奥行き調整部が、撮影シーンにボクセルを設定するとともに、複数の撮影装置の奥行きデータのそれぞれに基づいて、撮影装置の基準点から軸線に沿って奥行きだけ離れたボクセルを撮影対象の表面と見なす処理を行い、同一の軸線上に位置が異なる複数の表面が存在する場合、一方の表面を軸線に沿って他の表面上に移動させる構成を採用してもよい。   Further, the depth adjustment unit sets voxels in the shooting scene, and sets voxels that are separated from the reference point of the shooting device by a depth along the axis based on each of the depth data of the shooting devices as the surface of the shooting target. In the case where a plurality of surfaces having different positions exist on the same axis line, a configuration in which one surface is moved on the other surface along the axis line may be employed.

すなわち、奥行き調整部が、撮影シーンに設定された3次元座標系内に3次元格子を設定することによりボクセル(立方体)を設定する。奥行きデータは、撮影装置から撮影シーンを見た方向についての奥行きを示しているため、当該3次元座標系において、撮影装置の基準点(光学的に決定される光学中心やセンサーの位置等)から奥行きだけ奥側に存在するボクセルは、撮影対象の表面と見なすことができる。そこで、各奥行きデータに基づいて表面と見なすことができるボクセルを決定すると、3次元座標系内にボクセルによって撮影対象の表面が定義された3次元モデルを生成することができる。   That is, the depth adjustment unit sets voxels (cubes) by setting a three-dimensional grid in the three-dimensional coordinate system set for the shooting scene. Since the depth data indicates the depth in the direction in which the photographic scene is viewed from the photographing apparatus, in the three-dimensional coordinate system, from the reference point (optically determined optical center, sensor position, etc.) of the photographing apparatus. A voxel existing on the back side by the depth can be regarded as a surface to be imaged. Therefore, when a voxel that can be regarded as a surface is determined based on each depth data, a three-dimensional model in which the surface to be imaged is defined by the voxel in the three-dimensional coordinate system can be generated.

ただし、この段階では、奥行きデータに誤差が含まれると、奥行きの値が不正確になり、複数の奥行きデータ間で矛盾が生じ得る。そして、当該矛盾は、同一の軸線上に位置が異なる複数の表面が存在する状態として現れる。そこで、このような場合に、一方の表面を軸線に沿って他の表面上に移動させる構成とすれば、当該矛盾を解消するように奥行きを調整することになり、当該矛盾を解消することができる。なお、一方の前記表面を軸線に沿って他の表面上に移動させるように奥行きを調整する際には、種々の手法を採用可能であり、他の最も近い表面に移動させる調整や、軸線に沿って撮影対象の内側に存在する他の表面に移動させる調整や、軸線に沿って撮影対象の外側に存在する他の表面に移動させる調整等を採用可能である。   However, at this stage, if an error is included in the depth data, the depth value becomes inaccurate, and a contradiction may occur between a plurality of depth data. Then, the contradiction appears as a state in which a plurality of surfaces having different positions exist on the same axis. Therefore, in such a case, if one surface is moved on the other surface along the axis, the depth is adjusted to eliminate the contradiction, and the contradiction can be resolved. it can. It should be noted that when adjusting the depth so that one of the surfaces moves along the axis on the other surface, various methods can be adopted. It is possible to employ an adjustment that moves along the other surface existing inside the object to be photographed along, an adjustment that moves along another axis to another surface that exists outside the object to be photographed.

さらに、本発明は、プログラムや方法としても実現可能である。また、以上のようなシステム、プログラム、方法は、単独の装置として実現される場合や、複数の装置によって実現される場合、他の装置に備えられる各部と共有の部品を利用して実現される場合が想定可能であり、各種の態様を含むものである。また、一部がソフトウェアであり一部がハードウェアであったりするなど、適宜、変更可能である。さらに、システムを制御するプログラムの記録媒体としても発明は成立する。むろん、そのソフトウェアの記録媒体は、磁気記録媒体であってもよいし光磁気記録媒体であってもよいし、今後開発されるいかなる記録媒体においても全く同様に考えることができる。   Furthermore, the present invention can also be realized as a program or method. In addition, when the system, program, and method described above are realized as a single device or when realized by a plurality of devices, they are realized by using components shared with other units included in other devices. Cases can be envisaged and include various aspects. Further, some changes may be made as appropriate, such as a part of software and a part of hardware. Furthermore, the invention can be realized as a recording medium for a program for controlling the system. Of course, the software recording medium may be a magnetic recording medium, a magneto-optical recording medium, or any recording medium to be developed in the future.

本発明の一実施形態を示すブロック図である。It is a block diagram which shows one Embodiment of this invention. 調整処理のフローチャートである。It is a flowchart of an adjustment process. (3A)は調整処理のフローチャート、(3B)は軸線の説明図である。(3A) is a flowchart of the adjustment process, and (3B) is an explanatory diagram of the axis. (4A)〜(4D)は調整処理の例を示す図である。(4A) to (4D) are diagrams illustrating examples of adjustment processing. (5A)〜(5C)は調整処理の例を示す図である。(5A) to (5C) are diagrams illustrating examples of adjustment processing.

ここでは、下記の順序に従って本発明の実施の形態について説明する。
(1)3次元モデル生成システムの構成:
(2)調整処理:
(3)他の実施形態:
Here, embodiments of the present invention will be described in the following order.
(1) Configuration of 3D model generation system:
(2) Adjustment process:
(3) Other embodiments:

(1)3次元モデル生成システムの構成:
図1は、本実施形態にかかる3次元モデル生成システムの構成例を示すブロック図である。本実施形態において3次元モデル生成システムは、コンピューター10と複数の撮影装置40−1〜40−N(Nは2以上の整数であり、撮影装置の台数を示す)とによって構成される。撮影装置40−1〜40−Nは、撮影シーンを撮影して当該撮影シーンの奥行きを示す奥行きデータと撮影シーンの色を示すRGBデータとを取得する装置である。すなわち、撮影装置40−1〜40−Nは、撮影シーンに存在する撮影対象の奥行きを複数の画素によって検出する2次元センサーと当該撮影対象の色を複数の画素によって検出する2次元センサーとを備えている。
(1) Configuration of 3D model generation system:
FIG. 1 is a block diagram illustrating a configuration example of a three-dimensional model generation system according to the present embodiment. In the present embodiment, the three-dimensional model generation system includes the computer 10 and a plurality of imaging devices 40-1 to 40-N (N is an integer of 2 or more and indicates the number of imaging devices). The photographing devices 40-1 to 40-N are devices that photograph a photographing scene and obtain depth data indicating the depth of the photographing scene and RGB data indicating the color of the photographing scene. That is, the imaging devices 40-1 to 40-N include a two-dimensional sensor that detects the depth of the imaging target existing in the imaging scene using a plurality of pixels and a two-dimensional sensor that detects the color of the imaging target using a plurality of pixels. I have.

本実施形態において、奥行きデータを撮影する2次元センサーは、非可視光の光源(例えば赤外線源)から出力された光が撮影対象で反射した後の反射光を各画素で検出する。また、撮影装置40−1〜40−Nは、当該光源から出力された光が撮影対象で反射した後、各画素に到達するまでの光路に基づいて(例えば、位相差を利用して)、光学中心から検査対象までの距離を特定し、各画素における検出結果を奥行き値とした奥行きデータを出力する。   In the present embodiment, a two-dimensional sensor that captures depth data detects reflected light after the light output from a non-visible light source (for example, an infrared light source) is reflected by a subject to be captured by each pixel. In addition, the imaging devices 40-1 to 40-N are based on an optical path from when the light output from the light source is reflected by the imaging target to reach each pixel (for example, using a phase difference). The distance from the optical center to the object to be inspected is specified, and depth data with the detection result at each pixel as the depth value is output.

図3Bは、光学中心Poと2次元センサーSと撮影対象Oとの関係を模式的に示す図である。2次元センサーSは、撮影装置40−1〜40−Nに備えられたセンサーであり、一方向に並ぶ画素を複数の正方形で模式的に示している。光学中心Poは、撮影装置40−1〜40−Nのカメラパラメーターによって、2次元センサーSに対する相対的な位置が決められる点であり、全画素に入射する光が当該光学中心Poに収束すると見なすことができる。   FIG. 3B is a diagram schematically illustrating a relationship among the optical center Po, the two-dimensional sensor S, and the photographing object O. The two-dimensional sensor S is a sensor provided in the imaging devices 40-1 to 40-N, and pixels arranged in one direction are schematically indicated by a plurality of squares. The optical center Po is a point where the relative position with respect to the two-dimensional sensor S is determined by the camera parameters of the imaging devices 40-1 to 40-N, and it is considered that the light incident on all the pixels converges on the optical center Po. be able to.

撮影対象Oは撮影シーン内に存在する立体物であり、撮影シーンには撮影対象Oの他にも床や壁など3次元モデルの生成対象とならない物体(撮影対象O以外の物体)も含まれ得る。光学中心Poから撮影対象O側に延びる光路は、2次元センサーSの中央点を通って撮影シーン側に延びる。図3Bは当該光路を破線で示しており、ある画素を通る光路の延長先に撮影対象Oが存在する場合、その部分が当該画素で撮影される。すなわち、図3Bに示す破線は、上述の光源から出力された光が撮影対象Oで反射した後の反射光や撮影シーン内の他の物体で反射した後の反射光の光路を示している。   The shooting target O is a three-dimensional object that exists in the shooting scene. In addition to the shooting target O, the shooting scene O may include an object (an object other than the shooting target O) that is not a generation target of a three-dimensional model, such as a floor or a wall. . An optical path extending from the optical center Po toward the photographing object O side extends through the central point of the two-dimensional sensor S toward the photographing scene. In FIG. 3B, the optical path is indicated by a broken line. When the imaging target O exists at the extension destination of the optical path passing through a certain pixel, that portion is captured by the pixel. That is, the broken line shown in FIG. 3B indicates the optical path of the reflected light after the light output from the above-described light source is reflected by the photographing object O or the reflected light after being reflected by another object in the photographing scene.

ここでは、これらの光路を、撮影装置40−1〜40−Nが備える各画素に対して撮影シーンから入力する光の方向を示す軸線と呼ぶ。撮影装置40−1〜40−Nは、各画素に入力する光に基づいて画素毎に奥行き値を取得し、画素毎の奥行き値を奥行きデータとして出力する。従って、本実施形態において、撮影装置40−1〜40−Nは、各撮影装置40−1〜40−Nに固有の2次元座標系で指定される任意の画素毎に奥行き値を有するデータを奥行きデータとして出力する。   Here, these optical paths are referred to as axes indicating the direction of light input from the shooting scene to each pixel included in the imaging devices 40-1 to 40-N. The imaging devices 40-1 to 40-N acquire a depth value for each pixel based on the light input to each pixel, and output the depth value for each pixel as depth data. Therefore, in this embodiment, the imaging devices 40-1 to 40-N store data having a depth value for each arbitrary pixel specified in the two-dimensional coordinate system unique to each of the imaging devices 40-1 to 40-N. Output as depth data.

撮影装置40−1〜40−Nは、RGBデータも奥行きデータと同様のフォーマットで取得する。すなわち、撮影装置40−1〜40−Nは、各撮影装置40−1〜40−Nに固有の2次元座標系で指定される任意の画素毎に色(赤、緑、青の階調値の組み合わせ)を示すデータをRGBデータとして出力する。むろん、奥行きデータやRGBデータは、任意の座標系で表現されて良く、撮影シーンに設定された3次元座標系を利用して、各撮影装置40−1〜40−Nから撮影シーンへの奥行きを定義したデータであっても良い。
The imaging devices 40-1 to 40-N obtain RGB data in the same format as the depth data. In other words, the photographing devices 40-1 to 40-N have color (red, green, and blue gradation values) for each arbitrary pixel specified in the two-dimensional coordinate system unique to each photographing device 40-1 to 40-N. The data indicating the combination) is output as RGB data. Of course, the depth data and the RGB data may be expressed in an arbitrary coordinate system, and the depth from each of the imaging devices 40-1 to 40-N to the shooting scene using the three-dimensional coordinate system set in the shooting scene. It may be data that defines

なお、本実施形態において、撮影装置40−1〜40−Nは、動画を撮影可能な撮影装置である。すなわち、撮影装置40−1〜40−Nは、所定の時間長のフレーム毎に1回の撮影を行って奥行きデータおよびRGBデータを生成する。また、各撮影装置40−1〜40−Nにおける撮影タイミングは同期している。従って、撮影装置40−1〜40−Nは、複数フレームに渡って複数回の撮影を行うことにより、時系列の動画を生成可能な奥行きデータおよびRGBデータを生成することができる。   In the present embodiment, the photographing devices 40-1 to 40-N are photographing devices capable of photographing a moving image. That is, the imaging devices 40-1 to 40-N perform imaging once for each frame having a predetermined time length to generate depth data and RGB data. In addition, the photographing timings in the photographing apparatuses 40-1 to 40-N are synchronized. Therefore, the imaging devices 40-1 to 40-N can generate depth data and RGB data that can generate a time-series moving image by performing imaging a plurality of times over a plurality of frames.

本実施形態において、撮影装置40−1〜40−Nは異なる複数の位置(N個の位置)に設置される。すなわち、本実施形態において、撮影装置40−1〜40−Nは、撮影対象に生じる死角ができるだけ少なくなるように、できるだけ偏らないように複数の位置に設置されている。   In the present embodiment, the imaging devices 40-1 to 40-N are installed at a plurality of different positions (N positions). That is, in the present embodiment, the imaging devices 40-1 to 40-N are installed at a plurality of positions so as not to be biased as much as possible so that the blind spots generated in the imaging target are reduced as much as possible.

コンピューター10は、CPU、RAM、ROM等を備える制御部20と記録媒体30とを備えており、ROMや記録媒体30に記憶されたプログラムを制御部20で実行することができる。むろん、コンピューター10は、図示しない入力部(マウスやキーボード等)や出力部(ディスプレイ等)等を備えていても良く、本実施形態において利用者は、図示しない入力部を介して任意の指示を入力可能である。また、利用者は、図示しない出力部によって3次元モデルや奥行きデータを可視化した画像を視認可能である。   The computer 10 includes a control unit 20 including a CPU, a RAM, a ROM, and the like and a recording medium 30, and the control unit 20 can execute a program stored in the ROM or the recording medium 30. Of course, the computer 10 may include an input unit (mouse, keyboard, etc.), an output unit (display, etc.), etc. (not shown). In this embodiment, the user gives an arbitrary instruction via the input unit (not shown). It is possible to input. In addition, the user can visually recognize an image in which a three-dimensional model and depth data are visualized by an output unit (not shown).

本実施形態においては、制御部20で実行可能なプログラムの一つとして3次元モデル生成プログラム21が記録媒体30に記録されている。当該3次元モデル生成プログラム21は、撮影装置40−1〜40−Nの出力データに基づいて撮影対象の3次元モデルを生成する機能を制御部20に実行させるプログラムである。   In the present embodiment, a three-dimensional model generation program 21 is recorded on the recording medium 30 as one of programs that can be executed by the control unit 20. The three-dimensional model generation program 21 is a program that causes the control unit 20 to execute a function of generating a three-dimensional model to be imaged based on output data of the imaging devices 40-1 to 40-N.

奥行きデータ取得部21aは、複数の撮影装置から奥行きデータを取得する機能を制御部20に実行させるプログラムモジュールである。すなわち、制御部20は、図示しない入力部による利用者の指示に応じて撮影装置40−1〜40−Nを駆動し、撮影装置40−1〜40−Nが出力する撮影データ(奥行きデータおよびRGBデータ)を取得し、記録媒体30に対して記録する(撮影データ30a)。この結果、複数の撮影装置40−1〜40−Nによって撮影された複数フレームに渡る奥行きデータおよびRGBデータが撮影データ30aとして蓄積される。   The depth data acquisition unit 21a is a program module that causes the control unit 20 to execute a function of acquiring depth data from a plurality of imaging devices. That is, the control unit 20 drives the imaging devices 40-1 to 40-N according to a user instruction from an input unit (not shown), and the imaging data (depth data and 40-N) output from the imaging devices 40-1 to 40-N. RGB data) is acquired and recorded on the recording medium 30 (photographing data 30a). As a result, depth data and RGB data over a plurality of frames photographed by the plurality of photographing devices 40-1 to 40-N are accumulated as photographing data 30a.

奥行き調整部21bは、複数の撮影装置40−1〜40−Nの奥行きデータに基づいて、奥行きデータが示す奥行きを調整する機能を制御部20に実行させるプログラムモジュールである。すなわち、撮影対象の同一部分で反射された光が異なる撮影装置で撮影された場合において、誤差がなく正確に奥行き値が取得された場合、奥行きデータに基づいて撮影対象の3次元モデルが生成されると当該同一部分が3次元モデル上で1カ所の表面を形成する。しかし、同一部分で反射された光が異なる撮影装置で撮影された場合において、奥行き値に誤差が含まれる場合、奥行きデータに基づいて撮影対象の3次元モデルが生成されると、同一部分であるはずの部分が3次元モデル上で2カ所の表面を形成するなどの矛盾が生じる。そこで、複数の撮影装置40−1〜40−Nの奥行きデータに矛盾が生じている場合に、制御部20は、奥行き調整部21bの処理により、矛盾が生じている奥行きの一方を、異なる撮影装置40−1〜40−Nから取得された奥行きに一致するように調整する。   The depth adjustment unit 21b is a program module that causes the control unit 20 to perform a function of adjusting the depth indicated by the depth data based on the depth data of the plurality of imaging devices 40-1 to 40-N. That is, when the light reflected by the same part of the photographing target is photographed by a different photographing device and the depth value is accurately acquired without error, a three-dimensional model of the photographing target is generated based on the depth data. Then, the same part forms one surface on the three-dimensional model. However, when the light reflected by the same part is photographed by different photographing devices and the depth value includes an error, when the three-dimensional model to be photographed is generated based on the depth data, the same part is obtained. A contradiction arises such that the supposed part forms two surfaces on the three-dimensional model. Therefore, when there is a contradiction in the depth data of the plurality of imaging devices 40-1 to 40-N, the control unit 20 captures one of the depths in which the contradiction occurs by different processing by the processing of the depth adjustment unit 21b. Adjustments are made to match the depth obtained from the devices 40-1 to 40-N.

具体的には、制御部20は、撮影装置40−1〜40−Nが備える各画素に対して撮影シーンから入力する光の方向を示す軸線に沿って、奥行きを調整する。本実施形態において、この調整は、3次元モデルを構築する3次元座標系を利用して実行される。すなわち、制御部20は、撮影シーン内の位置を示す3次元座標系を利用し、当該撮影シーンに3次元格子を設定することによりボクセルを設定する。奥行きデータは、撮影装置40−1〜40−Nから撮影シーンを見た方向についての奥行きを示しているため、当該3次元座標系において、撮影装置40−1〜40−Nの基準点(本例では光学中心)から奥行きだけ奥側に存在するボクセルは、撮影対象の表面と見なすことができる。そこで、制御部20は、各撮影装置40−1〜40−Nの座標系によって表現された奥行きデータを、ボクセルが設定された3次元座標系のデータに変換する。そして、制御部20は、各奥行きデータに基づいて表面と見なすことができるボクセルを決定する。   Specifically, the control unit 20 adjusts the depth along the axis indicating the direction of light input from the shooting scene to each pixel included in the shooting devices 40-1 to 40-N. In this embodiment, this adjustment is performed using a three-dimensional coordinate system for constructing a three-dimensional model. That is, the control unit 20 sets a voxel by using a three-dimensional coordinate system indicating a position in the shooting scene and setting a three-dimensional lattice in the shooting scene. Since the depth data indicates the depth in the direction in which the photographing scene is viewed from the photographing devices 40-1 to 40-N, the reference point (the main point) of the photographing devices 40-1 to 40-N in the three-dimensional coordinate system. In the example, the voxel existing at the depth side from the optical center) can be regarded as the surface of the imaging target. Therefore, the control unit 20 converts the depth data expressed by the coordinate system of each of the imaging devices 40-1 to 40-N into data of a three-dimensional coordinate system in which voxels are set. And the control part 20 determines the voxel which can be considered as a surface based on each depth data.

図4Aは、簡単のために3次元空間である撮影シーンを2次元で模式的に示した図である。同図4Aにおいては、撮影シーン内に設定されたボクセルVを正方形で模式的に示している。また、同図4Aにおいては、2個の撮影装置の光学中心Po1,Po2を模式的に示しており、光学中心Po1から撮影対象に延びる軸線の一部を細い破線で示し、光学中心Po2から撮影対象に延びる軸線の一部を細い実線で示している。 FIG. 4A is a diagram schematically showing a photographic scene that is a three-dimensional space in two dimensions for the sake of simplicity. In FIG. 4A, the voxel V set in the shooting scene is schematically shown as a square. In FIG. 4A, optical centers Po 1 and Po 2 of the two imaging devices are schematically shown, and a part of an axis extending from the optical center Po 1 to the object to be imaged is indicated by a thin broken line. A part of the axis extending from Po 2 to the object to be photographed is indicated by a thin solid line.

同図4Aにおいては、各軸線の長さが奥行き値の大きさに対応するように図示している。従って、各軸線において光学中心の反対側の端点は、表面と見なされる。すなわち、各軸線に対応する奥行き値によれば、例えば、光学中心Po1から延びる軸線L1を通る画素の奥行き値によってボクセルV1が表面と見なされ、光学中心Po2から延びる軸線L2を通る画素の奥行き値によってボクセルV2が表面と見なされる。図4Aにおいては、表面と見なされるボクセルの境界が太い破線によって示されている。また、図4Aにおいては、光学中心Po1から延びる軸線の奥行き値で表面と見なされるボクセルを結ぶことで表面と推定される部位を太い破線S1で示し、光学中心Po2から延びる軸線の奥行き値で表面と見なされるボクセルを結ぶことで表面と推定される部位を太い実線S2で示している。 In FIG. 4A, the length of each axis is illustrated so as to correspond to the depth value. Therefore, the end point opposite to the optical center in each axis is regarded as the surface. That is, according to the depth values corresponding to the respective axes, for example, considered voxel V 1 is the surface by the depth values of pixels passing through the axis L 1 extending from the optical center Po 1, the axis L 2 extending from the optical center Po 2 Voxel V 2 is considered to be a surface by the depth value of the passing pixel. In FIG. 4A, the border of the voxels considered as the surface is indicated by a thick broken line. Further, in FIG. 4A shows a portion that is estimated to surface by connecting the voxels are considered surface depth value of the axis extending from the optical center Po 1 by a thick dashed line S 1, the depth of the axis extending from the optical center Po 2 It represents a site is estimated that the surface by connecting the voxels are considered surface value by the thick solid line S 2.

図4Aに示す例においては、太い実線S2で示す表面と太い破線S1で示す表面とが異なっているため、互いに矛盾が生じている。このような矛盾は、複数の撮影装置40−1〜40−Nで奥行きデータを撮影した場合において、少なくとも1台の撮影装置40−1〜40−Nで撮影された奥行きデータの少なくとも一部に誤差が含まれることによって発生する。例えば、図4Aに示す軸線L1上には、軸線L1に基づいて表面と見なされたボクセルV1と軸線L2に基づいて表面と見なされたボクセルV2とが存在し、同一軸線上の2カ所に表面が存在するため矛盾している。 In the example shown in FIG. 4A, the surface indicated by the thick solid line S 2 is different from the surface indicated by the thick broken line S 1 , and thus contradictions occur. Such a contradiction is caused by at least a part of the depth data captured by at least one of the imaging devices 40-1 to 40-N when the depth data is captured by the plurality of imaging devices 40-1 to 40-N. It is generated by including an error. For example, on the axis L 1 shown in FIG. 4A, there is a voxel V 2 which is regarded as the surface on the basis of the voxel V 1 and the axis L 2 deemed surface based on the axis L 1, the same axis It is contradictory because the surface exists in two places.

このような矛盾を解消せずに3次元モデルが生成されると、本来存在しない段差が表面に存在するように3次元モデルが生成されるなど、非現実的な3次元モデルが生成され得る。そこで、本実施形態において、制御部20は、奥行き調整部21bが、矛盾が生じている奥行きの一方を、異なる撮影装置40−1〜40−Nから取得された奥行きに一致するように調整する。   If a three-dimensional model is generated without eliminating such a contradiction, an unrealistic three-dimensional model may be generated, for example, a three-dimensional model may be generated such that a step that does not originally exist is present on the surface. Therefore, in the present embodiment, the control unit 20 adjusts the depth adjusting unit 21b so that one of the inconsistent depths matches the depth acquired from the different imaging devices 40-1 to 40-N. .

具体的には、制御部20は、複数の奥行きデータに基づいて表面と見なされるボクセルが特定された後に、同一の軸線上に位置が異なる複数の表面(表面と見なされたボクセル)が存在するか否かを判定する。そして、制御部20は、同一の軸線上に位置が異なる複数の表面が存在する場合、一方の表面を軸線に沿って他の表面上に移動させる。例えば、図4Aに示す例において、軸線L2上のボクセルV2を軸線L2に沿ってボクセルVm2まで移動させる。すなわち、制御部20は、表面と見なされていたボクセルV2を、軸線L2に沿って撮影対象の内側に存在する他の表面上(ボクセルVm2)に移動させるように、軸線L2に対応する画素の奥行き値を補正する。以上の構成によれば、誤差に起因する矛盾を解消することができ、誤差によって奥行きが不正確となったことに起因して3次元モデルが非現実的な形状となることを抑制することができる。 Specifically, after the voxel regarded as the surface is specified based on the plurality of depth data, the control unit 20 has a plurality of surfaces (voxels regarded as the surface) having different positions on the same axis. It is determined whether or not. And the control part 20 moves one surface on the other surface along an axis line, when the some surface from which a position differs on the same axis line exists. For example, in the example shown in FIG. 4A, it is moved to the voxel Vm 2 along the voxel V 2 on the axis line L 2 in the axial L 2. That is, the control unit 20, a voxel V 2 which was regarded as the surface, so to move on other surfaces present inside the imaging object along the axis L 2 (voxels Vm 2), the axis L 2 Correct the depth value of the corresponding pixel. According to the above configuration, it is possible to eliminate the contradiction caused by the error, and to suppress the three-dimensional model from becoming an unrealistic shape due to the inaccuracy of the depth due to the error. it can.

3次元モデル生成部21cは、奥行きが調整された奥行きデータと、上述のRGBデータとに基づいて撮影対象の3次元モデルを生成する機能を制御部20に実行させるプログラムモジュールである。本実施形態において、奥行きデータは、同一の撮影対象を異なる撮影装置40−1〜40−Nで撮影した個別のデータであるため、異なる座標系で定義された複数のデータである。そこで、制御部20は、3次元モデル生成部21cは、これらのデータから共通の3次元座標系で撮影対象を示す情報を生成することにより、3次元モデルを生成する。   The three-dimensional model generation unit 21c is a program module that causes the control unit 20 to execute a function of generating a three-dimensional model to be photographed based on the depth data whose depth is adjusted and the above-described RGB data. In the present embodiment, the depth data is individual data obtained by photographing the same subject to be photographed by different photographing devices 40-1 to 40-N, and thus is a plurality of data defined in different coordinate systems. Therefore, the control unit 20 generates a three-dimensional model by generating information indicating the object to be imaged in the common three-dimensional coordinate system from the data, the three-dimensional model generation unit 21c.

具体的には、制御部20は、各撮影装置40−1〜40−Nの座標系によって表現された奥行きデータを、ボクセルが設定された3次元座標系のデータに変換する。そして、制御部20は、各奥行きデータに基づいて表面と見なすことができるボクセルを決定する。この結果、ボクセルが設定された3次元座標系内で撮影対象の表面となるボクセルが特定された状態となる。そこで、制御部20は、当該表面の情報を、当該表面によって構成された複数の多面体(ポリゴン)を示す情報に変換する。   Specifically, the control unit 20 converts the depth data expressed by the coordinate system of each of the imaging devices 40-1 to 40-N into data of a three-dimensional coordinate system in which voxels are set. And the control part 20 determines the voxel which can be considered as a surface based on each depth data. As a result, the voxel that is the surface of the imaging target is specified in the three-dimensional coordinate system in which the voxel is set. Therefore, the control unit 20 converts the surface information into information indicating a plurality of polyhedrons (polygons) formed by the surface.

さらに、制御部20は、RGBデータに基づいて、各多面体の面に取り付けるべきテクスチャーを生成し、各テクスチャーと多面体の面とを対応づける。そして、制御部20は、複数の多面体を示す情報と、各多面体の面に対応づけられたテクスチャーを示す情報とによって3次元モデルデータ30bを生成し、記録媒体30に記録する。この結果、撮影された撮影対象を立体的に表現可能な3次元モデルデータ30bが生成されたことになる。   Furthermore, the control unit 20 generates a texture to be attached to the surface of each polyhedron based on the RGB data, and associates each texture with the surface of the polyhedron. Then, the control unit 20 generates three-dimensional model data 30b from information indicating a plurality of polyhedrons and information indicating textures associated with the surfaces of the respective polyhedrons, and records them in the recording medium 30. As a result, the three-dimensional model data 30b that can three-dimensionally represent the photographed subject is generated.

以上の構成において、制御部20は、奥行き調整部21bの処理により、3次元モデルが生成される前の奥行きデータの段階で奥行きを調整する。従って、奥行きデータに誤差が含まれていたとしても、当該誤差に起因して3次元モデルが生成する前に誤差を解消するような調整を行うことが可能になり、非現実的な3次元モデルが生成されることを抑制することが可能である。   In the above configuration, the control unit 20 adjusts the depth at the stage of depth data before the three-dimensional model is generated by the processing of the depth adjustment unit 21b. Therefore, even if an error is included in the depth data, it is possible to perform an adjustment so as to eliminate the error before the three-dimensional model is generated due to the error. Can be prevented from being generated.

また、一般には、3次元モデルが生成される際には2次元座標から3次元座標への変換などの処理が行われること等に伴って精度が低下する。従って、3次元モデルが生成された後の状態で誤差の解消などの各種の調整が行われたとしても、奥行きデータの情報の正確性が減殺された後に調整が行われることになり、非現実的な3次元モデルが生成され得る。しかし、本実施形態において制御部20は、3次元モデルが生成される前の段階である奥行きデータに基づいて奥行きデータが示す奥行きを調整するため、情報の精度が低下する前に調整を行うことができる。従って、非現実的な3次元モデルが生成されることを抑制することが可能である。   Further, in general, when a three-dimensional model is generated, the accuracy decreases due to processing such as conversion from two-dimensional coordinates to three-dimensional coordinates. Therefore, even if various adjustments such as error elimination are performed after the three-dimensional model is generated, the adjustment is performed after the accuracy of the depth data information is reduced, which is unrealistic. A typical three-dimensional model can be generated. However, in the present embodiment, the control unit 20 adjusts the depth indicated by the depth data based on the depth data that is the stage before the generation of the three-dimensional model, and therefore performs the adjustment before the accuracy of the information decreases. Can do. Therefore, it is possible to suppress generation of an unreal three-dimensional model.

(2)調整処理:
次に、制御部20が奥行き調整部21bの処理によって実行する調整処理を詳細に説明する。図2および図3Aは、当該調整処理を示すフローチャートである。制御部20は、利用者が図示しない入力部により3次元モデルの生成を指示した場合等に調整処理を開始する。調整処理において、制御部20は、全ボクセルを未定に設定し、全軸線を計算対象に設定する(ステップS100)。すなわち、制御部20は、撮影シーンを示す3次元座標系にボクセルを設定し、各ボクセルの位置を示す変数およびボクセルの属性を示す変数を設定する。そして、制御部20は、全てのボクセルの属性を未定に設定する。
(2) Adjustment process:
Next, the adjustment process executed by the control unit 20 by the process of the depth adjustment unit 21b will be described in detail. 2 and 3A are flowcharts showing the adjustment process. The control unit 20 starts the adjustment process when the user instructs generation of a three-dimensional model using an input unit (not shown). In the adjustment process, the control unit 20 sets all voxels to be undetermined and sets all axes to be calculation targets (step S100). That is, the control unit 20 sets voxels in the three-dimensional coordinate system indicating the shooting scene, and sets variables indicating the positions of the voxels and variables indicating the attributes of the voxels. And the control part 20 sets the attribute of all the voxels to undetermined.

なお、ボクセルの属性は、ボクセルが撮影対象であるか否かを示す情報であり、撮影対象が存在しない空間に相当するボクセルは属性が空であると定義され、撮影対象の表面に相当するボクセルは属性が表面であると定義される。なお、表面に囲まれたボクセルは撮影対象の内部に相当するが、これらのボクセルについては内部等の属性が割り当てられても良いし、未定のままでもよい(3次元モデルを構築することは可能である)。   The attribute of the voxel is information indicating whether or not the voxel is a shooting target. The voxel corresponding to the space where the shooting target does not exist is defined as having an empty attribute, and the voxel corresponding to the surface of the shooting target is used. Is defined as an attribute that is a surface. Note that the voxels surrounded by the surface correspond to the inside of the object to be imaged, but these voxels may be assigned attributes such as the inside, or may remain undecided (a three-dimensional model can be constructed) Is).

さらに、制御部20は、撮影装置40−1〜40−Nの全てについて、光学中心と画素中心とを結ぶ軸線を定義し、全ての軸線をステップS105〜S170における計算の対象となる計算対象として設定する。なお、制御部20は、光学中心および各軸線をボクセルと同一の3次元座標系内で定義する。すなわち、撮影装置40−1〜40−Nの光学中心の相対的な位置関係および撮影装置40−1〜40−Nの向き(視線方向:2次元センサーの中央画素の軸線方向)は予め決められている。   Further, the control unit 20 defines the axis line connecting the optical center and the pixel center for all of the imaging devices 40-1 to 40-N, and sets all the axis lines as calculation targets to be calculated in steps S105 to S170. Set. The control unit 20 defines the optical center and each axis in the same three-dimensional coordinate system as the voxel. That is, the relative positional relationship between the optical centers of the imaging devices 40-1 to 40-N and the orientations of the imaging devices 40-1 to 40-N (line-of-sight direction: the axial direction of the central pixel of the two-dimensional sensor) are determined in advance. ing.

そこで、制御部20は、ボクセルと同一の3次元座標系内に各光学中心を配置し、各光学中心から撮影装置40−1〜40−Nが各向きに向いている場合における軸線の位置を特定する。軸線の位置は、例えば、軸線を示す式や軸線上の2カ所の位置等で規定可能であるが、本実施形態において制御部20は、光学中心を一方の端点、光学中心から奥行き値だけ離れた位置を他方の端点とし、2カ所の端点の位置によって軸線の位置を規定する。なお、ここでは、光学中心から奥行き値だけ離れた端点を軸線の終了点と呼ぶ。   Therefore, the control unit 20 arranges each optical center in the same three-dimensional coordinate system as the voxel, and determines the position of the axis when the imaging devices 40-1 to 40-N face each direction from each optical center. Identify. The position of the axis can be defined by, for example, an expression indicating the axis, two positions on the axis, etc. In this embodiment, the control unit 20 separates the optical center by one depth, a depth value from the optical center. The position of the axis line is defined by the positions of the two end points, with the other position as the other end point. Here, the end point that is separated from the optical center by the depth value is called the end point of the axis.

次に、制御部20は、着目する撮影装置を設定する(ステップS105)。すなわち、制御部20は、ステップS105以降の処理により、撮影装置40−1〜40−Nの中の1個に着目したループ処理を行い、撮影装置40−1〜40−Nの全てについてループ処理を行うことで、全ての撮影装置40−1〜40−Nを対象とした処理を順次行っていく。このため、制御部20は、ループ処理での処理対象となっていない撮影装置を、撮影装置40−1〜40−Nの中から1個選択し、着目する撮影対象と見なす。なお、図4Bは、図4Aに示す例において、光学中心Po1を有する撮影装置が着目する撮影装置である場合の例を説明する図であり、処理開始段階で未定のボクセルをグレーに着色して示している。 Next, the control unit 20 sets an imaging device of interest (step S105). That is, the control unit 20 performs a loop process focusing on one of the imaging devices 40-1 to 40-N through the processing after step S105, and performs the loop processing on all of the imaging devices 40-1 to 40-N. As a result, the processing for all the imaging devices 40-1 to 40-N is sequentially performed. For this reason, the control unit 20 selects one imaging device that is not a processing target in the loop processing from the imaging devices 40-1 to 40-N, and regards it as a target imaging target. FIG. 4B is a diagram for explaining an example in the case shown in FIG. 4A in which the imaging device having the optical center Po 1 is the imaging device to which attention is paid, and undecided voxels are colored gray at the processing start stage. It shows.

次に、制御部20は、着目画素を設定する(ステップS110)。すなわち、制御部20は、ステップS105において設定された着目する撮影装置が備える2次元センサーを構成する画素の中の1個に着目したループ処理をステップS110以降で行い、画素の全てについてループ処理を行うことで、着目された撮影装置が備える全ての画素についての処理を順次行っていく。このため、制御部20は、ループ処理での処理対象となっていない画素を、着目された撮影装置が備える画素の中から1個選択し、着目画素と見なす。   Next, the control unit 20 sets a target pixel (step S110). That is, the control unit 20 performs a loop process focusing on one of the pixels constituting the two-dimensional sensor included in the imaging device of interest set in step S105 after step S110, and performs the loop process on all the pixels. By performing the processing, the processing for all the pixels included in the focused imaging apparatus is sequentially performed. For this reason, the control unit 20 selects one pixel that is not a processing target in the loop processing from pixels included in the focused imaging apparatus, and regards it as the target pixel.

次に、制御部20は、着目軸線を設定する(ステップS115)。すなわち、制御部20は、ステップS100において設定された軸線の中から、着目画素を通る軸線を選択し、着目軸線として設定する。次に、制御部20は、着目ボクセルを設定する(ステップS120)。すなわち、制御部20は、着目軸線が通るボクセルの中の1個に着目したループ処理をステップS120〜S160で行い、着目軸線が通るボクセルの全てについてループ処理を行うことで、着目軸線が通るボクセルの全てを対象とした処理を順次行っていく。このため、制御部20は、着目軸線が通るボクセルであって、処理対象とされていないボクセルの中から、光学中心に近い位置に存在するボクセルを選択する。例えば、図4Bに示す例において、ステップS115において軸線L1が着目軸線となった場合、制御部20は、最初のループでボクセルV11を着目ボクセルに設定し、次のループでボクセルV12を着目ボクセルに設定する(ボクセルV11よりも光学中心Po1に近いボクセルは定義されていない)。 Next, the control unit 20 sets an axis of interest (step S115). That is, the control unit 20 selects an axis passing through the pixel of interest from the axes set in step S100 and sets it as the axis of interest. Next, the control unit 20 sets a target voxel (step S120). That is, the control unit 20 performs a loop process focusing on one of the voxels through which the axis of interest passes in steps S120 to S160, and performs a loop process on all the voxels through which the axis of interest passes to thereby pass the voxel through which the axis of interest passes. The process for all of the above is performed sequentially. For this reason, the control unit 20 selects a voxel that passes through the axis of interest and that is present at a position close to the optical center from voxels that are not processed. For example, in the example shown in FIG. 4B, when the axis L 1 becomes focused axis in step S115, the control unit 20, the first loop to set the voxel V 11 to the target voxel, the voxel V 12 in the next loop The target voxel is set (the voxel closer to the optical center Po 1 than the voxel V 11 is not defined).

次に、制御部20は、着目ボクセルが軸線の終了点であるか否かを判定する(ステップS125)。すなわち、制御部20は、着目軸線の位置を示す2個の端点の位置のうち、終了点(光学中心と反対側の端点)の位置を特定し、当該位置が着目ボクセルに含まれる場合に、着目ボクセルが軸線の終了点であると判定する。   Next, the control unit 20 determines whether or not the target voxel is the end point of the axis (step S125). That is, the control unit 20 specifies the position of the end point (end point opposite to the optical center) among the positions of the two end points indicating the position of the axis of interest, and when the position is included in the target voxel, It is determined that the target voxel is the end point of the axis.

ステップS125において、着目ボクセルが軸線の終了点であると判定されない場合、制御部20は、着目ボクセルを空に設定する(ステップS145)。例えば、図4Bに示す例において、着目軸線がL1である場合、軸線の終了点は点Pe1である。従って、着目ボクセルがボクセルV11やV12であれば、これらの着目ボクセルは空と見なされる。図4Cは、空のボクセルを設定する処理が図4Bに示す各軸線について行われた後の結果を示しており、空と見なされたボクセルを、境界が細線かつ白抜きの正方形によって示している。 If it is not determined in step S125 that the target voxel is the end point of the axis, the control unit 20 sets the target voxel to be empty (step S145). For example, in the example shown in FIG. 4B, when focused axis is L 1, the end point of the axis is a point Pe 1. Therefore, if the target voxel is voxel V 11 or V 12 , these target voxels are regarded as empty. FIG. 4C shows the result after the process of setting an empty voxel has been performed for each axis shown in FIG. 4B, and the voxel considered empty is indicated by a thin line and a white square. .

次に、制御部20は、着目ボクセルが、過去に表面に設定されていたボクセルであるか否かを判定する(ステップS150)。すなわち、本実施形態においては、ステップS105〜S170のループ処理によってステップS105が実行されるたびに着目する撮影装置を変更する。このため、ステップS145で着目ボクセルを空に設定した段階で、過去に、他の撮影装置の軸線について処理が行われていると、当該着目ボクセルが表面に設定済である場合がある。   Next, the control unit 20 determines whether or not the target voxel is a voxel that has been set on the surface in the past (step S150). That is, in the present embodiment, the imaging device to which attention is paid is changed every time step S105 is executed by the loop processing of steps S105 to S170. For this reason, if the process has been performed on the axis of another imaging apparatus in the past when the target voxel is set to be empty in step S145, the target voxel may be set on the surface.

そして、着目ボクセルが過去に表面に設定済であるにもかかわらず、今回の処理で着目ボクセルが空に設定されると、矛盾が生じていることになる。そこで、制御部20は、ステップS150において、着目ボクセルが、過去に表面に設定されていたボクセルであるか否かを判定する。ステップS150において、着目ボクセルが、過去に表面に設定されていたボクセルであると判定されなかった場合、制御部20は、ステップS155をスキップする。   Even if the target voxel has been set on the surface in the past, a contradiction occurs when the target voxel is set to empty in the current process. Therefore, in step S150, the control unit 20 determines whether the target voxel is a voxel that has been set on the surface in the past. In step S150, when it is not determined that the target voxel is a voxel that has been set on the surface in the past, the control unit 20 skips step S155.

この場合、制御部20は、着目軸線の軸線上の全てのボクセルについて処理が終了したか否かを判定する(ステップS160)。すなわち、制御部20は、光学中心側から終了点に至る軸線上の全てのボクセルについてステップS120〜S160の処理が終了したか否かを判定する。ステップS160において、着目軸線の軸線上の全てのボクセルについて処理が終了したと判定されない場合、制御部20は、ステップS120以降の処理を繰り返す。   In this case, the control unit 20 determines whether or not the processing has been completed for all voxels on the axis of the target axis (step S160). That is, the control unit 20 determines whether or not the processing of steps S120 to S160 has been completed for all voxels on the axis line from the optical center side to the end point. If it is not determined in step S160 that the processing has been completed for all voxels on the axis of the axis of interest, the control unit 20 repeats the processing from step S120.

このようにしてステップS120以降の処理が繰り返されると、最終的には、ステップS125において、軸線の終了点であると判定される。この場合、制御部20は、着目ボクセルが、過去に空に設定されていたボクセルであるか否かを判定する(ステップS130)。すなわち、本実施形態においては、ステップS105〜S170のループ処理によってステップS105が実行されるたびに着目する撮影装置を変更する。このため、過去に、他の撮影装置の軸線について処理が行われている段階で、着目ボクセルが空に設定済である場合がある。   When the processing from step S120 onward is repeated in this manner, it is finally determined in step S125 that the end point of the axis is reached. In this case, the control unit 20 determines whether or not the target voxel is a voxel that was previously set to be empty (step S130). That is, in the present embodiment, the imaging device to which attention is paid is changed every time step S105 is executed by the loop processing of steps S105 to S170. For this reason, there is a case where the voxel of interest has already been set to be empty at the stage where the process is performed on the axis of another imaging apparatus.

そして、着目ボクセルが過去に空に設定済であるにもかかわらず、今回の処理で着目ボクセルに軸線の終了点が含まれる場合、今回の処理では当該終了点は表面と推定されるため、矛盾が生じていることになる。そこで、制御部20は、ステップS130において、着目ボクセルが、過去に空に設定されていたボクセルであるか否かを判定する。ステップS130において、着目ボクセルが、過去に空に設定されていたボクセルであると判定されなかった場合、制御部20は、着目ボクセルを表面に設定する(ステップS135)。   If the target voxel includes the end point of the axis line in this process even though the target voxel has been set to be empty in the past, the end point is estimated to be the surface in this process. Will have occurred. Therefore, in step S130, the control unit 20 determines whether or not the target voxel is a voxel that was previously set to be empty. If it is not determined in step S130 that the target voxel is a voxel that has been set to be empty in the past, the control unit 20 sets the target voxel on the surface (step S135).

図4Cに示す例において、着目する撮影装置に最初に設定された撮影装置が、光学中心Po1を有する撮影装置である場合を想定する。この場合において、軸線L1が着目軸線である場合、最初に着目ボクセルとなるボクセルはボクセルV11であり、ステップS125で軸線の終了点であると判定されず、ステップS145を経て空に設定される。この想定において、ステップS150で過去に表面に設定されていたと判定されるケースは発生しないため、ステップS120〜S160のループ処理により、軸線L1に沿って軸線の終了点の直前のボクセルV17まで空に設定される。 In the example illustrated in FIG. 4C, it is assumed that the first imaging device set as the imaging device of interest is the imaging device having the optical center Po 1 . In this case, when the axis L 1 is the target axis, the first voxel to be the target voxel is the voxel V 11 and is not determined to be the end point of the axis in step S125, and is set to empty through step S145. The In this assumption, since the case is determined to have been set on the surface in the past in step S150 does not occur, by the loop process of steps S120~S160, until voxels V 17 immediately before the end point of the axis along the axis L 1 Set to empty.

軸線L1の終了点Pe1が含まれるボクセルV18が着目ボクセルになると、制御部20は、ステップS125を経てステップS130の判定を行う。そして、ここでは、軸線L1を有する撮影装置が、最初に着目する撮影装置に設定された状態が想定されているため、ステップS130において、着目ボクセルが、過去に空に設定されていたボクセルであると判定されることはない。従って、制御部20は、ステップS135において、着目ボクセルV18を表面に設定する。図4Cにおいては、このような処理を経て、表面に設定されたボクセルを、太い実線の正方形によって示している。 When voxel V 18 to the end point Pe 1 axis L 1 is included is interest voxels, the control unit 20 performs the determination of step S130 through step S125. Here, since it is assumed that the imaging device having the axis L 1 is set to the imaging device to which attention is first focused, in step S130, the attention voxel is a voxel that has been previously set to be empty. It is never determined to be. Accordingly, the control unit 20, in step S135, sets the focus voxel V 18 to the surface. In FIG. 4C, voxels set on the surface after such processing are indicated by thick solid squares.

なお、ステップS160において、着目軸線の軸線上の全てのボクセルについて処理が終了したと判定されると、制御部20は、全ての画素について処理が終了したか否かを判定する(ステップS165)。すなわち、着目する撮影装置が備える2次元センサーの全ての画素についてステップS110〜S160の処理が終了するまで、着目画素および着目軸線を変更して処理を繰り返す。この結果、異なる軸線のそれぞれについて軸線沿いのボクセルが空または表面に設定される。このため、図4Cに示された例であれば、4個の軸線沿いのボクセルが空に設定され、軸線の終了点が含まれるボクセルが表面(太い実線の正方形)に設定された状態となる。   If it is determined in step S160 that the process has been completed for all voxels on the axis of the target axis, the control unit 20 determines whether the process has been completed for all pixels (step S165). That is, the processing is repeated by changing the pixel of interest and the axis of interest until the processing of steps S110 to S160 is completed for all the pixels of the two-dimensional sensor included in the imaging device of interest. As a result, voxels along the axis are set to empty or surface for each of the different axes. Therefore, in the example shown in FIG. 4C, the voxels along the four axis lines are set to be empty, and the voxel including the end point of the axis line is set to the surface (thick solid line square). .

そして、着目する撮影装置が備える2次元センサーの全ての画素についてステップS110〜S160の処理が終了すると、ステップS165において、全ての画素について処理が終了したと判定される。この場合、制御部20は、全ての撮影装置についてステップS105〜S165の処理が終了したか否かを判定する(ステップS170)。すなわち、制御部20は、撮影装置40−1〜40−Nの全てについてステップS105〜S165の処理が終了するまで、着目する撮影装置を変更して処理を繰り返す。   Then, when the processing of steps S110 to S160 is completed for all the pixels of the two-dimensional sensor included in the imaging device of interest, it is determined in step S165 that the processing is completed for all the pixels. In this case, the control unit 20 determines whether or not the processing in steps S105 to S165 has been completed for all the imaging devices (step S170). That is, the control unit 20 changes the imaging device of interest and repeats the process until the processing of steps S105 to S165 is completed for all of the imaging devices 40-1 to 40-N.

着目する撮影装置が1回でも変化すると、ステップS130において、着目ボクセルが、過去に空に設定されていたボクセルであると判定されるケースや、ステップS150において、着目ボクセルが、過去に表面に設定されていたボクセルであると判定されるケースが発生する。図4Dは、図4Aと同様の例において、図4B、4Cのように光学中心Po1を有する撮影装置が着目する撮影装置となって処理が行われた後、光学中心Po2を有する撮影装置が着目する撮影装置として処理が行われる場合の例である。 When the imaging device to be noticed changes even once, in step S130, it is determined that the noticed voxel is a voxel that was previously set to be empty, or in step S150, the noticed voxel is set to the surface in the past. In some cases, it is determined that the voxel has been used. FIG. 4D is an example similar to FIG. 4A, and the imaging apparatus having the optical center Po 2 is processed after the imaging apparatus having the optical center Po 1 becomes a focused imaging apparatus as shown in FIGS. 4B and 4C. This is an example in the case where processing is performed as an imaging device to which attention is focused.

この例において、軸線L21が着目軸線となった場合を想定する。この場合、ボクセルV21,V22が順次着目ボクセルとなり、着目ボクセルが順次空に設定されていく。この場合において、軸線L21に沿って着目ボクセルを変化させながらループ処理が進んでいくと、最終的には、軸線L21の終了点が含まれるボクセルV29が着目ボクセルになる。この場合においては、ステップS125の判定を経て、ステップS130の判定が行われる。そして、着目ボクセルV29は、軸線L1に関する処理の過程で空のボクセルに設定されているため、制御部20は、ステップS130において、着目ボクセルが、過去に空に設定されていたボクセルであると判定する。 In this example, it is assumed that the axis L 21 has become focused axis. In this case, the voxels V 21 and V 22 are sequentially set as the target voxel, and the target voxel is sequentially set to be empty. In this case, when the loop process proceeds while changing the target voxel along the axis L 21 , finally, the voxel V 29 including the end point of the axis L 21 becomes the target voxel. In this case, the determination in step S130 is performed after the determination in step S125. Then, since the target voxel V 29 is set as an empty voxel in the process of the axis L 1 , the control unit 20 is the voxel in which the target voxel has been set to empty in the past in step S130. Is determined.

ステップS130において、着目ボクセルが、過去に空に設定されていたボクセルであると判定された場合、制御部20は、着目ボクセルを空に設定し、着目軸線を再計算対象に設定する(ステップS140)。上述の例においては、制御部20は、着目ボクセルV29を空に設定する。さらに、制御部20は、着目軸線L21を再計算対象に設定する。 When it is determined in step S130 that the target voxel is a voxel that has been set to be empty in the past, the control unit 20 sets the target voxel to be empty and sets the target axis to be recalculated (step S140). ). In the above example, the control unit 20 sets the target voxel V 29 to be empty. Furthermore, the control unit 20 sets the target axis L 21 as a recalculation target.

一方、図4Dに示す例において、軸線L22が着目軸線となった場合を想定する。図5Aは、この場合のボクセルの属性等を示す図である。軸線L22が着目軸線となった場合、ボクセルV210,V211が順次着目ボクセルとなり、着目ボクセルが順次空に設定されていく。この場合において、軸線L22に沿って着目ボクセルを変化させながらループ処理が進み、ボクセルV213が着目ボクセルになった場合を想定する。この場合においては、ステップS125の判定を経て、ステップS145で着目ボクセルV213が空に設定され、さらに、ステップS150の判定が行われる。 On the other hand, in the example shown in FIG. 4D, it is assumed that the axis L 22 becomes focused axis. FIG. 5A is a diagram showing voxel attributes and the like in this case. When the axis L 22 becomes the target axis, the voxels V 210 and V 211 are sequentially the target voxels, and the target voxels are sequentially set to be empty. In this case, it is assumed that the loop process proceeds while changing the target voxel along the axis L 22 and the voxel V 213 becomes the target voxel. In this case, after the determination in step S125, the target voxel V213 is set to be empty in step S145, and further, the determination in step S150 is performed.

そして、着目ボクセルV213は、軸線L12が着目軸線となった状態での処理の過程で表面のボクセルに設定されている(例えば、図4D参照)ため、制御部20は、ステップS150において、着目ボクセルが、過去に表面に設定されていたボクセルであると判定する。ステップS150において、着目ボクセルが、過去に表面に設定されていたボクセルであると判定された場合、制御部20は、制御部20は、着目ボクセルが表面に設定された際の着目軸線を再計算対象に設定する(ステップS155)。すなわち、図5Aに示す例であれば、制御部20は、軸線L12を再計算対象に設定する。この後、制御部20は、ステップS120〜S160の処理を行い、ステップS135において、着目軸線L22の終了点が含まれるボクセルV214を表面に設定する。 The target voxel V 213 is set as a voxel on the surface in the process of processing in a state where the axis L 12 becomes the target axis (see, for example, FIG. 4D). It is determined that the target voxel is a voxel that has been set on the surface in the past. When it is determined in step S150 that the target voxel is a voxel that has been set on the surface in the past, the control unit 20 recalculates the axis of interest when the target voxel is set on the surface. The target is set (step S155). That is, in the example shown in FIG. 5A, the control unit 20 sets the axis L 12 in the recalculation. Thereafter, the control unit 20 performs steps S120~S160, in step S135, sets the voxel V 214 that contains the end point of the target axis L 22 in the surface.

さらに、図5Aに示す例において、制御部20は、着目する撮影装置が備える全ての画素について処理が終了するまでステップS110〜S160の処理を繰り返す。この結果、図5Aで実線にて示す異なる軸線のそれぞれについて軸線沿いのボクセルが空または表面に設定される。図5Aにおいては、各軸線についての処理によって設定された空または表面を、白抜きの細い実線の正方形または白抜きの太い実線の正方形で示している。   Furthermore, in the example illustrated in FIG. 5A, the control unit 20 repeats the processes in steps S <b> 110 to S <b> 160 until the process is completed for all the pixels included in the imaging device of interest. As a result, the voxels along the axis are set to the sky or the surface for each of the different axes indicated by the solid line in FIG. 5A. In FIG. 5A, the sky or the surface set by the processing for each axis is indicated by a white thin solid line square or a white thick solid line square.

ステップS170において、全ての撮影装置についてステップS105〜S165の処理が終了したと判定されると、制御部20は、再計算対象の軸線から着目軸線を選択する(ステップS175)。すなわち、ステップS175〜S190のループ処理では、ステップS105〜S170のループ処理によって再計算対象とされた軸線から、ステップS175〜S190のループ処理の処理対象となっていない軸線を1個選択し、着目軸線とする。   If it is determined in step S170 that the processing in steps S105 to S165 has been completed for all the imaging devices, the control unit 20 selects a target axis line from the recalculated axis lines (step S175). That is, in the loop processing of steps S175 to S190, one axis that is not the processing target of the loop processing of steps S175 to S190 is selected from the axis that is the target of recalculation by the loop processing of steps S105 to S170. Axis line.

次に、制御部20は、着目軸線を最も近い表面まで延長する(ステップS180)。本実施形態において制御部20は、着目軸線を光学中心の逆側に向けて(撮影対象の内側に向けて)延長し、最初に表面に達した場合に延長を終了する。なお、ここで、延長後の着目軸線が表面に達したか否かを判定する対象となる表面は、表面に設定されたボクセルでなくても良い。例えば、同一の撮影装置で撮影された奥行きデータに基づいて設定された表面ボクセルの間のボクセルを表面と見なすような補間処理を行い、補間処理によって得られた表面も、延長後の着目軸線が表面に達したか否かを判定する対象に加えてもよい。図5Bは、図5Aに示す例においてステップS175以降の処理が実行された場合の例を示す図であり、同図5Bに示す例であれば、例えば、光学中心Po2から延びる軸線によって表面に設定されたボクセルVs1,Vs2の間のボクセルVs3を表面と見なす構成等を採用可能である。 Next, the control unit 20 extends the axis of interest to the nearest surface (step S180). In the present embodiment, the control unit 20 extends the axis of interest toward the opposite side of the optical center (inward of the object to be imaged), and ends the extension when it first reaches the surface. Here, the surface that is the target for determining whether or not the extended axis of interest has reached the surface may not be a voxel set on the surface. For example, an interpolation process is performed such that a voxel between surface voxels set based on depth data captured by the same imaging apparatus is regarded as a surface, and the surface obtained by the interpolation process also has an extended axis of interest. You may add to the object which determines whether the surface has been reached. Figure 5B is a diagram showing an example of a case where step S175 and subsequent steps is executed in the example shown in FIG. 5A, in the example shown in FIG. 5B, for example, to the surface by an axis extending from the optical center Po 2 A configuration in which the voxel Vs 3 between the set voxels Vs 1 and Vs 2 is regarded as the surface can be adopted.

このように、ボクセルVs3が表面と見なされた状態において、再計算対象とされた軸線L12がステップS175〜S190のループ処理における着目軸線である場合、制御部20は、図5Bに示すように、軸線L12の端点をボクセルVs3内の位置まで延長する。一方、再計算対象とされた軸線L21がステップS175〜S190のループ処理における着目軸線である場合、制御部20は、軸線L21の端点を過去に表面に設定されたボクセルVm2内の位置まで延長する。 As described above, in a state where the voxel Vs 3 is regarded as the surface, when the axis L 12 to be recalculated is the axis of interest in the loop processing in steps S175 to S190, the control unit 20 as shown in FIG. 5B. Then, the end point of the axis L 12 is extended to a position in the voxel Vs 3 . On the other hand, if the axis L 21 which is a recalculation is focused axis in the loop process of steps S175~S190, the control unit 20, the position of the voxel Vm in 2 set on the surface of the end points of the axis L 21 in the past To extend.

次に、制御部20は、着目軸線に対応する奥行き値を、延長後の軸線の端点に応じた奥行き値に修正する(ステップS185)。例えば、軸線L12が着目軸線である場合、延長後の軸線の端点がボクセルVs3に存在するため、制御部20は、当該軸線の端点を示す奥行き値(光学中心から端点までの距離)を新たな奥行き値とし、軸線L12が通る画素についての奥行き値を修正する。軸線L21が着目軸線である場合、延長後の軸線の端点がボクセルVm2に存在するため、制御部20は、当該軸線の端点を示す奥行き値(光学中心から端点までの距離)を新たな奥行き値とし、軸線L21が通る画素についての奥行き値を修正する。 Next, the control unit 20 corrects the depth value corresponding to the target axis line to a depth value corresponding to the end point of the extended axis line (step S185). For example, when the axis L 12 is the axis of interest, since the end point of the extended axis exists in the voxel Vs 3 , the control unit 20 sets the depth value (distance from the optical center to the end point) indicating the end of the axis. as a new depth value to correct the depth value for the pixel to the axis L 12 passes. When the axis L 21 is the axis of interest, since the end point of the extended axis exists in the voxel Vm 2 , the control unit 20 newly sets the depth value (distance from the optical center to the end point) indicating the end of the axis. The depth value is corrected for the pixel through which the axis L 21 passes.

修正が行われると、制御部20は、全ての再計算対象について処理が終了したか否かを判定し(ステップS190)、全ての再計算対象について処理が終了したと判定されるまでステップS175以降の処理を繰り返す。一方、ステップS190において、全ての再計算対象について処理が終了したと判定されると、制御部20は、調整処理を終了する。以上のような調整処理によって奥行き値の修正が行われると、修正後の奥行き値に基づいて、3次元モデル生成部21cの処理によって制御部20が表面のボクセルを設定することにより、軸線L12に基づいてボクセルVs3が表面に設定され、軸線L21に基づいてボクセルVm2が表面に設定されることになる。従って、図5Bの修正を経た後においては、図5Cに示す太線の正方形によって表面が特定され、3次元モデルが生成されることになる。従って、図5Cにおいて破線で示されるボクセルは表面と見なされず、奥行き値の誤差に起因する表面の矛盾が解消された状態で3次元モデルを生成すること可能になる。 When the correction is made, the control unit 20 determines whether or not the processing has been completed for all the recalculation targets (step S190), and after step S175 until it is determined that the processing has been completed for all the recalculation targets. Repeat the process. On the other hand, when it is determined in step S190 that the process has been completed for all recalculation targets, the control unit 20 ends the adjustment process. When the depth value is corrected by the adjustment processing as described above, the control unit 20 sets the surface voxels by the processing of the three-dimensional model generation unit 21c based on the corrected depth value, whereby the axis L 12 The voxel Vs 3 is set on the surface based on the above, and the voxel Vm 2 is set on the surface based on the axis L 21 . Therefore, after the correction of FIG. 5B, the surface is specified by the thick square shown in FIG. 5C, and a three-dimensional model is generated. Therefore, the voxel indicated by the broken line in FIG. 5C is not regarded as a surface, and a three-dimensional model can be generated in a state where the surface contradiction caused by the error in the depth value is eliminated.

(3)他の実施形態:
以上の実施形態は本発明を実施するための一例であり、複数の撮影装置の奥行きデータに基づいて、奥行きデータが示す奥行きを調整する限りにおいて、他にも種々の実施形態を採用可能である。例えば、コンピューター10は、通信回線等で接続された複数の装置から構成されても良く、奥行きデータ取得部21a、奥行き調整部21b、3次元モデル生成部21cの一部を備える複数の装置が構成されても良い。むろん、他の構成、例えば、3次元モデルや動画が視認されるディスプレイや視認のための制御を行うコンピューターが他の装置によって構成されても良い。
(3) Other embodiments:
The above embodiment is an example for carrying out the present invention, and various other embodiments can be adopted as long as the depth indicated by the depth data is adjusted based on the depth data of a plurality of photographing apparatuses. . For example, the computer 10 may be composed of a plurality of devices connected by a communication line or the like, and a plurality of devices including a part of the depth data acquisition unit 21a, the depth adjustment unit 21b, and the three-dimensional model generation unit 21c. May be. Of course, other configurations, for example, a display on which a three-dimensional model or a moving image is visually recognized, or a computer that performs control for visual recognition may be configured by other devices.

10…コンピューター、20…制御部、21…3次元モデル生成プログラム、21a…データ取得部、21b…奥行き調整部、21c…3次元モデル生成部、30…記録媒体、30a…撮影データ、30b…3次元モデルデータ、40−1〜40−N…撮影装置 DESCRIPTION OF SYMBOLS 10 ... Computer, 20 ... Control part, 21 ... Three-dimensional model generation program, 21a ... Data acquisition part, 21b ... Depth adjustment part, 21c ... Three-dimensional model generation part, 30 ... Recording medium, 30a ... Shooting data, 30b ... 3 Dimensional model data, 40-1 to 40-N ... photographing apparatus

Claims (6)

撮影シーンを撮影して当該撮影シーンの奥行きを示す奥行きデータを取得する、異なる複数の位置に設置された複数の撮影装置と、
複数の前記撮影装置から前記奥行きデータを取得する奥行きデータ取得部と、
複数の前記撮影装置の前記奥行きデータに基づいて、前記奥行きデータが示す奥行きを調整する奥行き調整部と、
奥行きが調整された前記奥行きデータに基づいて撮影対象の3次元モデルを生成する3次元モデル生成部と、
を備える3次元モデル生成システム。
A plurality of photographing devices installed at a plurality of different positions for photographing a photographing scene and obtaining depth data indicating the depth of the photographing scene;
A depth data acquisition unit for acquiring the depth data from a plurality of the imaging devices;
A depth adjusting unit that adjusts the depth indicated by the depth data based on the depth data of a plurality of the imaging devices;
A three-dimensional model generation unit that generates a three-dimensional model to be imaged based on the depth data whose depth has been adjusted;
A three-dimensional model generation system comprising:
前記奥行き調整部は、
複数の前記撮影装置の前記奥行きデータに矛盾が生じている場合に、矛盾が生じている奥行きの一方を、異なる前記撮影装置から取得された奥行きに一致するように調整する、
請求項1に記載の3次元モデル生成システム。
The depth adjuster is
If there is a contradiction in the depth data of a plurality of the photographing devices, one of the depths where the contradiction occurs is adjusted to match the depth acquired from the different photographing devices;
The three-dimensional model generation system according to claim 1.
前記奥行き調整部は、
前記撮影装置が備える2次元センサーの各画素に対して前記撮影シーンから入力する光の方向を示す軸線に沿って、前記奥行きを調整する、
請求項1または請求項2のいずれかに記載の3次元モデル生成システム。
The depth adjuster is
Adjusting the depth along an axis indicating a direction of light input from the shooting scene with respect to each pixel of a two-dimensional sensor included in the shooting device;
The three-dimensional model generation system according to claim 1 or 2.
前記奥行き調整部は、
前記撮影シーンにボクセルを設定するとともに、複数の前記撮影装置の前記奥行きデータのそれぞれに基づいて、前記撮影装置の基準点から前記軸線に沿って前記奥行きだけ離れた前記ボクセルを前記撮影対象の表面と見なす処理を行い、
同一の前記軸線上に位置が異なる複数の表面が存在する場合、一方の前記表面を前記軸線に沿って他の表面上に移動させるように奥行きを調整する、
請求項3に記載の3次元モデル生成システム。
The depth adjuster is
The voxel is set in the shooting scene, and the voxel that is separated from the reference point of the shooting device by the depth along the axis is set on the surface of the shooting target based on each of the depth data of the plurality of shooting devices. Process
When there are a plurality of surfaces with different positions on the same axis, the depth is adjusted so that one of the surfaces moves along the axis onto the other surface.
The three-dimensional model generation system according to claim 3.
撮影シーンの奥行きを示す奥行きデータを、設置位置が異なる複数の撮影装置のそれぞれから取得する奥行きデータ取得部と、
複数の前記撮影装置の前記奥行きデータに基づいて、前記奥行きデータが示す奥行きを調整する奥行き調整部と、
奥行きが調整された前記奥行きデータに基づいて撮影対象の3次元モデルを生成する3次元モデル生成部と、
を備える3次元モデル生成装置。
A depth data acquisition unit that acquires depth data indicating the depth of the shooting scene from each of a plurality of imaging devices having different installation positions;
A depth adjusting unit that adjusts the depth indicated by the depth data based on the depth data of a plurality of the imaging devices;
A three-dimensional model generation unit that generates a three-dimensional model to be imaged based on the depth data whose depth has been adjusted;
A three-dimensional model generation device comprising:
撮影シーンの奥行きを示す奥行きデータを、設置位置が異なる複数の撮影装置のそれぞれから取得する奥行きデータ取得工程と、
複数の前記撮影装置の前記奥行きデータに基づいて、前記奥行きデータが示す奥行きを調整する奥行き調整工程と、
奥行きが調整された前記奥行きデータに基づいて撮影対象の3次元モデルを生成する3次元モデル生成工程と、
を含む3次元モデル生成方法。
Depth data acquisition step of acquiring depth data indicating the depth of the shooting scene from each of a plurality of shooting devices having different installation positions;
A depth adjustment step of adjusting the depth indicated by the depth data based on the depth data of a plurality of the imaging devices;
A three-dimensional model generation step of generating a three-dimensional model to be imaged based on the depth data whose depth has been adjusted;
A three-dimensional model generation method including:
JP2015037889A 2015-02-27 2015-02-27 Three-dimensional model generation system, three-dimensional model generation apparatus, and three-dimensional model generation method Pending JP2016162034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015037889A JP2016162034A (en) 2015-02-27 2015-02-27 Three-dimensional model generation system, three-dimensional model generation apparatus, and three-dimensional model generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015037889A JP2016162034A (en) 2015-02-27 2015-02-27 Three-dimensional model generation system, three-dimensional model generation apparatus, and three-dimensional model generation method

Publications (1)

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

Family

ID=56847087

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015037889A Pending JP2016162034A (en) 2015-02-27 2015-02-27 Three-dimensional model generation system, three-dimensional model generation apparatus, and three-dimensional model generation method

Country Status (1)

Country Link
JP (1) JP2016162034A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019197523A (en) * 2018-05-07 2019-11-14 キヤノン株式会社 Information processing apparatus, control method of the same and program
JP7353527B2 (en) 2018-05-07 2023-09-29 キヤノン株式会社 Information processing device, control method and program for information processing device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019197523A (en) * 2018-05-07 2019-11-14 キヤノン株式会社 Information processing apparatus, control method of the same and program
JP7265825B2 (en) 2018-05-07 2023-04-27 キヤノン株式会社 Generation device, generation method and program
JP7353527B2 (en) 2018-05-07 2023-09-29 キヤノン株式会社 Information processing device, control method and program for information processing device

Similar Documents

Publication Publication Date Title
CN106454291B (en) System and method for automatic registration and projection mapping
JP6394005B2 (en) Projection image correction apparatus, method and program for correcting original image to be projected
JP6363863B2 (en) Information processing apparatus and information processing method
KR101626072B1 (en) Method and Apparatus for Compensating Image
JP6883608B2 (en) Depth data processing system that can optimize depth data by aligning images with respect to depth maps
WO2020191109A1 (en) System and method for virtual modeling of indoor scenes from imagery
US20170026592A1 (en) Automatic lens flare detection and correction for light-field images
EP3373251A1 (en) Scan colorization with an uncalibrated camera
KR20150050450A (en) Method and apparatus for generating depth map of a scene
JP6577703B2 (en) Image processing apparatus, image processing method, program, and storage medium
KR20110116325A (en) Image processing apparatus and method
US8922627B2 (en) Image processing device, image processing method and imaging device
KR101842141B1 (en) 3 dimensional scanning apparatus and method therefor
GB2565354A (en) Method and corresponding device for generating a point cloud representing a 3D object
CN113643342A (en) Image processing method and device, electronic equipment and storage medium
CN106683133B (en) Method for obtaining target depth image
JP2016162034A (en) Three-dimensional model generation system, three-dimensional model generation apparatus, and three-dimensional model generation method
JP5071866B2 (en) Distance measuring device, method and program
JP6395429B2 (en) Image processing apparatus, control method thereof, and storage medium
CN117058183A (en) Image processing method and device based on double cameras, electronic equipment and storage medium
KR102538685B1 (en) Method and apparatus for restoring 3d information using multi-view information
JP6369897B2 (en) Self-position calculation device and self-position calculation method
JP2007315777A (en) Three-dimensional shape measurement system
JP6991700B2 (en) Information processing equipment, information processing method, program
KR101817756B1 (en) PTM making system based on 3D model with interactive viewpoint control and method using the same