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 PDF

Info

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
Application number
JP2018129249A
Other languages
Japanese (ja)
Inventor
洋輝 花岡
Hiroki Hanaoka
洋輝 花岡
修一 倉林
Shuichi Kurabayashi
修一 倉林
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.)
Cygames Inc
Original Assignee
Cygames Inc
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 Cygames Inc filed Critical Cygames Inc
Priority to JP2018129249A priority Critical patent/JP2019114226A/en
Publication of JP2019114226A publication Critical patent/JP2019114226A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a program enabling a solid shape to be recognized from a single image.SOLUTION: A program, which enables a solid made up of predetermined plural components in an actual space to be recognized, is executed by an electronic device mounted with an imaging unit to image the solid. The program causes the electronic device to execute: an image recognition step; a query generation step; a data acquisition step; a component arrangement step; a consistency determination step; a solid recognition step when consistency is determined; and database storage, query regeneration determination and query regeneration steps when the consistency is not determined.SELECTED DRAWING: Figure 1

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 Document 1 discloses a technique for shape recognition by associating a plurality of images using a technique called Structure from Motion (SfM). Further, for example, Non-Patent Document 2 discloses a technique of shape recognition using a single image as an input and assuming a specific object such as a human body or an expression. The technology focuses on the fact that human facial expressions are globally similar and there are many local differences, and by transforming an existing 3D model, a 3D model corresponding to an input image is constructed. is there.

Marc Pollefeys, Luc Van Gool, Maarten Vergauwen, Frank Verbiest, Kurt Cornelis, Jan Tops, Reinhard Koch. 2004. Visual Modeling with a Hand-Held Camera. International Journal of Computer Vision.Marc Pollefeys, Luc Van Gool, Maarten Vergauwen, Frank Verbiest, Kurt Cornelis, Jan Tops, Reinhard Koch. 2004. Visual Modeling with a Hand-Held Camera. International Journal of Computer Vision. Ira Kemelmacher-Shlizerman, Ronen Basri. 2011. 3D face reconstruction from a single image using a single reference face shape. IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE.IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE. 2011. 3D face reconstruction from a single image using a single reference face shape.

しかしながら、非特許文献1が開示する技術は、ユーザが複数回の撮影を行うか、又は複数台のカメラを用いて撮影を行う必要があり、ユーザ操作が複雑化する。また、非特許文献2が開示する技術は、構造物が既知であることを前提とするため、ユーザが自由に作成するような構造物の認識には適用することができない。このように、自由な形状の構造物を対象とした、単一の平面画像からの立体形状認識技術は、有効なものが未だ確立されていない。   However, in the technique disclosed in Non-Patent Document 1, it is necessary for the user to perform photographing a plurality of times or to perform photographing using a plurality of cameras, which complicates the user operation. Further, the technology disclosed in Non-Patent Document 2 can not be applied to recognition of a structure that a user can freely create, since it is premised that the structure is known. As described above, a three-dimensional shape recognition technique from a single plane image for a free-form structure has not yet been established.

本発明は、このような課題を解決するためになされたものであり、単一の画像から立体形状を認識することが可能なプログラム等を提供することを主目的とする。   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.

本発明の一実施形態による立体認識システムの全体構成図である。BRIEF DESCRIPTION OF THE DRAWINGS It is a whole block diagram of the three-dimensional recognition system by one Embodiment of this invention. 本発明の一実施形態による電子装置のハードウェア構成を示すブロック図である。It is a block diagram showing the hardware constitutions of the electronic device by one embodiment of the present invention. 本発明の一実施形態によるサーバのハードウェア構成を示すブロック図である。It is a block diagram showing the hardware constitutions of the server by one embodiment of the present invention. 本発明の一実施形態によるサーバの機能ブロック図の一例を示す。FIG. 6 shows an example of a functional block diagram of a server according to an embodiment of the present invention. 本発明の一実施形態による電子装置の機能ブロック図の一例を示す。FIG. 1 shows an example of a functional block diagram of an electronic device according to an embodiment of the present invention. 撮影装置による撮影画像の一例を示す図である。It is a figure which shows an example of the imaging | photography image by an imaging device. 図6に示す撮影画像から画像認識部が認識した3つの部品を示す図である。It is a figure which shows three components which the image recognition part recognized from the picked-up image shown in FIG. 図7に示す画像認識部が認識した3つの部品から、部品配置部が隣接する2つの部品の組をそれぞれ特定し、接合制約条件を満たすように移動等させた様子を示す図である。It is a figure which shows a mode that the group of two components which a components arrangement | positioning part adjoins is specified from the three components which the image recognition part shown in FIG. 7 recognized, respectively, and it moves so that a joining restrictions condition may be satisfy | filled. 図8に示す部品配置部が配置を確定した部品により立体認識部が認識した構造物を示す図である。It is a figure which shows the structure which the three-dimensional recognition part recognized by the components which the components arrangement | positioning part shown in FIG. 8 decided arrangement | positioning. 本発明の一実施形態による立体認識システムの情報処理を示すフローチャートである。It is a flowchart which shows the information processing of the three-dimensional recognition system by one Embodiment of this invention.

以下、図面を参照して、本発明の実施形態による立体認識システム1について説明する。本明細書においては、説明の便宜上、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明や実質的に同一の構成についての重複説明を省略する場合がある。   Hereinafter, a three-dimensional recognition system 1 according to an embodiment of the present invention will be described with reference to the drawings. In the present specification, for convenience of description, the description may be omitted in detail. For example, detailed descriptions of already well-known matters and redundant descriptions of substantially the same configurations may be omitted.

本発明の実施形態による立体認識システム1は、形状や大きさが既知である予め定められた複数の部品5を組み合わせて作成された実空間における立体を認識するためのシステムである。本明細書において、複数の部品5を組み合わせて作成された実空間における立体を特に構造物と呼ぶ場合がある。本発明の実施形態の技術的特徴の1つは、立体認識システム1が、上記のように作成された構造物を単一の平面画像から認識することである。個々の部品5の形状や大きさが既知であっても、部品5を自由に組み合わせて作成される構造物は既知ではないことは理解される。   The three-dimensional recognition system 1 according to the embodiment of the present invention is a system for recognizing a three-dimensional object in real space created by combining a plurality of predetermined parts 5 whose shapes and sizes are known. In the present specification, a solid in real space created by combining a plurality of parts 5 may be particularly referred to as a structure. One of the technical features of the embodiment of the present invention is that the three-dimensional recognition system 1 recognizes the structure created as described above from a single plane image. It is understood that even if the shape and size of the individual parts 5 are known, the structure created by freely combining the parts 5 is not known.

なお、本明細書における実空間上の部品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-dimensional recognition system 1 according to an embodiment of the present invention. As shown in FIG. 1, the three-dimensional recognition system 1 includes an electronic device 3 and a server 4. The electronic device 3 and the server 4 are connected to a network 2 such as the Internet and can communicate with each other.

図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 electronic device 3 according to an embodiment of the present invention. The electronic device 3 includes a processor 11, a display device 12, an input device 13, an imaging device 14, a storage device 15, and a communication device 16. Each of these components is connected by a bus 16. An interface is interposed between the bus 17 and each component device as necessary. In the present embodiment, the electronic device 3 is a smartphone. However, as long as the electronic device 3 has the above configuration, it can be a portable electronic terminal such as a computer including a tablet computer and a contact input device such as a touch pad.

プロセッサ11は、電子装置3全体の動作を制御するものであり、例えばCPUである。なお、プロセッサ11としては、MPU等の電子回路が用いられてもよい。プロセッサ11は、記憶装置14に格納されているプログラムやデータを読み込んで実行することにより、様々な処理を実行する。1つの例では、プロセッサ11は、複数のプロセッサから構成される。   The processor 11 controls the overall operation of the electronic device 3 and is, for example, a CPU. Note that an electronic circuit such as an MPU may be used as the processor 11. The processor 11 executes various processes by reading and executing programs and data stored in the storage device 14. In one example, processor 11 is comprised of a plurality of processors.

表示装置(ディスプレイ)12は、プロセッサ11の制御に従って、アプリケーション画面や撮影装置14によって撮影された画像などを電子装置3のユーザに表示する。好ましくは液晶ディスプレイであるが、有機ELを用いたディスプレイやプラズマディスプレイ等であってもよい。   The display device (display) 12 displays the application screen, an image photographed by the photographing device 14 and the like to the user of the electronic device 3 under the control of the processor 11. A liquid crystal display is preferable, but a display using an organic EL, a plasma display, or the like may be used.

入力装置13は、電子装置3に対するユーザからの入力を受け付けるユーザインタフェースであり、例えば、タッチパネル、タッチパッド、キーボード、又はマウスである。
本実施形態において電子装置3はスマートフォンであるため、電子装置3は入力装置13としてタッチパネルを備え、タッチパネルは表示装置12としても機能し、表示装置12と入力装置13は一体となった構造である。ただし、表示装置12と入力装置13は、別の位置に配置される別個の形態であってもよい。
The input device 13 is a user interface that receives an input from the user to the electronic device 3 and is, for example, a touch panel, a touch pad, a keyboard, or a mouse.
In the present embodiment, since the electronic device 3 is a smartphone, the electronic device 3 includes a touch panel as the input device 13, the touch panel also functions as the display device 12, and the display device 12 and the input device 13 are integrated. . However, the display device 12 and the input device 13 may be separate forms disposed at different positions.

撮影装置(撮像装置)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 storage unit 15. The imaging device 14 is a camera configured of, for example, an image sensor.

記憶装置15は、揮発性メモリであるRAM及び不揮発性メモリであるROMを含む、一般的なスマートフォンが備える記憶装置である。記憶装置15は、外部メモリを含むこともできる。   The storage device 15 is a storage device provided in a general smartphone including a RAM which is a volatile memory and a ROM which is a non-volatile memory. The storage device 15 can also include an external memory.

1つの例では、記憶装置15は、主記憶装置及び補助記憶装置を含む。主記憶装置は、情報の高速な読み書きが可能な揮発性の記憶媒体であり、プロセッサ11が情報を処理する際の記憶領域及び作業領域として用いられる。補助記憶装置は、様々なプログラムや、各プログラムの実行に際してプロセッサ11が使用するデータを格納する。補助記憶装置は、例えばハードディスク装置であるが、情報を格納できるものであればいかなる不揮発性ストレージ又は不揮発性メモリであってもよく、着脱可能なものであっても構わない。補助記憶装置は、例えば、オペレーティングシステム(OS)、ミドルウェア、アプリケーションプログラム、これらのプログラムの実行に伴って参照され得る各種データなどを格納する。   In one example, the storage device 15 includes a main storage device and an auxiliary storage device. The main storage device is a volatile storage medium capable of high-speed reading and writing of information, and is used as a storage area and a work area when the processor 11 processes information. The auxiliary storage device stores various programs and data used by the processor 11 when executing each program. The auxiliary storage device is, for example, a hard disk device, but may be any non-volatile storage or non-volatile memory as long as it can store information, or may be removable. The auxiliary storage device stores, for example, an operating system (OS), middleware, an application program, various data that can be referred to with the execution of these programs, and the like.

通信装置16は、ネットワーク2を介してサーバ4などの他のコンピュータとの間でデータの授受を行う。例えば通信装置16は、移動体通信や無線LAN等の無線通信を行い、ネットワーク2へ接続する。1つの例では、通信装置16によって、プログラムをサーバ4からダウンロードして、記憶装置16に格納する。ただし、通信装置16は、イーサネット(登録商標)ケーブル等を用いた有線通信を行ってもよい。   The communication device 16 exchanges data with another computer such as the server 4 via the network 2. For example, the communication device 16 performs wireless communication such as mobile communication and wireless LAN, and connects to the network 2. In one example, the communication device 16 downloads the program from the server 4 and stores the program in the storage device 16. However, the communication device 16 may perform wired communication using an Ethernet (registered trademark) cable or the like.

図3は本発明の一実施形態によるサーバ4のハードウェア構成を示すブロック図である。サーバ4は、プロセッサ21、表示装置22、入力装置23、記憶装置24、及び通信装置25を備える。これらの各構成装置はバス26によって接続される。なお、バス26と各構成装置との間には必要に応じてインタフェースが介在しているものとする。   FIG. 3 is a block diagram showing the hardware configuration of the server 4 according to an embodiment of the present invention. The server 4 includes a processor 21, a display device 22, an input device 23, a storage device 24, and a communication device 25. Each of these components is connected by a bus 26. An interface is interposed between the bus 26 and each component device as necessary.

プロセッサ21は、サーバ4全体の動作を制御するものであり、例えばCPUである。なお、プロセッサ11としては、MPU等の電子回路が用いられてもよい。プロセッサ11は、記憶装置14に格納されているプログラムやデータを読み込んで実行することにより、様々な処理を実行する。1つの例では、プロセッサ21は、複数のプロセッサから構成される。   The processor 21 controls the overall operation of the server 4 and is, for example, a CPU. Note that an electronic circuit such as an MPU may be used as the processor 11. The processor 11 executes various processes by reading and executing programs and data stored in the storage device 14. In one example, processor 21 comprises multiple processors.

表示装置(ディスプレイ)22は、プロセッサ21の制御に従って、アプリケーション画面などをサーバ4の使用者に表示する。入力装置23は、サーバ4に対するユーザからの入力を受け付けるものであり、例えば、タッチパネル、タッチパッド、キーボード、又はマウスである。   The display device (display) 22 displays an application screen or the like to the user of the server 4 according to the control of the processor 21. The input device 23 receives an input from the user to the server 4 and is, for example, a touch panel, a touch pad, a keyboard, or a mouse.

記憶装置24は、主記憶装置及び補助記憶装置を含む。主記憶装置は、例えばRAMのような半導体メモリである。RAMは、情報の高速な読み書きが可能な揮発性の記憶媒体であり、プロセッサ21が情報を処理する際の記憶領域及び作業領域として用いられる。主記憶装置は、読み出し専用の不揮発性記憶媒体であるROMを含んでいてもよい。この場合、ROMはファームウェア等のプログラムを格納する。補助記憶装置は、様々なプログラムや、各プログラムの実行に際してプロセッサ21が使用するデータを格納する。補助記憶装置は、例えばハードディスク装置であるが、情報を格納できるものであればいかなる不揮発性ストレージ又は不揮発性メモリであってもよく、着脱可能なものであっても構わない。補助記憶装置は、例えば、オペレーティングシステム(OS)、ミドルウェア、アプリケーションプログラム、これらのプログラムの実行に伴って参照され得る各種データなどを格納する。   The storage device 24 includes a main storage device and an auxiliary storage device. The main storage device is, for example, a semiconductor memory such as a RAM. The RAM is a volatile storage medium capable of high-speed reading and writing of information, and is used as a storage area and a work area when the processor 21 processes information. The main storage device may include a ROM, which is a read only non-volatile storage medium. In this case, the ROM stores a program such as firmware. The auxiliary storage device stores various programs and data used by the processor 21 when executing each program. The auxiliary storage device is, for example, a hard disk device, but may be any non-volatile storage or non-volatile memory as long as it can store information, or may be removable. The auxiliary storage device stores, for example, an operating system (OS), middleware, an application program, various data that can be referred to with the execution of these programs, and the like.

好適な1つの例では、記憶部24は各種データベース用のデータ(例えばテーブル)やプログラムを記憶する。プロセッサ21の動作などにより、各種データベースは実現される。サーバ4は、データベースサーバ機能を備えることもできるし、1又は複数のデータベースサーバを含むこともできるし、又は他のサーバを含むこともできる。   In one preferable example, the storage unit 24 stores data (for example, a table) and programs for various databases. Various databases are realized by the operation of the processor 21 and the like. The server 4 may have a database server function, may include one or more database servers, or may include other servers.

通信装置25は、ネットワーク2を介して電子装置3などの他のコンピュータとの間でデータの授受を行うための装置である。例えば通信装置25は、イーサネット(登録商標)ケーブル等を用いた有線通信や移動体通信、無線LAN等の無線通信を行い、ネットワーク4へ接続する。   The communication device 25 is a device for exchanging data with another computer such as the electronic device 3 via the network 2. For example, the communication device 25 performs wired communication using an Ethernet (registered trademark) cable or the like, mobile communication, and wireless communication such as wireless LAN, and connects to the network 4.

図4は、本発明の一実施形態によるサーバ4の機能ブロック図の一例を示す。サーバ4は、部品データベース41と、履歴データベース42と、を備える。本実施形態においては、プロセッサ21によりプログラムが実行されることによりこれらの機能が実現される。このように、各種機能がプログラム読み込みにより実現されるため、1つのデータベースの一部を他のデータベースが有していてもよい。   FIG. 4 shows an example of a functional block diagram of the server 4 according to an embodiment of the present invention. The server 4 includes a parts database 41 and a history database 42. In the present embodiment, these functions are realized by the processor 21 executing a program. As described above, since various functions are realized by program reading, a part of one database may be included in another database.

前述のとおり、立体認識システム1は、予め定められた複数の部品5より構成される実空間における構造物を認識する。部品データベース41は、部品5それぞれの部品ID、部品5の3次元モデルデータ(3次元モデル)、及び部品5間の接合制約条件を示す制約データを関連付けて記憶する。電子装置3は、クエリを用いて、部品データベース41からデータを取得する。   As described above, the three-dimensional recognition system 1 recognizes a structure in the real space composed of a plurality of predetermined parts 5. The part database 41 associates and stores a part ID of each of the parts 5, three-dimensional model data (three-dimensional model) of the part 5, and constraint data indicating a joint constraint between the parts 5. The electronic device 3 acquires data from the component database 41 using a query.

部品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 parts database 41 are each associated with a part ID. The structure is created by part or all of the parts 5 stored in the parts database 41. When there are a plurality of parts 5 having the same shape and size, the parts 5 have the same part ID. In this case, the component database 41 further stores the number of components 5 in association with the component ID. However, all parts 5 may be configured to have different part IDs, and the parts database 41 may not include the number of parts 5.

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 parts database 41. The joining constraint is a geometric constraint imposed when joining the parts 5 and determines the relative positional relationship between the two parts 5.

位置合わせ用メタデータは、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 parts database 41 associates and stores alignment metadata for defining constraints with each of the other parts 5 with the part ID of one part 5.

一の部品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 part database 41 includes only one part 5, the alignment metadata associated with the part ID of one part 5 includes all other parts 5 other than the one part 5. And data that defines the constraints. In one example, when the part database 41 includes a plurality of parts 5, the alignment metadata associated with the part ID of the part 5 is a restriction with each of all the parts 5 including the part 5. Contains data that defines

部品データベース41は、部品5の3次元モデルや位置合わせ用メタデータを、各部品5で共通の座標系を用いて記憶する。好ましくは、部品データベース41が記憶する各部品5ごとの3次元モデルや位置合わせ用メタデータは、各部品5の中央を原点とする3軸座標系により表される。   The parts database 41 stores the three-dimensional model of the parts 5 and the alignment metadata using a coordinate system common to the parts 5. Preferably, the three-dimensional model and alignment metadata for each part 5 stored in the parts database 41 are represented by a three-axis coordinate system with the center of each part 5 as the origin.

好適な1つの例では、すべての部品5において部品表面の任意の点を接合基準点6として定めると、一の部品5の位置合わせ用メタデータは、一の部品5の接合基準点6に対する他の部品5の接合基準点6の距離と角度の条件により定められる。一組の部品5間に着目すると、一の部品5の位置合わせ用メタデータ(alignment-data)は、位置の制約(positional-constraint)及び姿勢の制約(orientational-constraint)を要素とする配列として以下に示す式1〜式3のとおり記述することができる。

Figure 2019114226
(式1)
Figure 2019114226
(式2)
Figure 2019114226
(式3)
式1から式3において、
Figure 2019114226
は、一の部品5の接合基準点の座標を示す。
Figure 2019114226
は、一の部品5の接合基準点と他の部品5の接合基準点とのx軸方向の距離の最小値と最大値を示す。
Figure 2019114226
は、一の部品5の接合基準点と他の部品5の接合基準点とのy軸方向の距離の最小値と最大値を示す。
Figure 2019114226
は、一の部品5の接合基準点と他の部品5の接合基準点とのx軸方向の距離の最小値と最大値を示す。
Figure 2019114226
は、一の部品5の接合基準点と他の部品5の接合基準点とのx軸を中心とした回転角度差(rollの回転角度差)の最小値と最大値を示す。
Figure 2019114226
は、一の部品5の接合基準点と他の部品5の接合基準点とのy軸を中心とした回転角度差(pitchの回転角度差)の最小値と最大値を示す。
Figure 2019114226
は、一の部品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 to Formula 3 shown below.
Figure 2019114226
(Formula 1)
Figure 2019114226
(Formula 2)
Figure 2019114226
(Equation 3)
In formulas 1 to 3,
Figure 2019114226
These show the coordinates of the junction reference point of one component 5.
Figure 2019114226
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.
Figure 2019114226
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.
Figure 2019114226
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.
Figure 2019114226
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.
Figure 2019114226
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.
Figure 2019114226
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 Equation 1 to Equation 3 is data that defines the constraint between one component 5 and another one component 5. The part database 41 stores alignment metadata defining constraints with each of the parts 5 that may be joined with one of the parts 5 in association with the part ID of the one part 5. When one component 5 has a plurality of joint surfaces, one component 5 can have a plurality of joint reference points. In this case, with regard to the data defining the constraint between one part 5 and the other one part 5, the alignment metadata may have data shown in equations 1 to 3 for each junction reference point, and Elements of posture constraints can be treated as data subordinate to the junction reference point. Hereinafter, in the present embodiment, it is assumed that constraint data of one component 5 has alignment metadata for each component 5 that may be joined to the one component 5. Further, the alignment metadata has elements of position constraint and attitude constraint as the joint reference point 6 and data subordinate to the joint reference point 6.

1つの例では、各々が1つの接合基準点を有する2つの部品5(P1とP2)が接合する場合、各部品5の位置合わせ用データを添字により表すと、以下の式が成立する。

Figure 2019114226
(式4)
Figure 2019114226
(式5)
Figure 2019114226
(式6)
Figure 2019114226
(式7)
Figure 2019114226
(式8)
Figure 2019114226
(式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: .
Figure 2019114226
(Equation 4)
Figure 2019114226
(Equation 5)
Figure 2019114226
(Equation 6)
Figure 2019114226
(Equation 7)
Figure 2019114226
(Equation 8)
Figure 2019114226
(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 parts database 41 may not store constraint data.

履歴データベース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 electronic device 3 to the component database 41. The query input to the parts database 41 is, for example, a query used when the electronic device 3 searches and acquires data from the parts database 41.

図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 electronic device 3 according to an embodiment of the present invention. The electronic device 3 includes an image recognition unit 31, a query generation unit 32, a data acquisition unit 33, a component placement unit 34, a consistency determination unit 35, a solid recognition unit 36, a database storage unit 37, and query reproduction. And a query re-generation unit 39. In the present embodiment, these functions are realized by the processor 11 executing a program. As described above, since various functions are realized by program reading, some or all of one part (function) may be included in another part. However, these functions may also be realized by hardware by configuring an electronic circuit or the like for realizing a part or all of the functions.

最初に、立体認識システム1で用いられる部品5について説明する。複数の部品5は、各部品5を識別可能なマーカを、部品表面に有する。好適な1つの例では、マーカは、ARマーカであり、例えば矩形状の黒枠とその内部に描かれた左右非対称のドットパターンにより構成される。このようにマーカは、該マーカが撮影された画像から、撮影装置14からの該マーカの位置及び姿勢を取得可能である形状を有するとともに、各部品5を識別可能な特徴パターンを有する。ただし、複数の部品5は、各部品5を識別可能なマーカ以外の、各部品5を識別可能な特徴を部品表面に有していてもよい。例えば、複数の部品5は、各部品5を識別可能な特徴パターンのみを有し、該特徴パターンが、撮影された画像から、撮影装置14からの該特徴パターンの位置及び姿勢を取得可能であるとともに各部品5を識別可能であるように構成されてもよい。   First, the component 5 used in the three-dimensional recognition system 1 will be described. The plurality of parts 5 have markers that can identify each part 5 on the part surface. In one preferable example, the marker is an AR marker, and is constituted of, for example, a rectangular black frame and an asymmetric dot pattern drawn inside the black frame. Thus, the marker has a shape capable of acquiring the position and orientation of the marker from the imaging device 14 from the image in which the marker is photographed, and has a feature pattern capable of identifying each component 5. However, the plurality of components 5 may have features that can identify each component 5 on the component surface other than a marker that can identify each component 5. For example, the plurality of parts 5 have only feature patterns that can identify each part 5, and the feature patterns can acquire the position and orientation of the feature patterns from the imaging device 14 from the captured image. , And each component 5 may be identified.

画像認識部31は、撮影装置14により撮影された画像から各部品5を識別可能なマーカをそれぞれ抽出する。画像認識部31は、抽出されたマーカから部品5の部品IDをそれぞれ取得するとともに、撮影画像における該マーカの形状及び大きさから、各部品5の位置データを取得する。画像認識部31は、このようにして、撮影画像内にある各部品5を認識する。1つの例では、画像認識部31が取得する各部品5の位置データは、カメラ座標系により表現されるマーカの認識の基準点の位置であり、撮影装置14からの相対位置を示すものである。1つの例では、位置データは、6DoF(6自由度)の位置である。他の例では、位置データは、クォータニオン等により表現される。なお、画像認識部31は既知の画像認識技術が有する機能を備えることができ、画像認識部31が取得する各部品5の位置データは大まかな位置であってもよい。   The image recognition unit 31 extracts markers that can identify each component 5 from the image captured by the imaging device 14. The image recognition unit 31 acquires the component ID of the component 5 from the extracted marker, and acquires position data of each component 5 from the shape and size of the marker in the captured image. Thus, the image recognition unit 31 recognizes each component 5 in the captured image. In one example, the position data of each component 5 acquired by the image recognition unit 31 is the position of the reference point of recognition of the marker represented by the camera coordinate system, and indicates the relative position from the photographing device 14 . In one example, the position data is a 6 DoF (6 degrees of freedom) position. In another example, position data is expressed by quaternion or the like. The image recognition unit 31 can have the function of a known image recognition technology, and the position data of each component 5 acquired by the image recognition unit 31 may be a rough position.

部品データベース41は、部品IDに関連付けて、該部品IDに対応付けられた部品5の表面にあるマーカの形状、大きさ、及び特徴パターンと、該マーカの該部品5における位置とを記憶する。マーカの部品5における位置は、例えば画像認識部31が認識するマーカの認識の基準点の位置であり、該部品5の中央を原点とする3軸座標系により表される。また、部品データベース41は、部品IDに関連付けて、該部品IDに対応付けられた部品5の接合基準点6の位置を記憶する。接合基準点6の位置は、マーカの部品5における位置と同様に記憶され、例えば該部品5の中央を原点とする3軸座標系により表される。   The part database 41 stores the shape, size, and characteristic pattern of the marker on the surface of the part 5 associated with the part ID and the position of the marker on the part 5 in association with the part ID. The position of the marker in the component 5 is, for example, the position of the reference point of recognition of the marker recognized by the image recognition unit 31, and is represented by a three-axis coordinate system whose origin is the center of the component 5. Further, the parts database 41 stores the position of the bonding reference point 6 of the part 5 associated with the part ID in association with the part ID. The position of the junction reference point 6 is stored in the same manner as the position of the part 5 of the marker, and is represented by, for example, a three-axis coordinate system whose origin is the center of the part 5.

図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 device 14. In the photographed image, a structure composed of three parts 5 (5a, 5b, 5c) appears. The image recognition unit 31 extracts three markers from the captured image shown in FIG. 6 and acquires component IDs associated with the three components 5 from the extracted markers and position data of the components 5, The three parts 5 are recognized respectively. FIG. 7 is a diagram showing the three components 5a, 5b, 5c recognized by the image recognition unit 31 from the photographed image shown in FIG. 6, and the bonding reference points 6 (6a, 6b1, 6b2, 6c) of the three components 5 are shown. ). It can be confirmed that the part 5b has two joint reference points 6b1 and 6b2. For example, when the marker of the central part is not shown in the captured image, the image recognition unit 31 recognizes only the parts 5 at both ends.

クエリ生成部32は、画像認識部31により取得された部品IDを含むクエリを生成する。データ取得部33は、クエリが生成された場合、生成されたクエリを用いて、部品データベース41から、該クエリが含む部品IDのそれぞれに関連付けられた部品5それぞれの3次元モデル及び制約データを取得する。   The query generation unit 32 generates a query including the component ID acquired by the image recognition unit 31. When the query is generated, the data acquisition unit 33 acquires, using the generated query, the three-dimensional model and constraint data of each of the parts 5 associated with each of the part IDs included in the query from the parts database 41 Do.

クエリは、部品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 image recognition unit 31. Further, data subordinate to the part ID includes a three-dimensional model and constraint data.

データ取得部33が、データを取得する際に用いるクエリは、画像認識部31により取得された部品IDと、部品IDに対応付けられた部品5の位置データとを含んでいればよい。1つの例では、データ取得部33は、部品データベース41の検索の際に用いたクエリに、該クエリが含む部品IDに関連付けられた部品5それぞれの3次元モデル及び制約データを、該部品IDに対応付けて該クエリにそれぞれ加える。これにより、データ取得部33は、部品IDごとの部品5の3次元モデル及び制約データを取得する。   The query used when the data acquisition unit 33 acquires data may include the component ID acquired by the image recognition unit 31 and the position data of the component 5 associated with the component ID. In one example, the data acquisition unit 33 sets, in the query used in the search of the component database 41, the three-dimensional model of each of the components 5 associated with the component ID included in the query and the constraint data to the component ID. Match and add to the query respectively. Thus, the data acquisition unit 33 acquires the three-dimensional model of the component 5 and the constraint data for each component ID.

部品配置部34は、クエリが含む部品IDごとに、画像認識部31により取得された位置データと、データ取得部33により取得された3次元モデル及び制約データとに基づいて、実空間と対応させた仮想空間に各部品5を配置する。最初に、部品配置部34は、クエリが含む部品IDごとに、3次元モデルと、位置データとを用いて、仮想空間に各部品5を仮想空間上に配置する。   The component placement unit 34 associates the real space with the real space based on the position data acquired by the image recognition unit 31 and the three-dimensional model and constraint data acquired by the data acquisition unit 33 for each component ID included in the query. Each part 5 is arranged in the virtual space. First, the component placement unit 34 places each component 5 in the virtual space in the virtual space using the three-dimensional model and the position data for each component ID included in the query.

次に、部品配置部34は、配置された部品5のそれぞれが隣接しているか否かを判定することにより、配置された部品5のうち隣接する2つの部品5の組をそれぞれ特定する。1つの例では、部品配置部34は、最初に配置された2つの部品5の接合基準点6間の長さが所定値以内であるか否かを判定し、所定値以内である場合、2つの部品5は隣接していると判定する。部品配置部34は、1つの部品5に対して複数の部品5が隣接していると判定することができる。   Next, the component placement unit 34 identifies a set of two adjacent components 5 among the disposed components 5 by determining whether each of the disposed components 5 is adjacent. In one example, the component placement unit 34 determines whether the length between the bonding reference points 6 of the two components 5 placed first is within a predetermined value, and if it is within the predetermined value, 2 It is determined that the two parts 5 are adjacent. The component placement unit 34 can determine that the plurality of components 5 are adjacent to one component 5.

次に、部品配置部34は、隣接していると特定された2つの部品5の組から所定の順番で部品5の組を選択する。部品配置部34は、隣接していると判定された2つの部品5の組のそれぞれにおいて、接合制約条件を満たすように、2つの部品5のうちのいずれか一方を移動や回転(以下、「移動等」という。)させて、配置を確定する。このように、部品配置部34は、各部品5を調整して配置する。部品配置部34は、接合制約条件を満たしている場合、部品5を移動等させないで配置を確定する。部品配置部34は、どの部品5にも隣接していないと判定された部品5については、接合制約条件を満たすように移動等させない。   Next, the component placement unit 34 selects a set of components 5 in a predetermined order from the pair of two components 5 identified as being adjacent. The component placement unit 34 moves or rotates any one of the two components 5 so as to satisfy the bonding restriction condition in each of the two sets of the components 5 determined to be adjacent (hereinafter referred to as “ Let the movement etc.))), and the arrangement is decided. Thus, the component placement unit 34 adjusts and places each component 5. The component placement unit 34 does not move the component 5 or the like to determine the placement when the joint constraint condition is satisfied. The component placement unit 34 does not move the component 5 determined not to be adjacent to any component 5 so as to satisfy the bonding restriction condition.

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 component placement unit 34 selects the set of two components 5 in order from the combination of two components 5 including the component 5 with high priority. In this case, the component database 41 further stores priority information on the priority of the component 5 associated with the component ID in association with the component ID. The priority of the component 5 is predetermined by the system administrator, and for example, the priority of the component 5 that can be important in constructing the structure is set to be higher. When the query is generated, the data acquiring unit 33 further acquires, from the component database 41, the priority information of each of the components 5 associated with each of the component IDs included in the query, using the generated query. In another example, the image recognition unit 31 recognizes the component ID and calculates the accuracy of the recognition, and the component placement unit 34 sequentially executes the two sets of two components 5 including the component 5 with high accuracy. Select a set of five parts.

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 part arranging unit 34 does not determine the arrangement of one of the parts 5 if it has already been determined. The component 5 is moved or the like so as to satisfy the bonding restriction condition. In another example, in the case where it is necessary to move one of the two parts 5 or the like, the component placement unit 34 may place the component 5 with low priority if the placement of both components 5 has already been determined. The part 5 with low recognition accuracy of the image recognition unit 31 is moved or the like so as to satisfy the bonding restriction condition.

図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 image recognition section 31 shown in FIG. FIG.

整合性判定部35は、部品配置部34により配置された各部品5の位置関係に基づいて、配置された各部品5の位置の整合性を判定する。   The consistency determination unit 35 determines the consistency of the positions of the arranged parts 5 based on the positional relationship of the parts 5 arranged by the parts arrangement unit 34.

1つの例では、整合性判定部35は、配置された各部品5の3次元モデルが占める領域の重複度合いに基づいて、配置された各部品5の位置の整合性を判定する。具体的には、整合性判定部35は、配置された各部品5の3次元モデルが占める領域の重複が(a)所定の体積以内である場合は整合性が有ると判定し、(b)所定の体積を超える場合は整合性が無いと判定する。上記の所定の体積は、ゼロとすることもできるし、各部品5の3次元モデルごとに定めることもできる。   In one example, the consistency determination unit 35 determines the consistency of the position of each arranged component 5 based on the overlapping degree of the area occupied by the three-dimensional model of each arranged component 5. Specifically, the consistency determination unit 35 determines that there is consistency when the overlap of the area occupied by the three-dimensional model of each of the arranged parts 5 is (a) within a predetermined volume, (b) If it exceeds the predetermined volume, it is determined that there is no consistency. The predetermined volume described above may be zero or may be determined for each three-dimensional model of each part 5.

1つの例では、画像認識部31は、撮影装置14により撮影された画像データから構造物が載置されるベース部分を形成するベース部を認識する。例えば構造物が机の上に載置される場合、載置される机の表面がベース部となる。部品配置部34は、ベース部を仮想空間上に配置し、該ベース部についても、配置された部品5のそれぞれが隣接しているか否かを判定する。部品配置部34は、ベース部と部品5とを接合制約条件を満たすように移動等させる場合、部品5の方を移動等させて配置を確定させることが好ましい。整合性判定部35は、配置された各部品5の位置とベース部の位置との位置関係から、配置された各部品5が重力に従った配置であるか否かを判定する。具体的には、整合性判定部35は、重力に従った配置の場合は整合性が有ると判定し、重力に従った配置でない場合は整合性が無いと判定する。   In one example, the image recognition unit 31 recognizes a base portion that forms a base portion on which a structure is placed from image data captured by the imaging device 14. For example, when the structure is placed on a desk, the surface of the placed desk is the base. The component placement unit 34 places the base unit in the virtual space, and determines whether or not each of the placed components 5 is adjacent to the base unit. When the component placement unit 34 moves the base unit and the component 5 so as to satisfy the bonding restriction conditions, it is preferable to move the component 5 or the like to determine the placement. From the positional relationship between the position of each of the arranged components 5 and the position of the base portion, the consistency determination unit 35 determines whether or not each of the arranged components 5 is arranged according to gravity. Specifically, the consistency determination unit 35 determines that there is consistency in the case of the arrangement in accordance with gravity, and determines that there is no consistency in the case of not the arrangement in accordance with gravity.

例えば、図6において画像認識部31が両端の部品5のみ認識した場合、クエリ生成部32が生成するクエリは部品5bの部品IDを含まず、部品配置部34は部品5aと5cを仮想空間に配置する。部品配置部34は、ベース部と部品5cの位置関係から重力の方向を認識し、部品5aが部品5cと間隙を介して配置されていることから、部品5aが重力に従った配置でないと判定し、整合性が無いと判定する。   For example, when the image recognition unit 31 recognizes only the components 5 at both ends in FIG. 6, the query generated by the query generation unit 32 does not include the component ID of the component 5b, and the component placement unit 34 puts the components 5a and 5c in virtual space. Deploy. The component placement unit 34 recognizes the direction of gravity from the positional relationship between the base portion and the component 5c, and because the component 5a is disposed with a gap from the component 5c, it is determined that the component 5a is not placed according to gravity. And determine that there is no consistency.

1つの例では、整合性判定部35は、撮影装置14により撮影された画像と、部品配置部34が仮想空間上に配置した各部品5の仮想カメラから見た画像との一致度に基づいて、整合性を判定する。具体的には、整合性判定部35は、一致度が予め定められた既定値以上である場合は整合性が有ると判定し、一致度が既定値未満である場合は整合性が無いと判定する。ここで、仮想カメラは、撮影装置14の位置に対応する仮想空間の位置に配置されるものである。   In one example, the consistency determination unit 35 determines the matching degree between the image captured by the imaging device 14 and the image viewed from the virtual camera of each component 5 disposed in the virtual space by the component placement unit 34. , Determine consistency. Specifically, the consistency determination unit 35 determines that there is consistency when the degree of coincidence is equal to or greater than a predetermined value determined in advance, and determines that there is no consistency when the degree of coincidence is less than the predetermined value. Do. Here, the virtual camera is disposed at the position of the virtual space corresponding to the position of the photographing device 14.

1つの例では、整合性判定部35は、整合性が無いと判定した場合、部品配置部34が配置した各部品5の位置の整合性の評価値を算出する。例えば当該評価値は、整合性判定部35が配置された各部品5の3次元モデルが占める領域の重複度合いに基づいて判定する場合、重複領域の体積の所定の体積に対する超過度合いに応じて算出される。また例えば当該評価値は、整合性判定部35が画像データの一致度に基づいて判定する場合、一致する度合いに応じて算出される。   In one example, when the consistency determination unit 35 determines that there is no consistency, it calculates an evaluation value of the consistency of the position of each of the parts 5 arranged by the parts arrangement unit 34. For example, in the case where the evaluation value is determined based on the overlapping degree of the area occupied by the three-dimensional model of each part 5 in which the consistency determining unit 35 is arranged, the evaluation value is calculated according to the excess degree to the predetermined volume of the overlapping area. Be done. Further, for example, when the consistency determination unit 35 determines based on the degree of coincidence of image data, the evaluation value is calculated according to the degree of coincidence.

なお、上記のような整合性判定部35が行う整合性の判定は、仮想空間上に配置された部品5全体に対するものであるが、整合性判定部35は、部品5ごとに整合性を判定することができる。1つの例では、整合性判定部35が配置された各部品5の3次元モデルが占める領域の重複度合いに基づいて各部品5の位置の整合性を判定する場合、優先度が高い方の部品5を整合性有り、優先度が低い方の部品5を整合性無し、と判定する。   The determination of consistency performed by the consistency determination unit 35 as described above is for the entire part 5 disposed in the virtual space, but the consistency determination unit 35 determines the consistency for each part 5 can do. In one example, when determining the consistency of the position of each component 5 based on the overlapping degree of the area occupied by the three-dimensional model of each component 5 in which the consistency determination unit 35 is arranged, the component having the higher priority It is determined that 5 is consistent, and the component 5 with lower priority is not consistent.

立体認識部36は、整合性判定部35により整合性が有ると判定された場合、部品配置部34により配置された各部品5の位置に基づいて構造物を認識する。例えば、立体認識部36は、部品配置部34が仮想空間に配置した各部品5の3次元モデル及び位置データにより構造物を認識し、構造物全体の3次元モデルを認識する。好ましくは、立体認識部36は、認識した構造物全体の3次元モデルを仮想空間上に再構築する。   The three-dimensional recognition unit 36 recognizes a structure based on the position of each of the components 5 arranged by the component arrangement unit 34 when the consistency judgment unit 35 determines that the consistency is present. For example, the three-dimensional recognition unit 36 recognizes a structure by the three-dimensional model and position data of each part 5 arranged in the virtual space by the part arrangement unit 34, and recognizes a three-dimensional model of the whole structure. Preferably, the three-dimensional recognition unit 36 reconstructs a three-dimensional model of the entire recognized structure on a virtual space.

図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-dimensional recognition unit 36 by the component 5 whose arrangement has been determined by the component arrangement unit 34 shown in FIG. 8. 6 to 9, the priority is higher in the order of the parts 5c, 5b, 5a, and the part placement unit 34 moves the part 5b in the set of parts 5b and 5c, and the part 5a in the set of parts 5b and 5a. It can confirm that it was moved.

データベース記憶部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 consistency determination unit 35 determines that there is no consistency, the database storage unit 37 stores the query storage data in the history database 42. The query storage data includes the component ID of each component 5 and the bonding reference point 6 used by the component placement unit 34 among the data included in the query used when the data acquisition unit 33 acquires data from the component database 41. It is data. The bonding reference point 6 used by the component placement unit 34 is the bonding reference point 6 used by the component placement unit 34 for the determination of the bonding constraint condition among the bonding reference points 6 included in the constraint data associated with the component ID. . The information on the joint reference point 6 is included in the alignment data stored for each adjacent part 5, so the query storage data can specify the adjacency relation of the parts 5 arranged by the parts arranging unit 34. It is a thing. However, among the data included in the query used when the data acquisition unit 33 acquires data from the parts database 41, the data for query storage may be data including at least the part ID of each of the parts 5, and the above embodiment It is not limited to.

1つの例では、データベース記憶部37は、クエリ保存用データが含む部品IDのそれぞれに関連付けて、部品配置部34が配置した各部品5の位置の整合性の評価値を履歴データベース42に更に記憶する。この場合、整合性判定部35が、整合性が無いと判定した場合、整合性の評価値を算出する。このような構成とすることにより、すべての場合において整合性判定部35が、整合性が無いと判定した場合に、最も整合性のあるクエリを用いて、構造物を認識することが可能となる。   In one example, the database storage unit 37 further stores the evaluation value of the consistency of the position of each component 5 arranged by the component arrangement unit 34 in the history database 42 in association with each of the component IDs included in the query storage data. Do. In this case, when the consistency determination unit 35 determines that there is no consistency, the evaluation value of the consistency is calculated. With such a configuration, when the consistency determination unit 35 determines that there is no consistency in all cases, it is possible to recognize the structure using the most consistent query. .

1つの例では、データベース記憶部37は、クエリ保存用データが含む部品IDのそれぞれに関連付けて、部品配置部34が配置した各部品5の位置を履歴データベース42に更に記憶する。このような構成とすることにより、すべての場合において整合性判定部35が、整合性が無いと判定した場合に、最も整合性のある配置のときの各部品5の位置を用いて、構造物を認識することが可能となる。   In one example, the database storage unit 37 further stores the position of each component 5 arranged by the component arrangement unit 34 in the history database 42 in association with each of the component IDs included in the query storage data. With such a configuration, when the consistency determination unit 35 determines that there is no consistency in all cases, a structure is obtained using the position of each part 5 at the time of the most consistent arrangement. It is possible to recognize

1つの例では、クエリ保存用データはクエリそのもののデータであり、データベース記憶部37は、データ取得部33が部品データベース41からデータを取得する際に用いたクエリをそのまま履歴データベース42に記憶する。   In one example, the query storage data is data of the query itself, and the database storage unit 37 stores the query used when the data acquisition unit 33 acquires data from the component database 41 in the history database 42 as it is.

クエリ再生成決定部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 consistency determination unit 35 determines that there is no consistency, the query regeneration determination unit 38 regenerates a query based on the query storage data stored in the history database 42 and the data stored in the component database 41. It is determined whether to do. Specifically, the query regeneration determination unit 38 determines whether the query storage data stored in the history database 42 includes a predetermined one of a combination of part or all of the component IDs stored in the component database 41. Determine if The query regeneration determination unit 38 determines that the query is to be regenerated if the query storage data stored in the history database 42 does not include the predetermined one, and if the query storage data includes the predetermined one, the query is generated. Decide not to regenerate. The combination of the component IDs is a combination in which the arrangement order of the components 5 is considered, and the respective components 5 are joined only at the junction reference point 6, but even if they are junctions of the same components 5 Are different junctions. For example, when the part 5 has four parts A to D, and each part 5 has two joint reference points 6 at both ends, all combinations of part IDs are combinations arranged using all the parts A to D There are 384 (4! × 2 4 ) combinations. In this case, a partial combination of the part IDs is a combination in which a part of the parts A to D is taken out and the arrangement order of the parts 5 is further taken into consideration. For example, a partial combination of part IDs includes 8 (2! × 2 2 ) combinations for taking out and arranging parts B and C of parts A to D, and a part A of parts A to D, Include 48 (3! × 2 3 ) combinations for taking out and placing B and C.

1つの例では、クエリ再生成決定部38は、履歴データベース42が記憶するクエリ保存用データの数量NQと、部品データベース41が記憶する部品IDのすべての組み合わせの数量NPとを比較する。クエリ再生成決定部38は、数量NQが数量NP未満である場合、クエリを再生成すると決定し、そうでない場合、クエリを再生成しないと決定する。例えば部品データベース41が記憶する部品5の個数がnであり、各部品5は両端にそれぞれ接合基準点6を有し、構造物は部品データベース41が記憶するすべての部品5から構成される場合を考える。この場合、クエリ生成部32が生成可能なクエリ総数、すなわち部品データベース41が記憶する部品IDのすべての組み合わせの数量NPは、部品5の配置パターンの数量と接合基準点6の数量から

Figure 2019114226
(式10)
で表すことができる。このようにクエリ再生成決定部38は、クエリを再生成する回数を有限にすることができる。なお上記実施例においては、すべての部品5が2つの接合基準点を有し、構造物は部品データベース41が記憶するすべての部品5から構成されるものとしたが、これは説明を簡単にするための1つの例示である。構造物はn個すべてを使用しなくてもよいし、部品5が有する接合基準点6は2つでなくてもよい。 In one example, the query regeneration determination unit 38 compares the quantity NQ of the query storage data stored in the history database 42 with the quantity NP of all combinations of component IDs stored in the component database 41. The query regeneration determination unit 38 determines to regenerate the query if the quantity NQ is less than the quantity NP, and determines not to regenerate the query otherwise. For example, it is assumed that the number of parts 5 stored in the parts database 41 is n, each part 5 has joint reference points 6 at both ends, and the structure comprises all parts 5 stored in the parts database 41. Think. In this case, the total number of queries that can be generated by the query generation unit 32, that is, the quantity NP of all combinations of part IDs stored in the parts database 41 is based on the quantity of the arrangement pattern of parts 5 and the quantity of junction reference point 6.
Figure 2019114226
(Equation 10)
Can be represented by In this manner, the query regeneration determination unit 38 can make the number of times of regeneration of the query finite. In the above embodiment, all the parts 5 have two joint reference points, and the structure is made up of all the parts 5 stored in the parts database 41, but this simplifies the explanation. It is an example for one. The structure may not use all n pieces, and the joint reference point 6 which the part 5 has may not be two.

1つの例では、画像認識部31は部品IDを認識するときにその確度を算出する。本例示においては、上記の部品データベース41が記憶する部品IDの一部又は全部の組み合わせのうちの所定のものは、一定値以上の確度で画像認識部31により認識された部品IDを含む。   In one example, the image recognition unit 31 calculates the certainty when recognizing the part ID. In this example, a predetermined one of combinations of part or all of the part IDs stored in the part database 41 includes the part IDs recognized by the image recognition unit 31 with a certainty or more certainty.

1つの例では、部品データベース41は、部品IDに関連付けて、該部品IDに対応付けられた部品5の優先度に関する優先度情報を記憶する。本例示においては、上記の部品データベース41が記憶する部品IDの一部又は全部の組み合わせのうちの所定のものは、画像認識部31により認識された一定値以上の優先度の部品IDを含む。   In one example, the component database 41 stores priority information on the priority of the component 5 associated with the component ID in association with the component ID. In the present example, a predetermined one of combinations of part or all of the part IDs stored in the part database 41 includes the part IDs of priorities equal to or higher than a predetermined value recognized by the image recognition unit 31.

クエリ再生成部39は、クエリ再生成決定部38がクエリを再生成すると決定した場合、履歴データベース42が記憶するクエリ保存用データと異なるデータを含むクエリを生成する。例えば部品データベース41が記憶する部品5の個数がnであり、各部品5は両端に2つの接合基準点6を有し、構造物は部品データベース41が記憶するすべての部品5から構成される場合を考える。クエリ再生成部39は、式10で表されるクエリ生成部32が生成可能なクエリのうち、履歴データベース42が記憶するクエリ保存用データが含む部品IDの組み合わせを含まないクエリを生成する。   When the query regeneration determination unit 38 determines to regenerate a query, the query regeneration unit 39 generates a query including data different from the query storage data stored in the history database 42. For example, when the number of parts 5 stored in the parts database 41 is n, each part 5 has two joint reference points 6 at both ends, and the structure is composed of all the parts 5 stored in the parts database 41 think of. The query regeneration unit 39 generates a query that does not include the combination of the component IDs included in the query storage data stored in the history database 42 among the queries that can be generated by the query generation unit 32 represented by Equation 10.

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 part arrangement unit 34 is equal to or more than a predetermined value, the query regeneration unit 39 determines the length The query is generated by adding the component ID of the component 5 corresponding to. In one example, for a part ID whose recognition accuracy by the image recognition unit 31 is less than a predetermined value or a part ID determined to have no consistency, a query in which the position or posture of the part ID is changed or other parts Prioritize queries that have been replaced with IDs. Thereby, it is possible to make the information processing of the three-dimensional recognition system 1 more efficient.

次に、本発明の一実施形態による立体認識システム1の情報処理について図10に示したフローチャートを用いて説明する。図10に示す情報処理は、プログラムを電子装置3に実行させ、かつプログラムをサーバ4に実行させることで実現される。本例示では、クエリ保存用データはクエリそのものを用いる。   Next, information processing of the stereoscopic recognition system 1 according to the embodiment of the present invention will be described using the flowchart shown in FIG. The information processing illustrated in FIG. 10 is realized by causing the electronic device 3 to execute a program and causing the server 4 to execute the program. In this example, the query storage data uses the query itself.

ステップ101で、サーバ4は、電子装置3が画像を認識する前に、履歴データベース42が記憶するクエリを消去する。これにより、サーバ4は、履歴データベース42を初期化し、履歴データベース42をクエリが記憶されていない状態にする。   In step 101, the server 4 deletes the query stored in the history database 42 before the electronic device 3 recognizes the image. As a result, the server 4 initializes the history database 42 and puts the history database 42 in a state where no query is stored.

次にステップ102で、画像認識部31は、撮影装置14により撮影された画像から各部品5を識別可能なマーカを抽出し、抽出されたマーカから部品5のそれぞれに対応付けられた部品IDと該部品5の位置データとを取得する。またこのとき、画像認識部31は、撮影装置14により撮影された画像データから構造物が載置されるベース部分を形成するベース部を認識する。   Next, in step 102, the image recognition unit 31 extracts a marker that can identify each component 5 from the image captured by the imaging device 14, and the extracted marker and component ID associated with each of the components 5. The position data of the part 5 is acquired. At this time, the image recognition unit 31 recognizes, from the image data captured by the imaging device 14, the base portion that forms the base portion on which the structure is placed.

次にステップ103で、クエリ生成部32は、ステップ102で取得された各部品IDと、該部品IDのそれぞれに従属する位置データとを含むクエリを生成する。   Next, in step 103, the query generation unit 32 generates a query including each of the component IDs obtained in step 102 and position data subordinate to each of the component IDs.

次にステップ104で、データ取得部33は、生成されたクエリを用いて、部品データベース41から、クエリが含む部品IDのそれぞれに関連付けられた部品5の3次元モデル及び制約データを取得する。   Next, in step 104, the data acquisition unit 33 acquires, from the component database 41, the three-dimensional model of the component 5 and the constraint data associated with each of the component IDs included in the query, using the generated query.

次にステップ105で、部品配置部34は、クエリが含む部品IDごとに、位置データと、3次元モデルとを用いて、実空間と対応させた仮想空間に各部品5を配置する。また、部品配置部34は、ベース部を仮想空間上に配置する。続いて、部品配置部34は、配置された部品5のそれぞれが隣接しているか否かを判定することにより、配置された部品5のうち隣接する2つの部品5の組をそれぞれ特定する。部品配置部34は、隣接していると特定された2つの部品5の組から所定の順番で2つの部品5の組を選択する。部品配置部34は、隣接していると特定された2つの部品5の組のそれぞれにおいて、接合制約条件を満たすように、2つの部品5のうちのいずれか一方を移動等させて位置を調整し、配置を確定する。   Next, in step 105, the component placement unit 34 places each component 5 in the virtual space associated with the real space using the position data and the three-dimensional model for each component ID included in the query. In addition, the component placement unit 34 places the base in the virtual space. Subsequently, the component placement unit 34 identifies a set of two adjacent components 5 among the disposed components 5 by determining whether or not each of the disposed components 5 is adjacent. The component placement unit 34 selects a pair of two components 5 in a predetermined order from the pair of two components 5 identified as being adjacent. The component placement unit 34 adjusts the position by moving one of the two components 5 or the like so as to satisfy the bonding restriction condition in each of the two sets of the components 5 identified as being adjacent to each other. And determine the placement.

次にステップ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 consistency determination unit 35 determines the position of each placed part 5 based on the positional relationship of each part 5 placed in step 105, specifically by at least one of the following determinations. Determine the consistency of From the positional relationship between the position of each of the arranged parts 5 and the position of the base portion, the consistency determining unit 35 determines that there is a consistency when the arranged parts 5 are arranged according to (a) gravity. (B) If the arrangement is not in accordance with gravity, it is determined that there is no consistency. Furthermore, the consistency determination unit 35 determines that there is consistency when the overlap of the area occupied by the three-dimensional model of each of the arranged parts 5 is (a) within a predetermined volume, and (b) a predetermined volume If it exceeds, it is determined that there is no consistency. Furthermore, the consistency determination unit 35 determines that the degree of coincidence between the image captured by the imaging device 14 and the image viewed from the virtual camera of each component 5 placed in the virtual space by the component placement unit 34 is (a) a predetermined value or more If it is, it is determined that there is consistency, and if it is less than (b) a predetermined value, it is determined that there is not consistency.

ステップ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-dimensional recognition unit 36 recognizes a structure based on the position of each part 5 arranged in step 105, This process ends.

ステップ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 step 108, the database storage unit 37 stores the query used in step 104 in the history database 42, and the process proceeds to step 109.

ステップ109で、クエリ再生成決定部38は、履歴データベース42が記憶するクエリが、部品データベース41が記憶する複数の部品5それぞれの部品IDの所定の組み合わせを含むか否かを判定する。クエリ再生成決定部38は、履歴データベース41が部品IDの所定の組み合わせを包含するクエリを含まない場合、クエリを再生成すると決定し、本処理はステップ110へ進む。クエリ再生成決定部38は、履歴データベース41が部品IDの所定の組み合わせを包含するクエリを含む場合、クエリを再生成しないと決定し、本処理は終了する。電子装置3は、クエリを再生成しないと決定して本処理を終了する場合、表示装置12等にエラーを出力することができる。   In step 109, the query regeneration determination unit 38 determines whether the query stored in the history database 42 includes a predetermined combination of component IDs of each of the plurality of components 5 stored in the component database 41. If the history database 41 does not include a query including a predetermined combination of component IDs, the query regeneration determination unit 38 determines to regenerate the query, and the process proceeds to step 110. When the history database 41 includes a query including a predetermined combination of component IDs, the query regeneration determination unit 38 determines not to regenerate a query, and the process ends. The electronic device 3 can output an error to the display device 12 or the like when it is determined that the query is not regenerated and the process ends.

ステップ110で、クエリ再生成部39は、履歴データベース42が記憶するクエリと異なるクエリを生成し、本処理はステップ104へ進む。クエリ再生成部39は、部品配置部34が仮想空間に配置した部品5のうちの2つの部品5の3次元モデル間の長さが所定値以上である場合、該長さに対応する部品5の部品IDを追加したクエリを優先的に生成する。   In step 110, the query regeneration unit 39 generates a query different from the query stored in the history database 42, and the process proceeds to step 104. When the length between the three-dimensional model of two parts 5 of the parts 5 arranged in the virtual space by the part arrangement unit 34 is equal to or more than a predetermined value, the query regeneration unit 39 calculates the parts 5 corresponding to the length Generate queries with priority added to the component ID of.

次に、本発明の実施形態による立体認識システム1の作用効果について説明する。本実施形態では、立体認識システム1は、予め用意された部品5が組み合わされて作成される構造物を対象とし、部品5ごとに、部品5の3次元モデルと接合の仕方を示す接合制約条件を予め定義するものであり、これらのデータを部品データベース41に記憶する。立体認識システム1は、標準的なスマートフォンのカメラを用いて撮影された撮影画像を入力とし、当該撮影画像から直接立体形状を認識せずに、構造物を構成する要素(部品5)を個別に独立して検出する。立体認識システム1は、個別に検出した部品5の部品IDを含むクエリを生成し、クエリを用いて部品データベース41からデータを取得して、接合制約条件を満たすように、各部品5の3次元モデルを接合し、仮想空間上に配置する。立体認識システム1は、部品配置の物理的整合性を評価し、適切な配置を得るまで、クエリを更新しながら、部品データベース41に対する検索と位置合わせを繰り返す。   Next, the effect of the three-dimensional recognition system 1 according to the embodiment of the present invention will be described. In the present embodiment, the three-dimensional recognition system 1 targets a structure created by combining the parts 5 prepared in advance, and for each of the parts 5, a joint constraint that indicates how to join the three-dimensional model of the part 5 Are pre-defined, and these data are stored in the parts database 41. The three-dimensional recognition system 1 receives as an input a photographed image photographed using a standard smartphone camera, and individually recognizes elements (parts 5) constituting a structure without directly recognizing a three-dimensional shape from the photographed image. Independently detect. The three-dimensional recognition system 1 generates a query including the component ID of the component 5 detected individually, acquires data from the component database 41 using the query, and satisfies the joining constraint condition, so that the three-dimensional configuration of each component 5 Join models and place them on virtual space. The three-dimensional recognition system 1 evaluates the physical consistency of the part arrangement, and repeats the search and alignment on the part database 41 while updating the query until the appropriate arrangement is obtained.

このような構成とすることにより、本実施形態では、立体認識システム1は、単一画像から構造物全体の3次元モデルを再構築し、その立体形状を認識することが可能となる。特に、単一画像から直接認識するにあたって、既存の立体形状認識技術では対応できない、外面の露出が少ない部品の空間情報についても推定し、構造物全体の立体形状を認識することが可能となる。これにより、本実施形態では、構造物を撮影した平面画像から立体形状を認識する際の、ユーザ操作の単純さと、構造物を作成する際の自由度との両立が可能となる。   With such a configuration, in the present embodiment, the three-dimensional recognition system 1 can reconstruct a three-dimensional model of the entire structure from a single image and recognize its three-dimensional shape. In particular, when directly recognizing from a single image, it is possible to estimate spatial information of a part with few external surface exposures, which can not be handled by the existing three-dimensional shape recognition technology, and to recognize the three-dimensional shape of the entire structure. Thus, in the present embodiment, it is possible to achieve both the simplicity of the user's operation and the freedom in creating the structure when recognizing a three-dimensional shape from a planar image obtained by photographing the structure.

またこのような構成とすることにより、本実施形態では、立体認識システム1は、接合制約条件を用いて部品5の接合位置に対する制限を定めることにより、部品5の位置を自動的に補正する機能を有する。これにより、部品5の組み立て過程や画像処理過程において発生するノイズを緩和し、より安定的に構造物を認識することが可能となる。   Further, by adopting such a configuration, in the present embodiment, the three-dimensional recognition system 1 has a function of automatically correcting the position of the component 5 by defining the restriction on the bonding position of the component 5 using the bonding constraint condition. Have. As a result, noise generated in the assembly process of the component 5 and the image processing process can be alleviated, and the structure can be recognized more stably.

またこのような構成とすることにより、本実施形態では、立体認識システム1は、既知の部品5だけを認識するため、部品5の認識に対する機械学習が不要であり、計算コストを低減することが可能となる。   Further, by adopting such a configuration, in the present embodiment, since the three-dimensional recognition system 1 recognizes only the known part 5, machine learning for recognition of the part 5 is not necessary, and the calculation cost can be reduced. It becomes possible.

またこのような構成とすることにより、本実施形態では、立体認識システム1は、特別なセンサに依拠せず、標準的なスマートフォンのカメラを用いて撮影された画像のみを入力とすることから、特別な機材を必要としないため、安価に実現することが可能となる。また部品5は、剛体として形状が変化しにくければどのような材質を使ってもよいため、用途に併せて安価に製造することが可能となる。例えば投げる・踏むといった強い衝撃が想定されるアプリケーションの場合には木材を、部品5の作成まで含めてユーザに委ねるアプリケーションの場合には紙を用いるといったように、アプリケーションに応じて適切な材質を選択可能である。   Further, by adopting such a configuration, in the present embodiment, since the three-dimensional recognition system 1 does not rely on a special sensor, only the image taken using a standard smartphone camera is used as an input. Since no special equipment is required, it can be realized inexpensively. Further, since any part of the component 5 may be used as a rigid body as long as it is difficult to change its shape, it can be manufactured inexpensively in accordance with the application. For example, select an appropriate material according to the application, such as using wood for applications where a strong impact such as throwing or stepping is expected, and using paper for applications that include up to the creation of the part 5 up to the user. It is possible.

また本実施形態では、立体認識システム1は、クエリを更新しながら検索と位置合わせを繰り返すとき、クエリの履歴を履歴データベース42に記憶することにより、同じクエリを用いて検索することを防止する。このような構成とすることにより、クエリを再生成する回数を有限にし、立体認識システム1の処理を適切に停止させることが可能となる。また履歴データベース42は同じクエリを用いた検索をしないようにするために用いるものであるため、立体認識システム1は、構造物の認識処理を開始する前に、履歴データベース42が記憶するクエリを消去する。   Further, in the present embodiment, when repeating the search and the alignment while updating the query, the three-dimensional recognition system 1 stores the history of the query in the history database 42, thereby preventing the search using the same query. With such a configuration, it is possible to limit the number of times the query is regenerated and stop the processing of the three-dimensional recognition system 1 appropriately. Further, since the history database 42 is used to prevent the search using the same query, the three-dimensional recognition system 1 deletes the query stored in the history database 42 before starting the recognition process of the structure. Do.

また本実施形態では、立体認識システム1は、仮想空間に最初に配置された2つの部品5の接合基準点6間の長さが所定値以内であるか否かを判定し、所定値以内である場合、2つの部品5は隣接していると判定する。このような構成とすることにより、立体認識システム1は、所定値以内の距離にある2つの部品5の組では、接合制約条件を満たすように位置調整を行い、そうでない部品5については、接合制約条件を満たすように位置調整を行わないようにすることが可能となる。これにより、撮影画像からある部品5が検出されなかった場合などに、該部品5を挟むようにして配置された2つの部品5に対して、接合制約条件を満たすように位置調整を行ってしまうことを防止し、不整合検出を低減することが可能となる。   Further, in the present embodiment, the three-dimensional recognition system 1 determines whether or not the length between the bonding reference points 6 of the two parts 5 initially disposed in the virtual space is within a predetermined value, and within a predetermined value. In some cases, it is determined that the two parts 5 are adjacent. With such a configuration, the three-dimensional recognition system 1 adjusts the position of the set of two components 5 within a predetermined value so as to satisfy the bonding restriction condition, and performs bonding for the other components 5. It is possible to prevent position adjustment so as to satisfy the constraint conditions. As a result, when a part 5 is not detected from the photographed image, etc., position adjustment is performed on the two parts 5 disposed so as to sandwich the part 5 so as to satisfy the bonding restriction condition. It is possible to prevent and reduce mismatch detection.

また本実施形態では、マーカは、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 stereoscopic recognition system 1 obtains the position and orientation of the marker from the photographing device 14 from, for example, the shape and size of the rectangular black frame in the image in which the marker is photographed. It is possible to The three-dimensional recognition system 1 can identify each part 5 from, for example, a dot pattern in an image in which a marker is photographed, using a known image recognition technology.

また本実施形態では、クエリは、部品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-dimensional recognition system 1 uses the query to generate a three-dimensional model and constraint data of each of the components 5 associated with each component ID included in the query, using the query. To each of the queries. Thus, the three-dimensional recognition system 1 acquires the three-dimensional model and the constraint data of each of the parts 5 from the parts database 41. As described above, in the present embodiment, the three-dimensional recognition system 1 performs a search in the component database 41, data acquisition from the component database 41, and storage of data in the history database 42 using a query. Thereby, it is possible to make the information processing of the three-dimensional recognition system 1 more efficient.

また本実施形態では、立体認識システム1は、配置された各部品5の3次元モデルが占める領域の重複度合いに基づいて、配置された各部品5の位置の整合性を判定する。また本実施形態では、立体認識システム1は、配置された各部品5の位置とベース部の位置との位置関係から、配置された各部品5が重力に従った配置であるか否かを判定する。また本実施形態では、立体認識システム1は、撮影装置14により撮影された画像と、部品配置部34が仮想空間上に配置した各部品5の仮想カメラから見た画像との一致度に基づいて、整合性を判定する。このような構成とすることにより、本実施形態では、立体認識システム1は、部品配置の物理的整合性を評価することが可能となる。これにより、立体認識システム1は、認識した構造物が適切なものであるか否かを判断することが可能となる。   Further, in the present embodiment, the three-dimensional recognition system 1 determines the consistency of the positions of the arranged parts 5 based on the overlapping degree of the area occupied by the three-dimensional model of the arranged parts 5. Further, in the present embodiment, the three-dimensional recognition system 1 determines whether or not the arranged components 5 are arranged in accordance with gravity from the positional relationship between the arranged components 5 and the position of the base portion. Do. Further, in the present embodiment, the three-dimensional recognition system 1 is based on the matching degree between the image photographed by the photographing device 14 and the image viewed from the virtual camera of each component 5 disposed in the virtual space by the component placement unit 34. , Determine consistency. With such a configuration, in the present embodiment, the three-dimensional recognition system 1 can evaluate the physical consistency of the component arrangement. Thereby, the three-dimensional recognition system 1 can determine whether or not the recognized structure is appropriate.

また本実施形態では、立体認識システム1は、履歴データベース42が記憶するクエリが、部品データベース41が記憶する部品IDの所定の組み合わせを含むか否かを判定する。部品IDの所定の組み合わせが、一定値以上の確度で画像認識部31により認識された部品IDや一定値以上の優先度の部品IDを含むものである場合、生成するクエリの種類をより限定することが可能となる。これにより、立体認識システム1の情報処理をより効率化することが可能となる。部品IDの所定の組み合わせがすべての組み合わせである場合、部品データベース41に基づいて生成可能な全クエリを生成することが可能であるとともに、クエリを再生成する回数を有限にし、立体認識システム1の処理を適切に停止させることが可能となる。   Further, in the present embodiment, the three-dimensional recognition system 1 determines whether the query stored in the history database 42 includes a predetermined combination of component IDs stored in the component database 41. If the predetermined combination of the component IDs includes the component ID recognized by the image recognition unit 31 with a certainty or more certainty or the component ID with a certain priority or more, the type of query to be generated may be further limited. It becomes possible. Thereby, it is possible to make the information processing of the three-dimensional recognition system 1 more efficient. When the predetermined combination of the part IDs is all combinations, it is possible to generate all the queries that can be generated based on the parts database 41, and the number of times of regenerating the queries is limited. It is possible to stop the processing appropriately.

また本実施形態では、立体認識システム1は、クエリを再生成すると決定した場合、仮想空間に配置した部品5のうちの2つの部品5の3次元モデル間の長さが所定値以上である場合、該長さに対応する部品5の部品IDを追加したクエリを生成する。このような構成とすることにより、本実施形態では、撮影画像から認識できなかった部品5を推定し、該部品5を追加したクエリを優先的に生成することで、立体認識システム1の情報処理をより効率化することが可能となる。   In the present embodiment, when it is determined that the three-dimensional recognition system 1 regenerates the query, the length between the three-dimensional models of two parts 5 of the parts 5 arranged in the virtual space is a predetermined value or more , And generates a query to which the part ID of the part 5 corresponding to the length is added. With such a configuration, in the present embodiment, the component 5 that could not be recognized from the captured image is estimated, and the information processing of the three-dimensional recognition system 1 is preferentially generated by preferentially generating the query to which the component 5 is added. Can be made more efficient.

上記の作用効果は、特に言及が無い限り、他の実施形態や他の実施例においても同様である。   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 part database 41 stores one alignment metadata, which defines a constraint between one part 5 and an arbitrary part 5 to be joined, in association with the part ID of the one part 5. In this example, the constraint data of one component 5 includes one alignment metadata, and the alignment metadata includes the position of the bonding reference point 6 and the data subordinate to the bonding reference point 6. Constraint and Posture Constraint elements.

1つの例では、部品配置部34は、最初に配置された2つの部品5の中心点間の長さが所定値以内であるか否かを判定し、所定値以内である場合、2つの部品5は隣接していると判定する。他の例では、部品配置部34は、最初に配置された2つの部品5の剛体間の長さが所定値以内であるか否かを判定し、所定値以内である場合、2つの部品5は隣接していると判定する。いずれの場合も、部品配置部34は、隣接していると判定された2つの部品5の組から所定の順番で部品5の組を選択し、当該組それぞれにおいて、接合制約条件を満たすように、2つの部品5のうちのいずれか一方を移動等させて、配置を確定する。   In one example, the component placement unit 34 determines whether the length between the center points of the two components 5 initially placed is within a predetermined value, and if within a predetermined value, the two components 5 is determined to be adjacent. In another example, the component placement unit 34 determines whether the length between the rigid bodies of the two components 5 initially placed is within a predetermined value, and if within a predetermined value, the two components 5 Is determined to be adjacent. In any case, the component placement unit 34 selects a set of components 5 in a predetermined order from a set of two components 5 determined to be adjacent, and in each set, satisfies the joining constraint condition. , Move one of the two parts 5 or the like to determine the arrangement.

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 consistency determination unit 35 determines that there is no consistency, the consistency determination unit 35 calculates an evaluation value of the consistency of the position of each of the parts 5 arranged by the parts arrangement unit 34. In step 108, the database storage unit 37 further stores the evaluation value of the consistency of the position of each component 5 arranged by the component arrangement unit 34 in the history database 42 in association with each of the component IDs included in the query storage data. . If it is determined in step 109 that the query regeneration determination unit 38 does not regenerate the query, the electronic device 3 determines, in step 105, each component arranged in the virtual space using the query having the highest consistency with the evaluation value. The structure is recognized by the three-dimensional model of 5 and position data. Thereby, the electronic device 3 uses the arrangement of the parts 5 having the highest consistency according to the evaluation value among the arrangements of the parts 5 determined to be incoherent, and a three-dimensional model of the whole structure It is possible to recognize

以上に説明した処理又は動作において、あるステップにおいて、そのステップではまだ利用することができないはずのデータを利用しているなどの処理又は動作上の矛盾が生じない限りにおいて、処理又は動作を自由に変更することができる。また以上に説明してきた各実施例は、本発明を説明するための例示であり、本発明はこれらの実施例に限定されるものではない。本発明は、その要旨を逸脱しない限り、種々の形態で実施することができる。例えば、各装置の各装置の外観形状は図示されたものに限定されない。   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 履歴データベース
Reference Signs List 1 stereo recognition system 2 network 3 electronic device 4 server 5 component 6 joint reference point 11, 21 processor 12, 22 display device 13, 23 input device 14 imaging device 15, 24 storage device 16, 25 communication device 31 image recognition unit 32 query Generation unit 33 Data acquisition unit 34 Component placement unit 35 Consistency judgment unit 36 Solid recognition unit 37 Database storage unit 38 Query regeneration determination unit 39 Query regeneration unit 41 Component database 42 History database

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.
前記部品配置ステップは、前記取得された部品それぞれの位置データ及び3次元モデルを用いて前記仮想空間に各部品を配置し、前記仮想空間上における隣接する部品のそれぞれにおいて、前記接合制約条件を満たすように各部品の位置を調整して配置する、請求項1又は2に記載のプログラム。   The component arranging step arranges each component in the virtual space using the acquired position data of each component and the three-dimensional model, and the joint constraint condition is satisfied in each of the adjacent components in the virtual space. The program according to claim 1 or 2, wherein the position of each part is adjusted and arranged. 前記部品配置ステップは、前記仮想空間上に配置された部品のうちの2つの部品の3次元モデル間の長さが所定値以内であるか否かに基づいて2つの部品が隣接するか否かを判定する、請求項3に記載のプログラム。   In the component placement step, whether or not two components are adjacent based on whether or not a length between three-dimensional models of two components of the components disposed in the virtual space is within a predetermined value. The program according to claim 3, which determines 前記位置は6自由度位置である、請求項1から4のいずれか1項に記載のプログラム。   The program according to any one of claims 1 to 4, wherein the position is a position with six degrees of freedom. 各部品を識別可能な前記特徴は、各部品が部品表面に有するARマーカである、請求項1から5のいずれか1項に記載のプログラム。   The program according to any one of claims 1 to 5, wherein the feature that can identify each part is an AR marker that each part has on the part surface. 前記データ取得ステップは、クエリが生成された場合、該クエリを用いて、前記部品データベースから、該クエリが含むIDのそれぞれに関連付けられた部品それぞれの3次元モデル及び制約データを、該IDに対応付けて該クエリにそれぞれ加えることにより取得する、請求項1から6のいずれか1項に記載のプログラム。   When the query is generated, the data acquisition step uses the query to correspond the three-dimensional model and constraint data of each of the components associated with each of the IDs included in the query to the ID using the query. The program according to any one of claims 1 to 6, which is obtained by adding each to the query. 前記整合性判定ステップは、前記配置された各部品の3次元モデルが占める領域の重複度合いに基づいて、前記配置された各部品の位置の整合性を判定する、請求項1から7のいずれか1項に記載のプログラム。   The consistency judgment step determines the consistency of the position of each of the arranged parts based on the overlapping degree of the area occupied by the three-dimensional model of each of the arranged parts. The program described in Section 1. 前記画像認識ステップは、前記撮影装置により撮影された画像から前記立体のベース部分を形成するベース部を認識し、
前記部品配置ステップは、該ベース部を前記仮想空間上に配置し、
前記整合性判定ステップは、前記配置された各部品の位置と前記ベース部の位置との位置関係から前記配置された各部品が重力に従った配置であるか否かを判定し、該判定に更に基づいて整合性を判定する、請求項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から9のいずれか1項に記載のプログラム。   In the consistency determination step, an image captured by the imaging device and an image of each of the disposed components viewed from a virtual camera disposed at the position of the virtual space corresponding to the position of the imaging device The program according to any one of claims 1 to 9, wherein the consistency is determined based on the degree of coincidence. 前記データベース記憶ステップは、前記クエリ保存用データが含む部品それぞれのIDに関連付けて、前記配置された各部品の位置を前記履歴データベースに更に記憶する、請求項1から10のいずれか1項に記載のプログラム。   The database storage step according to any one of claims 1 to 10, wherein the position of each of the arranged parts is further stored in the history database in association with the ID of each part included in the data for query storage. Programs. 前記クエリ再生成決定ステップは、前記履歴データベースが記憶するクエリ保存用データが、前記部品データベースが記憶する部品のIDの所定の組み合わせを含むか否かに基づいて、クエリを再生成するか否かを決定する、請求項1から11のいずれか1項に記載のプログラム。   Whether the query regeneration determination step regenerates a query based on whether or not the query storage data stored in the history database includes a predetermined combination of the IDs of the components stored in the components database. The program according to any one of claims 1 to 11, which determines. 前記プログラムは、前記電子装置に、
クエリを再生成しないと決定された場合、エラーを出力するエラー出力ステップを更に実行させる、請求項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.
前記データベース記憶ステップは、前記クエリ保存用データが含む部品それぞれのIDに関連付けて、前記配置された各部品の位置の整合性の評価値を前記履歴データベースに更に記憶する、請求項1から12のいずれか1項に記載のプログラム。   The database storage step further stores an evaluation value of the consistency of 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 data for storing a query. The program according to any one of the items. 前記プログラムは、前記電子装置に、
クエリを再生成しないと決定された場合、前記評価値により最も高い整合性を有する前記配置された各部品の位置に基づいて立体を認識する第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.
前記クエリ再生成ステップは、前記仮想空間上に配置された部品のうちの2つの部品の3次元モデル間の長さが所定値以上である場合、該長さに対応する部品のIDを追加したクエリを生成する、請求項1から15のいずれか1項に記載のプログラム。   In the query regenerating step, when a length between a three-dimensional model of two parts of two parts arranged in the virtual space is equal to or more than a predetermined value, the ID of the part corresponding to the length is added The program according to any one of claims 1 to 15, which generates a query. 予め定められた複数の部品より構成される実空間における立体を認識するための立体認識システムであって、
前記立体を撮影するための撮影装置を備える電子装置と、
各部品の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.
JP2018129249A 2018-07-06 2018-07-06 Program, system, electronic device and method for enabling solid to be recognized Pending JP2019114226A (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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