JP7724429B2 - 3D model generation device, 3D model generation method, and 3D model generation program - Google Patents
3D model generation device, 3D model generation method, and 3D model generation programInfo
- Publication number
- JP7724429B2 JP7724429B2 JP2023195334A JP2023195334A JP7724429B2 JP 7724429 B2 JP7724429 B2 JP 7724429B2 JP 2023195334 A JP2023195334 A JP 2023195334A JP 2023195334 A JP2023195334 A JP 2023195334A JP 7724429 B2 JP7724429 B2 JP 7724429B2
- Authority
- JP
- Japan
- Prior art keywords
- conormal
- point cloud
- target location
- cluster
- normal
- 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.)
- Active
Links
Landscapes
- Image Generation (AREA)
Description
本発明は、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成装置、3次元モデル生成方法、及び3次元モデル生成プログラムに関するものである。 The present invention relates to a 3D model generation device, a 3D model generation method, and a 3D model generation program that use a processor to execute a process for generating a 3D model based on point cloud data acquired by performing a 3D reconstruction process on a target location.
従来、対象場所を撮影した撮影画像に基づいて、対象場所に関する3次元空間情報として点群データを生成する3次元復元の技術が知られている。さらに、対象場所の点群データから対象場所の3次元モデルを生成する技術が知られている(特許文献1参照)。 Conventionally, 3D restoration technology is known that generates point cloud data as 3D spatial information about a target location based on photographed images of the target location. Furthermore, technology is known that generates a 3D model of a target location from point cloud data of the target location (see Patent Document 1).
従来の技術によれば、点群データから3次元モデルを生成するためのアルゴリズムに精通していないユーザであっても、電波伝播シミュレーションに適した3次元モデルを容易にかつ短時間で生成することができる。 With conventional technology, even users who are not familiar with the algorithms for generating 3D models from point cloud data can easily and quickly generate 3D models suitable for radio wave propagation simulations.
しかしながら、点群データから生成された3次元モデルは、電波伝播シミュレーションの用途に限らず、様々な用途に利用することができる。特に、対象場所の3次元モデルに基づいて対向する2つの壁面に関する面間距離などの測定を行うことができる。また、複数の3次元モデルを結合してより大規模な3次元モデルを生成することができる。このため、対象場所の面間距離などの測定や複数の3次元モデルの結合を容易に行える技術が望まれるが、このような要望に対して、従来の技術は何ら配慮されていない。 However, 3D models generated from point cloud data can be used for a variety of purposes, not just radio wave propagation simulations. In particular, it is possible to measure the distance between two opposing walls based on a 3D model of a target location. It is also possible to combine multiple 3D models to generate a larger 3D model. For this reason, there is a demand for technology that can easily measure the distance between walls at a target location and combine multiple 3D models, but conventional technology does not take these needs into consideration.
そこで、本発明は、面間距離の計測や複数の3次元モデルの結合を容易に行える3次元モデルを生成することができる3次元モデル生成装置、3次元モデル生成方法、及び3次元モデル生成プログラムを提供することを主な目的とする。 The primary objective of the present invention is to provide a 3D model generation device, a 3D model generation method, and a 3D model generation program that can generate 3D models that allow for easy measurement of inter-surface distances and the combining of multiple 3D models.
本発明の3次元モデル生成装置は、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成装置であって、前記プロセッサは、平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成する構成とする。 The three-dimensional model generation device of the present invention is a three-dimensional model generation device that uses a processor to execute processing for generating a three-dimensional model based on point cloud data acquired by performing three-dimensional reconstruction processing on a target location , and when setting coordinate axes along four wall surfaces of the target location based on the distribution of normal directions for the entire point cloud of the target location that forms a rectangle in a plan view, the processor acquires, as normal angles, radial angles when the normal directions of each point constituting the point cloud are expressed in cylindrical coordinates, and multiplies the normal angles of each point by four to acquire quadrupled values of each point, and calculates estimates that exclude the influence of outliers from the quadrupled values of each point. a conormal clustering process is performed to extract, from the point cloud of the target location, a set of points whose normal direction coincides with a predetermined direction based on the normal coordinate axis within a predetermined tolerance range, as a conormal cluster; and a rectangularization process is performed to convert the conormal cluster into a rectangular plane, thereby generating the three-dimensional model in which the target location is represented by a set of multiple rectangular planes.
また、本発明の3次元モデル生成方法は、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成方法であって、平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成する構成とする。 Furthermore, the three-dimensional model generation method of the present invention is a three-dimensional model generation method in which a processor executes a process of generating a three-dimensional model based on point cloud data acquired by performing three-dimensional reconstruction processing on a target location, and the method includes the steps of: when setting coordinate axes along four wall surfaces of the target location based on the distribution of normal directions for the entire point cloud of the target location that forms a rectangle in a plan view, acquiring a radial angle when the normal directions of each point constituting the point cloud are expressed in cylindrical coordinates as a normal angle, multiplying the normal angle of each point by four to acquire a quadrupled value of each point, and excluding the influence of outliers from the quadrupled value of each point; using the above formula, estimate an optimal value of the quadruple value, multiply the optimal value of the quadruple value by 1/4 to obtain a rotation angle that defines the direction of the coordinate axis, rotate the provisionally set coordinate axis by the rotation angle to set the normal coordinate axis, perform a conormal clustering process to extract, from the point cloud of the target location, a set of points whose normal direction coincides with a predetermined direction based on the normal coordinate axis within a predetermined tolerance range, and perform a rectangularization process to convert the conormal cluster into a rectangular plane, thereby generating the three-dimensional model that represents the target location as a set of multiple rectangular planes.
また、本発明の3次元モデル生成プログラムは、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成プログラムであって、平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成する構成とする。 Furthermore, a three-dimensional model generation program of the present invention is a three-dimensional model generation program that causes a processor to execute a process of generating a three-dimensional model based on point cloud data acquired by performing three-dimensional reconstruction processing on a target location, and when setting coordinate axes along the four wall surfaces of the target location based on the distribution of normal directions for the entire point cloud of the target location that forms a rectangle in a plan view, acquires the radial angle when the normal direction of each point that constitutes the point cloud is expressed in cylindrical coordinates as the normal angle, multiplies the normal angle of each point by four to acquire the quadrupled value of each point, and estimates the quadrupled value of each point to exclude the influence of outliers. a conormal clustering process is performed to extract, from the point cloud of the target location, a set of points whose normal direction coincides with a predetermined direction based on the normal coordinate axis within a predetermined tolerance range, as a conormal cluster; and a rectangularization process is performed to convert the conormal cluster into a rectangular plane, thereby generating the three-dimensional model in which the target location is represented by a set of multiple rectangular planes.
本発明によれば、復元場所における互いに平行な平面の平行性が確保された3次元モデルが得られる。これにより、面間距離を容易に計測することができる。また、複数の3次元モデルを容易に結合することができる。また、適度に抽象化された3次元モデルを生成するため、プロセッサの処理負荷を軽減することができる。 The present invention allows for the creation of a 3D model in which the parallelism of parallel planes at the reconstruction location is ensured. This makes it easy to measure the distance between surfaces. It also allows for the easy combination of multiple 3D models. Furthermore, since a moderately abstract 3D model is generated, the processing load on the processor can be reduced.
前記課題を解決するためになされた第1の発明は、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成装置であって、前記プロセッサは、平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成する構成とする。 A first invention made to solve the above problems is a 3D model generation device that uses a processor to execute processing to generate a 3D model based on point cloud data acquired by performing 3D reconstruction processing on a target location, wherein the processor, when setting coordinate axes along four wall surfaces of the target location based on the distribution of normal directions for the entire point cloud of the target location that forms a rectangle in a plan view, acquires, as normal angles, radial angles when the normal directions of each point constituting the point cloud are expressed in cylindrical coordinates, multiplies the normal angles of each point by four to acquire quadrupled values of each point, and removes the influence of outliers from the quadrupled values of each point. an optimal value of the quadruple value is estimated using an estimation method that excludes the quadruple value, the optimal value of the quadruple value is multiplied by 1/4 to obtain a rotation angle that defines the direction of the coordinate axis, the provisionally set coordinate axis is rotated by the rotation angle to set the normal coordinate axis, a conormal clustering process is performed to extract, from the point cloud of the target location, a set of points whose normal direction coincides with a predetermined direction based on the normal coordinate axis within a predetermined tolerance range, and a rectangularization process is performed to convert the conormal cluster into a rectangular plane, thereby generating the three-dimensional model that represents the target location as a set of multiple rectangular planes.
これによると、復元場所における互いに平行な平面の平行性が確保された3次元モデルが得られる。これにより、面間距離を容易に計測することができる。また、複数の3次元モデルを容易に結合することができる。また、適度に抽象化された3次元モデルを生成するため、プロセッサの処理負荷を軽減することができる。 This allows for the creation of a 3D model in which the parallelism of parallel planes at the reconstruction location is ensured. This makes it easy to measure the distance between surfaces. It also makes it easy to combine multiple 3D models. Furthermore, since a moderately abstract 3D model is generated, the processing load on the processor can be reduced.
これによると、復元場所の点群の全体を対象にした法線方向の分布状況に基づいて座標軸が設定されることから、特定の平面を基準として座標軸を設定する手法と比較して、復元場所の点群に生じる歪みに基づく誤差が分散されるため、対象場所の壁面に沿う座標軸を適切に設定することができる。また、復元場所の点群が、例えば復元場所に配置された机や棚などの什器を主に表したもので、基準となる大面積の壁面がない場合でも、座標軸を適切に設定することができる。 In this way, coordinate axes are set based on the distribution of normal directions for the entire point cloud of the restoration location. Compared to methods that set coordinate axes based on a specific plane, errors due to distortions that occur in the point cloud of the restoration location are dispersed, making it possible to appropriately set coordinate axes that follow the wall surfaces of the target location. Furthermore, even if the point cloud of the restoration location primarily represents furniture such as desks and shelves placed at the restoration location and there is no large-area wall surface to serve as a reference, coordinate axes can still be appropriately set.
これによると、復元場所の点群の全体を対象にした法線方向の分布状況に基づく座標軸の設定を簡単な手順で適切に行うことができる。 This allows for easy and appropriate setting of coordinate axes based on the distribution of normal directions across the entire point cloud at the restoration location.
また、第2の発明は、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成装置であって、前記プロセッサは、対象場所の点群に対して対象場所の壁面に沿う座標軸を設定し、対象場所の点群から、前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、前記共法線クラスタリング処理の前に、対象場所の点群から任意方向の平面を個別クラスタとして抽出する個別クラスタリング処理を実行し、前記個別クラスタおよび前記共法線クラスタを対象にして矩形化処理を実行して、対象場所を複数の矩形平面の集合で表現した前記3次元モデルを生成する構成とする。 A second invention is a three-dimensional model generation device that uses a processor to execute a process for generating a three-dimensional model based on point cloud data acquired by performing a three-dimensional reconstruction process on a target location, wherein the processor sets coordinate axes along the wall surfaces of the target location for the point cloud of the target location, executes a conormal clustering process to extract from the point cloud of the target location a set of points whose normal direction coincides with a predetermined direction based on the coordinate axes within a predetermined tolerance range as a conormal cluster, executes an individual clustering process before the conormal clustering process to extract planes of any direction from the point cloud of the target location as individual clusters , and executes a rectangularization process on the individual clusters and the conormal clusters to generate the three-dimensional model that represents the target location as a set of multiple rectangular planes .
これによると、個別クラスタリング処理では任意方向の平面を抽出できることから、所定方向の平面しか抽出できない共法線クラスタリング処理の欠点が、個別クラスタリング処理より補われる。一方、個別クラスタリング処理では小さな平面を検出できないが、共法線クラスタリング処理では、所定方向の平面であれば小さな平面も検出できるため、個別クラスタリング処理の欠点が共法線クラスタリング処理より補われる。これにより、共法線クラスタリング処理と個別クラスタリング処理との双方を組み合わせることで、必要なクラスタを適切に抽出することができる。 As a result, because individual clustering processing can extract planes in any direction, it compensates for the drawback of conormal clustering processing, which can only extract planes in a specified direction. On the other hand, while individual clustering processing cannot detect small planes, conormal clustering processing can detect even small planes as long as they are in a specified direction, so the drawback of individual clustering processing is compensated for by conormal clustering processing. As a result, by combining both conormal clustering processing and individual clustering processing, it is possible to appropriately extract the required clusters.
また、第3の発明は、前記プロセッサは、前記共法線クラスタを、その共法線クラスタの形状に対応するように複数のサブクラスタに分割し、前記共法線クラスタおよび前記サブクラスタを前記矩形平面に変換する構成とする。 In a third aspect of the present invention, the processor divides the conormal cluster into a plurality of sub-clusters corresponding to the shape of the conormal cluster, and converts the conormal cluster and the sub-clusters into the rectangular plane.
これによると、対象場所の3次元モデルの忠実度を向上させることができる。 This allows for improved fidelity of the 3D model of the target location.
また、第4の発明は、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成方法であって、平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成する構成とする。 A fourth aspect of the present invention is a three-dimensional model generation method for generating a three-dimensional model based on point cloud data acquired by performing three-dimensional reconstruction processing on a target location, using a processor. When setting coordinate axes along four wall surfaces of the target location based on the distribution of normal directions of the entire point cloud of the target location that forms a rectangle in a plan view, the method acquires, as normal angles, radial angles when the normal directions of each point constituting the point cloud are expressed in cylindrical coordinates, and multiplies the normal angles of each point by four to acquire quadrupled values of each point. The method then uses an estimation method that excludes the influence of outliers on the quadrupled values of each point. the optimal value of the quadruple value is estimated, the optimal value of the quadruple value is multiplied by 1/4 to obtain a rotation angle that defines the direction of the coordinate axes, the provisionally set coordinate axes are rotated by the rotation angle to set the normal coordinate axes, a conormal clustering process is performed to extract from the point cloud of the target location a set of points whose normal direction coincides with a predetermined direction based on the normal coordinate axes within a predetermined tolerance range, and a rectangularization process is performed to convert the conormal cluster into a rectangular plane, thereby generating the three-dimensional model that represents the target location as a set of multiple rectangular planes.
これによると、第1の発明と同様に、復元場所における互いに平行な平面の平行性が確保された3次元モデルが得られる。これにより、面間距離を容易に計測することができる。また、複数の3次元モデルを容易に結合することができる。また、適度に抽象化された3次元モデルを生成するため、プロセッサの処理負荷を軽減することができる。 As with the first invention, this allows for the creation of a 3D model in which the parallelism of parallel planes at the reconstruction location is ensured. This makes it easy to measure inter-surface distances. It also allows for the easy combination of multiple 3D models. Furthermore, since a moderately abstract 3D model is generated, the processing load on the processor can be reduced.
また、第5の発明は、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成プログラムであって、平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成する構成とする。
A fifth aspect of the present invention is a three-dimensional model generation program that causes a processor to execute a process of generating a three-dimensional model based on point cloud data acquired by performing three-dimensional reconstruction processing on a target location, the program comprising: when setting coordinate axes along four wall surfaces of the target location based on a distribution state of normal directions for the entire point cloud of the target location that forms a rectangle in a plan view, acquiring a radial angle when the normal direction of each point constituting the point cloud is expressed in cylindrical coordinates as a normal angle; multiplying the normal angle of each point by four to acquire a quadrupled value of each point; and using an estimation method that excludes the influence of outliers on the quadrupled value of each point. the optimal value of the quadruple value is estimated, the optimal value of the quadruple value is multiplied by 1/4 to obtain a rotation angle that defines the direction of the coordinate axis, the provisionally set coordinate axis is rotated by the rotation angle to set the normal coordinate axis, a conormal clustering process is performed to extract , from the point cloud of the target location, a set of points whose normal direction coincides with a predetermined direction based on the normal coordinate axis within a predetermined tolerance range, and a rectangularization process is performed to convert the conormal cluster into a rectangular plane, thereby generating the three-dimensional model that represents the target location as a set of multiple rectangular planes.
これによると、第1の発明と同様に、復元場所における互いに平行な平面の平行性が確保された3次元モデルが得られる。これにより、面間距離を容易に計測することができる。また、複数の3次元モデルを容易に結合することができる。また、適度に抽象化された3次元モデルを生成するため、プロセッサの処理負荷を軽減することができる。 As with the first invention, this allows for the creation of a 3D model in which the parallelism of parallel planes at the reconstruction location is ensured. This makes it easy to measure inter-surface distances. It also allows for the easy combination of multiple 3D models. Furthermore, since a moderately abstract 3D model is generated, the processing load on the processor can be reduced.
以下、本発明の実施の形態を、図面を参照しながら説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1は、本実施形態に係る3次元モデル生成システムの全体構成図である。 Figure 1 is a diagram showing the overall configuration of a 3D model generation system according to this embodiment.
本システムは、ユーザ端末1とサーバ2(3次元モデル生成装置、図面作成表示装置)とを備えている。ユーザ端末1とサーバ2とは、LANやインターネットなどのネットワークを介して接続されている。 This system comprises a user terminal 1 and a server 2 (a 3D model generation device and a drawing creation and display device). The user terminal 1 and server 2 are connected via a network such as a LAN or the Internet.
ユーザ端末1は、装置本体11とカメラ12とを備えている。ユーザ端末1は、タブレット端末や、ノートPCで構成することができる。 The user terminal 1 comprises a device main body 11 and a camera 12. The user terminal 1 can be configured as a tablet terminal or a notebook PC.
カメラ12は、可視カメラ、すなわち、可視光を検出して被写体を撮影する単眼カメラであり、撮影画像、例えばRGB方式のカラー画像を出力する。なお、サーバ2で行われる3次元復元のために、ユーザ端末1には、カメラ12(可視カメラ)の他に、被写体までの距離を計測するデプスカメラや、3次元の角速度および加速度を検出するIMU(慣性計測装置:Inertial Measurement Unit)などのセンサが設けられてもよい。 Camera 12 is a visible camera, i.e., a monocular camera that detects visible light to capture an image of a subject, and outputs the captured image, for example, an RGB color image. For the 3D reconstruction performed by server 2, in addition to camera 12 (visible camera), user terminal 1 may be equipped with sensors such as a depth camera that measures the distance to the subject and an IMU (Inertial Measurement Unit) that detects three-dimensional angular velocity and acceleration.
ユーザ(作業者)は、ユーザ端末1の装置本体11を保持した状態で対象場所を歩く。このとき、ユーザ端末1では、カメラ12により対象場所が撮影され、対象場所における各地点の撮影画像が順次取得される。なお、ここでは、装置本体11を保持したユーザが対象場所を歩くことで撮影画像を取得する例を示したが、その他、ユーザ端末1を搭載した自走式のロボット等を用いて対象場所の撮影画像を取得するようにしてもよい。 The user (worker) walks through the target location while holding the device main body 11 of the user terminal 1. At this time, the camera 12 of the user terminal 1 captures images of the target location, and captured images of each point in the target location are acquired sequentially. Note that while an example has been shown in which a user holding the device main body 11 captures captured images by walking through the target location, it is also possible to acquire captured images of the target location using a self-propelled robot or the like equipped with the user terminal 1.
サーバ2は、PCで構成される。サーバ2は、ユーザ端末1から受信した撮影画像に基づいて、対象場所に関する3次元空間情報である3次元復元結果としての点群データを生成する。また、サーバ2は、対象場所の点群データに基づいて、対象場所の3次元モデルを生成する。また、サーバ2は、対象場所の3次元モデルに基づいて、対象場所の平面図(2次元レイアウト図)を生成する。また、サーバ2は、生成された対象場所の点群データ、3次元モデル、および平面図をユーザ端末1に表示させる。 The server 2 is composed of a PC. Based on the captured images received from the user terminal 1, the server 2 generates point cloud data as a 3D reconstruction result, which is 3D spatial information about the target location. The server 2 also generates a 3D model of the target location based on the point cloud data of the target location. The server 2 also generates a floor plan (2D layout diagram) of the target location based on the 3D model of the target location. The server 2 also displays the generated point cloud data, 3D model, and floor plan of the target location on the user terminal 1.
次に、ユーザ端末1およびサーバ2の概略構成について説明する。図2は、ユーザ端末1およびサーバ2の概略構成を示すブロック図である。図3は、3次元モデル生成処理の手順を示すフロー図である。 Next, we will explain the general configuration of the user terminal 1 and server 2. Figure 2 is a block diagram showing the general configuration of the user terminal 1 and server 2. Figure 3 is a flow diagram showing the steps in the 3D model generation process.
ユーザ端末1は、カメラ12の他に、ディスプレイ13(表示部)と、入力デバイス14と、記憶部15と、プロセッサ16(CPU)と、通信部17と、を備えている。 In addition to the camera 12, the user terminal 1 is equipped with a display 13 (display unit), an input device 14, a memory unit 15, a processor 16 (CPU), and a communication unit 17.
ディスプレイ13は、撮影作業や編集作業などに関する各種の操作画面や、各種の処理条件を設定するための設定画面や、生成された3次元復元結果(点群データ)や3次元モデルを確認するための閲覧画面を表示する。入力デバイス14は、ユーザが入力操作を行うものである。なお、ユーザ端末1がタブレット端末で構成される場合には、入力デバイス14としてのタッチパネルとディスプレイ13としての表示パネルとが一体化されたタッチパネルディスプレイが設けられる。 The display 13 displays various operation screens related to shooting and editing operations, a setting screen for setting various processing conditions, and a viewing screen for checking the generated 3D reconstruction results (point cloud data) and 3D models. The input device 14 is used by the user to perform input operations. If the user terminal 1 is configured as a tablet terminal, a touch panel display is provided that integrates a touch panel as the input device 14 and a display panel as the display 13.
記憶部15は、プロセッサ16で実行されるプログラムなどを記憶する。また、記憶部15は、カメラ12による撮影画像を記憶する。撮影画像は、適宜なタイミングでサーバ2に送信される。 The memory unit 15 stores programs executed by the processor 16. The memory unit 15 also stores images captured by the camera 12. The captured images are transmitted to the server 2 at appropriate times.
プロセッサ16は、記憶部15に記憶されたプログラムを実行することで、カメラ12による撮影、ディスプレイ13による画面表示、入力デバイス14による操作情報の取得などに関する各種の処理を行う。 The processor 16 executes programs stored in the memory unit 15 to perform various processes related to capturing images using the camera 12, displaying images on the display 13, and obtaining operation information using the input device 14.
通信部17は、サーバ2との間で通信を行う。具体的には、通信部17は、カメラ12による撮影画像、およびユーザによる入力デバイス14の操作により取得した操作情報をサーバ2に送信する。また、通信部17は、サーバ2から送信される各種の画面の表示情報を受信する。 The communication unit 17 communicates with the server 2. Specifically, the communication unit 17 transmits to the server 2 images captured by the camera 12 and operation information acquired through user operation of the input device 14. The communication unit 17 also receives various screen display information transmitted from the server 2.
サーバ2は、通信部21と、記憶部22と、プロセッサ23と、を備えている。 The server 2 includes a communication unit 21, a memory unit 22, and a processor 23.
通信部21は、ユーザ端末1との間で通信を行う。具体的には、通信部21は、ユーザ端末1から送信される撮影画像および操作情報を受信する。また、通信部21は、ユーザ端末1に表示させる各種の画面の表示情報をユーザ端末1に送信する。 The communication unit 21 communicates with the user terminal 1. Specifically, the communication unit 21 receives captured images and operation information sent from the user terminal 1. The communication unit 21 also sends display information for various screens to be displayed on the user terminal 1 to the user terminal 1.
記憶部22は、プロセッサ23で実行されるプログラムなどを記憶する。また、記憶部22は、プロセッサ23で生成された点群データ、3次元モデルや2次元モデルのデータ、および平面図(レイアウト図)などを記憶する。 The storage unit 22 stores programs executed by the processor 23. The storage unit 22 also stores point cloud data generated by the processor 23, data on 3D and 2D models, and floor plans (layout drawings).
プロセッサ23は、記憶部22に記憶されたプログラムを実行することで各種の処理を行う。本実施形態では、プロセッサ23が、3次元復元処理、3次元モデル生成処理、図面生成処理、および図面表示処理などを行う。 The processor 23 performs various processes by executing programs stored in the memory unit 22. In this embodiment, the processor 23 performs 3D reconstruction processing, 3D model generation processing, drawing generation processing, drawing display processing, and the like.
3次元復元処理では、プロセッサ23が、ユーザ端末1から受信した撮影画像に基づいて、対象場所に関する3次元空間情報としての点群データを生成する。3次元復元処理は、例えば、ワールド座標系における撮影時のカメラ位置・姿勢をSLAM(Simultaneous Localization and Mapping)法によって求め、このカメラ位置・姿勢に基づいてデプスカメラから得られたデプス情報をワールド座標系に重畳することで実現できる。 In the 3D reconstruction process, the processor 23 generates point cloud data as 3D spatial information about the target location based on the captured image received from the user terminal 1. The 3D reconstruction process can be achieved, for example, by determining the camera position and orientation in the world coordinate system at the time of capture using the SLAM (Simultaneous Localization and Mapping) method, and then superimposing the depth information obtained from the depth camera on the world coordinate system based on this camera position and orientation.
3次元モデル生成処理では、プロセッサ23が、3次元復元処理で生成した点群データに基づいて、対象場所の3次元モデルを生成する。3次元モデル生成処理では、対象場所の点群に対して、前処理(ST101)、クラスタリング処理(ST102)、および矩形化処理(ST103)の各処理が順次行われて、3次元モデルが生成される(図3参照)。 In the 3D model generation process, the processor 23 generates a 3D model of the target location based on the point cloud data generated in the 3D reconstruction process. In the 3D model generation process, the point cloud of the target location is sequentially subjected to preprocessing (ST101), clustering (ST102), and rectangularization (ST103), to generate a 3D model (see Figure 3).
前処理では、プロセッサ23が、3次元復元処理で生成した対象場所の点群に対して、点群を構成する各点の法線の推定、床面の抽出、座標軸の設定、および平坦面の抽出などの処理を行う。 In pre-processing, the processor 23 performs processes on the point cloud of the target location generated by the 3D reconstruction process, such as estimating the normals of each point that makes up the point cloud, extracting the floor surface, setting coordinate axes, and extracting flat surfaces.
クラスタリング処理では、プロセッサ23が、対象場所の点群から平面(所定の密度で平面状に分布する点の集合)を検出して、その平面を構成する点の集合をクラスタとして抽出する。また、クラスタリング処理では、プロセッサ23が、クラスタを複数のサブクラスタに分割する。 In the clustering process, the processor 23 detects a plane (a set of points distributed in a plane at a predetermined density) from the point cloud of the target location, and extracts the set of points that make up that plane as a cluster. In the clustering process, the processor 23 also divides the cluster into multiple sub-clusters.
矩形化処理では、プロセッサ23が、クラスタリング処理で取得したクラスタおよびサブクラスタを矩形平面に変換して、対象場所を複数の矩形平面の集合で表現した3次元モデルを生成する。 In the rectangularization process, the processor 23 converts the clusters and sub-clusters obtained in the clustering process into rectangular planes, and generates a three-dimensional model that represents the target location as a collection of multiple rectangular planes.
図面生成処理には、平面図生成処理と、寸法線挿入処理とが含まれる。 The drawing generation process includes floor plan generation and dimension line insertion.
平面図生成処理では、プロセッサ23が、3次元モデル生成処理で生成した3次元モデルに基づいて、復元場所の平面図(2次元レイアウト図)を生成する。具体的には、3次元モデルから床部分および天井部分を除いた上で、3次元モデルをXY平面(水平面)に正射影する、すなわち、Z方向に正射影することで、平面図が生成される。 In the floor plan generation process, the processor 23 generates a floor plan (2D layout diagram) of the restoration location based on the 3D model generated in the 3D model generation process. Specifically, the floor and ceiling portions are removed from the 3D model, and the 3D model is orthogonally projected onto the XY plane (horizontal plane), i.e., orthogonally projected in the Z direction, to generate the floor plan.
寸法線挿入処理では、プロセッサ23が、3次元モデルから代表的な平面を抽出し、その代表的な平面に関係する寸法線を、平面図に挿入する。例えば、代表的な平面として復元場所の壁面が抽出され、互いに対向する2つの壁面同士の面間距離を表す寸法線が平面図に挿入される。 In the dimension line insertion process, the processor 23 extracts a representative plane from the three-dimensional model and inserts dimension lines related to that representative plane into the plan view. For example, a wall surface at the restoration location is extracted as a representative plane, and a dimension line representing the inter-surface distance between two opposing wall surfaces is inserted into the plan view.
図面表示処理には、平面図表示処理と、測定表示処理とが含まれる。 Drawing display processing includes floor plan display processing and measurement display processing.
平面図表示処理では、プロセッサ23が、図面生成処理で生成した平面図をユーザ端末1のディスプレイ13に表示させる。 In the floor plan display process, the processor 23 displays the floor plan generated in the drawing generation process on the display 13 of the user terminal 1.
測定表示処理では、プロセッサ23が、測定対象物を指定するユーザの操作に応じて、指定された測定対象物に関係する測定処理を実行して、その測定結果をユーザ端末1のディスプレイ13に表示させる。具体的には、2つの平面同士の面間距離が3次元モデルに基づいて測定されて、その面間距離が表示される。また、2つの平面の平行度が点群データに基づいて算出されて、その2つの平面の平行度が表示される。 In the measurement display process, the processor 23 executes a measurement process related to the specified measurement object in response to a user operation to specify the measurement object, and displays the measurement results on the display 13 of the user terminal 1. Specifically, the inter-plane distance between two planes is measured based on a three-dimensional model, and this inter-plane distance is displayed. In addition, the parallelism of the two planes is calculated based on the point cloud data, and the parallelism of the two planes is displayed.
次に、サーバ2で行われる前処理(図3のST101)について説明する。図4は、前処理の手順を示すフロー図である。 Next, we will explain the pre-processing (ST101 in Figure 3) performed by server 2. Figure 4 is a flow diagram showing the pre-processing procedure.
サーバ2では、まず、法線推定処理が行われる(ST201)。法線推定処理では、復元場所の点群を構成する各点の法線が推定される。 First, server 2 performs normal estimation processing (ST201). In normal estimation processing, the normals of each point that constitutes the point cloud at the restoration location are estimated.
次に、床面推定処理が行われる(ST202)。床面推定処理では、復元場所の点群から床面となる水平面が抽出される。具体的には、点群を構成する各点における法線ベクトルと、Z方向の基準ベクトル[0,0,1]との内積が、所定の閾値(例えば0.9)を超える点が、水平面として抽出される。また、点群を構成する各点のz座標に関するヒストグラムが求められて、その1位と2位のピークが床面と天井面に該当するものとして、そのうちのz座標の小さい方が床面と認識される。 Next, floor surface estimation processing is performed (ST202). In floor surface estimation processing, a horizontal plane that will become the floor surface is extracted from the point cloud at the restored location. Specifically, points where the dot product of the normal vector at each point that makes up the point cloud and the Z-direction reference vector [0,0,1] exceeds a predetermined threshold (e.g., 0.9) are extracted as horizontal surfaces. A histogram of the z coordinates of each point that makes up the point cloud is also obtained, and the first and second peaks correspond to the floor and ceiling surfaces, with the smaller z coordinate being recognized as the floor surface.
次に、座標軸設定処理が行われる(ST203)。座標軸設定処理では、復元場所の点群に対して、対象場所の壁面に沿う向きに座標軸(X軸およびY軸)が設定される。 Next, coordinate axis setting processing is performed (ST203). In the coordinate axis setting processing, coordinate axes (X-axis and Y-axis) are set for the point cloud of the restoration location in directions that follow the wall surfaces of the target location.
次に、平坦面抽出処理が行われる(ST204)。平坦面抽出処理では、復元場所の点群に対して、局所特徴量が算出され、その局所特徴量に基づいて、平坦面が抽出される。局所特徴量の算出では主成分分析が用いられる。まず、各点の近傍点から共分散行列が求められ、その共分散行列の固有値が求められ、固有値が降順にソートされて順にλ1,λ2,λ3とすると、(λ2-λ3)/λ1>0.3となる点が抽出される。クラスタリング処理などの以降の処理は、抽出された平坦面を対象にして実行される。 Next, flat surface extraction processing is performed (ST204). In flat surface extraction processing, local features are calculated for the point cloud at the restoration location, and flat surfaces are extracted based on these local features. Principal component analysis is used to calculate the local features. First, a covariance matrix is calculated from the neighboring points of each point, and the eigenvalues of this covariance matrix are calculated. The eigenvalues are sorted in descending order and, assuming λ1, λ2, and λ3, points where (λ2 - λ3)/λ1>0.3 are extracted. Subsequent processing, such as clustering, is performed on the extracted flat surfaces.
なお、前処理では、この他に、復元場所の点群に含まれるノイズ(孤立点)を除去する処理や、点群のダウンサンプルの処理が行われる。ダウンサンプルの処理では、例えばボクセルサイズが0.01(1cm)に設定される。また、床面がz=0、点群中心が中央、最大垂直面がX軸方向となるように、点群全体に対する移動および回転の処理が行われる。 In addition to the above, preprocessing also removes noise (isolated points) from the point cloud at the restoration location and downsamples the point cloud. In downsampling, the voxel size is set to 0.01 (1 cm), for example. The entire point cloud is also translated and rotated so that the floor is at z=0, the center of the point cloud is the center, and the maximum vertical plane is in the X-axis direction.
次に、サーバ2で行われる座標軸設定処理について説明する。図5は、座標軸設定処理の実行前後の復元場所の点群の状況を示す説明図である。図6は、第1,第2の座標軸設定処理の状況を示す説明図である。図7,図8は、第2の座標軸設定処理の要領を示す説明図である。 Next, we will explain the coordinate axis setting process performed by server 2. Figure 5 is an explanatory diagram showing the state of the point cloud at the restoration location before and after the coordinate axis setting process is performed. Figure 6 is an explanatory diagram showing the state of the first and second coordinate axis setting processes. Figures 7 and 8 are explanatory diagrams showing the outline of the second coordinate axis setting process.
座標軸設定処理では、3次元復元処理により取得した復元場所の点群データに対して、3次元直交座標系の座標軸(X軸、Y軸およびZ軸)が設定される。本実施形態では、復元場所の点群に対して、対象場所の壁面に沿う向きに座標軸(X軸およびY軸)が設定される。なお、ユーザ端末1に設けられたIMUによる撮影時の検出データに基づいて点群の鉛直方向が設定できるため、Z軸は既知である。すなわち、床面推定処理で取得した床面に直交する方向がZ軸に設定される。 In the coordinate axis setting process, the coordinate axes (X-axis, Y-axis, and Z-axis) of a three-dimensional Cartesian coordinate system are set for the point cloud data of the restoration location acquired by the three-dimensional restoration process. In this embodiment, the coordinate axes (X-axis and Y-axis) are set for the point cloud of the restoration location in a direction along the wall surface of the target location. Note that the vertical direction of the point cloud can be set based on the detection data during image capture by the IMU installed in the user terminal 1, so the Z-axis is known. In other words, the direction perpendicular to the floor surface acquired in the floor surface estimation process is set as the Z-axis.
図5に示す例は、復元場所が、4つの壁面が平面視で矩形をなすように施工された部屋である。具体的には、復元場所が会議室であり、室内に机や椅子などが配置されている。なお、図5に示す例は、復元場所を対象として生成された点群を真上から見た状態を表すが、部屋の内部の状態が現れるように、復元場所の点群から天井部分を構成する点群が削除されている。 In the example shown in Figure 5, the restoration location is a room with four walls constructed to form a rectangle in plan view. Specifically, the restoration location is a conference room, with desks, chairs, etc. arranged inside the room. Note that the example shown in Figure 5 shows the point cloud generated for the restoration location as viewed from directly above, but the point cloud that makes up the ceiling has been deleted from the point cloud of the restoration location so that the interior of the room appears.
図5(A)に示す例では、復元場所の点群に対して、復元場所の壁面に対して傾いた状態で座標軸が暫定的に設定されている。この状態では、クラスタリング処理などの以降の処理を適切に行うことができない。そこで、本実施形態では、図5(B)に示すように、復元場所の壁面に沿うように座標軸(X軸およびY軸)が設定される。すなわち、平面視で矩形をなす4つの壁面に直交する2方向が座標軸(X軸およびY軸)に設定される。 In the example shown in Figure 5(A), the coordinate axes for the point cloud at the restoration location are provisionally set at an angle relative to the walls of the restoration location. In this state, subsequent processing such as clustering cannot be performed properly. Therefore, in this embodiment, as shown in Figure 5(B), the coordinate axes (X-axis and Y-axis) are set to follow the walls of the restoration location. In other words, the coordinate axes (X-axis and Y-axis) are set in two directions perpendicular to the four walls that form a rectangle in plan view.
座標軸設定処理には、第1の座標軸設定処理と第2の座標軸設定処理とがあり、第1の座標軸設定処理と第2の座標軸設定処理とのいずれかが実施される。すなわち、第1の座標軸設定処理が適切か否かが判定され、第1の座標軸設定処理が適切と判定されると、第1の座標軸設定処理が実行され、第1の座標軸設定処理が不適切と判定されると、第2の座標軸設定処理が実行される。 There are two types of coordinate axis setting processes: first coordinate axis setting process and second coordinate axis setting process, and either the first coordinate axis setting process or the second coordinate axis setting process is performed. That is, a determination is made as to whether the first coordinate axis setting process is appropriate, and if it is determined that the first coordinate axis setting process is appropriate, the first coordinate axis setting process is performed. If it is determined that the first coordinate axis setting process is inappropriate, the second coordinate axis setting process is performed.
第1の座標軸設定処理では、復元場所の点群から検出された最大面積の平面を基準面としてその基準面に沿うように座標軸が設定される。このとき、対象場所の点群から鉛直面が抽出される。具体的には、点群を構成する各点の法線と、座標軸を基準にした鉛直方向の法線[0,0,1]との内積が、閾値(例えば0.5)未満となる点が抽出される。 In the first coordinate axis setting process, the plane with the largest area detected from the point cloud of the restoration location is used as the reference plane, and the coordinate axes are set to follow this reference plane. At this time, a vertical plane is extracted from the point cloud of the target location. Specifically, points are extracted where the dot product of the normal of each point that makes up the point cloud and the vertical normal [0,0,1] based on the coordinate axis is less than a threshold value (e.g., 0.5).
第2の座標軸設定処理では、平面視で矩形をなす復元場所の点群の全体を対象にした法線方向の分布状況に基づいて、復元場所の4つの壁面(垂直面)の方向を推定して、その推定結果に基づいて座標軸を設定する。通常の屋内では、4つの壁面が平面視で矩形をなすように施工されている。また、屋内に配置される机や棚などの物体の多くは壁面と平行に配置される。このため、復元場所の点群の全体を対象にした法線方向の分布状況に基づいて、復元場所の4つの壁面の方向を推定することができる。 In the second coordinate axis setting process, the directions of the four wall surfaces (vertical surfaces) of the restoration location are estimated based on the distribution of normal directions across the entire point cloud of the restoration location, which forms a rectangle in plan view, and the coordinate axes are set based on the estimation results. In a typical indoor space, the four wall surfaces are constructed to form a rectangle in plan view. Furthermore, many objects placed indoors, such as desks and shelves, are positioned parallel to the walls. For this reason, the directions of the four wall surfaces of the restoration location can be estimated based on the distribution of normal directions across the entire point cloud of the restoration location.
また、第1の座標軸設定処理が適切か否かの判定では、復元場所の点群から検出された最大面積の平面が基準平面として適切か否かが判定される。例えば、対象場所の全体の大きさに対して最大面積の平面が十分に大きいか否かが判定される。ここで、第1の座標軸設定処理が適切と判定されると、第1の座標軸設定処理が実行され、第1の座標軸設定処理が不適切と判定されると、第2の座標軸設定処理が実行される。 In addition, when determining whether the first coordinate axis setting process is appropriate, a determination is made as to whether the plane with the largest area detected from the point cloud of the restored location is appropriate as a reference plane. For example, a determination is made as to whether the plane with the largest area is sufficiently large compared to the overall size of the target location. Here, if the first coordinate axis setting process is determined to be appropriate, the first coordinate axis setting process is executed, and if the first coordinate axis setting process is determined to be inappropriate, the second coordinate axis setting process is executed.
図6(A)に示す例では、最大面積の平面が基準平面として適切であり、第1の座標軸設定処理が適切と判定されて、第1の座標軸設定処理が実行される。これにより、復元場所の点群に対して座標軸(X軸およびY軸)が適切に設定される。 In the example shown in Figure 6(A), the plane with the largest area is determined to be appropriate as the reference plane, and the first coordinate axis setting process is determined to be appropriate, so the first coordinate axis setting process is executed. This allows the coordinate axes (X-axis and Y-axis) to be appropriately set for the point cloud at the restoration location.
一方、図6(B)に示す例では、最大面積の平面が基準平面として不適切であり、第1の座標軸設定処理が実行されると、復元場所の点群に対して座標軸(X軸およびY軸)が不適切に設定される。すなわち、第1の座標軸設定処理では、基準とした平面の歪みの影響が全体に波及し、座標軸(X軸およびY軸)の方向と復元場所の壁面の方向との間の誤差が顕著である。 On the other hand, in the example shown in Figure 6 (B), the plane with the largest area is inappropriate as a reference plane, and when the first coordinate axis setting process is performed, the coordinate axes (X-axis and Y-axis) are inappropriately set for the point cloud of the restoration location. In other words, in the first coordinate axis setting process, the distortion of the reference plane has an effect on the entire image, and there is a significant error between the direction of the coordinate axes (X-axis and Y-axis) and the direction of the wall surface of the restoration location.
これに対して、第2の座標軸設定処理では、図6(C)に示すように、壁面の全体に対して適切な状態で座標軸を設定することができる。この場合、復元場所の点群に生じる歪みに基づく誤差が分散され、座標軸(X軸およびY軸)の方向と復元場所の壁面の方向との間の誤差が最小になるように座標軸が設定される。 In contrast, the second coordinate axis setting process allows the coordinate axes to be set appropriately for the entire wall surface, as shown in Figure 6(C). In this case, errors due to distortion occurring in the point cloud at the restored location are dispersed, and the coordinate axes are set so that the error between the direction of the coordinate axes (X-axis and Y-axis) and the direction of the wall surface at the restored location is minimized.
第2の座標軸設定処理では、平面視で矩形をなす復元場所の点群の全体を対象にした法線方向の分布状況に基づいて、復元場所の4つの壁面(垂直面)の方向が推定されて、その推定結果に基づいて座標軸が設定される。なお、第2の座標軸設定処理では、水平方向の座標軸(X軸およびY軸)を設定するため、対象場所の点群を構成する各点のうち、法線方向が概ね水平方向となる点、すなわち、垂直な面を表す点のみが処理対象として抽出される。 In the second coordinate axis setting process, the directions of the four wall surfaces (vertical surfaces) of the restoration location are estimated based on the distribution of normal directions for the entire point cloud of the restoration location, which is rectangular in plan view, and the coordinate axes are set based on these estimation results. Note that in the second coordinate axis setting process, because horizontal coordinate axes (X-axis and Y-axis) are set, only points whose normal directions are roughly horizontal, i.e., points representing vertical surfaces, are extracted as processing targets from among the points that make up the point cloud of the target location.
具体的には、図7(A)に示すように、復元場所の点群を構成する各点の法線ベクトルを、その始点が座標軸の原点に位置するように配置すると、各点の法線ベクトルの終点、すなわち、各点の法線方向を表す点が円周(球面)上に並び、各点の法線方向の分布状況を把握することができる。 Specifically, as shown in Figure 7(A), if the normal vectors of each point that makes up the point cloud at the restoration location are positioned so that their starting points are located at the origin of the coordinate axes, the end points of the normal vectors of each point, i.e., the points representing the normal directions of each point, will be lined up on a circumference (sphere), making it possible to grasp the distribution of the normal directions of each point.
図7(B)に示す例は、4つの壁面が平面視で矩形をなすように配置された復元場所を対象にして、復元場所の点群を構成する各点の法線方向の分布状況を表したものである。ここでは、点群を構成する各点の法線方向が円筒座標(r,θ,z)で表され、円筒座標の径方向の角度により法線角度θ(法線ベクトルの方位角)が表される。また、点群を構成する各点の法線方向を表す点が、4つの壁面の方向に対応して90度おきの4か所に集中している。 The example shown in Figure 7(B) represents the distribution of the normal directions of each point that makes up the point cloud of a restoration location where four wall surfaces are arranged to form a rectangle in a plan view. Here, the normal direction of each point that makes up the point cloud is expressed in cylindrical coordinates (r, θ, z), and the normal angle θ (the azimuth angle of the normal vector) is expressed by the radial angle of the cylindrical coordinates. Furthermore, the points that represent the normal directions of each point that makes up the point cloud are concentrated in four locations, spaced 90 degrees apart, corresponding to the directions of the four wall surfaces.
次に、図8に示すように、円筒座標上で各点の法線角度θを4倍した4倍値4θを取得する。ここでは、点群を構成する各点の法線方向を表す点が集まる4つの集中分布箇所(図7(B)参照)が1つの集中分布箇所に集約される。 Next, as shown in Figure 8, the normal angle θ of each point on the cylindrical coordinate system is multiplied by four to obtain the quadrupled value 4θ. Here, the four concentrated distribution points (see Figure 7(B)) where points representing the normal directions of each point that make up the point cloud are gathered are aggregated into a single concentrated distribution point.
次に、4倍値4θの最適値を推定する。ここで、点群を構成する各点の法線方向を表す点は多くの外れ値を含む。そこで、各点の4倍値4θに対して、外れ値の影響を除外する推定方法を適用して、4倍値4θの最適値を推定する。推定方法には、例えばRANSAC(Random Sample Consensus)法を用いて外れ値を除いた上で円筒座標における重心を求め、重心の径方向の角度を取得する方法が考えられる。 Next, the optimal value of the quadruple value 4θ is estimated. Here, the points representing the normal directions of each point that makes up the point cloud contain many outliers. Therefore, an estimation method that removes the influence of outliers is applied to the quadruple value 4θ of each point to estimate the optimal value of the quadruple value 4θ. One possible estimation method is to use, for example, the RANSAC (Random Sample Consensus) method to remove outliers, then find the center of gravity in cylindrical coordinates and obtain the radial angle of the center of gravity.
このようにして4倍値4θの最適値が求められると、その4倍値4θの最適値を1/4倍することで、座標軸の方向を規定する回転角φが求められる。ここで得られる回転角φは、暫定的に設定された水平方向の座標軸(X軸およびY軸)に対する代表的な法線角度の傾き、すなわち、復元場所の4つの壁面の傾きを表す。したがって、暫定的に設定された水平方向の座標軸(X軸およびY軸)を回転角φだけ回転させることで、復元場所の4つの壁面に沿うように正規の座標軸が設定される。なお、回転角φは-45度から45度の範囲で求まる。 Once the optimal value of the quadruple value 4θ is found in this way, the rotation angle φ that defines the direction of the coordinate axes is found by multiplying that optimal value by 1/4. The rotation angle φ obtained here represents the inclination of the typical normal angle with respect to the provisionally set horizontal coordinate axes (X-axis and Y-axis), i.e., the inclination of the four wall surfaces of the restored location. Therefore, by rotating the provisionally set horizontal coordinate axes (X-axis and Y-axis) by the rotation angle φ, the correct coordinate axes are set to align with the four wall surfaces of the restored location. The rotation angle φ can be found in the range of -45 degrees to 45 degrees.
また、回転角φが求められることで、水平方向の2つ座標軸(X軸およびY軸)の方向が定まるが、X軸およびY軸がいずれの方向かは不定である。そこで、復元場所の点群が回転後に横長になるように、X軸およびY軸が設定されるとよい。このとき、復元場所の点群に対して境界ボックス(外接矩形)が設定されて、復元場所の点群が横長か縦長かの判定が行われるとよい。ここで、復元場所の点群が縦長であれば、回転角φからさらに90度回転させた状態でX軸およびY軸が設定される。 Furthermore, by determining the rotation angle φ, the directions of the two horizontal coordinate axes (X-axis and Y-axis) are determined, but the direction of the X-axis and Y-axis is indeterminate. Therefore, the X-axis and Y-axis should be set so that the point cloud of the restoration location becomes horizontal after rotation. At this time, a bounding box (circumscribed rectangle) should be set for the point cloud of the restoration location, and a determination should be made as to whether the point cloud of the restoration location is horizontal or vertical. Here, if the point cloud of the restoration location is vertical, the X-axis and Y-axis are set after rotating it by an additional 90 degrees from the rotation angle φ.
このように、第2の座標軸設定処理では、復元場所の点群の全体を対象にした法線方向の分布状況に基づいて座標軸が設定されることから、特定の平面を基準として座標軸を設定する第1の座標軸設定処理と比較して、点群の誤差が分散されるため、対象場所の壁面に沿う座標軸を適切に設定することができる。また、点群に対して座標軸が高精度に設定されるため、座標軸を基準にして行われるクラスタリング処理においてクラスタを適切に抽出することができる。 In this way, in the second coordinate axis setting process, coordinate axes are set based on the distribution of normal directions for the entire point cloud at the restoration location. Compared to the first coordinate axis setting process, which sets coordinate axes based on a specific plane, errors in the point cloud are dispersed, making it possible to appropriately set coordinate axes that follow the wall surfaces of the target location. Furthermore, because coordinate axes are set with high precision for the point cloud, clusters can be appropriately extracted in the clustering process, which is performed based on the coordinate axes.
ところで、復元場所によっては基準平面にふさわしい面積を持つ平面がない場合もあり、この場合、最大面積の平面を基準平面として座標軸を設定する第1の座標軸設定処理では、座標軸を設定すること自体が困難である。例えば、大きな部屋(例えば倉庫やオフィスや店舗)の中に棚や机などの什器が多数配置されている復元場所の場合に、棚や机などの什器が主に撮影されると、生成された復元場所の点群には部屋の壁面を表す点はほとんど含まれない状態となる。この場合、復元場所の点群に、基準平面に適した面積を持つ垂直な平面が存在しない。 However, depending on the restoration location, there may not be a plane with an area suitable for use as a reference plane. In such cases, it may be difficult to set the coordinate axes using the first coordinate axis setting process, which sets the coordinate axes using the plane with the largest area as the reference plane. For example, if the restoration location is a large room (such as a warehouse, office, or store) with many shelves, desks, and other furniture, and the images mainly depict furniture such as shelves and desks, the generated point cloud for the restoration location will contain almost no points representing the walls of the room. In this case, the point cloud for the restoration location does not contain a vertical plane with an area suitable for use as a reference plane.
一方、部屋に配置された棚や机などの什器は、部屋の壁面に平行に配置されることが一般的であり、棚や机などの什器を表す点群を構成する各点の法線方向は、部屋の壁面に直交するかあるいは平行となることが多い。このため、復元場所の点群に部屋の壁面を表す点がほとんど含まれない状態でも、第2の座標軸設定処理によると、対象場所の壁面に沿うものと想定される水平方向の座標軸(X軸およびY軸)を適切に設定することができる。また、棚や机などの什器を表す点群に歪みがある場合でも、その歪みが適切に吸収されて、座標軸を適切に設定することができる。 On the other hand, furniture such as shelves and desks placed in a room are generally arranged parallel to the room's walls, and the normal direction of each point that makes up the point cloud representing furniture such as shelves and desks is often perpendicular to or parallel to the room's walls. For this reason, even if the point cloud of the restoration location contains few points that represent the room's walls, the second coordinate axis setting process can appropriately set horizontal coordinate axes (X-axis and Y-axis) that are assumed to follow the walls of the target location. Furthermore, even if there is distortion in the point cloud representing furniture such as shelves and desks, the distortion is appropriately absorbed, allowing the coordinate axes to be appropriately set.
次に、サーバ2で行われるクラスタリング処理(図3のST102)について説明する。図9は、クラスタリング処理の手順を示すフロー図である。図10は、共法線クラスタリング処理の状況を示す説明図である。図11は、共法線クラスタリング処理の概要を示す説明図である。 Next, the clustering process (ST102 in Figure 3) performed by server 2 will be described. Figure 9 is a flow diagram showing the steps of the clustering process. Figure 10 is an explanatory diagram showing the status of the conormal clustering process. Figure 11 is an explanatory diagram showing an overview of the conormal clustering process.
クラスタリング処理では、図9(A)に示すように、まず、個別クラスタリング処理が行われる(ST301)。次に、共法線クラスタリング処理が行われる(ST302)。 As shown in Figure 9(A), in the clustering process, individual clustering is first performed (ST301). Next, conormal clustering is performed (ST302).
個別クラスタリング処理では、対象場所の点群から任意の方向の平面(所定の密度で平面状に分布する点の集合)が検出されて、その平面を構成する点の集合が個別クラスタとして抽出される。個別クラスタリング処理では、外れ値の影響を除外する推定方法、例えばRANSACを用いて任意の方向の平面が検出される。 In individual clustering processing, a plane (a set of points distributed in a plane at a specified density) in an arbitrary direction is detected from the point cloud of the target location, and the set of points that make up that plane is extracted as an individual cluster. In individual clustering processing, a plane in an arbitrary direction is detected using an estimation method that eliminates the influence of outliers, such as RANSAC.
共法線クラスタリング処理では、対象場所の点群から、座標軸を基準にした所定方向の平面(所定の密度で平面状に分布する点の集合)を群として検出する(所定方向については後述する)。すなわち、所定方向と点群の点法線方向とが所定の許容範囲内で一致する点の集合を平面群として検出する。さらに、平面群から各平面を共法線クラスタとして抽出する。所定方向は、例えば22.5度刻みで合計21通りを設定する。 In conormal clustering processing, a group of planes (a set of points distributed in a planar pattern at a specified density) in a specified direction based on the coordinate axes is detected from the point cloud of the target location (the specified direction is described below). In other words, a set of points where the specified direction and the point normal direction of the point cloud match within a specified tolerance range are detected as a group of planes. Furthermore, each plane is extracted from the group of planes as a conormal cluster. A total of 21 specified directions are set, for example, in increments of 22.5 degrees.
なお、所定方向は、法線ベクトルの成分として表すと、例えば[1.,0.,0.],[0.,1.,0.],[0.7071,0.7071,0.],[-0.7071,0.7071,0.],[0.9239,0.3827,0.],[-0.3827,0.9239,0.],[0.3827,0.9239,0.],[-0.9239,0.3827,0.],[0.9239,0.,0.3827],[0.,0.9239,0.3827],[-0.9239,0.,0.3827],[0.,-0.9239,0.3827],[0.7071,0.,0.7071],[0.,0.7071,0.7071],[-0.7071,0.,0.7071],[0.,-0.7071,0.7071],[0.3827,0.,0.9239],[0.,0.3827,0.9239],[-0.3827,0.,0.9239],[0.,-0.3827,0.9239],[0.,0.,1.]の21通りを設定することができる。 The specified direction can be expressed as the components of a normal vector, for example: [1.,0.,0.], [0.,1.,0.], [0.7071,0.7071,0.], [-0.7071,0.7071,0.], [0.9239,0.3827,0.], [-0.3827,0.9239,0.], [0.3827,0.9239,0.], [-0.9239,0.3827,0.], [0.9239,0.,0.3827], [0.,0.9239,0.3827], [-0.9239, 21 possible settings are possible: [0.,0.3827],[0.,-0.9239,0.3827],[0.7071,0.,0.7071],[0.,0.7071,0.7071],[-0.7071,0.,0.7071],[0.,-0.7071,0.7071],[0.3827,0.,0.9239],[0.,0.3827,0.9239],[-0.3827,0.,0.9239],[0.,-0.3827,0.9239],[0.,0.,1.].
共法線クラスタリング処理(図9(A)のST302)では、図9(B)に示す手順で各処理が実行される。 In the conormal clustering process (ST302 in Figure 9(A)), each step is performed according to the procedure shown in Figure 9(B).
まず、共法線面抽出処理が行われる(ST401)。共法線面抽出処理では、復元場所の点群から、座標軸を基準にした所定方向と法線方向とが許容範囲内で一致する点の集合となる平面(共法線面)が抽出される。具体的には、復元場所の点群を構成する各点に関して、点法線と設定法線との内積が閾値(例えば0.985)を超える点が、共法線面として抽出される。ここで、点法線とは、点群を構成する各点の法線を指す。また、設定法線とは、座標軸を基準にした所定方向の法線(21通りのひとつ)を指す。すなわち、設定法線を法線とする平面群が、所定方向の共法線面として抽出される。 First, a conormal surface extraction process is performed (ST401). In this process, a plane (conormal surface) is extracted from the point cloud of the restoration location, which is a collection of points whose normal direction coincides with a predetermined direction based on the coordinate axes within an allowable range. Specifically, for each point that makes up the point cloud of the restoration location, points where the dot product of the point normal and the set normal exceeds a threshold value (e.g., 0.985) are extracted as conormal surfaces. Here, a point normal refers to the normal of each point that makes up the point cloud. Furthermore, a set normal refers to a normal (one of 21 possible directions) in a predetermined direction based on the coordinate axes. In other words, a group of planes whose normal is the set normal are extracted as conormal surfaces in the predetermined direction.
次に、密度ベースクラスタリング処理が行われる(ST402)。密度ベースクラスタリング処理では、密度ベースクラスタリング(DBSCAN:Density-based spatial clustering of applications with noise)の手法を用いて、共法線面抽出処理で抽出された共法線面がグループ化されて所定方向ごとの共法線クラスタが生成される。 Next, density-based clustering processing is performed (ST402). In density-based clustering processing, the conormal planes extracted in the conormal plane extraction processing are grouped using a density-based clustering (DBSCAN: Density-based spatial clustering of applications with noise) technique, and conormal clusters are generated for each specified direction.
次に、極小クラスタ破棄処理が行われる(ST403)。極小クラスタ破棄処理では、密度ベースクラスタリング処理で取得した共法線クラスタのうち、構成点数が所定の閾値未満となる共法線クラスタが破棄される。閾値は例えば200点に設定される。この場合、前処理において例えば1cm単位でボクセル化されていると、面積が200cm2未満となるクラスタが概ね破棄される。 Next, the smallest cluster discarding process is performed (ST403). In the smallest cluster discarding process, of the conormal clusters obtained in the density-based clustering process, those conormal clusters whose constituent points are less than a predetermined threshold are discarded. The threshold is set to 200 points, for example. In this case, if voxelization was performed in 1 cm increments in the preprocessing, for example, clusters with an area less than 200 cm2 will generally be discarded.
次に、軸回転処理の必要性が判定される(ST404)。ここで、軸回転処理の必要性があると判定されると(ST404でYes)、対象とするクラスタに関して座標軸を回転する処理が行われる(軸回転処理)(ST405)。 Next, the necessity of axis rotation processing is determined (ST404). If it is determined that axis rotation processing is necessary (Yes in ST404), the coordinate axes of the target cluster are rotated (axis rotation processing) (ST405).
次に、サブクラスタリング処理が行われる(ST406)。サブクラスタリング処理では、密度ベースクラスタリング処理(ST402)で取得した共法線クラスタで極小クラスタ破棄処理(ST403)を経たものが、サブクラスタに分割される。なお、軸回転処理が行われた場合には、サブクラスタリング処理が終了すると、クラスタに対して最初の軸回転とは逆向きの軸回転が行われる。 Next, sub-clustering processing is performed (ST406). In sub-clustering processing, the conormal clusters obtained in the density-based clustering processing (ST402) that have undergone the minimum cluster discarding processing (ST403) are divided into sub-clusters. If axial rotation processing has been performed, once the sub-clustering processing is completed, the clusters are rotated in the opposite direction to the initial axial rotation.
次に、クラスタグループ生成処理が行われる(ST407)。クラスタグループ生成処理では、共法線クラスタ(サブクラスタに分解されたものも含む)を所定方向ごとにグループ化して共法線クラスタグループを生成する。共法線クラスタグループは、座標軸を基準にした所定方向(設定法線)ごとに生成される。 Next, a cluster group generation process is performed (ST407). In the cluster group generation process, conormal clusters (including those decomposed into sub-clusters) are grouped for each predetermined direction to generate conormal cluster groups. Conormal cluster groups are generated for each predetermined direction (set normal) based on the coordinate axes.
なお、共法線クラスタリング処理では、共法線クラスタが検出される度に、その共法線クラスタに含まれる点が、以降の処理対象となる点群から除外される。このとき、共法線クラスタに含まれる点、すなわち、共法線クラスタが検出された際の境界ボックス、具体的には、軸平行境界ボックス(AABB:Axis-Aligned Bounding Box)または有向境界ボックス(OBB:Oriented Bounding Box)に含まれる点が除外される。これにより、同一の点が異なる共法線クラスタに重複して含まれることを避けることができる。また、共法線クラスタが検出されるのに応じて、共法線クラスタに含まれる点が次々に対象場所の点群から除外されるので、共法線クラスタの検出の順序を制御することで検出面方向について優先順位付けを行うことができる。例えば、垂直面の検出を優先する場合は、垂直面を対象にした共法線クラスタの検出から始めて、最後に水平面を対象にした共法線クラスタの検出が行われるようにしてもよい。 In the conormal clustering process, each time a conormal cluster is detected, the points included in that conormal cluster are excluded from the point cloud to be processed thereafter. At this time, points included in the conormal cluster, i.e., points included in the bounding box when the conormal cluster was detected—specifically, the axis-aligned bounding box (AABB) or oriented bounding box (OBB)—are excluded. This prevents the same point from being included in multiple conormal clusters. Furthermore, since points included in conormal clusters are successively excluded from the point cloud at the target location as conormal clusters are detected, controlling the order in which conormal clusters are detected allows for prioritization of detected plane directions. For example, if priority is given to detecting vertical planes, the process can begin with detecting conormal clusters for vertical planes and finish with detecting conormal clusters for horizontal planes.
また、図9(B)では、共法線クラスタリング処理におけるサブクラスタリング処理が示されているが、個別クラスタリング処理においてもサブクラスタリング処理が行われる。具体的には、個別クラスタリング処理において個別クラスタとして検出された有向境界ボックスに含まれる点を対象にして、サブクラスタリング処理が行われる。 Also, while Figure 9(B) shows sub-clustering processing in the conormal clustering process, sub-clustering processing is also performed in the individual clustering process. Specifically, sub-clustering processing is performed on points included in the oriented bounding boxes detected as individual clusters in the individual clustering process.
図10に示す例は、図5(B)に示した復元場所の点群に対して共法線クラスタリング処理が実行された場合である。共法線クラスタリング処理では、復元場所の点群が共法線面に分解され、その共法線面がグループ化されて共法線クラスタとして抽出され、さらに共法線クラスタが所定方向(設定法線)ごとにグループ化される。なお、図10では、共法線クラスタが互いに異なる色(濃度)で描画されている。 The example shown in Figure 10 is a case where conormal clustering processing has been performed on the point cloud of the restored location shown in Figure 5(B). In conormal clustering processing, the point cloud of the restored location is decomposed into conormal planes, and these conormal planes are grouped and extracted as conormal clusters. The conormal clusters are then further grouped by specified direction (set normal). Note that in Figure 10, the conormal clusters are drawn in different colors (densities).
図10(A)に示す例は、法線方向がX方向[1,0,0]となるクラスタ、すなわち、一方の壁面に平行な共法線面を有するクラスタのグループである。図10(B)に示す例は、法線方向がY方向[0,1,0]となるクラスタ、すなわち、他方の壁面に平行な共法線面を有するクラスタのグループである。図10(C)に示す例は、法線方向がZ方向[0,0,1]となるクラスタ、すなわち、床面に平行な共法線面を有するクラスタのグループである。 The example shown in Figure 10(A) is a cluster whose normal direction is the X direction [1,0,0], i.e., a group of clusters with conormal planes parallel to one wall surface. The example shown in Figure 10(B) is a cluster whose normal direction is the Y direction [0,1,0], i.e., a group of clusters with conormal planes parallel to the other wall surface. The example shown in Figure 10(C) is a cluster whose normal direction is the Z direction [0,0,1], i.e., a group of clusters with conormal planes parallel to the floor surface.
図11(A)に示す例では、復元対象物として、円筒の中に2つの平面がL字形状に接合された状態で配置されている。図11(B)に示す例は、図11(A)に示す対象場所の点群から抽出された法線方向が所定方向[0,1,0]となるクラスタのグループである。この場合、グループに属するクラスタは3つである。図11(C)に示す例は、対象場所の点群から抽出された法線方向が所定方向[-1,1,0]となるクラスタのグループである。この場合、グループに属するクラスタは2つである。図11(D)に示す例は、対象場所の点群から抽出された法線方向が所定方向[0,0,1]となるクラスタのグループである。この場合、グループに属するクラスタは1つである。 In the example shown in Figure 11(A), the object to be restored is a cylinder with two planes joined in an L-shape and arranged inside. The example shown in Figure 11(B) is a group of clusters whose normal direction extracted from the point cloud of the target location shown in Figure 11(A) is a predetermined direction [0,1,0]. In this case, there are three clusters belonging to the group. The example shown in Figure 11(C) is a group of clusters whose normal direction extracted from the point cloud of the target location is a predetermined direction [-1,1,0]. In this case, there are two clusters belonging to the group. The example shown in Figure 11(D) is a group of clusters whose normal direction extracted from the point cloud of the target location is a predetermined direction [0,0,1]. In this case, there is one cluster belonging to the group.
次に、サーバ2で行われる個別クラスタリング処理について説明する。図12は、個別クラスタリング処理の状況を示す説明図である。 Next, we will explain the individual clustering process performed on server 2. Figure 12 is an explanatory diagram showing the status of the individual clustering process.
図12(A)に示す例では、部屋にパーティションおよびテーブルが配置されている。1つのパーティション51は、他のパーティションおよびテーブルとは異なる向きに配置されている。座標軸(X軸およびY軸)は、パーティション51以外のパーティションおよびテーブルの向きに沿うように設定される。この場合、パーティション51が座標軸に基づく設定方向から外れているため、共法線クラスタリング処理が行われると、図12(B)に示すように、矩形化処理後の3次元モデルにおいてパーティション51が適切に表現されない。すなわち、パーティション51を表す矩形平面に連続性がなく、パーティション51が2つの所定方向(例えば22.5度および45度)の矩形平面52に分解された状態になる。 In the example shown in Figure 12(A), partitions and tables are arranged in a room. One partition 51 is arranged in a different orientation from the other partitions and tables. The coordinate axes (X-axis and Y-axis) are set to follow the orientations of the partitions and tables other than partition 51. In this case, because partition 51 deviates from the set orientation based on the coordinate axes, when conormal clustering processing is performed, partition 51 is not properly represented in the 3D model after rectangularization processing, as shown in Figure 12(B). In other words, there is no continuity in the rectangular plane representing partition 51, and partition 51 is decomposed into rectangular planes 52 in two specified directions (e.g., 22.5 degrees and 45 degrees).
そこで、本実施形態では、対象場所の点群から任意方向の平面を個別に抽出する個別クラスタリング処理が共法線クラスタリング処理の前に行われる。これにより、矩形化処理後の3次元モデルでは、図12(C)に示すように、パーティション51を表す矩形平面53が1つの平面上に配置されて実形状に近い状態に改善される。 Therefore, in this embodiment, an individual clustering process is performed before the conormal clustering process, in which planes of any direction are individually extracted from the point cloud of the target location. As a result, in the 3D model after the rectangularization process, as shown in Figure 12 (C), the rectangular planes 53 representing the partitions 51 are arranged on a single plane, improving the shape to be closer to the actual shape.
個別クラスタリング処理では、対象場所の点群から任意方向の平面が個別クラスタとして抽出される。このとき、復元場所の点群に対して有向境界ボックスが設定され、その有向境界ボックスに含まれる点が個別クラスタとして抽出される。また、個別クラスタリング処理では、外れ値の影響を除外する推定方法として、例えばRANSACの手法が用いられる。 In the individual clustering process, a plane of arbitrary direction is extracted as an individual cluster from the point cloud of the target location. At this time, an oriented bounding box is set for the point cloud of the restored location, and the points contained in that oriented bounding box are extracted as an individual cluster. In addition, the individual clustering process uses an estimation method, such as the RANSAC technique, to eliminate the influence of outliers.
また、個別クラスタリング処理では、平面パッチ検出(Planar patch detection)の手法が用いられる。平面パッチ検出では、コプラナリティ角度に基づいて、平面パッチが検出される。コプラナリティ角度(coplanarity deg)は、面中心から点群構成点に引いたベクトルと法線ベクトルとのなす角を規定するものである。コプラナリティ角度は、90度が最も厳しく、この場合、完全に平面上の点しか許容しない。一方、コプラナリティ角度を小さくすると、平面から外れた点も許容するようになる。コプラナリティ角度は、例えば85度に設定される。なお、この平面検出の手法に関して、文献「A. Araujo and M. Oliveira, A robust statistics approach for plane detection in unorganized point clouds, Pattern Recognition, 2020」に記載がある。 In addition, the individual clustering process uses a planar patch detection technique. In planar patch detection, planar patches are detected based on the coplanarity angle. The coplanarity angle (coplanarity deg) defines the angle between the normal vector and the vector drawn from the center of the surface to a point cloud constituent point. A coplanarity angle of 90 degrees is the strictest, allowing only points that are completely on the plane. On the other hand, decreasing the coplanarity angle allows points that are outside the plane. The coplanarity angle is set to, for example, 85 degrees. This plane detection technique is described in the paper "A. Araujo and M. Oliveira, A robust statistics approach for plane detection in unorganized point clouds, Pattern Recognition, 2020."
ここで、個別クラスタリング処理では、有向境界ボックスを設定することにより任意方向の平面を検出できるが、このとき、RANSACの手法が用いられて確率的探索が行われる。このため、個別クラスタリング処理では、復元場所の点群から大きな平面を検出することができるが、小さな平面は検出できない場合がある。一方、共法線クラスタリング処理は、座標軸を基準にした所定方向から大きく外れた方向の平面は検出できないが、小さな平面も検出できる。 In individual clustering, planes of any direction can be detected by setting oriented bounding boxes. A probabilistic search is performed using the RANSAC method. Therefore, while individual clustering can detect large planes from the point cloud at the restored location, it may not be able to detect small planes. On the other hand, conormal clustering cannot detect planes that deviate significantly from the specified direction based on the coordinate axes, but it can also detect small planes.
このように、個別クラスタリング処理では任意方向の平面を抽出できることから、所定方向の平面しか抽出できない共法線クラスタリング処理の欠点が、個別クラスタリング処理より補われる。一方、個別クラスタリング処理では小さな平面を検出できないが、共法線クラスタリング処理では、所定方向の平面であれば小さな平面も検出できるため、個別クラスタリング処理の欠点が共法線クラスタリング処理より補われる。これにより、共法線クラスタリング処理と個別クラスタリング処理との双方を組み合わせることで、必要なクラスタを適切に抽出することができる。 In this way, individual clustering processing can extract planes in any direction, which compensates for the drawback of conormal clustering processing, which can only extract planes in a specified direction. On the other hand, while individual clustering processing cannot detect small planes, conormal clustering processing can detect even small planes as long as they are in a specified direction, so the drawback of individual clustering processing is compensated for by conormal clustering processing. As a result, by combining both conormal clustering processing and individual clustering processing, it is possible to appropriately extract the required clusters.
また、本実施形態では、個別クラスタリング処理が共法線クラスタリング処理の前に実行され、まず、個別クラスタリング処理により任意方向の大きな平面が検出される。次に、共法線クラスタリング処理が実行される。このとき、個別クラスタリング処理で取得した個別クラスタを構成する点が対象場所の点群から除外された上で、共法線クラスタリング処理が実行される。これにより、個別クラスタリング処理により検出された個別クラスタを構成する点が、共法線クラスタリング処理で再検出されないようになる。このため、座標軸に基づく所定方向から外れた方向の平面が無理に所定方向の平面に分解されることで不正なクラスタが生成されることを避けることができる。 In addition, in this embodiment, the individual clustering process is performed before the conormal clustering process, and first, large planes in any direction are detected by the individual clustering process. Next, the conormal clustering process is performed. At this time, the points that make up the individual clusters obtained by the individual clustering process are excluded from the point cloud of the target location, and then the conormal clustering process is performed. This prevents the points that make up the individual clusters detected by the individual clustering process from being re-detected by the conormal clustering process. This makes it possible to avoid the generation of incorrect clusters caused by forcibly decomposing planes in a direction that deviates from the specified direction based on the coordinate axes into planes in the specified direction.
また、共法線クラスタリングでは、小さな平面が多数検出される場合があるが、座標軸に基づく所定方向の平面に限定されるため、矩形化処理が行われて得られる3次元モデルが過度に煩雑にならず整然とした状態で生成される。 In addition, while conormal clustering may detect many small planes, it is limited to planes in a specific direction based on the coordinate axes, so the 3D model obtained after rectangularization processing is generated in a neat and orderly manner without being overly complex.
なお、個別クラスタリング処理では、点群に有向境界ボックスを設定することで、任意の方向の平面を検出することができるが、このとき、有向境界ボックスから得られる法線方向は、RANSACが与えた乱数値に基づくものであって精度が悪いため、有向境界ボックスに含まれる各点に対して平面推定をやり直して正しい法線方向を取得するとよい。 In the individual clustering process, planes of any direction can be detected by setting a oriented bounding box for the point cloud. However, the normal direction obtained from the oriented bounding box is based on random numbers assigned by RANSAC and is therefore of low accuracy. Therefore, it is advisable to redo the plane estimation for each point included in the oriented bounding box to obtain the correct normal direction.
ところで、座標軸設定処理では、平面視で矩形となる部屋の壁面と平行となるように座標軸(X軸およびY軸)が設定されるが、平面視で矩形とならない部屋の場合、一部の壁面が座標軸と平行とならない場合がある。この場合、共法線クラスタリング処理でも、一部の壁面を抽出できない場合がある。一方、個別クラスタリング処理では、座標軸に基づく所定方向から外れた任意の方向の平面を検出できることから、平面視で矩形とならない部屋の壁面を検出する用途に用いることができる。 In the coordinate axis setting process, the coordinate axes (X-axis and Y-axis) are set so that they are parallel to the walls of a room that is rectangular in plan view. However, in rooms that are not rectangular in plan view, some of the walls may not be parallel to the coordinate axes. In such cases, even conormal clustering process may not be able to extract some of the walls. On the other hand, individual clustering process can detect planes in any direction that deviates from the specified direction based on the coordinate axes, so it can be used to detect the walls of rooms that are not rectangular in plan view.
なお、図12に示す例におけるパーティション51のように、部屋の壁面やその壁面に平行に配置された他の多くの物体とは大きく異なる向きに配置された物体が存在する場合、そのような物体は、法線方向の分布に基づく第2の座標軸設定処理では外れ値となるため、座標軸の設定に影響しない。 Note that if there is an object, such as partition 51 in the example shown in Figure 12, that is positioned in a direction significantly different from the wall of the room and the many other objects that are positioned parallel to that wall, such an object will be an outlier in the second coordinate axis setting process based on the distribution of normal directions, and will not affect the setting of the coordinate axes.
次に、サーバ2で行われる軸回転処理について説明する。図13は、軸回転処理の状況を示す説明図である。 Next, we will explain the axis rotation processing performed by server 2. Figure 13 is an explanatory diagram showing the status of the axis rotation processing.
図13(A)に示す例では、壁面に沿って斜めに細長い手すり61が配置されている。手すり61は、座標軸の方向から大きく外れた方向に延びている。一方、共法線クラスタリング処理では、手すりを表す点群に1つのクラスタが設定され、そのクラスタがサブクラスタリング処理で複数のサブクラスタに分割される。このとき、座標軸の方向に沿った辺を有する境界ボックス(外接矩形)が設定され、手すり61の全体に設定されたクラスタが、座標軸の方向の境界ボックスに分解される。このため、クラスタリング処理の後に矩形化処理が行われると、図13(B)に示すように、手すり61が複数の矩形平面62により階段状に表現され、実形状との乖離が甚だしい。 In the example shown in Figure 13(A), a long, thin handrail 61 is placed diagonally along the wall. The handrail 61 extends in a direction significantly different from the direction of the coordinate axes. In contrast, in conormal clustering processing, one cluster is set in the point cloud representing the handrail, and this cluster is then divided into multiple sub-clusters in sub-clustering processing. At this time, a bounding box (circumscribing rectangle) with sides aligned with the coordinate axis direction is set, and the cluster set for the entire handrail 61 is decomposed into bounding boxes aligned with the coordinate axis direction. For this reason, when rectangularization processing is performed after clustering processing, the handrail 61 is represented in a stepped shape made up of multiple rectangular planes 62, as shown in Figure 13(B), which is significantly different from the actual shape.
そこで、本実施形態では、サブクラスタリング処理に入る前に、対象とするクラスタに対して座標軸を相対的に回転させる軸回転処理が行われる。これにより、図13(C)に示すように、手すり61を表す複数の矩形平面63が、手すり61が延びた方向に真直に並んだ状態になり、実形状に近い状態に改善される。 Therefore, in this embodiment, before entering the sub-clustering process, an axis rotation process is performed to rotate the coordinate axes relative to the target cluster. As a result, as shown in Figure 13 (C), multiple rectangular planes 63 representing the handrail 61 are aligned straight in the direction in which the handrail 61 extends, improving the state to be closer to the actual shape.
また、軸回転処理の必要性が判定され、軸回転処理の必要性がある場合に軸回転処理が行われる。軸回転処理の必要性は、クラスタの点群に対して任意の方向に設定される有向境界ボックスのフィッティング率に応じて判定される。すなわち、有向境界ボックスのフィッティング率が高い場合に、軸回転処理が行われる。また、軸回転処理が行われると、矩形化処理後の3次元モデルでは、軸回転処理が行われたクラスタに対応する矩形平面の辺の向きが他の矩形平面と異なるため、3次元モデルが煩雑で見苦しく感じる場合がある。そこで、有向境界ボックスのフィッティング率に関する閾値を調整して、軸回転処理が過度に実施されないようにするとよい。これにより、3次元モデルを整然として見やすい状態に生成することができる。 The necessity of axial rotation processing is also determined, and if necessary, axial rotation processing is performed. The necessity of axial rotation processing is determined based on the fitting rate of an oriented bounding box that is set in an arbitrary direction relative to the point cloud of the cluster. In other words, axial rotation processing is performed if the fitting rate of the oriented bounding box is high. Furthermore, when axial rotation processing is performed, the orientation of the sides of the rectangular plane corresponding to the axially rotated cluster in the 3D model after rectangularization processing differs from that of other rectangular planes, which can make the 3D model appear cluttered and unsightly. Therefore, it is recommended to adjust the threshold for the fitting rate of the oriented bounding box to prevent excessive axial rotation processing. This allows for the generation of a 3D model that is orderly and easy to view.
軸回転処理では、クラスタの点群に対して設定された有向境界ボックスの軸方向の傾きに基づいて、クラスタに対して座標軸を相対的に回転させる角度が設定される。 In the axis rotation process, the angle by which the coordinate axes are rotated relative to the cluster is set based on the axial tilt of the oriented bounding box set for the cluster's point cloud.
具体的には、まず、法線が上向きとなるようにクラスタの点群を回転させる。次に、クラスタの点群に対して軸平行境界ボックスおよび有向境界ボックスを設定する。次に、軸平行境界ボックスおよび有向境界ボックスに関して、XY平面(水平面)への正射影面積を求める。次に、軸平行境界ボックスおよび有向境界ボックスの各々の正射影面積の比率が所定の閾値(例えば1.5)を超えた場合、軸回転が必要と判定する。軸回転が必要と判定されると、有向境界ボックスの傾きに応じて、クラスタに対して座標軸を相対的に回転させる。サブクラスタリング処理が終了すると、クラスタの点群に関して最初の回転とは逆向きの軸回転を行う。 Specifically, first, the cluster's point cloud is rotated so that the normal points upward. Next, an axis-aligned bounding box and an oriented bounding box are set for the cluster's point cloud. Next, the orthogonal projection areas of the axis-aligned bounding box and the oriented bounding box onto the XY plane (horizontal plane) are calculated. Next, if the ratio of the orthogonal projection areas of the axis-aligned bounding box and the oriented bounding box exceeds a predetermined threshold (e.g., 1.5), it is determined that axial rotation is necessary. If it is determined that axial rotation is necessary, the coordinate axes are rotated relative to the cluster according to the inclination of the oriented bounding box. When the sub-clustering process is complete, the cluster's point cloud is subjected to an axial rotation in the opposite direction to the initial rotation.
次に、サーバ2で行われるサブクラスタリング処理について説明する。図14,図15,図16,図17は、サブクラスタリング処理の状況を示す説明図である。なお、図14,図15,図16,図17では、サブクラスタが互いに異なる色(濃度)で描画されている。 Next, we will explain the sub-clustering process performed by server 2. Figures 14, 15, 16, and 17 are explanatory diagrams showing the status of the sub-clustering process. Note that in Figures 14, 15, 16, and 17, the sub-clusters are drawn in different colors (densities).
サブクラスタリング処理では、密度ベースクラスタリング処理で取得した共法線クラスタで極小クラスタ破棄処理を経たものが、複数のサブクラスタに分割される。 In the subclustering process, the conormal clusters obtained in the density-based clustering process are divided into multiple subclusters after the smallest clusters are discarded.
図14に示す例は、法線方向がX方向[1,0,0]となるクラスタ、すなわち、一方の壁面に平行な共法線面を有する共法線クラスタのグループである。図14(A)に示す共法線クラスタに対してサブクラスタリング処理が実施されると、図14(B)に示すように、共法線クラスタがサブクラスタに分割される。 The example shown in Figure 14 is a cluster whose normal direction is the X direction [1,0,0], i.e., a group of conormal clusters with conormal planes parallel to one wall. When subclustering processing is performed on the conormal cluster shown in Figure 14(A), the conormal cluster is divided into subclusters as shown in Figure 14(B).
図15に示す例は、法線方向がY方向[0,1,0]となるクラスタ、すなわち、他方の壁面に平行な共法線面を有するクラスタのグループである。図15(A)に示す共法線クラスタに対してサブクラスタリング処理が実施されると、図15(B)に示すように、共法線クラスタがサブクラスタに分割される。 The example shown in Figure 15 is a group of clusters whose normal direction is the Y direction [0,1,0], i.e., clusters with conormal planes parallel to the other wall surface. When subclustering processing is performed on the conormal cluster shown in Figure 15(A), the conormal cluster is divided into subclusters as shown in Figure 15(B).
図16に示す例は、法線方向がZ方向[0,0,1]となるクラスタ、すなわち、床面に平行な共法線面を有するクラスタのグループである。図16(A)に示す共法線クラスタに対してサブクラスタリング処理が実施されると、図16(B)に示すように、共法線クラスタがサブクラスタに分割される。 The example shown in Figure 16 is a group of clusters whose normal direction is the Z direction [0,0,1], i.e., clusters with conormal planes parallel to the floor surface. When subclustering processing is performed on the conormal cluster shown in Figure 16(A), the conormal cluster is divided into subclusters as shown in Figure 16(B).
図17に示す例は、図16に示す例と同様に、法線方向がZ方向[0,0,1]となるクラスタのグループであるが、図16に示す例とは異なる方向から見た状態で描画されている。 The example shown in Figure 17 is a group of clusters whose normal direction is the Z direction [0,0,1], similar to the example shown in Figure 16, but is drawn as viewed from a different direction than the example shown in Figure 16.
次に、サブクラスタリング処理の要領について説明する。図18,図19,図20,図21,図22,図23,図24,図25は、サブクラスタリング処理の要領を示す説明図である。なお、図18~図25に示す例では、クラスタがXY平面上にあるものとする。 Next, the sub-clustering process will be explained. Figures 18, 19, 20, 21, 22, 23, 24, and 25 are explanatory diagrams showing the sub-clustering process. Note that in the examples shown in Figures 18 to 25, the clusters are assumed to be on the XY plane.
クラスタ(共法線クラスタおよび個別クラスタ)は、平面状でかつ外形が不定形であり、また、密度が一様でなく、穴が開いている場合も多い。そこで、本実施形態では、クラスタが、そのクラスタの形状に対応するように複数のサブクラスタに分割される。これにより、クラスタの形状がある程度忠実に表現された3次元モデルを生成することができる。 Clusters (conormal clusters and individual clusters) are planar and irregular in shape, and often have non-uniform density and holes. Therefore, in this embodiment, clusters are divided into multiple sub-clusters that correspond to the shape of the cluster. This makes it possible to generate a 3D model that faithfully represents the shape of the cluster.
クラスタが、例えばL字、T字、U字の形状をなす場合、そのクラスタに対して単純に境界ボックス(外接矩形)が設定されると、L字、T字、U字の形状が単なる矩形で表現されるため、形状の表現力が著しく不足する。一方、クラスタの形状に忠実になりすぎて外形が鋸歯状をなすような矩形モデルが得られるようでは本来の目的からは好ましくなく、適度に抽象化されることが望ましい。そこで、本実施形態では、以下に示すように2分割モード、N分割モード、2段階分割モードのいずれかが実行される。 If a cluster is, for example, L-, T-, or U-shaped, simply setting a bounding box (circumscribing rectangle) for that cluster would result in the L-, T-, or U-shape being represented as a simple rectangle, resulting in a significantly insufficient ability to represent the shape. On the other hand, if the model is too faithful to the shape of the cluster and results in a rectangular model with a sawtooth-like outline, this is undesirable for the original purpose, and it is desirable to abstract it appropriately. Therefore, in this embodiment, one of the following modes is used: 2-division mode, N-division mode, or 2-stage division mode.
まず、2分割モードについて説明する。図18に示すように、2分割モードでは、クラスタCを2分割するように、クラスタCに対して2つの境界ボックスBB1,BB2(外接矩形)が設定される。また、2分割モードでは、分割による面積削減量が最大となる分割位置が探索される。具体的には、分割前のクラスタの点群の全体に対応する境界ボックスBB0の面積S0と、分割後の点群に対応する第1,第2の境界ボックスBB1,BB2の面積S1,S2の和との差(S0-S1-S2)が、最大となる分割位置が探索される。図18に示す例では、X方向に分割位置が探索される。 First, we will explain the two-division mode. As shown in Figure 18, in the two-division mode, two bounding boxes BB1 and BB2 (circumscribing rectangles) are set for cluster C so that cluster C is divided into two. In the two-division mode, the division position that maximizes the amount of area reduction due to division is searched for. Specifically, the division position that maximizes the difference (S0 - S1 - S2) between the area S0 of the bounding box BB0 that corresponds to the entire point cloud of the cluster before division and the sum of the areas S1 and S2 of the first and second bounding boxes BB1 and BB2 that correspond to the point cloud after division is searched for. In the example shown in Figure 18, the division position is searched for in the X direction.
図18(A)に示す例は、クラスタCがL字形状をなす場合である。この場合、図18(B-1)に示す分割位置a、および図18(B-3)に示す分割位置cに比べて、図18(B-2)に示す分割位置bで、分割による面積削減量(S0-S1-S2)が最も大きくなり、最適である。そこで、クラスタCが分割位置bで2つのサブクラスタSCに分割される。この場合、矩形化処理において2つの境界ボックスBB1,BB21に対応して設定される2つの矩形平面よりクラスタCのL字形状が表現される。 The example shown in Figure 18(A) is when cluster C is L-shaped. In this case, compared to division position a shown in Figure 18(B-1) and division position c shown in Figure 18(B-3), division position b shown in Figure 18(B-2) is optimal as it maximizes the amount of area reduction (S0-S1-S2) due to division. Therefore, cluster C is divided into two sub-clusters SC at division position b. In this case, the L-shape of cluster C is represented by two rectangular planes set corresponding to the two bounding boxes BB1 and BB21 during the rectangularization process.
ここで、分割による面積削減量が僅かな場合でもクラスタがサブクラスタに分割されると、最終的に生成される3次元モデルが複雑で見にくくなるため、分割による面積削減量(S0-S1-S2)が所定の閾値未満となる場合には、分割が行われない。閾値は例えば0.25m2に設定される。 Here, if a cluster is divided into sub-clusters even if the area reduction due to division is small, the resulting 3D model will be complex and difficult to see. Therefore, if the area reduction due to division (S0-S1-S2) is less than a predetermined threshold, division is not performed. The threshold is set to, for example, 0.25 m2 .
このように2分割モードでは、クラスタを座標軸方向に2分割するように2つの境界ボックス(外接矩形)を設定して、分割による境界ボックスの面積削減量が最大となる分割位置を座標軸方向に探索する。これにより、境界ボックスの合計面積が削減されるようにクラスタが分割されることで、クラスタの形状がある程度忠実に表現された3次元モデルを生成することができる。 In this way, in bisection mode, two bounding boxes (circumscribing rectangles) are set to divide the cluster in half along the coordinate axis, and the division position along the coordinate axis is searched for to maximize the area reduction of the bounding boxes due to the division. This divides the cluster so that the total area of the bounding boxes is reduced, making it possible to generate a 3D model that faithfully represents the shape of the cluster.
なお、図18に示す例では、X方向に分割位置が探索されるが、Y方向に分割位置が探索されてもよい。また、X方向とY方向との両方に関して分割位置が探索されて、分割による面積削減量が大きい方が採用されてもよい。 In the example shown in Figure 18, division positions are searched for in the X direction, but division positions may also be searched for in the Y direction. Alternatively, division positions may be searched for in both the X and Y directions, and the one that results in the largest amount of area reduction due to division may be used.
次に、2分割モードにおいて1方向(X方向)の1回の探索では適切な分割位置を設定できない例について説明する。図19(A)に示す例は、クラスタCがT字形状をなす場合である。 Next, we will explain an example in which a single search in one direction (X direction) in two-division mode cannot set an appropriate division position. The example shown in Figure 19(A) is a case in which cluster C is T-shaped.
この場合、図19(B-1)に示す分割位置a、および図19(B-3)に示す分割位置cの場合には、境界ボックスの面積が削減される。しかしながら、図1(B-1)に示す分割位置a、図19(B-2)に示す分割位置b、および図19(B-3)に示す分割位置cのいずれの場合でも、クラスタのT字形状を表現できないため、最適ではない。 In this case, the area of the bounding box is reduced for division position a shown in Figure 19 (B-1) and division position c shown in Figure 19 (B-3). However, division position a shown in Figure 19 (B-1), division position b shown in Figure 19 (B-2), and division position c shown in Figure 19 (B-3) are not optimal because they cannot represent the T-shape of the cluster.
次に、2分割モードにおいて1方向(X方向)の2回の探索で適切な分割位置を設定できる例について説明する。図20(A)に示す例は、図19(A)に示す例と同様に、クラスタCがT字形状をなす場合である。 Next, we will explain an example in which an appropriate division position can be set by searching twice in one direction (X direction) in the two-division mode. The example shown in Figure 20(A) is a case in which cluster C is T-shaped, similar to the example shown in Figure 19(A).
この場合、まず、図20(B)に示すように、クラスタCの点群に対して1回目の分割が行われ、境界ボックスBB1と境界ボックスBB2とが設定される。次に、図20(C-1),(C-2)に示すように、境界ボックスBB2の点群に対して2回目の分割が行われ、境界ボックスBB21と境界ボックスBB22とが設定される。これにより、図20(D)に示すように、クラスタCの点群に対して3つの境界ボックスBB1,BB21,BB22が設定され、クラスタCの点群が3つのサブクラスタSCに分割される。この場合、矩形化処理において3つの境界ボックスBB1,BB21,BB22に対応して設定される3つの矩形平面よりクラスタCのT字形状が表現される。 In this case, first, as shown in Figure 20(B), the point cloud of cluster C is divided a first time, and bounding boxes BB1 and BB2 are set. Next, as shown in Figures 20(C-1) and (C-2), the point cloud of bounding box BB2 is divided a second time, and bounding boxes BB21 and BB22 are set. As a result, as shown in Figure 20(D), three bounding boxes BB1, BB21, and BB22 are set for the point cloud of cluster C, and the point cloud of cluster C is divided into three sub-clusters SC. In this case, the T-shape of cluster C is represented by three rectangular planes set corresponding to the three bounding boxes BB1, BB21, and BB22 during the rectangularization process.
このように、1方向の探索および分割を2回繰り返すことで、クラスタのT字形状が表現される。図20に示す例では、X方向の探索が2回行われて2回の分割が行われる。一方、2回目の探索は1回目の探索とは異なる方向(Y方向)で探索が行われてもよい。また、これとは逆に、1回目の探索がY方向に行われて2回目の探索がX方向に行われてもよい。 In this way, by repeating the search and division in one direction twice, a T-shaped cluster is expressed. In the example shown in Figure 20, the search in the X direction is performed twice and division is performed twice. On the other hand, the second search may be performed in a different direction (Y direction) from the first search. Alternatively, the first search may be performed in the Y direction and the second search in the X direction.
次に、2分割モードでは適切な分割位置を設定できない例について説明する。図21(A)に示す例は、クラスタCがU字形状をなす場合である。 Next, we will explain an example where an appropriate split position cannot be set in the two-split mode. The example shown in Figure 21(A) is when cluster C is U-shaped.
この場合、図21(B-1)に示す分割位置a、図21(B-2)に示す分割位置b、および図21(B-3)に示す分割位置cのいずれの場合でも、境界ボックスBB1,BB2の面積が削減されず、さらにクラスタCのU字形状を表現できないため、最適ではない。また、探索方向を変えても結果は同じである。 In this case, whether it is division position a shown in Figure 21 (B-1), division position b shown in Figure 21 (B-2), or division position c shown in Figure 21 (B-3), the area of bounding boxes BB1 and BB2 is not reduced, and the U-shape of cluster C cannot be represented, so it is not optimal. Furthermore, the results are the same even if the search direction is changed.
次に、N分割モードについて説明する。図22に示すように、N分割モードでは、クラスタCに対して探索ボックスSB(図中のSB1など)が設定されて、その探索ボックスSB内で2分割が可能な分割位置が探索され、探索ボックスSB内に分割位置がない場合には、探索ボックスSBの幅(探索長さ)がL,2L,3Lと段階的に広げられる。また、探索ボックスSB内に2分割が可能な分割位置が見つかった場合には、その分割位置で点群が分割されるように境界ボックスBB(図中のBB1など)が設定され、次にクラスタCの残りの点群を対象にして探索ボックスSBを用いた分割位置の探索が行われ、このような処理がクラスタCの全体に渡って繰り返される。 Next, we will explain the N-division mode. As shown in Figure 22, in the N-division mode, a search box SB (such as SB1 in the figure) is set for cluster C, and a division position that allows for division into two is searched for within that search box SB. If no division position is found within the search box SB, the width of the search box SB (search length) is gradually widened to L, 2L, and 3L. Furthermore, if a division position that allows for division into two is found within the search box SB, a bounding box BB (such as BB1 in the figure) is set so that the point cloud is divided at that division position. Next, a search for a division position using the search box SB is performed on the remaining points of cluster C, and this process is repeated throughout cluster C.
図22(A)に示す例は、クラスタCがU字形状をなす場合である。この場合、まず、図22(B-1)に示すように、探索長さLの幅を有する探索ボックスSB1が設定されて、2分割による分割位置があるか否かが判定され、ここでは分割位置がないと判定される。次に、図22(B-2)に示すように、探索長さ2Lの幅を有する探索ボックスSB2が設定されて、2分割による分割位置があるか否かが判定され、ここでも分割位置がないと判定される。次に、図22(B-3)に示すように、探索長さ3Lの幅を有する探索ボックスSB3が設定されて、2分割による分割位置があるか否かが判定され、ここでは分割位置があると判定される。そこで、図22(C)に示すように、探索ボックスSB3に含まれる点群に対して2分割が行われる。これにより、境界ボックスBB1が設定される。 The example shown in Figure 22(A) is a case where cluster C is U-shaped. In this case, first, as shown in Figure 22(B-1), a search box SB1 with a width of search length L is set, and it is determined whether there is a division position by dividing the area into two, and it is determined that there is no division position. Next, as shown in Figure 22(B-2), a search box SB2 with a width of search length 2L is set, and it is determined whether there is a division position by dividing the area into two, and it is determined that there is no division position. Next, as shown in Figure 22(B-3), a search box SB3 with a width of search length 3L is set, and it is determined whether there is a division position by dividing the area into two, and it is determined that there is a division position. Therefore, as shown in Figure 22(C), the point cloud included in search box SB3 is divided into two. This results in setting a bounding box BB1.
次に、図23(A)に示すように、クラスタCから境界ボックスBB1の部分を除去した残部を対象にして分割位置が探索される。まず、図23(B-1)に示すように、探索長さLの幅を有する探索ボックスSB1が設定されて、2分割による分割位置があるか否かが判定され、ここでは分割位置がないと判定される。次に、図23(B-2)に示すように、探索長さ2Lの幅を有する探索ボックスSB2が設定されて、2分割による分割位置があるか否かが判定され、ここでも分割位置がないと判定される。次に、図23(B-3)に示すように、探索長さ3Lの幅を有する探索ボックスSB3が設定されて、2分割による分割位置があるか否かが判定され、ここでは分割位置があると判定される。そこで、図23(C)に示すように、探索ボックスSB3に含まれる点群に対して2分割が行われる。これにより、境界ボックスBB21が設定される。 Next, as shown in Figure 23(A), a division position is searched for within the remaining portion of cluster C after removing the bounding box BB1. First, as shown in Figure 23(B-1), a search box SB1 with a width of search length L is set, and a determination is made as to whether or not there is a division position resulting from bisection. It is determined that there is no division position. Next, as shown in Figure 23(B-2), a search box SB2 with a width of search length 2L is set, and a determination is made as to whether or not there is a division position resulting from bisection. It is also determined that there is no division position. Next, as shown in Figure 23(B-3), a search box SB3 with a width of search length 3L is set, and a determination is made as to whether or not there is a division position resulting from bisection. It is determined that there is a division position. Therefore, as shown in Figure 23(C), the point cloud included in search box SB3 is bisected. This results in the setting of bounding box BB21.
次に、図24(A)に示すように、クラスタCから境界ボックスBB1,BB21の部分を除去した残部を対象にして分割位置が探索される。まず、図24(B-1)に示すように、探索長さLの幅を有する探索ボックスSB1が設定されて、2分割による分割位置があるか否かが判定され、ここでは分割位置がないと判定される。次に、図24(B-2)に示すように、探索長さ2Lの幅を有する探索ボックスSB2が設定されて、2分割による分割位置があるか否かが判定され、ここでも分割位置がないと判定される。次に、図24(B-3)に示すように、探索長さ3Lの幅を有する探索ボックスSB3が設定されて、2分割による分割位置があるか否かが判定され、ここでも分割位置がないと判定される。このとき、探索ボックスSB3よりX方向の先に点群が存在しないため、探索が終了したものと判定される。そこで、図24(C)に示すように、クラスタCから境界ボックスBB1,BB21を除去した残部に対して境界ボックスBB22が設定される。これにより、クラスタCに3つの境界ボックスBB1,BB21,BB22が設定され、クラスタCが3つのサブクラスタSCに分割される。この場合、矩形化処理において3つの境界ボックスBB1,BB21,BB22に対応して設定される3つの矩形平面よりクラスタCのU字形状が表現される。 Next, as shown in Figure 24(A), a division position is searched for in the portion remaining after removing bounding boxes BB1 and BB21 from cluster C. First, as shown in Figure 24(B-1), a search box SB1 with a width of search length L is set, and it is determined whether there is a division position resulting from bisection. It is determined that there is no division position. Next, as shown in Figure 24(B-2), a search box SB2 with a width of search length 2L is set, and it is determined whether there is a division position resulting from bisection. It is also determined that there is no division position. Next, as shown in Figure 24(B-3), a search box SB3 with a width of search length 3L is set, and it is determined whether there is a division position resulting from bisection. It is also determined that there is no division position. At this point, since there are no points beyond search box SB3 in the X direction, it is determined that the search has ended. Therefore, as shown in Figure 24(C), a bounding box BB22 is set for the portion remaining after removing bounding boxes BB1 and BB21 from cluster C. As a result, three bounding boxes BB1, BB21, and BB22 are set for cluster C, and cluster C is divided into three sub-clusters SC. In this case, the U-shape of cluster C is expressed by three rectangular planes set corresponding to the three bounding boxes BB1, BB21, and BB22 in the rectangularization process.
このようにN分割モードでは、探索ボックスSB(図中のSB1など)の幅(探索長さ)を拡大幅L分だけ段階的に広げて2分割処理が試行され、2分割処理が可能である、すなわち、探索ボックスSB内に分割位置が見つかると、その分割位置で2分割処理が実行されて1つの境界ボックスBB(図中のBB1など)が設定され、次に、残りの点群を対象にして同じ処理が繰り返され、このような処理がクラスタCの点群の全体に境界ボックスBBが設定されるまで繰り返される。 In this way, in N-division mode, the width (search length) of the search box SB (such as SB1 in the figure) is gradually increased by the expansion width L, and a bisection process is attempted; if possible, that is, when a division position is found within the search box SB, a bisection process is performed at that division position and one bounding box BB (such as BB1 in the figure) is set. The same process is then repeated for the remaining point clouds, and this process is repeated until a bounding box BB is set for the entire point cloud of cluster C.
また、N分割モードでは、分割位置を探索する際に探索ボックスSBが設定されて、その探索ボックスSBの幅(探索長さ)をL,2L,3Lと段階的に広げながら、分割位置が探索されることから、設定された探索ボックスSBごとに分割位置が1つしか設定できない。このため、探索ボックスSBの幅より小さな形状を表現できない場合があるが、クラスタがやみくもに細分割されることを避けることができ、クラスタの形状を適切な抽象度で表現できる。なお、探索ボックスSBの幅を段階的に広げる際の拡大幅Lは、復元場所などに応じて適宜に設定されればよいが、例えば0.5mに設定されてもよい。 In addition, in N-division mode, a search box SB is set when searching for a division position, and the division position is searched for while gradually widening the width (search length) of the search box SB to L, 2L, and 3L. Therefore, only one division position can be set for each set search box SB. As a result, it may not be possible to express shapes smaller than the width of the search box SB, but this prevents the cluster from being randomly subdivided, allowing the shape of the cluster to be expressed at an appropriate level of abstraction. The expansion width L when gradually widening the width of the search box SB can be set appropriately depending on the restoration location, etc., but may be set to 0.5 m, for example.
なお、図22,図23,図24に示す例は、クラスタがU字形状をなす場合であるが、N分割モードでは、U字形状以外のクラスタでも、適切に複数の境界ボックス(サブクラスタ)を設定してクラスタを分割することができる。 Note that the examples shown in Figures 22, 23, and 24 are for clusters that are U-shaped, but in N-division mode, even for clusters that are not U-shaped, multiple bounding boxes (sub-clusters) can be appropriately set to divide the cluster.
次に、2段階分割モードについて説明する。2段階分割モードでは、クラスタに対して探索方向を変えた2段階の分割が行われる。すなわち、クラスタに対して、第1の方向(X方向またはY方向)に関して分割を行う1段階目の分割と、第1の方向とは異なる第2の方向に関して分割を行う2段階目の分割とが行われる。 Next, we will explain the two-stage division mode. In the two-stage division mode, the cluster is divided into two stages with different search directions. That is, the first stage of division divides the cluster in a first direction (X or Y direction), and the second stage of division divides the cluster in a second direction different from the first direction.
図25(A)に示す例では、クラスタCが複雑な形状をなしている。この場合、図25(B-1)および図25(C-1)に示すように、X方向またはY方向のいずれか1方向のみの1段階の分割では、クラスタに対して適切な境界ボックスを設定することができない。一方、図25(B-2)および図25(C-2)ように、1段階目の分割とは異なる方向に関して2段階目の分割が行われると、クラスタCが複数のサブクラスタSCに適切に分割される。ここで、図25(B-1),(B-2)に示す例では、最初にX方向に関して分割が行われ、次にY方向に関して分割が行われる。また、図25(C-1),(C-2)に示すように、最初にY方向に関して分割が行われ、次にX方向に関して分割が行われる。 In the example shown in Figure 25(A), cluster C has a complex shape. In this case, as shown in Figures 25(B-1) and 25(C-1), a single division in only one direction, either the X or Y direction, does not allow for the appropriate bounding box to be set for the cluster. On the other hand, as shown in Figures 25(B-2) and 25(C-2), when a second division is performed in a direction different from the first division, cluster C is appropriately divided into multiple sub-clusters SC. Here, in the example shown in Figures 25(B-1) and (B-2), division is first performed in the X direction, and then in the Y direction. Also, as shown in Figures 25(C-1) and (C-2), division is first performed in the Y direction, and then in the X direction.
ここで、2段階分割モードでは、2分割モードと同様に、分割の可否を判定する際の面積削減量に関する閾値が設定されて、分割による面積削減量が閾値未満となる場合には、分割が行われないものとするとよい。また、2段階目の分割では、1段階目の分割より閾値が小さく設定されると、分割が起き易くなる。このため、1段階目および2段階目の分割の可否をそれぞれ判定する際の閾値が個別に設定されるとよい。閾値は例えば、第1分割では0.25m2、第2分割では0.05m2に設定されてもよい。 Here, in the two-stage division mode, as in the two-stage division mode, a threshold value for the amount of area reduction used to determine whether or not division is possible is set, and if the amount of area reduction due to division is less than the threshold value, division is not performed. Furthermore, if the threshold value for the second stage division is set smaller than that for the first stage division, division becomes more likely to occur. Therefore, it is preferable to set separate threshold values for determining whether or not division is possible for the first and second stages. For example, the threshold value may be set to 0.25 m2 for the first division and 0.05 m2 for the second division.
ところで、本実施形態では、共法線クラスタリング処理や個別クラスタリング処理で取得したクラスタ(共法線クラスタや個別クラスタ)を複数のサブクラスタに分割するサブクラスタリング処理として、2分割モード、N分割モード、2段階分割モードの各処理を行うことができるが、これらの処理は、クラスタをサブクラスタに分割する用途(サブクラスタリング)に限定されない。 In this embodiment, the sub-clustering process that divides clusters (conormal clusters or individual clusters) obtained by the conormal clustering process or the individual clustering process into multiple sub-clusters can be performed in two-division mode, N-division mode, or two-stage division mode, but these processes are not limited to the application of dividing clusters into sub-clusters (sub-clustering).
すなわち、対象場所の点群から平面(所定の密度で平面状に分布する点の集合)を抽出して、その平面に対して2分割モード、N分割モード、2段階分割モードの各処理が行われてクラスタに分割されるクラスタリング処理が実施されてもよい。このようなクラスタリング処理は、例えば、対象場所にある1つの復元対象物の点群から、復元対象物を1方向から見た図面(正面図、平面図など)を作成する用途に利用することができる。具体的には、例えば建築物の外観を表す略図を作成する用途に利用してもよい。 That is, a clustering process may be performed in which a plane (a set of points distributed on a plane at a specified density) is extracted from the point cloud of the target location, and that plane is then divided into clusters using two-division mode, N-division mode, or two-stage division mode. This type of clustering process can be used, for example, to create a drawing (front view, plan view, etc.) of a single object to be restored at the target location from the point cloud of that object. Specifically, it may be used, for example, to create a rough sketch of the exterior of a building.
次に、サーバ2で行われる矩形化処理(図3のST103)について説明する。図26は、矩形化処理の手順を示すフロー図である。なお、本フローの処理は、クラスタリング処理で生成された共法線クラスタおよび個別クラスタのグループ単位で行われる。図27は、矩形化処理の状況を示す説明図である。図28,図29は、矩形化処理で生成される3次元モデル(矩形モデル)を示す説明図である。 Next, the rectangularization process (ST103 in Figure 3) performed by server 2 will be described. Figure 26 is a flow diagram showing the steps of the rectangularization process. Note that this process is performed on a group basis of conormal clusters and individual clusters generated in the clustering process. Figure 27 is an explanatory diagram showing the status of the rectangularization process. Figures 28 and 29 are explanatory diagrams showing the three-dimensional model (rectangle model) generated in the rectangularization process.
矩形化処理では、まず、クラスタリング処理(図3のST102参照)で取得したクラスタを矩形平面に変換する処理が行われる(初期矩形化処理)(ST501)。ここでは、個別クラスタおよびそのサブクラスタと、共法線クラスタおよびそのサブクラスタとを対象にして処理が実行される。 The rectangularization process first converts the clusters obtained in the clustering process (see ST102 in Figure 3) into rectangular planes (initial rectangularization process) (ST501). Here, the process is performed on individual clusters and their sub-clusters, and conormal clusters and their sub-clusters.
初期矩形化処理では、まず、クラスタを、法線が上向き[0,0,1]となるように原点を中心にして回転させる。これにより、回転後のクラスタは、水平面に広がりを持つ状態となり、以降の処理を簡単にすることができる。次に、クラスタの境界ボックスおよび重心を取得し、境界ボックスのz座標を重心のz座標で置き換える。これにより、水平な矩形平面が得られる。次に、矩形平面を最初の回転とは逆向きに回転させる。 In the initial rectangularization process, the cluster is first rotated around the origin so that the normal points upward at [0,0,1]. This causes the rotated cluster to extend horizontally, simplifying subsequent processing. Next, the bounding box and center of gravity of the cluster are obtained, and the z coordinate of the bounding box is replaced with the z coordinate of the center of gravity. This results in a horizontal rectangular plane. Next, the rectangular plane is rotated in the opposite direction to the initial rotation.
図27に示す例は、図11に示した例と同様に、復元対象物として、円筒の中に2つの平面がL字形状に接合された状態で配置されている。初期矩形化処理では、図27(A)に示すように、復元対象物の点群から抽出されたクラスタが矩形平面に変換される。次に、以下に示すように、矩形平面の位置や形状を整える処理が行われる。図27(A)に示す例では、一方の矩形平面の端部が他方の矩形平面から突き出した状態となっており、この場合、一方の矩形平面の突き出し部分を切除することで、図27(B)に示すように、隣り合う2つの矩形平面が辺を共有するように矩形平面の形状が整えられる。 In the example shown in Figure 27, similar to the example shown in Figure 11, the object to be restored is a cylinder with two planes joined in an L-shape. In the initial rectangularization process, as shown in Figure 27(A), clusters extracted from the point cloud of the object to be restored are converted into rectangular planes. Next, as shown below, a process is performed to adjust the position and shape of the rectangular planes. In the example shown in Figure 27(A), the end of one rectangular plane protrudes from the other rectangular plane. In this case, by cutting off the protruding portion of one rectangular plane, the shape of the rectangular planes is adjusted so that two adjacent rectangular planes share a side, as shown in Figure 27(B).
図26に示すように、矩形平面の位置や形状を整える処理として、まず、アライメント処理が行われる(ST502)。アライメント処理では、同じグループに属する矩形平面を対象にして、1つの平面上に位置するべき複数の矩形平面を同一平面上に整列させる処理が行われる。 As shown in Figure 26, alignment processing is first performed to adjust the position and shape of rectangular planes (ST502). In alignment processing, rectangular planes belonging to the same group are targeted, and multiple rectangular planes that should be located on one plane are aligned on the same plane.
次に、第1のグループ間スナップ処理が行われる(ST503)。第1のグループ間スナップ処理では、グループが異なる2つの矩形平面を対象にして、その2つの矩形平面の間に隙間がある場合に、その隙間を埋めることで、2つの矩形平面が辺を共有するように矩形平面の形状を整える処理が行われる。 Next, a first inter-group snapping process is performed (ST503). In the first inter-group snapping process, two rectangular planes from different groups are targeted, and if there is a gap between the two rectangular planes, the gap is filled in, adjusting the shape of the rectangular planes so that the two rectangular planes share a side.
次に、第2のグループ間スナップ処理が行われる(ST504)。第2のグループ間スナップ処理では、グループが異なる2つの矩形平面を対象にして、その2つの矩形平面同士で突き出しがある場合に、その突き出し部分を切除することで、2つの矩形平面が辺を共有するように矩形平面の形状を整える処理が行われる。 Next, a second inter-group snapping process is performed (ST504). In the second inter-group snapping process, two rectangular planes from different groups are targeted, and if there is a protrusion between the two rectangular planes, the protruding portion is removed, thereby adjusting the shape of the rectangular planes so that the two rectangular planes share a side.
次に、グループ内スナップ処理が行われる(ST505)。グループ内スナップ処理では、同じグループに属する矩形平面を対象にして、2つの矩形平面の隙間を埋めたり、一方の矩形平面から他方の矩形平面にはみ出した部分を切除したりすることで、矩形平面の形状を整える処理が行われる。 Next, intra-group snap processing is performed (ST505). In intra-group snap processing, rectangular planes belonging to the same group are targeted, and the shape of the rectangular planes is adjusted by filling in the gaps between the two rectangular planes and cutting out the portion of one rectangular plane that extends beyond the other.
なお、アライメント処理、第1,第2のグループ間スナップ処理、およびグループ内スナップ処理におけるグループは、初期矩形化処理によりクラスタが矩形平面に変換された際の矩形モデルのグループ(矩形グループ)を表し、クラスタ(共法線クラスタおよび個別クラスタ)のグループに対応する。 Note that the groups in the alignment process, the first and second inter-group snapping processes, and the intra-group snapping process represent groups of rectangular models (rectangle groups) when clusters are converted into rectangular planes by the initial rectangularization process, and correspond to groups of clusters (conormal clusters and individual clusters).
サブクラスタリング処理が行われない場合には、図28に示すように、クラスタリング処理で取得した個別クラスタおよび共法線クラスタを対象にして矩形化処理が実行される。一方、サブクラスタリング処理が行われた場合には、図29に示すように、個別クラスタおよびそのサブクラスタと、共法線クラスタおよびそのサブクラスタとを対象にして矩形化処理が実行される。 When sub-clustering is not performed, rectangularization is performed on the individual clusters and conormal clusters obtained by the clustering process, as shown in Figure 28. On the other hand, when sub-clustering is performed, rectangularization is performed on the individual clusters and their sub-clusters, and the conormal clusters and their sub-clusters, as shown in Figure 29.
図28に示すように、サブクラスタリング処理が行われない場合には、復元場所の物体の忠実度が低く、例えば部屋の中心に配置されたコ字形状の机が十分に表現されていない。一方、図29に示すように、サブクラスタリング処理が行われた場合には、復元場所の物体の忠実度が高く、例えば部屋の中心に配置されたコ字形状の机が十分に表現されている。 As shown in Figure 28, when sub-clustering processing is not performed, the fidelity of the objects in the restored location is low, and for example, a U-shaped desk placed in the center of a room is not sufficiently represented. On the other hand, as shown in Figure 29, when sub-clustering processing is performed, the fidelity of the objects in the restored location is high, and for example, a U-shaped desk placed in the center of a room is sufficiently represented.
次に、サーバ2で行われるアライメント処理について説明する。図30は、アライメント処理の状況を示す説明図である。 Next, we will explain the alignment process performed by server 2. Figure 30 is an explanatory diagram showing the alignment process.
アライメント処理では、同じグループ(共法線矩形グループ)に属し且つ隣接する矩形平面を対象にして、その矩形平面を整列させる処理が行われる。初期矩形化処理で得られた各クラスタの矩形平面は、本来は1つの平面(例えば壁面、床面、天井面)に属するにも拘わらず同一平面上に位置しない場合がある。これを放置すると、平面図(2次元レイアウト図)に図面化した際に一本の線として表現されない。そこで、アライメント処理が実施される。 The alignment process involves aligning adjacent rectangular planes that belong to the same group (conormal rectangle group). The rectangular planes of each cluster obtained by the initial rectangle creation process may not be located on the same plane, even though they actually belong to a single plane (for example, a wall, floor, or ceiling). If this is left unchecked, they will not be represented as a single line when drawn on a floor plan (2D layout diagram). This is why alignment processing is performed.
アライメント処理が実施されると、例えば、屋内の壁面を構成する矩形平面、すなわち、同一平面上に位置するべき矩形平面の間に段差がある不自然な状態が解消される。図30(A)に示す例では、矩形平面RP1,RP2の間に段差がある状態となっている。アライメント処理が実施されると、図30(B)に示すように、矩形平面RP1,RP2の間に段差がなくなり、矩形平面RP1,RP2が同一平面上に整列される。 When alignment processing is performed, for example, the unnatural state of having a step between rectangular planes that make up indoor wall surfaces, i.e., rectangular planes that should be located on the same plane, is eliminated. In the example shown in Figure 30(A), there is a step between rectangular planes RP1 and RP2. When alignment processing is performed, as shown in Figure 30(B), the step between rectangular planes RP1 and RP2 disappears, and rectangular planes RP1 and RP2 are aligned on the same plane.
アライメント処理では、まず、矩形平面を法線が上向きとなるように回転させる。次に、矩形平面間の近接判定を行い、近接しているもの同士をグループにまとめる。次に、各グループにおいて矩形平面のz座標を加重平均し、その平均値に矩形平面のz座標をおきかえる。このとき、加重は元のクラスタの構成点数に応じて設定される。次に、矩形平面を最初の回転とは逆向きに回転させる。これにより、同一のグループに属する矩形平面が同一平面上に整列した状態になる。 In the alignment process, first, the rectangular planes are rotated so that their normals point upward. Next, the proximity between rectangular planes is determined, and adjacent planes are grouped together. Next, the z coordinates of the rectangular planes in each group are weighted averaged, and the z coordinate of the rectangular plane is replaced with this average value. At this time, the weighting is set according to the number of points that make up the original cluster. Next, the rectangular planes are rotated in the opposite direction to the initial rotation. This results in rectangular planes belonging to the same group being aligned on the same plane.
次に、サーバ2で行われる第1,第2のグループ間スナップ処理について説明する。図31は、第1,第2のグループ間スナップ処理の状況を示す説明図である。 Next, we will explain the snap processing between the first and second groups performed on server 2. Figure 31 is an explanatory diagram showing the status of the snap processing between the first and second groups.
第1のグループ間スナップ処理では、グループ(共法線矩形グループ)が異なる2つの矩形平面を対象にして、その2つの矩形平面の間に隙間がある場合に、2つの矩形平面が辺を共有するように矩形平面の形状を整える処理が行われる。具体的には、2つの矩形平面の一方の辺(近接辺)を他方の面(近接面)に結合して、2つの矩形平面の間の隙間をなくす処理が行われる。 The first inter-group snapping process targets two rectangular planes from different groups (conormal rectangle groups), and if there is a gap between the two rectangular planes, it adjusts the shape of the rectangular planes so that the two planes share an edge. Specifically, it joins one edge (the adjacent edge) of the two rectangular planes to the other face (the adjacent face) to eliminate the gap between the two rectangular planes.
第1のグループ間スナップ処理が実施されると、例えば、箱状の物体の各面(上面や側面など)を表す矩形平面の間に隙間がある不自然な状態が解消される。図31(A-1)に示す例では、矩形平面RP1,RP2,RP3の間に隙間がある状態となっている。第1のグループ間スナップ処理が実施されると、図31(A-2)に示すように、矩形平面RP1,RP2,RP3の間の隙間がなくなり、矩形平面RP1,RP2,RP3が辺を共有するように形状が整えられる。 When the first inter-group snapping process is performed, for example, the unnatural state of having gaps between the rectangular planes representing each face (top face, side face, etc.) of a box-shaped object is eliminated. In the example shown in Figure 31 (A-1), there are gaps between the rectangular planes RP1, RP2, and RP3. When the first inter-group snapping process is performed, as shown in Figure 31 (A-2), the gaps between the rectangular planes RP1, RP2, and RP3 disappear, and the shape is adjusted so that the rectangular planes RP1, RP2, and RP3 share a common side.
第1のグループ間スナップ処理では、まず、矩形平面を法線が上向きとなるように回転させる。次に、矩形平面間の近接判定を行う。ここで、矩形平面同士が交差する場合、すなわち、矩形平面の一方が他方より突き出た状態となる場合には、本処理はスキップされ、次の第2のグループ間スナップ処理に進む。矩形平面間に隙間がある場合には、一方の矩形平面の辺(近接辺)を延長して他方の矩形平面の面(近接面)に接合させる。このとき、必要に応じて近接面を延長させる。次に、矩形平面を最初の回転とは逆向きに回転させる。 In the first inter-group snapping process, the rectangular planes are first rotated so that their normals point upward. Next, a proximity determination is made between the rectangular planes. If the rectangular planes intersect, that is, if one of the rectangular planes protrudes beyond the other, this process is skipped and the process moves on to the next, second inter-group snapping process. If there is a gap between the rectangular planes, the edge of one rectangular plane (the adjacent edge) is extended to join with the face of the other rectangular plane (the adjacent face). At this time, the adjacent face is extended if necessary. Next, the rectangular planes are rotated in the opposite direction to the initial rotation.
第2のグループ間スナップ処理では、グループ(共法線矩形グループ)が異なる2つの矩形平面を対象にして、その2つの矩形平面の一方が他方より突き出た状態となる場合に、2つの矩形平面が辺を共有するように矩形平面の形状を整える処理が行われる。具体的には、突き出し部分を切除する処理が行われる。このとき、突き出し量が大きく、突き出した辺が相手側の面に近接しない場合は、第2のグループ間スナップ処理は行われない。 The second inter-group snapping process targets two rectangular planes from different groups (conormal rectangle groups), and if one of the two rectangular planes protrudes beyond the other, a process is performed to adjust the shape of the rectangular plane so that the two rectangular planes share an edge. Specifically, a process is performed to remove the protruding portion. In this case, if the amount of protrusion is large and the protruding edge is not close to the surface of the other side, the second inter-group snapping process is not performed.
第2のグループ間スナップ処理が実施されると、例えば、箱状の物体の各面(上面や側面など)を表す矩形平面の一方が他方から突き出した不自然な状態が解消される。図31(B-1)に示す例では、矩形平面RP1が矩形平面RP2から突き出した状態となっている。第2のグループ間スナップ処理が実施されると、図31(B-2)に示すように、矩形平面RP1の突き出し部分が切除され、矩形平面RP1と矩形平面RP2とが辺を共有するように形状が整えられる。 When the second inter-group snapping process is performed, for example, the unnatural state in which one of the rectangular planes representing each face (top face, side face, etc.) of a box-shaped object protrudes from the other is eliminated. In the example shown in Figure 31 (B-1), rectangular plane RP1 protrudes from rectangular plane RP2. When the second inter-group snapping process is performed, the protruding portion of rectangular plane RP1 is removed, and the shape is adjusted so that rectangular plane RP1 and rectangular plane RP2 share a side, as shown in Figure 31 (B-2).
第2のグループ間スナップ処理では、まず、矩形平面を法線が上向きとなるように回転させる。次に、矩形平面間の近接判定を行う。ここで、矩形平面同士が交差しない場合、すなわち、矩形平面の一方が他方より突き出さない状態となる場合には、本処理はスキップされる。次に、一方の矩形平面の辺(近接辺)の突き出し部分を切除する。次に、矩形平面を最初の回転とは逆向きに回転させる。 In the second inter-group snapping process, first, the rectangular planes are rotated so that their normals point upward. Next, a proximity determination is made between the rectangular planes. If the rectangular planes do not intersect, that is, if one of the rectangular planes does not protrude beyond the other, this process is skipped. Next, the protruding portion of one of the rectangular planes (the adjacent side) is cut off. Next, the rectangular planes are rotated in the opposite direction to the initial rotation.
次に、サーバ2で行われるグループ内スナップ処理について説明する。図32は、グループ内スナップ処理の状況を示す説明図である。 Next, we will explain the intra-group snap processing performed on Server 2. Figure 32 is an explanatory diagram showing the status of intra-group snap processing.
グループ内スナップ処理では、同じグループ(共法線矩形グループ)に属し且つ隣接する2つの矩形平面を対象にして、矩形平面の形状を整える処理が行われる。 Intra-group snapping processes target two adjacent rectangular planes that belong to the same group (conormal rectangle group) and adjust the shape of the rectangular planes.
図32(A-1)に示す例では、同じグループに属する2つの矩形平面RP1,RP2のうち、一方の矩形平面RP1の辺が他方の矩形平面RP2に僅かにはみ出した状態となっている。この場合、図32(A-2)に示すように、一方の矩形平面RP1のはみ出し部分を切除する処理が行われることで、2つの矩形平面RP1,RP2の辺が接した状態に修正される。 In the example shown in Figure 32 (A-1), of the two rectangular planes RP1 and RP2 that belong to the same group, one side of the rectangular plane RP1 slightly extends into the other rectangular plane RP2. In this case, as shown in Figure 32 (A-2), a process is performed to remove the extending portion of one rectangular plane RP1, correcting the sides of the two rectangular planes RP1 and RP2 to be in contact.
また、図32(B-1)に示す例では、同じグループに属する矩形平面RP1,RP2,RP3のうちの、矩形平面RP1と矩形平面RP2,RP3との間に僅かな隙間ができている。この場合、図32(B-2)に示すように、矩形平面の間の隙間をなくすように一方の矩形平面RP1を延長する処理が行われることで、3つの矩形平面RP1,RP2,RP3の辺が接した状態に修正される。 In the example shown in Figure 32 (B-1), of the rectangular planes RP1, RP2, and RP3 that belong to the same group, there is a small gap between the rectangular plane RP1 and the rectangular planes RP2 and RP3. In this case, as shown in Figure 32 (B-2), processing is performed to extend one of the rectangular planes, RP1, to eliminate the gap between the rectangular planes, thereby correcting the edges of the three rectangular planes RP1, RP2, and RP3 to be in contact.
次に、サーバ2で行われる平面図生成処理について説明する。図33は、平面図生成処理の状況を示す説明図である。 Next, we will explain the floor plan generation process performed by server 2. Figure 33 is an explanatory diagram showing the status of the floor plan generation process.
サーバ2では、3次元モデル(矩形モデル)から床部分および天井部分、すなわち、床および天井を表す矩形平面を削除した上で、3次元モデルをXY平面(水平面)に正射影することで、平面図(2次元レイアウト図)が生成される(平面図生成処理)。なお、3次元モデルにおける床部分および天井部分はz座標に基づいて判別することができる。 On server 2, the floor and ceiling portions, i.e., the rectangular planes representing the floor and ceiling, are deleted from the 3D model (rectangular model), and then the 3D model is orthogonally projected onto the XY plane (horizontal plane) to generate a floor plan (2D layout drawing) (floor plan generation process). Note that the floor and ceiling portions in the 3D model can be determined based on the z coordinate.
図33(A)に示すように、3次元モデルは複数の矩形平面で構成される。なお、図33(A)に示す3次元モデルでは、復元場所である部屋の内部の状態が現れるように、天井部分を構成する矩形平面が削除されている。図33(B)に示すように、平面図には、復元場所の部屋の壁面や、室内に配置された机、椅子、および棚などの什器が描画される。 As shown in Figure 33(A), the 3D model is composed of multiple rectangular planes. Note that in the 3D model shown in Figure 33(A), the rectangular planes that make up the ceiling have been removed so that the interior of the room where the model is restored can be seen. As shown in Figure 33(B), the floor plan depicts the walls of the room where the model is restored, as well as furniture such as desks, chairs, and shelves arranged within the room.
このように本実施形態では、3次元モデルにおいて復元場所の大多数の物体が水平方向の座標軸(X軸およびY軸)に沿って整列した矩形平面で表現されると共に、復元対象物の形状がある程度忠実に表現されることから、適度に抽象化されて整然として見やすい平面図(2次元レイアウト図)を得ることができる。 In this way, in this embodiment, the majority of objects in the restoration location in the 3D model are represented by rectangular planes aligned along horizontal coordinate axes (X-axis and Y-axis), and the shapes of the objects to be restored are represented fairly faithfully, making it possible to obtain a reasonably abstract, orderly, and easy-to-read plan view (2D layout diagram).
次に、サーバ2で行われる寸法線挿入処理について説明する。図34は、寸法線挿入処理の状況を示す説明図である。 Next, we will explain the dimension line insertion process performed on server 2. Figure 34 is an explanatory diagram showing the status of the dimension line insertion process.
サーバ2では、3次元モデルから代表的な平面を抽出して、その代表的な平面に関係する寸法線を平面図に挿入する処理が行われる(寸法線挿入処理)。このとき、3次元モデル(矩形モデル)において、代表的な平面として、例えば距離が離れている2つの平面が抽出される。例えば、平面視で矩形をなす部屋であれば、部屋の壁面が抽出される。また、代表的な平面に関係する寸法線として、互いに対向する2つの平面同士の面間距離を表す寸法線が平面図に挿入される。図34に示す例では、平面視で矩形をなす部屋において座標軸(X軸およびY軸)の方向に関して互いに対向する2組の壁面同士の面間距離を表す寸法線が平面図に挿入されている。 Server 2 extracts a representative plane from the three-dimensional model and inserts dimension lines related to that representative plane into the floor plan (dimension line insertion process). At this time, in the three-dimensional model (rectangular model), for example, two planes that are spaced apart are extracted as representative planes. For example, in the case of a room that is rectangular in plan view, the walls of the room are extracted. Furthermore, dimension lines representing the inter-plane distance between two opposing planes are inserted into the floor plan as dimension lines related to the representative planes. In the example shown in Figure 34, dimension lines representing the inter-plane distance between two pairs of wall surfaces that face each other in the directions of the coordinate axes (X-axis and Y-axis) in a room that is rectangular in plan view are inserted into the floor plan.
このとき、面間距離が大きいものから所定数の平面の組み合わせが選択されてもよい。また、面積が所定の閾値以上となる平面の組み合わせが選択されてもよい。なお、閾値は、復元場所の全体の大きさに基づいて設定されてもよい。これにより、多数の寸法線が平面図に挿入されることで平面図が煩雑になることを避けることができる。 In this case, a combination of a predetermined number of planes may be selected starting from the combination with the largest inter-plane distance. Alternatively, a combination of planes with an area equal to or greater than a predetermined threshold may be selected. The threshold may be set based on the overall size of the restoration location. This makes it possible to avoid cluttering the plan view by inserting numerous dimension lines into the plan view.
次に、サーバ2で行われる図面表示処理について説明する。図35は、ユーザ端末1に表示される閲覧画面101,201を示す説明図である。 Next, we will explain the drawing display process performed by the server 2. Figure 35 is an explanatory diagram showing the viewing screens 101 and 201 displayed on the user terminal 1.
ユーザ端末1では、サーバ2の制御に基づいて、閲覧画面101,201がディスプレイ13に表示される。図35(A)には平面図表示モードの閲覧画面101を示し、図35(B)には測定表示モードの閲覧画面201を示す。 On the user terminal 1, viewing screens 101 and 201 are displayed on the display 13 based on control by the server 2. Figure 35 (A) shows the viewing screen 101 in plan view display mode, and Figure 35 (B) shows the viewing screen 201 in measurement display mode.
図35(A)に示すように、平面図表示モードの閲覧画面101では、図面生成処理で生成された平面図111(2次元レイアウト図)が表示される。図35(A)に示す例では、寸法線が挿入された平面図111が表示される。なお、CADモードが設けられて、平面図111に対して、不要な線を消去したり必要な線を追加したりする編集作業ができるようにしてもよい。 As shown in Figure 35 (A), the viewing screen 101 in plan view display mode displays a plan view 111 (two-dimensional layout drawing) generated by the drawing generation process. In the example shown in Figure 35 (A), a plan view 111 with dimension lines inserted is displayed. A CAD mode may also be provided to allow editing of the plan view 111, such as erasing unnecessary lines or adding necessary lines.
測定表示モードの閲覧画面201では、3次元モデルを可視化した図面が表示される。図35(B)に示す例では、複数の矩形平面で構成された3次元モデル(矩形モデル)を所定の視点から見た状態で可視化した3次元レイアウト図211が表示される。 In measurement display mode, the viewing screen 201 displays a drawing that visualizes a three-dimensional model. In the example shown in Figure 35(B), a three-dimensional layout drawing 211 is displayed that visualizes a three-dimensional model (rectangular model) made up of multiple rectangular planes as viewed from a specified viewpoint.
また、閲覧画面201では、3次元レイアウト図211上で測定対象物を指定するユーザの操作に応じて、指定された測定対象物に関係する測定結果が表示される。図35(B)に示す例では、ユーザが所定の操作(例えばドラッグ操作)により測定対象となる2つの壁面を指定したタイミングで、面間距離の表示ボックス212と、平行度の表示ボックス213とが表示される。 The viewing screen 201 also displays measurement results related to the specified measurement object in response to a user operation to specify the measurement object on the three-dimensional layout diagram 211. In the example shown in Figure 35(B), when the user specifies two wall surfaces to be measured using a predetermined operation (e.g., a drag operation), a display box 212 for the inter-surface distance and a display box 213 for the parallelism are displayed.
なお、図35(B)に示す例では、3次元モデルを可視化したレイアウト図として、3次元レイアウト図211が表示されるが、2次元レイアウト図(平面図)が表示されてもよい。また、閲覧画面201では、ユーザが測定対象となる平面(例えば部屋の壁面)を選択すると、選択された平面がレイアウト図上で強調表示されてもよい。例えば、レイアウト図上の選択された平面の描画色が変化してもよい。 In the example shown in Figure 35(B), a three-dimensional layout drawing 211 is displayed as a layout drawing that visualizes a three-dimensional model, but a two-dimensional layout drawing (floor plan) may also be displayed. Furthermore, on the viewing screen 201, when the user selects a plane to be measured (e.g., a wall surface of a room), the selected plane may be highlighted on the layout drawing. For example, the drawing color of the selected plane on the layout drawing may change.
また、3次元レイアウト図211では、矩形平面が法線方向に応じて色分けして描画されてもよい。例えば、法線方向がX方向となる矩形平面が赤色で描画され、法線方向がY方向となる矩形平面が緑色で描画され、法線方向がZ方向となる矩形平面のうち、床面を表す矩形平面が灰色で描画され、床面以外を表す矩形平面が青色で描画されてもよい。 Furthermore, in the three-dimensional layout diagram 211, rectangular planes may be drawn in different colors according to their normal direction. For example, rectangular planes whose normal direction is the X direction may be drawn in red, rectangular planes whose normal direction is the Y direction may be drawn in green, and of rectangular planes whose normal direction is the Z direction, rectangular planes representing the floor may be drawn in gray, and rectangular planes representing surfaces other than the floor may be drawn in blue.
サーバ2では、ユーザ端末1でのユーザの操作に応じて、面間距離に関する測定表示処理と、平行度に関する測定表示処理とが行われて、ユーザ端末1の閲覧画面201に、面間距離の表示ボックス212と、平行度の表示ボックス213とが表示される。 In response to user operations on the user terminal 1, the server 2 performs a measurement and display process for the inter-surface distance and a measurement and display process for the parallelism, and a display box 212 for the inter-surface distance and a display box 213 for the parallelism are displayed on the viewing screen 201 of the user terminal 1.
面間距離に関する測定表示処理では、3次元レイアウト図211上で2つの平面をユーザが選択する操作に応じて、選択された2つの平面に関する面間距離が3次元モデルに基づいて測定されて、その面間距離が閲覧画面201の表示ボックス212に表示される。 In the measurement and display process for inter-surface distances, when the user selects two planes on the three-dimensional layout diagram 211, the inter-surface distance between the two selected planes is measured based on the three-dimensional model, and the inter-surface distance is displayed in the display box 212 on the viewing screen 201.
このとき、ユーザは、面間距離の測定対象となる2つの平面(例えば部屋の壁面)の1点を順に指定すればよい。ユーザは各面の1点を適当に選択すればよく、ユーザが指定した2点を結ぶ方向が2つの平面の法線からずれていてもよい。本実施形態では、復元場所において平行に配置された2つの平面の平行度が、共法線クラスタリング処理により3次元モデルでも確保されるため、ユーザの操作により測定対象とする2つの平面が選択されれば、その2つの平面に関する面間距離、すなわち、2つの平面の法線方向の離隔距離を容易に測定することができる。 At this time, the user simply designates one point on each of the two planes (e.g., the walls of a room) for which the inter-plane distance will be measured. The user simply selects one point on each plane as appropriate, and the direction connecting the two points designated by the user may deviate from the normal to the two planes. In this embodiment, the parallelism of two planes arranged parallel to each other at the reconstruction location is ensured in the 3D model using conormal clustering processing. Therefore, once the two planes to be measured are selected by the user, the inter-plane distance between the two planes, i.e., the separation distance in the normal direction of the two planes, can be easily measured.
なお、本実施形態では、2つの平面に関する面間距離が測定されるが、1つの平面とその平面に平行な線との間の距離が測定されてもよい。例えば、部屋の壁面と、その壁面に平行に配置された机などの什器の縁(直線)との間の距離が測定されてもよい。 In this embodiment, the inter-plane distance between two planes is measured, but the distance between one plane and a line parallel to that plane may also be measured. For example, the distance between a wall of a room and the edge (straight line) of a piece of furniture, such as a desk, placed parallel to that wall may also be measured.
また、平行度に関する測定表示処理では、3次元レイアウト図上で2つの平面をユーザが選択する操作に応じて、選択された2つの平面の平行度が点群データに基づいて算出されて、その2つの平面の平行度が閲覧画面201の表示ボックス213に表示される。実際の建築では平行であるべき2つの平面が平行に施工されていないケースがあり、このような場合に、ユーザが、測定対象とする2つの平面を選択することで、2つの平面の平行度を容易に確認することができる。 In addition, in the parallelism measurement and display process, when the user selects two planes on the 3D layout drawing, the parallelism of the two selected planes is calculated based on the point cloud data, and the parallelism of the two planes is displayed in the display box 213 on the viewing screen 201. In actual construction, there are cases where two planes that should be parallel are not constructed parallel; in such cases, the user can easily check the parallelism of the two planes by selecting the two planes to be measured.
なお、本実施形態では、ユーザが平行な2つの平面上の各点を選択することで、その2つの平面に関する面間距離が測定されて閲覧画面201に表示されるが、ユーザが2つの点を選択することで、その2つの点の距離、すなわち、2つの点を結ぶ直線の長さが測定されて閲覧画面201に表示されてもよい。 In this embodiment, when the user selects points on two parallel planes, the inter-plane distance between the two planes is measured and displayed on the viewing screen 201. However, when the user selects two points, the distance between the two points, i.e., the length of the straight line connecting the two points, may also be measured and displayed on the viewing screen 201.
ところで、本実施形態では、復元場所における互いに平行な平面の平行性が確保された3次元モデルが得られる。これにより、面間距離の計測が容易に行える上に、3次元モデルの結合が容易に行える。具体例として、1棟の四角い建物に対して部分的に得られた3次元モデルを結合して建物全体の3次元モデルを構成する場合を考える。本発明に係る3次元モデル生成装置で生成された3次元モデルは建物の壁面に即して座標軸が設定され、さらに構成面は所定方向に限定されている。したがって、結合においては平行移動および3種類の回転(Z軸に関する90度、180度、-90度の回転)のみを考慮すればよく、構成面の方向が非限定的なモデルに比較して容易に結合が可能である。 In this embodiment, a 3D model is obtained in which the parallelism of parallel planes at the reconstruction location is ensured. This not only makes it easy to measure inter-surface distances, but also makes it easy to combine 3D models. As a specific example, consider the case where partially obtained 3D models of a square building are combined to create a 3D model of the entire building. In a 3D model generated by the 3D model generation device of the present invention, the coordinate axes are set in accordance with the building's wall surfaces, and the constituent planes are limited to specific directions. Therefore, when combining, only parallel translation and three types of rotation (90-degree, 180-degree, and -90-degree rotations around the Z axis) need to be considered, making it easier to combine models compared to models in which the orientation of the constituent planes is not limited.
なお、本実施形態によれば、実空間をデジタルツイン化する基盤技術として、広く活用が見込まれる。例えば、工場、倉庫、店舗などの3次元モデルを生成し、設備、在庫管理、リフォーム、レイアウト変更計画、シミュレーション用空間データ取得など、様々な用途に本開示における技術を採用することができる。 This embodiment is expected to be widely used as a fundamental technology for creating digital twins of real spaces. For example, the technology disclosed herein can be used to generate 3D models of factories, warehouses, stores, etc., and for a variety of applications, including equipment and inventory management, renovations, layout change planning, and acquiring spatial data for simulations.
以上のように、本出願において開示する技術の例示として、実施形態を説明した。しかしながら、本開示における技術は、これに限定されず、変更、置き換え、付加、省略などを行った実施形態にも適用できる。また、上記の実施形態で説明した各構成要素を組み合わせて、新たな実施形態とすることも可能である。 As mentioned above, the embodiments have been described as examples of the technology disclosed in this application. However, the technology in this disclosure is not limited to these, and can also be applied to embodiments in which modifications, substitutions, additions, omissions, etc. are made. Furthermore, it is possible to combine the components described in the above embodiments to create new embodiments.
本発明に係る3次元モデル生成装置、3次元モデル生成方法、及び3次元モデル生成プログラムは、面間距離の計測や複数の3次元モデルの結合を容易に行える3次元モデルを生成することができる効果を有し、対象場所の3次元復元処理を行って取得された点群データに基づいて3次元モデルを生成する処理をプロセッサにより実行する3次元モデル生成装置、3次元モデル生成方法、及び3次元モデル生成プログラムなどとして有用である。 The 3D model generation device, 3D model generation method, and 3D model generation program according to the present invention have the effect of generating 3D models that allow for easy measurement of inter-surface distances and the combination of multiple 3D models, and are useful as 3D model generation devices, 3D model generation methods, and 3D model generation programs that use a processor to execute a process for generating a 3D model based on point cloud data acquired by performing a 3D reconstruction process on a target location.
1:ユーザ端末
2:サーバ
12:カメラ
13:ディスプレイ
14:入力デバイス
16:プロセッサ
51:パーティション
52,53:矩形平面
61:手すり
62,63:矩形平面
101:閲覧画面
111:平面図(2次元レイアウト図)
201:閲覧画面
211:3次元レイアウト図
212:面間距離の表示ボックス
213:平行度の表示ボックス
BB,BB0,BB1,BB2,BB21,BB22:境界ボックス
C:クラスタ
L:拡大幅
RP1,RP2,RP3:矩形平面
SB,SB1,SB2,SB3:探索ボックス
SC:サブクラスタ
θ:法線角度
φ:回転角
1: User terminal 2: Server 12: Camera 13: Display 14: Input device 16: Processor 51: Partitions 52, 53: Rectangular plane 61: Handrails 62, 63: Rectangular plane 101: Viewing screen 111: Floor plan (2D layout diagram)
201: Viewing screen 211: 3D layout diagram 212: Display box for inter-surface distance 213: Display box for parallelism BB, BB0, BB1, BB2, BB21, BB22: Bounding box C: Cluster L: Enlargement width RP1, RP2, RP3: Rectangular plane SB, SB1, SB2, SB3: Search box SC: Sub-cluster θ: Normal angle φ: Rotation angle
Claims (5)
前記プロセッサは、
平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、
点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、
暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、
対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、
前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、
対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成することを特徴とする3次元モデル生成装置。 A three-dimensional model generation device that uses a processor to execute a process of generating a three-dimensional model based on point cloud data acquired by performing a three-dimensional reconstruction process on a target location,
The processor:
When setting coordinate axes along the four walls of a target location based on the distribution of normal directions of the entire point cloud of the target location that forms a rectangle in a plan view,
a radial angle when the normal direction of each point constituting the point cloud is expressed in cylindrical coordinates is obtained as a normal angle, the normal angle of each point is multiplied by four to obtain a quadrupled value of each point, an optimal value of the quadrupled value of each point is estimated using an estimation method that excludes the influence of outliers, and the optimal value of the quadrupled value is multiplied by one-fourth to obtain a rotation angle that defines the direction of the coordinate axes;
Rotating the provisionally set coordinate axes by the rotation angle to set the regular coordinate axes;
execute a conormal clustering process to extract, from the point cloud of the target location, a set of points whose normal directions coincide with a predetermined direction based on the normal coordinate axis within a predetermined tolerance range as a conormal cluster;
performing a rectangularization process to convert the conormal cluster into a rectangular plane;
A three-dimensional model generating device that generates the three-dimensional model in which a target location is expressed by a set of a plurality of the rectangular planes.
前記プロセッサは、
対象場所の点群に対して対象場所の壁面に沿う座標軸を設定し、
対象場所の点群から、前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、
前記共法線クラスタリング処理の前に、
対象場所の点群から任意方向の平面を個別クラスタとして抽出する個別クラスタリング処理を実行し、
前記個別クラスタおよび前記共法線クラスタを対象にして矩形化処理を実行して、
対象場所を複数の矩形平面の集合で表現した前記3次元モデルを生成することを特徴とする3次元モデル生成装置。 A three-dimensional model generation device that uses a processor to execute a process of generating a three-dimensional model based on point cloud data acquired by performing a three-dimensional reconstruction process on a target location,
The processor:
Set a coordinate axis along the wall of the target location for the point cloud of the target location,
executes a conormal clustering process to extract, from the point cloud of the target location, a set of points whose normal directions coincide with a predetermined direction based on the coordinate axes within a predetermined tolerance range, as a conormal cluster;
Before the conormal clustering process,
An individual clustering process is performed to extract a plane in any direction from the point cloud of the target location as an individual cluster;
performing a rectangularization process on the individual clusters and the conormal clusters;
A three-dimensional model generating device that generates the three-dimensional model in which a target location is represented by a set of a plurality of rectangular planes .
前記共法線クラスタを、その共法線クラスタの形状に対応するように複数のサブクラスタに分割し、
前記共法線クラスタおよび前記サブクラスタを前記矩形平面に変換することを特徴とする請求項1または請求項2に記載の3次元モデル生成装置。 The processor:
Dividing the conormal cluster into a plurality of sub-clusters corresponding to the shape of the conormal cluster;
3. The three-dimensional model generating device according to claim 1 , wherein the conormal clusters and the sub-clusters are transformed into the rectangular plane.
平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、
点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、
暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、
対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、
前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、
対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成することを特徴とする3次元モデル生成方法。 A three-dimensional model generation method for generating a three-dimensional model based on point cloud data acquired by performing three-dimensional reconstruction processing on a target location, the method comprising:
When setting coordinate axes along the four walls of a target location based on the distribution of normal directions of the entire point cloud of the target location that forms a rectangle in a plan view,
a radial angle when the normal direction of each point constituting the point cloud is expressed in cylindrical coordinates is obtained as a normal angle, the normal angle of each point is multiplied by four to obtain a quadrupled value of each point, an optimal value of the quadrupled value of each point is estimated using an estimation method that excludes the influence of outliers, and the optimal value of the quadrupled value is multiplied by one-fourth to obtain a rotation angle that defines the direction of the coordinate axes;
Rotating the provisionally set coordinate axes by the rotation angle to set the regular coordinate axes;
execute a conormal clustering process to extract, from the point cloud of the target location, a set of points whose normal directions coincide with a predetermined direction based on the normal coordinate axis within a predetermined tolerance range as a conormal cluster;
performing a rectangularization process to convert the conormal cluster into a rectangular plane;
A three-dimensional model generation method, characterized in that the three-dimensional model is generated by expressing a target location as a set of a plurality of the rectangular planes.
平面視で矩形をなす対象場所の点群の全体を対象にした法線方向の分布状況に基づいて、対象場所の4つの壁面に沿う座標軸を設定するとき、
点群を構成する各点の法線方向を円筒座標で表した場合の径方向の角度を法線角度として取得し、各点の前記法線角度を4倍して、各点の4倍値を取得し、各点の前記4倍値に対して、外れ値の影響を除外する推定方法を用いて、前記4倍値の最適値を推定し、前記4倍値の最適値を1/4倍して、前記座標軸の方向を規定する回転角を取得し、
暫定的に設定された前記座標軸を前記回転角だけ回転させて、正規の前記座標軸を設定し、
対象場所の点群から、正規の前記座標軸を基準にした所定方向と法線方向とが所定の許容範囲内で一致する点の集合を共法線クラスタとして抽出する共法線クラスタリング処理を実行し、
前記共法線クラスタを矩形平面に変換する矩形化処理を実行して、
対象場所を複数の前記矩形平面の集合で表現した前記3次元モデルを生成することを特徴とする3次元モデル生成プログラム。 A three-dimensional model generation program that causes a processor to execute a process of generating a three-dimensional model based on point cloud data acquired by performing a three-dimensional reconstruction process on a target location,
When setting coordinate axes along the four walls of a target location based on the distribution of normal directions of the entire point cloud of the target location that forms a rectangle in a plan view,
a radial angle when the normal direction of each point constituting the point cloud is expressed in cylindrical coordinates is obtained as a normal angle, the normal angle of each point is multiplied by four to obtain a quadrupled value of each point, an optimal value of the quadrupled value of each point is estimated using an estimation method that excludes the influence of outliers, and the optimal value of the quadrupled value is multiplied by one-fourth to obtain a rotation angle that defines the direction of the coordinate axes;
Rotating the provisionally set coordinate axes by the rotation angle to set the regular coordinate axes;
execute a conormal clustering process to extract, from the point cloud of the target location, a set of points whose normal directions coincide with a predetermined direction based on the normal coordinate axis within a predetermined tolerance range as a conormal cluster;
performing a rectangularization process to convert the conormal cluster into a rectangular plane;
A three-dimensional model generation program, characterized by generating the three-dimensional model in which a target location is represented by a set of a plurality of the rectangular planes.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2023195334A JP7724429B2 (en) | 2023-11-16 | 2023-11-16 | 3D model generation device, 3D model generation method, and 3D model generation program |
| PCT/JP2024/040603 WO2025105461A1 (en) | 2023-11-16 | 2024-11-15 | Three-dimensional model generation device, three-dimensional model generation method, three-dimensional model generation program, drawing creation display device, drawing creation display method, and drawing creation display program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2023195334A JP7724429B2 (en) | 2023-11-16 | 2023-11-16 | 3D model generation device, 3D model generation method, and 3D model generation program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2025082093A JP2025082093A (en) | 2025-05-28 |
| JP7724429B2 true JP7724429B2 (en) | 2025-08-18 |
Family
ID=95824314
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2023195334A Active JP7724429B2 (en) | 2023-11-16 | 2023-11-16 | 3D model generation device, 3D model generation method, and 3D model generation program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7724429B2 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014035702A (en) | 2012-08-09 | 2014-02-24 | Topcon Corp | Optical data processing device, optical data processing system, optical data processing method, and program for processing optical data |
| JP2014186566A (en) | 2013-03-25 | 2014-10-02 | Geo Technical Laboratory Co Ltd | Analysis method of three-dimensional point group |
| JP2017223511A (en) | 2016-06-14 | 2017-12-21 | 日本電信電話株式会社 | Road structuring device, road structuring method, and road structuring program |
| JP2021039500A (en) | 2019-09-02 | 2021-03-11 | 五洋建設株式会社 | Method of generating three-dimensional shape data of construct |
-
2023
- 2023-11-16 JP JP2023195334A patent/JP7724429B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014035702A (en) | 2012-08-09 | 2014-02-24 | Topcon Corp | Optical data processing device, optical data processing system, optical data processing method, and program for processing optical data |
| JP2014186566A (en) | 2013-03-25 | 2014-10-02 | Geo Technical Laboratory Co Ltd | Analysis method of three-dimensional point group |
| JP2017223511A (en) | 2016-06-14 | 2017-12-21 | 日本電信電話株式会社 | Road structuring device, road structuring method, and road structuring program |
| JP2021039500A (en) | 2019-09-02 | 2021-03-11 | 五洋建設株式会社 | Method of generating three-dimensional shape data of construct |
Non-Patent Citations (1)
| Title |
|---|
| YAGUCHI, Hiroaki et al.,A method of 3D model generation of indoor environment with Manhattan world assumption using 3D camera,Proceedings of the 2013 IEEE/SICE International Symposium on System Integration,IEEE,2013年12月,p.759-765,インターネット<URL:https://doi.org/10.1109/SII.2013.6776686> |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2025082093A (en) | 2025-05-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12573217B2 (en) | Server, method and computer program for generating spatial model from panoramic image | |
| Liu et al. | Indoor localization and visualization using a human-operated backpack system | |
| Neumann et al. | Augmented virtual environments (ave): Dynamic fusion of imagery and 3d models | |
| Sanchez et al. | Planar 3D modeling of building interiors from point cloud data | |
| US6476803B1 (en) | Object modeling system and process employing noise elimination and robust surface extraction techniques | |
| Johnson et al. | Registration and integration of textured 3D data | |
| US8208029B2 (en) | Method and system for calibrating camera with rectification homography of imaged parallelogram | |
| US10957062B2 (en) | Structure depth-aware weighting in bundle adjustment | |
| US20100284572A1 (en) | Systems and methods for extracting planar features, matching the planar features, and estimating motion from the planar features | |
| Kim et al. | Visual Odometry with Drift-Free Rotation Estimation Using Indoor Scene Regularities. | |
| CN111798562B (en) | Virtual building space building and roaming method | |
| KR101869605B1 (en) | Three-Dimensional Space Modeling and Data Lightening Method using the Plane Information | |
| CN113628343B (en) | Three-dimensional grid combination processing method and device and storage medium | |
| US8847954B1 (en) | Methods and systems to compute 3D surfaces | |
| Arslan | 3D object reconstruction from a single image | |
| CN112002007A (en) | Model obtaining method and device based on air-ground image, equipment and storage medium | |
| JP7724429B2 (en) | 3D model generation device, 3D model generation method, and 3D model generation program | |
| JP7752325B2 (en) | Drawing creation display device, drawing creation display method, and drawing creation display program | |
| JP7777799B2 (en) | 3D model generation device, 3D model generation method, and 3D model generation program | |
| WO2025105461A1 (en) | Three-dimensional model generation device, three-dimensional model generation method, three-dimensional model generation program, drawing creation display device, drawing creation display method, and drawing creation display program | |
| CN119648949A (en) | Three-dimensional scene reconstruction method and device | |
| Chang et al. | Using line consistency to estimate 3D indoor Manhattan scene layout from a single image | |
| Nakagawa et al. | Topological 3D modeling using indoor mobile LiDAR data | |
| Cheng et al. | Texture mapping 3d planar models of indoor environments with noisy camera poses | |
| Chen et al. | Stabilizing stereo correspondence computation using delaunay triangulation and planar homography |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240917 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250121 |
|
| A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20250319 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250521 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20250624 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250718 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7724429 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |