JP5988368B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP5988368B2
JP5988368B2 JP2012218348A JP2012218348A JP5988368B2 JP 5988368 B2 JP5988368 B2 JP 5988368B2 JP 2012218348 A JP2012218348 A JP 2012218348A JP 2012218348 A JP2012218348 A JP 2012218348A JP 5988368 B2 JP5988368 B2 JP 5988368B2
Authority
JP
Japan
Prior art keywords
index
coordinate system
geometric feature
reference coordinate
initial
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
Application number
JP2012218348A
Other languages
Japanese (ja)
Other versions
JP2014071035A (en
Inventor
有哉 巻渕
有哉 巻渕
加藤 晴久
晴久 加藤
米山 暁夫
暁夫 米山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KDDI Corp
Original Assignee
KDDI Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by KDDI Corp filed Critical KDDI Corp
Priority to JP2012218348A priority Critical patent/JP5988368B2/en
Publication of JP2014071035A publication Critical patent/JP2014071035A/en
Application granted granted Critical
Publication of JP5988368B2 publication Critical patent/JP5988368B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、単一の指標及び幾何特徴を用いて基準座標系の姿勢を推定する画像処理装置及び方法に関する。   The present invention relates to an image processing apparatus and method for estimating a posture of a reference coordinate system using a single index and a geometric feature.

AR(拡張現実感)は、文字やCG等の仮想的な情報を現実世界に付加する概念であり、その中でも3次元CGを撮像画像に重畳表示するためには現実世界の基準座標系に対する撮像装置の姿勢(又はその逆を表す同等の情報として、撮像装置に対する基準座標系の姿勢)を推定する必要がある。   AR (augmented reality) is a concept of adding virtual information such as characters and CG to the real world. Among them, in order to superimpose a three-dimensional CG on a captured image, imaging with respect to a reference coordinate system in the real world is performed. It is necessary to estimate the attitude of the apparatus (or the attitude of the reference coordinate system with respect to the imaging apparatus as equivalent information representing the opposite).

基準座標系の姿勢推定技術の応用として、推定された基準座標系を用いて撮像画像に撮像された立体形状物の寸法を計測する方式が提案されており、特許文献1及び2にはこうした技術が開示されている。   As an application of the posture estimation technique of the reference coordinate system, a method for measuring the size of a three-dimensional object captured in a captured image using the estimated reference coordinate system has been proposed. Is disclosed.

特許文献1では、直方体物体の3次元頂点座標を推定することで立体寸法を測定する方法が開示されており、直方体物体の全ての頂点を拘束条件として使用することで高精度に採寸することが可能である。   Patent Document 1 discloses a method of measuring a three-dimensional dimension by estimating the three-dimensional vertex coordinates of a rectangular parallelepiped object, and it is possible to measure with high accuracy by using all the vertices of a rectangular parallelepiped object as a constraint condition. Is possible.

特許文献2では、直方体物体の上面に貼られた指標から平面射影変換行列を計算し、平面射影変換行列に基準座標系の回転及び平行移動を適用することで対象物の各面における寸法の測定を可能にする方法が開示されており、底面と側面との角度関係が予め既知である円錐などの物体も測定可能である。   In Patent Document 2, a plane projection transformation matrix is calculated from an index affixed to the upper surface of a rectangular parallelepiped object, and the dimensions on each surface of the object are measured by applying rotation and translation of the reference coordinate system to the plane projection transformation matrix. In other words, an object such as a cone whose angular relationship between the bottom surface and the side surface is known in advance can be measured.

特開2008-122109号公報JP 2008-122109 A 特開2008-140047号公報Japanese Patent Laid-Open No. 2008-140047

特許文献1では、測定対象物を限定することで測定対象物の幾何形状全てを拘束条件として利用することができるため基準座標系を高精度に推定できる一方、測定可能な対象物の形状が直方体物体に限定されるという課題がある。   In Patent Document 1, by limiting the measurement object, all the geometric shapes of the measurement object can be used as constraints, so that the reference coordinate system can be estimated with high accuracy, while the shape of the measurable object is a rectangular parallelepiped. There is a problem that it is limited to objects.

特許文献2では、平面射影変換行列の計算に単一の指標の頂点や辺の拘束条件しか用いることができず、特許文献1の方式と比較して基準座標系の推定精度が安定しないという課題がある。特に特定の一面上の拘束条件しか利用していないという点において、指標の存在する平面の水平方向と比較して垂直方向に推定誤差が生じやすい。   In Patent Document 2, only a single index vertex or edge constraint condition can be used for calculation of the planar projective transformation matrix, and the estimation accuracy of the reference coordinate system is not stable compared to the method of Patent Document 1 There is. In particular, an estimation error is likely to occur in the vertical direction compared to the horizontal direction of the plane where the index exists, in that only the constraint condition on a specific surface is used.

本発明は上述の課題に鑑みてなされたものであり、限られた拘束条件のもとで基準座標系を高精度に推定することを第1の目的とする。   The present invention has been made in view of the above-described problems, and a first object thereof is to estimate a reference coordinate system with high accuracy under a limited constraint condition.

本発明はまた、前記高精度に推定された配置に基づいて、対象を直方体のような特定の形状に必ずしも限定することなくその寸法を高精度に推定することを第2の目的とする。   A second object of the present invention is to estimate the size with high accuracy without necessarily limiting the target to a specific shape such as a rectangular parallelepiped, based on the arrangement estimated with high accuracy.

上記目的を達成するため、本発明は、撮像装置が撮像した撮像画像より、所定の指標が設置された平面において当該指標が定める基準座標系を、当該指標と、当該平面上における平行関係及び/又は直交関係として構成された所定の幾何特徴と、を用いて推定する画像処理装置であって、前記撮像画像より前記指標を検出する指標検出部と、前記指標を前記基準座標系にて表現した所定の初期配置と、前記検出された指標の前記撮像画像上での配置と、に基づいて前記基準座標系の前記撮像装置に対する初期姿勢を算出すると共に、当該初期姿勢が表す変換関係を大きさ、位置及び向き並びに歪みに対応する各要素に分解する初期姿勢算出部と、前記撮像画像より前記幾何特徴を検出する幾何特徴検出部と、前記検出された幾何特徴における歪みの要素と、前記分解された大きさ並びに位置及び向きの要素と、に基づいて前記幾何特徴の前記基準座標系における初期配置を推定する初期配置推定部と、前記指標の所定の初期配置及び前記推定された幾何特徴の初期配置と、前記検出された指標及び幾何特徴の前記撮像画像上における配置と、の全体としての対応関係より、前記基準座標系の前記撮像装置に対する姿勢を推定する基準座標系推定部と、を備えることを第1の特徴とする。   In order to achieve the above object, according to the present invention, a reference coordinate system defined by an index on a plane on which a predetermined index is set is obtained based on a captured image captured by an imaging apparatus, the index, a parallel relationship on the plane, and / or Or an image processing device that uses a predetermined geometric feature configured as an orthogonal relationship, and an index detection unit that detects the index from the captured image, and the index is expressed in the reference coordinate system Based on a predetermined initial arrangement and an arrangement of the detected index on the captured image, an initial attitude of the reference coordinate system with respect to the imaging apparatus is calculated, and a conversion relationship represented by the initial attitude is large. In the detected geometric feature, an initial posture calculating unit that decomposes into each element corresponding to the position, orientation, and distortion, a geometric feature detecting unit that detects the geometric feature from the captured image, and An initial arrangement estimating unit for estimating an initial arrangement of the geometric feature in the reference coordinate system based on the elements of the resolution, the size, the position, and the orientation, and a predetermined initial arrangement of the index, and A reference for estimating a posture of the reference coordinate system with respect to the imaging device based on an overall correspondence relationship between the estimated initial arrangement of the geometric feature and the arrangement of the detected index and the geometric feature on the captured image. A coordinate system estimation unit is provided as a first feature.

また、本発明は、さらに、前記推定された基準座標系の姿勢及び前記所定の指標における既知の大きさに基づいて、前記撮像画像上における所定箇所の寸法を計測する寸法計測部を備えることを第2の特徴とする。   In addition, the present invention further includes a dimension measuring unit that measures a dimension of a predetermined location on the captured image based on the estimated orientation of the reference coordinate system and a known size of the predetermined index. The second feature.

前記第1の特徴によれば、基準座標系において幾何特徴の初期配置を推定し、基準座標系における指標の初期配置と合わせて用いて基準座標系の撮像装置に対する姿勢を高精度に推定できる。この際、既知の指標の利用に加えて、平行関係及び/又は直交関係としてのみ構成され指標との相対配置等のその他の拘束条件を有しない幾何特徴を利用するので、限られた拘束条件のもとで単一の指標を利用した場合と比較して高精度な推定が可能となる。よって第1の目的が達成される。   According to the first feature, it is possible to estimate the initial arrangement of geometric features in the reference coordinate system and estimate the attitude of the reference coordinate system with respect to the imaging apparatus with high accuracy by using the initial arrangement of the indices in the reference coordinate system. In this case, in addition to the use of known indices, geometric features that are configured only as parallel relations and / or orthogonal relations and have no other constraint conditions such as relative arrangement with the indices are used. Compared with the case where a single index is originally used, it is possible to perform estimation with higher accuracy. Therefore, the first object is achieved.

前記第2の特徴によれば、当該高精度に推定された基準座標系を用いて寸法測定を行うので、高精度な寸法測定が可能となり、この際、対象を直方体等の特定形状に限定する必要はないので、第2の目的が達成される。   According to the second feature, since the dimension measurement is performed using the reference coordinate system estimated with high accuracy, the dimension measurement with high accuracy becomes possible. At this time, the target is limited to a specific shape such as a rectangular parallelepiped. Since it is not necessary, the second objective is achieved.

本発明の画像処理装置を用いたARシステムの一実施形態としての構成図である。1 is a configuration diagram as an embodiment of an AR system using an image processing apparatus of the present invention. 撮像対象の一例としての直方体を示す図である。It is a figure which shows the rectangular parallelepiped as an example of an imaging target. 画像処理装置の機能ブロック図である。It is a functional block diagram of an image processing apparatus. (1)指標の例としての正方指標と、(2)指標によって定まる基準座標系と、(3)指標に検出用の枠領域を設けることと、を説明するための図である。It is a figure for demonstrating (1) the square parameter | index as an example of a parameter | index, (2) the reference coordinate system defined by a parameter | index, and (3) providing the frame area for a detection in a parameter | index. 幾何特徴の一例としての平行線を説明するための図である。It is a figure for demonstrating the parallel line as an example of a geometric feature. 幾何特徴の一例としての直交線を説明するための図である。It is a figure for demonstrating the orthogonal line as an example of a geometric feature. 平面射影変換行列及びその逆行列により、基準座標系と撮像画像系とが相互に変換されることを模式的に説明するための図である。It is a figure for demonstrating typically that a reference coordinate system and a picked-up image system are mutually converted by a plane projection transformation matrix and its inverse matrix. 撮像画像においては歪んでいるが基準座標系において平行四辺形を形成する場合に、当該歪みを除去するための処理を説明するための図である。It is a figure for demonstrating the process for removing the said distortion when forming a parallelogram in a reference coordinate system, although it is distorted in a captured image. 図7で説明した歪み除去処理の後、平行四辺形が基準座標系において正方形を形成する場合に、さらに当該歪みを除去するための処理を説明するための図である。FIG. 8 is a diagram for explaining a process for further removing the distortion when the parallelogram forms a square in the reference coordinate system after the distortion removal process described in FIG. 7; 初期配置推定部における処理のまとめを説明するための図である。It is a figure for demonstrating the summary of the process in an initial arrangement | positioning estimation part. 幾何特徴の意義を説明するための一連の図である。It is a series of figures for demonstrating the meaning of a geometric feature. 幾何特徴の意義を説明するための一連の図である。It is a series of figures for demonstrating the meaning of a geometric feature. 幾何特徴の意義を説明するための一連の図である。It is a series of figures for demonstrating the meaning of a geometric feature. 幾何特徴の意義を説明するための一連の図である。It is a series of figures for demonstrating the meaning of a geometric feature. 幾何特徴の意義を説明するための一連の図である。It is a series of figures for demonstrating the meaning of a geometric feature. 幾何特徴が1つに限らない各種の幾何特徴から検出可能であることと、複数の平行関係及び直交関係が検出された場合の選択とを説明するための図である。It is a figure for demonstrating that it can detect from the various geometric features which are not restricted to one geometric feature, and selection when a several parallel relationship and orthogonal relationship are detected. 別平面上の幾何特徴を利用する一例として、円柱により構成される幾何特徴を説明するための図である。It is a figure for demonstrating the geometric feature comprised by a cylinder as an example using the geometric feature on another plane. 別平面上の幾何特徴を利用する一例として、円錐により構成される幾何特徴を説明するための図である。It is a figure for demonstrating the geometric feature comprised by a cone as an example using the geometric feature on another plane. 指標を複数用いる実施形態における画像処理装置の機能ブロック図である。It is a functional block diagram of an image processing device in an embodiment using a plurality of indices. 指標を複数用いる実施形態の意義を説明するための図である。It is a figure for demonstrating the significance of embodiment which uses two or more indicators.

図1に、本発明における画像処理装置を用いたARシステムの一実施形態としての構成図を示し、図1を用いて本発明の概要を説明する。ARシステム1は撮像装置10、情報表示装置11、データベース12及び画像処理装置2を備える。画像処理装置2は指標と複数の幾何特徴の配置情報を用いて基準座標系を推定することで、また当該推定結果に基づいて寸法測定を行うことで、ARシステム1に寄与する。   FIG. 1 shows a configuration diagram as an embodiment of an AR system using an image processing apparatus according to the present invention, and the outline of the present invention will be described with reference to FIG. The AR system 1 includes an imaging device 10, an information display device 11, a database 12, and an image processing device 2. The image processing apparatus 2 contributes to the AR system 1 by estimating the reference coordinate system using the index and the arrangement information of the plurality of geometric features, and measuring the dimensions based on the estimation result.

撮像装置10は、カメラ画像を取得する装置であり、市販のWEBカメラのほか、携帯電話端末に搭載されているカメラモジュールを用いてもよい。なお本発明の撮像装置10においては、焦点距離や光軸のずれ、歪みパラメータ等の内部パラメータが事前のキャリブレーションにより既知であるものとする。   The imaging device 10 is a device that acquires a camera image. In addition to a commercially available WEB camera, a camera module mounted on a mobile phone terminal may be used. In the imaging apparatus 10 of the present invention, it is assumed that internal parameters such as a focal length, an optical axis shift, and a distortion parameter are known by prior calibration.

撮像対象は、一般的なARシステムでは単一の指標であるのに対し、本発明では単一の指標に加えて複数の幾何特徴を含む。このとき、指標及び全ての幾何特徴が必ずしも同一平面上にある必要はない。図1ではこのような現実世界における撮像対象の例が(1)に示されている。すなわち、指標1及び幾何特徴2が同一平面P1上に存在し、またこれとは別途、別平面P2上に幾何特徴3が存在している。   The imaging target is a single index in a general AR system, while the present invention includes a plurality of geometric features in addition to the single index. At this time, the index and all the geometric features are not necessarily on the same plane. In FIG. 1, an example of such an imaging target in the real world is shown in (1). That is, the index 1 and the geometric feature 2 exist on the same plane P1, and separately from this, the geometric feature 3 exists on another plane P2.

以下、指標及び幾何特徴がP1のような同一平面上にある場合をまず説明した後に、幾何特徴がP2のような別平面上にもある場合を説明する。なお、図1の(2)及び(3)は後の説明において参照する。   Hereinafter, the case where the index and the geometric feature are on the same plane as P1 will be described first, and then the case where the geometric feature is also on another plane such as P2. Note that (2) and (3) in FIG. 1 will be referred to in later description.

なおまた、幾何特徴とは指標に準じた利用ができるものであり、図1にも模式的に示すように、平面上において2組の平行線及び/又は直交線を検出可能なように構成されたものである。詳しくは後述する。   In addition, geometric features can be used in accordance with indices, and are configured to detect two sets of parallel lines and / or orthogonal lines on a plane as schematically shown in FIG. It is a thing. Details will be described later.

画像処理装置2によれば、指標及び幾何特徴を検出し、図1の例であれば(2)に示すような指標1の定める平面P1上の基準座標系XYZを、撮像装置10に対する姿勢として推定することができる。さらに当該推定結果に基づいて、画像処理装置2は撮像対象の寸法測定を行うことができる。   According to the image processing apparatus 2, the index and the geometric feature are detected, and in the example of FIG. 1, the reference coordinate system XYZ on the plane P1 defined by the index 1 as shown in (2) is set as the attitude with respect to the imaging apparatus 10. Can be estimated. Furthermore, based on the estimation result, the image processing apparatus 2 can measure the size of the imaging target.

図2は撮像対象の一例としての直方体を示すものであり、その辺S1〜S9が撮像画像上において見えている様子が示されている。画像処理装置2は指標1が設置された直方体の上面S1-S8-S2-S7における基準座標系を、当該指標1および幾何特徴を検出することによって推定し、また、当該上面S1-S8-S2-S7の各辺や、当該面上のユーザ指定の所定箇所の寸法測定を行うことができる。   FIG. 2 shows a rectangular parallelepiped as an example of the imaging target, and shows that the sides S1 to S9 are visible on the captured image. The image processing apparatus 2 estimates the reference coordinate system on the upper surfaces S1-S8-S2-S7 of the rectangular parallelepiped where the index 1 is installed by detecting the index 1 and the geometric feature, and the upper surface S1-S8-S2 -Measure dimensions of each side of S7 and user-specified predetermined locations on the surface.

さらに、後述の指標1と別平面上の幾何特徴を利用する場合においては、直方体の幅、奥行き又は高さに対応する辺S1〜S9や、各面上のユーザ指定の所定箇所の寸法測定を高精度に行うことができる。この際、サイズは指標1についてのみ既知であればよく、直方体については当該立体が直方体であることのみ既知であればよく、未知の各辺のサイズの寸法測定が可能となる。   Furthermore, in the case of using geometric features on a different plane from the index 1 described later, the dimensions S1 to S9 corresponding to the width, depth, or height of the rectangular parallelepiped and the user-specified predetermined location on each surface are measured. It can be performed with high accuracy. At this time, the size only needs to be known only for the index 1, and for the rectangular parallelepiped, it is only necessary to know that the solid is a rectangular parallelepiped, and the dimensions of each unknown side can be measured.

幾何特徴としては、指標1と同一平面上の上面S1-S8-S2-S7が形成する長方形を利用することができる。さらに、後述の指標1と別平面上の幾何特徴も利用する場合においては、対象が直方体であることから導かれる辺S1〜S9の一部又は全部に関する辺同士の直交関係及び/又は平行関係を利用することができる。具体的には図示するように辺S1〜S3、辺S4〜S6及び辺S7〜S9の各組内に属する辺同士が平行であり、当該関係に基づく幾何特徴を利用することができる。   As the geometric feature, a rectangle formed by the upper surfaces S1-S8-S2-S7 on the same plane as the index 1 can be used. Furthermore, in the case of using a geometric feature on a different plane from the index 1 described later, the orthogonal relationship and / or the parallel relationship between the sides regarding part or all of the sides S1 to S9 derived from the target being a rectangular parallelepiped. Can be used. Specifically, as shown in the figure, the sides belonging to each set of sides S1 to S3, sides S4 to S6, and sides S7 to S9 are parallel to each other, and a geometric feature based on the relationship can be used.

情報表示装置11は、テキスト、動画像又はCG(コンピュータ・グラフィック)等を表示するための装置であり、PC(パーソナル・コンピュータ)やテレビのディスプレイ、またはヘッドマウントディスプレイを使用してもよい。また、携帯電話端末のように撮像装置と情報処理装置とが筐体を共有しているものでもよい。また、後述する寸法測定の際に、採寸する線分をユーザがポインティングにより指定できるようにタッチパネルを搭載していることが望ましい。   The information display device 11 is a device for displaying text, moving images, CG (computer graphics) or the like, and may use a PC (personal computer), a television display, or a head-mounted display. In addition, the imaging device and the information processing device may share a casing like a mobile phone terminal. In addition, it is desirable that the touch panel is mounted so that the user can specify a line segment to be measured by pointing at the time of dimension measurement described later.

ARシステムでは、撮像装置が取得した動画像にCG等を重畳表示するのが一般的であり、本実施形態においても同様に推定した基準座標系の任意の位置にCG等を表示してもよい。また、寸法測定を行った場合であれば、測定した寸法情報のみ表示してもよい。   In the AR system, it is common to superimpose and display CG or the like on the moving image acquired by the imaging apparatus. In this embodiment, CG or the like may be displayed at an arbitrary position in the estimated reference coordinate system. . Further, if dimension measurement is performed, only measured dimension information may be displayed.

データベース12は、データを記録する装置であり、ハードディスクやフラッシュメモリ等の不揮発性メモリストレージや、PCの主記憶装置に一般的に使用される揮発性メモリを用いてもよい。本実施形態では少なくとも、撮像装置10の内部パラメータと、指標の形状及び大きさとが記録され画像処理装置2での利用に供されるが、利用環境に応じた必要情報を画像処理装置2にて保持しておいてもよい。   The database 12 is a device for recording data, and may be a non-volatile memory storage such as a hard disk or a flash memory, or a volatile memory generally used for a main storage device of a PC. In the present embodiment, at least the internal parameters of the imaging device 10 and the shape and size of the index are recorded and used for the image processing device 2. However, the image processing device 2 provides necessary information according to the usage environment. You may keep it.

データベース12にはさらに、重畳表示するCGのモデルその他の付随情報を記録しておいてもよい。付随情報には本発明の応用的な利用における一例として、寸法を測定した際に付加表示する情報、例えば配送用の段ボール箱等の寸法を測定した場合における寸法毎の配送料金を記録しておいてもよい。   The database 12 may further record a CG model to be superimposed and other accompanying information. As an example of the applied use of the present invention, the additional information records information additionally displayed when the dimensions are measured, for example, a delivery fee for each dimension when the dimensions of a cardboard box for delivery are measured. May be.

図3は、画像処理装置2の機能ブロック図である。画像処理装置2は、撮像画像取得部3、指標検出部4、初期姿勢算出部5、幾何特徴検出部6、初期配置推定部7、基準座標系推定部8及び寸法計測部9を備える。初期姿勢算出部5は、行列算出部51及び行列分解部52を含む。初期配置推定部7は、歪み補正部71、行列構成部72及び推定部73を含む。当該各部の概要は以下の通りである。   FIG. 3 is a functional block diagram of the image processing apparatus 2. The image processing apparatus 2 includes a captured image acquisition unit 3, an index detection unit 4, an initial posture calculation unit 5, a geometric feature detection unit 6, an initial arrangement estimation unit 7, a reference coordinate system estimation unit 8, and a dimension measurement unit 9. The initial posture calculation unit 5 includes a matrix calculation unit 51 and a matrix decomposition unit 52. The initial arrangement estimation unit 7 includes a distortion correction unit 71, a matrix configuration unit 72, and an estimation unit 73. The outline of each part is as follows.

なお本発明において、当該各部の扱う各対象に対する用語、特に空間上ないし平面上の関係に言及する用語に関して、以下のような区別を設けて用いるものとする。
(1)「姿勢」…平面射影変換の関係として表現される撮像装置(撮像装置座標系)に対
する指標(指標座標系もしくは基準座標系)の位置姿勢、もしくはその逆関係として、指
標に対する撮像装置に位置姿勢を示す用語。3次元空間における位置と姿勢とを決定する6次元ベクトルのパラメータであり、位置と姿勢を指すことから一般に「位置姿勢」と表現されるが、本稿では位置と姿勢をまとめて「姿勢」と表現する。
(2)「位置及び向き」…平面射影変換行列をピクセル座標系の指標に適用することによ
り求まる基準座標系の一平面における指標や幾何特徴の位置及び向きを示す用語。
(3)「配置」…基準座標系の一平面またはピクセル座標系における指標間の位置関係を
示す用語。本稿では、(2)の「位置及び向き」が主に単一のオブジェクト(指標や幾何特徴)について言及する際に用いられるに対し、「配置」は主に複数のオブジェクトについて言及する際に、それらの相対的な位置関係を示すのに用いられる。
Note that in the present invention, the following distinctions are used with respect to the terms for the objects handled by the respective parts, particularly the terms referring to the relationship in space or plane.
(1) “Attitude”: Position and orientation of an index (index coordinate system or reference coordinate system) with respect to an imaging apparatus (imaging apparatus coordinate system) expressed as a planar projective transformation relationship, or vice versa, Term indicating position and orientation. It is a 6-dimensional vector parameter that determines the position and orientation in 3D space, and is generally expressed as “position and orientation” because it refers to the position and orientation. To do.
(2) “Position and orientation”: a term indicating the position and orientation of an index or geometric feature in one plane of a reference coordinate system obtained by applying a plane projection transformation matrix to an index of a pixel coordinate system.
(3) “Arrangement”: a term indicating the positional relationship between indices in one plane of the reference coordinate system or in the pixel coordinate system. In this article, “position and orientation” in (2) is mainly used when referring to a single object (indicator or geometric feature), whereas “placement” is mainly used when referring to multiple objects. Used to indicate their relative positional relationship.

撮像画像取得部3は、撮像装置10から撮像画像を取得し、指標検出部4及び幾何特徴検出部6へと入力する。指標検出部4は、入力された撮像画像から指標を検出し、初期姿勢算出部5へと入力する。幾何特徴検出部6は、入力された撮像画像から幾何特徴を検出し、初期配置推定部7に入力する。   The captured image acquisition unit 3 acquires a captured image from the imaging device 10 and inputs the acquired image to the index detection unit 4 and the geometric feature detection unit 6. The index detection unit 4 detects an index from the input captured image and inputs it to the initial posture calculation unit 5. The geometric feature detection unit 6 detects a geometric feature from the input captured image and inputs it to the initial arrangement estimation unit 7.

初期姿勢算出部5はまず行列算出部51において、指標検出部4にて検出された指標より、当該指標の撮像装置10に対する初期姿勢を算出する。当該初期姿勢はすなわち当該指標により表される基準座標系の撮像装置10に対する姿勢でもある。当該算出の際、データベース12に記録され又は画像処理装置2にて保持されることで予め既知の、基準座標系における指標の配置としての初期配置と、指標検出部4にて検出された指標の撮像画像上における配置と、の間で平面射影変換を求めることで、初期姿勢を算出する。   First, in the matrix calculation unit 51, the initial attitude calculation unit 5 calculates the initial attitude of the index with respect to the imaging device 10 from the index detected by the index detection unit 4. That is, the initial posture is also a posture with respect to the imaging device 10 in the reference coordinate system represented by the index. At the time of the calculation, the initial arrangement as the arrangement of the index in the reference coordinate system, which is recorded in the database 12 or held in the image processing apparatus 2 in advance, and the index detected by the index detection unit 4 An initial posture is calculated by obtaining a planar projective transformation between the arrangement on the captured image.

なお初期姿勢とは、後段の基準座標系推定部8においてより高精度に基準座標系の姿勢を求めるので、その前段におけるいわば中間データとして「初期」姿勢と称するものとする。初期配置は基準座標系における指標及び幾何特徴の配置を表すものであり、指標の初期配置は予め既知である一方で、幾何特徴の初期配置は未知である。前述の初期姿勢をもとに推定されるものであるため、初期配置と呼ぶこととする。   The initial posture is referred to as an “initial” posture as so-called intermediate data in the previous stage because the subsequent reference coordinate system estimation unit 8 obtains the posture of the reference coordinate system with higher accuracy. The initial arrangement represents the arrangement of indices and geometric features in the reference coordinate system. The initial arrangement of indices is known in advance, while the initial arrangement of geometric features is unknown. Since it is estimated based on the above-mentioned initial posture, it will be referred to as an initial arrangement.

初期姿勢算出部5はさらに、行列分解部52において当該初期姿勢の表す平面射影変換を分解して、初期配置推定部7における幾何特徴の初期配置の推定処理のために必要な所定の情報を求め、当該情報を初期配置推定部7へと入力する。   The initial posture calculation unit 5 further decomposes the planar projective transformation represented by the initial posture in the matrix decomposition unit 52 to obtain predetermined information necessary for the initial layout estimation process of the geometric feature in the initial layout estimation unit 7. The information is input to the initial arrangement estimation unit 7.

初期配置推定部7は、行列分解部52から入力された幾何特徴の初期配置を決定する情報をもとに、幾何特徴検出部6が検出した幾何特徴の基準座標系における初期配置を推定し、基準座標系推定部8へと入力する。なお当該初期配置は、初期姿勢算出部5の初期姿勢に基づく行列分解部52からの情報によって推定されるために、そのように称するものとする。   The initial arrangement estimation unit 7 estimates the initial arrangement in the reference coordinate system of the geometric features detected by the geometric feature detection unit 6 based on the information for determining the initial arrangement of the geometric features input from the matrix decomposition unit 52, Input to the reference coordinate system estimation unit 8. Since the initial arrangement is estimated based on the information from the matrix decomposition unit 52 based on the initial posture of the initial posture calculation unit 5, it is referred to as such.

基準座標系推定部8は、入力された幾何特徴の初期配置及び行列算出部51が初期姿勢を算出するのに用いたのと同一の指標の初期配置と、当該幾何特徴及び指標の撮像画像上における配置と、の全体としての対応関係から指標の定める基準座標系の撮像装置10に対する姿勢を推定する。当該推定結果は画像処理装置2の一つの出力となると共に、さらに寸法計測部9へも入力される。   The reference coordinate system estimation unit 8 is configured to input the initial arrangement of geometric features and the initial arrangement of the same indices used by the matrix calculation unit 51 to calculate the initial posture, and on the captured image of the geometric features and indices. The orientation of the reference coordinate system determined by the index with respect to the imaging device 10 is estimated from the overall correspondence relationship with the arrangement in FIG. The estimation result becomes one output of the image processing apparatus 2 and is also input to the dimension measuring unit 9.

寸法計測部9は入力された基準座標系の姿勢及び既知の指標の大きさに基づき、撮像対象の所定箇所の寸法を計測することで当該画像処理装置2のもう一つの出力となす。   The dimension measuring unit 9 measures another dimension of a predetermined portion of the imaging target based on the input orientation of the reference coordinate system and the size of a known index, thereby providing another output of the image processing apparatus 2.

以下、各部の処理の詳細につき説明する。   The details of the processing of each unit will be described below.

撮像画像取得部3は、撮像装置10から撮像画像を取得し、指標検出部4及び幾何特徴検出部6に入力する。撮像装置10から撮像画像取得部3が取得する撮像画像の画像サイズは限定しないが、後述する指標及び幾何特徴の検出処理等における座標の丸め誤差の観点から解像度が高い方が望ましく、撮像装置10の撮像画像をそのまま指標検出部4及び幾何特徴検出部6に渡すのが望ましい。リアルタイム処理などで負荷が大きい場合は、所定の解像度に下げてから渡してもよい。   The captured image acquisition unit 3 acquires a captured image from the imaging device 10 and inputs the acquired image to the index detection unit 4 and the geometric feature detection unit 6. The image size of the captured image acquired by the captured image acquisition unit 3 from the imaging device 10 is not limited, but a higher resolution is desirable from the viewpoint of coordinate rounding errors in the index and geometric feature detection processing described later, and the imaging device 10 It is desirable to pass the captured image directly to the index detection unit 4 and the geometric feature detection unit 6. When the load is large due to real-time processing or the like, it may be delivered after being lowered to a predetermined resolution.

指標検出部4は、入力された撮像画像から指標を検出し、初期姿勢算出部5に入力する。指標として利用できるオブジェクトは、大きさと配置が既知である点を少なくとも4つ以上有し(この状態を形状が既知であると表現する)、それぞれに対し撮像画像において対応する点を特定できるものであればよい。ここで、後段の行列算出部51による姿勢算出を可能とするため、4つ以上の点を有する必要がある。また、点ではなく線分の対応が求まるものでもよいし、当該4つ以上の点又は線分と同等に利用できる構成を有し撮像画像において識別可能な任意の指標を利用してよい。   The index detection unit 4 detects the index from the input captured image and inputs the detected index to the initial posture calculation unit 5. An object that can be used as an index has at least four points whose sizes and arrangements are known (this state is expressed as a known shape), and can identify a corresponding point in the captured image for each. I just need it. Here, in order to enable posture calculation by the matrix calculation unit 51 in the subsequent stage, it is necessary to have four or more points. Further, it may be possible to obtain the correspondence of a line segment instead of a point, or an arbitrary index that can be used in the same manner as the four or more points or line segments and that can be identified in a captured image may be used.

図4の(1)はARシステムにおいて一般的な正方指標を示したものであり、内部の模様を認識することで頂点A、頂点B、頂点C、及び頂点Dの各対応点を撮像画像から抽出することができる。指標における点または線分の配置は、指標に任意の位置と向きとに設定した基準座標系により指定することが可能である。本発明ではこのような設定における基準座標系での指標の配置情報を初期配置として予め定めておく。   (1) in FIG. 4 shows a general square index in the AR system, and by recognizing the internal pattern, the corresponding points of vertex A, vertex B, vertex C, and vertex D are taken from the captured image. Can be extracted. The arrangement of the points or line segments in the index can be specified by a reference coordinate system set to an arbitrary position and orientation on the index. In the present invention, the marker placement information in the reference coordinate system in such a setting is determined in advance as the initial placement.

例えば、指標が正方指標である場合は、図4の(2)に示すように正方指標の重心を基準座標系の原点としてもよい。これにより4頂点の座標が定まり、予め初期配置として既知の基準座標系における頂点の座標とそれに対応する撮像画像中の頂点の座標とを1組として、少なくとも4組以上の頂点座標が初期姿勢算出部5に入力される。   For example, when the index is a square index, the center of gravity of the square index may be set as the origin of the reference coordinate system as shown in (2) of FIG. As a result, the coordinates of the four vertices are determined, and the coordinates of the vertices in a known reference coordinate system and the corresponding coordinates of the vertices in the captured image are set as an initial arrangement, and at least four or more vertex coordinates are calculated as initial postures. Input to part 5.

指標検出処理を簡略化するために、図4の(3)に示すように指標に枠領域を設けてもよい。これにより撮像画像に2値化を施すことで指標領域を確実に抽出でき、指標領域の内部を認識することで指標の向きを検知することができる。枠を設けるのが困難である場合は、タッチパネル搭載のディスプレイ等を用いたポインティング等のユーザからの直接指定により指標領域を検出してもよい。以上の指標検出に際する各種処理及び工夫は、次に説明する幾何特徴の検出においても同様に適用可能である。   In order to simplify the index detection process, a frame area may be provided in the index as shown in (3) of FIG. Thus, the index region can be reliably extracted by binarizing the captured image, and the direction of the index can be detected by recognizing the inside of the index region. When it is difficult to provide a frame, the index region may be detected by direct designation from the user, such as pointing using a display equipped with a touch panel. The various processes and devices for detecting the index described above can be similarly applied to the detection of geometric features described below.

幾何特徴検出部6は、入力された撮像画像から幾何特徴を検出し、初期配置推定部7に入力する。幾何特徴は指標のように予め完全には既知である必要はなく、現実世界に存在する各種の幾何形状より高い自由度のもとで検出が可能である。すなわち、幾何特徴は指標のように配置が既知である点を有する必要がなく、幾何形状に内在する特定の幾何特徴を撮像画像内で特定できるものであればよい。   The geometric feature detection unit 6 detects a geometric feature from the input captured image and inputs it to the initial arrangement estimation unit 7. The geometric feature does not need to be completely known in advance like an index, and can be detected with a higher degree of freedom than various geometric shapes existing in the real world. That is, the geometric feature does not need to have a point whose arrangement is known like an index, and any geometric feature may be used as long as a specific geometric feature existing in the geometric shape can be specified in the captured image.

ここで幾何特徴とは具体的には、平行線または直交線を指す。図5A及び図5Bは該当の幾何特徴を有する幾何形状の一例を示している。図5Aに示す幾何形状は、線分AB及び線分DCと、線分AD及び線分BCとがそれぞれ平行であるという拘束条件しか有しておらず、辺の長さに関する拘束条件は有していない。同様に、図5Bに示す直角三角形は、線分CA及び線分CBが直角であるという拘束条件しか有していない。   Here, the geometric feature specifically refers to a parallel line or an orthogonal line. 5A and 5B show an example of a geometric shape having a corresponding geometric feature. The geometric shape shown in FIG. 5A has only a constraint condition that the line segment AB and the line segment DC and the line segment AD and the line segment BC are parallel to each other, and there is a constraint condition regarding the length of the side. Not. Similarly, the right triangle shown in FIG. 5B has only a constraint that the line segment CA and the line segment CB are at right angles.

つまり、図3に示す指標の例では頂点A、頂点B、頂点C及び頂点Dの基準座標系における座標が既知であり、その4点から構成される正方形の基準座標系における位置及び向きが既知であったのに対し、図5A及び図5Bに示す幾何形状に関しては、基準座標系における位置及び向きが未知となっている。   That is, in the example of the index shown in FIG. 3, the coordinates of the vertex A, vertex B, vertex C, and vertex D in the reference coordinate system are known, and the position and orientation in the square reference coordinate system composed of the four points are known. On the other hand, the position and orientation in the reference coordinate system are unknown for the geometric shapes shown in FIGS. 5A and 5B.

幾何特徴検出部6はこのような平行関係及び/又は直交関係としての幾何特徴を撮像画像より抽出する。この際、指標検出部4と同様に撮像画像からエッジ検出によって線分(指標を構成する線分は除く)を検出し、そのうちの所定の線分に対して平行関係及び/又は直交関係を特定するようにすればよい。この際、線分の近傍の既知の色特徴によって平行関係及び/又は直交関係が自動判定可能となるようにしてもよい。   The geometric feature detection unit 6 extracts the geometric features as such parallel relationship and / or orthogonal relationship from the captured image. At this time, in the same manner as the index detection unit 4, the line segment (excluding the line segment constituting the index) is detected from the captured image by edge detection, and the parallel relationship and / or the orthogonal relationship is specified for the predetermined line segment. You just have to do it. At this time, the parallel relationship and / or the orthogonal relationship may be automatically determined by a known color feature in the vicinity of the line segment.

例えば白地の壁に任意サイズの赤色の長方形の看板等が設置されており、当該長方形における平行及び直角を幾何特徴として利用するように予め決めている場合は、エッジ検出及びエッジ周辺の色特徴の確認によって当該長方形の境界を自動検出し、当該境界上の各辺より平行関係及び/又は直交関係を求めるようにしてよい。   For example, if a red rectangular signboard of an arbitrary size is installed on a white wall and the parallelism and right angle in the rectangle are predetermined to be used as geometric features, edge detection and color features around the edges The boundary of the rectangle may be automatically detected by confirmation, and the parallel relationship and / or the orthogonal relationship may be obtained from each side on the boundary.

あるいは検出線分をユーザに目視確認させるようにして、その中からユーザ自身によって平行関係及び/又は直交関係を表しているのはいずれの線分であるか決定し、当該決定の情報を前述のポインティング操作等を介して幾何特徴検出部6で受け付けるようにしてもよい。例えば図2のような場合であれば検出した線分S1〜S9の中からユーザが決定するようにしてよい。   Alternatively, the user is allowed to visually check the detected line segment, and the user himself / herself determines which line segment represents the parallel relationship and / or the orthogonal relationship, and the information on the determination is described above. The geometric feature detection unit 6 may receive the information via a pointing operation or the like. For example, in the case of FIG. 2, the user may determine from the detected line segments S1 to S9.

なお、線分を用いて説明したが、指標検出部4と同じく点検出により線分の両端に対応する点を対象として、又は線分及び点の両方を対象として、又は同等な平行関係及び/又は直交関係を特定可能な任意のものを対象として、幾何特徴検出部6は同様な処理が可能である。   Although the description has been given using the line segment, the point corresponding to both ends of the line segment by the point detection as in the index detection unit 4, or both the line segment and the point, or the equivalent parallel relationship and / or Alternatively, the geometric feature detection unit 6 can perform the same processing for any object that can specify an orthogonal relationship.

初期姿勢算出部5ではまず行列算出部51が撮像画像上において検出された指標から基準座標系の初期姿勢を平面射影変換行列として求める。その後に行列分解部52が、後述の行列構成部72において各幾何特徴の初期姿勢を決定する際に利用する情報を抽出し、当該情報を行列構成部72へ入力する。   In the initial posture calculation unit 5, first, the matrix calculation unit 51 obtains the initial posture of the reference coordinate system as a planar projective transformation matrix from the index detected on the captured image. Thereafter, the matrix decomposition unit 52 extracts information used when determining the initial posture of each geometric feature in the matrix configuration unit 72 described later, and inputs the information to the matrix configuration unit 72.

当該利用する情報とは具体的には、指標の初期姿勢に対応する平面射影変換行列を相似変換行列とアフィン変換行列と射影変換行列との積に分解することにより得られる相似変換行列、又は相似変換行列及びアフィン変換行列である。前者(相似変換行列)が後述の第1実施形態に、後者(相似変換行列及びアフィン変換行列)が第2実施形態に対応する。   Specifically, the information to be used is a similarity transformation matrix obtained by decomposing a planar projection transformation matrix corresponding to the initial posture of the index into a product of a similarity transformation matrix, an affine transformation matrix, and a projection transformation matrix, or a similarity It is a transformation matrix and an affine transformation matrix. The former (similar transformation matrix) corresponds to the first embodiment described later, and the latter (similar transformation matrix and affine transformation matrix) corresponds to the second embodiment.

行列算出部51における指標の初期姿勢は、同一平面上の少なくとも4組の点の対応または線分の対応から平面射影変換行列を求める計算により算出される。当該計算はCGを重畳表示するARシステムにおいては一般的であるため、詳細は割愛する。以下、当該平面射影変換行列は図6に概念的に示すように基準座標系から撮像画像への写像として求めたものとして述べるが、いずれを順写像・逆写像と呼ぶかは定義の問題に過ぎないので、この逆写像として求めてもよい。   The initial posture of the index in the matrix calculation unit 51 is calculated by calculating a plane projection transformation matrix from the correspondence of at least four sets of points on the same plane or the correspondence of line segments. Since this calculation is common in an AR system that superimposes and displays CG, details are omitted. In the following, the planar projective transformation matrix is described as a mapping from the reference coordinate system to the captured image as conceptually shown in FIG. 6, but it is only a matter of definition which is called forward mapping or reverse mapping. Since there is not, you may obtain | require as this reverse mapping.

図6では、指標の例として図4に示したような正方指標が当該行列の定義に従い、平面射影変換行列Hにより基準座標系から撮像画像系へと変換され、その逆行列H−1により再び基準座標系へと変換されている。すなわち、基準座標系における点を(Xm,Ym)、撮像画像系におけるその対応点を(u,v)、sをスケール係数とすると、行列算出部51の求める平面射影変換行列Hは3×3行列であり、 In FIG. 6, as an example of the index, a square index as shown in FIG. 4 is converted from the reference coordinate system to the captured image system by the plane projection transformation matrix H according to the definition of the matrix, and again by the inverse matrix H− 1. It has been converted to the reference coordinate system. That is, when the point in the reference coordinate system is (X m , Y m ), the corresponding point in the captured image system is (u, v), and s is the scale factor, the plane projection transformation matrix H that the matrix calculation unit 51 obtains is 3 × 3 matrix,

という関係式(式1)が成立する。   The following relational expression (Formula 1) holds.

行列分解部52の処理において前提となる数学的関係につき説明する。非特許文献1によれば、任意の平面射影変換行列Hanyは、大きさ、位置及び向きの変換に対応する相似変換行列HS、アフィン歪みの変換に対応するアフィン変換行列HA及び射影歪みの変換に対応する射影変換行列HPをそれぞれ、 A mathematical relationship that is a premise in the processing of the matrix decomposition unit 52 will be described. According to Non-Patent Document 1, an arbitrary plane projective transformation matrix H any includes a similarity transformation matrix H S corresponding to the transformation of size, position, and orientation, an affine transformation matrix H A corresponding to transformation of affine distortion, and projection distortion. and the projective transformation matrix H P corresponding to the conversion,

の(式2)〜(式4)のように表したとき、(式3)中のKに関してdet(K)=1という制約の下で
Hany = HS HA HP …(式5)
という形式に一意に分解できる。行列分解部52は(式6)に示すように行列算出部51が算出した行列Hの逆行列H−1につき上記分解を実行し、後述の第1実施形態では相似変換行列HSを、第2実施形態では相似変換行列HS及びアフィン変換行列HAを、行列構成部72へと入力する。なお、逆行列H−1を対象として分解を実行するのは、後述する行列構成部72での処理に合うようにするためである。
H−1= HS HA HP …(式6)
(Equation 2) to (Equation 4) of (Equation 3) under the constraint that det (K) = 1 for K in (Equation 3)
H any = H S H A H P (Formula 5)
Can be uniquely decomposed into the form The matrix decomposition unit 52 performs the above decomposition on the inverse matrix H −1 of the matrix H calculated by the matrix calculation unit 51 as shown in (Equation 6). In the first embodiment described later, the similarity conversion matrix H S In the second embodiment, the similarity transformation matrix H S and the affine transformation matrix H A are input to the matrix configuration unit 72. The reason why the decomposition is performed on the inverse matrix H −1 is to make it suitable for processing in the matrix construction unit 72 described later.
H −1 = H S H A H P (Formula 6)

[非特許文献1] R. Hartley and A. Zisserman: "Multiple view geometry in computer vision, second edition," Cambridge University Press, 2003.   [Non-Patent Document 1] R. Hartley and A. Zisserman: "Multiple view geometry in computer vision, second edition," Cambridge University Press, 2003.

初期配置推定部7は、行列分解部52より入力された幾何特徴の初期姿勢を決定するための情報をもとに基準座標系における幾何特徴の初期配置を推定する。具体的には、まず歪み補正部71において、第2実施形態の場合であれば幾何特徴をもとに撮像画像から射影歪みを取り除く射影変換行列を計算し、第1実施形態の場合であれば当該射影変換行列に加えてさらに、当該射影歪みが除去された撮像画像からさらにアフィン歪みを取り除くアフィン変換行列を計算する。   The initial arrangement estimation unit 7 estimates the initial arrangement of the geometric features in the reference coordinate system based on the information for determining the initial posture of the geometric features input from the matrix decomposition unit 52. Specifically, first, in the case of the second embodiment, the distortion correction unit 71 calculates a projection transformation matrix that removes the projection distortion from the captured image based on the geometric feature, and in the case of the first embodiment. In addition to the projective transformation matrix, an affine transformation matrix for further removing affine distortion from the captured image from which the projection distortion has been removed is calculated.

行列構成部72は歪み補正部71が当該計算した変換行列と行列分解部52から入力された行列との積として平面射影変換行列を構成する。さらに、当該構成された平面射影変換行列を用いて推定部73が幾何特徴の初期配置を推定し、基準座標系推定部8へと入力する。   The matrix construction unit 72 constructs a planar projective transformation matrix as the product of the transformation matrix calculated by the distortion correction unit 71 and the matrix input from the matrix decomposition unit 52. Further, the estimation unit 73 estimates the initial arrangement of the geometric features using the configured planar projective transformation matrix and inputs it to the reference coordinate system estimation unit 8.

以下、歪み補正部71における幾何特徴から該当の変換行列を計算する手順について述べた後、行列構成部72及び推定部73における平面射影変換行列を構成して幾何特徴の初期姿勢を推定する手順について述べる。   Hereinafter, after describing the procedure for calculating the corresponding transformation matrix from the geometric feature in the distortion correction unit 71, the procedure for estimating the initial posture of the geometric feature by constructing the planar projection transformation matrix in the matrix construction unit 72 and the estimation unit 73 State.

非特許文献1によれば、基準座標系の同一平面における方向が異なる2組の平行線から無限遠直線を特定でき、射影的な歪みに対応するHPを求めることができる。本発明では当該HPを幾何特徴における歪み除去に利用する。 According to Non-Patent Document 1, the line at infinity be specified direction in the same plane of the reference coordinate system from two different sets of parallel lines, it is possible to obtain the H P corresponding to the projection distortion. The present invention utilizes the H P distortion removal in geometric features.

すなわち、撮像画像における無限遠直線の同次座標表現をl = (l1, l2, l3)としたとき、以下の(式7)により定義されるH1は、(式5)又は(式6)中のHPに相当する。 That is, when the homogeneous coordinate representation of the infinity line in the captured image is l = (l 1 , l 2 , l 3 ), H 1 defined by the following (Equation 7) is (Equation 5) or ( Corresponds to HP in equation 6).

当該HP=H1より、撮像画像の点をxとすると、
x' = HP x …(式8)
により撮影画像から射影歪みを除去することが可能であるので、本発明ではこの関係を幾何特徴に対して適用する。
From H P = H 1 , if the point of the captured image is x,
x '= H P x (Equation 8)
Thus, the projection distortion can be removed from the photographed image, so that the present invention applies this relationship to the geometric feature.

例えば、図7に示すような撮像画像上において歪んで見えている四角形abcdが基準座標系においては平行四辺形を成す場合、つまり基準座標系において平行線を構成する線分の組が線分ab及び線分dcと、線分ad及び線分bcとで定義される場合、点a、点b、点c及び点dを同次座標として、
l = ((a×b) ×(d×c))×((a×d) ×(b×c)) …(式9)
と表現することができ(×は外積)、上述の構成により(式7)のHP=H1を計算することが可能であるので、平行関係を本来有している幾何特徴の歪みを除去して、平行関係を有する状態まで戻すことができる。なお、無限遠直線lは図7に示すように、直線ad及びbcの交点eと、直線ab及びcdの交点fとを通る直線として構成される。
For example, when a quadrangle abcd that appears distorted on the captured image as shown in FIG. 7 forms a parallelogram in the reference coordinate system, that is, a set of line segments that form parallel lines in the reference coordinate system is a line segment ab And a line segment dc and a line segment ad and a line segment bc, the point a, the point b, the point c, and the point d are set as homogeneous coordinates,
l = ((a x b) x (d x c)) x ((a x d) x (b x c)) (Equation 9)
(× is an outer product) and with the above configuration, it is possible to calculate H P = H 1 in (Equation 7), so the distortion of geometric features that originally have a parallel relationship is eliminated. Thus, it is possible to return to a state having a parallel relationship. As shown in FIG. 7, the infinity straight line l is configured as a straight line passing through the intersection point e between the straight lines ad and bc and the intersection point f between the straight lines ab and cd.

また、同様に非特許文献1によれば、基準座標系の同一平面における2組の直交線から、上記HPにより射影歪みが除去された撮像画像からさらにアフィン歪みを取り除くHAを求めることができる。本発明ではこの関係も幾何特徴に対して適用することができる。 Further, according Similarly, non-patent document 1, the two pairs of orthogonal lines in the same plane of the reference coordinate system, is possible to obtain the H A further remove affine distortion from the captured image projection distortion has been removed by the H P it can. In the present invention, this relationship can also be applied to geometric features.

すなわち、基準座標系において垂直に交わる線分の組みが線分lと線分m、線分jとkとで定義され、それぞれ射影歪みが除去された撮像画像において同次座標表現されているものとする。このとき、   That is, a set of line segments that intersect perpendicularly in the reference coordinate system is defined by line segment l and line segment m, line segment j and k, and each is expressed in homogeneous coordinates in a captured image from which projection distortion has been removed. And At this time,

と定義されるH2のKに関して、 For H 2 K defined as

かつs12 = s21のもと、s=(s11, s12, s22)Tとすると、 And under s 12 = s 21 and s = (s 11 , s 12 , s 22 ) T ,

という関係式(式12)が構築できる。上式において直交線同士が平行、つまり線分lと線分jが平行でなければベクトルsが求まり、当該ベクトルsの要素を用いて(式11)で定まる行列Sを分解することでKを求め、(式12)よりH2を求めることが可能である。ここで、当該H2の逆行列H2 −1は(式5)又は(式6)中のHAに該当し、(式8)によって射影歪みが除去された撮像画像の点をx'とすると、
x'' = HA x'…(式13)
により射影歪みが除去された撮像画像からさらにアフィン歪みが除去される。
The following relational expression (Formula 12) can be constructed. In the above equation, if the orthogonal lines are not parallel, that is, if the line segment l and the line segment j are not parallel, the vector s is obtained, and K is obtained by decomposing the matrix S determined by (Equation 11) using the elements of the vector s. It is possible to obtain H 2 from (Equation 12). Here, the inverse matrix H 2 -1 of the H 2 and corresponds to H A in (Equation 5) or (6), (Equation 8) x 'points of captured images perspective distortion has been removed by Then
x '' = H A x '... (Formula 13)
Thus, affine distortion is further removed from the captured image from which the projection distortion has been removed.

例えば、図7で説明した歪み除去処理の後の状態として、図8に示すような四角形(平行四辺形)abcdが基準座標系においては正方形を成す場合、つまり基準座標系において直交線を構成する線分の組が線分ab及び線分adと、線分ac及び線分bdとで定義される場合、点a、点b、点c及び点dを同次座標表現として、
l = a×b …(式14)
m =a×d …(式15)
j = a×c …(式16)
k = b×d …(式17)
と表現することができ、この4本の線分から上述の(式11)等によってKを計算でき、従ってさらに(式10)よりH2=HAを計算することが可能である。
For example, as a state after the distortion removal processing described with reference to FIG. 7, when a quadrangle (parallelogram) abcd as shown in FIG. 8 forms a square in the reference coordinate system, that is, an orthogonal line is formed in the reference coordinate system. When a set of line segments is defined by a line segment ab and a line segment ad and a line segment ac and a line segment bd, the point a, the point b, the point c, and the point d are represented as homogeneous coordinate expressions.
l = a × b (Formula 14)
m = a × d (Equation 15)
j = a × c (Equation 16)
k = b × d (Equation 17)
From these four line segments, K can be calculated by the above-described (Equation 11) or the like, and accordingly, H 2 = HA can be calculated further from (Equation 10).

以上の歪み補正部71の処理詳細より明らかなように、少なくとも2組の平行線及び少なくとも2組の直交線が同一平面上に存在するように幾何特徴が構成されている場合(第1実施形態とする)は射影変換行列及びアフィン変換行列を求めることができる。また、少なくとも2組の平行線のみ同一平面上に存在するように幾何特徴が構成されている場合(第2実施形態とする)は射影変換行列を求めることができる。   As is clear from the processing details of the distortion correction unit 71 described above, the geometric feature is configured such that at least two sets of parallel lines and at least two sets of orthogonal lines exist on the same plane (first embodiment). Can obtain a projective transformation matrix and an affine transformation matrix. Further, when the geometric feature is configured such that at least two sets of parallel lines exist on the same plane (referred to as the second embodiment), a projective transformation matrix can be obtained.

なお、幾何特徴の例として例えば長方形は、2組の平行線を有する平行四辺形の特別な場合であるので、第2実施形態を適用することができる。しかし、長方形の4頂点のうち1点を選んで、当該点で交差する1組の直交線の存在を特定すると、既に特定された2組の平行線の条件から残りの3頂点で交差する直交線が自動的に定まってしまう。従って、長方形は2組の平行線及び1組の直交線を有する幾何特徴となるので、第1実施形態を適用することはできない。   As an example of the geometric feature, for example, a rectangle is a special case of a parallelogram having two sets of parallel lines, so the second embodiment can be applied. However, if one point is selected from the four vertices of the rectangle and the existence of a pair of orthogonal lines intersecting at the point is specified, the orthogonality intersecting at the remaining three vertices from the two specified parallel line conditions The line is automatically determined. Therefore, since the rectangle is a geometric feature having two sets of parallel lines and one set of orthogonal lines, the first embodiment cannot be applied.

これに対して長方形をさらに限定して正方形となすと、2組の平行線を特定したうえでさらに、4頂点のうち1点で交差する1組の直交線と、対角線がなす1組の直交線と、を定めることができる。従って、正方形には第1実施形態を適用することができる。   On the other hand, if the rectangle is further limited to a square, then two sets of parallel lines are specified, and then one set of orthogonal lines intersecting at one of the four vertices and one set of orthogonal lines formed by diagonal lines. Lines can be defined. Therefore, the first embodiment can be applied to a square.

図9は以上の歪み補正部71による変換の関係を、次に述べる行列構成部72及び推定部73による処理の関係をも含めてまとめ、概念的に示すものである。   FIG. 9 conceptually shows the relationship of conversion by the distortion correction unit 71 including the relationship of processing by the matrix construction unit 72 and the estimation unit 73 described below.

すなわち、典型例としては正方形のように、幾何特徴がそれぞれ2組の平行関係及び直交関係を有する場合、(1)に示すように撮像画像上で歪んでいても、(式7)〜(式9)で説明したようにその射影歪みの要素HPを求めて(4)に示すように当該歪みを除去し、(2)に示すような平行四辺形の状態となすことができる。さらに、(式10)〜(式17)で説明したようにそのアフィン歪みの要素HAを求めて(5)に示すように当該歪みを除去し、(3)に示すような正方形の状態となすことができる。 That is, as a typical example, when the geometric features have two sets of parallel relationship and orthogonal relationship, such as a square, even if the captured image is distorted as shown in (1), (Equation 7) to (Equation) 9) seeking elements H P of the perspective distortion as described in the distortion is removed as shown in (4) can be formed as parallelogram state as shown in (2). Further, as described in (Expression 10) to (Expression 17), the element HA of the affine distortion is obtained and the distortion is removed as shown in (5), and the square state as shown in (3) is obtained. Can be made.

なお、(3)においてはさらに行列構成部72及び推定部73によって当該歪み除去された幾何特徴を指標の基準座標系に配置した状態となす。すなわち、(5)において括弧内にHsを付記しているように、行列構成部72がさらに(式5)又は(式6)中の相似変換行列Hsに該当するものを行列分解部52より受け取って行列Hを構成することで、推定部73によって幾何特徴を基準座標系における初期配置が(3)のように得られるようになる。当該行列Hにより、幾何特徴を基準座標系と撮像画像系との間で(7)及び(6)に示すように相互変換できるようになる。 In (3), the geometric features from which the distortion has been removed by the matrix construction unit 72 and the estimation unit 73 are further placed in the reference coordinate system of the index. That is, as indicated by Hs in parentheses in (5), the matrix component 72 further corresponds to the similarity transformation matrix H s in (Equation 5) or (Equation 6) from the matrix decomposition unit 52. By receiving and constructing the matrix H, the initial arrangement of the geometric features in the reference coordinate system can be obtained by the estimation unit 73 as shown in (3). With the matrix H, the geometric features can be mutually converted between the reference coordinate system and the captured image system as shown in (7) and (6).

なおまた、図9では幾何特徴が平行関係及び直交関係の両者を有する第1実施形態の場合を示しているが、第2実施形態における平行関係のみの場合であってもアフィン歪み除去の(5)の部分を省略することで、同様に相互変換できるようになる。   FIG. 9 shows the case of the first embodiment in which the geometric features have both a parallel relationship and an orthogonal relationship. However, even in the case of only the parallel relationship in the second embodiment, (5 By omitting the part), mutual conversion can be performed in the same manner.

続いて、幾何特徴を拘束条件とした平面射影変換行列(以下説明するH'−1 )を行列構成部72が構成し、推定部73が幾何特徴の基準座標系における初期配置を推定する手順について説明する。 Subsequently, a procedure for constructing a planar projective transformation matrix (H ′ −1 described below) with geometric features as constraint conditions by the matrix construction unit 72 and estimating the initial arrangement of the geometric features in the reference coordinate system by the estimation unit 73 explain.

第1実施形態によって幾何特徴から射影変換行列H'P及びアフィン変換行列H'Aが得られた場合、行列分解部52より指標から求めた平面射影変換行列Hの逆行列H−1を分解した相似変換行列HSが行列構成部72に入力される。指標の平面射影変換行列の逆行列H−1が、
H−1 = HS HA HP …(式18)
のように分解されたとすると、行列構成部72は幾何特徴に対する新しい平面射影幾何行列H'の逆行列H'−1 を、
H'−1 = HS H'A H'P …(式19)
のように求めることができる。
When the projection transformation matrix H ′ P and the affine transformation matrix H ′ A are obtained from the geometric feature according to the first embodiment, the inverse matrix H −1 of the planar projection transformation matrix H obtained from the index is decomposed by the matrix decomposition unit 52. The similarity transformation matrix H S is input to the matrix construction unit 72. The inverse matrix H −1 of the planar projection transformation matrix of the index is
H −1 = H S H A H P (Equation 18)
The matrix construction unit 72 obtains an inverse matrix H ′ −1 of the new planar projection geometric matrix H ′ for the geometric feature,
H ′ −1 = H S H ′ A H ′ P (Equation 19)
Can be obtained as follows.

そして推定部73は、H'AとH'Pを求めるのに利用した撮像画像内の全ての点をH'−1により基準座標系の点に変換することにより、幾何特徴の初期配置を求める。なお、H'AとH'Pを求めるのに利用した点とは、これらを求めるのに利用した線分の始点及び終点でもよいし、線分上の任意の2点でもよい。線分の状態で変換してもよい。 Then, the estimation unit 73 obtains an initial arrangement of geometric features by converting all points in the captured image used to obtain H ′ A and H ′ P to points in the reference coordinate system by H′− 1. . Note that the points used to determine H ′ A and H ′ P may be the start point and end point of the line segment used to determine these, or two arbitrary points on the line segment. You may convert in the state of a line segment.

同様に、第2実施形態によって幾何特徴から射影変換行列H'Pのみが得られた場合、行列分解部52より指標から求めた平面射影変換行列Hの逆行列を分解した相似変換行列HS及びアフィン変換行列HAが行列構成部72に入力される。このとき、幾何特徴に対する新しい平面射影幾何行列H'の逆行列H'−1は、
H'−1 = HS HA H'P …(式20)
のように求めることができ、第1実施形態で上記説明したのと同様に撮像画像内の幾何特徴の基準座標系における初期配置を計算することができる。以上の処理により、各幾何特徴の初期位置姿勢が計算される。
Similarly, when only the projection transformation matrix H ′ P is obtained from the geometric feature according to the second embodiment, the similarity transformation matrix H S obtained by decomposing the inverse matrix of the planar projection transformation matrix H obtained from the index by the matrix decomposition unit 52 and The affine transformation matrix H A is input to the matrix configuration unit 72. At this time, the inverse matrix H′− 1 of the new planar projective geometric matrix H ′ for the geometric feature is
H ' -1 = H S H A H' P (Equation 20)
The initial arrangement of the geometric features in the captured image in the reference coordinate system can be calculated in the same manner as described above in the first embodiment. With the above processing, the initial position and orientation of each geometric feature is calculated.

基準座標系推定部8は、基準座標系にて予め与えられた指標の初期配置と、基準座標系にて求められた幾何特徴の初期配置を用いて、基準座標系の撮像装置10に対する姿勢を推定する。この推定計算自体については、行列算出部51と同等の処理となる。つまり、基準座標系推定部8では指標及び幾何特徴の初期配置が既知となっているため、指標及び幾何特徴の初期配置を拘束条件として、撮像画像上にて対応する指標及び幾何特徴の各点又は各線分との全体としての対応から撮像装置10の基準座標系における姿勢、つまり基準座標系の撮像装置10に対する姿勢を推定する。   The reference coordinate system estimation unit 8 uses the initial arrangement of indices given in advance in the reference coordinate system and the initial arrangement of geometric features obtained in the reference coordinate system to determine the attitude of the reference coordinate system with respect to the imaging device 10. presume. About this estimation calculation itself, it becomes a process equivalent to the matrix calculation part 51. FIG. That is, since the initial arrangement of the index and the geometric feature is already known in the reference coordinate system estimation unit 8, each point of the corresponding index and the geometric feature on the captured image with the initial arrangement of the index and the geometric feature as a constraint condition Alternatively, the posture of the imaging device 10 in the reference coordinate system, that is, the posture of the reference coordinate system with respect to the imaging device 10 is estimated from the overall correspondence with each line segment.

このとき、点又は線分の対応をもとに求めた平面射影変換行列から得られる撮像装置の位置姿勢パラメータから初期値を算出し、反復手法を用いて再投影誤差関数を最小化するように位置姿勢パラメータを最適化してもよい。   At this time, the initial value is calculated from the position and orientation parameters of the imaging device obtained from the planar projection transformation matrix obtained based on the correspondence of the points or line segments, and the reprojection error function is minimized using an iterative method. The position and orientation parameters may be optimized.

寸法計測部9では推定した基準座標系を用いて立体形状物等の寸法を測定することができる。この際、採寸する箇所と平面を特定する情報が必要になるが、こちらもポインティング等のユーザ指示を用いることが可能である。採寸箇所を基準座標系にて表現してそのサイズ(座標系上の値としての長さで与えられる)を求め、当該サイズの基準座標系における指標のサイズに対する比率を求め、当該比率に指標の現実の寸法を乗ずることによって採寸箇所の現実の寸法が測定される。なお、採寸箇所が指標及び幾何特徴の設置された平面と異なる場合は後述する。   The dimension measuring unit 9 can measure the dimensions of a three-dimensional object or the like using the estimated reference coordinate system. At this time, information for specifying a location and a plane to be measured is required, but it is also possible to use a user instruction such as pointing. Represent the measurement location in the reference coordinate system, find its size (given by the length as a value on the coordinate system), find the ratio of the size to the index size in the reference coordinate system, By multiplying the actual dimension, the actual dimension of the measurement location is measured. In addition, when a measurement location differs from the plane in which the parameter | index and the geometric feature were installed, it mentions later.

図10A〜図10Eは幾何特徴の意義を説明するための一連の図である。図10Aに示すように、指標(指標1とする)を用いる場合、(1)に示す撮像画像系と(2)に示す指標1の定める基準座標系との間で撮像装置10の姿勢に対応する平面射影変換行列H1を(3)に示すように求めることができる。本発明では行列算出部51がこれを担う。 10A to 10E are a series of diagrams for explaining the significance of geometric features. As shown in FIG.10A, when using an index (referred to as index 1), it corresponds to the orientation of the imaging device 10 between the captured image system shown in (1) and the reference coordinate system defined by index 1 shown in (2). The plane projective transformation matrix H 1 to be obtained can be obtained as shown in (3). In the present invention, the matrix calculation unit 51 takes charge of this.

なお、ここでは行列H1等を図6の定義形式の逆形式で用いている。またH1やH2は、行列構成部72での途中処理を表す(式7)や(式10)のそれとは異なり、ここでは指標1や幾何特徴2につき推定部73により最終的に求められた平面射影変換行列を表している。 Here, the matrix H 1 or the like is used in the reverse form of the definition form of FIG. H 1 and H 2 are finally obtained by the estimation unit 73 for index 1 and geometric feature 2 here, unlike those of (Equation 7) and (Equation 10), which represent intermediate processing in the matrix construction unit 72. Represents a planar projective transformation matrix.

一方、同一平面上にある幾何特徴2に(4)に示すように当該平面射影変換行列H1を適用すると、行列H1の算出に至るまでの誤差によりその形状が歪むため、(2)に示すように基準座標系における正しい配置が求まらない。本発明では幾何特徴2の正しい配置に準じた近似の配置を与えるものとして、初期配置を求める。 On the other hand, if the plane projection transformation matrix H 1 is applied to the geometric feature 2 on the same plane as shown in (4), the shape is distorted due to an error until the calculation of the matrix H 1 , so that (2) As shown, the correct arrangement in the reference coordinate system cannot be obtained. In the present invention, an initial arrangement is obtained on the assumption that an approximate arrangement according to the correct arrangement of the geometric feature 2 is given.

図10Bの(4)及び(5)に示すように、仮に幾何特徴2が指標1と同様に本来の形状が既知なものであるとすれば、指標1と同様に平面射影変換行列H2が求まるが、この場合、指標と同様に形状情報が必要となり、高精度な姿勢推定のためには指標1との配置関係も必要となり、且つ実際に正確に配置関係を満たすように配置しても誤差を避けられない点でデメリットが生ずる。 As shown in (4) and (5) of FIG. 10B, if the geometric feature 2 has the known original shape like the index 1, the planar projective transformation matrix H 2 is the same as the index 1. However, in this case, shape information is required in the same way as the index, and an arrangement relationship with the index 1 is also necessary for highly accurate posture estimation, and even if the arrangement relationship is actually satisfied exactly There is a disadvantage in that errors cannot be avoided.

なお、特許文献1について説明したように、一般に拘束条件が多い程基準座標系の高精度な推定が可能となる。従来までは対象物の形状を一意に決定する完全な拘束条件(直方体であれば全ての頂点の座標が既知)しか利用することが出来ず、例え対象物が部分的に平行線や直交線を有するという情報を持っていたとしてもそれを有効に活用する術は存在していなかった。本発明では拘束条件を緩和した対象物に対し限られた拘束条件を最大限活用することで、単一の指標を利用した場合と比較して高精度な姿勢推定を目指す。   Note that, as described in Patent Document 1, generally, the more the constraint conditions are, the higher the estimation of the reference coordinate system becomes possible. Until now, only complete constraint conditions that uniquely determine the shape of the object (coordinates of all vertices are known in the case of a rectangular parallelepiped) can be used. For example, the object may be partially parallel or orthogonal. Even if we had the information that we had, there was no way to make effective use of it. In the present invention, the limited constraint condition is utilized to the maximum extent with respect to the object whose constraint condition has been relaxed, thereby aiming for posture estimation with higher accuracy than when a single index is used.

そこで、図10Cの(4)及び(5)に示すように、幾何特徴が前述の第2実施形態に係る平行四辺形(又はそれと同等に利用できるもの)であったとして、本発明では平行四辺形に戻す射影変換行列H2Pを求めることができるが、その姿勢が不明であるため、これだけでは基準座標系での配置がわからない。 Therefore, as shown in (4) and (5) of FIG. 10C, assuming that the geometric feature is the parallelogram according to the second embodiment described above (or one that can be used equivalently), A projective transformation matrix H 2P that returns to the shape can be obtained, but since its posture is unknown, this alone does not reveal the arrangement in the reference coordinate system.

このため本発明では、初期配置推定部7の一連の処理によって、図10Dの(3)及び(4)に示すように、行列H2Pによって平行四辺形に戻しつつ、且つ基準座標系に幾何特徴2を配置できるような行列H2'を求めて、配置する。本発明では特に、指標1に対する幾何特徴2の配置は全く任意である点及び幾何特徴2の取りうる形態の自由度の高さに注目すべきである。 For this reason, in the present invention, as shown in (3) and (4) of FIG.10D, a series of processes of the initial arrangement estimation unit 7 restores the parallelogram by the matrix H2P and geometric features in the reference coordinate system. A matrix H 2 ′ capable of arranging 2 is obtained and arranged. Particularly in the present invention, it should be noted that the arrangement of the geometric feature 2 with respect to the index 1 is completely arbitrary and the degree of freedom of the form that the geometric feature 2 can take.

そして当該共通の基準座標系に配置された指標1と幾何特徴2との初期配置によって図10Eの(3)に示すように平面射影変換行列を求めることで、基準座標系の姿勢推定が指標1のみを用いる場合よりも高精度に行うことが可能となる。ここで、(4)に示すように指標1は行列H1で、幾何特徴2は行列H2'により基準座標系での配置が定まる。なおまた、幾何特徴2が第1実施形態に係る場合でも同様である。 Then, by obtaining a planar projective transformation matrix as shown in (3) of FIG. 10E by the initial arrangement of the index 1 and the geometric feature 2 arranged in the common reference coordinate system, the posture estimation of the reference coordinate system can be performed using the index 1 It becomes possible to carry out with higher precision than the case of using only. Here, as shown in (4), the index 1 is the matrix H 1 and the geometric feature 2 is determined in the reference coordinate system by the matrix H 2 ′. The same applies to the case where the geometric feature 2 relates to the first embodiment.

以下、各種の補足的な説明を行う。   Various supplementary explanations will be given below.

一点目の補足として、平行や直角を成す線分は基準座標系の同一平面における複数の幾何形状に内在するものを利用してもよい。つまり、幾何形状Aから線分1を検出し、かつ幾何形状Bから線分2を検出したとき、線分1と線分2とが基準座標系の同一平面において平行を成すことが既知であれば、線分1と線分2とをこの平面上の1組の平行線とカウントしてもよい。   As a supplement to the first point, parallel or perpendicular line segments may be used that exist in a plurality of geometric shapes in the same plane of the reference coordinate system. That is, when line segment 1 is detected from geometric shape A and line segment 2 is detected from geometric shape B, it is known that line segment 1 and line segment 2 are parallel in the same plane of the reference coordinate system. For example, line segment 1 and line segment 2 may be counted as a set of parallel lines on this plane.

例えば、図11に示すように正方形と直角三角形の2つの幾何形状が基準座標系の同一平面上に存在している場合、この平面には平行を構成する線分AB、DC及びGF、同様に平行を構成する線分AD、BC及びEGと、直角を構成する線分DA、DCと、同様に直角を構成する線分AC及びBDと、同様に直角を構成するGE及びGFと、が存在している。このとき、2組の平行線の選び方は、   For example, as shown in FIG. 11, when two geometric shapes of a square and a right triangle exist on the same plane of the reference coordinate system, line segments AB, DC, and GF that are parallel to this plane, There are line segments AD, BC, and EG that form parallel lines, line segments DA and DC that form right angles, line segments AC and BD that also form right angles, and GE and GF that also form right angles. doing. At this time, how to choose two sets of parallel lines,

[1]平行線(AB、DC)及び平行線(AD, BC)と、[2]平行線(AB、DC)及び平行線(AD, EG)と、[3]平行線(AB、DC)及び平行線(BC, EG)と、
[4]平行線(AB、GF)及び平行線(AD, BC)と、[5]平行線(AB、GF)及び平行線(AD, EG)と、[6]平行線(AB、GF)及び平行線(BC, EG)と、
[7]平行線(DC、GF)及び平行線(AD, BC)と、[8]平行線(DC、GF)及び平行線(AD, EG)と、[9]平行線(DC、GF)及び平行線(BC, EG)と、
[1] Parallel lines (AB, DC) and parallel lines (AD, BC); [2] Parallel lines (AB, DC) and parallel lines (AD, EG); [3] Parallel lines (AB, DC) And parallel lines (BC, EG),
[4] Parallel lines (AB, GF) and parallel lines (AD, BC), [5] Parallel lines (AB, GF) and parallel lines (AD, EG), [6] Parallel lines (AB, GF) And parallel lines (BC, EG),
[7] Parallel lines (DC, GF) and parallel lines (AD, BC); [8] Parallel lines (DC, GF) and parallel lines (AD, EG); [9] Parallel lines (DC, GF) And parallel lines (BC, EG),

の[1]〜[9]に挙げる9通りが考えられる。同様に2組の直交線の選び方は、直交線(DA、DC)及び(AC、BD)と、直交線(GE、GF)及び(AC、BD)と、の2通りが考えられる。   Nine ways listed in [1] to [9] are possible. Similarly, there are two ways of selecting two sets of orthogonal lines: orthogonal lines (DA, DC) and (AC, BD) and orthogonal lines (GE, GF) and (AC, BD).

なお、直交線(DA、DC)と直交線(GE、GF)はお互いに平行の関係にあるため、組み合わせることができない点に注意されたい。また、例えば線分DCと線分GFが一直線上にあるとき、これらは同一の線分として扱われるため、平行線の組み合わせの数が9通りから3通りに減少することにも注意されたい。   Note that orthogonal lines (DA, DC) and orthogonal lines (GE, GF) are parallel to each other and cannot be combined. In addition, for example, when the line segment DC and the line segment GF are in a straight line, they are treated as the same line segment, so that the number of combinations of parallel lines is reduced from nine to three.

この例の場合、行列構成部72では9つのH'Pが求まり、各H'Pを用いて射影歪みを除去した後に2つのH'Aを用いてアフィン歪みを除去することができるため、H'PとH'Aとの組み合わせは18通り存在し、この18通りのH'P及びH'Aを用いて幾何特徴の初期配置をそれぞれ推定する。 In this example, it is possible to remove the affine distortion using two H 'A after the matrix configuration unit 72 nine in the H' P is Motomari, the H 'to remove perspective distortion using P, H combination of 'P and H' a is present 18 kinds estimates respectively an initial placement of the geometric features using H 'P and H' a of the 18 types.

例えば、平行線(AB、DC)及び(AD, BC)からH'Pを、直交線(DA、DC)及び(AC、BD)からH'Aを計算した場合は、H'P及びH'Aを用いて構成したH'を用いて点A、点B、点C及び点Dの初期配置が推定できる。 For example, parallel lines (AB, DC) and (AD, BC) 'the P, orthogonal lines (DA, DC) and (AC, BD) H from' to H when calculating the A is, H 'P and H' The initial arrangement of point A, point B, point C, and point D can be estimated using H ′ configured using A.

なお、幾何特徴の初期配置の推定計算は、上記例であれば18通り全てについて行なってもよい。全て又は以下説明する取捨選択によって複数の初期配置の推定計算を行った場合は、最終的に基準座標系推定部8において姿勢推定する際の平面射影変換行列の算出誤差が最小となる場合を選択するようにしてもよいし、前述のようにユーザからのポインティング等による指示を受け付けて1つを選択してもよい。   The estimation calculation of the initial arrangement of geometric features may be performed for all 18 patterns in the above example. When estimation calculation of multiple initial arrangements is performed by all or selection explained below, select the case where the calculation error of the planar projective transformation matrix is finally minimized when estimating the posture in the reference coordinate system estimation unit 8 Alternatively, as described above, one may be selected by receiving an instruction from the user by pointing or the like.

当該推定計算の際にはまた、予め幾何特徴検出部6において一定の基準に従ってH'PとH'Aを取捨選択してから、初期配置推定部7にて推定計算を行うようにしてもよい。一定の基準としては、例えばHAに関して言えば、HAの信頼度を測る尺度の一種としてHAの計算に用いた直交線同士の角度を採用して、当該角度が最も大きい又は大きい側の所定数を選択するようにしてもよい。 In the estimation calculation, H ′ P and H ′ A may be preliminarily selected in the geometric feature detection unit 6 according to a certain standard, and then the estimation calculation may be performed in the initial arrangement estimation unit 7. . The constant reference, for example, when it comes to H A, adopts an angle of orthogonal lines to each other used in the calculation of H A as a kind of measure of the reliability of the H A, the angle is largest or larger side A predetermined number may be selected.

HPに関しても同様に、計算時の四角形における平行線同士の角度の最も大きいもの又は大きい側の所定数を選択するようにしてもよい。 Similarly with respect to H P, may be selected a predetermined number of the largest ones or the side of higher angle parallel lines between the calculation time of the rectangle.

なお、「直交線同士の角度」及び「平行線同士の角度」は、2組の直交線又は平行線を(線A1, 線A2)及び(線B1, 線B2)と表現する(すなわち「A1⊥A2, B1⊥B2」又は「A1‖A2, B1‖B2」)と、(1)A1とB1のなす角、(2)A1とB2のなす角、(3)A2とB1のなす角、(4)A2とB2のなす角、とからなる(1)〜(4)の角(0°以上90°以下の範囲で値を取るものとする)のうちの最小値として求めることができる。   Note that “the angle between orthogonal lines” and “the angle between parallel lines” express two sets of orthogonal lines or parallel lines as (line A1, line A2) and (line B1, line B2) (ie, “A1 ⊥A2, B1⊥B2 ”or“ A1‖A2, B1‖B2 ”) and (1) the angle between A1 and B1, (2) the angle between A1 and B2, (3) the angle between A2 and B1, (4) It can be obtained as the minimum value of the angles (1) to (4) (which take a value in the range of 0 ° to 90 °) consisting of the angle formed by A2 and B2.

二点目の補足として、初期配置推定部7では指標と同一平面上に存在しない幾何特徴の初期配置を求め、基準座標系推定部8における基準座標系推定の際に追加で利用するようにすることもできる。当該初期配置はすなわち、指標の基準座標系(XYZ座標のXY平面座標)において記述され且つ指標の平面(Z=0の平面)上にない、Z軸を加えた立体方向側へ拡張された配置となる。   As a supplement to the second point, the initial arrangement estimation unit 7 obtains an initial arrangement of geometric features that do not exist on the same plane as the index, and is additionally used when estimating the reference coordinate system in the reference coordinate system estimation unit 8 You can also. That is, the initial arrangement is described in the index reference coordinate system (XY plane coordinates of XYZ coordinates) and is not on the index plane (Z = 0 plane) and is extended to the solid direction side with the Z axis added It becomes.

図1の(2)及び(3)を用いてその詳細を述べる。図1では(2)の基準座標系XYZにおいて指標1と同一平面P1上に2組の平行線と2組の直交線とが幾何特徴2として存在しており、幾何特徴2の初期配置はこれまでの説明通りに求めることができる。ここで、注目すべきは、(3)に示すY'Z'平面上の幾何特徴3の初期配置も求めることが可能である点である。   Details will be described with reference to (2) and (3) of FIG. In Fig. 1, two parallel lines and two orthogonal lines exist as geometric feature 2 on the same plane P1 as index 1 in the reference coordinate system XYZ of (2). It can be obtained as described above. Here, it should be noted that the initial arrangement of the geometric feature 3 on the Y′Z ′ plane shown in (3) can also be obtained.

Y'Z'平面上の幾何特徴3の初期配置を求めるためには、Y'Z'平面P2上の指標における平面射影変換行列が必要であるが、指標1はY'Z'平面P2とは別のXY平面P1上に存在している。そこで、XY平面P1上の指標1をもとに求めた平面射影変換行列をY'Z'平面上のものに変換することを考える。これはXYZ座標軸とX'Y'Z'座標軸の相対関係をもとに平面射影変換行列に座標軸の回転と平行移動とを適用することで実現できる。平面射影変換行列に座標軸の回転と平行移動とを適用する計算に関しては、特許文献2に詳細が開示されている。   In order to obtain the initial placement of geometric feature 3 on the Y'Z 'plane, a plane projective transformation matrix for the index on Y'Z' plane P2 is required, but index 1 is the same as Y'Z 'plane P2. It exists on another XY plane P1. Therefore, it is considered to convert the plane projective transformation matrix obtained based on the index 1 on the XY plane P1 into that on the Y′Z ′ plane. This can be realized by applying rotation and translation of the coordinate axes to the planar projective transformation matrix based on the relative relationship between the XYZ coordinate axes and the X′Y′Z ′ coordinate axes. Details regarding the calculation for applying rotation and translation of coordinate axes to the planar projective transformation matrix are disclosed in Patent Document 2.

つまり、指標1と同一平面上に存在しない幾何特徴3の初期配置を求めるためには、幾何特徴3の存在する平面を特定できる情報さえ持っていればよい。例えば、XYZ座標軸とX'Y'Z'座標軸の相対関係が当該特定する情報に相当し、指標1の基準座標系XYZを定める際に、当該基準座標系XYZにおいてX'Y'Z'座標軸を特定する情報も追加して予め画像処理装置2で保持しておけばよい。   That is, in order to obtain the initial arrangement of the geometric feature 3 that does not exist on the same plane as the index 1, it is only necessary to have information that can identify the plane on which the geometric feature 3 exists. For example, the relative relationship between the XYZ coordinate axis and the X'Y'Z 'coordinate axis corresponds to the information to be specified, and when determining the reference coordinate system XYZ of the index 1, the X'Y'Z' coordinate axis is set in the reference coordinate system XYZ. Information to be identified may be added and held in the image processing apparatus 2 in advance.

図2の直方体の例であれば、指標1の基準座標系において当該指標1の配置された上面S1-S8-S2-S7の長方形の情報を予め有しておけば、直方体であることから直交関係をなすその他の面の上面に対する位置関係が既知となり、その他の面上における幾何特徴の初期配置を求め、基準座標系の姿勢推定計算に加えることができる。当該情報によって全く同様に、その他の面上を対象としての寸法計測部9による寸法測定も可能となる。   In the case of the rectangular parallelepiped in FIG. 2, if the rectangular information of the upper surface S1-S8-S2-S7 on which the index 1 is arranged in the reference coordinate system of the index 1 is previously stored, it is orthogonal because it is a rectangular parallelepiped. The positional relationship with respect to the upper surface of the other surfaces forming the relationship becomes known, and the initial arrangement of geometric features on the other surfaces can be obtained and added to the posture estimation calculation of the reference coordinate system. With this information, dimension measurement by the dimension measurement unit 9 for other surfaces can be performed in exactly the same manner.

当該別の面上の幾何特徴の利用により、例えば図12のような円柱上の幾何特徴4や図13のような底面と側面との角度が既知の2つの円錐上の幾何特徴5も利用することが可能である。図12の円柱であれば、円柱の高さ方向の線分(P41, P43)及び(P42, P44)を検出して、長方形P41-P42-P43-P44を幾何特徴として使うことができる。図13の2つの円錐であれば、稜線に対応する線分(P51, P53)及び(P52, P54)を検出して、同様に長方形P51-P52-P53-P54を幾何特徴として使うことができる。なおここで、長方形P41-P42-P43-P44及び長方形P51-P52-P53-P54はそれぞれ円柱及び円錐の存在によって円柱の内部及び円錐の側面上に概念上構成される平面上の図形であり、壁などの実体を有する必要はない。   By using the geometric feature on the other surface, for example, the geometric feature 4 on the cylinder as shown in FIG. 12 or the geometric feature 5 on the two cones whose angles between the bottom surface and the side surface are known as shown in FIG. It is possible. In the case of the cylinder in FIG. 12, line segments (P41, P43) and (P42, P44) in the height direction of the cylinder can be detected, and the rectangles P41-P42-P43-P44 can be used as geometric features. In the case of the two cones in FIG. 13, the line segments (P51, P53) and (P52, P54) corresponding to the ridgeline can be detected, and the rectangle P51-P52-P53-P54 can be used as a geometric feature as well. . Here, the rectangle P41-P42-P43-P44 and the rectangle P51-P52-P53-P54 are figures on a plane that are conceptually configured on the inside of the cylinder and the side of the cone, respectively, due to the presence of the cylinder and the cone, There is no need to have an entity such as a wall.

なお、図1の例であれば平面P1及びP2の特定処理も幾何特徴の検出の際に、幾何特徴へのユーザからのポインティング指示を利用して、幾何特徴がいずれの平面に属するかの情報をユーザから得るようにしてもよい。また自動検出手法として、当該目的としている平面以外の箇所に検出されることがないような特定の幾何特徴を色特徴等の区別によって予め用意してデータベース12又は画像処理装置2でその情報を保持しておいてもよいし、さらに当該指標のうち平面P1に利用するものと、平面P2に利用するものとを予め区別しておいてもよい。   In the example of FIG. 1, the plane P1 and P2 identification processing also uses the pointing instruction from the user to the geometric feature when the geometric feature is detected, and information about which plane the geometric feature belongs to May be obtained from the user. As an automatic detection method, specific geometric features that cannot be detected anywhere other than the target plane are prepared in advance by distinguishing color features, etc., and the information is stored in the database 12 or the image processing device 2 In addition, among the indicators, those used for the plane P1 and those used for the plane P2 may be distinguished in advance.

また同様に自動検出手法として、平面P1及び平面P2自体のテクスチャ情報等を保持しておき、指標検出部4は前処理として撮像画像において平面P1及びP2を領域として検出してから、当該領域内で指標を検出するようにしてもよい。当該平面領域の指定情報をユーザに入力させるようにしてもよい。あるいは撮像画像自体をあらかじめ平面P1のみ、又は平面P1及び平面P2のみ、が写った状態で用意するようにしてもよい。   Similarly, as an automatic detection method, texture information and the like of the plane P1 and the plane P2 itself are stored, and the index detection unit 4 detects the planes P1 and P2 as areas in the captured image as preprocessing, The index may be detected by. You may make it make a user input the designation | designated information of the said plane area | region. Alternatively, the captured image itself may be prepared in a state where only the plane P1 or only the plane P1 and the plane P2 are captured in advance.

三点目の補足として、指標を複数用いる実施形態を説明する。図14は、当該実施形態における画像処理装置2の機能ブロック図である。画像処理装置2は、図3の構成にさらに他指標初期配置推定部15を追加で備えた構成となる。他指標初期配置推定部15以外の図3と共通の各機能部の処理自体については、指標が1つであった実施形態(「単一指標の実施形態」と称する)の場合と同様であるが、以下説明するように、処理対象となる指標が複数存在することから、指標を区別したうえで各処理が行われる。   As a third supplement, an embodiment using a plurality of indices will be described. FIG. 14 is a functional block diagram of the image processing apparatus 2 in the embodiment. The image processing apparatus 2 has a configuration in which another index initial arrangement estimation unit 15 is additionally provided in the configuration of FIG. The processing itself of each function unit common to FIG. 3 other than the other index initial arrangement estimation unit 15 is the same as in the case of the embodiment having one index (referred to as “single index embodiment”). However, as will be described below, since there are a plurality of indexes to be processed, each process is performed after distinguishing the indexes.

当該実施形態では、指標検出部4が撮像画像より複数の指標を検出して初期姿勢算出部5に渡す。そして、当該複数の指標のうち一つを基準指標とし、基準指標以外の指標(「他指標」と称する)の各々につき、他指標初期配置推定部15が基準指標の定める基準座標系における初期配置を求める。このため、行列算出部51及び行列分解部52では、基準指標及び他指標の各々からなる複数の指標の各々を対象として、単一指標の実施形態と同様の処理を行う。   In this embodiment, the index detection unit 4 detects a plurality of indexes from the captured image and passes them to the initial posture calculation unit 5. Then, one of the plurality of indices is set as a reference index, and for each index other than the reference index (referred to as “other index”), the initial allocation in the reference coordinate system defined by the reference index is determined by the other index initial layout estimation unit 15. Ask for. For this reason, the matrix calculation unit 51 and the matrix decomposition unit 52 perform the same processing as that of the single index embodiment for each of a plurality of indexes each including the reference index and the other indexes.

複数の指標の各々については、図4で説明したのと同様であり、予め既知であって、既知の基準座標系においてその配置が与えられている。なお、複数の指標の中には同一種類のものが含まれていてもよい。当該別実施形態における複数の指標は同一平面上に配置されており、各々が既知であるが、当該同一平面上において互いの配置関係が任意であり、当該互いの配置関係に関する拘束を有しない。   Each of the plurality of indices is the same as that described with reference to FIG. 4, and is known in advance, and its arrangement is given in a known reference coordinate system. Note that the plurality of indices may include the same type. The plurality of indexes in the other embodiment are arranged on the same plane, and each of them is known, but the arrangement relationship between them is arbitrary on the same plane, and there is no restriction on the arrangement relationship with each other.

このような複数の指標の具体例として例えば、同一平面として机の面を想定し、カードに印刷した各々が既知のマーカを自由に当該机の面上に配置したもの(ただし、互いに重なることはないものとする)を挙げることができる。   As a specific example of such a plurality of indicators, for example, assuming a desk surface as the same plane, each printed on a card has a known marker freely arranged on the desk surface (however, they overlap each other) ).

なお、基準指標と他指標とからなる複数の指標を用いての基準座標系の推定については、本発明者らによる以下の特許文献3に示されている。当該実施形態における初期姿勢算出部5及び他指標初期配置推定部15の処理は、当該特許文献3に示されている処理と同様である。
[特許文献3]特願2012-174321号(「画像処理装置及び方法」)
Note that the estimation of the reference coordinate system using a plurality of indices including a reference index and other indices is shown in the following Patent Document 3 by the present inventors. The processes of the initial posture calculation unit 5 and the other index initial arrangement estimation unit 15 in the embodiment are the same as the processes shown in Patent Document 3.
[Patent Document 3] Japanese Patent Application No. 2012-174321 (“Image Processing Apparatus and Method”)

なおまた、複数の指標のうちのいずれを基準指標となすかについては、指標検出部4で検出されたもののうち乱数などを用いて任意の1つとしてもよいし、当該検出されたものの中からユーザのポインティング指示を受けて決定してもよいし、特定種類の指標を用いるようにしてもよいし、撮像画像中において面積(指標が占めている領域)が最大のものとしてもよいし、その他の所定基準で決定してもよい。   In addition, as to which of a plurality of indicators is used as a reference indicator, any one of those detected by the indicator detection unit 4 using a random number or the like may be used. It may be determined in response to a user pointing instruction, a specific type of index may be used, or the area (area occupied by the index) in the captured image may be the maximum, or other It may be determined according to a predetermined standard.

また、初期配置推定部7は、行列分解部52における基準指標の初期姿勢に対応する平面射影変換の分解結果を用いて、単一指標の実施形態におけるのと同様の処理を行う。基準座標系推定部8は、基準座標系における基準指標及び他指標並びに幾何特徴の初期配置と、撮像画像上における基準指標及び他指標並びに幾何特徴の配置と、の全体としての対応関係から、基準指標の定める基準座標系の撮像装置10に対する姿勢を推定する。   Further, the initial arrangement estimation unit 7 performs the same processing as in the single index embodiment, using the decomposition result of the plane projective transformation corresponding to the initial posture of the reference index in the matrix decomposition unit 52. The reference coordinate system estimation unit 8 is based on the overall correspondence relationship between the initial placement of the reference indices and other indices and geometric features in the reference coordinate system, and the placement of the reference indices and other indices and geometric features on the captured image. The posture of the reference coordinate system defined by the index with respect to the imaging device 10 is estimated.

ここで、単一指標の実施形態の場合と異なり、利用する対応関係に他指標によるものが加わるが、当該対応関係からの姿勢推定の計算自体は、単一指標の実施形態の場合と同様である。当該別実施形態においては、他指標をさらに追加で用いることによって、単一指標の実施形態における幾何特徴の利用による効果と同様に、さらなる姿勢推定精度の向上の効果が得られる。   Here, unlike the case of the single index embodiment, the other correspondence index is added to the corresponding relationship to be used, but the posture estimation calculation itself from the corresponding relationship is the same as in the case of the single index embodiment. is there. In the other embodiment, by using another index in addition, the effect of further improving the posture estimation accuracy can be obtained in the same manner as the effect of using the geometric feature in the single index embodiment.

なお、当該実施形態における処理対象データの流れの、単一指標の実施形態との差異点・共通点は次の通りである。すなわち、図14に示す線L1は単一指標の実施形態を基準指標を対象として実施したものに相当する。また、線L2、L3及びL4が当該実施形態において他指標を対象として新たに発生するデータの流れに相当する。その他の流れについては単一指標の実施形態と共通である。   Note that the differences and common points of the processing target data flow in this embodiment from the single index embodiment are as follows. That is, the line L1 shown in FIG. 14 corresponds to a single index embodiment that is implemented for the reference index. Lines L2, L3, and L4 correspond to the data flow newly generated for other indicators in this embodiment. Other flows are the same as those of the single index embodiment.

他指標初期配置推定部15における処理は、初期配置推定部7が幾何特徴の初期配置を基準指標の定める基準座標系において求める処理を、幾何特徴ではなく他指標を対象として実施することに相当する。当該処理により、他指標の初期配置が基準指標の定める基準座標系において求められる。当該処理の詳細は次の通りである。   The process in the other index initial arrangement estimating unit 15 corresponds to the process in which the initial arrangement estimating unit 7 obtains the initial arrangement of the geometric feature in the reference coordinate system defined by the reference index for the other index instead of the geometric feature. . By this processing, the initial arrangement of other indices is obtained in the reference coordinate system defined by the reference indices. Details of the processing are as follows.

前提となる処理として、初期姿勢算出部5において、複数の指標の各々につき、初期姿勢を表す平面射影変換行列と、その分解結果が得られる。従って、(式6)の形式に倣って、基準指標に対して以下の(式21)が、他指標(各々を区別するためのインデクスiを用いて他指標iとする)に対して以下の(式22)が得られる。
H−1 [基準指標]= HS[基準指標] HA[基準指標] HP[基準指標] …(式21)
H−1 [他指標i]= HS[他指標i] HA[他指標i] HP[他指標i] …(式22)
As preconditions, the initial posture calculation unit 5 obtains a planar projection transformation matrix representing the initial posture and a decomposition result thereof for each of a plurality of indices. Therefore, following the form of (Equation 6), the following (Equation 21) with respect to the reference index is as follows with respect to the other indices (the index i for distinguishing each is used as another index i): (Equation 22) is obtained.
H -1 [reference index] = H S [reference index] H A [reference index] H P [reference index] (Equation 21)
H -1 [other index i] = H S [other index i] H A [other index i] H P [other index i] (Formula 22)

他指標初期配置推定部15は、上記(式21)及び(式22)として初期姿勢算出部5より与えられた各指標における分解結果を用いて、基準指標の定める基準座標系における各他指標iの初期配置を求めるための行列H'[他指標i]を以下(式23)のように求める。
H'[他指標i]= HS[基準指標/他指標iのスケール] HA[他指標i] HP[他指標i] …(式23)
ここで、(式23)において、 HS[基準指標/他指標iのスケール] は、(式21)のHS[基準指標]を(式2)のように表現した際のスケールs=s[基準指標]を、(式22)のHS[他指標i] を同じく(式2)のように表現した際のスケールs=s[他指標i]にて置き換えたものである。
The other index initial arrangement estimation unit 15 uses the decomposition results for each index given by the initial posture calculation unit 5 as (Equation 21) and (Equation 22) above, and uses the other index i in the reference coordinate system defined by the reference index. A matrix H ′ [other index i] for obtaining the initial arrangement of is obtained as follows (Equation 23).
H ' [other index i] = H S [standard index / other index i scale] H A [other index i] H P [other index i] (Equation 23)
Here, in (Expression 23), H S [reference index / scale of other index i] is the scale s = s when H S [reference index] of (Expression 21) is expressed as (Expression 2) The [reference index] is replaced with the scale s = s [other index i] when H S [other index i] in (Expression 22) is similarly expressed as (Expression 2).

従って、基準指標の基準座標系において他指標iの初期配置を求めるために用いる(式23)は、基準指標につき算出された初期姿勢のうち位置及び向きの要素(HS[基準指標] においてスケールsを考慮しないものに相当)と、他指標iにつき算出された初期姿勢のうち大きさの要素(前記考慮しないスケールsをHS[他指標i]のスケールsに置き換えることに相当)及び歪みの要素(アフィン歪み及び射影歪みを表すHA[他指標i] HP[他指標i]に相当)と、の合成である。 Therefore, (Equation 23) used to obtain the initial arrangement of the other index i in the reference coordinate system of the reference index is the scale of the position and orientation elements (HS [reference index] ) of the initial posture calculated for the reference index. of the initial posture calculated for the other index i (corresponding to replacing the scale s not to be considered with the scale s of H S [other index i] ) and distortion (The H A [other index i] representing the affine distortion and projective distortion, equivalent to HP [other index i] ).

他指標初期配置推定部15は最終的に、撮像画像上における他指標iの点xに対して、基準指標の定める基準座標系における当該他指標iの点x'(すなわち初期配置)を、上記(式23)を変換係数として用いて、以下(式24)より算出し、当該初期配置x'を基準座標系推定部8へと渡す。
x' = H'[他指標i] x …(式24)
The other index initial arrangement estimating unit 15 finally sets the point x ′ (that is, the initial arrangement) of the other index i in the reference coordinate system defined by the reference index to the point x of the other index i on the captured image. Using (Equation 23) as a conversion coefficient, it is calculated from (Equation 24) below, and the initial arrangement x ′ is passed to the reference coordinate system estimation unit 8.
x '= H' [Other index i] x ... (Equation 24)

図15は当該別実施形態の意義を説明するための図であり、描かれている指標1及び幾何特徴2並びに(1)〜(4)は図10Aの例と同様である。ここではさらに、指標2が追加されている。指標1を基準指標とし、指標2を他指標とし、共に正方指標であるものとする。当該例においては他指標は指標2の1つのみであるが、複数存在していてもよく、また、正方指標でなくてもよい。   FIG. 15 is a diagram for explaining the significance of the other embodiment, and the drawn index 1 and geometric feature 2 and (1) to (4) are the same as the example of FIG. 10A. Here, index 2 is further added. Assume that index 1 is a reference index, index 2 is another index, and both are square indices. In this example, the other index is only one index 2, but a plurality of other indices may be present and may not be a square index.

図15にて、(3)に示すように、基準指標である指標1について、(1)の撮像画像系における配置と(2)の当該指標1による基準座標系での既知の初期配置とを対応づけ、初期姿勢を与える行列H1が求まる。当該行列H1で(4)に示すように幾何特徴2を(2)の基準座標系に変換しても、必ずしも本来の形状に戻らないのと同様に、当該行列H1で(5)に示すように他指標である指標2を(2)の基準座標系に変換しても、必ずしも本来の正方形に戻らない。これは、(1)の同一平面XY上に存在する指標1と指標2の相互配置関係が未知であり、当該行列H1が指標1のみから求められていることに起因する。 In FIG. 15, as shown in (3), for index 1 as the reference index, the arrangement in the captured image system of (1) and the known initial arrangement in the reference coordinate system of the index 1 in (2) A matrix H 1 is obtained that associates and gives an initial posture. As shown in (4) with the matrix H 1 , converting the geometric feature 2 to the reference coordinate system of (2) does not necessarily return to the original shape, but in the matrix H 1 to (5) As shown, even if the index 2 which is another index is converted into the reference coordinate system of (2), it does not necessarily return to the original square. This is because the mutual arrangement relationship between the index 1 and the index 2 existing on the same plane XY in (1) is unknown, and the matrix H 1 is obtained only from the index 1.

ここで、上記(式24)の適用により、(6)に示すように、指標1の基準座標系において、指標2を本来の正方形に戻すことができる。ここでは、幾何特徴の場合と概ね同様に、(式24)の HA[他指標i] HP[他指標i]が(2)で正方形に戻らなかった歪みを補正して正方形に戻すように作用し、 HS[基準指標/他指標iのスケール]が指標1の基準座標系への変換として作用している。従って、当該正方形としての指標2の配置を、指標1と指標2との相互配置関係が既知であった場合に利用できる初期配置に準じた指標2の初期配置として利用できるようになる。 Here, by applying the above (Equation 24), the index 2 can be returned to the original square in the reference coordinate system of the index 1 as shown in (6). Here, substantially the same manner as in the case of geometric features, to return to the square by correcting H A strain did not return to the square Other indicators i] H P [other indices i] is in (2) (Formula 24) H S [reference index / scale of other index i] acts as a conversion of index 1 to the reference coordinate system. Therefore, the arrangement of the index 2 as the square can be used as the initial arrangement of the index 2 in accordance with the initial arrangement that can be used when the mutual arrangement relationship between the index 1 and the index 2 is known.

こうして、最終的に基準座標系推定部8において、(6)に示すように基準座標系における、(単一指標として基準指標である指標1を採用することで)単一指標の実施形態と同様にして求めた幾何特徴2の初期配置と、(式24)で求めた指標2の初期配置と、予め既知の指標1の初期配置と、の全体と、(1)に示すこれらの撮像画像系における配置と、の対応関係として(7)に示す行列Hを求め、指標1の基準座標系の姿勢推定の結果となす。当該行列Hとしての推定結果は、基準指標である指標1のみから推定した行列H1よりも幾何特徴2及び他指標である指標2の追加利用によって、精度が高められている。 Thus, finally in the reference coordinate system estimation unit 8, as shown in (6), in the reference coordinate system (by adopting the index 1 which is the reference index as a single index), the same as the embodiment of the single index The initial arrangement of the geometric feature 2 obtained in the above, the initial arrangement of the index 2 obtained in (Equation 24), the initial arrangement of the known index 1 in advance, and these captured image systems shown in (1) The matrix H shown in (7) is obtained as a correspondence relationship with the arrangement at, and the result is the posture estimation result of the reference coordinate system of index 1. The accuracy of the estimation result as the matrix H is improved by the additional use of the geometric feature 2 and the index 2 that is another index than the matrix H 1 estimated only from the index 1 that is the reference index.

1…ARシステム、2…画像処理装置、10…撮像装置、11…情報表示装置、3…撮像画像取得部、4…指標検出部、5…初期配置算出部、6…幾何特徴検出部、7…初期配置推定部、8…基準座標系推定部、9…寸法測定部、15…他指標初期配置推定部   DESCRIPTION OF SYMBOLS 1 ... AR system, 2 ... Image processing apparatus, 10 ... Imaging apparatus, 11 ... Information display apparatus, 3 ... Captured image acquisition part, 4 ... Index | index detection part, 5 ... Initial arrangement | positioning calculation part, 6 ... Geometric feature detection part, 7 ... initial placement estimation unit, 8 ... reference coordinate system estimation unit, 9 ... dimension measurement unit, 15 ... other indicator initial placement estimation unit

Claims (9)

撮像装置が撮像した撮像画像より、大きさ及び配置が既知の所定の指標であって同一平面上にある少なくとも4つの点又は線分を特定可能なように構成されている指標が設置された平面において当該指標が定める基準座標系を、当該指標と、当該平面上における平行関係及び/又は直交関係として構成された所定の幾何特徴と、を用いて推定する画像処理装置であって、
前記撮像画像より前記指標を検出する指標検出部と、
前記指標を前記基準座標系にて表現した所定の初期配置と、前記検出された指標の前記撮像画像上での配置と、に基づいて前記基準座標系の前記撮像装置に対する初期姿勢を算出すると共に、当該初期姿勢が表す変換関係を大きさ、位置及び向き並びに歪みに対応する各要素に分解する初期姿勢算出部と、
前記撮像画像より前記幾何特徴を検出する幾何特徴検出部と、
前記検出された幾何特徴における歪みの要素と、前記分解された大きさ並びに位置及び向きの要素と、に基づいて前記幾何特徴の前記基準座標系における初期配置を推定する初期配置推定部と、
前記指標の所定の初期配置及び前記推定された幾何特徴の初期配置と、前記検出された指標及び幾何特徴の前記撮像画像上における配置と、の全体としての対応関係より、前記基準座標系の前記撮像装置に対する姿勢を推定する基準座標系推定部と、を備えることを特徴とする画像処理装置。
A plane on which an index configured to identify at least four points or line segments on the same plane, which is a predetermined index whose size and arrangement are known, from a captured image captured by the imaging device An image processing apparatus that estimates the reference coordinate system defined by the index using the index and a predetermined geometric feature configured as a parallel relationship and / or an orthogonal relationship on the plane,
An index detection unit for detecting the index from the captured image;
Calculating an initial posture of the reference coordinate system with respect to the imaging apparatus based on a predetermined initial arrangement in which the index is expressed in the reference coordinate system and an arrangement of the detected index on the captured image; An initial posture calculation unit that decomposes the transformation relationship represented by the initial posture into elements corresponding to the size, position, orientation, and distortion;
A geometric feature detector for detecting the geometric feature from the captured image;
An initial arrangement estimating unit that estimates an initial arrangement of the geometric feature in the reference coordinate system based on the detected distortion element in the geometric feature and the decomposed size, position, and orientation elements;
Based on the overall correspondence of the predetermined initial arrangement of the index and the initial arrangement of the estimated geometric feature and the arrangement of the detected index and geometric feature on the captured image, the reference coordinate system An image processing apparatus comprising: a reference coordinate system estimation unit that estimates a posture with respect to the imaging apparatus.
前記初期姿勢算出部が、前記初期姿勢を平面射影変換の関係として求め、当該関係を大きさ、位置及び向きに対応する相似変換と、歪みに対応するアフィン変換及び射影変換と、に分解することを特徴とする請求項1に記載の画像処理装置。   The initial posture calculation unit obtains the initial posture as a relationship of planar projective transformation, and decomposes the relationship into a similarity transformation corresponding to the size, position, and orientation, and an affine transformation and a projective transformation corresponding to distortion. 2. The image processing apparatus according to claim 1, wherein: 前記所定の幾何特徴は前記平面上における平行関係及び直交関係として構成され、
前記初期配置推定部は、前記検出された幾何特徴における平行関係の歪みより射影歪みの要素を抽出し、さらに直交関係の歪みよりアフィン歪みの要素を抽出し、当該抽出された射影歪み及びアフィン歪みの要素と、前記分解されたうちの相似変換の要素と、の合成で定まる変換関係によって前記幾何特徴の前記基準座標系における初期配置を推定することを特徴とする請求項2に記載の画像処理装置。
The predetermined geometric features are configured as parallel and orthogonal relationships on the plane;
The initial arrangement estimating unit extracts a projection distortion element from a parallel relation distortion in the detected geometric feature, further extracts an affine distortion element from an orthogonal relation distortion, and the extracted projection distortion and affine distortion. 3. The image processing according to claim 2, wherein an initial arrangement of the geometric feature in the reference coordinate system is estimated based on a conversion relationship determined by a combination of the element and a similarity conversion element among the decomposed elements. apparatus.
前記所定の幾何特徴は前記平面上における平行関係として構成され、
前記初期配置推定部は、前記検出された幾何特徴における平行関係の歪みより射影歪みの要素を抽出し、当該抽出された射影歪みの要素と、前記分解されたうちの相似変換及びアフィン変換の要素と、の合成で定まる変換関係によって前記幾何特徴の前記基準座標系における初期配置を推定することを特徴とする請求項2に記載の画像処理装置。
The predetermined geometric feature is configured as a parallel relationship on the plane;
The initial arrangement estimation unit extracts projection distortion elements from parallel distortions in the detected geometric features, the extracted projection distortion elements, and the elements of similarity decomposition and affine transformation among the decomposed elements 3. The image processing apparatus according to claim 2, wherein an initial arrangement of the geometric feature in the reference coordinate system is estimated based on a conversion relationship determined by combining the two.
前記幾何特徴検出部が、前記所定の幾何特徴における平行関係及び/又は直交関係を複数検出した場合、前記平面上における平行関係及び/又は直交関係を形成する線分間の角度の大きさに基づいて当該複数の中から選択を行い、前記初期配置推定部は当該選択された幾何特徴を対象として前記推定を行うことを特徴とする請求項1ないし4のいずれかに記載の画像処理装置。   When the geometric feature detecting unit detects a plurality of parallel relationships and / or orthogonal relationships in the predetermined geometric feature, the geometric feature detecting unit is based on the magnitude of the angle between line segments forming the parallel relationship and / or the orthogonal relationship on the plane. 5. The image processing apparatus according to claim 1, wherein a selection is made from among the plurality, and the initial arrangement estimation unit performs the estimation for the selected geometric feature. さらに、前記推定された基準座標系の姿勢及び前記所定の指標における既知の大きさに基づいて、前記撮像画像上における所定箇所の寸法を計測する寸法計測部を備えることを特徴とする請求項1ないし5のいずれかに記載の画像処理装置。   2. The apparatus according to claim 1, further comprising a dimension measuring unit that measures a dimension of a predetermined location on the captured image based on the estimated orientation of the reference coordinate system and a known size of the predetermined index. 6. The image processing device according to any one of 5 to 5. 前記所定の幾何特徴はさらに、前記平面とは別平面であり、前記所定の指標の定める基準座標系における姿勢が既知の別平面上においても設置され、
前記初期配置推定部は、当該別平面上の幾何特徴の前記基準座標系における初期配置を、当該別平面上に検出された幾何特徴における歪みの要素と、前記分解された大きさ並びに位置及び向きの要素と、にさらに前記既知の姿勢の要素を加味して推定することを特徴とする請求項1ないし6のいずれかに記載の画像処理装置。
The predetermined geometric feature is further a plane different from the plane, and is also installed on another plane whose posture in a reference coordinate system defined by the predetermined index is known,
The initial arrangement estimating unit calculates an initial arrangement of the geometric feature on the different plane in the reference coordinate system, a distortion element in the geometric feature detected on the different plane, the decomposed size, position, and orientation. 7. The image processing apparatus according to claim 1, wherein the estimation is performed by further adding an element of the known posture in addition to the element.
前記指標は複数存在し、前記指標検出部は前記撮像画像より指標を複数検出し、
前記初期姿勢算出部は各指標について初期姿勢を前記算出すると共に、各初期姿勢が表す変換関係を大きさ、位置及び向き並びに歪みに対応する各要素に前記分解し、
前記複数存在する指標のうちの1つの指標を前記基準座標系を定める基準指標として、前記初期配置推定部は、前記検出された幾何特徴における歪みの要素と、前記基準指標を対象として前記分解された大きさ並びに位置及び向きの要素と、に基づいて前記幾何特徴の前記基準座標系における初期配置を推定し、
前記基準指標以外の他指標の各々について、当該他指標を対象として前記分解された大きさ及び歪みの要素と、前記基準指標を対象として前記分解された位置及び向きの要素と、に基づいて、当該他指標の前記基準座標系における初期配置を推定する他指標初期配置推定部をさらに備え、
前記基準座標系推定部は、前記基準指標の所定の初期配置及び前記推定された他指標並びに幾何特徴の初期配置と、前記検出された基準指標並びに他指標及び幾何特徴の前記撮像画像上における配置と、の全体としての対応関係より、前記基準座標系の前記撮像装置に対する姿勢を推定することを特徴とする請求項1ないし7のいずれかに記載の画像処理装置。
There are a plurality of the indicators, and the indicator detection unit detects a plurality of indicators from the captured image,
The initial posture calculation unit calculates the initial posture for each index, and decomposes the transformation relationship represented by each initial posture into elements corresponding to magnitude, position, orientation, and distortion,
Using one of the plurality of existing indices as a reference index for defining the reference coordinate system, the initial arrangement estimating unit is decomposed with respect to a distortion element in the detected geometric feature and the reference index as a target. Estimating the initial placement of the geometric feature in the reference coordinate system based on the size and position and orientation elements;
For each of the other indices other than the reference index, based on the decomposed size and distortion elements with respect to the other indices, and the decomposed position and orientation elements with respect to the reference index, Further comprising another index initial arrangement estimating unit for estimating an initial arrangement of the other index in the reference coordinate system,
The reference coordinate system estimation unit includes a predetermined initial arrangement of the reference index and an initial arrangement of the estimated other index and a geometric feature, and an arrangement of the detected reference index, the other index and a geometric feature on the captured image. The image processing apparatus according to claim 1, wherein an attitude of the reference coordinate system with respect to the imaging apparatus is estimated based on a correspondence relationship as a whole.
撮像装置が撮像した撮像画像より、大きさ及び配置が既知の所定の指標であって同一平面上にある少なくとも4つの点又は線分を特定可能なように構成されている指標が設置された平面において当該指標が定める基準座標系を、当該指標と、当該平面上における平行関係及び/又は直交関係として構成された所定の幾何特徴と、を用いて推定する画像処理方法であって、
前記撮像画像より前記指標及び前記幾何特徴を検出する検出ステップと、
前記指標を前記基準座標系にて表現した所定の初期配置と、前記検出された指標の前記撮像画像上での配置と、に基づいて前記基準座標系の前記撮像装置に対する初期姿勢を算出すると共に、当該初期姿勢が表す変換関係を大きさ、位置及び向き並びに歪みに対応する各要素に分解する初期姿勢算出ステップと、
前記検出された幾何特徴における歪みの要素と、前記分解された大きさ並びに位置及び向きの要素と、に基づいて前記幾何特徴の前記基準座標系における初期配置を推定する初期配置推定ステップと、
前記指標の所定の初期配置及び前記推定された幾何特徴の初期配置と、前記検出された指標及び幾何特徴の前記撮像画像上における配置と、の全体としての対応関係より、前記基準座標系の前記撮像装置に対する姿勢を推定する基準座標系推定ステップと、を備えることを特徴とする画像処理方法。
A plane on which an index configured to identify at least four points or line segments on the same plane, which is a predetermined index whose size and arrangement are known, from a captured image captured by the imaging device An image processing method for estimating a reference coordinate system defined by the index using the index and a predetermined geometric feature configured as a parallel relationship and / or an orthogonal relationship on the plane,
A detection step of detecting the index and the geometric feature from the captured image;
Calculating an initial posture of the reference coordinate system with respect to the imaging apparatus based on a predetermined initial arrangement in which the index is expressed in the reference coordinate system and an arrangement of the detected index on the captured image; An initial posture calculation step for decomposing the transformation relationship represented by the initial posture into elements corresponding to the size, position and orientation, and distortion;
An initial placement estimating step for estimating an initial placement of the geometric feature in the reference coordinate system based on the distortion element in the detected geometric feature and the decomposed size and position and orientation elements;
Based on the overall correspondence of the predetermined initial arrangement of the index and the initial arrangement of the estimated geometric feature and the arrangement of the detected index and geometric feature on the captured image, the reference coordinate system An image processing method comprising: a reference coordinate system estimation step for estimating a posture with respect to the imaging apparatus.
JP2012218348A 2012-09-28 2012-09-28 Image processing apparatus and method Active JP5988368B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012218348A JP5988368B2 (en) 2012-09-28 2012-09-28 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012218348A JP5988368B2 (en) 2012-09-28 2012-09-28 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2014071035A JP2014071035A (en) 2014-04-21
JP5988368B2 true JP5988368B2 (en) 2016-09-07

Family

ID=50746363

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012218348A Active JP5988368B2 (en) 2012-09-28 2012-09-28 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP5988368B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6507730B2 (en) 2015-03-10 2019-05-08 富士通株式会社 Coordinate transformation parameter determination device, coordinate transformation parameter determination method, and computer program for coordinate transformation parameter determination
JP2018142109A (en) * 2017-02-27 2018-09-13 富士通株式会社 Display control program, display control method, and display control apparatus
CN108613625B (en) * 2018-05-03 2020-11-06 艾律有限责任公司 Measuring method using augmented reality technology
CN110827376A (en) * 2018-08-09 2020-02-21 北京微播视界科技有限公司 Augmented reality multi-plane model animation interaction method, device, equipment and storage medium
WO2021042376A1 (en) * 2019-09-06 2021-03-11 罗伯特·博世有限公司 Calibration method and apparatus for industrial robot, three-dimensional environment modeling method and device for industrial robot, computer storage medium, and industrial robot operating platform

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2903964B2 (en) * 1993-09-29 1999-06-14 株式会社デンソー Three-dimensional position and posture recognition method based on vision and three-dimensional position and posture recognition device based on vision
JP5201416B2 (en) * 2009-04-13 2013-06-05 株式会社アイティーティー Image processing apparatus for photo measurement, field recording system using the same, package recording system, and laser processing system
JP5773436B2 (en) * 2011-11-24 2015-09-02 Kddi株式会社 Information terminal equipment

Also Published As

Publication number Publication date
JP2014071035A (en) 2014-04-21

Similar Documents

Publication Publication Date Title
EP1596330B1 (en) Estimating position and orientation of markers in digital images
EP3067861B1 (en) Determination of a coordinate conversion parameter
JP5713159B2 (en) Three-dimensional position / orientation measurement apparatus, method and program using stereo images
Wöhler 3D computer vision: efficient methods and applications
US9972120B2 (en) Systems and methods for geometrically mapping two-dimensional images to three-dimensional surfaces
JP6573419B1 (en) Positioning method, robot and computer storage medium
JP5773436B2 (en) Information terminal equipment
JP5988368B2 (en) Image processing apparatus and method
JP6008397B2 (en) AR system using optical see-through HMD
WO2006082825A1 (en) Mark arrangement measuring method, positional posture estimating method, mark arrangement measuring apparatus and positional posture estimating apparatus
US9182220B2 (en) Image photographing device and method for three-dimensional measurement
CN112686877B (en) Binocular camera-based three-dimensional house damage model construction and measurement method and system
JP5988364B2 (en) Image processing apparatus and method
Boehm Accuracy investigation for structured-light based consumer 3D sensors
JP2007048068A (en) Information processing method and device
CN111915666A (en) Volume measurement method and device based on mobile terminal
JP6906177B2 (en) Intersection detection device, camera calibration system, intersection detection method, camera calibration method, program and recording medium
JP6073123B2 (en) Stereoscopic display system, stereoscopic image generating apparatus, and stereoscopic image generating program
CN113256811B (en) Building modeling method, building modeling apparatus, and computer-readable storage medium
Neumann et al. A hierarchy of cameras for 3D photography
Otero et al. Local iterative DLT soft-computing vs. interval-valued stereo calibration and triangulation with uncertainty bounding in 3D reconstruction
WO2018056802A1 (en) A method for estimating three-dimensional depth value from two-dimensional images
WO2013142819A1 (en) Systems and methods for geometrically mapping two-dimensional images to three-dimensional surfaces
JP6073121B2 (en) 3D display device and 3D display system
JP4810403B2 (en) Information processing apparatus and information processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160215

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: 20160803

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160804

R150 Certificate of patent or registration of utility model

Ref document number: 5988368

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150