JP2019114226A - Program, system, electronic device and method for enabling solid to be recognized - Google Patents
Program, system, electronic device and method for enabling solid to be recognized Download PDFInfo
- Publication number
- JP2019114226A JP2019114226A JP2018129249A JP2018129249A JP2019114226A JP 2019114226 A JP2019114226 A JP 2019114226A JP 2018129249 A JP2018129249 A JP 2018129249A JP 2018129249 A JP2018129249 A JP 2018129249A JP 2019114226 A JP2019114226 A JP 2019114226A
- Authority
- JP
- Japan
- Prior art keywords
- query
- component
- data
- parts
- database
- 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
Links
Images
Abstract
Description
本発明は、立体を認識するためのプログラム、システム、電子装置、及び方法に関し、特に予め定められた複数の部品より構成される実空間における立体を認識するためのプログラム、システム、電子装置、及び方法に関する。 The present invention relates to a program, a system, an electronic device, and a method for recognizing a solid, and in particular, a program, a system, an electronic device, and a program for recognizing a solid in a real space composed of a plurality of predetermined parts. On the way.
撮影された平面画像から、現実空間の3次元物体の立体形状を認識する技術が知られている。しかし、立体形状を平面に投影すると、奥行きや隠れ面についての立体的な情報が失われるため、単一の平面画像から立体形状を直接認識することはできない。従来、異なる視点から撮影された複数の画像の対応付けを行うことで立体情報を帰納的に推定して形状認識する技術や、特定の構造物を対象として対象の事前知識から立体情報を演繹的に推定して形状認識する技術が開発されてきた。 There is known a technique for recognizing the three-dimensional shape of a three-dimensional object in real space from a photographed planar image. However, when a solid shape is projected onto a plane, the solid shape can not be directly recognized from a single plane image because solid information on depth and hidden surface is lost. Conventionally, a technique for shape estimation by inductively estimating three-dimensional information by correlating a plurality of images captured from different viewpoints, and deducing three-dimensional information from a priori knowledge of a target for a specific structure Techniques have been developed to estimate shape recognition.
例えば非特許文献1には、Structure from Motion(SfM)と呼ばれる技術を用いて、複数の画像の対応付けによって形状認識する技術が開示されている。また例えば非特許文献2には、単一の画像を入力とし、人体・表情等特定の対象を仮定して形状認識する技術が開示されている。当該技術は、人間の表情が大域的には似ていて局所的な違いが多くあるということに注目し、既存の3Dモデルを変形させることで、入力画像に対応する3Dモデルを構築するものである。
For example, Non-Patent
しかしながら、非特許文献1が開示する技術は、ユーザが複数回の撮影を行うか、又は複数台のカメラを用いて撮影を行う必要があり、ユーザ操作が複雑化する。また、非特許文献2が開示する技術は、構造物が既知であることを前提とするため、ユーザが自由に作成するような構造物の認識には適用することができない。このように、自由な形状の構造物を対象とした、単一の平面画像からの立体形状認識技術は、有効なものが未だ確立されていない。
However, in the technique disclosed in Non-Patent
本発明は、このような課題を解決するためになされたものであり、単一の画像から立体形状を認識することが可能なプログラム等を提供することを主目的とする。 The present invention has been made to solve such problems, and its main object is to provide a program and the like capable of recognizing a three-dimensional shape from a single image.
上記の目的を達成するために、本発明の一態様としてのプログラムは、予め定められた複数の部品より構成される実空間における立体を認識するためのプログラムであって、該プログラムは該立体を撮影するための撮影装置を備える電子装置において実行されるものであり、該電子装置に、前記撮影装置により撮影された画像から各部品を識別可能な特徴をそれぞれ抽出し、該特徴に基づいて部品のそれぞれのID及び該部品の位置データを取得する画像認識ステップと、前記特徴に基づいて取得された部品のそれぞれのIDを含むクエリを生成するクエリ生成ステップと、クエリが生成された場合、該クエリを用いて、各部品のID、各部品の3次元モデル、及び各部品間の接合制約条件を示す制約データを関連付けて記憶する部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを取得するデータ取得ステップと、前記取得された部品それぞれの位置データ、3次元モデル、及び制約データに基づいて前記実空間と対応させた仮想空間に各部品を配置する部品配置ステップと、前記配置された各部品の位置関係に基づいて、前記配置された各部品の位置の整合性を判定する整合性判定ステップと、前記整合性が有ると判定された場合、前記配置された各部品の位置に基づいて立体を認識する立体認識ステップと、前記整合性が無いと判定された場合、前記データ取得ステップにおいて用いたクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを履歴データベースに記憶するデータベース記憶ステップと、前記履歴データベースが記憶するクエリ保存用データ及び前記部品データベースが記憶するデータに基づいて、クエリを再生成するか否かを決定するクエリ再生成決定ステップと、クエリを再生成すると決定された場合、前記履歴データベースが記憶するクエリ保存用データと異なるデータを含むクエリを生成するクエリ再生成ステップと、を実行させることを特徴とする。 In order to achieve the above object, a program as an aspect of the present invention is a program for recognizing a solid in a real space composed of a plurality of predetermined parts, the program comprising the solid This method is executed in an electronic device provided with a photographing device for photographing, and the electronic device extracts features capable of identifying each component from the image photographed by the photographing device, and the component is calculated based on the characteristic An image recognition step of acquiring each ID of the part and position data of the part, a query generation step of generating a query including each ID of the part acquired based on the feature, and a query is generated, Component data that associates and stores the ID of each component, the three-dimensional model of each component, and the constraint data indicating the bonding constraint between each component using a query From the data acquisition step of acquiring three-dimensional models and constraint data of each of the parts associated with each of the IDs included in the query, and position data, three-dimensional models, and restriction data of each of the acquired parts. Alignment based on the component arrangement step of arranging each component in the virtual space corresponding to the real space based on the positional relationship of the arranged components, the alignment of the positions of the arranged components is determined Data determination step, and if it is determined that the consistency is present, if it is determined that the 3D recognition step to recognize a solid based on the position of each of the arranged parts, and if the consistency is not present, the data acquisition A database storage unit for storing, in a history database, query storage data including at least the ID of each component among the queries used in the step A query regeneration determination step of deciding whether to regenerate a query based on the query storage data stored in the history database and the data stored in the component database, and the query is determined to be regenerated And a query regenerating step of generating a query including data different from the query storage data stored in the history database.
また、本発明において好ましくは、前記プログラムは、前記電子装置に、前記画像認識ステップの前に、前記履歴データベースが記憶するクエリ保存用データを消去するデータベース初期化ステップを実行させる。 In the present invention, preferably, the program causes the electronic device to execute a database initialization step of deleting data for storing query stored in the history database before the image recognition step.
また、本発明において好ましくは、前記部品配置ステップは、前記取得された部品それぞれの位置データ及び3次元モデルを用いて前記仮想空間に各部品を配置し、前記仮想空間上における隣接する部品のそれぞれにおいて、前記接合制約条件を満たすように各部品の位置を調整して配置する。 In the present invention, preferably, the component placement step places each component in the virtual space using the acquired position data of each component and a three-dimensional model, and each of the adjacent components in the virtual space In the above, the position of each part is adjusted and arranged so as to satisfy the joining constraint.
また、本発明において好ましくは、前記部品配置ステップは、前記仮想空間上に配置された部品のうちの2つの部品の3次元モデル間の長さが所定値以内であるか否かに基づいて2つの部品が隣接するか否かを判定する。 In the present invention, preferably, the component placement step is performed based on whether or not the length between three-dimensional models of two components of the components disposed in the virtual space is within a predetermined value. It is determined whether or not two parts are adjacent.
また、本発明において好ましくは、前記位置は6自由度位置である。 In the present invention, preferably, the position is a position with six degrees of freedom.
また、本発明において好ましくは、各部品を識別可能な前記特徴は、各部品が部品表面に有するARマーカである。 In the present invention, preferably, the feature that can identify each part is an AR marker that each part has on the part surface.
また、本発明において好ましくは、前記データ取得ステップは、クエリが生成された場合、該クエリを用いて、前記部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを、該IDに対応付けて該クエリにそれぞれ加えることにより取得する。 In the present invention, preferably, when the query is generated, the data acquisition step uses the query to generate a three-dimensional model of each of the components associated with each of the IDs included in the query from the component database and Constraint data is acquired by being associated with the ID and added to the query.
また、本発明において好ましくは、前記整合性判定ステップは、前記配置された各部品の3次元モデルが占める領域の重複度合いに基づいて、前記配置された各部品の位置の整合性を判定する。 In the present invention, preferably, the consistency determination step determines the consistency of the positions of the arranged parts based on the overlapping degree of the area occupied by the three-dimensional model of the arranged parts.
また、本発明において好ましくは、前記画像認識ステップは、前記撮影装置により撮影された画像から前記立体のベース部分を形成するベース部を認識し、前記部品配置ステップは、該ベース部を前記仮想空間上に配置し、前記整合性判定ステップは、前記配置された各部品の位置と前記ベース部の位置との位置関係から前記配置された各部品が重力に従った配置であるか否かを判定し、該判定に更に基づいて整合性を判定する。 In the present invention, preferably, the image recognition step recognizes a base portion that forms the base portion of the solid from the image captured by the imaging device, and the component placement step includes the base portion in the virtual space. The arrangement is performed on the upper side, and the consistency determination step determines whether or not the arranged parts are arranged according to gravity from the positional relationship between the positions of the arranged parts and the position of the base portion. And determine consistency based further on the determination.
また、本発明において好ましくは、前記整合性判定ステップは、前記撮影装置により撮影された画像と、前記配置された各部品の、前記撮影装置の位置に対応する前記仮想空間の位置に配置された仮想カメラから見た画像との一致度に基づいて整合性を判定する。 Furthermore, in the present invention, preferably, the consistency determination step is arranged at the position of the virtual space corresponding to the position of the image pickup device of the image photographed by the image pickup device and each component arranged. Consistency is determined based on the degree of coincidence with the image viewed from the virtual camera.
また、本発明において好ましくは、前記データベース記憶ステップは、前記クエリ保存用データが含む部品それぞれのIDに関連付けて、前記配置された各部品の位置を前記履歴データベースに更に記憶する。 In the present invention, preferably, the database storage step further stores the position of each of the arranged parts in the history database in association with the ID of each of the parts included in the query storage data.
また、本発明において好ましくは、前記クエリ再生成決定ステップは、前記履歴データベースが記憶するクエリ保存用データが、前記部品データベースが記憶する部品のIDの所定の組み合わせを含むか否かに基づいて、クエリを再生成するか否かを決定する。 In the present invention, preferably, the query regeneration determination step is performed based on whether or not the query storage data stored in the history database includes a predetermined combination of component IDs stored in the component database. Decide whether to regenerate the query.
また、本発明において好ましくは、前記プログラムは、前記電子装置に、クエリを再生成しないと決定された場合、エラーを出力するエラー出力ステップを更に実行させる。 In the present invention, preferably, the program causes the electronic device to further execute an error output step of outputting an error if it is determined not to regenerate the query.
また、本発明において好ましくは、前記データベース記憶ステップは、前記クエリ保存用データが含む部品それぞれのIDに関連付けて、前記配置された各部品の位置の整合性の評価値を前記履歴データベースに更に記憶する。 In the present invention, preferably, the database storage step further stores, in the history database, an evaluation value of the consistency of the position of each of the arranged parts in association with the ID of each of the parts included in the query storage data. Do.
また、本発明において好ましくは、前記プログラムは、前記電子装置に、クエリを再生成しないと決定された場合、前記評価値により最も高い整合性を有する前記配置された各部品の位置に基づいて立体を認識する第2の立体認識ステップを実行させる。 In the present invention, preferably, when it is determined that the program does not regenerate a query in the electronic device, the program is three-dimensional based on the positions of the arranged parts having the highest consistency with the evaluation value. To perform a second three-dimensional recognition step of recognizing
また、本発明において好ましくは、前記クエリ再生成ステップは、前記仮想空間上に配置された部品のうちの2つの部品の3次元モデル間の長さが所定値以上である場合、該長さに対応する部品のIDを追加したクエリを生成する。 In the present invention, preferably, in the query regenerating step, when a length between three-dimensional models of two parts of the parts arranged in the virtual space is a predetermined value or more, Generate a query with the corresponding part ID added.
また、上記の目的を達成するために、本発明の一態様としての立体認識システムは、予め定められた複数の部品より構成される実空間における立体を認識するための立体認識システムであって、前記立体を撮影するための撮影装置を備える電子装置と、各部品のID、各部品の3次元モデル、及び各部品間の接合制約条件を示す制約データを関連付けて記憶する部品データベースと、前記部品データベースに入力されるクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを記憶する履歴データベースと、前記撮影装置により撮影された画像から各部品を識別可能な特徴をそれぞれ抽出し、該特徴に基づいて部品のそれぞれのID及び該部品の位置データを取得する画像認識部と、前記特徴に基づいて取得された部品のそれぞれのIDを含むクエリを生成するクエリ生成部と、クエリが生成された場合、該クエリを用いて、前記部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを取得するデータ取得部と、前記取得された部品それぞれの位置データ、3次元モデル、及び制約データに基づいて前記実空間と対応させた仮想空間に各部品を配置する部品配置部と、前記配置された各部品の位置関係に基づいて、前記配置された各部品の位置の整合性を判定する整合性判定部と、前記整合性が有ると判定された場合、前記配置された各部品の位置に基づいて立体を認識する立体認識部と、前記整合性が無いと判定された場合、前記データ取得部が用いたクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを前記履歴データベースに記憶するデータベース記憶部と、前記履歴データベースが記憶するクエリ保存用データ及び前記部品データベースが記憶するデータに基づいて、クエリを再生成するか否かを決定するクエリ再生成決定部と、クエリを再生成すると決定された場合、前記履歴データベースが記憶するクエリ保存用データとは異なるデータを含むクエリを生成するクエリ再生成部と、を備えることを特徴とする。 Further, in order to achieve the above object, a three-dimensional recognition system as one aspect of the present invention is a three-dimensional recognition system for recognizing a three-dimensional object in a real space composed of a plurality of predetermined parts, An electronic apparatus comprising an imaging device for photographing the solid, a component database for storing ID of each component, a three-dimensional model of each component, and constraint data indicating joining constraints among the components, and the component Among the queries input to the database, a history database storing query storage data including at least the ID of each component, and features capable of identifying each component from the image captured by the imaging device are extracted, respectively, An image recognition unit for acquiring each ID of the part and position data of the part based on the information, and that of the part acquired based on the feature A query generation unit that generates a query including the ID of the query, and, when the query is generated, a three-dimensional model of each of the components associated with each of the IDs included in the query from the component database using the query A data acquisition unit that acquires constraint data; a component arrangement unit that arranges each component in a virtual space corresponding to the real space based on position data, a three-dimensional model, and constraint data of each of the acquired components; A consistency determination unit that determines the alignment of the positions of the arranged parts based on the positional relationship of the arranged parts, and when it is determined that the alignment is present, the arranged parts A solid recognition unit that recognizes a solid based on the position of the object, and the ID of at least each of the parts of the query used by the data acquisition unit when it is determined that the On the basis of the database storage unit for storing the query storage data in the history database, the query storage data stored in the history database, and the data stored in the component database. The apparatus is characterized by comprising: a query regeneration determination unit; and a query regeneration unit that generates a query including data different from the query storage data stored in the history database, when it is determined to regenerate the query. .
また、上記の目的を達成するために、本発明の一態様としての電子装置は、予め定められた複数の部品より構成される実空間における立体を認識するための電子装置であって、前記立体を撮影するための撮影装置と、各部品のID、各部品の3次元モデル、及び各部品間の接合制約条件を示す制約データを関連付けて記憶する部品データベースと、前記部品データベースに入力されるクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを記憶する履歴データベースと、前記撮影装置により撮影された画像から各部品を識別可能な特徴をそれぞれ抽出し、該特徴に基づいて部品のそれぞれのID及び該部品の位置データを取得する画像認識部と、前記特徴に基づいて取得された部品のそれぞれのIDを含むクエリを生成するクエリ生成部と、クエリが生成された場合、該クエリを用いて、前記部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを取得するデータ取得部と、前記取得された部品それぞれの位置データ、3次元モデル、及び制約データに基づいて前記実空間と対応させた仮想空間に各部品を配置する部品配置部と、前記配置された各部品の位置関係に基づいて、前記配置された各部品の位置の整合性を判定する整合性判定部と、前記整合性が有ると判定された場合、前記配置された各部品の位置に基づいて立体を認識する立体認識部と、前記整合性が無いと判定された場合、前記データ取得部が用いたクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを前記履歴データベースに記憶するデータベース記憶部と、前記履歴データベースが記憶するクエリ保存用データ及び前記部品データベースが記憶するデータに基づいて、クエリを再生成するか否かを決定するクエリ再生成決定部と、クエリを再生成すると決定された場合、前記履歴データベースが記憶するクエリ保存用データとは異なるデータを含むクエリを生成するクエリ再生成部と、を備えることを特徴とする。 Further, in order to achieve the above object, an electronic device according to one aspect of the present invention is an electronic device for recognizing a solid in a real space composed of a plurality of predetermined parts, wherein the solid is A part database that associates and stores an imaging device for capturing an ID of each part, an ID of each part, a three-dimensional model of each part, and constraint data indicating joining constraints between each part, and a query input to the part database And a history database for storing query storage data including at least the ID of each of the parts, and a feature capable of identifying each of the parts from the image captured by the imaging device, and extracting each of the parts based on the feature Generating a query including an ID and an image recognition unit for acquiring position data of the part, and each ID of the part acquired based on the feature A query generation unit; and a data acquisition unit that acquires, using the query, a three-dimensional model of each of the components associated with each of the IDs included in the query and constraint data when the query is generated. A component placement unit for placing each component in a virtual space corresponding to the real space based on the acquired position data of each component, the three-dimensional model, and the constraint data, and the positional relationship between the disposed components A consistency determination unit that determines the consistency of the position of each of the arranged parts based on the above, and when it is determined that there is the consistency, a solid is recognized based on the position of each of the arranged parts If it is determined that there is no consistency between the three-dimensional recognition unit, the query storage data including at least the ID of each part of the queries used by the data acquisition unit is the history A query storage determination unit configured to determine whether to regenerate a query based on a database storage unit stored in a database, query storage data stored by the history database, and data stored by the component database; Are determined to be regenerated, and a query regenerating unit that generates a query including data different from the query storage data stored in the history database.
また、上記の目的を達成するために、本発明の一態様としての方法は、予め定められた複数の部品より構成される実空間における立体を認識するための、該立体を撮影するための撮影装置を備える電子装置において実行される方法であって、前記撮影装置により撮影された画像から各部品を識別可能な特徴をそれぞれ抽出し、該特徴に基づいて部品のそれぞれのID及び該部品の位置データを取得する画像認識ステップと、前記特徴に基づいて取得された部品のそれぞれのIDを含むクエリを生成するクエリ生成ステップと、クエリが生成された場合、該クエリを用いて、各部品のID、各部品の3次元モデル、及び各部品間の接合制約条件を示す制約データを関連付けて記憶する部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを取得するデータ取得ステップと、前記取得された部品それぞれの位置データ、3次元モデル、及び制約データに基づいて前記実空間と対応させた仮想空間に各部品を配置する部品配置ステップと、前記配置された各部品の位置関係に基づいて、前記配置された各部品の位置の整合性を判定する整合性判定ステップと、前記整合性が有ると判定された場合、前記配置された各部品の位置に基づいて立体を認識する立体認識ステップと、前記整合性が無いと判定された場合、前記データ取得ステップにおいて用いたクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを履歴データベースに記憶するデータベース記憶ステップと、前記履歴データベースが記憶するクエリ保存用データ及び前記部品データベースが記憶するデータに基づいて、クエリを再生成するか否かを決定するクエリ再生成決定ステップと、クエリを再生成すると決定された場合、前記履歴データベースが記憶するクエリ保存用データと異なるデータを含むクエリを生成するクエリ再生成ステップと、を含むことを特徴とする。 Further, in order to achieve the above object, a method as an aspect of the present invention is an imaging method for photographing a solid for recognizing a solid in a real space composed of a plurality of predetermined parts. A method implemented in an electronic device comprising the device, wherein a feature capable of identifying each component is extracted from the image captured by the imaging device, and the ID of the component and the position of the component based on the feature. In the image recognition step for acquiring data, the query generation step for generating a query including the ID of each of the parts acquired based on the feature, and when the query is generated, using the query, the ID of each part , A three-dimensional model of each part, and a parts database that associates and stores constraint data indicating joining constraints between the parts, each of the IDs included in the query Data acquisition step for acquiring three-dimensional model and restriction data of each attached part, and virtual space corresponding to the real space based on position data, three-dimensional model, and restriction data of each acquired part A consistency determining step of determining the alignment of the positions of the arranged parts based on the part arranging step of arranging the parts and the positional relationship of the arranged parts, the judgment that the alignment is present If it is determined that there is no matching, it is determined that there is no matching, and if at least one of the IDs of each of the components of the query is used, Database storing step of storing data for storing queries including the above in a history database, and a query stored in the history database A query regeneration determination step of determining whether to regenerate a query based on data for storage and data stored in the parts database, and a query stored in the history database when it is determined to regenerate the query And D. a query regenerating step of generating a query including data different from the storage data.
本発明によれば、単一の画像から立体形状を認識することができる。 According to the present invention, a three-dimensional shape can be recognized from a single image.
以下、図面を参照して、本発明の実施形態による立体認識システム1について説明する。本明細書においては、説明の便宜上、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明や実質的に同一の構成についての重複説明を省略する場合がある。
Hereinafter, a three-
本発明の実施形態による立体認識システム1は、形状や大きさが既知である予め定められた複数の部品5を組み合わせて作成された実空間における立体を認識するためのシステムである。本明細書において、複数の部品5を組み合わせて作成された実空間における立体を特に構造物と呼ぶ場合がある。本発明の実施形態の技術的特徴の1つは、立体認識システム1が、上記のように作成された構造物を単一の平面画像から認識することである。個々の部品5の形状や大きさが既知であっても、部品5を自由に組み合わせて作成される構造物は既知ではないことは理解される。
The three-
なお、本明細書における実空間上の部品5は、他の部品5が接触することにより、又は他の部品5が当該部品5の上に載せられることにより、実質的に体積や形状が変わらない剛体を想定している。また本明細書において、2つの部品5が接触して1つの構造物を形成することを、2つの部品5が接合するという。例えば、2つの部品5が接合するとは、一の部品5と他の部品5が接触すること、一の部品5と他の部品5が嵌合されて固定されること、及び一の部品5が他の部品5に載せられることなどを示す。 It should be noted that the part 5 in the real space in the present specification does not substantially change in volume or shape when the other part 5 contacts or when the other part 5 is placed on the part 5 It assumes a rigid body. Also, in the present specification, the contact of two parts 5 to form one structure is referred to as joining of two parts 5. For example, joining two parts 5 means that one part 5 and another part 5 are in contact, that one part 5 and another part 5 are fitted and fixed, and one part 5 is It shows that it can be placed on another component 5 or the like.
図1は、本発明の一実施形態による立体認識システム1の全体構成図である。図1に示すように、立体認識システム1は、電子装置3と、サーバ4と備え、電子装置3及びサーバ4は、インターネットなどのネットワーク2に接続され、互いに通信可能である。
FIG. 1 is an overall configuration diagram of a three-
図2は本発明の一実施形態による電子装置3のハードウェア構成を示すブロック図である。電子装置3は、プロセッサ11、表示装置12、入力装置13、撮影装置14、記憶装置15、及び通信装置16を備える。これらの各構成装置はバス16によって接続される。なお、バス17と各構成装置との間には必要に応じてインタフェースが介在しているものとする。本実施形態において、電子装置3はスマートフォンである。ただし、電子装置3は、上記の構成を備えるものであれば、タブレット型コンピュータ、タッチパッド等の接触型入力装置を備えるコンピュータなどの携帯電子端末とすることができる。
FIG. 2 is a block diagram showing the hardware configuration of the
プロセッサ11は、電子装置3全体の動作を制御するものであり、例えばCPUである。なお、プロセッサ11としては、MPU等の電子回路が用いられてもよい。プロセッサ11は、記憶装置14に格納されているプログラムやデータを読み込んで実行することにより、様々な処理を実行する。1つの例では、プロセッサ11は、複数のプロセッサから構成される。
The
表示装置(ディスプレイ)12は、プロセッサ11の制御に従って、アプリケーション画面や撮影装置14によって撮影された画像などを電子装置3のユーザに表示する。好ましくは液晶ディスプレイであるが、有機ELを用いたディスプレイやプラズマディスプレイ等であってもよい。
The display device (display) 12 displays the application screen, an image photographed by the photographing
入力装置13は、電子装置3に対するユーザからの入力を受け付けるユーザインタフェースであり、例えば、タッチパネル、タッチパッド、キーボード、又はマウスである。
本実施形態において電子装置3はスマートフォンであるため、電子装置3は入力装置13としてタッチパネルを備え、タッチパネルは表示装置12としても機能し、表示装置12と入力装置13は一体となった構造である。ただし、表示装置12と入力装置13は、別の位置に配置される別個の形態であってもよい。
The
In the present embodiment, since the
撮影装置(撮像装置)14は、実空間の静止画又は動画を撮影(撮像)するものであり、撮影した画像又は動画データを記憶部15に格納する。撮影装置14は、例えばイメージセンサなどから構成されるカメラである。
The imaging device (imaging device) 14 captures (captures) a still image or a moving image in the real space, and stores the captured image or the moving image data in the
記憶装置15は、揮発性メモリであるRAM及び不揮発性メモリであるROMを含む、一般的なスマートフォンが備える記憶装置である。記憶装置15は、外部メモリを含むこともできる。
The
1つの例では、記憶装置15は、主記憶装置及び補助記憶装置を含む。主記憶装置は、情報の高速な読み書きが可能な揮発性の記憶媒体であり、プロセッサ11が情報を処理する際の記憶領域及び作業領域として用いられる。補助記憶装置は、様々なプログラムや、各プログラムの実行に際してプロセッサ11が使用するデータを格納する。補助記憶装置は、例えばハードディスク装置であるが、情報を格納できるものであればいかなる不揮発性ストレージ又は不揮発性メモリであってもよく、着脱可能なものであっても構わない。補助記憶装置は、例えば、オペレーティングシステム(OS)、ミドルウェア、アプリケーションプログラム、これらのプログラムの実行に伴って参照され得る各種データなどを格納する。
In one example, the
通信装置16は、ネットワーク2を介してサーバ4などの他のコンピュータとの間でデータの授受を行う。例えば通信装置16は、移動体通信や無線LAN等の無線通信を行い、ネットワーク2へ接続する。1つの例では、通信装置16によって、プログラムをサーバ4からダウンロードして、記憶装置16に格納する。ただし、通信装置16は、イーサネット(登録商標)ケーブル等を用いた有線通信を行ってもよい。
The
図3は本発明の一実施形態によるサーバ4のハードウェア構成を示すブロック図である。サーバ4は、プロセッサ21、表示装置22、入力装置23、記憶装置24、及び通信装置25を備える。これらの各構成装置はバス26によって接続される。なお、バス26と各構成装置との間には必要に応じてインタフェースが介在しているものとする。
FIG. 3 is a block diagram showing the hardware configuration of the
プロセッサ21は、サーバ4全体の動作を制御するものであり、例えばCPUである。なお、プロセッサ11としては、MPU等の電子回路が用いられてもよい。プロセッサ11は、記憶装置14に格納されているプログラムやデータを読み込んで実行することにより、様々な処理を実行する。1つの例では、プロセッサ21は、複数のプロセッサから構成される。
The
表示装置(ディスプレイ)22は、プロセッサ21の制御に従って、アプリケーション画面などをサーバ4の使用者に表示する。入力装置23は、サーバ4に対するユーザからの入力を受け付けるものであり、例えば、タッチパネル、タッチパッド、キーボード、又はマウスである。
The display device (display) 22 displays an application screen or the like to the user of the
記憶装置24は、主記憶装置及び補助記憶装置を含む。主記憶装置は、例えばRAMのような半導体メモリである。RAMは、情報の高速な読み書きが可能な揮発性の記憶媒体であり、プロセッサ21が情報を処理する際の記憶領域及び作業領域として用いられる。主記憶装置は、読み出し専用の不揮発性記憶媒体であるROMを含んでいてもよい。この場合、ROMはファームウェア等のプログラムを格納する。補助記憶装置は、様々なプログラムや、各プログラムの実行に際してプロセッサ21が使用するデータを格納する。補助記憶装置は、例えばハードディスク装置であるが、情報を格納できるものであればいかなる不揮発性ストレージ又は不揮発性メモリであってもよく、着脱可能なものであっても構わない。補助記憶装置は、例えば、オペレーティングシステム(OS)、ミドルウェア、アプリケーションプログラム、これらのプログラムの実行に伴って参照され得る各種データなどを格納する。
The
好適な1つの例では、記憶部24は各種データベース用のデータ(例えばテーブル)やプログラムを記憶する。プロセッサ21の動作などにより、各種データベースは実現される。サーバ4は、データベースサーバ機能を備えることもできるし、1又は複数のデータベースサーバを含むこともできるし、又は他のサーバを含むこともできる。
In one preferable example, the
通信装置25は、ネットワーク2を介して電子装置3などの他のコンピュータとの間でデータの授受を行うための装置である。例えば通信装置25は、イーサネット(登録商標)ケーブル等を用いた有線通信や移動体通信、無線LAN等の無線通信を行い、ネットワーク4へ接続する。
The
図4は、本発明の一実施形態によるサーバ4の機能ブロック図の一例を示す。サーバ4は、部品データベース41と、履歴データベース42と、を備える。本実施形態においては、プロセッサ21によりプログラムが実行されることによりこれらの機能が実現される。このように、各種機能がプログラム読み込みにより実現されるため、1つのデータベースの一部を他のデータベースが有していてもよい。
FIG. 4 shows an example of a functional block diagram of the
前述のとおり、立体認識システム1は、予め定められた複数の部品5より構成される実空間における構造物を認識する。部品データベース41は、部品5それぞれの部品ID、部品5の3次元モデルデータ(3次元モデル)、及び部品5間の接合制約条件を示す制約データを関連付けて記憶する。電子装置3は、クエリを用いて、部品データベース41からデータを取得する。
As described above, the three-
部品IDは、部品5を識別するための一意の識別情報を示すデータである。部品データベース41に記憶される部品5は、それぞれ部品IDに対応付けられる。構造物は、部品データベース41に記憶される部品5の一部又は全部により作成される。形状及び大きさが同じ部品5が複数ある場合、当該部品5は、同一の部品IDを有する。この場合、部品データベース41は、部品5の個数を、部品IDに更に関連付けて記憶する。ただし、すべての部品5が異なる部品IDを有するように構成し、部品データベース41が部品5の個数を含まないようにすることもできる。
The part ID is data indicating unique identification information for identifying the part 5. The parts 5 stored in the
3次元モデルは、部品5の形状及び大きさを定めるデータであり、例えばワイヤーフレームモデルやポリゴンメッシュで表現されたデータである。 The three-dimensional model is data that defines the shape and size of the component 5 and is data represented by, for example, a wire frame model or a polygon mesh.
制約データは、部品データベース41に記憶される部品5間の接合制約条件を定める位置合わせ用メタデータである。接合制約条件は、部品5を接合する際に課される幾何学的制約であり、2つの部品5の相対的な位置関係を定める。
Constraint data is alignment metadata for defining a bonding constraint between parts 5 stored in the
位置合わせ用メタデータは、2つの部品5の相対的な位置関係において、6自由度(6DoF)のうちの少なくとも1つの制約を定めるデータである。6DoFは、3次元空間上の立体の位置及び姿勢についての、座標と回転方向からなる自由度である。部品データベース41は、一の部品5の部品IDに、他の部品5それぞれとの制約を定める位置合わせ用メタデータを、関連付けて記憶する。
The alignment metadata is data that defines at least one constraint out of six degrees of freedom (6 DoF) in the relative positional relationship between the two parts 5. 6DoF is a degree of freedom consisting of coordinates and rotation directions with respect to the position and posture of a solid in a three-dimensional space. The
一の部品5の位置合わせ用メタデータ、すなわち一の部品5の部品IDに関連付けられる位置合わせ用メタデータは、一の部品5と接合する可能性のあるすべての部品5それぞれとの制約を定めるデータを含む。1つの例では、部品データベース41が一の部品5を1つのみ含む場合、一の部品5の部品IDに関連付けられる位置合わせ用メタデータは、一の部品5以外のすべての他の部品5それぞれとの制約を定めるデータを含む。1つの例では、部品データベース41が一の部品5を複数含む場合、該一の部品5の部品IDに関連付けられる位置合わせ用メタデータは、一の部品5を含むすべての部品5それぞれとの制約を定めるデータを含む。
The alignment metadata of one part 5, that is, the alignment metadata associated with the part ID of one part 5, defines constraints with each of all the parts 5 that may be joined with one part 5. Contains data. In one example, in the case where the
部品データベース41は、部品5の3次元モデルや位置合わせ用メタデータを、各部品5で共通の座標系を用いて記憶する。好ましくは、部品データベース41が記憶する各部品5ごとの3次元モデルや位置合わせ用メタデータは、各部品5の中央を原点とする3軸座標系により表される。
The
好適な1つの例では、すべての部品5において部品表面の任意の点を接合基準点6として定めると、一の部品5の位置合わせ用メタデータは、一の部品5の接合基準点6に対する他の部品5の接合基準点6の距離と角度の条件により定められる。一組の部品5間に着目すると、一の部品5の位置合わせ用メタデータ(alignment-data)は、位置の制約(positional-constraint)及び姿勢の制約(orientational-constraint)を要素とする配列として以下に示す式1〜式3のとおり記述することができる。
(式1)
(式2)
(式3)
式1から式3において、
は、一の部品5の接合基準点の座標を示す。
は、一の部品5の接合基準点と他の部品5の接合基準点とのx軸方向の距離の最小値と最大値を示す。
は、一の部品5の接合基準点と他の部品5の接合基準点とのy軸方向の距離の最小値と最大値を示す。
は、一の部品5の接合基準点と他の部品5の接合基準点とのx軸方向の距離の最小値と最大値を示す。
は、一の部品5の接合基準点と他の部品5の接合基準点とのx軸を中心とした回転角度差(rollの回転角度差)の最小値と最大値を示す。
は、一の部品5の接合基準点と他の部品5の接合基準点とのy軸を中心とした回転角度差(pitchの回転角度差)の最小値と最大値を示す。
は、一の部品5の接合基準点と他の部品5の接合基準点とのz軸を中心とした回転角度差(yawの回転角度差)の最小値と最大値を示す。
In one preferred example, when any point on the part surface is defined as the bonding reference point 6 in all parts 5, the alignment metadata of one part 5 is the same as the other with respect to the bonding reference point 6 of one part 5. It is determined by the conditions of the distance and the angle of the bonding reference point 6 of the component 5 of FIG. Focusing on a set of parts 5, the alignment metadata (alignment-data) of one part 5 is an array having positional constraints (or orientational constraints) and orientational constraints (orientational constraints). It can be described as
(Formula 1)
(Formula 2)
(Equation 3)
In
These show the coordinates of the junction reference point of one component 5.
These show the minimum value and the maximum value of the distance of the x-axis direction of the junction reference point of one component 5 and the junction reference point of the other component 5.
These show the minimum value and the maximum value of the distance of the y-axis direction of the junction reference point of one component 5 and the junction reference point of the other component 5.
These show the minimum value and the maximum value of the distance of the x-axis direction of the junction reference point of one component 5 and the junction reference point of the other component 5.
These show the minimum value and the maximum value of the rotational angle difference (rotational angle difference of a roll) centering on the x-axis of the joint reference point of one component 5 and the joint reference point of the other component 5.
These show the minimum value and the maximum value of the rotational angle difference (rotational angle difference of pitch) centering on the y-axis of the joint reference point of one part 5 and the joint reference point of the other part 5.
These show the minimum value and the maximum value of the rotational angle difference (rotational angle difference of yaw) centering on the z-axis of the joint reference point of one part 5 and the joint reference point of the other part 5.
式1〜式3に示す位置合わせ用メタデータは、一の部品5と他の1つの部品5との制約を定めるデータである。部品データベース41は、一の部品5と接合する可能性のあるすべての部品5それぞれとの制約を定める位置合わせ用メタデータを、一の部品5の部品IDに関連付けて各々記憶する。また一の部品5が複数の接合面を有する場合、一の部品5は、複数の接合基準点を有することができる。この場合、一の部品5と他の1つの部品5との制約を定めるデータに関して、位置合わせ用メタデータは、接合基準点ごとに式1〜式3に示すデータを有することができ、位置及び姿勢の制約の要素は、接合基準点に従属するデータとして扱うことができる。以下、本実施形態においては、一の部品5の制約データは、一の部品5と接合する可能性のある部品5ごとに、位置合わせ用メタデータを有するものとする。また、位置合わせ用メタデータは、接合基準点6及び該接合基準点6に従属するデータとして位置の制約及び姿勢の制約の要素を有するものとする。
The alignment metadata shown in
1つの例では、各々が1つの接合基準点を有する2つの部品5(P1とP2)が接合する場合、各部品5の位置合わせ用データを添字により表すと、以下の式が成立する。
(式4)
(式5)
(式6)
(式7)
(式8)
(式9)
In one example, in the case where two parts 5 (P 1 and P 2 ) each having one joint reference point are joined, the following equation is established if the alignment data of each part 5 is represented by a subscript: .
(Equation 4)
(Equation 5)
(Equation 6)
(Equation 7)
(Equation 8)
(Equation 9)
立体の回転方向は、軸の選び方の順序によって異なる位置となりうるため、例えば1つのアプリケーションにおいて、その順序は1つに定められているものとする。1つの例では、一の部品の接合基準点と他の任意の部品の接合基準点とのx軸方向、y軸方向、及びz軸方向の少なくとも1つの距離の最小値と最大値を[0,∞]とし、一の部品の接合基準点と他の任意の部品の接合基準点とのroll、pitch、及びyawの少なくとも1つの最小値及び最大値を[−180、180]とする。これにより、制約条件において一部の自由度を残すことができる。他の例では、位置合わせ用メタデータが6DoFのうちの1つの制約も定めないように構成される。この場合、部品データベース41は、制約データを記憶しなくてもよい。
Since the direction of rotation of the solid may be different depending on the order of selection of the axes, for example, in one application, the order is defined as one. In one example, the minimum value and the maximum value of at least one distance between the joint reference point of one part and the joint reference point of any other part in the x-axis, y-axis and z-axis directions [0 , ∞], and at least one minimum value and maximum value of roll, pitch, and yaw between the joint reference point of one part and the joint reference point of any other part are [-180, 180]. This leaves some freedom in the constraints. In another example, the alignment metadata is configured not to define any one of the 6 DoF constraints. In this case, the
履歴データベース42は、電子装置3から部品データベース41に入力されるクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを記憶する。部品データベース41に入力されるクエリは、例えば電子装置3が部品データベース41からデータを検索して取得する際に用いるクエリである。
The history database 42 stores query storage data including at least the ID of each component among the queries input from the
図5は本発明の一実施形態による電子装置3の機能ブロック図の一例を示す。電子装置3は、画像認識部31と、クエリ生成部32と、データ取得部33と、部品配置部34と、整合性判定部35と、立体認識部36と、データベース記憶部37と、クエリ再生成決定部38と、クエリ再生成部39と、を備える。本実施形態においては、プロセッサ11によりプログラムが実行されることによりこれらの機能が実現される。このように、各種機能がプログラム読み込みにより実現されるため、1つのパート(機能)の一部又は全部を他のパートが有していてもよい。ただし、各機能の一部又は全部を実現するための電子回路等を構成することによりハードウェアによってもこれらの機能は実現してもよい。
FIG. 5 shows an example of a functional block diagram of the
最初に、立体認識システム1で用いられる部品5について説明する。複数の部品5は、各部品5を識別可能なマーカを、部品表面に有する。好適な1つの例では、マーカは、ARマーカであり、例えば矩形状の黒枠とその内部に描かれた左右非対称のドットパターンにより構成される。このようにマーカは、該マーカが撮影された画像から、撮影装置14からの該マーカの位置及び姿勢を取得可能である形状を有するとともに、各部品5を識別可能な特徴パターンを有する。ただし、複数の部品5は、各部品5を識別可能なマーカ以外の、各部品5を識別可能な特徴を部品表面に有していてもよい。例えば、複数の部品5は、各部品5を識別可能な特徴パターンのみを有し、該特徴パターンが、撮影された画像から、撮影装置14からの該特徴パターンの位置及び姿勢を取得可能であるとともに各部品5を識別可能であるように構成されてもよい。
First, the component 5 used in the three-
画像認識部31は、撮影装置14により撮影された画像から各部品5を識別可能なマーカをそれぞれ抽出する。画像認識部31は、抽出されたマーカから部品5の部品IDをそれぞれ取得するとともに、撮影画像における該マーカの形状及び大きさから、各部品5の位置データを取得する。画像認識部31は、このようにして、撮影画像内にある各部品5を認識する。1つの例では、画像認識部31が取得する各部品5の位置データは、カメラ座標系により表現されるマーカの認識の基準点の位置であり、撮影装置14からの相対位置を示すものである。1つの例では、位置データは、6DoF(6自由度)の位置である。他の例では、位置データは、クォータニオン等により表現される。なお、画像認識部31は既知の画像認識技術が有する機能を備えることができ、画像認識部31が取得する各部品5の位置データは大まかな位置であってもよい。
The
部品データベース41は、部品IDに関連付けて、該部品IDに対応付けられた部品5の表面にあるマーカの形状、大きさ、及び特徴パターンと、該マーカの該部品5における位置とを記憶する。マーカの部品5における位置は、例えば画像認識部31が認識するマーカの認識の基準点の位置であり、該部品5の中央を原点とする3軸座標系により表される。また、部品データベース41は、部品IDに関連付けて、該部品IDに対応付けられた部品5の接合基準点6の位置を記憶する。接合基準点6の位置は、マーカの部品5における位置と同様に記憶され、例えば該部品5の中央を原点とする3軸座標系により表される。
The
図6は、撮影装置14による撮影画像の一例を示す図であり、撮影画像には、3つの部品5(5a、5b、5c)から構成される構造物が映っている。画像認識部31は、図6に示す撮影画像から、3つのマーカを抽出し、抽出したマーカから3つの部品5に対応付けられた部品IDと、該部品5の位置データを取得することで、3つの部品5をそれぞれ認識する。図7は、図6に示す撮影画像から画像認識部31が認識した3つの部品5a、5b、5cを示す図であり、3つの部品5それぞれの接合基準点6(6a、6b1、6b2、6c)を示す。部品5bは、2つの接合基準点6b1及び6b2を有することが確認できる。例えば、撮影画像に中央の部品のマーカが映っていない場合、画像認識部31は、両端の部品5のみ認識する。
FIG. 6 is a view showing an example of a photographed image by the photographing
クエリ生成部32は、画像認識部31により取得された部品IDを含むクエリを生成する。データ取得部33は、クエリが生成された場合、生成されたクエリを用いて、部品データベース41から、該クエリが含む部品IDのそれぞれに関連付けられた部品5それぞれの3次元モデル及び制約データを取得する。
The
クエリは、部品IDと、部品IDに従属するデータとを含み、例えば各データを要素とする配列として定められる。部品IDに従属するデータは、部品IDに対応付けられた部品5の位置データを含む。部品5の位置データは、画像認識部31により取得されるものである。また、部品IDに従属するデータは、3次元モデルと、制約データとを含む。
The query includes a part ID and data subordinate to the part ID, and is defined, for example, as an array having each data as an element. The data subordinate to the part ID includes position data of the part 5 associated with the part ID. The position data of the component 5 is acquired by the
データ取得部33が、データを取得する際に用いるクエリは、画像認識部31により取得された部品IDと、部品IDに対応付けられた部品5の位置データとを含んでいればよい。1つの例では、データ取得部33は、部品データベース41の検索の際に用いたクエリに、該クエリが含む部品IDに関連付けられた部品5それぞれの3次元モデル及び制約データを、該部品IDに対応付けて該クエリにそれぞれ加える。これにより、データ取得部33は、部品IDごとの部品5の3次元モデル及び制約データを取得する。
The query used when the
部品配置部34は、クエリが含む部品IDごとに、画像認識部31により取得された位置データと、データ取得部33により取得された3次元モデル及び制約データとに基づいて、実空間と対応させた仮想空間に各部品5を配置する。最初に、部品配置部34は、クエリが含む部品IDごとに、3次元モデルと、位置データとを用いて、仮想空間に各部品5を仮想空間上に配置する。
The
次に、部品配置部34は、配置された部品5のそれぞれが隣接しているか否かを判定することにより、配置された部品5のうち隣接する2つの部品5の組をそれぞれ特定する。1つの例では、部品配置部34は、最初に配置された2つの部品5の接合基準点6間の長さが所定値以内であるか否かを判定し、所定値以内である場合、2つの部品5は隣接していると判定する。部品配置部34は、1つの部品5に対して複数の部品5が隣接していると判定することができる。
Next, the
次に、部品配置部34は、隣接していると特定された2つの部品5の組から所定の順番で部品5の組を選択する。部品配置部34は、隣接していると判定された2つの部品5の組のそれぞれにおいて、接合制約条件を満たすように、2つの部品5のうちのいずれか一方を移動や回転(以下、「移動等」という。)させて、配置を確定する。このように、部品配置部34は、各部品5を調整して配置する。部品配置部34は、接合制約条件を満たしている場合、部品5を移動等させないで配置を確定する。部品配置部34は、どの部品5にも隣接していないと判定された部品5については、接合制約条件を満たすように移動等させない。
Next, the
1つの例では、部品配置部34は、優先度が高い部品5を含む2つの部品5の組から順番に、2つの部品5の組を選択する。この場合、部品データベース41は、部品IDに関連付けて、該部品IDに対応付けられた部品5の優先度に関する優先度情報を更に記憶する。部品5の優先度は、システム管理者により予め定められるものであり、例えば構造物を構成する上で重要となり得る部品5ほど優先度は高く設定される。データ取得部33は、クエリが生成された場合、生成されたクエリを用いて、部品データベース41から、該クエリが含む部品IDのそれぞれに関連付けられた部品5それぞれの優先度情報を更に取得する。他の例では、画像認識部31は部品IDを認識するとともに、その認識の確度を算出し、部品配置部34は、該確度の高い部品5を含む2つの部品5の組から順番に、2つの部品5の組を選択する。
In one example, the
1つの例では、部品配置部34は、2つの部品5のうちの一方を移動等させる必要がある場合において、いずれか一方の部品5の配置を既に確定していた場合、確定させていない方の部品5を、接合制約条件を満たすように移動等させる。他の例では、部品配置部34は、2つの部品5のうちの一方を移動等させる必要がある場合において、両方の部品5の配置を既に確定していた場合、優先度が低い部品5又は画像認識部31の認識の確度が低い部品5を、接合制約条件を満たすように移動等させる。
In one example, in the case where one of the two parts 5 needs to be moved or the like, the
図8は、図7に示す画像認識部31が認識した3つの部品5から、部品配置部34が隣接する2つの部品5の組をそれぞれ特定し、接合制約条件を満たすように移動等させた様子を示す図である。
FIG. 8 identifies the set of two parts 5 adjacent to each other from the three parts 5 recognized by the
整合性判定部35は、部品配置部34により配置された各部品5の位置関係に基づいて、配置された各部品5の位置の整合性を判定する。
The
1つの例では、整合性判定部35は、配置された各部品5の3次元モデルが占める領域の重複度合いに基づいて、配置された各部品5の位置の整合性を判定する。具体的には、整合性判定部35は、配置された各部品5の3次元モデルが占める領域の重複が(a)所定の体積以内である場合は整合性が有ると判定し、(b)所定の体積を超える場合は整合性が無いと判定する。上記の所定の体積は、ゼロとすることもできるし、各部品5の3次元モデルごとに定めることもできる。
In one example, the
1つの例では、画像認識部31は、撮影装置14により撮影された画像データから構造物が載置されるベース部分を形成するベース部を認識する。例えば構造物が机の上に載置される場合、載置される机の表面がベース部となる。部品配置部34は、ベース部を仮想空間上に配置し、該ベース部についても、配置された部品5のそれぞれが隣接しているか否かを判定する。部品配置部34は、ベース部と部品5とを接合制約条件を満たすように移動等させる場合、部品5の方を移動等させて配置を確定させることが好ましい。整合性判定部35は、配置された各部品5の位置とベース部の位置との位置関係から、配置された各部品5が重力に従った配置であるか否かを判定する。具体的には、整合性判定部35は、重力に従った配置の場合は整合性が有ると判定し、重力に従った配置でない場合は整合性が無いと判定する。
In one example, the
例えば、図6において画像認識部31が両端の部品5のみ認識した場合、クエリ生成部32が生成するクエリは部品5bの部品IDを含まず、部品配置部34は部品5aと5cを仮想空間に配置する。部品配置部34は、ベース部と部品5cの位置関係から重力の方向を認識し、部品5aが部品5cと間隙を介して配置されていることから、部品5aが重力に従った配置でないと判定し、整合性が無いと判定する。
For example, when the
1つの例では、整合性判定部35は、撮影装置14により撮影された画像と、部品配置部34が仮想空間上に配置した各部品5の仮想カメラから見た画像との一致度に基づいて、整合性を判定する。具体的には、整合性判定部35は、一致度が予め定められた既定値以上である場合は整合性が有ると判定し、一致度が既定値未満である場合は整合性が無いと判定する。ここで、仮想カメラは、撮影装置14の位置に対応する仮想空間の位置に配置されるものである。
In one example, the
1つの例では、整合性判定部35は、整合性が無いと判定した場合、部品配置部34が配置した各部品5の位置の整合性の評価値を算出する。例えば当該評価値は、整合性判定部35が配置された各部品5の3次元モデルが占める領域の重複度合いに基づいて判定する場合、重複領域の体積の所定の体積に対する超過度合いに応じて算出される。また例えば当該評価値は、整合性判定部35が画像データの一致度に基づいて判定する場合、一致する度合いに応じて算出される。
In one example, when the
なお、上記のような整合性判定部35が行う整合性の判定は、仮想空間上に配置された部品5全体に対するものであるが、整合性判定部35は、部品5ごとに整合性を判定することができる。1つの例では、整合性判定部35が配置された各部品5の3次元モデルが占める領域の重複度合いに基づいて各部品5の位置の整合性を判定する場合、優先度が高い方の部品5を整合性有り、優先度が低い方の部品5を整合性無し、と判定する。
The determination of consistency performed by the
立体認識部36は、整合性判定部35により整合性が有ると判定された場合、部品配置部34により配置された各部品5の位置に基づいて構造物を認識する。例えば、立体認識部36は、部品配置部34が仮想空間に配置した各部品5の3次元モデル及び位置データにより構造物を認識し、構造物全体の3次元モデルを認識する。好ましくは、立体認識部36は、認識した構造物全体の3次元モデルを仮想空間上に再構築する。
The three-
図9は、図8に示す部品配置部34が配置を確定した部品5により立体認識部36が認識した構造物を示す図である。図6〜図9においては、部品5c、5b、5aの順に優先度が高く、部品配置部34は、部品5bと5cの組で部品5bを移動させ、部品5bと5aの組で部品5aを移動させたことが確認できる。
FIG. 9 is a view showing a structure recognized by the three-
データベース記憶部37は、整合性判定部35により整合性が無いと判定された場合、クエリ保存用データを履歴データベース42に記憶する。クエリ保存用データは、データ取得部33が部品データベース41からデータを取得する際に用いたクエリが含むデータのうち、部品5それぞれの部品ID及び部品配置部34が用いた接合基準点6を含むデータである。部品配置部34が用いた接合基準点6は、部品IDに関連付けられた制約データに含まれる接合基準点6のうち、部品配置部34が接合制約条件の判断に用いた接合基準点6である。接合基準点6に関する情報は、隣接する部品5ごとに記憶される位置合わせ用データに含まれるため、クエリ保存用データは、部品配置部34が配置した部品5の隣接関係を特定することができるものである。ただし、クエリ保存用データは、データ取得部33が部品データベース41からデータを取得する際に用いたクエリが含むデータのうち、少なくとも部品5それぞれの部品IDを含むデータであればよく、上記実施例に限定されない。
If the
1つの例では、データベース記憶部37は、クエリ保存用データが含む部品IDのそれぞれに関連付けて、部品配置部34が配置した各部品5の位置の整合性の評価値を履歴データベース42に更に記憶する。この場合、整合性判定部35が、整合性が無いと判定した場合、整合性の評価値を算出する。このような構成とすることにより、すべての場合において整合性判定部35が、整合性が無いと判定した場合に、最も整合性のあるクエリを用いて、構造物を認識することが可能となる。
In one example, the
1つの例では、データベース記憶部37は、クエリ保存用データが含む部品IDのそれぞれに関連付けて、部品配置部34が配置した各部品5の位置を履歴データベース42に更に記憶する。このような構成とすることにより、すべての場合において整合性判定部35が、整合性が無いと判定した場合に、最も整合性のある配置のときの各部品5の位置を用いて、構造物を認識することが可能となる。
In one example, the
1つの例では、クエリ保存用データはクエリそのもののデータであり、データベース記憶部37は、データ取得部33が部品データベース41からデータを取得する際に用いたクエリをそのまま履歴データベース42に記憶する。
In one example, the query storage data is data of the query itself, and the
クエリ再生成決定部38は、整合性判定部35により整合性が無いと判定された場合、履歴データベース42が記憶するクエリ保存用データ及び部品データベース41が記憶するデータに基づいて、クエリを再生成するか否かを判定する。具体的には、クエリ再生成決定部38は、履歴データベース42が記憶するクエリ保存用データが、部品データベース41が記憶する部品IDの一部又は全部の組み合わせのうちの所定のものを含むか否かを判定する。クエリ再生成決定部38は、履歴データベース42が記憶するクエリ保存用データが所定のものを含まない場合、クエリを再生成すると決定し、該クエリ保存用データが所定のものを含む場合、クエリを再生成しないと決定する。部品IDの組み合わせは、部品5の配置順を考慮した組み合わせであり、各部品5は接合基準点6でのみ接合されるが、同じ部品5同士の接合であっても接合基準点6が異なる接合は、異なる接合である。例えば部品5が部品A〜Dの4つあり、各部品5が両端に2つの接合基準点6を有する場合、部品IDの全部の組み合わせは、部品A〜Dをすべて用いて配置する組み合わせであり、384(4!×24)通りの組み合わせがある。この場合、部品IDの一部の組み合わせは、部品A〜Dのうちの一部を取り出し、更に部品5の配置順を考慮した組み合わせである。例えば、部品IDの一部の組み合わせは、部品A〜Dのうちの部品B、Cを取り出して配置する8(2!×22)通りの組み合わせや、部品A〜Dのうちの部品A、B、Cを取り出して配置する48(3!×23)通りの組み合わせを含む。
When the
1つの例では、クエリ再生成決定部38は、履歴データベース42が記憶するクエリ保存用データの数量NQと、部品データベース41が記憶する部品IDのすべての組み合わせの数量NPとを比較する。クエリ再生成決定部38は、数量NQが数量NP未満である場合、クエリを再生成すると決定し、そうでない場合、クエリを再生成しないと決定する。例えば部品データベース41が記憶する部品5の個数がnであり、各部品5は両端にそれぞれ接合基準点6を有し、構造物は部品データベース41が記憶するすべての部品5から構成される場合を考える。この場合、クエリ生成部32が生成可能なクエリ総数、すなわち部品データベース41が記憶する部品IDのすべての組み合わせの数量NPは、部品5の配置パターンの数量と接合基準点6の数量から
(式10)
で表すことができる。このようにクエリ再生成決定部38は、クエリを再生成する回数を有限にすることができる。なお上記実施例においては、すべての部品5が2つの接合基準点を有し、構造物は部品データベース41が記憶するすべての部品5から構成されるものとしたが、これは説明を簡単にするための1つの例示である。構造物はn個すべてを使用しなくてもよいし、部品5が有する接合基準点6は2つでなくてもよい。
In one example, the query
(Equation 10)
Can be represented by In this manner, the query
1つの例では、画像認識部31は部品IDを認識するときにその確度を算出する。本例示においては、上記の部品データベース41が記憶する部品IDの一部又は全部の組み合わせのうちの所定のものは、一定値以上の確度で画像認識部31により認識された部品IDを含む。
In one example, the
1つの例では、部品データベース41は、部品IDに関連付けて、該部品IDに対応付けられた部品5の優先度に関する優先度情報を記憶する。本例示においては、上記の部品データベース41が記憶する部品IDの一部又は全部の組み合わせのうちの所定のものは、画像認識部31により認識された一定値以上の優先度の部品IDを含む。
In one example, the
クエリ再生成部39は、クエリ再生成決定部38がクエリを再生成すると決定した場合、履歴データベース42が記憶するクエリ保存用データと異なるデータを含むクエリを生成する。例えば部品データベース41が記憶する部品5の個数がnであり、各部品5は両端に2つの接合基準点6を有し、構造物は部品データベース41が記憶するすべての部品5から構成される場合を考える。クエリ再生成部39は、式10で表されるクエリ生成部32が生成可能なクエリのうち、履歴データベース42が記憶するクエリ保存用データが含む部品IDの組み合わせを含まないクエリを生成する。
When the query
1つの例では、クエリ再生成部39は、部品配置部34が仮想空間に配置した部品5のうちの2つの部品5の3次元モデル間の長さが所定値以上である場合、該長さに対応する部品5の部品IDを追加したクエリを生成する。1つの例では、画像認識部31よる認識の確度が一定値未満であった部品IDや整合性が無いと判定された部品IDについて、部品IDの位置や姿勢を変更したクエリ、又は他の部品IDに置き換えたクエリを優先的に生成する。これにより、立体認識システム1の情報処理をより効率化することが可能となる。
In one example, when the length between the three-dimensional model of two parts 5 of the parts 5 arranged in the virtual space by the
次に、本発明の一実施形態による立体認識システム1の情報処理について図10に示したフローチャートを用いて説明する。図10に示す情報処理は、プログラムを電子装置3に実行させ、かつプログラムをサーバ4に実行させることで実現される。本例示では、クエリ保存用データはクエリそのものを用いる。
Next, information processing of the
ステップ101で、サーバ4は、電子装置3が画像を認識する前に、履歴データベース42が記憶するクエリを消去する。これにより、サーバ4は、履歴データベース42を初期化し、履歴データベース42をクエリが記憶されていない状態にする。
In step 101, the
次にステップ102で、画像認識部31は、撮影装置14により撮影された画像から各部品5を識別可能なマーカを抽出し、抽出されたマーカから部品5のそれぞれに対応付けられた部品IDと該部品5の位置データとを取得する。またこのとき、画像認識部31は、撮影装置14により撮影された画像データから構造物が載置されるベース部分を形成するベース部を認識する。
Next, in
次にステップ103で、クエリ生成部32は、ステップ102で取得された各部品IDと、該部品IDのそれぞれに従属する位置データとを含むクエリを生成する。
Next, in step 103, the
次にステップ104で、データ取得部33は、生成されたクエリを用いて、部品データベース41から、クエリが含む部品IDのそれぞれに関連付けられた部品5の3次元モデル及び制約データを取得する。
Next, in step 104, the
次にステップ105で、部品配置部34は、クエリが含む部品IDごとに、位置データと、3次元モデルとを用いて、実空間と対応させた仮想空間に各部品5を配置する。また、部品配置部34は、ベース部を仮想空間上に配置する。続いて、部品配置部34は、配置された部品5のそれぞれが隣接しているか否かを判定することにより、配置された部品5のうち隣接する2つの部品5の組をそれぞれ特定する。部品配置部34は、隣接していると特定された2つの部品5の組から所定の順番で2つの部品5の組を選択する。部品配置部34は、隣接していると特定された2つの部品5の組のそれぞれにおいて、接合制約条件を満たすように、2つの部品5のうちのいずれか一方を移動等させて位置を調整し、配置を確定する。
Next, in
次にステップ106で、整合性判定部35は、ステップ105で配置された各部品5の位置関係に基づいて、具体的には以下の判定の少なくとも1つにより、配置された各部品5の位置の整合性を判定する。整合性判定部35は、配置された各部品5の位置とベース部の位置との位置関係から、配置された各部品5が(a)重力に従った配置の場合は整合性が有ると判定し、(b)重力に従った配置でない場合は整合性が無いと判定する。更に整合性判定部35は、配置された各部品5の3次元モデルが占める領域の重複が(a)所定の体積以内である場合は整合性が有ると判定し、(b)所定の体積を超える場合は整合性が無いと判定する。更に整合性判定部35は、撮影装置14により撮影された画像と、部品配置部34が仮想空間上に配置した各部品5の仮想カメラから見た画像との一致度が(a)既定値以上である場合は整合性が有ると判定し、(b)既定値未満である場合は整合性が無いと判定する。
Next, in step 106, the
ステップ106で、すべて(a)整合性が有ると判定された場合、本処理はステップ107へ進み、立体認識部36は、ステップ105で配置された各部品5の位置により構造物を認識し、本処理は終了する。
If it is determined in step 106 that all (a) consistency is present, the process proceeds to step 107, and the three-
ステップ106で、1つでも(b)整合性が無いと判定された場合、本処理はステップ108へ進む。ステップ108で、データベース記憶部37は、ステップ104で用いたクエリを履歴データベース42に記憶し、本処理はステップ109へ進む。
If it is determined in step 106 that at least one (b) is not consistent, the process proceeds to step 108. In
ステップ109で、クエリ再生成決定部38は、履歴データベース42が記憶するクエリが、部品データベース41が記憶する複数の部品5それぞれの部品IDの所定の組み合わせを含むか否かを判定する。クエリ再生成決定部38は、履歴データベース41が部品IDの所定の組み合わせを包含するクエリを含まない場合、クエリを再生成すると決定し、本処理はステップ110へ進む。クエリ再生成決定部38は、履歴データベース41が部品IDの所定の組み合わせを包含するクエリを含む場合、クエリを再生成しないと決定し、本処理は終了する。電子装置3は、クエリを再生成しないと決定して本処理を終了する場合、表示装置12等にエラーを出力することができる。
In step 109, the query
ステップ110で、クエリ再生成部39は、履歴データベース42が記憶するクエリと異なるクエリを生成し、本処理はステップ104へ進む。クエリ再生成部39は、部品配置部34が仮想空間に配置した部品5のうちの2つの部品5の3次元モデル間の長さが所定値以上である場合、該長さに対応する部品5の部品IDを追加したクエリを優先的に生成する。
In
次に、本発明の実施形態による立体認識システム1の作用効果について説明する。本実施形態では、立体認識システム1は、予め用意された部品5が組み合わされて作成される構造物を対象とし、部品5ごとに、部品5の3次元モデルと接合の仕方を示す接合制約条件を予め定義するものであり、これらのデータを部品データベース41に記憶する。立体認識システム1は、標準的なスマートフォンのカメラを用いて撮影された撮影画像を入力とし、当該撮影画像から直接立体形状を認識せずに、構造物を構成する要素(部品5)を個別に独立して検出する。立体認識システム1は、個別に検出した部品5の部品IDを含むクエリを生成し、クエリを用いて部品データベース41からデータを取得して、接合制約条件を満たすように、各部品5の3次元モデルを接合し、仮想空間上に配置する。立体認識システム1は、部品配置の物理的整合性を評価し、適切な配置を得るまで、クエリを更新しながら、部品データベース41に対する検索と位置合わせを繰り返す。
Next, the effect of the three-
このような構成とすることにより、本実施形態では、立体認識システム1は、単一画像から構造物全体の3次元モデルを再構築し、その立体形状を認識することが可能となる。特に、単一画像から直接認識するにあたって、既存の立体形状認識技術では対応できない、外面の露出が少ない部品の空間情報についても推定し、構造物全体の立体形状を認識することが可能となる。これにより、本実施形態では、構造物を撮影した平面画像から立体形状を認識する際の、ユーザ操作の単純さと、構造物を作成する際の自由度との両立が可能となる。
With such a configuration, in the present embodiment, the three-
またこのような構成とすることにより、本実施形態では、立体認識システム1は、接合制約条件を用いて部品5の接合位置に対する制限を定めることにより、部品5の位置を自動的に補正する機能を有する。これにより、部品5の組み立て過程や画像処理過程において発生するノイズを緩和し、より安定的に構造物を認識することが可能となる。
Further, by adopting such a configuration, in the present embodiment, the three-
またこのような構成とすることにより、本実施形態では、立体認識システム1は、既知の部品5だけを認識するため、部品5の認識に対する機械学習が不要であり、計算コストを低減することが可能となる。
Further, by adopting such a configuration, in the present embodiment, since the three-
またこのような構成とすることにより、本実施形態では、立体認識システム1は、特別なセンサに依拠せず、標準的なスマートフォンのカメラを用いて撮影された画像のみを入力とすることから、特別な機材を必要としないため、安価に実現することが可能となる。また部品5は、剛体として形状が変化しにくければどのような材質を使ってもよいため、用途に併せて安価に製造することが可能となる。例えば投げる・踏むといった強い衝撃が想定されるアプリケーションの場合には木材を、部品5の作成まで含めてユーザに委ねるアプリケーションの場合には紙を用いるといったように、アプリケーションに応じて適切な材質を選択可能である。
Further, by adopting such a configuration, in the present embodiment, since the three-
また本実施形態では、立体認識システム1は、クエリを更新しながら検索と位置合わせを繰り返すとき、クエリの履歴を履歴データベース42に記憶することにより、同じクエリを用いて検索することを防止する。このような構成とすることにより、クエリを再生成する回数を有限にし、立体認識システム1の処理を適切に停止させることが可能となる。また履歴データベース42は同じクエリを用いた検索をしないようにするために用いるものであるため、立体認識システム1は、構造物の認識処理を開始する前に、履歴データベース42が記憶するクエリを消去する。
Further, in the present embodiment, when repeating the search and the alignment while updating the query, the three-
また本実施形態では、立体認識システム1は、仮想空間に最初に配置された2つの部品5の接合基準点6間の長さが所定値以内であるか否かを判定し、所定値以内である場合、2つの部品5は隣接していると判定する。このような構成とすることにより、立体認識システム1は、所定値以内の距離にある2つの部品5の組では、接合制約条件を満たすように位置調整を行い、そうでない部品5については、接合制約条件を満たすように位置調整を行わないようにすることが可能となる。これにより、撮影画像からある部品5が検出されなかった場合などに、該部品5を挟むようにして配置された2つの部品5に対して、接合制約条件を満たすように位置調整を行ってしまうことを防止し、不整合検出を低減することが可能となる。
Further, in the present embodiment, the three-
また本実施形態では、マーカは、ARマーカであり、例えば矩形状の黒枠とその内部に描かれた左右非対称のドットパターンにより構成され、ドットパターンは各部品5により異なるように構成される。これにより、立体認識システム1は、既知の画像認識技術を用いて、例えばマーカが撮影された画像における矩形状の黒枠の形状及び大きさから、撮影装置14からの該マーカの位置及び姿勢を取得することが可能となる。また立体認識システム1は、既知の画像認識技術を用いて、例えばマーカが撮影された画像におけるドットパターンから、各部品5を識別することが可能となる。
Further, in the present embodiment, the marker is an AR marker, and is constituted of, for example, a rectangular black frame and an asymmetric dot pattern drawn inside thereof, and the dot pattern is configured to be different depending on each component 5. Thereby, using the known image recognition technology, the
また本実施形態では、クエリは、部品IDと、部品IDに従属するデータとを含み、部品IDに従属するデータは、部品IDに対応付けられた部品5の位置データと、3次元モデルと、制約データとを含む。立体認識システム1は、クエリが生成された場合、該クエリを用いて、部品データベース41から、該クエリが含む各部品IDに関連付けられた部品5それぞれの3次元モデル及び制約データを、該部品IDに対応付けて該クエリにそれぞれ加える。このようにして、立体認識システム1は、部品データベース41から、部品5それぞれの3次元モデル及び制約データを取得する。このように、本実施形態では、立体認識システム1は、部品データベース41における検索、部品データベース41からのデータ取得、及び履歴データベース42へのデータの記憶を、クエリを用いて行う。これにより、立体認識システム1の情報処理をより効率化することが可能となる。
Further, in the present embodiment, the query includes a part ID and data subordinate to the part ID, and the data subordinate to the part ID corresponds to position data of the part 5 associated with the part ID, a three-dimensional model, And constraint data. When a query is generated, the three-
また本実施形態では、立体認識システム1は、配置された各部品5の3次元モデルが占める領域の重複度合いに基づいて、配置された各部品5の位置の整合性を判定する。また本実施形態では、立体認識システム1は、配置された各部品5の位置とベース部の位置との位置関係から、配置された各部品5が重力に従った配置であるか否かを判定する。また本実施形態では、立体認識システム1は、撮影装置14により撮影された画像と、部品配置部34が仮想空間上に配置した各部品5の仮想カメラから見た画像との一致度に基づいて、整合性を判定する。このような構成とすることにより、本実施形態では、立体認識システム1は、部品配置の物理的整合性を評価することが可能となる。これにより、立体認識システム1は、認識した構造物が適切なものであるか否かを判断することが可能となる。
Further, in the present embodiment, the three-
また本実施形態では、立体認識システム1は、履歴データベース42が記憶するクエリが、部品データベース41が記憶する部品IDの所定の組み合わせを含むか否かを判定する。部品IDの所定の組み合わせが、一定値以上の確度で画像認識部31により認識された部品IDや一定値以上の優先度の部品IDを含むものである場合、生成するクエリの種類をより限定することが可能となる。これにより、立体認識システム1の情報処理をより効率化することが可能となる。部品IDの所定の組み合わせがすべての組み合わせである場合、部品データベース41に基づいて生成可能な全クエリを生成することが可能であるとともに、クエリを再生成する回数を有限にし、立体認識システム1の処理を適切に停止させることが可能となる。
Further, in the present embodiment, the three-
また本実施形態では、立体認識システム1は、クエリを再生成すると決定した場合、仮想空間に配置した部品5のうちの2つの部品5の3次元モデル間の長さが所定値以上である場合、該長さに対応する部品5の部品IDを追加したクエリを生成する。このような構成とすることにより、本実施形態では、撮影画像から認識できなかった部品5を推定し、該部品5を追加したクエリを優先的に生成することで、立体認識システム1の情報処理をより効率化することが可能となる。
In the present embodiment, when it is determined that the three-
上記の作用効果は、特に言及が無い限り、他の実施形態や他の実施例においても同様である。 The above-described effects are the same in the other embodiments and the other examples unless otherwise stated.
本発明の他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現するプログラムや該プログラムを格納したコンピュータ読み取り可能な記憶媒体とすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を単独で実現する電子装置とすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現する方法とすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現するプログラムをコンピュータに供給することができるサーバとすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現する仮想マシンとすることもできる。 In another embodiment of the present invention, a program for realizing the information processing shown in the functions and flowcharts of the embodiments of the present invention described above and a computer readable storage medium storing the program can also be used. In another embodiment, the electronic apparatus may independently implement the information processing shown in the functions and flowcharts of the embodiments of the present invention described above. Another embodiment can be a method for realizing the information processing shown in the function or the flowchart of the embodiment of the present invention described above. In another embodiment, a server that can supply a computer with a program that implements the information processing shown in the functions and flowcharts of the embodiments of the present invention described above can also be used. In another embodiment, a virtual machine can be realized that implements the information processing shown in the functions and flowcharts of the embodiments of the present invention described above.
以下に本発明の実施形態の変形例について説明する。以下で述べる変形例は、矛盾が生じない限りにおいて、適宜組み合わせて本発明の任意の実施形態に適用することができる。 Hereinafter, modified examples of the embodiment of the present invention will be described. The modifications described below can be appropriately combined and applied to any embodiment of the present invention as long as no contradiction arises.
1つの例では、一の部品5の位置合わせ用メタデータは、一の部品5の接合基準点に対する他の任意の部品の接合基準点の距離と角度の条件により定められるものであり、一の部品5と他の任意の1つの部品5との制約を定めるデータである。本例示においては、部品データベース41は、一の部品5と接合する任意の部品5との制約を定める1つの位置合わせ用メタデータを、一の部品5の部品IDに関連付けて記憶する。本例示においては、一の部品5の制約データは、1つの位置合わせ用メタデータを有し、該位置合わせ用メタデータは、接合基準点6及び該接合基準点6に従属するデータとして位置の制約及び姿勢の制約の要素を有する。
In one example, the alignment metadata of one part 5 is determined by the distance and angle condition of the joint reference point of any other part with respect to the joint reference point of one part 5; It is data that defines the constraints of the part 5 and any other one part 5. In the present example, the
1つの例では、部品配置部34は、最初に配置された2つの部品5の中心点間の長さが所定値以内であるか否かを判定し、所定値以内である場合、2つの部品5は隣接していると判定する。他の例では、部品配置部34は、最初に配置された2つの部品5の剛体間の長さが所定値以内であるか否かを判定し、所定値以内である場合、2つの部品5は隣接していると判定する。いずれの場合も、部品配置部34は、隣接していると判定された2つの部品5の組から所定の順番で部品5の組を選択し、当該組それぞれにおいて、接合制約条件を満たすように、2つの部品5のうちのいずれか一方を移動等させて、配置を確定する。
In one example, the
1つの例では、ステップ106において、整合性判定部35は、整合性が無いと判定した場合、部品配置部34が配置した各部品5の位置の整合性の評価値を算出する。ステップ108において、データベース記憶部37は、クエリ保存用データが含む部品IDのそれぞれに関連付けて、部品配置部34が配置した各部品5の位置の整合性の評価値を履歴データベース42に更に記憶する。ステップ109において、クエリ再生成決定部38がクエリを再生成しないと決定した場合、電子装置3は、ステップ105において、評価値により最も高い整合性を有するクエリを用いて仮想空間に配置した各部品5の3次元モデル及び位置データにより構造物を認識する。これにより、電子装置3は、整合性が無いと判定された各部品5の配置の中で、評価値により最も高い整合性を有する各部品5の配置を用いて、構造物全体の3次元モデルを認識することが可能となる。
In one example, when it is determined in step 106 that the
以上に説明した処理又は動作において、あるステップにおいて、そのステップではまだ利用することができないはずのデータを利用しているなどの処理又は動作上の矛盾が生じない限りにおいて、処理又は動作を自由に変更することができる。また以上に説明してきた各実施例は、本発明を説明するための例示であり、本発明はこれらの実施例に限定されるものではない。本発明は、その要旨を逸脱しない限り、種々の形態で実施することができる。例えば、各装置の各装置の外観形状は図示されたものに限定されない。 In the processing or operation described above, in a step, processing or operation is free as long as no processing or operation contradiction occurs such as using data which should not be available in the step. It can be changed. The embodiments described above are merely examples for explaining the present invention, and the present invention is not limited to these embodiments. The present invention can be practiced in various forms without departing from the scope of the invention. For example, the external shape of each device of each device is not limited to that illustrated.
1 立体認識システム
2 ネットワーク
3 電子装置
4 サーバ
5 部品
6 接合基準点
11、21 プロセッサ
12、22 表示装置
13、23 入力装置
14 撮影装置
15、24 記憶装置
16、25 通信装置
31 画像認識部
32 クエリ生成部
33 データ取得部
34 部品配置部
35 整合性判定部
36 立体認識部
37 データベース記憶部
38 クエリ再生成決定部
39 クエリ再生成部
41 部品データベース
42 履歴データベース
Claims (19)
前記撮影装置により撮影された画像から各部品を識別可能な特徴をそれぞれ抽出し、該特徴に基づいて部品のそれぞれのID及び該部品の位置データを取得する画像認識ステップと、
前記特徴に基づいて取得された部品のそれぞれのIDを含むクエリを生成するクエリ生成ステップと、
クエリが生成された場合、該クエリを用いて、各部品のID、各部品の3次元モデル、及び各部品間の接合制約条件を示す制約データを関連付けて記憶する部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを取得するデータ取得ステップと、
前記取得された部品それぞれの位置データ、3次元モデル、及び制約データに基づいて前記実空間と対応させた仮想空間に各部品を配置する部品配置ステップと、
前記配置された各部品の位置関係に基づいて、前記配置された各部品の位置の整合性を判定する整合性判定ステップと、
前記整合性が有ると判定された場合、前記配置された各部品の位置に基づいて立体を認識する立体認識ステップと、
前記整合性が無いと判定された場合、
前記データ取得ステップにおいて用いたクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを履歴データベースに記憶するデータベース記憶ステップと、 前記履歴データベースが記憶するクエリ保存用データ及び前記部品データベースが記憶するデータに基づいて、クエリを再生成するか否かを決定するクエリ再生成決定ステップと、
クエリを再生成すると決定された場合、前記履歴データベースが記憶するクエリ保存用データと異なるデータを含むクエリを生成するクエリ再生成ステップと、
を実行させる、プログラム。 A program for recognizing a solid in a real space composed of a plurality of predetermined parts, the program being executed in an electronic device provided with a photographing device for photographing the solid, To electronic devices,
An image recognition step of extracting features capable of identifying each part from the image captured by the imaging device, and acquiring each ID of the part and position data of the part based on the feature;
A query generation step of generating a query including an ID of each of the parts acquired based on the feature;
When a query is generated, the query includes the component database that stores the ID of each component, the three-dimensional model of each component, and the constraint data indicating the junction constraint between each component using the query. A data acquisition step of acquiring a three-dimensional model and constraint data of each of the parts associated with each of the IDs;
A component arrangement step of arranging each component in a virtual space corresponding to the real space based on the acquired position data of each component, the three-dimensional model, and the constraint data;
A consistency determination step of determining the alignment of the positions of the arranged parts based on the positional relationship of the arranged parts;
A three-dimensional recognition step of recognizing a three-dimensional object based on the position of each of the arranged parts when it is determined that the consistency is present;
If it is determined that the consistency is not present,
A database storage step of storing, in a history database, query storage data including at least each component ID among the queries used in the data acquisition step; query storage data stored in the history database and data stored in the components database A query regeneration decision step of deciding whether to regenerate the query based on
A query regenerating step of generating a query including data different from the query storage data stored in the history database, when it is determined to regenerate the query;
To run the program.
前記画像認識ステップの前に、前記履歴データベースが記憶するクエリ保存用データを消去するデータベース初期化ステップを実行させる、請求項1に記載のプログラム。 The program is stored in the electronic device
The program according to claim 1, wherein before the image recognition step, a database initialization step of deleting the query storage data stored in the history database is executed.
前記部品配置ステップは、該ベース部を前記仮想空間上に配置し、
前記整合性判定ステップは、前記配置された各部品の位置と前記ベース部の位置との位置関係から前記配置された各部品が重力に従った配置であるか否かを判定し、該判定に更に基づいて整合性を判定する、請求項1から8のいずれか1項に記載のプログラム。 The image recognition step recognizes a base portion that forms a base portion of the solid from the image captured by the imaging device,
The component placement step places the base portion on the virtual space,
The consistency determination step determines whether or not each of the arranged parts is arranged according to gravity from the positional relationship between the positions of the arranged parts and the position of the base portion, and the judgment is made on the basis of the judgment. The program according to any one of claims 1 to 8, wherein the consistency is further determined.
クエリを再生成しないと決定された場合、エラーを出力するエラー出力ステップを更に実行させる、請求項1から12のいずれか1項に記載のプログラム。 The program is stored in the electronic device
The program according to any one of claims 1 to 12, further causing an error output step of outputting an error if it is determined that the query is not regenerated.
クエリを再生成しないと決定された場合、前記評価値により最も高い整合性を有する前記配置された各部品の位置に基づいて立体を認識する第2の立体認識ステップを実行させる、請求項14に記載のプログラム。 The program is stored in the electronic device
The second three-dimensional recognition step of recognizing a three-dimensional object based on the position of each of the arranged parts having the highest consistency by the evaluation value is executed when it is determined that the query is not regenerated. Described program.
前記立体を撮影するための撮影装置を備える電子装置と、
各部品のID、各部品の3次元モデル、及び各部品間の接合制約条件を示す制約データを関連付けて記憶する部品データベースと、
前記部品データベースに入力されるクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを記憶する履歴データベースと、
前記撮影装置により撮影された画像から各部品を識別可能な特徴をそれぞれ抽出し、該特徴に基づいて部品のそれぞれのID及び該部品の位置データを取得する画像認識部と、 前記特徴に基づいて取得された部品のそれぞれのIDを含むクエリを生成するクエリ生成部と、
クエリが生成された場合、該クエリを用いて、前記部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを取得するデータ取得部と、
前記取得された部品それぞれの位置データ、3次元モデル、及び制約データに基づいて前記実空間と対応させた仮想空間に各部品を配置する部品配置部と、
前記配置された各部品の位置関係に基づいて、前記配置された各部品の位置の整合性を判定する整合性判定部と、
前記整合性が有ると判定された場合、前記配置された各部品の位置に基づいて立体を認識する立体認識部と、
前記整合性が無いと判定された場合、
前記データ取得部が用いたクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを前記履歴データベースに記憶するデータベース記憶部と、
前記履歴データベースが記憶するクエリ保存用データ及び前記部品データベースが記憶するデータに基づいて、クエリを再生成するか否かを決定するクエリ再生成決定部と、 クエリを再生成すると決定された場合、前記履歴データベースが記憶するクエリ保存用データとは異なるデータを含むクエリを生成するクエリ再生成部と、
を備える、立体認識システム。 A three-dimensional recognition system for recognizing a three-dimensional object in a real space composed of a plurality of predetermined parts, comprising:
An electronic device comprising a photographing device for photographing the three-dimensional object;
A part database that associates and stores ID of each part, a three-dimensional model of each part, and constraint data indicating joining constraints among the parts;
A history database storing query storage data including at least the ID of each of the queries input to the components database;
An image recognition unit which extracts features capable of identifying each part from the image captured by the imaging device, and acquires an ID of each part and position data of the part based on the feature; and A query generation unit that generates a query including the ID of each of the acquired parts;
When a query is generated, using the query, a data acquisition unit that acquires, from the component database, a three-dimensional model of each of the components associated with each of the IDs included in the query and constraint data;
A component placement unit for placing each component in a virtual space corresponding to the real space based on the acquired position data of each component, the three-dimensional model, and the constraint data;
A consistency determination unit that determines the alignment of the positions of the arranged parts based on the positional relationship of the arranged parts;
A three-dimensional recognition unit that recognizes a three-dimensional object based on the position of each of the arranged parts when it is determined that the consistency is present;
If it is determined that the consistency is not present,
A database storage unit for storing, in the history database, query storage data including at least an ID of each of the components used by the data acquisition unit;
A query regeneration determination unit that determines whether to regenerate the query based on the query storage data stored in the history database and the data stored in the component database, and it is determined to regenerate the query A query regenerating unit that generates a query including data different from the query storage data stored in the history database;
A three-dimensional recognition system comprising
前記立体を撮影するための撮影装置と、
各部品のID、各部品の3次元モデル、及び各部品間の接合制約条件を示す制約データを関連付けて記憶する部品データベースと、
前記部品データベースに入力されるクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを記憶する履歴データベースと、
前記撮影装置により撮影された画像から各部品を識別可能な特徴をそれぞれ抽出し、該特徴に基づいて部品のそれぞれのID及び該部品の位置データを取得する画像認識部と、 前記特徴に基づいて取得された部品のそれぞれのIDを含むクエリを生成するクエリ生成部と、
クエリが生成された場合、該クエリを用いて、前記部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを取得するデータ取得部と、
前記取得された部品それぞれの位置データ、3次元モデル、及び制約データに基づいて前記実空間と対応させた仮想空間に各部品を配置する部品配置部と、
前記配置された各部品の位置関係に基づいて、前記配置された各部品の位置の整合性を判定する整合性判定部と、
前記整合性が有ると判定された場合、前記配置された各部品の位置に基づいて立体を認識する立体認識部と、
前記整合性が無いと判定された場合、
前記データ取得部が用いたクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを前記履歴データベースに記憶するデータベース記憶部と、
前記履歴データベースが記憶するクエリ保存用データ及び前記部品データベースが記憶するデータに基づいて、クエリを再生成するか否かを決定するクエリ再生成決定部と、 クエリを再生成すると決定された場合、前記履歴データベースが記憶するクエリ保存用データとは異なるデータを含むクエリを生成するクエリ再生成部と、
を備える、電子装置。 An electronic device for recognizing a solid in a real space composed of a plurality of predetermined parts, the electronic device comprising:
A photographing device for photographing the solid;
A part database that associates and stores ID of each part, a three-dimensional model of each part, and constraint data indicating joining constraints among the parts;
A history database storing query storage data including at least the ID of each of the queries input to the components database;
An image recognition unit which extracts features capable of identifying each part from the image captured by the imaging device, and acquires an ID of each part and position data of the part based on the feature; and A query generation unit that generates a query including the ID of each of the acquired parts;
When a query is generated, using the query, a data acquisition unit that acquires, from the component database, a three-dimensional model of each of the components associated with each of the IDs included in the query and constraint data;
A component placement unit for placing each component in a virtual space corresponding to the real space based on the acquired position data of each component, the three-dimensional model, and the constraint data;
A consistency determination unit that determines the alignment of the positions of the arranged parts based on the positional relationship of the arranged parts;
A three-dimensional recognition unit that recognizes a three-dimensional object based on the position of each of the arranged parts when it is determined that the consistency is present;
If it is determined that the consistency is not present,
A database storage unit for storing, in the history database, query storage data including at least an ID of each of the components used by the data acquisition unit;
A query regeneration determination unit that determines whether to regenerate the query based on the query storage data stored in the history database and the data stored in the component database, and it is determined to regenerate the query A query regenerating unit that generates a query including data different from the query storage data stored in the history database;
An electronic device comprising:
前記撮影装置により撮影された画像から各部品を識別可能な特徴をそれぞれ抽出し、該特徴に基づいて部品のそれぞれのID及び該部品の位置データを取得する画像認識ステップと、
前記特徴に基づいて取得された部品のそれぞれのIDを含むクエリを生成するクエリ生成ステップと、
クエリが生成された場合、該クエリを用いて、各部品のID、各部品の3次元モデル、及び各部品間の接合制約条件を示す制約データを関連付けて記憶する部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを取得するデータ取得ステップと、
前記取得された部品それぞれの位置データ、3次元モデル、及び制約データに基づいて前記実空間と対応させた仮想空間に各部品を配置する部品配置ステップと、
前記配置された各部品の位置関係に基づいて、前記配置された各部品の位置の整合性を判定する整合性判定ステップと、
前記整合性が有ると判定された場合、前記配置された各部品の位置に基づいて立体を認識する立体認識ステップと、
前記整合性が無いと判定された場合、
前記データ取得ステップにおいて用いたクエリのうち少なくとも部品それぞれのIDを含むクエリ保存用データを履歴データベースに記憶するデータベース記憶ステップと、 前記履歴データベースが記憶するクエリ保存用データ及び前記部品データベースが記憶するデータに基づいて、クエリを再生成するか否かを決定するクエリ再生成決定ステップと、
クエリを再生成すると決定された場合、前記履歴データベースが記憶するクエリ保存用データと異なるデータを含むクエリを生成するクエリ再生成ステップと、
を含む、方法。 A method implemented in an electronic device comprising a photographing device for photographing a solid, for recognizing a solid in a real space composed of a plurality of predetermined parts.
An image recognition step of extracting features capable of identifying each part from the image captured by the imaging device, and acquiring each ID of the part and position data of the part based on the feature;
A query generation step of generating a query including an ID of each of the parts acquired based on the feature;
When a query is generated, the query includes the component database that stores the ID of each component, the three-dimensional model of each component, and the constraint data indicating the junction constraint between each component using the query. A data acquisition step of acquiring a three-dimensional model and constraint data of each of the parts associated with each of the IDs;
A component arrangement step of arranging each component in a virtual space corresponding to the real space based on the acquired position data of each component, the three-dimensional model, and the constraint data;
A consistency determination step of determining the alignment of the positions of the arranged parts based on the positional relationship of the arranged parts;
A three-dimensional recognition step of recognizing a three-dimensional object based on the position of each of the arranged parts when it is determined that the consistency is present;
If it is determined that the consistency is not present,
A database storage step of storing, in a history database, query storage data including at least each component ID among the queries used in the data acquisition step; query storage data stored in the history database and data stored in the components database A query regeneration decision step of deciding whether to regenerate the query based on
A query regenerating step of generating a query including data different from the query storage data stored in the history database, when it is determined to regenerate the query;
Method, including.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018129249A JP2019114226A (en) | 2018-07-06 | 2018-07-06 | Program, system, electronic device and method for enabling solid to be recognized |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018129249A JP2019114226A (en) | 2018-07-06 | 2018-07-06 | Program, system, electronic device and method for enabling solid to be recognized |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017244891A Division JP6368421B1 (en) | 2017-12-21 | 2017-12-21 | Program, system, electronic apparatus, and method for recognizing solid |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019114226A true JP2019114226A (en) | 2019-07-11 |
Family
ID=67223241
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018129249A Pending JP2019114226A (en) | 2018-07-06 | 2018-07-06 | Program, system, electronic device and method for enabling solid to be recognized |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019114226A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05274378A (en) * | 1992-03-30 | 1993-10-22 | Toshiba Corp | Automatic design cad system |
JPH0696164A (en) * | 1992-09-14 | 1994-04-08 | A T R Tsushin Syst Kenkyusho:Kk | Three-dimensional image data base generating system |
JP2004265050A (en) * | 2003-02-28 | 2004-09-24 | Calsonic Kansei Corp | Measurement method for gap between component models and gap analysis model production method |
JP2007087276A (en) * | 2005-09-26 | 2007-04-05 | Matsushita Electric Ind Co Ltd | Component information providing device |
JP2013544406A (en) * | 2010-11-16 | 2013-12-12 | マイクロソフト コーポレーション | Browsing related image search result sets |
JP6368421B1 (en) * | 2017-12-21 | 2018-08-01 | 株式会社Cygames | Program, system, electronic apparatus, and method for recognizing solid |
-
2018
- 2018-07-06 JP JP2018129249A patent/JP2019114226A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05274378A (en) * | 1992-03-30 | 1993-10-22 | Toshiba Corp | Automatic design cad system |
JPH0696164A (en) * | 1992-09-14 | 1994-04-08 | A T R Tsushin Syst Kenkyusho:Kk | Three-dimensional image data base generating system |
JP2004265050A (en) * | 2003-02-28 | 2004-09-24 | Calsonic Kansei Corp | Measurement method for gap between component models and gap analysis model production method |
JP2007087276A (en) * | 2005-09-26 | 2007-04-05 | Matsushita Electric Ind Co Ltd | Component information providing device |
JP2013544406A (en) * | 2010-11-16 | 2013-12-12 | マイクロソフト コーポレーション | Browsing related image search result sets |
JP6368421B1 (en) * | 2017-12-21 | 2018-08-01 | 株式会社Cygames | Program, system, electronic apparatus, and method for recognizing solid |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10674142B2 (en) | Optimized object scanning using sensor fusion | |
JP6934887B2 (en) | Methods and systems for real-time 3D capture and live feedback with monocular cameras | |
US11308347B2 (en) | Method of determining a similarity transformation between first and second coordinates of 3D features | |
WO2020206903A1 (en) | Image matching method and device, and computer readable storage medium | |
CN110264509A (en) | Determine the method, apparatus and its storage medium of the pose of image-capturing apparatus | |
CN108875133A (en) | Determine architectural composition | |
US11461921B2 (en) | Program, system, electronic device, and method for recognizing three-dimensional object | |
JP2022544717A (en) | Systems and methods for real-time multiple modality image alignment | |
EP3815051B1 (en) | System and method for multi-user augmented reality shopping | |
KR20110133587A (en) | A method for determining the relative position of a first and a second imaging device and devices therefore | |
JP2017123087A (en) | Program, device and method for calculating normal vector of planar object reflected in continuous photographic images | |
Rother | Multi-view reconstruction and camera recovery using a real or virtual reference plane | |
JP2010113530A (en) | Image recognition device and program | |
JP6086491B2 (en) | Image processing apparatus and database construction apparatus thereof | |
JP2019114226A (en) | Program, system, electronic device and method for enabling solid to be recognized | |
JP6840968B2 (en) | Shape estimation method, shape estimation device and shape estimation program | |
JP6584139B2 (en) | Information processing apparatus, information processing method, and program | |
KR20230013851A (en) | Method and apparatus for generating a map of points of interest based on a co-visibility graph | |
CN110211243A (en) | AR equipment and its entity mask method | |
JP6071142B2 (en) | Image converter | |
TWI763453B (en) | Control method and system for picking equipment and automatic picking system | |
CN112767484B (en) | Fusion method of positioning model, positioning method and electronic device | |
US20230334810A1 (en) | Methods, storage media, and systems for generating a three-dimensional coordinate system | |
WO2023127005A1 (en) | Data augmentation device, data augmentation method, and computer-readable recording medium | |
JP6168601B2 (en) | Image converter |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201221 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220216 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20220418 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20220810 |