JP7816752B2 - Image processing device, image processing method, and program - Google Patents
Image processing device, image processing method, and programInfo
- Publication number
- JP7816752B2 JP7816752B2 JP2022005357A JP2022005357A JP7816752B2 JP 7816752 B2 JP7816752 B2 JP 7816752B2 JP 2022005357 A JP2022005357 A JP 2022005357A JP 2022005357 A JP2022005357 A JP 2022005357A JP 7816752 B2 JP7816752 B2 JP 7816752B2
- Authority
- JP
- Japan
- Prior art keywords
- feature points
- feature point
- feature
- identified
- image
- 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
- Processing Or Creating Images (AREA)
- Image Generation (AREA)
Description
本開示は、複数の画像からの3次元形状の構築を可能にするための、画像処理装置、及び画像処理方法に関し、更には、これらを実現するためのプログラムに関する。 This disclosure relates to an image processing device and image processing method that enable the construction of three-dimensional shapes from multiple images, as well as a program for implementing these.
近年、画像に写っている対象の3次元形状を構築する技術が注目されている。このような技術の代表例としては、SfM(Structure from Motion)が知られている。SfMでは、対象の視点の異なる複数枚の画像それぞれ毎に、その特徴量(例えば、SIFT特徴量、SURF特徴量)が計算され、特徴点が抽出される。次に、画像間で、抽出した特徴点のマッチングが実行され、一致する特徴点のペアが抽出され、例えば、ロバスト推定(Robust Estimation)によって、特徴点ペアの幾何学的な関係が計算され、誤った特徴点ペアが除外される。 In recent years, technology for constructing the three-dimensional shape of objects captured in images has been attracting attention. A well-known example of such technology is Structure from Motion (SfM). In SfM, feature values (e.g., SIFT features, SURF features) are calculated for each of multiple images of the object taken from different viewpoints, and feature points are extracted. The extracted feature points are then matched between images to extract matching feature point pairs. The geometric relationship between the feature point pairs is then calculated using, for example, robust estimation, and incorrect feature point pairs are eliminated.
その後、幾つかの特徴点ペア毎に、これらの幾何学的な関係に基づいて、Fundamental行列が算出され、算出された各Fundamental行列間での差が最も少なくなるように、特徴点ペア毎の幾何学的な関係が調整される。そして、調整後の幾何学的な関係に基づいて、3次元形状(点群)が構築される。 Then, for each pair of feature points, a fundamental matrix is calculated based on these geometric relationships, and the geometric relationship for each pair of feature points is adjusted to minimize the difference between the calculated fundamental matrices. A three-dimensional shape (point cloud) is then constructed based on the adjusted geometric relationships.
また、上述のロバスト推定では、間違った特徴点ペアの除去は完全ではなく、復元される3次元形状の精度が高くないことから、特許文献1は、間違った特徴点ペアの抽出を抑制する技術を開示している。 Furthermore, the robust estimation described above does not completely remove incorrect feature point pairs, and the accuracy of the reconstructed three-dimensional shape is not high. Therefore, Patent Document 1 discloses technology to suppress the extraction of incorrect feature point pairs.
具体的には、特許文献1に開示された技術では、まず、上述した従来からの手法を用いて、複数の画像から、対応する特徴点ペアが抽出され、抽出された特徴点ペアを用いて仮の3次元形状が構築される。続いて、対象を撮影した各画像において、互いに対応する点又は線分が指定される。このとき指定される点又は線分の合計は2以上となる。 Specifically, the technology disclosed in Patent Document 1 first uses the conventional method described above to extract corresponding feature point pairs from multiple images, and then constructs a temporary three-dimensional shape using the extracted feature point pairs. Next, corresponding points or line segments are specified in each image of the object. The total number of points or line segments specified at this time is two or more.
次に、指定された点間又は線分間の幾何学的関係を示す数値行列が算出され、算出された数値行列を用いて、先に抽出された特徴点ペアの中から間違った特徴点ペアが排除される。その後、排除されなかった特徴点ペアのみを用いて、再度、3次元形状が構築される。特許文献1に開示された技術を用いれば、復元される3次元形状の精度の向上が図られる。 Next, a numerical matrix indicating the geometric relationship between the specified points or lines is calculated, and the calculated numerical matrix is used to eliminate incorrect feature point pairs from the previously extracted feature point pairs. The three-dimensional shape is then reconstructed using only the feature point pairs that were not eliminated. Using the technology disclosed in Patent Document 1, the accuracy of the reconstructed three-dimensional shape can be improved.
ところで、特許文献1に開示された技術では、上述したように、画像毎に、対応する点又は線分が指定されるが、点又は線分の指定は、作業者が肉眼で対応する点又は線分を見つけ出すことによって行われている。このため、点または線分の指定は、作業者にとって大きな負担になる。 As mentioned above, with the technology disclosed in Patent Document 1, corresponding points or line segments are specified for each image, but the points or line segments are specified by the worker finding the corresponding points or line segments with the naked eye. As a result, specifying points or line segments is a significant burden for the worker.
本開示の目的の一例は、上記問題を解消し、複数の画像を用いて対象物の3次元形状を構築する際において、3次元形状の精度の向上を図りつつ、作業者の負担を軽減し得る、画像処理装置、画像処理方法、及びプログラムを提供することにある。 One example of the objective of the present disclosure is to provide an image processing device, image processing method, and program that resolves the above-mentioned problems and can reduce the burden on workers when constructing a three-dimensional shape of an object using multiple images, while improving the accuracy of the three-dimensional shape.
上記目的を達成するため、本開示の一側面における画像処理装置は、
対象物の複数の画像それぞれから、対応する特徴点の組合せを抽出する、組合せ抽出部と、
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築部と、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定部と、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出部と、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出部と、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築部と、
を備えていることを特徴とする。
In order to achieve the above object, an image processing device according to one aspect of the present disclosure includes:
a combination extraction unit that extracts combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape constructing unit that constructs a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identification unit that, when a position on the object is designated in one of the plurality of images, identifies the corresponding feature point in accordance with the designated position, and further identifies the feature point corresponding to the identified feature point in another of the images in which a position is not designated;
a feature point extraction unit that selects, from the identified feature points in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracts, in the other image, the feature point that corresponds to the selected feature point;
a matrix calculation unit that calculates a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape constructing unit that constructs a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
The present invention is characterized by the following features.
また、上記目的を達成するため、本開示の一側面における画像処理方法は、
対象物の複数の画像それぞれから、対応する特徴点の組合せを抽出する、組合せ抽出ステップと、
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築ステップと、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定ステップと、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出ステップと、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出ステップと、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築ステップと、
を有する、ことを特徴とする。
In order to achieve the above object, an image processing method according to one aspect of the present disclosure includes:
a combination extraction step of extracting combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape construction step of constructing a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identifying step of, when a position on the object is specified in one of the plurality of images, identifying the corresponding feature point in accordance with the specified position, and further identifying the feature point corresponding to the identified feature point in another of the images in which a position is not specified;
a feature point extraction step of selecting, from the feature points identified in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracting, in the other image, the feature point corresponding to the selected feature point;
a matrix calculation step of calculating a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape construction step of constructing a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
The present invention is characterized by having the following:
更に、上記目的を達成するため、本開示の一側面におけるプログラムは、
コンピュータに、
対象物の複数の画像それぞれから、対応する特徴点の組合せを抽出する、組合せ抽出ステップと、
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築ステップと、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定ステップと、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出ステップと、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出ステップと、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築ステップと、
を実行させる、ことを特徴とする。
Furthermore, in order to achieve the above object, a program according to one aspect of the present disclosure includes:
On the computer,
a combination extraction step of extracting combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape construction step of constructing a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identifying step of, when a position on the object is specified in one of the plurality of images, identifying the corresponding feature point in accordance with the specified position, and further identifying the feature point corresponding to the identified feature point in another of the images in which a position is not specified;
a feature point extraction step of selecting, from the feature points identified in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracting, in the other image, the feature point corresponding to the selected feature point;
a matrix calculation step of calculating a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape construction step of constructing a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
The method is characterized in that:
以上のように本開示によれば、複数の画像を用いて対象の3次元形状を構築する際において、3次元形状の精度の向上を図りつつ、作業者の負担を軽減することができる。 As described above, according to the present disclosure, when constructing a three-dimensional shape of an object using multiple images, it is possible to improve the accuracy of the three-dimensional shape while reducing the burden on the worker.
(実施の形態1)
以下、実施の形態1における画像処理装置について、図1~図10を参照しながら説明する。
(Embodiment 1)
The image processing device according to the first embodiment will be described below with reference to FIGS.
[装置構成]
最初に、実施の形態1における画像処理装置の概略構成について図1を用いて説明する。図1は、実施の形態1における画像処理装置の概略構成を示すブロック図である。
[Device configuration]
First, the schematic configuration of the image processing device according to the first embodiment will be described with reference to Fig. 1. Fig. 1 is a block diagram showing the schematic configuration of the image processing device according to the first embodiment.
図1に示す、実施の形態1における画像処理装置10は、対象物の複数の画像から対象物の3次元形状を構築する装置である。図1に示すように、画像処理装置10は、組合せ抽出部11と、仮3次元形状構築部12と、特徴点特定部13と、特徴点抽出部14と、行列算出部15と、3次元形状構築部16とを備えている。 The image processing device 10 in embodiment 1 shown in Figure 1 is a device that constructs a three-dimensional shape of an object from multiple images of the object. As shown in Figure 1, the image processing device 10 includes a combination extraction unit 11, a temporary three-dimensional shape construction unit 12, a feature point identification unit 13, a feature point extraction unit 14, a matrix calculation unit 15, and a three-dimensional shape construction unit 16.
組合せ抽出部11は、対象物の複数の画像それぞれから、対応する特徴点の組合せを抽出する。仮3次元形状構築部12は、抽出された特徴点の組合せを用いて、特徴点の点群で構成された、対象物の仮の3次元形状を構築する。 The combination extraction unit 11 extracts corresponding combinations of feature points from each of multiple images of the object. The temporary 3D shape construction unit 12 uses the extracted combinations of feature points to construct a temporary 3D shape of the object composed of a point cloud of feature points.
特徴点特定部13は、複数の画像の1つの画像において、対象物上の位置が指定されると、指定された位置に応じて対応する特徴点を特定する。また、特徴点特定部13は、位置が指定されていない別の前記画像において、特定した特徴点に対応する特徴点を特定する。 When a position on an object is specified in one of the multiple images, the feature point identification unit 13 identifies a corresponding feature point in accordance with the specified position. The feature point identification unit 13 also identifies a feature point corresponding to the identified feature point in another image in which a position is not specified.
特徴点抽出部14は、対象物上の位置が指定された画像において、特定された特徴点のなかから、設定条件を満たすいずれかの特徴点を選択する。また、特徴点抽出部14は、別の画像において、選択した特徴点に対応する特徴点を抽出する。行列算出部15は、選択された特徴点と抽出された特徴点との幾何学的関係を表現する、数値行列を算出する。 The feature point extraction unit 14 selects any feature point that satisfies a set condition from among the identified feature points in an image in which the position on the object is specified. The feature point extraction unit 14 also extracts feature points in another image that correspond to the selected feature point. The matrix calculation unit 15 calculates a numerical matrix that represents the geometric relationship between the selected feature point and the extracted feature point.
3次元形状構築部16は、数値行列を用いて、抽出された特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する特徴点の組合せを特定し、特定した特徴点の組合せ以外の特徴点の組合せを用いて、対象物の3次元形状を構築する。 The three-dimensional shape construction unit 16 uses a numerical matrix to identify, from among the extracted combinations of feature points, combinations of feature points that have contradictory geometric relationships between the feature points, and constructs the three-dimensional shape of the object using combinations of feature points other than the identified combinations of feature points.
このように、実施の形態1では、一旦、対象物の3次元形状を構築した後に、3次元形状の精度を高めるために、1つの画像上で、位置が指定され、指定された位置の周辺の特徴点が特定される。更に、そのうちの1つが選択されると、残りの画像上で、対応する特徴点が抽出される。そして、選択又は抽出された特徴点を用いて、対象物の3次元形状が再構築される。 In this way, in embodiment 1, after the three-dimensional shape of the object is constructed, a position is specified on one image and feature points around the specified position are identified in order to improve the accuracy of the three-dimensional shape. Furthermore, when one of these is selected, corresponding feature points are extracted on the remaining images. The three-dimensional shape of the object is then reconstructed using the selected or extracted feature points.
従って、実施の形態1によれば、複数の画像を用いて対象物の3次元形状を構築する際において、3次元形状の精度を向上させることができる。また、実施の形態1では、3次元形状の構築において、ユーザは、画像上の点又は線分を厳密に指定する必要はなく、画像上の大体の位置を指定するだけで良いため、従来に比べて、ユーザの負担が軽減される。 Accordingly, according to embodiment 1, when constructing a three-dimensional shape of an object using multiple images, the accuracy of the three-dimensional shape can be improved. Furthermore, in embodiment 1, when constructing a three-dimensional shape, the user does not need to precisely specify points or line segments on the image, but only needs to specify a general position on the image, thereby reducing the burden on the user compared to conventional methods.
続いて、図2~図9を用いて、実施の形態1における画像処理装置の構成及び機能について具体的に説明する。図2は、実施の形態1における画像処理装置の具体的構成を示すブロック図である。 Next, the configuration and functions of the image processing device in embodiment 1 will be specifically explained using Figures 2 to 9. Figure 2 is a block diagram showing the specific configuration of the image processing device in embodiment 1.
図2に示すように、実施の形態1では、画像処理装置10は、組合せ抽出部11、仮3次元形状構築部12、特徴点特定部13、特徴点抽出部14、行列算出部15、及び3次元形状構築部16に加えて、画像取得部17と、フィルタリング部18と、入力受付部19と、表示部20とを更に備えている。図2において、21は、表示装置である。 As shown in FIG. 2, in embodiment 1, the image processing device 10 includes a combination extraction unit 11, a temporary 3D shape construction unit 12, a feature point identification unit 13, a feature point extraction unit 14, a matrix calculation unit 15, and a 3D shape construction unit 16, as well as an image acquisition unit 17, a filtering unit 18, an input acceptance unit 19, and a display unit 20. In FIG. 2, 21 is a display device.
画像取得部17は、外部の装置、例えば、撮像装置、端末装置、画像データを保持している記憶装置等から、対象物の複数の画像データを取得する。図3は、処理対象となる複数の画像の一例を示す図である。図3の例では、4枚の画像が例示されているが、実施の形態1において対象となる画像の枚数は特に限定されるものではない。図3において、30は、対象物を示している。 The image acquisition unit 17 acquires multiple image data of an object from an external device, such as an imaging device, a terminal device, or a storage device that stores image data. Figure 3 shows an example of multiple images to be processed. In the example of Figure 3, four images are shown, but the number of images to be processed in embodiment 1 is not particularly limited. In Figure 3, 30 indicates the object.
組合せ抽出部11は、実施の形態1では、まず、画像データ毎に、画像から例えば、SIFT特徴量、又はSURF特徴量を計算して特徴点を特定する。そして、組合せ抽出部11は、画像間で対応する特徴点同士を、対応する特徴点の組合せとして抽出する。図3の例では、丸で囲まれた部分は、対象物30の特徴点の一つを示している。対応する特徴点の組合せが抽出された複数枚の画像は、以降においては、「グループ画像」と表記する。 In the first embodiment, the combination extraction unit 11 first identifies feature points for each image data by calculating, for example, SIFT features or SURF features from the image. Then, the combination extraction unit 11 extracts corresponding feature points between the images as combinations of corresponding feature points. In the example of Figure 3, the circled portion indicates one of the feature points of the object 30. Hereinafter, multiple images from which combinations of corresponding feature points have been extracted will be referred to as a "group image."
フィルタリング部18は、特徴点の組合せ毎に、特徴点間の幾何学的な関係を計算し、計算結果に基づいて、誤った特徴点の組合せを特定し、特定した特徴点の組合せを排除する。フィルタリング部18によるフィルタリング処理は、従来からのSfMと同様に、ロバスト推定を用いて行われる。実施の形態1では、後述する3次元形状構築部16によるフィルタリング処理(以下「第2のフィルタリング処理」と表記する。)に加えて、フィルタリング部18によるフィルタリング処理(以下「第1のフィルタリング処理」と表記する。)も行われるので、より確実に間違った特徴点の組合せが排除される。 The filtering unit 18 calculates the geometric relationship between feature points for each combination of feature points, identifies incorrect combinations of feature points based on the calculation results, and eliminates the identified combinations of feature points. The filtering process by the filtering unit 18 is performed using robust estimation, as in conventional SfM. In embodiment 1, in addition to the filtering process by the 3D shape construction unit 16 (hereinafter referred to as the "second filtering process") described below, the filtering unit 18 also performs a filtering process (hereinafter referred to as the "first filtering process"), which more reliably eliminates incorrect combinations of feature points.
仮3次元形状構築部12は、実施の形態1では、抽出された特徴点の組合せを用いて、仮の3次元座標を算出し、更に、算出された仮の3次元座標を用いて、特徴点の点群で構成された対象物の仮の3次元形状を構築する。 In embodiment 1, the temporary 3D shape construction unit 12 calculates temporary 3D coordinates using a combination of extracted feature points, and then uses the calculated temporary 3D coordinates to construct a temporary 3D shape of the object composed of a point group of feature points.
なお、仮3次元形状構築部12による3次元座標の算出処理及び3次元形状の構築処理は、後述する3次元形状構築部16による3次元座標の算出処理及び3次元形状の構築処理と同様に行われる。両者の違いは、処理対象となる特徴点の組合せに対して第2のフィルタリング処理が行われているかどうかのみである。従って、仮3次元形状構築部12による3次元座標の算出処理及び3次元形状の構築処理の詳細については、後述する3次元形状構築部16による3次元座標の算出処理及び3次元形状の構築処理の詳細説明に代える。 The three-dimensional coordinate calculation process and three-dimensional shape construction process by the temporary three-dimensional shape construction unit 12 are performed in the same manner as the three-dimensional coordinate calculation process and three-dimensional shape construction process by the three-dimensional shape construction unit 16, which will be described later. The only difference between the two is whether or not a second filtering process is performed on the combination of feature points to be processed. Therefore, details of the three-dimensional coordinate calculation process and three-dimensional shape construction process by the temporary three-dimensional shape construction unit 12 will be substituted for the detailed description of the three-dimensional coordinate calculation process and three-dimensional shape construction process by the three-dimensional shape construction unit 16, which will be described later.
入力受付部19は、処理対象となる画像上において位置の指定を受け付ける。位置の指定は、例えば、表示装置21の画面上に表示された画像上で、ユーザによって、タッチパネル、マウスといった入力装置を用いて行われる。また、位置の指定は、ユーザによって、外部の端末装置を介して行われていても良い。 The input receiving unit 19 receives a position specification on the image to be processed. The position specification is performed, for example, by the user on the image displayed on the screen of the display device 21 using an input device such as a touch panel or mouse. The position specification may also be performed by the user via an external terminal device.
表示部20は、3次元形状構築部16によって対象物の3次元形状が構築されると、構築された3次元形状を、2次元画像として、表示装置21の画面上に表示させる。具体的には、表示部20は、構築された3次元形状を二次元画面上に表示するための画像データを生成し、生成した画像データを表示装置21に出力する。 Once the three-dimensional shape of the object has been constructed by the three-dimensional shape construction unit 16, the display unit 20 displays the constructed three-dimensional shape as a two-dimensional image on the screen of the display device 21. Specifically, the display unit 20 generates image data for displaying the constructed three-dimensional shape on a two-dimensional screen, and outputs the generated image data to the display device 21.
また、表示部20は、画像取得部17によって複数の画像の画像データが取得されると、取得された画像データの画像を、表示装置21の画面上に表示させることもできる。この場合、ユーザは、図4に示すように、入力受付部19を介して、画面に表示された画像の1つにおいて、対象物上の位置を指定することができる。図4は、画面上に表示された対象物の複数枚の画像の一例を示す図である。図4の例では、ユーザは、画面に表示されるカーソル(矢印)31で、対象物30上の位置を指定する。 Furthermore, when image data of multiple images is acquired by the image acquisition unit 17, the display unit 20 can also display the images of the acquired image data on the screen of the display device 21. In this case, as shown in FIG. 4, the user can specify a position on the object in one of the images displayed on the screen via the input acceptance unit 19. FIG. 4 is a diagram showing an example of multiple images of an object displayed on the screen. In the example of FIG. 4, the user specifies a position on the object 30 with a cursor (arrow) 31 displayed on the screen.
特徴点特定部13は、実施の形態1では、図4に示すように、ユーザがカーソル31によって対象物30上で位置を指定すると、指定された位置に対応する特徴点32を特定する。具体的には、特徴点特定部13は、位置が指定された画像において、例えば、指定された位置を中心とした半径rの円形の領域を設定し、設定した領域に存在する特徴点を特定する。なお、円形の領域の半径rは、適宜設定される。 In embodiment 1, as shown in FIG. 4, when a user specifies a position on an object 30 using a cursor 31, the feature point identification unit 13 identifies a feature point 32 corresponding to the specified position. Specifically, the feature point identification unit 13 sets, for example, a circular area with a radius r centered on the specified position in the image where the position is specified, and identifies feature points that exist in the set area. Note that the radius r of the circular area is set as appropriate.
また、特徴点特定部13は、位置が指定された画像以外の画像においても、特定した特徴点に対応する特徴点を特定する。なお、特定の対象となる特徴点は、組合せ抽出部11によって既に画像から抽出され、更にフィルタリング部18によってフィルタリングされた、特徴点である。 The feature point identification unit 13 also identifies feature points corresponding to the identified feature points in images other than the image in which the position is specified. Note that the feature points to be identified are feature points that have already been extracted from the image by the combination extraction unit 11 and further filtered by the filtering unit 18.
更に、特徴点特定部13は、対象物30上の特定した特徴点を、複数の画像それぞれと共に、画面上に提示する。具体的には、特徴点特定部13は、画像毎の特定した特徴点の座標を示すデータを、表示部20に送る。表示部20は、データを受け取ると、各画像に特徴点を示すマーク(図4における●)が重ねあわされた画像データを生成し、生成した画像データを表示装置21に出力する。これにより、図4に示すように、特定された特徴点32と各画像(画像1~4)とが、表示装置21の画面上に表示される。 Furthermore, the feature point identification unit 13 presents the identified feature points on the object 30 on the screen along with each of the multiple images. Specifically, the feature point identification unit 13 sends data indicating the coordinates of the identified feature points for each image to the display unit 20. Upon receiving the data, the display unit 20 generates image data in which marks indicating the feature points (● in Figure 4) are superimposed on each image, and outputs the generated image data to the display device 21. As a result, the identified feature points 32 and each image (images 1 to 4) are displayed on the screen of the display device 21, as shown in Figure 4.
ユーザは、図4に示すように、指定した位置の周辺の特徴点が画面上に表示されると、入力装置を用いて、位置を指定した画像上において、いずれかの特徴点を指定することができる。この場合、入力受付部19は、指定された特徴点を、特徴点特定部13に通知する。 As shown in Figure 4, when feature points around the specified position are displayed on the screen, the user can use the input device to specify one of the feature points on the image where the position was specified. In this case, the input receiving unit 19 notifies the feature point identification unit 13 of the specified feature point.
特徴点抽出部14は、実施の形態1では、画面上で、対象物30上の位置が指定された画像上で、いずれかの特徴点が指定されると、指定された特徴点を選択する。実施の形態1では、ユーザによって指定された特徴点が、上述した「設定条件を満たす特徴点」に該当する。そして、特徴点抽出部14は、上述したように、対象物30上の位置が指定された画像以外の画像において、選択した特徴点に対応する特徴点を抽出する。 In the first embodiment, when a feature point is specified on an image in which a position on the object 30 is specified on the screen, the feature point extraction unit 14 selects the specified feature point. In the first embodiment, the feature point specified by the user corresponds to the "feature point that satisfies the set conditions" described above. Then, as described above, the feature point extraction unit 14 extracts feature points corresponding to the selected feature point in images other than the image in which a position on the object 30 is specified.
行列算出部15は、実施の形態1では、位置が指定された画像上で選択された特徴点と、他の画像から抽出された対応する特徴点と、の幾何学的関係を表現する、数値行列として、下記数1に示したFundamental行列(参照文献)を求める。 In embodiment 1, the matrix calculation unit 15 calculates the fundamental matrix (see reference) shown in equation 1 below as a numerical matrix that represents the geometric relationship between feature points selected on an image whose position is specified and corresponding feature points extracted from another image.
参照文献:Richard Hartleyand Andrew Zisserman, “Multiple View Geometry in Computer Vision Second Edition”, Cambridge University Press, March 2004. References: Richard Hartley and Andrew Zisserman, “Multiple View Geometry in Computer Vision Second Edition”, Cambridge University Press, March 2004.
3次元形状構築部16は、実施の形態1では、まず、行列算出部15によって算出された数値行列(Fundamental行列)を用いて、組合せ抽出部11で抽出された特徴点の組合せ(フィルタリング部18で除外されたものを除く)から、幾何学的関係が矛盾する特徴点の組合せを特定する。 In embodiment 1, the three-dimensional shape construction unit 16 first uses the numerical matrix (fundamental matrix) calculated by the matrix calculation unit 15 to identify combinations of feature points that have contradictory geometric relationships from the combinations of feature points extracted by the combination extraction unit 11 (excluding those excluded by the filtering unit 18).
図5を用いて、3次元形状構築部16による幾何学的関係が矛盾する特徴点の組合せの特定処理について具体的に説明する。図5は、幾何学的関係が矛盾する特徴点の組合せの特定処理を説明する図である。図5の例では、特徴点piと特徴点p’iとの組合せが、間違っているかどうかの判断対象となっている。 The process of identifying a combination of feature points having a contradictory geometric relationship performed by the three-dimensional shape constructing unit 16 will be specifically described with reference to Fig. 5. Fig. 5 is a diagram illustrating the process of identifying a combination of feature points having a contradictory geometric relationship. In the example of Fig. 5, the combination of feature point p i and feature point p' i is the subject of determination as to whether it is incorrect.
また、図5において、Eはエピポーラ面を示し、Oiは一方の画像のカメラの中心位置を示し、O’iは他方の画像のカメラの中心位置を示している。eiは一方の画像とエピポーラ面との交点を示し、e’iは他方の画像とエピポーラ面との交点を示している。更に、図5において、左右に示された並行四辺形はそれぞれ画像のフレームを示している。 In Fig. 5, E indicates the epipolar plane, Oi indicates the center position of the camera for one image, and O'i indicates the center position of the camera for the other image. ei indicates the intersection of one image with the epipolar plane, and e'i indicates the intersection of the other image with the epipolar plane. Furthermore, in Fig. 5, the parallelograms shown on the left and right each indicate the frame of an image.
また、図5においては、一方の画像における点Pは指定された位置を示す点(指定点)であり、他方の画像における点P’は指定点に対応する点(対応点)である。そして、指定点Pと交わるエピポーラ線を、エピポーラ線lnと定義し、対応点P’と交わるエピポーラ線を、エピポーラ線l’nと定義する。 5, point P in one image is a point indicating a specified position (specified point), and point P' in the other image is a point corresponding to the specified point (corresponding point). The epipolar line intersecting with specified point P is defined as epipolar line ln , and the epipolar line intersecting with corresponding point P' is defined as epipolar line l' n .
3次元形状構築部16は、エピポーラ線についての下記の数2に示す関係を用いて、特徴点piが存在しているエピポーラ線l1に対応するエピポーラ線l’1を算出する。数2において、Fは、数1に示したFundamental行列である。xは、エピポーラ線lの座標である。 The three-dimensional shape constructing unit 16 calculates the epipolar line l' 1 corresponding to the epipolar line l1 on which the feature point p i exists, using the relationship shown in the following equation 2 for the epipolar line. In equation 2, F is the fundamental matrix shown in equation 1. x is the coordinate of the epipolar line l.
そして、3次元形状構築部16は、算出したエピポーラ線l’1と特徴点p’iとの距離dが閾値以上となっているかどうかを判定し、距離dが閾値以上となっている場合は、特徴点piと特徴点p’iとの組合せは間違っていると判定する。この場合、3次元形状構築部16は、特徴点piと特徴点p’iとの組合せを、幾何学的関係が矛盾する特徴点の組合せとして特定する。 The three-dimensional shape construction unit 16 then determines whether the distance d between the calculated epipolar line l' 1 and the feature point p'i is equal to or greater than a threshold, and if the distance d is equal to or greater than the threshold, determines that the combination of feature point p i and feature point p'i is incorrect. In this case, the three-dimensional shape construction unit 16 identifies the combination of feature point p i and feature point p'i as a combination of feature points with a contradictory geometric relationship.
また、3次元形状構築部16は、幾何学的関係が矛盾する特徴点の組合せを特定すると、特定しなかった特徴点の組合せを用いて、3次元形状を構築するための3次元座標を算出する。 Furthermore, when the three-dimensional shape construction unit 16 identifies a combination of feature points with a contradictory geometric relationship, it calculates three-dimensional coordinates for constructing a three-dimensional shape using the combination of feature points that was not identified.
図6~図8を用いて、3次元形状構築部16による3次元座標の算出処理について具体的に説明する。図6は、特徴点の組合せが抽出されたペア画像の一例を示す図である。図7は、カメラ行列から求められる、初期ペア画像のカメラの3次元座標と回転行列との一例を示す図である。図8は、初期ペア画像の選択後に新たに選択された画像とそれから抽出された特徴点の組合せの一例を示す図である。 The calculation process of three-dimensional coordinates by the three-dimensional shape construction unit 16 will be described in detail using Figures 6 to 8. Figure 6 is a diagram showing an example of a pair of images from which combinations of feature points have been extracted. Figure 7 is a diagram showing an example of the three-dimensional coordinates and rotation matrix of the camera of the initial pair of images, calculated from the camera matrix. Figure 8 is a diagram showing an example of an image newly selected after the selection of the initial pair of images and a combination of feature points extracted from it.
図6示すように、3次元形状構築部16は、最初に、一組のペア画像(初期ペア画像)として画像51と画像52とを選択する。そして、この場合、画像51から抽出されている特徴点(m1~m5)と、画像52から抽出されている特徴点(m’1~m’5)とは対応している。m1とm’1、m2とm’2、m3とm’3、m4とm’4、m5とm’5は、それぞれ特徴点の組合せ(以下「特徴点ペア」とも表記する)である。また、図6の例では、画像51はカメラ41によって撮影され、画像52はカメラ42によって撮影されている。図6において、M(M1~M5)は、各特徴点に対応する対象物30上の3次元座標である。 As shown in FIG. 6 , the 3D shape constructing unit 16 first selects images 51 and 52 as a set of paired images (initial paired images). In this case, feature points (m 1 to m 5 ) extracted from image 51 correspond to feature points (m' 1 to m' 5 ) extracted from image 52. m 1 and m' 1 , m 2 and m' 2 , m 3 and m' 3 , m 4 and m' 4 , and m 5 and m' 5 are combinations of feature points (hereinafter also referred to as "feature point pairs"). In the example of FIG. 6 , image 51 is captured by camera 41, and image 52 is captured by camera 42. In FIG. 6 , M (M 1 to M 5 ) are the 3D coordinates on the object 30 corresponding to each feature point.
続いて、3次元形状構築部16は、初期ペア画像それぞれから抽出された特徴点ペア(m1~m5、m’1~m’5)を用いて、画像51を撮影したカメラ41のカメラ行列Qと、画像52を撮影したカメラ42のカメラ行列Q’とを算出する。また、カメラ行列Q及びカメラ行列Q’は、カメラ41の位置を原点とすると、それぞれ下記の数3及び数4によって表すことができる。 Next, the three-dimensional shape constructing unit 16 calculates the camera matrix Q of the camera 41 that captured the image 51 and the camera matrix Q' of the camera 42 that captured the image 52, using the feature point pairs (m 1 to m 5 , m' 1 to m' 5 ) extracted from each of the initial pair images. Furthermore, when the position of the camera 41 is taken as the origin, the camera matrix Q and the camera matrix Q' can be expressed by the following equations 3 and 4, respectively.
上記数3において、Iは、カメラ41の回転行列である。図7に示すように、カメラ41の位置が原点となるので、I=(1,1,1)となる。また、上記数4において、Rは、カメラ42の回転行列である(R=(Rx,Ry,Rz))。tは、並進行列であり、カメラ42の位置の3次元座標に相当する(t=(tx,ty,tz))。 In the above equation 3, I is the rotation matrix of the camera 41. As shown in Fig. 7, the position of the camera 41 is the origin, so I = (1, 1, 1). Also, in the above equation 4, R is the rotation matrix of the camera 42 (R = ( Rx , Ry , Rz )). t is the translation matrix, which corresponds to the three-dimensional coordinates of the position of the camera 42 (t = ( tx , ty , tz )).
従って、この場合は、カメラ行列Q及びカメラ行列Q’から逆算することによって、回転行列Rと並進行列tとを算出することが出来る。具体的には、3次元形状構築部16は、各特徴点の座標を用いて、下記の数5~数7に示す方程式を解くことによって、回転行列Rと並進行列tとを算出する。数5~数7において、mハットは、m(m1~m5)を正規化して得られた画像51上の座標である。同様に、m’ハットは、m’(m’1~m’5)を正規化して得られた画像52上の座標である。Eは、Essential行列、Kはカメラのキャリブレーション行列である。 Therefore, in this case, the rotation matrix R and the translation matrix t can be calculated by performing inverse calculations from the camera matrix Q and the camera matrix Q'. Specifically, the three-dimensional shape constructor 16 calculates the rotation matrix R and the translation matrix t by solving the equations shown in the following equations 5 to 7 using the coordinates of each feature point. In equations 5 to 7, m is the coordinate on image 51 obtained by normalizing m (m 1 to m 5 ). Similarly, m' is the coordinate on image 52 obtained by normalizing m'(m' 1 to m' 5 ). E is the essential matrix, and K is the camera calibration matrix.
また、キャリブレーション行列Kは、下記の数8及び数9から求めることができる。なお、cx、cyは、カメラの中心座標である。 The calibration matrix K can be calculated from the following equations 8 and 9. Note that c x and c y are the center coordinates of the camera.
次に、3次元形状構築部16は、各カメラの位置の3次元座標と回転行列とを用いて、抽出された特徴点の3次元座標M(M1~M5)を算出する。具体的には、3次元形状構築部16は、下記の数10を解くことで3次元座標Mを算出する。また、数10における行列Aは、数11で示される。数11において、qiTは、カメラ行列Qの行であり、q’iTは、カメラ行列Q’の行である。 Next, the three-dimensional shape construction unit 16 calculates the three-dimensional coordinates M (M 1 to M 5 ) of the extracted feature points using the three-dimensional coordinates of the positions of each camera and the rotation matrix. Specifically, the three-dimensional shape construction unit 16 calculates the three-dimensional coordinates M by solving the following equation 10. Furthermore, the matrix A in equation 10 is expressed by equation 11. In equation 11, q iT is a row of the camera matrix Q, and q' iT is a row of the camera matrix Q'.
次に、図8に示すように、3次元形状構築部16は、特徴点が抽出されている画像であって、初期ペア画像以外の画像の中から、1つの画像53を新たに選択し、新たに選択した画像53と初期ペア画像の1つとを新たなペア画像とする。画像53は、カメラ43によって撮影されている。 Next, as shown in FIG. 8, the three-dimensional shape construction unit 16 newly selects one image 53 from among the images from which feature points have been extracted, other than the initial pair of images, and creates a new pair of images consisting of the newly selected image 53 and one of the initial pair of images. Image 53 was captured by camera 43.
そして、3次元形状構築部16は、画像52の特徴点に対応する画像53の特徴点(m’’1~m’’3)を特定し、画像52の特徴点と画像53との特徴点とを特徴点ペアとする。そして、3次元形状構築部16は、画像53を撮影したカメラ43のカメラ行列Qnを算出する。カメラ行列Qnは、下記の数12によって表すことができる。 Then, the three-dimensional shape construction unit 16 identifies feature points (m'' 1 to m'' 3 ) of image 53 that correspond to the feature points of image 52, and sets the feature points of image 52 and the feature points of image 53 as feature point pairs. Then, the three-dimensional shape construction unit 16 calculates a camera matrix Qn of the camera 43 that captured image 53. The camera matrix Qn can be expressed by the following equation 12.
具体的には、3次元形状構築部16は、画像53の特定された特徴点を用いて、下記の数13に示す方程式を解くことによって、カメラ43のカメラ行列QnのRn及びtnを算出する。 Specifically, the 3D shape construction unit 16 calculates Rn and tn of the camera matrix Qn of the camera 43 by solving the equation shown in Equation 13 below using the identified feature points of the image 53.
数13において、Miは、新たに選択された画像53における画像52と共通する特徴点の3次元座標である。miハットは、新たに選択された画像53における特徴点の正規化された座標である。diは、下記の数14に示すように、画像53を撮影したカメラ43とmiハットとの距離を示している。 In Expression 13, M i is the three-dimensional coordinate of a feature point in newly selected image 53 that is common to image 52. M i is the normalized coordinate of the feature point in newly selected image 53. d i indicates the distance between camera 43 that captured image 53 and M i as shown in Expression 14 below.
次に、3次元形状構築部16は、算出したカメラ43のカメラ行列QnのQn及びtnを用いて、画像53の特定された特徴点(m’’1~m’’3)の3次元座標Miを算出する。この場合も、3次元形状構築部16は、上記数10を解くことで、特徴点の3次元座標M(M1~M3)を算出する。以上の処理により、3次元形状構築部16は、対象物の3次元座標を算出することができる。 Next, the three-dimensional shape construction unit 16 calculates the three-dimensional coordinates M i of the identified feature points (m'' 1 to m'' 3 ) of the image 53 using Qn and tn of the calculated camera matrix Qn of the camera 43. In this case as well, the three-dimensional shape construction unit 16 calculates the three-dimensional coordinates M (M 1 to M 3 ) of the feature points by solving the above equation 10. Through the above processing, the three-dimensional shape construction unit 16 can calculate the three-dimensional coordinates of the object.
また、実施の形態1では、3次元形状構築部16は、3次元座標が算出された特徴点が適正かどうかを、再投影誤差を用いて判定することができる。具体的には、3次元形状構築部16は、特徴点の組合せの一つについて、それから得られる3次元座標と、抽出元の画像に対応するカメラ行列とを用いて、元の画像上に再投影を行い、投影された位置の2次元座標と、抽出時の位置の2次元座標とを比較する。そして、3次元形状構築部16は、実施の形態1では、比較結果として、前者の2次元座標と後者の2次元座標との差分(再投影誤差)を算出し、算出した再投影誤差が閾値以下の場合に、対象となった特徴点が適正であると判定する。一方、3次元形状構築部16は、算出した再投影誤差が閾値を越える場合は、対象となった特徴点が適正でないと判定する。 Furthermore, in embodiment 1, the three-dimensional shape construction unit 16 can use the reprojection error to determine whether a feature point whose three-dimensional coordinates have been calculated is appropriate. Specifically, for one combination of feature points, the three-dimensional shape construction unit 16 reprojects the three-dimensional coordinates obtained from the combination onto the original image using the camera matrix corresponding to the image from which the feature points were extracted, and compares the two-dimensional coordinates of the projected position with the two-dimensional coordinates of the position at the time of extraction. In embodiment 1, the three-dimensional shape construction unit 16 then calculates the difference (reprojection error) between the former two-dimensional coordinates and the latter two-dimensional coordinates as the comparison result, and determines that the target feature point is appropriate if the calculated reprojection error is equal to or less than a threshold. On the other hand, the three-dimensional shape construction unit 16 determines that the target feature point is inappropriate if the calculated reprojection error exceeds the threshold.
また、実施の形態1では、3次元形状構築部16は、3次元座標が算出された特徴点の組合せ毎に、この組合せを構成する特徴点の全部又は1部を選択し、選択した特徴点について1つずつ適正かどうかを判定することもできる。例えば、特徴点の組合せが3つの特徴点で構成されている場合は、3次元形状構築部16は、3つの特徴点について1つずつ適正かどうかを判定しても良いし、このうち2つのみを選択し、選択した2つの特徴点について1つずつ適正かどうかを判定しても良い。 In addition, in embodiment 1, for each combination of feature points for which three-dimensional coordinates have been calculated, the three-dimensional shape construction unit 16 can select all or some of the feature points that make up this combination and determine whether each of the selected feature points is appropriate. For example, if a combination of feature points is made up of three feature points, the three-dimensional shape construction unit 16 can determine whether each of the three feature points is appropriate, or can select only two of the feature points and determine whether each of the two selected feature points is appropriate.
図9を用いて、3次元形状構築部16による特徴点の適性の判定処理について具体的に説明する。図9は、対象物における特徴点の再投影誤差の算出処理を説明する図である。また、図9の例では、図6に示した画像52上の特徴点の一つを再投影する例について示している。更に、図9において、特徴点に対応する3次元座標、即ち、世界座標系での3次元座標を(XW,YW,ZW)とし、特徴点の抽出時の位置の2次元座標を(xf,yf)とする。また、特徴点のカメラ座標系での座標を(XC,YC,ZC)とする。 The process of determining the suitability of feature points by the three-dimensional shape construction unit 16 will be specifically described using Fig. 9. Fig. 9 is a diagram illustrating the process of calculating the reprojection error of feature points in an object. The example of Fig. 9 shows an example of reprojecting one of the feature points on the image 52 shown in Fig. 6. Furthermore, in Fig. 9, the three-dimensional coordinates corresponding to the feature point, i.e., the three-dimensional coordinates in the world coordinate system, are defined as ( Xw , Yw , Zw ), and the two-dimensional coordinates of the position at the time of extraction of the feature point are defined as ( xf , yf ). Furthermore, the coordinates of the feature point in the camera coordinate system are defined as ( Xc , Yc , Zc ).
まず、3次元形状構築部16は、下記の数15を用いて、カメラ行列Q’(=[R|t])と特徴点の3次元座標(XW,YW,ZW)とから、特徴点のカメラ座標系での座標(XC,YC,ZC)を算出する。 First, the three-dimensional shape construction unit 16 calculates the coordinates ( XC , YC , ZC ) of the feature points in the camera coordinate system from the camera matrix Q' (=[R|t]) and the three-dimensional coordinates ( XW , YW , ZW ) of the feature points using the following equation 15.
続いて、3次元形状構築部16は、下記の数16を用いて、特徴点のカメラ座標系での座標(XC,YC,ZC)を正規化する。 Next, the three-dimensional shape constructing unit 16 normalizes the coordinates ( Xc , Yc , Zc ) of the feature points in the camera coordinate system using the following equation (16).
続いて、3次元形状構築部16は、上記数16で正規化された座標と、カメラの内部パラメータ(図9の例では、カメラ42の焦点距離f、画像中心位置の座標(cx,cy)とを、下記の数17に適用して、特徴点を画像52に再投影した時の2次元座標(xp,yp)を算出する。 Next, the three-dimensional shape construction unit 16 applies the coordinates normalized by the above equation 16 and the internal parameters of the camera (in the example of FIG. 9, the focal length f of the camera 42 and the coordinates (c x , c y ) of the image center position) to the following equation 17, and calculates the two-dimensional coordinates (x p , y p ) when the feature points are reprojected onto the image 52.
次に、3次元形状構築部16は、下記の数18を用いて、上記数17から算出した再投影後の2次元座標(xp,yp)と特徴点の抽出時の位置の2次元座標(xf,yf)との差分dfを算出する。 Next, the three-dimensional shape construction unit 16 uses the following equation 18 to calculate the difference df between the two-dimensional coordinates ( xp , yp ) after reprojection calculated from the above equation 17 and the two-dimensional coordinates ( xf , yf ) of the position at the time of extraction of the feature point.
その後、3次元形状構築部16は、算出した差分dfが閾値G以下の場合に、対象となった特徴点が適正であると判定し、算出した差分dfが閾値Gを越える場合は、対象となった特徴点が適正でないと判定する。 Then, if the calculated difference df is equal to or less than the threshold value G, the three-dimensional shape construction unit 16 determines that the target feature point is appropriate; if the calculated difference df exceeds the threshold value G, it determines that the target feature point is inappropriate.
判定後、3次元形状構築部16は、適正でないと判定された特徴点に対応する3次元座標、及び、この3次元座標に対応する全ての特徴点を除外する。また、3次元形状構築部16は、実施の形態1では、適正でないと判定された特徴点のみを除外し、適正でないと判定された特徴点に対応する3次元座標、及び、この3次元座標に対応する特徴点の組み合わせのうち、適正でないと判定された特徴点以外の特徴点は除外しないことも可能である。但し、この場合は、3次元形状構築部16は、全ての特徴点の適合性判定が完了したときに、全ての3次元座標に対して、それぞれの3次元座標に対応する特徴点の数が2個未満の3次元座標は除外する。 After the judgment, the three-dimensional shape construction unit 16 excludes the three-dimensional coordinates corresponding to the feature points judged to be inappropriate, and all feature points corresponding to these three-dimensional coordinates. In embodiment 1, the three-dimensional shape construction unit 16 can also exclude only the feature points judged to be inappropriate, and not exclude the three-dimensional coordinates corresponding to the feature points judged to be inappropriate, or any feature points among the combinations of feature points corresponding to these three-dimensional coordinates other than those judged to be inappropriate. However, in this case, when the three-dimensional shape construction unit 16 has completed the judgment of suitability for all feature points, it excludes all three-dimensional coordinates that have fewer than two feature points corresponding to each of the three-dimensional coordinates.
そして、3次元形状構築部16は、残りの特徴点を用いて、3次元座標を再計算し、最終的に得られた各特徴点の3次元座標によって、対象物の点群データを構築し、これを対象物の3次元形状とする。 Then, the 3D shape construction unit 16 recalculates the 3D coordinates using the remaining feature points, and constructs point cloud data of the object using the 3D coordinates of each feature point finally obtained, which is used as the 3D shape of the object.
また、上述の例では、3次元形状構築部16は、特徴点の組合せを用いて、再度、ゼロから3次元形状を構築しているが、実施の形態は当該例に限定されることはない。例えば、3次元形状構築部16は、行列算出部15が算出した数値行列を用いたバンドル調整を行うことによって、仮の3次元形状を構成する各特徴点の座標を調整することによって、最終的な3次元形状を構築することもできる。なお、この態様においても、実質的に、特徴点間の幾何学的関係が矛盾する特徴点の組合せについて、特定及び除外が行われている。 In addition, in the above example, the three-dimensional shape construction unit 16 constructs a three-dimensional shape from scratch again using a combination of feature points, but the embodiment is not limited to this example. For example, the three-dimensional shape construction unit 16 can also construct a final three-dimensional shape by adjusting the coordinates of each feature point that constitutes the provisional three-dimensional shape by performing bundle adjustment using the numerical matrix calculated by the matrix calculation unit 15. Note that even in this mode, combinations of feature points that have contradictory geometric relationships between them are essentially identified and excluded.
[装置動作]
次に、実施の形態1における画像処理装置10の動作について図10を用いて説明する。図10は、実施の形態1における画像処理装置の動作を示すフロー図である。以下の説明においては、適宜図1~図9を参照する。また、実施の形態1では、画像処理装置10を動作させることによって、画像処理方法が実施される。よって、実施の形態1における画像処理方法の説明は、以下の画像処理装置10の動作説明に代える。
[Device operation]
Next, the operation of the image processing device 10 in embodiment 1 will be described with reference to FIG. 10. FIG. 10 is a flow diagram showing the operation of the image processing device in embodiment 1. In the following description, reference will be made to FIGS. 1 to 9 as appropriate. In embodiment 1, an image processing method is implemented by operating the image processing device 10. Therefore, the description of the image processing method in embodiment 1 will be replaced by the following description of the operation of the image processing device 10.
図10に示すように、最初に、画像取得部17は、外部の装置から、対象物の複数の画像データを取得する(ステップA1)。また、ステップA1が実行されると、表示部20は、取得された各画像データの画像を表示装置21の表示画面に表示させる。 As shown in FIG. 10, first, the image acquisition unit 17 acquires multiple image data of an object from an external device (step A1). Furthermore, when step A1 is executed, the display unit 20 displays images of each acquired image data on the display screen of the display device 21.
次に、組合せ抽出部11は、ステップA1で取得された画像データ毎に、画像から特徴点を特定し、更に、画像間で対応する特徴点同士を、対応する特徴点の組合せとして抽出する(ステップA2)。 Next, the combination extraction unit 11 identifies feature points from the image for each image data acquired in step A1, and further extracts corresponding feature points between the images as combinations of corresponding feature points (step A2).
次に、フィルタリング部18は、ステップA2で抽出された特徴点の組合せ毎に、特徴点間の幾何学的な関係を計算し、計算結果に基づいて、誤った特徴点の組合せを特定し、特定した特徴点の組合せを排除する(ステップA3)。 Next, the filtering unit 18 calculates the geometric relationship between the feature points for each combination of feature points extracted in step A2, identifies incorrect combinations of feature points based on the calculation results, and eliminates the identified combinations of feature points (step A3).
次に、仮3次元形状構築部12は、ステップA3の処理後の特徴点の組合せを用いて、仮の3次元座標を算出し、算出された仮の3次元座標を用いて、特徴点の点群で構成された対象物の仮の3次元形状を構築する(ステップA4)。 Next, the temporary 3D shape construction unit 12 calculates temporary 3D coordinates using the combination of feature points after processing in step A3, and constructs a temporary 3D shape of the object composed of a point group of feature points using the calculated temporary 3D coordinates (step A4).
次に、表示装置21の画面上に表示されている画像上で、ユーザが対象物の位置を指定すると、入力受付部19は、位置の指定を受け付ける(ステップA5)。 Next, when the user specifies the position of the object on the image displayed on the screen of the display device 21, the input acceptance unit 19 accepts the position specification (step A5).
次に、特徴点特定部13は、ステップA5で受け付けられた位置に対応する特徴点を特定し、更に、位置が指定された画像以外の画像において、先に特定した特徴点に対応する特徴点も特定する(ステップA6)。更に、特徴点特定部13は、表示部20を介して、特定した特徴点を、表示装置21の表示画面に表示させる(ステップA7)。 Next, the feature point identification unit 13 identifies feature points corresponding to the positions accepted in step A5, and further identifies feature points corresponding to the previously identified feature points in images other than the image in which the positions are specified (step A6). Furthermore, the feature point identification unit 13 displays the identified feature points on the display screen of the display device 21 via the display unit 20 (step A7).
次に、特徴点抽出部14は、表示装置21の画面において、位置が指定された画像上で、いずれかの特徴点が指定されると、指定された特徴点を選択し、更に、他の画像上で、選択した特徴点に対応する特徴点を抽出する(ステップA8)。 Next, when a feature point is specified on the image whose position is specified on the screen of the display device 21, the feature point extraction unit 14 selects the specified feature point and further extracts feature points corresponding to the selected feature point on other images (step A8).
次に、行列算出部15は、位置が指定された画像上で選択された特徴点と、他の画像から抽出された特徴点と、の幾何学的関係を表現する、数値行列を算出する(ステップA9)。 Next, the matrix calculation unit 15 calculates a numerical matrix that represents the geometric relationship between the feature points selected on the image whose position is specified and the feature points extracted from other images (step A9).
次に、3次元形状構築部16は、ステップA9で算出された数値行列を用いて、ステップA3の処理後の特徴点の組合せの中から、幾何学的関係が矛盾する特徴点の組合せを特定する(ステップA10)。 Next, the 3D shape construction unit 16 uses the numerical matrix calculated in step A9 to identify combinations of feature points that have contradictory geometric relationships from among the combinations of feature points after processing in step A3 (step A10).
次に、3次元形状構築部16は、ステップA10で特定しなかった特徴点の組合せを用いて、3次元形状を構築するための3次元座標を算出する(ステップA11)。 Next, the three-dimensional shape construction unit 16 calculates three-dimensional coordinates for constructing a three-dimensional shape using combinations of feature points not identified in step A10 (step A11).
次に、3次元形状構築部16は、ステップA11で3次元座標が算出された特徴点の適性を判定し、更に、適正でない特徴点を排除し、適正な特徴点を用いて3次元座標を再計算する。そして、3次元形状構築部16は、最終的に得られた各特徴点の3次元座標によって、対象物の点群データを構築し、これを対象物の3次元形状とする(ステップA12)。 Next, the 3D shape construction unit 16 determines the suitability of the feature points whose 3D coordinates were calculated in step A11, and then eliminates inappropriate feature points and recalculates the 3D coordinates using appropriate feature points. The 3D shape construction unit 16 then constructs point cloud data of the object using the 3D coordinates of each feature point finally obtained, and uses this as the 3D shape of the object (step A12).
その後、表示部20は、ステップA12で構築された3次元形状を、2次元の画像として表示装置21の画面上に表示させる(ステップA13)。 Then, the display unit 20 displays the three-dimensional shape constructed in step A12 as a two-dimensional image on the screen of the display device 21 (step A13).
[実施の形態1における効果]
以上のように、実施の形態1によれば、ユーザは、画像上で、位置を指定するだけで、画像中の特徴点を確認でき、任意の特徴点を指定できる。そして、特徴点が指定されると、指定された特徴点とそれに対応する特徴点との幾何学的関係に基づいて、対象物の3次元形状が再構築される。この結果、3次元形状の精度の向上が図られることになる。また、ユーザは、画像上の点又は線分を厳密に指定する必要はなく、画像上の大体の位置を指定するだけで良いため、従来に比べて、ユーザの負担が軽減される。
[Effects of the First Embodiment]
As described above, according to the first embodiment, a user can check feature points in an image and specify any feature point simply by specifying a position on the image. Once a feature point is specified, the three-dimensional shape of the object is reconstructed based on the geometric relationship between the specified feature point and its corresponding feature point. As a result, the accuracy of the three-dimensional shape is improved. Furthermore, the user does not need to precisely specify a point or line segment on the image, but only needs to specify a general position on the image, which reduces the burden on the user compared to conventional methods.
[プログラム]
実施の形態1におけるプログラムは、コンピュータに、図10に示すステップA1~A13を実行させるプログラムであれば良い。このプログラムをコンピュータにインストールし、実行することによって、実施の形態1における画像処理装置と画像処理方法とを実現することができる。この場合、コンピュータのプロセッサは、組合せ抽出部11、仮3次元形状構築部12、特徴点特定部13、特徴点抽出部14、行列算出部15、3次元形状構築部16、画像取得部17、フィルタリング部18、入力受付部19、及び表示部20として機能し、処理を行なう。コンピュータとしては、汎用のPCの他に、スマートフォン、タブレット型端末装置が挙げられる。
[program]
The program in the first embodiment may be a program that causes a computer to execute steps A1 to A13 shown in Fig. 10. By installing and executing this program on a computer, the image processing device and image processing method in the first embodiment can be realized. In this case, the processor of the computer functions as a combination extraction unit 11, a temporary 3D shape construction unit 12, a feature point identification unit 13, a feature point extraction unit 14, a matrix calculation unit 15, a 3D shape construction unit 16, an image acquisition unit 17, a filtering unit 18, an input acceptance unit 19, and a display unit 20 to perform processing. Examples of the computer include a general-purpose PC, a smartphone, and a tablet terminal device.
また、実施の形態1におけるプログラムは、複数のコンピュータによって構築されたコンピュータシステムによって実行されても良い。この場合は、例えば、各コンピュータが、それぞれ、組合せ抽出部11、仮3次元形状構築部12、特徴点特定部13、特徴点抽出部14、行列算出部15、3次元形状構築部16、画像取得部17、フィルタリング部18、入力受付部19、及び表示部20のいずれかとして機能しても良い。 The program in embodiment 1 may also be executed by a computer system constructed by multiple computers. In this case, for example, each computer may function as one of the combination extraction unit 11, temporary 3D shape construction unit 12, feature point identification unit 13, feature point extraction unit 14, matrix calculation unit 15, 3D shape construction unit 16, image acquisition unit 17, filtering unit 18, input acceptance unit 19, and display unit 20.
(実施形態2)
以下、実施の形態2における画像処理装置について、図11及び図12を参照しながら説明する。
(Embodiment 2)
The image processing device according to the second embodiment will be described below with reference to FIGS.
[装置構成]
最初に、実施の形態2における画像処理装置の構成について説明する。実施の形態2における画像処理装置は、図2に示した実施の形態1における画像処理装置10と同様の構成を有している。このため、以下の説明では、適宜図2~図9を参照する。
[Device configuration]
First, a description will be given of the configuration of the image processing device in embodiment 2. The image processing device in embodiment 2 has the same configuration as the image processing device 10 in embodiment 1 shown in Fig. 2. Therefore, in the following description, Figs. 2 to 9 will be referred to as appropriate.
但し、実施の形態2における画像処理装置は、特徴点特定部13の機能の点で、実施の形態1における画像処理装置と異なっている。以下に、実施の形態1との相違点を、図11を用いて説明する。図11は、実施の形態2における画像処理装置の機能を説明するための説明図である。 However, the image processing device in embodiment 2 differs from the image processing device in embodiment 1 in terms of the functionality of the feature point identification unit 13. The differences from embodiment 1 are explained below using Figure 11. Figure 11 is an explanatory diagram for explaining the functionality of the image processing device in embodiment 2.
実施の形態2においても、特徴点特定部13は、実施の形態1と同様に、1つの画像上で、指定された位置に応じた特徴点を特定し、更に、位置が指定されていない別の前記画像において、この特徴点に対応する特徴点を特定する。 In the second embodiment, as in the first embodiment, the feature point identification unit 13 identifies a feature point corresponding to a specified position on one image, and then identifies a feature point corresponding to this feature point on another image where a position is not specified.
但し、実施の形態2では、特徴点特定部13は、各画像上で特徴点を特定すると、特定した特徴点それぞれ毎に、仮の3次元形状を用いて3次元座標を算出する。更に、特徴点特定部13は、特定した特徴点それぞれ毎に、算出した3次元座標と、それぞれが特定された画像上での2次元座標と、それぞれが特定された画像のカメラパラメータと、を用いて、算出した3次元座標についての指標を算出する。指標は、算出した3次元座標と対象物30の対応する位置における実際の3次元座標との誤差を示すものである。 However, in embodiment 2, when the feature point identification unit 13 identifies feature points on each image, it calculates three-dimensional coordinates for each identified feature point using a virtual three-dimensional shape. Furthermore, for each identified feature point, the feature point identification unit 13 calculates an index for the calculated three-dimensional coordinates using the calculated three-dimensional coordinates, the two-dimensional coordinates on the image in which each feature point was identified, and the camera parameters of the image in which each feature point was identified. The index indicates the error between the calculated three-dimensional coordinates and the actual three-dimensional coordinates at the corresponding position on the object 30.
ここで、指標の具体例について説明する。指標の具体例としては、再投影誤差、及びエピポーラ誤差等が挙げられる。 Here, we will explain some specific examples of indices. Specific examples of indices include reprojection error and epipolar error.
まず、指標として再投影誤差が用いられる場合について説明する。この場合、特徴点特定部13は、3次元座標と、特定元の画像のカメラパラメータ(カメラ行列)とを用いて、特徴点を、特定元の画像上に再投影し、再投影後の2次元座標と、特定時の2次元座標と、の差分を、再投影誤差として算出する。具体的には、特徴点特定部13は、図10に示したように、特定した特徴点それぞれ毎に、上述した数15~数18を用いて、差分dfを算出する。 First, we will explain the case where reprojection error is used as the index. In this case, the feature point identification unit 13 reprojects the feature points onto the original image using the three-dimensional coordinates and the camera parameters (camera matrix) of the original image, and calculates the difference between the two-dimensional coordinates after reprojection and the two-dimensional coordinates at the time of identification as the reprojection error. Specifically, as shown in Figure 10, the feature point identification unit 13 calculates the difference df for each identified feature point using the above-mentioned equations 15 to 18.
続いて、指標としてエピポーラ誤差が用いられる場合について説明する。この場合、特徴点特定部13は、図5で示したように、特定した特徴点それぞれ毎に、各特徴点が存在する画像上で、上記数1を用いて、対応する特徴点が存在しているエピポーラ線に対応したエピポーラ線を求める。そして、特徴点特定部13は、特定した特徴点それぞれ毎に、各特徴点とそのエピポーラ線との距離dを算出し、算出した距離dをエピポーラ誤差とする。 Next, we will explain the case where epipolar error is used as an index. In this case, as shown in Figure 5, for each identified feature point, the feature point identification unit 13 uses Equation 1 above to find an epipolar line on the image where the corresponding feature point is located that corresponds to the epipolar line on which the corresponding feature point is located. Then, for each identified feature point, the feature point identification unit 13 calculates the distance d between the feature point and the epipolar line, and sets the calculated distance d as the epipolar error.
そして、特徴点特定部13は、特定した特徴点に加えて、算出した指標についても提示する。この場合、図11に示すように、特徴点特定部13は、算出した指標の値に応じて変化するアイコンによって、指標の提示を行うこともできる。図11の例では、特徴点の箇所に、アイコン33が表示されている。特徴点特定部13は、指標が示す誤差の大きさに応じて、アイコン33の大きさを設定し、設定した大きさのアイコン33を、表示部20を介して表示装置21の表示画面に表示させる。 The feature point identification unit 13 then presents the calculated index in addition to the identified feature points. In this case, as shown in FIG. 11, the feature point identification unit 13 can also present the index using an icon that changes depending on the value of the calculated index. In the example of FIG. 11, an icon 33 is displayed at the location of the feature point. The feature point identification unit 13 sets the size of the icon 33 depending on the magnitude of the error indicated by the index, and displays the icon 33 of the set size on the display screen of the display device 21 via the display unit 20.
ユーザは、実施の形態1と同様に、図11に示すように、指定した位置の周辺の特徴点がアイコン33によって表示されると、入力装置を用いて、位置を指定した画像上において、いずれかの特徴点を指定する。 As in embodiment 1, when feature points around the specified position are displayed as icons 33 as shown in Figure 11, the user uses the input device to specify one of the feature points on the image where the position was specified.
但し、実施の形態2においては、特徴点における指標がアイコン33の大きさによって示されているので、ユーザは、全ての画像において、アイコン33が小さくなるように、特徴点を指定することができる。この場合、特徴点抽出部14によって選択及び抽出される特徴点は、再投影誤差又はエピポーラ誤差が小さい特徴点である。従って、行列算出部15によって算出される数値行列は正確なものとなり、結果、対象物の3次元形状の精度が向上することになる。 However, in embodiment 2, the index at the feature point is indicated by the size of the icon 33, so the user can specify the feature point so that the icon 33 becomes smaller in all images. In this case, the feature points selected and extracted by the feature point extraction unit 14 are feature points with small reprojection error or epipolar error. Therefore, the numerical matrix calculated by the matrix calculation unit 15 is accurate, resulting in improved accuracy of the three-dimensional shape of the object.
また、実施の形態2において、アイコンの変化は、大きさの変化に限定されない。アイコンの変化は、色(色彩、濃淡等)の変化、形状の変化等であっても良い。具体的には、特徴点における指標は、アイコン33の色の変化(誤差大:赤、誤差中:黄、誤差小:青等)によって示されていても良いし、アイコン33の形状の変化(誤差大:×、誤差中:△、誤差小:○等)によって示されていても良い。なお、誤差大、誤差中、誤差小の範囲は予め閾値によって適宜設定される。 Furthermore, in embodiment 2, the change in the icon is not limited to a change in size. The change in the icon may also be a change in color (hue, shade, etc.), a change in shape, etc. Specifically, the indicator at the feature point may be indicated by a change in the color of the icon 33 (large error: red, medium error: yellow, small error: blue, etc.) or by a change in the shape of the icon 33 (large error: x, medium error: △, small error: ○, etc.). The ranges for large error, medium error, and small error are set appropriately in advance using thresholds.
[装置動作]
次に、実施の形態2における画像処理装置の動作について図12を用いて説明する。図12は、実施の形態2における画像処理装置の動作を示すフロー図である。以下の説明においては、適宜図1~図9及び図11を参照する。また、実施の形態2でも、画像処理装置を動作させることによって、画像処理方法が実施される。よって、実施の形態2における画像処理方法の説明は、以下の画像処理装置の動作説明に代える。
[Device operation]
Next, the operation of the image processing device in embodiment 2 will be described with reference to FIG. 12. FIG. 12 is a flow diagram showing the operation of the image processing device in embodiment 2. In the following description, reference will be made to FIGS. 1 to 9 and 11 as appropriate. Also in embodiment 2, the image processing method is implemented by operating the image processing device. Therefore, the description of the image processing method in embodiment 2 will be replaced by the description of the operation of the image processing device below.
図12に示すように、最初に、画像取得部17は、外部の装置から、対象物の複数の画像データを取得する(ステップB1)。ステップB1は、図10に示したステップA1と同様のステップである。ステップB1が実行されると、表示部20は、取得された各画像データの画像を表示装置21の表示画面に表示させる。 As shown in FIG. 12, first, the image acquisition unit 17 acquires multiple image data of an object from an external device (step B1). Step B1 is the same as step A1 shown in FIG. 10. When step B1 is executed, the display unit 20 displays images of each acquired image data on the display screen of the display device 21.
次に、組合せ抽出部11は、ステップB1で取得された画像データ毎に、画像から特徴点を特定し、更に、画像間で対応する特徴点同士を、対応する特徴点の組合せとして抽出する(ステップB2)。ステップB2は、図10に示したステップA2と同様のステップである。 Next, the combination extraction unit 11 identifies feature points from the image for each image data acquired in step B1, and further extracts corresponding feature points between the images as combinations of corresponding feature points (step B2). Step B2 is the same as step A2 shown in Figure 10.
次に、フィルタリング部18は、ステップB2で抽出された特徴点の組合せ毎に、特徴点間の幾何学的な関係を計算し、計算結果に基づいて、誤った特徴点の組合せを特定し、特定した特徴点の組合せを排除する(ステップB3)。ステップB3は、図10に示したステップA3と同様のステップである。 Next, the filtering unit 18 calculates the geometric relationship between the feature points for each combination of feature points extracted in step B2, identifies incorrect combinations of feature points based on the calculation results, and eliminates the identified combinations of feature points (step B3). Step B3 is the same as step A3 shown in Figure 10.
次に、仮3次元形状構築部12は、ステップB3の処理後の特徴点の組合せを用いて、仮の3次元座標を算出し、算出された仮の3次元座標を用いて、特徴点の点群で構成された対象物の仮の3次元形状を構築する(ステップB4)。ステップB4は、図10に示したステップA4と同様のステップである。 Next, the temporary 3D shape construction unit 12 calculates temporary 3D coordinates using the combination of feature points after processing in step B3, and constructs a temporary 3D shape of the object composed of a point group of feature points using the calculated temporary 3D coordinates (step B4). Step B4 is the same step as step A4 shown in Figure 10.
次に、表示装置21の画面上に表示されている画像上で、ユーザが対象物の位置を指定すると、入力受付部19は、位置の指定を受け付ける(ステップB5)。ステップB5は、図10に示したステップA5と同様のステップである。 Next, when the user specifies the position of the object on the image displayed on the screen of the display device 21, the input accepting unit 19 accepts the position specification (step B5). Step B5 is the same as step A5 shown in FIG. 10.
次に、特徴点特定部13は、ステップB5で受け付けられた位置に対応する特徴点を特定し、更に、位置が指定された画像以外の画像において、先に特定した特徴点に対応する特徴点も特定する(ステップB6)。ステップB6は、図10に示したステップA6と同様のステップである。 Next, the feature point identification unit 13 identifies feature points corresponding to the positions accepted in step B5, and further identifies feature points corresponding to the previously identified feature points in images other than the image in which the positions are specified (step B6). Step B6 is the same as step A6 shown in Figure 10.
次に、特徴点特定部13は、特徴点毎に指標を算出し、算出した値に応じてアイコン33の大きさを設定する。そして、特徴点特定部13は、表示部20を介して、大きさが設定されたアイコンを、特定した特徴点として、表示装置21の表示画面に表示させる(ステップB7)。 Next, the feature point identification unit 13 calculates an index for each feature point and sets the size of the icon 33 according to the calculated value. The feature point identification unit 13 then displays the icon with the set size on the display screen of the display device 21 via the display unit 20 as the identified feature point (step B7).
次に、特徴点抽出部14は、表示装置21の画面において、位置が指定された画像上で、いずれかの特徴点が指定されると、指定された特徴点を選択し、更に、他の画像上で、選択した特徴点に対応する特徴点を抽出する(ステップB8)。 Next, when a feature point is specified on the image whose position is specified on the screen of the display device 21, the feature point extraction unit 14 selects the specified feature point and further extracts feature points corresponding to the selected feature point on other images (step B8).
次に、行列算出部15は、位置が指定された画像上で選択された特徴点と、他の画像から抽出された特徴点と、の幾何学的関係を表現する、数値行列を算出する(ステップB9)。ステップB9は、図10に示したステップA9と同様のステップである。 Next, the matrix calculation unit 15 calculates a numerical matrix that represents the geometric relationship between the feature points selected on the image whose position is specified and the feature points extracted from other images (step B9). Step B9 is the same as step A9 shown in Figure 10.
次に、3次元形状構築部16は、ステップB9で算出された数値行列を用いて、ステップB3の処理後の特徴点の組合せの中から、幾何学的関係が矛盾する特徴点の組合せを特定する(ステップB10)。ステップB10は、図10に示したステップA10と同様のステップである。 Next, the three-dimensional shape construction unit 16 uses the numerical matrix calculated in step B9 to identify combinations of feature points that have contradictory geometric relationships from among the combinations of feature points obtained after the processing of step B3 (step B10). Step B10 is the same as step A10 shown in Figure 10.
次に、3次元形状構築部16は、ステップB10で特定しなかった特徴点の組合せを用いて、3次元形状を構築するための3次元座標を算出する(ステップB11)。ステップB11は、図10に示したステップA11と同様のステップである。 Next, the three-dimensional shape construction unit 16 calculates three-dimensional coordinates for constructing a three-dimensional shape using combinations of feature points not identified in step B10 (step B11). Step B11 is the same as step A11 shown in Figure 10.
次に、3次元形状構築部16は、ステップB11で3次元座標が算出された特徴点の適性を判定し、更に、適正でない特徴点を排除し、適正な特徴点を用いて3次元座標を再計算する。そして、3次元形状構築部16は、最終的に得られた各特徴点の3次元座標によって、対象物の点群データを構築し、これを対象物の3次元形状とする(ステップB12)。ステップB12は、図10に示したステップA12と同様のステップである。 Next, the three-dimensional shape construction unit 16 determines the suitability of the feature points whose three-dimensional coordinates were calculated in step B11, and then eliminates inappropriate feature points and recalculates the three-dimensional coordinates using appropriate feature points. The three-dimensional shape construction unit 16 then constructs point cloud data of the object using the three-dimensional coordinates of each feature point finally obtained, and uses this as the three-dimensional shape of the object (step B12). Step B12 is the same step as step A12 shown in Figure 10.
その後、表示部20は、ステップA12で構築された3次元形状を、2次元の画像として表示装置21の画面上に表示させる(ステップB13)。ステップB13は、図10に示したステップA13と同様のステップである。 Then, the display unit 20 displays the three-dimensional shape constructed in step A12 as a two-dimensional image on the screen of the display device 21 (step B13). Step B13 is the same as step A13 shown in Figure 10.
[実施の形態2における効果]
以上のように、実施の形態2においては、画像に表示されるアイコン33により、ユーザは指定すべき特徴点を確認することができる。つまり、実施の形態2では、ユーザは、再投影誤差又はエピポーラ誤差等が小さくなるように特徴点を指定できるので、よりいっそう、3次元形状の精度の向上が図られることになる。
[Effects of the Second Embodiment]
As described above, in the second embodiment, the user can confirm the feature points to be designated by the icons 33 displayed on the image. That is, in the second embodiment, the user can designate feature points so as to reduce the reprojection error, epipolar error, or the like, thereby further improving the accuracy of the three-dimensional shape.
[変形例]
上述した例では、画像処理装置は、算出した指標を必ず画面に表示し、ユーザに特徴点を指定させているが、実施の形態2は、これとは別の態様であっても良い。具体的には、実施の形態2は、特徴点特定部13が、各特徴点について指標を算出した後に、特徴点抽出部14が、ユーザからの指定を受け付けることなく、算出された指標に基づいて、画像毎の特徴点の選択及び抽出を実行する、態様であっても良い。この態様では、自動的に適切な特徴点が抽出されることになる。
[Modification]
In the above example, the image processing device always displays the calculated indices on the screen and prompts the user to specify feature points, but embodiment 2 may have a different configuration. Specifically, embodiment 2 may have a configuration in which, after the feature point identification unit 13 calculates an index for each feature point, the feature point extraction unit 14 selects and extracts feature points for each image based on the calculated indices without receiving a specification from the user. In this configuration, appropriate feature points are automatically extracted.
[プログラム]
実施の形態1におけるプログラムは、コンピュータに、図12に示すステップB1~B13を実行させるプログラムであれば良い。このプログラムをコンピュータにインストールし、実行することによって、実施の形態2における画像処理装置と画像処理方法とを実現することができる。この場合、コンピュータのプロセッサは、組合せ抽出部11、仮3次元形状構築部12、特徴点特定部13、特徴点抽出部14、行列算出部15、3次元形状構築部16、画像取得部17、フィルタリング部18、入力受付部19、及び表示部20として機能し、処理を行なう。コンピュータとしては、汎用のPCの他に、スマートフォン、タブレット型端末装置が挙げられる。
[program]
The program in the first embodiment may be a program that causes a computer to execute steps B1 to B13 shown in Fig. 12. By installing and executing this program in a computer, the image processing device and image processing method in the second embodiment can be realized. In this case, the processor of the computer functions as a combination extraction unit 11, a temporary 3D shape construction unit 12, a feature point identification unit 13, a feature point extraction unit 14, a matrix calculation unit 15, a 3D shape construction unit 16, an image acquisition unit 17, a filtering unit 18, an input acceptance unit 19, and a display unit 20 to perform processing. Examples of the computer include a general-purpose PC, a smartphone, and a tablet terminal device.
また、実施の形態2におけるプログラムは、複数のコンピュータによって構築されたコンピュータシステムによって実行されても良い。この場合は、例えば、各コンピュータが、それぞれ、組合せ抽出部11、仮3次元形状構築部12、特徴点特定部13、特徴点抽出部14、行列算出部15、3次元形状構築部16、画像取得部17、フィルタリング部18、入力受付部19、及び表示部20のいずれかとして機能しても良い。 The program in embodiment 2 may also be executed by a computer system constructed by multiple computers. In this case, for example, each computer may function as one of the combination extraction unit 11, temporary 3D shape construction unit 12, feature point identification unit 13, feature point extraction unit 14, matrix calculation unit 15, 3D shape construction unit 16, image acquisition unit 17, filtering unit 18, input acceptance unit 19, and display unit 20.
[物理構成]
ここで、実施の形態1及び2におけるプログラムを実行することによって、画像処理装置を実現するコンピュータについて図13を用いて説明する。図13は、実施の形態1及び2における画像処理装置を実現するコンピュータの一例を示すブロック図である。
[Physical configuration]
A computer that realizes the image processing device by executing the programs in the first and second embodiments will now be described with reference to Fig. 13. Fig. 13 is a block diagram showing an example of a computer that realizes the image processing device in the first and second embodiments.
図13に示すように、コンピュータ110は、CPU(Central Processing Unit)111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。 As shown in FIG. 13, the computer 110 includes a CPU (Central Processing Unit) 111, a main memory 112, a storage device 113, an input interface 114, a display controller 115, a data reader/writer 116, and a communication interface 117. These components are connected to each other via a bus 121 so that they can communicate data with each other.
また、コンピュータ110は、CPU111に加えて、又はCPU111に代えて、GPU(Graphics Processing Unit)、又はFPGA(Field-Programmable Gate Array)を備えていても良い。この態様では、GPU又はFPGAが、実施の形態におけるプログラムを実行することができる。 Furthermore, the computer 110 may include a GPU (Graphics Processing Unit) or an FPGA (Field-Programmable Gate Array) in addition to or instead of the CPU 111. In this embodiment, the GPU or FPGA can execute the programs in the embodiments.
CPU111は、記憶装置113に格納された、コード群で構成された実施の形態におけるプログラムをメインメモリ112に展開し、各コードを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。 The CPU 111 deploys the program in this embodiment, which is composed of a group of codes stored in the storage device 113, into the main memory 112 and executes each code in a predetermined order to perform various calculations. The main memory 112 is typically a volatile storage device such as DRAM (Dynamic Random Access Memory).
また、実施の形態におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本実施の形態におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。 Furthermore, the program in this embodiment is provided in a state stored on a computer-readable recording medium 120. Note that the program in this embodiment may also be distributed over the Internet connected via the communication interface 117.
また、記憶装置113の具体例としては、ハードディスクドライブの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、キーボード及びマウスといった入力機器118との間のデータ伝送を仲介する。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。 Specific examples of the storage device 113 include a hard disk drive and semiconductor storage devices such as flash memory. The input interface 114 mediates data transmission between the CPU 111 and input devices 118 such as a keyboard and mouse. The display controller 115 is connected to the display device 119 and controls the display on the display device 119.
データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と、他のコンピュータとの間のデータ伝送を仲介する。 The data reader/writer 116 mediates data transmission between the CPU 111 and the recording medium 120, reads programs from the recording medium 120, and writes the processing results of the computer 110 to the recording medium 120. The communication interface 117 mediates data transmission between the CPU 111 and other computers.
また、記録媒体120の具体例としては、CF(Compact Flash(登録商標))及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)等の磁気記録媒体、又はCD-ROM(Compact Disk Read Only Memory)などの光学記録媒体が挙げられる。 Specific examples of the recording medium 120 include general-purpose semiconductor storage devices such as CF (Compact Flash (registered trademark)) and SD (Secure Digital), magnetic recording media such as flexible disks, and optical recording media such as CD-ROMs (Compact Disk Read Only Memory).
なお、本実施の形態における画像処理装置は、プログラムがインストールされたコンピュータではなく、各部に対応したハードウェアを用いることによっても実現可能である。更に、画像処理装置は、一部がプログラムで実現され、残りの部分がハードウェアで実現されていてもよい。 Note that the image processing device in this embodiment can also be realized by using hardware corresponding to each part, rather than a computer on which a program is installed. Furthermore, the image processing device may be realized in part by a program and the remaining part by hardware.
上述した実施の形態の一部又は全部は、以下に記載する(付記1)~(付記15)によって表現することができるが、以下の記載に限定されるものではない。 Some or all of the above-described embodiments can be expressed by (Appendix 1) to (Appendix 15) described below, but are not limited to the following descriptions.
(付記1)
対象物の複数の画像それぞれから、対応する特徴点の組合せを抽出する、組合せ抽出部と、
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築部と、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定部と、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出部と、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出部と、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築部と、
を備えている、ことを特徴とする画像処理装置。
(Appendix 1)
a combination extraction unit that extracts combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape constructing unit that constructs a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identification unit that, when a position on the object is designated in one of the plurality of images, identifies the corresponding feature point in accordance with the designated position, and further identifies the feature point corresponding to the identified feature point in another of the images in which a position is not designated;
a feature point extraction unit that selects, from the identified feature points in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracts, in the other image, the feature point that corresponds to the selected feature point;
a matrix calculation unit that calculates a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape constructing unit that constructs a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
An image processing device comprising:
(付記2)
付記1に記載の画像処理装置であって、
前記特徴点特定部が、更に、特定した前記特徴点を、前記複数の画像それぞれと共に、画面上に提示し、
前記特徴点抽出部が、前記画面上で、前記対象物上の位置が指定された前記画像における前記特徴点のいずれかが指定されると、指定されたことを前記設定条件として、指定された前記特徴点を選択する、
ことを特徴とする画像処理装置。
(Appendix 2)
2. The image processing device according to claim 1,
the feature point identification unit further presents the identified feature points together with each of the plurality of images on a screen;
When any of the feature points in the image whose position on the object is specified is designated on the screen, the feature point extraction unit selects the designated feature point, using the designation as the setting condition.
1. An image processing device comprising:
(付記3)
付記1または2に記載の画像処理装置であって、
前記特徴点特定部が、
特定した前記特徴点それぞれ毎に、前記仮の3次元形状を用いて3次元座標を算出し、算出した前記3次元座標と、それぞれが特定された前記画像上での2次元座標と、それぞれが特定された前記画像のカメラパラメータと、を用いて、算出した前記3次元座標と前記対象物の対応する位置における実際の3次元座標との誤差を示す指標を算出し、
特定した前記特徴点に加えて、算出した前記指標を提示する、
ことを特徴とする画像処理装置。
(Appendix 3)
3. The image processing device according to claim 1,
The feature point identification unit
calculating three-dimensional coordinates for each of the identified feature points using the virtual three-dimensional shape, and calculating an index indicating an error between the calculated three-dimensional coordinates and actual three-dimensional coordinates at the corresponding position of the object using the calculated three-dimensional coordinates, the two-dimensional coordinates on the image where each feature point is identified, and the camera parameters of the image where each feature point is identified;
presenting the calculated index in addition to the identified feature points;
1. An image processing device comprising:
(付記4)
付記3に記載の画像処理装置であって、
前記特徴点特定部が、前記指標として、前記特徴点の再投影誤差を算出し、算出した前記再投影誤差の値に応じてサイズが変化するアイコンを提示することで、前記指標を提示する、
ことを特徴とする画像処理装置。
(Appendix 4)
4. The image processing device according to claim 3,
the feature point identification unit calculates a re-projection error of the feature point as the indicator, and presents an icon whose size changes according to the calculated value of the re-projection error, thereby presenting the indicator.
1. An image processing device comprising:
(付記5)
付記3に記載の画像処理装置であって、
前記特徴点特定部が、前記指標として、前記特徴点のエピポーラ誤差を算出し、算出した前記エピポーラ誤差の値に応じて変化するアイコンを提示することで、前記指標を提示する、
ことを特徴とする画像処理装置。
(Appendix 5)
4. The image processing device according to claim 3,
the feature point identification unit calculates an epipolar error of the feature point as the indicator, and presents the indicator by presenting an icon that changes depending on the calculated value of the epipolar error.
1. An image processing device comprising:
(付記6)
対象物の複数の画像それぞれから、対応する特徴点の組合せを抽出する、組合せ抽出ステップと、
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築ステップと、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定ステップと、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出ステップと、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出ステップと、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築ステップと、
を有する、ことを特徴とする画像処理方法。
(Appendix 6)
a combination extraction step of extracting combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape construction step of constructing a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identifying step of, when a position on the object is specified in one of the plurality of images, identifying the corresponding feature point in accordance with the specified position, and further identifying the feature point corresponding to the identified feature point in another of the images in which a position is not specified;
a feature point extraction step of selecting, from the feature points identified in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracting, in the other image, the feature point corresponding to the selected feature point;
a matrix calculation step of calculating a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape construction step of constructing a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
An image processing method comprising:
(付記7)
付記6に記載の画像処理方法であって、
前記特徴点特定ステップにおいて、更に、特定した前記特徴点を、前記複数の画像それぞれと共に、画面上に提示し、
前記特徴点抽出ステップにおいて、前記画面上で、前記対象物上の位置が指定された前記画像における前記特徴点のいずれかが指定されると、指定されたことを前記設定条件として、指定された前記特徴点を選択する、
ことを特徴とする画像処理方法。
(Appendix 7)
7. The image processing method according to claim 6, further comprising:
In the feature point specifying step, the specified feature points are further displayed on a screen together with each of the plurality of images;
In the feature point extraction step, when any of the feature points in the image whose position on the object is specified is specified on the screen, the specified feature point is selected with the specification being set as the setting condition.
An image processing method comprising:
(付記8)
付記6または7に記載の画像処理方法であって、
前記特徴点特定ステップにおいて、
特定した前記特徴点それぞれ毎に、前記仮の3次元形状を用いて3次元座標を算出し、算出した前記3次元座標と、それぞれが特定された前記画像上での2次元座標と、それぞれが特定された前記画像のカメラパラメータと、を用いて、算出した前記3次元座標と前記対象物の対応する位置における実際の3次元座標との誤差を示す指標を算出し、
特定した前記特徴点に加えて、算出した前記指標を提示する、
ことを特徴とする画像処理方法。
(Appendix 8)
8. The image processing method according to claim 6, further comprising:
In the feature point specifying step,
calculating three-dimensional coordinates for each of the identified feature points using the virtual three-dimensional shape, and calculating an index indicating an error between the calculated three-dimensional coordinates and actual three-dimensional coordinates at the corresponding position of the object using the calculated three-dimensional coordinates, the two-dimensional coordinates on the image where each feature point is identified, and the camera parameters of the image where each feature point is identified;
presenting the calculated index in addition to the identified feature points;
An image processing method comprising:
(付記9)
付記8に記載の画像処理方法であって、
前記特徴点特定ステップにおいて、前記指標として、前記特徴点の再投影誤差を算出し、
算出した前記再投影誤差の値に応じてサイズが変化するアイコンを提示することで、前記指標を提示する、
ことを特徴とする画像処理方法。
(Appendix 9)
9. The image processing method according to claim 8, further comprising:
In the feature point identification step, a reprojection error of the feature point is calculated as the index;
presenting the indicator by presenting an icon whose size changes depending on the calculated value of the reprojection error;
An image processing method comprising:
(付記10)
付記8に記載の画像処理方法であって、
前記特徴点特定ステップにおいて、前記指標として、前記特徴点のエピポーラ誤差を算出し、算出した前記エピポーラ誤差の値に応じて変化するアイコンを提示することで、前記指標を提示する、
ことを特徴とする画像処理方法。
(Appendix 10)
9. The image processing method according to claim 8, further comprising:
In the feature point identifying step, an epipolar error of the feature point is calculated as the index, and an icon that changes depending on the calculated value of the epipolar error is presented to present the index.
An image processing method comprising:
(付記11)
コンピュータに、
対象物の複数の画像それぞれから、対応する特徴点の組合せを抽出する、組合せ抽出ステップと、
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築ステップと、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定ステップと、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出ステップと、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出ステップと、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築ステップと、
を実行させる、プログラム。
(Appendix 11)
On the computer,
a combination extraction step of extracting combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape construction step of constructing a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identifying step of, when a position on the object is specified in one of the plurality of images, identifying the corresponding feature point in accordance with the specified position, and further identifying the feature point corresponding to the identified feature point in another of the images in which a position is not specified;
a feature point extraction step of selecting, from the identified feature points in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracting, in the other image, the feature point that corresponds to the selected feature point;
a matrix calculation step of calculating a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape construction step of constructing a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
A program that executes.
(付記12)
付記11に記載のプログラムであって、
前記特徴点特定ステップにおいて、更に、特定した前記特徴点を、前記複数の画像それぞれと共に、画面上に提示し、
前記特徴点抽出ステップにおいて、前記画面上で、前記対象物上の位置が指定された前記画像における前記特徴点のいずれかが指定されると、指定されたことを前記設定条件として、指定された前記特徴点を選択する、
ことを特徴とするプログラム。
(Appendix 12)
12. The program of claim 11,
In the feature point specifying step, the specified feature points are further displayed on a screen together with each of the plurality of images;
In the feature point extraction step, when any of the feature points in the image whose position on the object is specified is specified on the screen, the specified feature point is selected with the specification being set as the setting condition.
A program characterized by:
(付記13)
付記11または12に記載のプログラムであって、
前記特徴点特定ステップにおいて、
特定した前記特徴点それぞれ毎に、前記仮の3次元形状を用いて3次元座標を算出し、算出した前記3次元座標と、それぞれが特定された前記画像上での2次元座標と、それぞれが特定された前記画像のカメラパラメータと、を用いて、算出した前記3次元座標と前記対象物の対応する位置における実際の3次元座標との誤差を示す指標を算出し、
特定した前記特徴点に加えて、算出した前記指標を提示する、
ことを特徴とするプログラム。
(Appendix 13)
13. The program according to claim 11 or 12,
In the feature point specifying step,
calculating three-dimensional coordinates for each of the identified feature points using the virtual three-dimensional shape, and calculating an index indicating an error between the calculated three-dimensional coordinates and actual three-dimensional coordinates at the corresponding position of the object using the calculated three-dimensional coordinates, the two-dimensional coordinates on the image where each feature point is identified, and the camera parameters of the image where each feature point is identified;
presenting the calculated index in addition to the identified feature points;
A program characterized by:
(付記14)
付記13に記載のプログラムであって、
前記特徴点特定ステップにおいて、前記指標として、前記特徴点の再投影誤差を算出し、
算出した前記再投影誤差の値に応じてサイズが変化するアイコンを提示することで、前記指標を提示する、
ことを特徴とするプログラム。
(Appendix 14)
14. The program of claim 13,
In the feature point identification step, a reprojection error of the feature point is calculated as the index;
presenting the indicator by presenting an icon whose size changes depending on the calculated value of the reprojection error;
A program characterized by:
(付記15)
付記13に記載のプログラムであって、
前記特徴点特定ステップにおいて、前記指標として、前記特徴点のエピポーラ誤差を算出し、算出した前記エピポーラ誤差の値に応じて変化するアイコンを提示することで、前記指標を提示する、
ことを特徴とするプログラム。
(Appendix 15)
14. The program of claim 13,
In the feature point identifying step, an epipolar error of the feature point is calculated as the index, and an icon that changes depending on the calculated value of the epipolar error is presented to present the index.
A program characterized by:
以上のように本開示によれば、複数の画像を用いて対象の3次元形状を構築する際において、3次元形状の精度の向上を図りつつ、作業者の負担を軽減することができる。本発明は、画像から対象物の3次元形状を構築することが求められる分野において有用である。 As described above, according to the present disclosure, when constructing a three-dimensional shape of an object using multiple images, it is possible to improve the accuracy of the three-dimensional shape while reducing the burden on the worker. The present invention is useful in fields where it is necessary to construct the three-dimensional shape of an object from images.
10 画像処理装置
11 組合せ抽出部
12 仮3次元形状構築部
13 特徴点特定部
14 特徴点抽出部
15 行列算出部
16 3次元形状構築部
17 画像取得部
18 フィルタリング部
19 入力受付部
20 表示部
30 対象物
31 カーソル
32 特徴点
33 アイコン
41、42 カメラ
51、52 画像
110 コンピュータ
111 CPU
112 メインメモリ
113 記憶装置
114 入力インターフェイス
115 表示コントローラ
116 データリーダ/ライタ
117 通信インターフェイス
118 入力機器
119 ディスプレイ装置
120 記録媒体
121 バス
REFERENCE SIGNS LIST 10 Image processing device 11 Combination extraction unit 12 Temporary three-dimensional shape construction unit 13 Feature point identification unit 14 Feature point extraction unit 15 Matrix calculation unit 16 Three-dimensional shape construction unit 17 Image acquisition unit 18 Filtering unit 19 Input reception unit 20 Display unit 30 Object 31 Cursor 32 Feature point 33 Icon 41, 42 Camera 51, 52 Image 110 Computer 111 CPU
112 Main memory 113 Storage device 114 Input interface 115 Display controller 116 Data reader/writer 117 Communication interface 118 Input device 119 Display device 120 Recording medium 121 Bus
Claims (6)
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築部と、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定部と、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出部と、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出部と、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築部と、
を備え、
前記特徴点特定部が、
特定した前記特徴点それぞれ毎に、前記仮の3次元形状を用いて3次元座標を算出し、算出した前記3次元座標と、それぞれが特定された前記画像上での2次元座標と、それぞれが特定された前記画像のカメラパラメータと、を用いて、算出した前記3次元座標と前記対象物の対応する位置における実際の3次元座標との誤差を示す指標を算出し、
特定した前記特徴点に加えて、算出した前記指標を提示する、
ことを特徴とする画像処理装置。 a combination extraction unit that extracts combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape constructing unit that constructs a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identification unit that, when a position on the object is designated in one of the plurality of images, identifies the corresponding feature point in accordance with the designated position, and further identifies the feature point corresponding to the identified feature point in another of the images in which a position is not designated;
a feature point extraction unit that selects, from the feature points identified in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracts, in the other image, the feature point that corresponds to the selected feature point;
a matrix calculation unit that calculates a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape constructing unit that constructs a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
Equipped with
The feature point identification unit
calculating three-dimensional coordinates for each of the identified feature points using the virtual three-dimensional shape, and calculating an index indicating an error between the calculated three-dimensional coordinates and actual three-dimensional coordinates at the corresponding position of the object using the calculated three-dimensional coordinates, the two-dimensional coordinates on the image where each feature point is identified, and the camera parameters of the image where each feature point is identified;
presenting the calculated index in addition to the identified feature points;
1. An image processing device comprising:
前記特徴点特定部が、更に、特定した前記特徴点を、前記複数の画像それぞれと共に、画面上に提示し、
前記特徴点抽出部が、前記画面上で、前記対象物上の位置が指定された前記画像における前記特徴点のいずれかが指定されると、指定されたことを前記設定条件として、指定された前記特徴点を選択する、
ことを特徴とする画像処理装置。 2. The image processing device according to claim 1,
the feature point identification unit further presents the identified feature points together with each of the plurality of images on a screen;
When any of the feature points in the image whose position on the object is specified is designated on the screen, the feature point extraction unit selects the designated feature point, using the designation as the setting condition.
1. An image processing device comprising:
前記特徴点特定部が、前記指標として、前記特徴点の再投影誤差を算出し、算出した前記再投影誤差の値に応じてサイズが変化するアイコンを提示することで、前記指標を提示する、
ことを特徴とする画像処理装置。 2. The image processing device according to claim 1 ,
the feature point identification unit calculates a re-projection error of the feature point as the indicator, and presents an icon whose size changes according to the calculated value of the re-projection error, thereby presenting the indicator.
1. An image processing device comprising:
前記特徴点特定部が、前記指標として、前記特徴点のエピポーラ誤差を算出し、算出した前記エピポーラ誤差の値に応じて変化するアイコンを提示することで、前記指標を提示する、
ことを特徴とする画像処理装置。 2. The image processing device according to claim 1 ,
the feature point identification unit calculates an epipolar error of the feature point as the indicator, and presents the indicator by presenting an icon that changes depending on the calculated value of the epipolar error.
1. An image processing device comprising:
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築ステップと、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定ステップと、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出ステップと、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出ステップと、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築ステップと、
を有し、
前記特徴点特定ステップにおいて、
特定した前記特徴点それぞれ毎に、前記仮の3次元形状を用いて3次元座標を算出し、算出した前記3次元座標と、それぞれが特定された前記画像上での2次元座標と、それぞれが特定された前記画像のカメラパラメータと、を用いて、算出した前記3次元座標と前記対象物の対応する位置における実際の3次元座標との誤差を示す指標を算出し、
特定した前記特徴点に加えて、算出した前記指標を提示する、
ことを特徴とする画像処理方法。 a combination extraction step of extracting combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape construction step of constructing a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identifying step of, when a position on the object is specified in one of the plurality of images, identifying the corresponding feature point in accordance with the specified position, and further identifying the feature point corresponding to the identified feature point in another of the images in which a position is not specified;
a feature point extraction step of selecting, from the identified feature points in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracting, in the other image, the feature point that corresponds to the selected feature point;
a matrix calculation step of calculating a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape construction step of constructing a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
and
In the feature point specifying step,
calculating three-dimensional coordinates for each of the identified feature points using the virtual three-dimensional shape, and calculating an index indicating an error between the calculated three-dimensional coordinates and actual three-dimensional coordinates at the corresponding position of the object using the calculated three-dimensional coordinates, the two-dimensional coordinates on the image where each feature point is identified, and the camera parameters of the image where each feature point is identified;
presenting the calculated index in addition to the identified feature points;
An image processing method comprising:
対象物の複数の画像それぞれから、対応する特徴点の組合せを抽出する、組合せ抽出ステップと、
抽出された前記特徴点の組合せを用いて、前記特徴点の点群で構成された、前記対象物の仮の3次元形状を構築する、仮3次元形状構築ステップと、
前記複数の画像の1つの前記画像において、前記対象物上の位置が指定されると、指定された位置に応じて対応する前記特徴点を特定し、更に、位置が指定されていない別の前記画像において、特定した前記特徴点に対応する前記特徴点を特定する、特徴点特定ステップと、
前記対象物上の位置が指定された前記画像において、特定された前記特徴点のなかから、設定条件を満たすいずれかの特徴点を選択し、前記別の画像において、選択した前記特徴点に対応する前記特徴点を抽出する、特徴点抽出ステップと、
前記選択された特徴点と抽出された前記特徴点との幾何学的関係を表現する、数値行列を算出する、行列算出ステップと、
前記数値行列を用いて、抽出された前記特徴点の組合せの中から、特徴点間の幾何学的関係が矛盾する前記特徴点の組合せを特定し、そして、
特定した前記特徴点の組合せ以外の前記特徴点の組合せを用いて、前記対象物の3次元形状を構築する、3次元形状構築ステップと、
を実行させ、
前記特徴点特定ステップにおいて、
特定した前記特徴点それぞれ毎に、前記仮の3次元形状を用いて3次元座標を算出し、算出した前記3次元座標と、それぞれが特定された前記画像上での2次元座標と、それぞれが特定された前記画像のカメラパラメータと、を用いて、算出した前記3次元座標と前記対象物の対応する位置における実際の3次元座標との誤差を示す指標を算出し、
特定した前記特徴点に加えて、算出した前記指標を提示する、
プログラム。 On the computer,
a combination extraction step of extracting combinations of corresponding feature points from each of a plurality of images of the object;
a temporary three-dimensional shape construction step of constructing a temporary three-dimensional shape of the object, the temporary three-dimensional shape being configured as a point cloud of the feature points, using a combination of the extracted feature points;
a feature point identifying step of, when a position on the object is specified in one of the plurality of images, identifying the corresponding feature point in accordance with the specified position, and further identifying the feature point corresponding to the identified feature point in another of the images in which a position is not specified;
a feature point extraction step of selecting, from the identified feature points in the image in which a position on the object is specified, any feature point that satisfies a set condition, and extracting, in the other image, the feature point that corresponds to the selected feature point;
a matrix calculation step of calculating a numerical matrix that represents a geometric relationship between the selected feature points and the extracted feature points;
Using the numerical matrix, a combination of feature points having a contradictory geometric relationship is identified from among the extracted combinations of feature points, and
a three-dimensional shape construction step of constructing a three-dimensional shape of the object using a combination of the feature points other than the identified combination of the feature points;
Execute
In the feature point specifying step,
calculating three-dimensional coordinates for each of the identified feature points using the virtual three-dimensional shape, and calculating an index indicating an error between the calculated three-dimensional coordinates and actual three-dimensional coordinates at the corresponding position of the object using the calculated three-dimensional coordinates, the two-dimensional coordinates on the image where each feature point is identified, and the camera parameters of the image where each feature point is identified;
presenting the calculated index in addition to the identified feature points;
program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022005357A JP7816752B2 (en) | 2022-01-17 | 2022-01-17 | Image processing device, image processing method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022005357A JP7816752B2 (en) | 2022-01-17 | 2022-01-17 | Image processing device, image processing method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023104399A JP2023104399A (en) | 2023-07-28 |
| JP7816752B2 true JP7816752B2 (en) | 2026-02-18 |
Family
ID=87379306
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022005357A Active JP7816752B2 (en) | 2022-01-17 | 2022-01-17 | Image processing device, image processing method, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7816752B2 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021166574A1 (en) | 2020-02-17 | 2021-08-26 | Necソリューションイノベータ株式会社 | Image processing device, image processing method, and computer-readable recording medium |
-
2022
- 2022-01-17 JP JP2022005357A patent/JP7816752B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021166574A1 (en) | 2020-02-17 | 2021-08-26 | Necソリューションイノベータ株式会社 | Image processing device, image processing method, and computer-readable recording medium |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023104399A (en) | 2023-07-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107111753B (en) | Gaze Detection Offset for Gaze Tracking Models | |
| CN102458221B (en) | Image processing device and control method thereof | |
| US7092572B2 (en) | Method and apparatus for global image quantification verification | |
| EP3309750B1 (en) | Image processing apparatus and image processing method | |
| US7076101B2 (en) | Method and apparatus for local image quantification verification | |
| US11189053B2 (en) | Information processing apparatus, method of controlling information processing apparatus, and non-transitory computer-readable storage medium | |
| EP3239931A1 (en) | Image processing apparatus and image processing method | |
| US20120257822A1 (en) | Image processing apparatus, image processing method, and computer readable medium | |
| TW201616451A (en) | System and method for selecting point clouds using a free selection tool | |
| US7092571B2 (en) | Method and apparatus for regional image quantification verification | |
| JP7188798B2 (en) | Coordinate calculation device, coordinate calculation method, and program | |
| CN108629799B (en) | A method and device for realizing augmented reality | |
| US20230237777A1 (en) | Information processing apparatus, learning apparatus, image recognition apparatus, information processing method, learning method, image recognition method, and non-transitory-computer-readable storage medium | |
| US9924865B2 (en) | Apparatus and method for estimating gaze from un-calibrated eye measurement points | |
| JP7533937B2 (en) | Image processing device, image processing method, and program | |
| JP7816752B2 (en) | Image processing device, image processing method, and program | |
| US9558561B2 (en) | Semiautomatic drawing tool for image segmentation | |
| JP7276978B2 (en) | Image processing device, image processing method, and program | |
| JP7640427B2 (en) | Gaze position analysis system and method | |
| JP7294702B2 (en) | Image processing device, image processing method, and program | |
| US11516448B2 (en) | Method and apparatus for compensating projection images | |
| US20200167005A1 (en) | Recognition device and recognition method | |
| JP7854636B2 (en) | Image processing device and program | |
| JP7853116B2 (en) | Stone material identification device, stone material identification method, and program | |
| TWI853460B (en) | Method for determining two-eye gaze point and host |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20241202 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250905 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250924 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20251120 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20251126 |
|
| 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: 20260106 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20260129 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7816752 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |