JP2015007637A - Three-dimensional measuring device - Google Patents

Three-dimensional measuring device Download PDF

Info

Publication number
JP2015007637A
JP2015007637A JP2014164762A JP2014164762A JP2015007637A JP 2015007637 A JP2015007637 A JP 2015007637A JP 2014164762 A JP2014164762 A JP 2014164762A JP 2014164762 A JP2014164762 A JP 2014164762A JP 2015007637 A JP2015007637 A JP 2015007637A
Authority
JP
Japan
Prior art keywords
image
corresponding point
measurement
unit
point
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.)
Granted
Application number
JP2014164762A
Other languages
Japanese (ja)
Other versions
JP5828024B2 (en
Inventor
智紀 増田
Tomonori Masuda
智紀 増田
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.)
Fujifilm Corp
Original Assignee
Fujifilm 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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2014164762A priority Critical patent/JP5828024B2/en
Publication of JP2015007637A publication Critical patent/JP2015007637A/en
Application granted granted Critical
Publication of JP5828024B2 publication Critical patent/JP5828024B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/06Interpretation of pictures by comparison of two or more pictures of the same area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T7/85Stereo camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images

Abstract

PROBLEM TO BE SOLVED: To provide a three-dimensional measuring device that has improved the accuracy of three-dimensional measurement by reducing the deviation between a measurement point input into one of viewpoint images and a corresponding point set at the other of the viewpoint images.SOLUTION: A measurement point 7, which is a three-dimensional measurement reference, is input into a left viewpoint image 6L. A corresponding point 8a is set on an extension line extended horizontally from the measurement point 7 toward a right viewpoint image 6R. If a vertical deviation D occurs between the left and right viewpoint images 6L, 6R, and straight lines 24, 27 passing through the measurement point 7 and corresponding point 8a of the respective viewpoint images 6L, 6R intersect with a horizontal line with a small angle θ, the corresponding point 8a is erroneously set at a position far from a true corresponding point 8. As a countermeasure to this, a corresponding point detection direction search unit is provided that, at each viewpoint image 6L, 6R, searches for a new corresponding point from the erroneously set corresponding point 8a along the straight line 27, and replaces the corresponding point 8a with the new corresponding point 8.

Description

本発明は、視差画像に基づいて3次元測定を行う3次元測定装置に関するものである。   The present invention relates to a three-dimensional measurement apparatus that performs three-dimensional measurement based on a parallax image.

異なる2視点からそれぞれの視点画像を撮像し、対象物体上の特定点がそれぞれの視点画像で確認できる場合、三角測量の原理に基づいて特定点の座標及び、特定点から撮像位置までの距離を導くことができる。特許文献1には、この原理を用いた3次元測定装置について記載されている。   When each viewpoint image is captured from two different viewpoints and a specific point on the target object can be confirmed in each viewpoint image, the coordinates of the specific point and the distance from the specific point to the imaging position are calculated based on the principle of triangulation. Can lead. Patent Document 1 describes a three-dimensional measuring apparatus using this principle.

視差方向が水平な視差画像から3次元情報を得るためには、視差画像を構成する2枚の視点画像のそれぞれの水平線を視差方向に正しく一致させておかなければならない。例えば、2枚の視点画像を水平に並べて配置したとき、それぞれの視点画像内の水平線が相対的に傾いていると正しい3次元情報が得にくくなる。それぞれの視点から視点画像を撮像するときに、それぞれの撮像画面が水平姿勢に保たれるとともに、撮像の視点が同一水平線上にあれば問題はない。   In order to obtain three-dimensional information from a parallax image having a horizontal parallax direction, the horizontal lines of the two viewpoint images constituting the parallax image must be matched with the parallax direction correctly. For example, when two viewpoint images are arranged side by side, it is difficult to obtain correct three-dimensional information if the horizontal lines in the respective viewpoint images are relatively inclined. When taking a viewpoint image from each viewpoint, there is no problem if each imaging screen is maintained in a horizontal posture and the imaging viewpoint is on the same horizontal line.

ところが、一つの筐体に2つの撮像光学系が設けられたステレオカメラであっても、製造組み立て時や部品単位での誤差が累積し、あるいは経時変化などにより、例えば筐体を水平姿勢に保って撮像したとしても、個々の視点画像がわずかながら互いに傾いた姿勢で撮像され、あるいは視点画像が同一水平線上に配列されずに撮像されることがある。こうした事態に対処すべく、視差画像から測定対象物の寸法や撮像位置からの距離などを含む3次元情報を導出するに先立って、2枚の視点画像に対して2次元の射影変換処理(以下、キャリブレーションという)を施し、視点画像各々の水平方向を視差方向と一致させる処理(以下、画像の平行化という)が行われる。   However, even in a stereo camera in which two imaging optical systems are provided in one housing, the housing is kept in a horizontal posture, for example, due to accumulation of errors at the time of manufacturing assembly or parts, or due to changes over time. Even if the images are picked up in this way, the individual viewpoint images may be picked up in a slightly inclined posture, or the viewpoint images may be picked up without being arranged on the same horizontal line. In order to cope with such a situation, prior to deriving three-dimensional information including the dimensions of the measurement object and the distance from the imaging position from the parallax image, two-dimensional projective transformation processing (hereinafter referred to as “two-dimensional projection conversion processing”) is performed. (Referred to as calibration), and the horizontal direction of each viewpoint image coincides with the parallax direction (hereinafter referred to as image parallelization).

特開2000−28355号公報JP 2000-28355 A

視差画像に対してキャリブレーションにより画像の平行化を行うと、2枚の視点画像の水平方向を互いに一致させることができる。しかし、装置の振動やキャリブレーションの精度によっては、2枚の視点画像を画面枠基準で水平に並べたときに、視点画像内の特定点の位置が水平線上に並ばず、垂直方向にずれてしまうこと(以下、垂直ズレ)がしばしば生じている。   If the parallax images are parallelized by calibration, the horizontal directions of the two viewpoint images can be made to coincide with each other. However, depending on the vibration of the device and the accuracy of calibration, when two viewpoint images are arranged horizontally on the basis of the screen frame, the position of a specific point in the viewpoint image is not aligned on the horizontal line but shifted in the vertical direction. Often occurs (hereinafter, vertical misalignment).

視差画像から3次元情報の測定を行う際には、例えば左視点画像に測定指示点を設定し、この測定指示点を通る水平線を右視点画像に向かって延長し、右視点画像中に測定指示点に対応する対応点を探索する処理が行われる。そして、左視点画像中に測定指示点を通る直線がある場合には、測定指示点から右視点画像に延ばした水平線と、右視点画像中の該当する直線との交点が対応点として認識される。しかし、左右の視点画像の間に上述した垂直ズレが存在し、しかも左視点画像中に測定指示点を通る直線が存在する場合には、この直線の傾きが小さく水平に近ければ近いほど、対応点として認識される交点の座標が変動しやすくなる。3次元情報の測定は、左視点画像の測定指示点と右視点画像の対応点とが3次元空間では同一点であるという前提で行われるから、対応点の座標が大きく変動すると3次元測定の信頼性が損なわれてしまう。   When measuring 3D information from a parallax image, for example, a measurement instruction point is set in the left viewpoint image, a horizontal line passing through the measurement instruction point is extended toward the right viewpoint image, and a measurement instruction is included in the right viewpoint image. A process for searching for a corresponding point corresponding to the point is performed. When there is a straight line passing through the measurement instruction point in the left viewpoint image, the intersection of the horizontal line extending from the measurement instruction point to the right viewpoint image and the corresponding straight line in the right viewpoint image is recognized as a corresponding point. . However, when the vertical deviation described above exists between the left and right viewpoint images, and there is a straight line that passes through the measurement instruction point in the left viewpoint image, the smaller the slope of this straight line is, the closer to the horizontal, the more The coordinates of the intersection recognized as a point are likely to fluctuate. The measurement of the three-dimensional information is performed on the assumption that the measurement instruction point of the left viewpoint image and the corresponding point of the right viewpoint image are the same point in the three-dimensional space. Reliability is impaired.

本発明の目的は、一方の視点画像に入力された測定指示点に対応する対応点を他方の視点画像中で探索する際に、それぞれの視点画像の相互間で垂直ズレがあったとしても、その影響を最小限に留め、測定精度を落とすことがないようにした3次元測定装置を提供することである。   The object of the present invention is to search for a corresponding point corresponding to a measurement instruction point input to one viewpoint image in the other viewpoint image, even if there is a vertical shift between the respective viewpoint images, The object is to provide a three-dimensional measuring apparatus that minimizes the influence and does not reduce the measurement accuracy.

本発明の3次元測定装置は、視差画像記憶部と、画像表示部と、測定点入力部と、対応点探索部と、3次元測定部と、直線検出部と、角度検出部と、水平判定部と、対応点検出方向探索部とを備えている。視差画像記憶部は、第1視点画像と第2視点画像とを記憶する。画像表示部は、第1,第2視点画像の少なくともいずれかを表示する。測定点入力部は、画像表示部に表示された一方の視点画像に測定点を入力する。対応点探索部は、測定点が入力されていない他方の視点画像中に測定点に対応した対応点を探索する。3次元測定部は、第1,第2視点画像と、測定点と対応点に基づいて被写体の3次元情報を導出する。直線検出部は、測定点または対応点の近傍を通る直線を検出する。角度検出部は、直線が検出されると視点画像の水平方向に対して直線が鋭角で交差する方の角度を検出する。水平判定部は、検出された角度が予め設定された閾値Sより小さい場合を水平線含有状態、大きい場合を水平線非含有状態と判定する。対応点検出方向探索部は、水平判定部で水平線含有状態の判定がなされたときに対応点の導出対象となっている視点画像中から対応点を通る直線に沿って新たな対応点の探索を行う。対応点検出方向探索部により新たな対応点が検出されたときには、元の対応点に変えて新たな対応点を3次元情報の導出に用いる。   The three-dimensional measurement apparatus of the present invention includes a parallax image storage unit, an image display unit, a measurement point input unit, a corresponding point search unit, a three-dimensional measurement unit, a straight line detection unit, an angle detection unit, and a horizontal determination. And a corresponding point detection direction search unit. The parallax image storage unit stores the first viewpoint image and the second viewpoint image. The image display unit displays at least one of the first and second viewpoint images. The measurement point input unit inputs a measurement point to one viewpoint image displayed on the image display unit. The corresponding point search unit searches for a corresponding point corresponding to the measurement point in the other viewpoint image in which the measurement point is not input. The three-dimensional measurement unit derives three-dimensional information of the subject based on the first and second viewpoint images, the measurement points, and the corresponding points. The straight line detection unit detects a straight line passing through the vicinity of the measurement point or the corresponding point. When a straight line is detected, the angle detection unit detects an angle at which the straight line intersects at an acute angle with respect to the horizontal direction of the viewpoint image. The horizontal determination unit determines that the detected angle is smaller than a preset threshold value S when the horizontal line is included, and if the detected angle is larger than the threshold S, the horizontal line is not included. The corresponding point detection direction searching unit searches for a new corresponding point along a straight line passing through the corresponding point from the viewpoint image from which the corresponding point is derived when the horizontal determining unit determines the horizon inclusion state. Do. When a new corresponding point is detected by the corresponding point detection direction search unit, the new corresponding point is used to derive the three-dimensional information instead of the original corresponding point.

画像表示部は、3次元測定部で導出された3次元情報を表示してもよい。角度検出部で検出された角度の大きさに応じ、第1,第2視点画像間に生じる垂直方向の画像ズレ量の最大値をVmaxとし、3次元測定に際して許容される水平方向視差の誤差をUmaxとしたとき、閾値Sの値としては「S=Arctan(Vmax/Umax)」とするのが好ましい。   The image display unit may display the three-dimensional information derived by the three-dimensional measurement unit. According to the angle detected by the angle detection unit, the maximum value of the vertical image deviation generated between the first and second viewpoint images is Vmax, and the horizontal parallax error allowed in the three-dimensional measurement is When Umax is set, the value of the threshold S is preferably “S = Arctan (Vmax / Umax)”.

3次元測定部で導出される3次元情報の信頼性が段階的に異なる警告を発生させる警告発生部を設けてもよい。特に、警告が発生したとき、水平判定部での判定の後に、視点画像の測定点を中心とする一定エリア内に属する特定画像と、測定点を通る直線に沿って一定エリアを走査したときに走査中の一定エリア内から順次に得られる走査画像とを比較して画像の類似性を判定し、その類似性が予め設定した基準レベル以下であるときは、先の対応点検出方向探索部で探索された新たな対応点が適切な対応点である可能性が高いから、新たな対応点を活かした3次元情報の導出が許容されるようにすればよい。   You may provide the warning generation part which generate | occur | produces the warning from which the reliability of the three-dimensional information derived | led-out by a three-dimensional measurement part differs in steps. In particular, when a warning occurs, after a determination by the horizontal determination unit, when a specific image belonging to a certain area centered on the measurement point of the viewpoint image and a certain area are scanned along a straight line passing through the measurement point Compared with scanned images obtained sequentially from within a certain area during scanning, image similarity is determined, and when the similarity is below a preset reference level, the corresponding point detection direction search unit previously Since there is a high possibility that the searched new corresponding point is an appropriate corresponding point, the derivation of the three-dimensional information using the new corresponding point may be allowed.

本発明によれば、視点画像の相互に画像の垂直ズレが生じており、しかも視差方向に対してわずかに傾いた直線パターンが視点画像中にあった場合でも、視点画像の一方に入力した測定点に対応する対応点を他方の視点画像に設定するときの誤設定を防ぎ、精度よく3次元測定を行うことができる。   According to the present invention, even when a vertical shift of images occurs between viewpoint images and a linear pattern slightly tilted with respect to the parallax direction is present in the viewpoint image, the measurement input to one of the viewpoint images It is possible to prevent erroneous setting when setting a corresponding point corresponding to a point to the other viewpoint image, and to perform three-dimensional measurement with high accuracy.

本発明を用いた撮像装置の使用態様を示す説明図である。It is explanatory drawing which shows the usage condition of the imaging device using this invention. 撮像された視差画像の例を示す説明図である。It is explanatory drawing which shows the example of the imaged parallax image. 本発明を用いた撮像装置の構成の概略を示すブロック図である。It is a block diagram which shows the outline of a structure of the imaging device using this invention. 本発明の撮像装置による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence by the imaging device of this invention. 小さい傾斜の直線パターンがある視点画像間に垂直ズレが発生した場合の説明図である。It is explanatory drawing when a vertical shift | offset | difference generate | occur | produces between viewpoint images with a small inclination linear pattern. 大きい傾斜の直線パターンがある視点画像間に垂直ズレが発生した場合の説明図である。It is explanatory drawing when the vertical shift generate | occur | produces between viewpoint images with a linear pattern with a big inclination. 他の実施形態に係る撮像装置の構成の概略を示すブロック図である。It is a block diagram which shows the outline of a structure of the imaging device which concerns on other embodiment. 画像の類似性を判定する際の走査処理を示す説明図である。It is explanatory drawing which shows the scanning process at the time of determining the similarity of an image. 改良された処理手順を含むフローチャートである。It is a flowchart including the improved process sequence. さらに改良された処理手順を含むフローチャートである。It is a flowchart including a further improved processing procedure.

図1に示すように、本発明を用いた撮像装置はステレオカメラ2で構成され、左眼カメラ2aと右眼カメラ2bが水平に並んで設けられている。それぞれのカメラ2a,2bに用いられている光学系は、焦点距離を含め光学的な諸元は共通である。また、それぞれの光学系の結像面には個別にイメージセンサが組み込まれている。これらの左眼カメラ2aと右眼カメラ2bが視差画像の撮像部を構成している。   As shown in FIG. 1, the imaging apparatus using the present invention is composed of a stereo camera 2, and a left-eye camera 2a and a right-eye camera 2b are provided side by side. The optical system used for each of the cameras 2a and 2b has the same optical specifications including the focal length. In addition, an image sensor is individually incorporated in the imaging plane of each optical system. These left-eye camera 2a and right-eye camera 2b constitute an imaging unit for parallax images.

ステレオカメラ2の背面には液晶などで構成された画像表示パネル4が設けられている。それぞれのカメラ2a,2bで撮像されるライブ画像は、画像表示パネル4に横並びに表示される。シャッタボタン5を操作すると、その時点で表示されているライブ画像に続いて本撮像が行われ、左視点画像と右視点画像の画像データはそれぞれ対応づけられた上で同じ画像ファイルに記録される。なお、同じ画像ファイルには撮影距離や撮影倍率などの撮影条件を含むタグデータも記録される。   An image display panel 4 made of liquid crystal or the like is provided on the rear surface of the stereo camera 2. Live images captured by the cameras 2a and 2b are displayed side by side on the image display panel 4. When the shutter button 5 is operated, the main imaging is performed following the live image displayed at that time, and the image data of the left viewpoint image and the right viewpoint image are associated with each other and recorded in the same image file. . Note that tag data including shooting conditions such as shooting distance and shooting magnification is also recorded in the same image file.

図1には、被写体3として家具を撮像し、その高さHを三次元測定の対象とする例を表している。図2に示すように、ライブ画像として得られる左視点画像6Lと右視点画像6Rとを画像表示パネル4に横並びに表示させる。このとき、左視点画像6Lと右視点画像6Rとを正しく整列してそれぞれ水平姿勢を保って表示することができるように、ステレオカメラ2にはキャリブレーション機能が用意されている。しかし、キャリブレーション機能にも制約があり、図2に示すように左視点画像6Lと右視点画像6Rとが画面単位で上下にずれ、しかも一方がわずかに回転した姿勢で表示されることがある。   FIG. 1 illustrates an example in which furniture is imaged as the subject 3 and its height H is a target for three-dimensional measurement. As shown in FIG. 2, the left viewpoint image 6L and the right viewpoint image 6R obtained as live images are displayed side by side on the image display panel 4. At this time, the stereo camera 2 is provided with a calibration function so that the left viewpoint image 6L and the right viewpoint image 6R can be correctly aligned and displayed in a horizontal orientation. However, the calibration function is also limited, and as shown in FIG. 2, the left viewpoint image 6L and the right viewpoint image 6R may be displayed in a posture in which the screen is shifted up and down and one of them is slightly rotated. .

このステレオカメラ2を用いた3次元測定では、画像表示パネル4に表示された左視点画像6Lに基準となる測定点7を指定すると、この測定点7に対応する対応点8が他方の右視点画像6R上に自動的に設定される。この対応点8の算出処理に誤差ができるだけ入り込むことがないように、ステレオカメラ2には図3に機能ブロックで示す独特の構成が設けられている。測定点7は測定対象となる被写体3の上に指定されるのが通常であるから、図示のように輪郭線の上や形状線の上に入力されたり、目印になりやすい直線的な模様線の上に入力されたりすることが多い。   In the three-dimensional measurement using the stereo camera 2, when a measurement point 7 serving as a reference is designated in the left viewpoint image 6L displayed on the image display panel 4, the corresponding point 8 corresponding to the measurement point 7 is the other right viewpoint. It is automatically set on the image 6R. In order to prevent an error from entering the corresponding point 8 calculation process as much as possible, the stereo camera 2 is provided with a unique configuration shown by functional blocks in FIG. Since the measurement point 7 is usually specified on the subject 3 to be measured, it is input on the contour line or the shape line as shown in FIG. Often entered on top of.

撮像部11は、レンズ2a,2b及びその結像面にそれぞれ個別に設けられたイメージセンサを含み、イメージセンサから順次に得られる撮像信号は信号処理部12に入力される。信号処理部12では周知の画像信号処理が行われ、ライブ画像として得られる左視点画像6L,右視点画像6Rの画像データは信号処理部12に接続されたVRAM13上で順次に書き換えられる。また、VRAM13から適宜のタイミングで読み出された画像データにより、画像表示パネル4に左視点画像6Lと右視点画像6Rとを表示することができる。   The imaging unit 11 includes lenses 2 a and 2 b and image sensors individually provided on the imaging surfaces thereof, and imaging signals sequentially obtained from the image sensors are input to the signal processing unit 12. The signal processing unit 12 performs known image signal processing, and the image data of the left viewpoint image 6L and the right viewpoint image 6R obtained as live images are sequentially rewritten on the VRAM 13 connected to the signal processing unit 12. Further, the left viewpoint image 6L and the right viewpoint image 6R can be displayed on the image display panel 4 by the image data read from the VRAM 13 at an appropriate timing.

信号処理部12には、直線検出部14と、角度検出部15とが設けられている。直線検出部14は、図2に示すように、例えば左視点画像6L上に3次元測定の基準となる測定点7を指定したとき、この測定点7の上またはその近傍を、画像の一部を構成する何らかの直線状の線分が通っているか否かを検出する。なお、この場合の近傍とはイメージセンサの画素数及び画素サイズなどに応じて決められ、例えば測定点7から周囲に5画素分の範囲内として決めることができる。角度検出部15は、直線検出部14で検出された直線が水平線に対してどの程度の角度であるかを検出する。この場合の水平の基準は、測定点7が指定された左視点画像6Lを撮像しているイメージセンサの画素配列を基準にしている。   The signal processing unit 12 includes a straight line detection unit 14 and an angle detection unit 15. As shown in FIG. 2, for example, when the measurement point 7 serving as a reference for the three-dimensional measurement is designated on the left viewpoint image 6L, the straight line detection unit 14 displays a part of the image on or near the measurement point 7. It is detected whether or not any straight line segment constituting the line passes. Note that the vicinity in this case is determined according to the number of pixels and the pixel size of the image sensor, and can be determined within a range of five pixels from the measurement point 7 to the periphery, for example. The angle detection unit 15 detects how much the straight line detected by the straight line detection unit 14 is at an angle with respect to the horizontal line. The horizontal reference in this case is based on the pixel array of the image sensor that is capturing the left viewpoint image 6L in which the measurement point 7 is specified.

角度検出部15が検出した直線の角度が水平に近いと、三次元情報を導出する際の信頼性に悪影響を及ぼすおそれがある。水平判定部16は、検出された直線の角度が予め設定された閾値Sよりも小さい角度であるか否かを判定する。なお、水平に対する直線の傾きには特に方向性がないため、角度検出部15は水平線に対して鋭角で交差する方の角度がどの程度であるかを検出する。   If the angle of the straight line detected by the angle detection unit 15 is close to horizontal, there is a risk of adversely affecting the reliability when the three-dimensional information is derived. The horizontal determination unit 16 determines whether or not the angle of the detected straight line is smaller than a preset threshold S. Since the inclination of the straight line with respect to the horizontal is not particularly directional, the angle detection unit 15 detects the degree of the angle that intersects the horizontal line at an acute angle.

操作入力部10は、前述した測定点7を入力するためのタッチパネルやカーソル操作ボタン、また3次元測定用の視差画像を記録として残すときに操作されるシャッタボタン5などが含まれ、3次元形状測定の基準となる測定点の入力部にも用いられる。信号処理部12には、さらに警告発生部19、画像データメモリ20などが接続されている。警告発生部19は、直線検出部14及び水平判定部16による評価、すなわち3次元測定用の画像として適切な画像が記録できるか否かの評価がNGであるときに警告動作を行う。このような警告発生部19による警告処理としては、報知音の発生、画像表示パネル4上への警告表示、またシャッタボタン5の押圧操作を禁止するレリーズロック動作などを利用することができる。   The operation input unit 10 includes a touch panel and cursor operation buttons for inputting the measurement points 7 described above, and a shutter button 5 which is operated when leaving a parallax image for 3D measurement as a record. It is also used for the input part of the measurement point that becomes the measurement reference. The signal processing unit 12 is further connected with a warning generation unit 19 and an image data memory 20. The warning generation unit 19 performs a warning operation when the evaluation by the straight line detection unit 14 and the horizontal determination unit 16, that is, whether or not an appropriate image can be recorded as an image for three-dimensional measurement is NG. As such warning processing by the warning generation unit 19, generation of a notification sound, display of a warning on the image display panel 4, a release lock operation for prohibiting the pressing operation of the shutter button 5, or the like can be used.

画像データメモリ20には、シャッタボタン5の操作で適正に撮像された左視点画像6L,右視点画像6Rの画像データを保存することができる。画像データの保存に際しては、記録制御部17による制御を加えるようにするとよい。例えば、シャッタボタン5の操作で撮像した左視点画像6L,右視点画像6Rは、一旦はVRAM13の所定エリアに記録されるが、上記のように必ずしも3次元情報の導出に適切でない場合もあり得る。したがって、そのような場合には記録制御部17からのコマンドにより、画像データメモリ20への画像データの記録・保存を自動的に中止することができる。なお、シャッタボタン5の操作で本撮像された視差画像の画像データについては、一旦画像データメモリ20に書き込んでおくことも可能である。この場合、3次元測定に不適切なものであると判定されたときには、書き込まれた画像データを自動消去するような制御も可能となる。なお、これらの場合には画像表示パネル4に確認表示を行うのが望ましい。   The image data memory 20 can store image data of the left viewpoint image 6L and the right viewpoint image 6R that are appropriately captured by operating the shutter button 5. When the image data is stored, control by the recording control unit 17 may be added. For example, the left viewpoint image 6L and the right viewpoint image 6R captured by the operation of the shutter button 5 are once recorded in a predetermined area of the VRAM 13, but as described above, it may not always be appropriate for derivation of three-dimensional information. . Therefore, in such a case, recording / saving of the image data in the image data memory 20 can be automatically stopped by a command from the recording control unit 17. Note that the image data of the parallax image that is actually captured by the operation of the shutter button 5 can be temporarily written in the image data memory 20. In this case, when it is determined that the image data is inappropriate for the three-dimensional measurement, it is possible to control to automatically erase the written image data. In these cases, it is desirable to perform confirmation display on the image display panel 4.

図4に示すフローチャートを用いて、上記ステレオカメラ2が実行する処理について説明する。撮像処理S2では、シャッタボタン5の押圧操作を受けて、左眼カメラ2aと右眼カメラ2bで撮像した左視点画像6Lと右視点画像6Rが撮像される。これらの一対の視点画像は、同じ画像ファイルに対応づけられた形で画像データメモリ20に記録され仮保存される。そして、表示処理S3によりこれらの視点画像6L,6Rは画像表示パネル4に表示される。測定点入力処理S4は、画像表示パネル4に表示されている左視点画像6Lにおいて基準となる測定点7を指定する処理である。この処理には操作入力部10からの操作、例えばマウスによるカーソル操作あるいは画像表示パネル4に組み込まれたタッチパネルへのタッチ操作を用いることができる。   The process performed by the stereo camera 2 will be described using the flowchart shown in FIG. In the imaging process S2, in response to the pressing operation of the shutter button 5, the left viewpoint image 6L and the right viewpoint image 6R captured by the left eye camera 2a and the right eye camera 2b are captured. The pair of viewpoint images is recorded and temporarily stored in the image data memory 20 in a form associated with the same image file. Then, the viewpoint images 6L and 6R are displayed on the image display panel 4 by the display process S3. The measurement point input process S4 is a process of designating a measurement point 7 that serves as a reference in the left viewpoint image 6L displayed on the image display panel 4. For this processing, an operation from the operation input unit 10, for example, a cursor operation with a mouse or a touch operation on a touch panel incorporated in the image display panel 4 can be used.

直線検出処理S5では、直線検出部14にて測定点7の真上あるいはその近傍を通る直線を検出する。直線判定処理S6で該当する直線があることが検出されると、角度検出部15により角度検出処理S7が行われ、水平線に対するその直線の鋭角側で交差している角度θが検出される。そして、水平判定処理S8により角度θが閾値Sよりも大きいか否かが判定される。閾値Sよりも角度θが大きければ水平判定部16は水平線非含有状態と判定し、当該直線の存在により3次元情報の導出には影響が少ないと判断する。なお、3次元情報としては、視差画像の撮像対象となっている被写体の全体あるいは部分的なサイズ、撮像位置から被写体までの距離などがある。   In the straight line detection process S5, the straight line detection unit 14 detects a straight line passing directly above or near the measurement point 7. When it is detected in the straight line determination process S6 that there is a corresponding straight line, the angle detection unit 15 performs an angle detection process S7, and an angle θ intersecting the horizontal line on the acute angle side is detected. Then, it is determined whether or not the angle θ is larger than the threshold value S by the horizontal determination process S8. If the angle θ is larger than the threshold value S, the horizontal determination unit 16 determines that the horizontal line is not included, and determines that the presence of the straight line has little influence on the derivation of the three-dimensional information. Note that the three-dimensional information includes the entire or partial size of the subject that is the subject of the parallax image, the distance from the imaging position to the subject, and the like.

直線検出処理S5で測定点7の近傍に直線パターンが存在していない場合も、水平線非含有状態と同様に特に3次元情報の導出には問題がない状態であると判断される。これらの場合には、今回撮像された左視点画像6Lと右視点画像6Rは3次元測定に適する視差画像として分類することができ、記録制御部17は画像記録処理S9によりこの視差画像に係る画像データは、撮影条件などのタグデータとともに共通ファイル内のデータとして画像データメモリ20に本記録され保存される。また、角度検出処理S7で検出された角度θもタグデータの一つに追記録しておいてもよい。   Even in the case where no straight line pattern exists in the vicinity of the measurement point 7 in the straight line detection process S5, it is determined that there is no particular problem in the derivation of the three-dimensional information, as in the case where the horizontal line is not included. In these cases, the left viewpoint image 6L and the right viewpoint image 6R picked up this time can be classified as parallax images suitable for three-dimensional measurement, and the recording control unit 17 uses the image recording process S9 to display images related to the parallax images. The data is recorded and stored in the image data memory 20 as data in a common file together with tag data such as shooting conditions. Further, the angle θ detected in the angle detection process S7 may be additionally recorded in one of the tag data.

直線判定処理S6により直線が検出され、かつ水平判定処理S8により当該直線が閾値S以下である場合には水平線含有状態と判定され、3次元測定に適さない視差画像に分類される。そのため、当該視差画像については、3次元測定に適する視差画像とは分類して取り扱うことが好ましい。そして、例えば、3次元測定に適しない視差画像に対してのみ画像記録処理S9による記録処理を行わないという制御が可能である。また、画像記録処理S9によって記録する際に、3次元測定に適さない視差画像に対してのみ当該画像に3次元測定に適さない旨を付して記録処理を行うという制御も可能である。   When a straight line is detected by the straight line determination process S6 and the straight line is less than or equal to the threshold value S by the horizontal determination process S8, it is determined that the horizontal line is included, and the parallax images are not suitable for three-dimensional measurement. Therefore, the parallax image is preferably classified and handled as a parallax image suitable for three-dimensional measurement. Then, for example, it is possible to perform control such that the recording process by the image recording process S9 is not performed only on a parallax image that is not suitable for three-dimensional measurement. In addition, when recording is performed by the image recording process S9, it is also possible to perform control so that only the parallax image that is not suitable for the three-dimensional measurement is subjected to the recording process with the image being not suitable for the three-dimensional measurement.

また、3次元測定に適さない視差画像が撮像された場合には、画像表示パネル4上に角度検出処理S7で測定された角度θの表示に併せて3次元情報の測定精度が低下する旨の表示を行ったり、画像データメモリ20への保存が中止された旨の表示を行ったりすることが望ましい。もちろん、警告にかかわらず、撮像した視差画像を強行保存する操作も選択肢に含めておくこともでき、この場合には警告の内容を画像データとともに保存するのがよい。さらに、図4の警告処理S10以降に示すように、再撮像処理S11を促すことも可能である。なお、警告処理を行うにあたっては、角度導出処理S7によって導出された角度に従って、段階的に警告の度合いを変更するように設定しておくことも可能である。なお、警告は画像やマークなどの画面表示以外に、音または音声によるものであってもよい。   In addition, when a parallax image that is not suitable for three-dimensional measurement is captured, the measurement accuracy of the three-dimensional information is reduced along with the display of the angle θ measured in the angle detection process S7 on the image display panel 4. It is desirable to perform display or display that the saving to the image data memory 20 has been stopped. Of course, regardless of the warning, an operation for forcibly saving the captured parallax image can also be included as an option. In this case, it is preferable to save the content of the warning together with the image data. Furthermore, it is possible to prompt the re-imaging process S11 as shown after the warning process S10 in FIG. In performing the warning process, it is possible to change the warning level step by step according to the angle derived by the angle derivation process S7. Note that the warning may be generated by sound or voice in addition to the screen display of images and marks.

上述した3次元情報の測定に適するか適さないかの判断基準は、3次元情報の導出過程を考慮したもので以下を根拠にしている。撮像された左視点画像6Lと右視点画像6Rに対してキャリブレーションにより画像の平行化を行うと、2つの視点画像が水平に配列される。しかし、ステレオカメラ2の組み立て精度のばらつきや経時変化、またキャリブレーションの精度などによっては、一対の視点画像が完全に水平に配列されず、垂直ズレがしばしば起こり得る。図5に示す垂直ズレDがそれに該当する。   The above criteria for determining whether or not it is suitable for the measurement of the three-dimensional information is based on the following based on the derivation process of the three-dimensional information. When the captured left viewpoint image 6L and right viewpoint image 6R are parallelized by calibration, two viewpoint images are arranged horizontally. However, depending on variations in assembly accuracy of the stereo camera 2, changes with time, calibration accuracy, and the like, the pair of viewpoint images is not completely horizontally arranged, and vertical misalignment often occurs. The vertical deviation D shown in FIG.

また、撮像された左視点画像6Lと右視点画像6Rから3次元情報を導出する際には、測定対象となる被写体3の視差を導出するために、左視点画像6Lの被写体3上に設定した測定点7に対応する対応点8を右視点画像6Rで取得することが必須となる。対応点8は、左右の視点画像6L,6Rが水平に配列表示された画面において、測定点7から水平方向に向かって探索され、取得される。   Further, when the three-dimensional information is derived from the captured left viewpoint image 6L and right viewpoint image 6R, it is set on the subject 3 of the left viewpoint image 6L in order to derive the parallax of the subject 3 to be measured. It is essential to obtain the corresponding point 8 corresponding to the measurement point 7 in the right viewpoint image 6R. The corresponding point 8 is searched and acquired in the horizontal direction from the measurement point 7 on the screen in which the left and right viewpoint images 6L and 6R are arranged and displayed horizontally.

図5Aに示すように、左視点画像6Lに入力した測定点7を取得し、直線検出処理S5により測定点7の中心に略水平な直線24が検出された場合、右視点画像6Rに向かって測定点7から水平に対応点8の探索が行われる。両画像間に垂直ズレDが生じていると、左視点画像6Lの直線24に対応する右視点画像の直線27も垂直ズレDだけ上方に変位した状態となっている。このため、測定点7から対応点8を水平に探索してゆくと、画面の横座標に関しては真の対応点8よりも大きく左方に寄った対応点8aが設定される。そして、左右の視点画像6L,6R上の測定点7と対応点8aとが被写体3の同一点であることを前提にして3次元情報の導出が行われるため、精度の低下を防ぐことができない。   As shown in FIG. 5A, when the measurement point 7 input to the left viewpoint image 6L is acquired and a substantially horizontal straight line 24 is detected at the center of the measurement point 7 by the straight line detection process S5, the measurement point 7 is directed toward the right viewpoint image 6R. The corresponding point 8 is searched horizontally from the measurement point 7. If a vertical shift D occurs between the two images, the straight line 27 of the right viewpoint image corresponding to the straight line 24 of the left viewpoint image 6L is also displaced upward by the vertical shift D. For this reason, when the corresponding point 8 is searched horizontally from the measurement point 7, the corresponding point 8 a that is larger than the true corresponding point 8 and moves to the left is set with respect to the abscissa of the screen. Then, since the three-dimensional information is derived on the assumption that the measurement point 7 and the corresponding point 8a on the left and right viewpoint images 6L and 6R are the same point of the subject 3, a decrease in accuracy cannot be prevented. .

これに対し、図5Bに示すように、左視点画像6Lに入力した測定点7を取得し、直線検出処理S5によりその中心に水平から大きく傾いた直線31のみが検出される場合は、対応点8の設定誤差は軽度になる。両画像6L,6R間に同様の垂直ズレDが生じていたとしても、測定点7から水平方向に対応点8を探索したとき、直線31に対応する直線34に対しては対応点8bが取得され、真の対応点8と比較して大きく変位しない。   On the other hand, as shown in FIG. 5B, when the measurement point 7 input to the left viewpoint image 6L is acquired and only the straight line 31 greatly inclined from the horizontal is detected at the center by the straight line detection processing S5, The setting error of 8 becomes minor. Even if a similar vertical deviation D occurs between the images 6L and 6R, when the corresponding point 8 is searched in the horizontal direction from the measurement point 7, the corresponding point 8b is obtained for the straight line 34 corresponding to the straight line 31. Therefore, it does not displace significantly compared with the true corresponding point 8.

したがって、図5Aに示す状況下では、左右の視点画像6L,6Rは3次元測定には適さないから回避することが好ましい。一方、図5Bに示す状況の下では、不用意な誤差は生じにくいため、3次元測定には適しているとみなすことができる。図4に示されるこのような判断処理を行うことによって、ステレオカメラ2によって3次元情報の導出を目的としながら、不用意な視差画像が撮像されることを防ぐことができる。これにより、このステレオカメラ2によって適正に撮像された視差画像によれば、精度のよい3次元情報の導出ができるようになり、3次元測定用のステレオカメラ2として信頼性を高めることができる。   Therefore, in the situation shown in FIG. 5A, the left and right viewpoint images 6L and 6R are preferably not avoided because they are not suitable for three-dimensional measurement. On the other hand, under the situation shown in FIG. 5B, an inadvertent error is unlikely to occur, and can be regarded as suitable for three-dimensional measurement. By performing such a determination process shown in FIG. 4, it is possible to prevent an inadvertent parallax image from being captured while the stereo camera 2 aims to derive three-dimensional information. Thereby, according to the parallax image appropriately imaged by the stereo camera 2, it is possible to derive three-dimensional information with high accuracy, and the reliability of the stereo camera 2 for three-dimensional measurement can be improved.

また、対応点の許容最大変位から、水平判定処理S8における閾値Sを設定する方法を以下に説明する。上述した垂直ズレの大きさをV、角度検出処理S7により導出された角度をθとおいた場合、対応点は真の対応点に対して、水平方向に生じる変位Uは、
U=V×cotθ
と表される。垂直ズレの最大値をVmax、水平方向の許容最大変位をUmaxとすると、上記式のVにVmaxを、UにUmaxを代入して、θに対して解くことで、水平判定処理S8にて設定すべき閾値Sが
S=Arctan(Vmax/Umax)・・・(1)
と導出される。このように水平判定処理S8における閾値Sを設定することが望ましい。また、撮像倍率によって生じる誤差が変化するため、閾値Sを撮像倍率の変更に応じて可変することが望ましい。
A method for setting the threshold value S in the horizontal determination process S8 from the allowable maximum displacement of the corresponding point will be described below. When the magnitude of the vertical deviation described above is V and the angle derived by the angle detection process S7 is θ, the corresponding point U is a displacement U that occurs in the horizontal direction with respect to the true corresponding point.
U = V × cot θ
It is expressed. Assuming that the maximum value of vertical deviation is Vmax and the maximum allowable displacement in the horizontal direction is Umax, Vmax is substituted for V in the above equation, Umax is substituted for U, and it is set for horizontal determination processing S8 by solving for θ. The threshold S to be used is S = Arctan (Vmax / Umax) (1)
Is derived. Thus, it is desirable to set the threshold value S in the horizontal determination process S8. In addition, since the error caused by the imaging magnification changes, it is desirable to change the threshold value S according to the change of the imaging magnification.

ステレオカメラ2を三次元測定用の撮像装置として用い、撮像した左視点画像6Lと右視点画像6Rの画像データをタグデータとともに、パーソナルコンピュータで構成された三次元測定装置に入力する態様を採ることもできる。この場合、ステレオカメラ2としては、測定点7を基準にして撮像した視差画像が適切なものであるか否かを判定すれば十分である。しかし、ステレオカメラ自体に3次元測定を行う機能をもたせる場合には、ステレオカメラに上述のような対応点の探索機能を追加しなければならない。   The stereo camera 2 is used as an imaging device for three-dimensional measurement, and the captured image data of the left viewpoint image 6L and the right viewpoint image 6R are input together with tag data to a three-dimensional measuring device configured with a personal computer. You can also. In this case, it is sufficient for the stereo camera 2 to determine whether or not the parallax image captured with reference to the measurement point 7 is appropriate. However, when the stereo camera itself has a function of performing three-dimensional measurement, it is necessary to add the above-described corresponding point search function to the stereo camera.

図6に示す改良されたステレオカメラは、第1実施形態のステレオカメラ2の信号処理部12に、水平探索部36と検出方向探索部37とを有する対応点探索部35と、類似線判定部38、さらに3次元測定部40とを設けたものである。水平探察部36は、図5A及び図5Bで説明したように、左視点画像6Lに入力された測定点7から右視点画像中6Rに対応点8を探索する際に、測定点7から水平方向に探索する作用を行う。検出方向探索部37は、入力された測定点の真上あるいは近傍を通る直線が検出され、その角度θが閾値S以下であったときには、対応点の真上またはその近傍を通る直線上に新たな対応点を探索する作用をもつ。   The improved stereo camera shown in FIG. 6 includes a corresponding point search unit 35 having a horizontal search unit 36 and a detection direction search unit 37 in the signal processing unit 12 of the stereo camera 2 of the first embodiment, and a similar line determination unit. 38, and a three-dimensional measuring unit 40. As described with reference to FIGS. 5A and 5B, the horizontal search unit 36 searches from the measurement point 7 input to the left viewpoint image 6L to the corresponding point 8 in the right viewpoint image 6R in the horizontal direction. The search action is performed. The detection direction search unit 37 detects a straight line passing directly above or near the input measurement point, and when the angle θ is equal to or smaller than the threshold S, the detection direction search unit 37 newly adds the straight line passing directly above or near the corresponding point. Has the effect of searching for a corresponding point.

類似性判定部38は、左視点画像8Lに測定点7を入力したとき、その真上または近傍を通る直線が検出され、そしてその角度θが閾値S以下であったときに機能する。この類似性判定部38の作用は、図7に示すように、検出された直線44上の測定点7を中心にして一定サイズの画像確認エリア45を設定し、測定点7を仮想的に直線44に沿って走査する。走査に伴う仮想的な測定点7a,7bとともに画像確認エリア45も破線で示すように移動し、この移動の間に画像確認エリア45内の画像の類似性が判定され、評価される。なお、画像確認エリア45が直線44の全長分をカバーするように走査は双方向に行われる。   The similarity determination unit 38 functions when a measurement point 7 is input to the left viewpoint image 8L, a straight line passing immediately above or near the detection point 7 is detected, and the angle θ is equal to or less than the threshold value S. As shown in FIG. 7, the function of the similarity determination unit 38 is to set an image confirmation area 45 of a certain size with the measurement point 7 on the detected straight line 44 as the center, and virtually set the measurement point 7 to a straight line. Scan along 44. The image confirmation area 45 moves together with the virtual measurement points 7a and 7b accompanying the scanning as indicated by the broken line, and the similarity of the images in the image confirmation area 45 is determined and evaluated during this movement. Note that scanning is performed in both directions so that the image confirmation area 45 covers the entire length of the straight line 44.

類似性の判断基準は、当初の測定点7を中心とする画像確認エリア45内の画像であり、走査ごとに得られる画像確認エリア45内の画像を、濃度分布やカラー分布の類似性、パターン認識などで判定することができる。判定処理を効率化するには、例えば上述した濃度分布やカラー分布の類似性、パターンの類似性などの評価項目ごとに類似性の高低に対応するポイントを設定し、そのトータルポイントを予め設定した閾値と比較するなどの手法を採ることができる。画像確認エリア45のサイズは、例えば50×50画素分などのように画素数で適宜に調整すればよい。   The criterion for similarity is an image in the image confirmation area 45 centered on the initial measurement point 7, and the image in the image confirmation area 45 obtained for each scan is represented by the similarity or pattern of density distribution or color distribution. It can be determined by recognition or the like. In order to increase the efficiency of the determination process, for example, points corresponding to the level of similarity are set for each evaluation item such as the above-described density distribution, color distribution similarity, and pattern similarity, and the total points are set in advance. A method such as comparison with a threshold can be employed. The size of the image confirmation area 45 may be appropriately adjusted depending on the number of pixels, for example, 50 × 50 pixels.

図8に示すフローチャートを用いて、第2の実施形態の機能について説明する。図6に示すステレオカメラでは、図4に示す処理に加え、類似性判定部38及び対応点探索部35、そして3次元測定部40による処理が可能となっている。したがって、このステレオカメラは撮像部一体型の3次元測定装置としてもとらえることができる。   The function of the second embodiment will be described using the flowchart shown in FIG. In the stereo camera shown in FIG. 6, in addition to the processing shown in FIG. 4, processing by the similarity determination unit 38, the corresponding point search unit 35, and the three-dimensional measurement unit 40 is possible. Therefore, this stereo camera can be regarded as a three-dimensional measuring apparatus integrated with an imaging unit.

先の実施形態と同様に測定点入力処理S4を行った後、直線検出処理S5の前に水平探索部36によって右視点画像7Rに対する対応点の水平探索処理S11が行われ、例えば図5で説明したように測定点7に対して対応点8が取得される。続いて直線の検出処理S5、直線判定処理S6が行われ、直線の角度θが閾値Sを越えている場合には撮像された視差画像は適正なものと判断され3次元情報の導出処理S12に用いられる。導出された3次元情報は画像表示パネル4に表示され、タグデータとして視差画像の画像データとともに画像データメモリ20に保存される。   After performing the measurement point input process S4 as in the previous embodiment, the horizontal search unit 36 performs a corresponding point horizontal search process S11 for the right viewpoint image 7R before the straight line detection process S5. As described above, the corresponding point 8 is acquired for the measurement point 7. Subsequently, a straight line detection process S5 and a straight line determination process S6 are performed. When the straight line angle θ exceeds the threshold value S, it is determined that the captured parallax image is appropriate and the three-dimensional information deriving process S12 is performed. Used. The derived three-dimensional information is displayed on the image display panel 4 and stored in the image data memory 20 together with the image data of the parallax image as tag data.

直線の角度θが閾値S以下であるときには、図5Aで説明したように、対応点8の探索結果に誤差が入り込んでいることが懸念される。このため、水平判定処理S8に続いて検出方向探索部37による対応点の探索処理S13が行われる。この探索処理S13では、先の水平探索処理S11で取得された対応点を、その対応点またはその近傍を通る直線に沿って新たな対応点が探索される。図5Aを用いて説明すれば、右視点画像6R中で、元の対応点8aから新たな対応点8を探索する処理である。新たな対応点8に該当するか否かを判定する際には、測定点7を中心とする左視点画像6L内の一定サイズのエリア内画像と、新たに探索された対応点を中心とする右視点画像6R内の一定サイズのエリア内画像との類似性が基準となり、より類似性の高いものが新たな対応点として特定される。   When the angle θ of the straight line is equal to or smaller than the threshold value S, there is a concern that an error is included in the search result of the corresponding point 8 as described with reference to FIG. 5A. For this reason, the corresponding point search process S13 by the detection direction search unit 37 is performed following the horizontal determination process S8. In this search process S13, a new corresponding point is searched for along the corresponding point acquired in the previous horizontal search process S11 along a straight line passing through the corresponding point or its vicinity. If it demonstrates using FIG. 5A, it is the process which searches the new corresponding point 8 from the original corresponding point 8a in the right viewpoint image 6R. When determining whether or not it corresponds to a new corresponding point 8, the in-area image of a certain size in the left viewpoint image 6 </ b> L centering on the measurement point 7 and the newly searched corresponding point are the center. Based on the similarity to the in-area image of a certain size in the right viewpoint image 6R, a higher similarity is specified as a new corresponding point.

この探索処理S13の結果、検出確認処理S14で新たな対応点の検出が確認された場合には、対応点置換処理S15によって元の対応点が新たな対応点に置換される。これにより、より信頼性の高い対応点が探索されることになり、本来3次元測定に適さない視差画像に対しても、対応点の変位を修正して、高精度に測定することが可能になる。新たな対応点の検出が行われなかった場合には、対応点の位置に信頼性が乏しい旨の警告処理S16が行われる。この警告処理16としては、先の実施形態と同様に再撮像操作を促すことも可能である。再撮像を行う場合には、好ましくは先の撮像とは異なる態様で撮像を行うことが望ましい。その一助として、撮像部11に付加機能を設けておくことも有効である。   As a result of this search processing S13, when the detection of a new corresponding point is confirmed in the detection confirmation processing S14, the original corresponding point is replaced with a new corresponding point by the corresponding point replacement processing S15. As a result, a more reliable corresponding point is searched, and it is possible to measure the displacement of the corresponding point with high accuracy even for a parallax image that is originally not suitable for three-dimensional measurement. Become. If a new corresponding point is not detected, a warning process S16 is performed to the effect that the position of the corresponding point is not reliable. As this warning process 16, it is also possible to prompt a re-imaging operation as in the previous embodiment. When re-imaging is performed, it is preferable to perform imaging in a manner different from the previous imaging. As an aid, it is also effective to provide an additional function in the imaging unit 11.

図6に示すように、左眼カメラ2a,右眼カメラ2bに回転機構42を組み合わせ、モータの回転により左眼カメラ2a,右眼カメラ2bを各々の撮像光軸を中心に同方向に同角度回転できるようにしておく。回転機構42としては、左眼カメラ2aと右眼カメラ2bの鏡筒の外周にギヤを固定し、その両者にモータで駆動される連動ギヤを噛み合わせておくだけもよい。警告処理S16で再撮像が促され、これに応じるときには回転機構42により左眼カメラ2a,右眼カメラ2bを回転させれば、撮像される左右の視点画像中の直線が大きく傾いて水平線非含有状態になるから、3次元情報の導出に適した視差画像を撮像できる確率が高くなる。   As shown in FIG. 6, the left-eye camera 2a and the right-eye camera 2b are combined with a rotation mechanism 42, and the left-eye camera 2a and the right-eye camera 2b are rotated at the same angle around the respective imaging optical axes by rotation of the motor. Be ready to rotate. As the rotation mechanism 42, a gear may be fixed to the outer periphery of the lens barrel of the left eye camera 2a and the right eye camera 2b, and an interlocking gear driven by a motor may be engaged with both. In the warning process S16, re-imaging is prompted, and in response to this, if the left eye camera 2a and the right eye camera 2b are rotated by the rotation mechanism 42, straight lines in the left and right viewpoint images to be imaged are greatly inclined and no horizontal line is included. Since it becomes a state, the probability that the parallax image suitable for derivation | leading-out of three-dimensional information can be imaged increases.

さらに類似性判定部38を用いた対応点探索処理について、図8のフローチャートにより説明する。水平判定処理S8によって直線の角度θが閾値S以下であり、水平線含有状態と判定された場合には、一対の視点画像6L,6Rは3次元測定に適さないものと分類される。しかし、この3次元測定に適さない理由は対応点の位置の信頼性が低いことに起因するものであるから、その信頼性を高めることができれば3次元測定に用いることが可能になる。もちろん、検出方向探索部37による対応点の探索処理S13や置換処理S15は対応点導出時の信頼性を高める上で有効であるが、測定点を中心に検出した直線付近の画像が類似している場合には、右視点画像6R側でも直線付近に沿って類似した画像が存在する確率が高いことを意味しているから、真の対応点は非常に探索しにくい状況となる。   Further, the corresponding point search processing using the similarity determination unit 38 will be described with reference to the flowchart of FIG. When the straight line angle θ is equal to or smaller than the threshold S in the horizontal determination process S8 and it is determined that the horizontal line is included, the pair of viewpoint images 6L and 6R are classified as unsuitable for three-dimensional measurement. However, the reason why it is not suitable for the three-dimensional measurement is that the reliability of the position of the corresponding point is low. Therefore, if the reliability can be increased, it can be used for the three-dimensional measurement. Of course, the corresponding point search process S13 and the replacement process S15 by the detection direction search unit 37 are effective in increasing the reliability at the time of deriving the corresponding point, but the images near the straight line detected around the measurement point are similar. If it is, it means that there is a high probability that a similar image exists along the vicinity of the straight line on the right viewpoint image 6R side, so that a true corresponding point is very difficult to search.

図7に示す左視点画像6Lにおいて、測定点7を中心とする画像確認エリア45内の画像と、測定点7を通る直線44に沿って移動させた後の測定点7a,7bを中心とする画像確認エリア45の画像とが類似している場合が、真の対応点の導出が困難な場合に相当する。一方、これらの画像間に類似性がない場合が真の対応点の導出が可能な場合に相当する。そこで、図8に示すように、水平判定処理S8で水平線含有状態であると判定された場合、左視点画像6Lに関し、画像確認エリア内の画像の読み込み処理S18と、読み込まれた画像の類似性を判断する判断処理S19を組み合わせた類似性判定処理S20を行うのが効果的である。   In the left viewpoint image 6L shown in FIG. 7, the image in the image confirmation area 45 centered on the measurement point 7 and the measurement points 7a and 7b after being moved along the straight line 44 passing through the measurement point 7 are centered. A case where the image in the image confirmation area 45 is similar corresponds to a case where it is difficult to derive a true corresponding point. On the other hand, a case where there is no similarity between these images corresponds to a case where a true corresponding point can be derived. Therefore, as shown in FIG. 8, when it is determined in the horizontal determination process S8 that the horizon line is included, the image reading process S18 in the image confirmation area and the similarity of the read image with respect to the left viewpoint image 6L. It is effective to perform a similarity determination process S20 that is a combination of the determination process S19.

類似性判定処理S20で類似性が高いと判定された場合には、入力された測定点7を中心とする画像確認エリア45内の画像が特徴的でないことを意味している。このため、探索処理S13を行って右視点画像中に新たな対応点が得られたとしても、類似した画像の中での探索結果であり、真の対応点に該当する確率は低くなっている。したがって、類似性判定処理S20で類似性が高いと判定されたときには、警告処理S16に処理を移行する方が効率的な処理であると言える。   If the similarity determination process S20 determines that the similarity is high, it means that the image in the image confirmation area 45 centered on the input measurement point 7 is not characteristic. For this reason, even if a new corresponding point is obtained in the right viewpoint image by performing the search process S13, it is a search result in a similar image, and the probability of being a true corresponding point is low. . Therefore, when it is determined that the similarity is high in the similarity determination process S20, it can be said that it is more efficient to shift the process to the warning process S16.

逆に、類似性が低いと判定された場合には、入力された測定点7の周囲の画像に特徴があることを意味する。したがって、探索処理S13で新たな対応点を探索する過程で、新たな対応点を中心とする一定サイズの画像が、測定点を中心とする一定サイズの画像に対し、より高い類似性を示す可能性も高くなる。こうして新たな対応点が探索されたときには、元の対応点を新たな対応点に置換して用い、3次元測定の精度を高めることができる。   Conversely, if it is determined that the similarity is low, it means that the image around the input measurement point 7 has a feature. Therefore, in the process of searching for a new corresponding point in the search process S13, it is possible that an image of a certain size centered on the new corresponding point shows higher similarity to an image of a certain size centered on the measurement point. Increases the nature. When a new corresponding point is searched for in this way, the original corresponding point is replaced with a new corresponding point, and the accuracy of the three-dimensional measurement can be improved.

なお、警告処理S16では、以上の類似性判定処理S20による判定結果をも含めて画像表示パネル4に表示することが望ましい。また、これまでの実施形態と同様、水平判定処理S8の結果を表示したり、画像記録処理S9を行う際には、画像データとともに直線判定処理S6の結果や水平判定処理S8の結果、あるいは類似性判定処理S20の結果を記録してもよい。さらに、再撮像時に回転機構42を利用して左眼カメラ2a,右眼カメラ2bを光軸回りに回転させたときには、再撮像で得られた視差画像の画像データに回転角度の情報を付加しておくのがよい。   In the warning process S16, it is desirable to display on the image display panel 4 including the determination result in the similarity determination process S20. Similarly to the previous embodiments, when the result of the horizontal determination process S8 is displayed or when the image recording process S9 is performed, the result of the straight line determination process S6, the result of the horizontal determination process S8, or the like together with the image data. The result of the sex determination process S20 may be recorded. Further, when the left-eye camera 2a and the right-eye camera 2b are rotated around the optical axis using the rotation mechanism 42 at the time of re-imaging, rotation angle information is added to the image data of the parallax image obtained by re-imaging. It is good to keep.

以上に説明した実施形態は、基本的には撮像部11を構成とする撮像装置に係わるものであるが、本発明は撮像部11を構成要素として含まない3次元測定装置として用いることもできる。この場合、図6に示す操作入力部10をキーボードあるいはタッチパネル式の操作入力部に、画像表示パネル4をパソコン用のモニタに、画像データメモリ20をパソコンの内部メモリあるいは外付けメモリに対応させ、パソコンの演算処理部に信号処理装置12の機能をもたせておけばよい。   The embodiment described above basically relates to an imaging apparatus that includes the imaging unit 11, but the present invention can also be used as a three-dimensional measurement apparatus that does not include the imaging unit 11 as a component. In this case, the operation input unit 10 shown in FIG. 6 corresponds to a keyboard or touch panel type operation input unit, the image display panel 4 corresponds to a monitor for a personal computer, and the image data memory 20 corresponds to an internal memory or an external memory of the personal computer. What is necessary is just to give the function of the signal processing apparatus 12 to the arithmetic processing part of a personal computer.

そして、外部データとなる視差画像データをパソコンの内部メモリあるいは外付けメモリに入力すれば、パソコンの演算処理部の機能を利用して全く同様に3次元形状の測定を行うことができる。さらに、本発明の3次元測定装置による実質的な測定機能は、パソコンの演算処理部に相当する信号処理部12に含まれるそれぞれの処理部によって実行されるから、本発明は3次元測定装置を機能させる測定プログラムの態様でも実施可能である。 If parallax image data serving as external data is input to an internal memory or an external memory of a personal computer, a three-dimensional shape can be measured in exactly the same manner using the function of the arithmetic processing unit of the personal computer. Furthermore, since the substantial measurement function by the three-dimensional measuring apparatus of the present invention is executed by each processing unit included in the signal processing unit 12 corresponding to the arithmetic processing unit of the personal computer, the present invention provides the three-dimensional measuring apparatus. It can also be implemented in the form of a functioning measurement program.

上述した各種の実施形態においては、第1,第2視点画像として左右に配列表示される左視点画像と右視点画像とを用いて説明したが、視差の方向は必ずしも水平方向でなくてもよい。また、測定点の入力も左視点画像に限られず、少なくとも2種類の視点画像のいずれか一方であればよい。測定点から対応点を探索するには、例えば各視点画像における四隅などの特定の固定点からの座標を用いて測定点に対応する対応点を探索してもよい。   In the various embodiments described above, the left viewpoint image and the right viewpoint image arranged and displayed as the first and second viewpoint images have been described. However, the direction of the parallax does not necessarily have to be the horizontal direction. . In addition, the input of the measurement point is not limited to the left viewpoint image, and may be any one of at least two types of viewpoint images. In order to search for a corresponding point from the measurement point, for example, a corresponding point corresponding to the measurement point may be searched using coordinates from specific fixed points such as four corners in each viewpoint image.

2 ステレオカメラ
2a 左眼カメラ
2b 右眼カメラ
4 画像表示パネル
6L 左視点画像
6R 右視点画像
7 測定点
8 対応点
2 Stereo camera 2a Left eye camera 2b Right eye camera 4 Image display panel 6L Left viewpoint image 6R Right viewpoint image 7 Measurement point 8 Corresponding point

Claims (5)

第1視点画像と第2視点画像とを記憶する視差画像記憶部と、
前記第1,第2視点画像の少なくともいずれかを表示する画像表示部と、
前記第1,第2視点画像上の一方に測定点を入力する測定点入力部と、
前記第1,第2視点画像上の他方に前記測定点に対応する対応点を探索する対応点探索部と、
前記第1及び第2視点画像と、前記測定点及び前記対応点とに基づいて被写体に関する3次元情報を導出する3次元測定部と、
前記測定点または前記対応点の近傍を通る直線を検出する直線検出部と、
前記直線検出部で直線が検出されたとき、視点画像の水平方向に対して前記直線が鋭角で交差する方の角度を検出する角度検出部と、
前記角度が予め設定された閾値Sより小さい場合を水平線含有状態、前記角度が前記閾値Sより大きい場合を水平線非含有状態と判定する水平判定部と、
前記水平判定部で水平線含有状態と判定された場合に、前記対応点が導出された視点画像中から前記対応点を通る直線に沿って新たな対応点の探索を行う対応点検出方向探索部とを有し、
前記対応点検出方向探索部が新たな対応点を検出したときには前記対応点を前記新たな対応点に置換し、前記3次元測定部は、前記新たな対応点に基づいて、前記被写体に関する3次元情報を導出する3次元測定装置。
A parallax image storage unit that stores the first viewpoint image and the second viewpoint image;
An image display unit for displaying at least one of the first and second viewpoint images;
A measurement point input unit for inputting a measurement point to one of the first and second viewpoint images;
A corresponding point search unit for searching for a corresponding point corresponding to the measurement point on the other of the first and second viewpoint images;
A three-dimensional measurement unit that derives three-dimensional information about the subject based on the first and second viewpoint images, the measurement points, and the corresponding points;
A straight line detector that detects a straight line passing through the vicinity of the measurement point or the corresponding point;
When a straight line is detected by the straight line detection unit, an angle detection unit that detects an angle at which the straight line intersects at an acute angle with respect to a horizontal direction of the viewpoint image;
A horizontal determination unit that determines that the angle is smaller than a preset threshold S, a horizontal line containing state, and a case where the angle is larger than the threshold S, a horizontal line non-containing state;
A corresponding point detection direction search unit that searches for a new corresponding point along a straight line passing through the corresponding point from the viewpoint image from which the corresponding point is derived when the horizontal determining unit determines that the horizontal line is included; Have
When the corresponding point detection direction searching unit detects a new corresponding point, the corresponding point is replaced with the new corresponding point, and the three-dimensional measuring unit is configured to perform a three-dimensional measurement on the subject based on the new corresponding point. A three-dimensional measuring device that derives information.
前記画像表示部は、前記3次元測定部で導出された3次元情報を表示する請求項1に記載の3次元測定装置。   The three-dimensional measurement apparatus according to claim 1, wherein the image display unit displays the three-dimensional information derived by the three-dimensional measurement unit. 前記第1,第2視点画像間に生じる垂直方向の画像ズレ量の最大値をVmaxとし、3次元測定に際して許容される水平方向視差の誤差をUmaxとしたとき、前記閾値Sが、
S=Arctan(Vmax/Umax)
である請求項1または2に記載の3次元測定装置。
When the maximum value of the vertical image shift amount generated between the first and second viewpoint images is Vmax, and the horizontal parallax error allowed in the three-dimensional measurement is Umax, the threshold S is
S = Arctan (Vmax / Umax)
The three-dimensional measuring apparatus according to claim 1 or 2.
前記角度検出部で検出された角度の大きさに応じ、前記3次元測定部で導出される3次元情報の信頼性が段階的に異なる警告を発生する警告発生部を有する請求項1ないし3のうちいずれか1項に記載の3次元測定装置。   4. The warning generation unit according to claim 1, further comprising a warning generation unit that generates a warning in which the reliability of the three-dimensional information derived by the three-dimensional measurement unit varies stepwise according to the magnitude of the angle detected by the angle detection unit. The three-dimensional measuring apparatus of any one of them. 前記警告の発生時、前記水平判定部での判定の後に、前記測定点が入力された視点画像の前記測定点を中心とする一定エリア内の特定画像と、前記測定点を通る直線に沿って前記一定エリアを走査したときに走査中の前記一定エリア内から順次に得られる走査画像とを比較して画像の類似性を判定し、類似性が予め設定した基準レベル以下であるときは、前記対応点検出方向探索部で探索された新たな対応点への置換の後に前記3次元測定部で3次元情報の導出が許容される請求項4に記載の3次元測定装置。
Upon occurrence of the warning, after determination by the horizontal determination unit, along a specific image within a certain area centered on the measurement point of the viewpoint image to which the measurement point is input and a straight line passing through the measurement point When the predetermined area is scanned, the similarity of the image is determined by comparing with the scanned image sequentially obtained from within the constant area being scanned, and when the similarity is below a preset reference level, The three-dimensional measurement apparatus according to claim 4, wherein the three-dimensional measurement unit is allowed to derive three-dimensional information after replacement with a new corresponding point searched by the corresponding point detection direction search unit.
JP2014164762A 2011-10-28 2014-08-13 3D measuring device Expired - Fee Related JP5828024B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014164762A JP5828024B2 (en) 2011-10-28 2014-08-13 3D measuring device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2011237188 2011-10-28
JP2011237188 2011-10-28
JP2014164762A JP5828024B2 (en) 2011-10-28 2014-08-13 3D measuring device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2013540846A Division JP5600220B2 (en) 2011-10-28 2012-10-26 3D measuring device

Publications (2)

Publication Number Publication Date
JP2015007637A true JP2015007637A (en) 2015-01-15
JP5828024B2 JP5828024B2 (en) 2015-12-02

Family

ID=48167911

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2013540846A Expired - Fee Related JP5600220B2 (en) 2011-10-28 2012-10-26 3D measuring device
JP2014164762A Expired - Fee Related JP5828024B2 (en) 2011-10-28 2014-08-13 3D measuring device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
JP2013540846A Expired - Fee Related JP5600220B2 (en) 2011-10-28 2012-10-26 3D measuring device

Country Status (2)

Country Link
JP (2) JP5600220B2 (en)
WO (1) WO2013062087A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7341033B2 (en) 2019-11-11 2023-09-08 キヤノン株式会社 Parallax detection device, imaging device, parallax detection method, and program

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6457775B2 (en) * 2014-10-10 2019-01-23 エヌ・ティ・ティ・インフラネット株式会社 3D shape measuring apparatus and 3D shape measuring method
JP7064400B2 (en) * 2018-07-19 2022-05-10 日立Astemo株式会社 Object detection device
JP7134113B2 (en) * 2019-02-12 2022-09-09 日立Astemo株式会社 Image processing device
DE112020005059T5 (en) * 2020-03-06 2022-07-21 Hitachi Astemo, Ltd. PROCESSING DEVICE

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000207693A (en) * 1999-01-08 2000-07-28 Nissan Motor Co Ltd Obstacle detector on vehicle

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2882910B2 (en) * 1991-06-27 1999-04-19 富士通株式会社 3D image recognition method
JPH10155110A (en) * 1996-11-22 1998-06-09 Canon Inc Image pickup method, device and storage medium
JP3893981B2 (en) * 2002-01-11 2007-03-14 オムロン株式会社 Vehicle recognition method and traffic flow measuring apparatus using this method
JP2005189021A (en) * 2003-12-25 2005-07-14 Brother Ind Ltd Imaging device
JP5186286B2 (en) * 2007-06-04 2013-04-17 オリンパス株式会社 Endoscope device for measurement and program
JP5437087B2 (en) * 2010-01-15 2014-03-12 オリンパス株式会社 Endoscope apparatus and program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000207693A (en) * 1999-01-08 2000-07-28 Nissan Motor Co Ltd Obstacle detector on vehicle

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7341033B2 (en) 2019-11-11 2023-09-08 キヤノン株式会社 Parallax detection device, imaging device, parallax detection method, and program
US11909942B2 (en) 2019-11-11 2024-02-20 Canon Kabushiki Kaisha Parallax detecting apparatus, image capturing apparatus, parallax detecting method, and storage medium

Also Published As

Publication number Publication date
JP5600220B2 (en) 2014-10-01
JPWO2013062087A1 (en) 2015-04-02
JP5828024B2 (en) 2015-12-02
WO2013062087A1 (en) 2013-05-02

Similar Documents

Publication Publication Date Title
JP5580164B2 (en) Optical information processing apparatus, optical information processing method, optical information processing system, and optical information processing program
JP5828024B2 (en) 3D measuring device
US20200177866A1 (en) Calibration apparatus, chart for calibration, chart pattern generation apparatus, and calibration method
JP2019500613A (en) Depth perception trinocular camera system
CN109377551B (en) Three-dimensional face reconstruction method and device and storage medium thereof
TW201533612A (en) Calibration of sensors and projector
JP5951043B2 (en) Image measuring device
JP5365387B2 (en) Position detection device
US20060215881A1 (en) Distance measurement apparatus, electronic device, distance measurement method, distance measurement control program and computer-readable recording medium
US11928805B2 (en) Information processing apparatus, information processing method, and storage medium for defect inspection and detection
US11346663B2 (en) Stereo camera
US9979858B2 (en) Image processing apparatus, image processing method and program
CN107820041B (en) Privacy blocking method and device
JP5805013B2 (en) Captured image display device, captured image display method, and program
JP6806633B2 (en) Measuring device and operating method of measuring device
JP6241083B2 (en) Imaging apparatus and parallax detection method
WO2021145304A1 (en) Image processing system
US11120572B2 (en) Method, system and apparatus for associating a target object in images
KR102288237B1 (en) Image association method, system and device
JP6448457B2 (en) Imaging direction variation detection apparatus and imaging direction variation detection method
JP7051571B2 (en) Teacher data creation device and method
US20120038750A1 (en) Apparatus and method for displaying three-dimensional (3d) object
EP4026092A1 (en) Scene lock mode for capturing camera images
JP2016021673A (en) Imaging apparatus
JP2016224691A (en) Sight line calibration program, sight line calibration device, and sight line calibration method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150611

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20150617

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150721

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151019

R150 Certificate of patent or registration of utility model

Ref document number: 5828024

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees