JP2006023133A - Instrument and method for measuring three-dimensional shape - Google Patents

Instrument and method for measuring three-dimensional shape Download PDF

Info

Publication number
JP2006023133A
JP2006023133A JP2004199816A JP2004199816A JP2006023133A JP 2006023133 A JP2006023133 A JP 2006023133A JP 2004199816 A JP2004199816 A JP 2004199816A JP 2004199816 A JP2004199816 A JP 2004199816A JP 2006023133 A JP2006023133 A JP 2006023133A
Authority
JP
Japan
Prior art keywords
camera
image
stripe pattern
stripe
edge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004199816A
Other languages
Japanese (ja)
Inventor
Tsutomu Abe
勉 安部
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 Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2004199816A priority Critical patent/JP2006023133A/en
Publication of JP2006023133A publication Critical patent/JP2006023133A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To restrain an edge extraction error in a photographed image by a first camera for conducting observation from the direction same to an optical axis of a projector. <P>SOLUTION: A stripe pattern of the projector 10 is read out from a frame memory 110 to be written in a reference stripe pattern memory 111, and the written stripe pattern is corrected by recoding. Stripes are extracted from the pattern image of the first camera 20, and each of the stripe is divided in a longitudinal directional in every stripe width to generate cells. Intensities among the corresponding respective cells are compared sequentially from the center of the image, a new code is generated and allocated when the pattern is varied by a factor such as a reflectance of an object to bring the intensity among the cells into a threshold value ore more, so as to correct the stripe pattern of the reference stripe pattern memory 111. Since an intrinsic edge is set in the stripe pattern, and since it is not varied by a surface shape or texture of the object, accurate edge coordinates are acquired to be free from an edge detection error. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、パターン投影法を用いて対象物体までの距離情報を取得する3次元形状測定技術に関する。   The present invention relates to a three-dimensional shape measurement technique for acquiring distance information to a target object using a pattern projection method.

対象物の形状を計測する手法として、対象物に基準となるパターンを投影してこの基準となるパターン光が投影された方向とは異なる方向からCCDカメラなどで撮影を行うパターン投影法と呼ばれる手法がある。撮影されたパターンは物体の形状によって変形を受けたものとなる。この撮影された変形パターンと投影したパターン(またはこれと等価な撮影パターン)との対応づけを行うことで、物体の3次元計測を行うことができる。パターン投影法では変形パターンと投影したパターンとの対応づけをいかに誤対応を少なく、かつ簡便に行うかが課題となっている。そこで様々なパターン投影法が従来より提案されている。   As a method for measuring the shape of an object, a method called a pattern projection method is used in which a reference pattern is projected onto an object, and photographing is performed with a CCD camera or the like from a direction different from the direction in which the reference pattern light is projected. There is. The captured pattern is deformed depending on the shape of the object. By associating the photographed deformation pattern with the projected pattern (or an equivalent photography pattern), three-dimensional measurement of the object can be performed. The problem with the pattern projection method is how to make the correspondence between the deformed pattern and the projected pattern simple and easy to avoid. Various pattern projection methods have been proposed in the past.

例えば特許文献1(特許第3482990号公報)に開示される手法は、コード化されたパターンを投影する投光器と、投光器の光軸方向から投影パターンを撮影する第1のカメラと、投光器の光軸方向と異なる方向から投影パターンを撮影する第2のカメラとを備え、投影パターンに対する第1のカメラによる撮影パターンの変化量が所定値以上の領域について新たなコードを割り付け、割り付けたコードを用いて第2のカメラによる撮影パターンから第1の距離情報を生成し、第1の距離情報および第1のカメラより得られた輝度情報に基づいて3次元画像を得るよう構成した3次元画像撮影装置である。投光器と同じ光軸に置いた第1のカメラで投光パターンを撮影してえた撮影パターンを用いて再コード化することにより精度よく3次元計測を行うことができる。
特許第3482990号公報
For example, a technique disclosed in Patent Document 1 (Japanese Patent No. 3482990) includes a projector that projects a coded pattern, a first camera that captures a projection pattern from the optical axis direction of the projector, and an optical axis of the projector. A second camera that captures a projection pattern from a direction different from the direction, and assigns a new code to an area where the amount of change in the captured pattern by the first camera relative to the projection pattern is a predetermined value or more, and uses the allocated code A three-dimensional image photographing apparatus configured to generate first distance information from a photographing pattern by a second camera and obtain a three-dimensional image based on the first distance information and luminance information obtained from the first camera. is there. Three-dimensional measurement can be performed with high accuracy by performing re-encoding using an imaging pattern obtained by imaging a projection pattern with a first camera placed on the same optical axis as the projector.
Japanese Patent No. 3482990

ところで、このような投影パターンを用いた方式では、ストライプの境界部の座標をカメラと投光器との位置関係から三角測量の原理により求めている。具体的には、第1のカメラより得られた再コード化画像のエッジと、第2のカメラより得られた計測画像のエッジとを抽出し、エッジ両側の画素情報(輝度値・色相)をそれぞれ取得し、エピポーラライン上にて同じ画素情報を持つ画素を対応点であるとし三角測量の原理から距離を算出している。   By the way, in the method using such a projection pattern, the coordinates of the stripe boundary are obtained by the principle of triangulation from the positional relationship between the camera and the projector. Specifically, the edge of the recoded image obtained from the first camera and the edge of the measurement image obtained from the second camera are extracted, and pixel information (luminance value / hue) on both sides of the edge is extracted. The distance is calculated from the principle of triangulation by acquiring each pixel and assuming that the pixel having the same pixel information on the epipolar line is a corresponding point.

しかしながら上記のような方式の場合、カメラ画像からエッジ抽出を行っているが、エッジ抽出は、エッジ両側の輝度値・色相差から特定しているため、被写体のテクスチャ情報からエッジ両側の輝度値・色相差が小さくなって観測される画像の場合、エッジ抽出が困難になる。また、カメラは通常、CCDの様な固体撮像素子を一般的に使用している。CCDなどは、ある解像度を持って構成されているために、観測画像は量子化され、画素単位以下での精度のエッジ抽出は困難である。その為、被写体情報や、CCDのサブピクセルノイズにより、第1、第2のカメラ画像の各々のエッジ位置がずれてしまうために、距離算出精度を低下させるという問題がある。   However, in the case of the above method, edge extraction is performed from the camera image, but since edge extraction is specified from the luminance value and hue difference on both sides of the edge, the luminance value on both sides of the edge is determined from the texture information of the subject. In the case of an image observed with a small hue difference, edge extraction becomes difficult. In addition, a camera generally uses a solid-state image sensor such as a CCD. Since a CCD or the like is configured with a certain resolution, an observed image is quantized, and it is difficult to extract an edge with accuracy in units of pixels or less. For this reason, the edge position of each of the first and second camera images is shifted due to subject information and CCD sub-pixel noise, so that there is a problem that the distance calculation accuracy is lowered.

本発明はこのような問題を解消するためになされたものであり、複数レベルの投影パターンを用い、同光軸から再コード化を目的とした第1のカメラを有する3次元形状測定手法において、エッジ抽出ノイズを軽減させ、距離算出精度を向上させることを目的とする。   The present invention has been made to solve such a problem, and in a three-dimensional shape measurement method having a first camera for re-encoding from the same optical axis using a projection pattern of a plurality of levels, An object is to reduce edge extraction noise and improve distance calculation accuracy.

本発明では、上記課題を解決するため、第1のカメラで観測された画像のエッジ抽出精度を向上させ、距離算出精度を向上させる。   In the present invention, in order to solve the above problem, the edge extraction accuracy of the image observed by the first camera is improved, and the distance calculation accuracy is improved.

すなわち、本発明の原理的な構成例によれば、投影装置(投光器、投影器ともいう)により、複数レベルのストライプパターン光を被写体(物体)に投射する。第1のカメラは投影装置の光軸と同じ方向から投影像を撮影する。第2のカメラは投影装置の光軸とずれた方向から投影像を撮影する。第1のカメラは投影装置と同じ光軸方向に(同主点に)配置されているため、第1のカメラで観測される画像のストライプパターン形状は原理的に投光器から投影されるストライプパターン同じであり、輝度・色相値のみが物体表面情報により変化させられる。ストライプパターン形状自体は、投光装置から投影したものと第1のカメラで撮影したものとの間で同一ないし対応するので、第1のカメラの撮影画像を再コード化するのでなく、投光装置のストライプパターンを再コード化すれば、第1のカメラの撮影画像のエッジ抽出エラーの問題がなくなる。すなわち、投影装置から投影するストライプパターンの画像に、そのストライプエッジの位置を保持したままで、第1のカメラで観測された輝度・色相値の変化分を加算して補正する。補正したストライプパターンと、第2のカメラで観測された画像の位置関係から三角測量によって距離を測定する。   That is, according to the principle configuration example of the present invention, a plurality of levels of stripe pattern light are projected onto a subject (object) by a projection device (also referred to as a projector or a projector). The first camera captures a projected image from the same direction as the optical axis of the projector. The second camera captures a projected image from a direction deviating from the optical axis of the projection apparatus. Since the first camera is arranged in the same optical axis direction as the projection device (at the same principal point), the stripe pattern shape of the image observed by the first camera is in principle the same as the stripe pattern projected from the projector. Only the luminance and hue values are changed by the object surface information. The stripe pattern shape itself is the same or corresponds between the image projected from the light projecting device and the image captured by the first camera, so that the light projecting device does not re-code the captured image of the first camera. If the stripe pattern is recoded, the problem of the edge extraction error of the image captured by the first camera is eliminated. In other words, the image of the stripe pattern projected from the projection apparatus is corrected by adding the change in luminance and hue value observed by the first camera while maintaining the position of the stripe edge. The distance is measured by triangulation from the positional relationship between the corrected stripe pattern and the image observed by the second camera.

この構成においては、基準となるストライプパターンとして投影装置から投影されるストライプパターンを用いているのでエッジ位置は予め既知であり、被写体の形状、テクスチャ等に影響を受けないので、第1のカメラの撮影画像のエッジ抽出エラーに起因する問題が解消される。   In this configuration, since the stripe pattern projected from the projection device is used as the reference stripe pattern, the edge position is known in advance and is not affected by the shape, texture, etc. of the subject. Problems caused by edge extraction errors in the captured image are solved.

また、本発明の原理的な他の構成例によれば、投影装置の投影パターンと第1のカメラで観測される画像の間で較正を実施し、第1のカメラで観測される画像のストライプエッジを抽出してテンプレートとして記憶しておく。距離計測時に,被写体情報などにより投影パターンの輝度・色相値は変化して,第1のカメラの観測画像からエッジ抽出を行うエラーが混入するが、較正時に抽出してストライプエッジを用い、輝度・色相変化のみを第1のカメラで実際に観測したものを用い、そのように合成した画像と第2のカメラで観測された画像の位置関係から三角測量によって距離を測定する。   According to another exemplary configuration of the principle of the present invention, calibration is performed between the projection pattern of the projection apparatus and the image observed by the first camera, and the stripe of the image observed by the first camera is obtained. Edges are extracted and stored as templates. During distance measurement, the brightness / hue value of the projection pattern changes depending on the subject information, etc., and an error occurs in edge extraction from the observed image of the first camera. Using only the hue change actually observed by the first camera, the distance is measured by triangulation from the positional relationship between the image synthesized in this way and the image observed by the second camera.

この構成においては、較正時にエッジ抽出エラーを抑制して第1のカメラの撮影画像のエッジを抽出し、このエッジを距離計測時にも用いているので、第1のカメラの撮影画像のエッジ抽出エラーに起因する問題を抑制できる。   In this configuration, the edge extraction error is suppressed during calibration to extract the edge of the photographed image of the first camera, and this edge is also used for distance measurement. Therefore, the edge extraction error of the photographed image of the first camera is used. It is possible to suppress problems caused by the problem.

さらに本発明を説明する。   Further, the present invention will be described.

本発明によれば、所定の輝度範囲で予め設定された複数レベルの輝度でコード化されたストライプパターンを投光器により被写体に投影し、第1のカメラでこの投光器の光軸と同一の方向または同主点から投影像を撮像し、第2のカメラで前記投光器の光軸からずれた方向から前記投影像を撮影し、前記第1のカメラの撮影画像の各領域(ストライプを長さ方向に分割した部分領域。セルともいう)の前記ストライプパターンに対する変化量に基づいて前記第1のカメラの撮影画像を再コード化し、再コード化した前記第1のカメラの撮影画像のコード情報と前記再2のカメラの撮影画像のコード情報とを対応づけて前記第1のカメラの撮影画像の隣接ストライプのエッジ上の点と前記第2のカメラの撮影画像の隣接ストライプのエッジ上の点との間で三角測量を行い前記被写体に対する距離を計算する3次元形状測定装置において、前記第1のカメラの撮影画像の隣接ストライプのエッジの座標の各々を予め定めたものとしている。   According to the present invention, a stripe pattern coded with a plurality of levels of brightness set in advance within a predetermined brightness range is projected onto a subject by a projector, and the same direction as or the same as the optical axis of the projector is projected by a first camera. A projected image is taken from the principal point, the projected image is taken from a direction deviated from the optical axis of the projector by a second camera, and each region (stripe is divided in the length direction) of the taken image of the first camera The recaptured partial area (also referred to as a cell) based on the change amount of the stripe pattern with respect to the stripe pattern. The point information on the edge of the adjacent stripe of the image captured by the first camera and the edge of the adjacent stripe of the image captured by the second camera are associated with the code information of the image captured by the first camera. Triangular in surveying three-dimensional shape measurement device which performs computing the distance to the subject, and it is assumed that predetermined each of said first camera edge coordinates of adjacent stripes of captured images with the.

所定の輝度範囲は例えば全黒から全白の範囲である。前記複数の輝度レベルは前記投影器および前記カメラの階調再現特性を鑑みてレベル設定され、実質的に等間隔に設定されることが好ましい。   The predetermined luminance range is, for example, a range from all black to all white. The plurality of luminance levels are preferably set in consideration of gradation reproduction characteristics of the projector and the camera, and are set at substantially equal intervals.

この構成においては、第1のカメラの撮影画像のエッジ情報を複数レベルのストライプパターン像を撮影して得たものとは別に正確に取得するようにしているので、第1のカメラの撮影画像からのエッジ抽出誤差に起因する距離算出精度の劣化を回避できる。   In this configuration, the edge information of the image captured by the first camera is accurately obtained separately from the image obtained by capturing the stripe pattern image of a plurality of levels. It is possible to avoid the deterioration of the distance calculation accuracy due to the edge extraction error.

この構成において、前記エッジの座標は、例えば、前記第1のカメラの構成要素の物理的な位置に固定的に対応づけられる。例えば、前記第1のカメラのCCD素子のセル間の所定のラインとすることができる。   In this configuration, the coordinates of the edge are fixedly associated with the physical positions of the components of the first camera, for example. For example, it can be a predetermined line between cells of the CCD element of the first camera.

また、前記投光器により較正用のストライプパターンを基準被写体に投影し、前記第2のカメラで投影像を撮像し、撮影画像から隣接ストライプのエッジ座標の各々を検出して距離情報を計算する際の前記第1のカメラの撮影画像の隣接ストライプのエッジ座標としてもよい。   Further, when projecting a stripe pattern for calibration onto a reference subject by the projector, capturing a projected image with the second camera, detecting each edge coordinate of an adjacent stripe from the captured image, and calculating distance information The edge coordinates of the adjacent stripe of the image captured by the first camera may be used.

この場合、好ましくは、前記基準被写体は輝度が同一の平面を有するものとする。
前記較正用のストライプパターンは、測定時のストライプパターンのエッジに対応する位置に線分を背景に描画したものや、測定時のストライプパターンの各ストライプに対応して2つのレベルのストライプを交互に配列したものである。
In this case, it is preferable that the reference subject has a plane having the same luminance.
The calibration stripe pattern includes a line segment drawn at a position corresponding to the edge of the stripe pattern at the time of measurement, and two levels of stripes alternately corresponding to each stripe of the stripe pattern at the time of measurement. It is an arrangement.

なお、この発明は装置またはシステムとして実現できるのみでなく、方法としても実現可能である。また、そのような発明の一部をソフトウェアとして構成することができることはもちろんである。またそのようなソフトウェアをコンピュータに実行させるために用いるソフトウェア製品もこの発明の技術的な範囲に含まれることも当然である。   The present invention can be realized not only as an apparatus or a system but also as a method. Of course, a part of the invention can be configured as software. Of course, software products used for causing a computer to execute such software are also included in the technical scope of the present invention.

この発明の上述の側面および他の側面は特許請求の範囲に記載され以下実施例を用いて詳述される。   These and other aspects of the invention are set forth in the appended claims and will be described in detail below with reference to examples.

この発明によれば、基準となるストライプパターンのエッジ情報を予め既知のもの、あるいは較正時にエラーを抑えて抽出したものとしたので、距離計測時に第1のカメラの撮影画像からエッジを抽出したならば生じるエッジ抽出誤差に起因する距離算出精度の劣化を回避できる。   According to the present invention, the edge information of the stripe pattern used as a reference is known in advance or is extracted while suppressing errors during calibration. Therefore, if the edge is extracted from the captured image of the first camera during distance measurement, Thus, it is possible to avoid deterioration in distance calculation accuracy due to edge extraction errors that occur.

本発明に係る3次元画像測定装置の実施例を説明する。   An embodiment of a three-dimensional image measuring apparatus according to the present invention will be described.

図1は、本発明の実施例の3次元画像測定装置の構成図であり、図1において、3次元画像測定装置は、3次元計測用にパターンを投影するパターン投影装置(たとえば液晶プロジェクタ)10、同光軸でパターンをモニタする撮像装置(たとえばCCDカメラ。第1カメラとも呼ぶ)20、三角測量用撮像装置(たとえばCCDカメラ。第2カメラとも呼ぶ)30、その他図示しない計算処理装置等で構成される。40はハーフミラーであり、50は対象物である。この3次元測定装置の基本的な構成は、特許文献1(特許第3482990号公報)に開示される構成と同様である。パターン投影装置10は、液晶プロジェクタもしくはDLP(商標)プロジェクタ、またはスライドプロジェクタを用いる。パターン投影装置10、たとえば液晶プロジェクタへ入力する投影パターンは、図2に示すような濃淡のあるストライプパターンを用い、例えば、図2の右側に図示されている対象物(物体)にパターン投影する。スライドプロジェクタを用いる場合、投影パターンはスライドフィルム上へ形成するか、ガラスパターンに金属膜などを蒸着し膜厚や網膜点パターンなどによって透過率をコントロールする。   FIG. 1 is a block diagram of a three-dimensional image measuring apparatus according to an embodiment of the present invention. In FIG. 1, the three-dimensional image measuring apparatus projects a pattern for three-dimensional measurement (for example, a liquid crystal projector) 10. An imaging device (for example, a CCD camera, also referred to as a first camera) 20, a triangulation imaging device (for example, a CCD camera, also referred to as a second camera) 30, other calculation processing devices (not shown), etc. Composed. Reference numeral 40 denotes a half mirror, and reference numeral 50 denotes an object. The basic configuration of this three-dimensional measuring apparatus is the same as the configuration disclosed in Patent Document 1 (Japanese Patent No. 3482990). The pattern projection apparatus 10 uses a liquid crystal projector, a DLP (trademark) projector, or a slide projector. The projection pattern input to the pattern projection apparatus 10, for example, a liquid crystal projector, uses a stripe pattern with shading as shown in FIG. 2, and projects the pattern onto an object (object) shown on the right side of FIG. When using a slide projector, the projection pattern is formed on a slide film, or a metal film or the like is vapor-deposited on a glass pattern, and the transmittance is controlled by the film thickness, the retinal point pattern, or the like.

図3に、たとえば液晶プロジェクタへ入力するパターンデータの水平方向の輝度プロファイルを示す。投影パターン(パターンデータ)は256階調を6段階に分けた7種類の輝度ストライプの組み合わせであるが、隣り合うストライプ同士が1段階のレベル差にならないように配置している。これは隣り合うストライプ同士のレベル差に限っては256階調を3段階(0、85、170、255の4レベル)に分けたことと同等である。通常の4レベルのストライプを繰り返して1セットとする場合では、隣り合うストライプの各組み合わせが1セット中に重複して現れないようするには1セットを12ストライプとするのが限界であり、このセットを繰り返して、多数のストライプを含むストライプパターンを構成していくことになる。隣り合うストライプの同じ組み合わせが、近くで重複して存在すると、コード探索のエラーの原因となる。これに対し、本実施例のように、7レベルのストライプを用い、しかも、隣り合うストライプ同士が1段階のレベル差にならないように配置すると、1セット中で、隣り合うストライプの同じ組み合わせが出現しないようにするのに、1セットのストライプ数を28程度にすることができ、少なくとも28ストライプの範囲では同一の隣り合うストライプの組み合わせが重複することはなく、コード探索エラーの確率も減少する。もちろん、コード探索エラーが問題にならない場合には、隣り合うストライプ同士のレベル差を1段階にしてもよい。   FIG. 3 shows a luminance profile in the horizontal direction of pattern data input to a liquid crystal projector, for example. The projection pattern (pattern data) is a combination of seven types of luminance stripes in which 256 gradations are divided into six levels, and the adjacent stripes are arranged so as not to have a one-level level difference. This is equivalent to dividing 256 gradations into three levels (four levels of 0, 85, 170, and 255) as far as the level difference between adjacent stripes is concerned. In the case of repeating a normal four-level stripe into one set, the limit is to set one set to 12 stripes so that each combination of adjacent stripes does not appear in one set. Repeatedly, a stripe pattern including a large number of stripes is formed. If the same combination of adjacent stripes overlaps in the vicinity, it causes a code search error. On the other hand, when 7 levels of stripes are used and the adjacent stripes are arranged so as not to have a one-level level difference as in this embodiment, the same combination of adjacent stripes appears in one set. In order to avoid this, the number of stripes in one set can be about 28. In the range of at least 28 stripes, combinations of the same adjacent stripes do not overlap, and the probability of code search errors also decreases. Of course, when the code search error does not become a problem, the level difference between adjacent stripes may be made one step.

図4にパターン投影の模様を示す。撮像装置(第1カメラ20)と投影装置(パターン投影装置10)をハーフミラー40などで同光軸に配置し、三角計測用に撮像装置を用意し、図2に示すようなストライプパターンを投影する。同光軸の撮像素子(第1カメラ20)で観測された画像(第1カメラ・イメージ)から再コード化を実施し、測定用撮像素子(第2カメラ30)で観測された画像(第2カメラ・イメージ)とで3次元距離画像(距離)を算出する。   FIG. 4 shows a pattern projection pattern. An imaging device (first camera 20) and a projection device (pattern projection device 10) are arranged on the same optical axis by a half mirror 40 or the like, an imaging device is prepared for triangulation measurement, and a stripe pattern as shown in FIG. 2 is projected. To do. Re-encoding is performed from an image (first camera image) observed by the image sensor (first camera 20) of the same optical axis, and an image (second image) observed by the measurement image sensor (second camera 30). A three-dimensional distance image (distance) is calculated using the camera image.

図5は、距離画像を算出する構成例を示しており、この図において、パターン投影装置10がコード化されたパターンを対象物50に投影する。このパターンはフレームメモリ110に記憶される。モニタ用の第1カメラ20および三角測量用の第2カメラ30により、対象物50上の投影パターンを撮像しそれぞれパターン画像メモリ120、150に記憶する。   FIG. 5 shows a configuration example for calculating a distance image. In this figure, the pattern projection apparatus 10 projects a coded pattern onto the object 50. This pattern is stored in the frame memory 110. A projection pattern on the object 50 is imaged by the first camera 20 for monitoring and the second camera 30 for triangulation, and stored in the pattern image memories 120 and 150, respectively.

領域分割部130はパターン画像メモリ120のパターン画像を、パターン投影装置10からの投影パターン(光)が十分に届いている領域(領域2ともいう)と届いていない領域(領域1ともいう)に分割する。たとえば、隣り合うストライプ間の強度差が閾値以下である領域については、投影パターンが十分に届いてないと判別し、ストライプ間の強度差が閾値以上である領域を投影パターンが十分に届いている領域と判別する。投影パターンが十分に届いている領域に関し、以下に述べるように、境界線となるエッジ画素算出を行い、距離計算を行う。投影パターンが十分に届いてない領域については、別途、視差に基づく距離計算を行う。ここではとくに説明しないが、詳細は特許文献1を参照されたい。   The area dividing unit 130 divides the pattern image stored in the pattern image memory 120 into an area where the projection pattern (light) from the pattern projection apparatus 10 has sufficiently arrived (also referred to as area 2) and an area where it has not reached (also referred to as area 1). To divide. For example, for an area where the intensity difference between adjacent stripes is less than or equal to the threshold, it is determined that the projection pattern has not reached sufficiently, and the projection pattern has sufficiently reached an area where the intensity difference between stripes is greater than or equal to the threshold. Determined as an area. As described below, an edge pixel serving as a boundary line is calculated and a distance calculation is performed on an area where the projection pattern has sufficiently reached. For areas where the projection pattern does not reach sufficiently, distance calculation based on parallax is performed separately. Although not specifically described here, refer to Patent Document 1 for details.

再コード化部160は、抽出された領域2についてストライプを抽出し、各ストライプをストライプ幅毎に縦方向に分割し、正方形のセルを生成し、セルの再コード化を行う。これについては後に詳述する。   The recoding unit 160 extracts stripes for the extracted region 2, divides each stripe in the vertical direction for each stripe width, generates a square cell, and recodes the cell. This will be described in detail later.

コード復号部170は、パターン画像メモリ150に記憶されている、三角測量用の第2カメラ30からのパターン画像の各セル(エッジ)のコードを再コード化部160からのコードを用いて判別する。これにより、パターン画像メモリ150のパターン画像における測定点p(エッジ)の画素のx座標および光源からの照射方向(スリット角)θが決定され、後述する式(1)により距離Zが測定される(図14参照)。3次元画像メモリ180は、この距離と、第1カメラ20から取得した対象物の輝度値(輝度値メモリ140に記憶される)とを三次元画像データとして記憶する。   The code decoding unit 170 determines the code of each cell (edge) of the pattern image from the second camera 30 for triangulation stored in the pattern image memory 150 using the code from the recoding unit 160. . Thereby, the x coordinate of the pixel at the measurement point p (edge) in the pattern image of the pattern image memory 150 and the irradiation direction (slit angle) θ from the light source are determined, and the distance Z is measured by the equation (1) described later. (See FIG. 14). The three-dimensional image memory 180 stores the distance and the luminance value of the object acquired from the first camera 20 (stored in the luminance value memory 140) as three-dimensional image data.

この構成例における3次元形状の算出の詳細についてさらに説明する。   Details of the calculation of the three-dimensional shape in this configuration example will be further described.

まず、基準となるストライプパターン(第2カメラ30の撮影画像と対応づけて三角測量を行なうストライプパターン)に対して再コード化を行なう。この構成例では、基準となるストライプパターンはフレームメモリ110に記憶されているストライプパターンであり、再コード化は、フレームメモリ110に記憶されたストライプパターンに対して行なわれる。例えばフレームメモリ110に記憶されたストライプパターンを基準ストライプパターンメモリ111に書き込み、書き込んだストライプパターンを再コード化により補正する。ストライプパターンには固有のエッジが設定されており、対象物の表面形状やテクスチャによって変化することがないので、正確なエッジ座標を取得でき、エッジ検出誤差の問題がない。ストライプパターンを基準ストライプパターンメモリ111に記憶する代わりにそのエッジ情報を記憶するようにしても良い。   First, re-encoding is performed on a reference stripe pattern (a stripe pattern in which triangulation is performed in association with an image captured by the second camera 30). In this configuration example, the reference stripe pattern is a stripe pattern stored in the frame memory 110, and recoding is performed on the stripe pattern stored in the frame memory 110. For example, a stripe pattern stored in the frame memory 110 is written into the reference stripe pattern memory 111, and the written stripe pattern is corrected by recoding. A unique edge is set in the stripe pattern, and it does not change depending on the surface shape or texture of the object, so that accurate edge coordinates can be obtained and there is no problem of edge detection error. Instead of storing the stripe pattern in the reference stripe pattern memory 111, the edge information may be stored.

再コード化は、同光軸のモニタ用の第1カメラ20によって撮影されたパターン画像と投光に用いられたパターン画像を用いて図7に示すフローチャートに従って行なわれる。最初に第1カメラ20で撮影されたパターン画像の領域分割を行う。隣り合うストライプ間の強度差が閾値以下である領域については、パターン投影装置10からの投影パターンが届いてない領域1として抽出し、ストライプ間の強度差が閾値以上である領域を領域2として抽出し(S10)、領域2について境界線となるエッジ画素算出を行う。   The recoding is performed according to the flowchart shown in FIG. 7 using the pattern image photographed by the first camera 20 for monitoring on the same optical axis and the pattern image used for light projection. First, the region of the pattern image photographed by the first camera 20 is divided. A region where the intensity difference between adjacent stripes is less than or equal to the threshold is extracted as region 1 where the projection pattern from the pattern projection apparatus 10 has not reached, and a region where the intensity difference between stripes is greater than or equal to the threshold is extracted as region 2. (S10), the edge pixel that becomes the boundary line for the region 2 is calculated.

抽出された領域2についてストライプを抽出し、各ストライプをストライプ幅毎に縦方向に分割し、正方形のセルを生成する。生成された各セルについて強度の平均値をとり、平均値を各セルの強度とする(S11)。画像の中心から順に対応する各セル間の強度を比較し、対象物の反射率、対象物までの距離などの要因によってパターンが変化したためにセル間の強度が閾値以上異なった場合には新たなコードの生成、割り付けを行う(S12〜S16)。   Stripes are extracted from the extracted region 2, and each stripe is divided in the vertical direction for each stripe width to generate a square cell. The average value of the intensity is taken for each generated cell, and the average value is set as the intensity of each cell (S11). Compare the intensities between the corresponding cells in order from the center of the image, and if the inter-cell intensity differs by more than a threshold because the pattern has changed due to factors such as the reflectance of the object, the distance to the object, etc. Code generation and allocation are performed (S12 to S16).

図8は簡単のため単純化した例であるが、図8の左側のストライプ列がストライプの並びによってコード化された投光パターンであり、それぞれの強度に3(強)、2(中)、1(弱)が割り当てられている。図8の右側がそれぞれ同軸上の第1カメラ20で撮影されたストライプをセルの幅でストライプと垂直方向に抽出したものである。図8の右上の例では、左から3つめのセルで強度が変化して新たなコードが出現したので、新たに0というコードを割り当てる。図8の右下の例では、左から3つめ上から2つめのセルで、既存のコードが出現しているので、セルの並びから新たなコードとして(232、131)という具合に(縦の並び、横の並び)によってコードを表現する。この再コード化は、対象の形状が変化に富む部位には2次元パターンなどの複雑なパターンを投光し、変化の少ない部位には簡単なパターンを投光しているのに等しい。この過程を繰り返し、全てのセルに対して一意なコードを割り付けることで再コード化を行う。   FIG. 8 is a simplified example for simplicity, but the left side of FIG. 8 is a light projection pattern coded by the arrangement of stripes. The intensity is 3 (strong), 2 (medium), 1 (weak) is assigned. The right side of FIG. 8 is obtained by extracting the stripes photographed by the first coaxial camera 20 in the direction perpendicular to the stripes by the cell width. In the example on the upper right in FIG. 8, since the strength changes in the third cell from the left and a new code appears, a new code of 0 is assigned. In the lower right example of FIG. 8, since the existing code appears in the third cell from the left and the second cell from the top, as a new code (232, 131) from the cell sequence (vertical) The code is expressed by (line, horizontal line). This re-encoding is equivalent to projecting a complex pattern such as a two-dimensional pattern at a site where the shape of the object is rich in change, and projecting a simple pattern at a site where there is little change. This process is repeated and recoding is performed by assigning unique codes to all cells.

例として、図9の対象物に、図10のパターンを投光した場合に第1カメラ20、第2カメラ30で得られる画像を簡単化したものをそれぞれ図11、図12に示す。この例では、板の表面には新たなコード化されたパターンとして図13が得られる。   As an example, FIGS. 11 and 12 show simplified images obtained by the first camera 20 and the second camera 30 when the pattern of FIG. 10 is projected onto the object of FIG. In this example, FIG. 13 is obtained as a new coded pattern on the surface of the plate.

次に第2カメラ30で得られたストライプ画像からストライプを抽出し、先ほどと同じようにセルに分割する。各セルについて、再コード化されたコードを用いて各セルのコードを検出し、検出されたコードに基づいて光源からの照射方向θを算出する。各画素の属するセルのθとカメラ2で撮影された画像上のx座標とカメラパラメータである焦点距離Fと基線長Lを用いて式(1)によって距離Zを算出する。なお、測定点pと、光源からの照射方向θと、第2カメラ30で撮影された画像上のx座標と、カメラパラメータである焦点距離Fと、基線長Lとの関係を図14に示す。   Next, stripes are extracted from the stripe image obtained by the second camera 30 and divided into cells as before. For each cell, the code of each cell is detected using the recoded code, and the irradiation direction θ from the light source is calculated based on the detected code. The distance Z is calculated by Equation (1) using θ of the cell to which each pixel belongs, the x coordinate on the image taken by the camera 2, the focal length F and the base line length L which are camera parameters. FIG. 14 shows the relationship among the measurement point p, the irradiation direction θ from the light source, the x coordinate on the image captured by the second camera 30, the focal length F that is a camera parameter, and the baseline length L. .

Z=FL/(x+Ftanθ) −−−式(1)   Z = FL / (x + Ftanθ) ---- Equation (1)

この計算は実際にはセルの境界のx座標を利用して行うが、このときのx座標はカメラの画素解像度よりも細かい単位で計算することで計測精度を向上させている。x座標値は、先に算出したエッジ画素の両側のセルの適当な数画素の輝度平均値d1、d2とエッジ画素の輝度deから求める。エッジ画素の両隣の画素位置p1とp2と輝度平均値d1とd2から一次補間した直線から輝度deに相当する画素位置de’(図では便宜上xで示す)が求められ、これがx座標値となる。(図15参照)   This calculation is actually performed using the x-coordinate of the cell boundary. At this time, the x-coordinate is calculated in a unit smaller than the pixel resolution of the camera, thereby improving the measurement accuracy. The x-coordinate value is obtained from the brightness average values d1 and d2 of appropriate pixels of the cells on both sides of the edge pixel calculated in advance and the brightness de of the edge pixel. A pixel position de ′ (indicated by x in the drawing for convenience) corresponding to the luminance de is obtained from a straight line obtained by linear interpolation from the pixel positions p1 and p2 adjacent to the edge pixel and the luminance average values d1 and d2, and this is the x coordinate value. . (See Figure 15)

ここで投影パターンは256階調を6段階に分けた各42階調または43階調ごとの輝度ストライプの組み合わせであるが、隣り合うストライプ同士が1段階のレベル差にならないように配置しているので、単純に6段階に分けた輝度ストライプを組み合わせたパターンに比べストライプ間の強度差が大きくx座標値の算出が行いやすくなっている。ストライプ間の強度差が大きい場合と小さい場合のカメラの画素単位の輝度分布を図16に示す。エッジ画素の両側の数画素の輝度平均値は各画素のノイズの影響により、グレーの横線の太さで示したような範囲を取りうる。図16の左に示すように、強度差が大きい場合は、図15の計算方法を適用するとエッジ画素の両側の数画素の輝度平均値のノイズの影響はグレーの各線の太さで表され、結果としてx座標値がaの範囲に決められる。しかし強度差が小さい場合はエッジ画素の両側の数画素の輝度平均値のノイズ成分の割合が強度差に対して相対的に大きくなり、x座標値の算出に曖昧さが発生する、すなわち取りうる範囲がbの範囲となって、結果として計測の精度を落とすことになる。このためストライプ間の強度差は大きいほうが望ましい。   Here, the projection pattern is a combination of luminance stripes for each of 42 gradations or 43 gradations obtained by dividing 256 gradations into 6 stages, but the adjacent stripes are arranged so as not to have a level difference of 1 stage. Therefore, the intensity difference between stripes is large compared to a pattern in which luminance stripes simply divided into six levels are combined, and it is easy to calculate the x coordinate value. FIG. 16 shows the luminance distribution of the pixel unit of the camera when the intensity difference between stripes is large and small. The average luminance value of several pixels on both sides of the edge pixel can take a range indicated by the thickness of the gray horizontal line due to the influence of noise of each pixel. As shown on the left in FIG. 16, when the intensity difference is large, the influence of noise on the luminance average value of several pixels on both sides of the edge pixel is expressed by the thickness of each gray line when the calculation method of FIG. 15 is applied. As a result, the x coordinate value is determined within the range of a. However, when the intensity difference is small, the ratio of the noise component of the luminance average value of several pixels on both sides of the edge pixel becomes relatively large with respect to the intensity difference, which causes ambiguity in the calculation of the x coordinate value. The range becomes the range of b, and as a result, the measurement accuracy is lowered. For this reason, it is desirable that the difference in intensity between stripes is large.

図6はx座標を求める構成例を示している。図6においては、エッジ右近傍画素位置入力部210、エッジ右セル輝度平均値入力部220、エッジ左近傍画素位置入力部230、エッジ左セル輝度平均値入力部240、エッジ輝度入力部250からそれぞれd1、p1、d2、p2、deを補間計算部200に供給して上述のとおりx座標を計算する。   FIG. 6 shows a configuration example for obtaining the x coordinate. In FIG. 6, the edge right neighboring pixel position input unit 210, the edge right cell luminance average value input unit 220, the edge left neighboring pixel position input unit 230, the edge left cell luminance average value input unit 240, and the edge luminance input unit 250 respectively. d1, p1, d2, p2, and de are supplied to the interpolation calculation unit 200 to calculate the x coordinate as described above.

この実施例では、ストライプ間の強度差が2レベル以上になるようにパターンを制約しているので、x座標値を高精度に計測できる。   In this embodiment, since the pattern is constrained so that the intensity difference between stripes is 2 levels or more, the x-coordinate value can be measured with high accuracy.

つぎに投光器やカメラのガンマ特性の補正について説明する。   Next, correction of gamma characteristics of the projector and camera will be described.

液晶プロジェクタをパターン投影装置(投光器)10として用いると、液晶プロジェクタの入力画像に対して投影される出力画像はガンマ特性を有することが一般的である。そのため入力画像で256階調を6等分割しても、投影されたパターンの輝度は均等に7レベルとはなっていない。従って入力画像を作成する際にガンマ特性を考慮しなければならない。図17のような横軸の入力レベルに対する縦軸の出力レベルというガンマ特性をもったプロジェクタでは、グラフから入力画像は0、148、185、203、222、237、255という各輝度階調値を有するストライプパターンとすることが望ましい。パターン投影装置(投光器)10がDLPプロジェクタの場合も同様であり、パターン投影装置(投光器)10がスライドプロジェクタの場合は、スライドフィルムのガンマ特性を考慮したデータをフィルム作成時に用意する必要がある。   When a liquid crystal projector is used as the pattern projection device (projector) 10, an output image projected on an input image of the liquid crystal projector generally has a gamma characteristic. Therefore, even if 256 gradations are divided into six equal parts in the input image, the brightness of the projected pattern is not equal to seven levels. Therefore, the gamma characteristic must be taken into account when creating the input image. In the projector having the gamma characteristic of the output level on the vertical axis with respect to the input level on the horizontal axis as shown in FIG. 17, the input image shows each luminance gradation value of 0, 148, 185, 203, 222, 237, and 255 from the graph. It is desirable to have a stripe pattern. The same applies to the case where the pattern projector (projector) 10 is a DLP projector. When the pattern projector (projector) 10 is a slide projector, it is necessary to prepare data in consideration of the gamma characteristics of the slide film at the time of film creation.

またCCDカメラにも同様にガンマ特性が存在するので、カメラ画像上で均等な輝度間隔のストライプパターンを得たい場合には、さらにCCDカメラのガンマ特性をも考慮した入力画像が必要となる。   Similarly, a gamma characteristic also exists in a CCD camera. Therefore, when it is desired to obtain a stripe pattern having a uniform luminance interval on a camera image, an input image that further considers the gamma characteristic of the CCD camera is required.

この実施例においては三角測量法による距離計算の基準となるストライプパターンをパターン投影装置10が投影するストライプパターンとし、この基準となるストライプパターンに対して第1カメラ20の撮影画像を用いて再コード化して補正を行なっているので、そのエッジは元々の定められた既知のものであり、被写体の形状やテクスチャにより変動することがないので、エッジ検出エラーの問題がない。   In this embodiment, a stripe pattern which is a reference for distance calculation by the triangulation method is used as a stripe pattern projected by the pattern projection apparatus 10, and recoding is performed on the reference stripe pattern using an image captured by the first camera 20. Since the correction is performed and the edges are originally determined and known and do not vary depending on the shape and texture of the subject, there is no problem of edge detection errors.

この点についてさらに説明する。   This point will be further described.

特許文献1(特許第3482990号公報)において、パターン投影装置10と同光軸に配置された第1カメラ20の撮影画像を再コード化して、再コード化した第1カメラの撮影画像と第2カメラ30の撮影画像を対応づけして距離計算を行なう構成を採用した場合には、第1カメラ10の撮影画像および第2カメラ30の撮影画像の双方でエッジの抽出エラーが生じて距離計測精度が劣化するおそれがある。   In Patent Document 1 (Japanese Patent No. 3482990), the captured image of the first camera 20 arranged on the same optical axis as the pattern projection apparatus 10 is re-encoded, and the re-encoded captured image of the first camera and the second In the case where the distance calculation is performed by associating the captured images of the camera 30 with each other, an edge extraction error occurs in both the captured image of the first camera 10 and the captured image of the second camera 30, and the distance measurement accuracy is increased. May deteriorate.

すなわち、先に説明したように、第1カメラ20の撮影画像のエッジ座標も図14に示すようにサブピクセルレベルで補間計算するので、エッジ画素の両側の数がその輝度平均値のバラツキにより図16に示すような範囲で誤差が生じる。とくに、隣接ストライプの輝度差が小さい場合には誤差が大きくなる。   That is, as described above, since the edge coordinates of the captured image of the first camera 20 are also interpolated at the sub-pixel level as shown in FIG. 14, the number of both sides of the edge pixel is represented by the variation in the average luminance value. An error occurs in the range shown in FIG. In particular, the error increases when the luminance difference between adjacent stripes is small.

現実に、強度差(輝度差)のあるパターンを投影する場合には、強度差が大きいものと小さいものは存在してしまう。ストライプパターンを作成する場合に、隣り合うストライプのレベル差を2以上にするなどの工夫も考えられるが、それでも、強度差の大小は存在してしまう。   In reality, when a pattern having an intensity difference (luminance difference) is projected, there are a pattern having a large intensity difference and a pattern having a small intensity difference. When creating a stripe pattern, it is conceivable to make the level difference between adjacent stripes 2 or more, but there is still a magnitude difference in intensity.

たとえば、図18の様な複数レベルで構成されるストライプパターンを投影する場合を考える。光軸を同じくした第1カメラ20により図8に示すような再コード化の処理を行うが、被写体の情報や、ストライプパターンの隣接強度の大小によって、エッジ位置のずれを生じてしまう。図18(b)の様に、本来のエッジ位置(点線部)とは異なる位置にエッジ抽出が行われてしまい精度低下を発生させる。   For example, consider a case where a stripe pattern composed of a plurality of levels as shown in FIG. 18 is projected. Although the re-encoding process as shown in FIG. 8 is performed by the first camera 20 having the same optical axis, the edge position shifts depending on the subject information and the adjacent intensity of the stripe pattern. As shown in FIG. 18B, edge extraction is performed at a position different from the original edge position (dotted line portion), resulting in a decrease in accuracy.

この実施例では、このような問題を解消するために、三角測量において基準となるストライプパターンを投影装置10から投影するストライプパターンとする。   In this embodiment, in order to solve such a problem, a stripe pattern that is a reference in triangulation is a stripe pattern projected from the projection device 10.

すなわち、投影装置10とその投影装置10と同じ光軸方向に配置している第1カメラ20のカメラ画像は、図11に示すように、ストライプパターンのストライプ形状が変化せずに、被写体の情報により輝度・色相値が変化するだけであるため、ストライプのエッジ位置を規定する事が可能である。そこで、図18(a)の画像をテンプレートとし、カメラで観測された図18(b)の画像の輝度・色相変化分を検出し、図18(a)のエッジ位置はそのまま保持し、図18(b)の輝度・色相変化分のみを図18(a)の画像に重畳し、図18(c)の画像を得る。この方法により、投影したストライプパターンが、被写体の情報によって、各々のストライプのレベルが変化しても、光軸を異にする第2カメラ30で観測される画像との対応が可能になる。かつ、投影側のエッジ位置は、被写体情報やカメラ画像の影響でずれる事もなくなる。   That is, as shown in FIG. 11, the camera image of the projection device 10 and the first camera 20 arranged in the same optical axis direction as the projection device 10 shows subject information without changing the stripe shape of the stripe pattern. Since the luminance and hue values only change due to the above, it is possible to define the edge position of the stripe. Therefore, using the image of FIG. 18 (a) as a template, the brightness / hue change of the image of FIG. 18 (b) observed by the camera is detected, and the edge position of FIG. 18 (a) is held as it is. Only the luminance / hue change of (b) is superimposed on the image of FIG. 18 (a) to obtain the image of FIG. 18 (c). With this method, the projected stripe pattern can correspond to an image observed by the second camera 30 having a different optical axis even if the level of each stripe changes depending on the subject information. In addition, the edge position on the projection side does not shift due to the influence of subject information and camera images.

なお、この発明は上述の実施例に限定されるものではなくその趣旨を逸脱しない範囲で種々変更が可能である。例えば、本発明は、可視領域波長のほか、近赤外などの不可視波長の投射光に関しても有効であることはいうまでもない。   The present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the invention. For example, it goes without saying that the present invention is effective for projection light having an invisible wavelength such as near infrared in addition to the visible region wavelength.

また、三角測量法による距離算出の基準のストライプパターンを上述のように投影装置から投影されるストライプパターンとするのでなく、第1カメラで撮影した撮影画像とすることもできる。この第1カメラの撮影画像は図8に示すように再コード化により補正される。第1カメラの撮影画像は、投影装置のストライプパターンと同じ光軸方向に配置されているために、ストライプのエッジ位置は一意的に決めることが出来る。図19に示すような配置で、事前にリファレンスボード51を配置し、ストライプパターンを投影し観測される位置からストライプエッジ位置を特定する事によって、実際の被写体測定の際に、強度差の大小や、被写体情報によって輝度・色相値が変化する事によるエッジ抽出ずれは発生しない。また、図20の下段にあるようなエッジ位置のみを特定するパターンを事前に投影し、エッジのみを抽出する事も可能である。この場合は、強度差の大小にかかわらず、白黒の画像で抽出する事が可能であるため、エッジ抽出精度が高くなる。また白と黒の2種類のストライプを交互に配置したストライプパターンを用いても良い。   In addition, the reference stripe pattern for distance calculation by the triangulation method may be a captured image captured by the first camera, instead of the stripe pattern projected from the projection apparatus as described above. The captured image of the first camera is corrected by recoding as shown in FIG. Since the captured image of the first camera is arranged in the same optical axis direction as the stripe pattern of the projector, the edge position of the stripe can be uniquely determined. In the arrangement as shown in FIG. 19, the reference board 51 is arranged in advance, the stripe pattern is projected and the stripe edge position is specified from the observed position. The edge extraction deviation due to the change in luminance and hue value depending on the subject information does not occur. It is also possible to project only a pattern that specifies only the edge position as shown in the lower part of FIG. 20 and extract only the edge. In this case, since it is possible to extract a black and white image regardless of the magnitude difference, the edge extraction accuracy is increased. A stripe pattern in which two types of stripes of white and black are alternately arranged may be used.

このように較正用のストライプパターンを用いることにより検出したエッジ位置およびエッジの両側のストライプのコードは種々の態様で記憶管理できる。例えば図21に示すようにエッジ抽出部112で抽出したエッジ位置の情報を抽出エッジメモリ113に記憶し、この抽出エッジメモリ112のエッジ位置の情報から第1カメラ20の撮影画像の各ストライプ像を抽出して第2カメラ30の撮影画像の各ストライプと対応づけ、距離計算を行なっても良いし、計測時の第1カメラ20の撮影画像のストライプと第2カメラ30の撮影画像のストライプとを対応づけ、その後、第1カメラ20の撮影画像のストライプのエッジとして抽出エッジ記憶部113からエッジ位置の情報を取り出し距離計算を行なっても良い。   As described above, the edge position detected by using the calibration stripe pattern and the stripe code on both sides of the edge can be stored and managed in various modes. For example, as shown in FIG. 21, the edge position information extracted by the edge extraction unit 112 is stored in the extraction edge memory 113, and each stripe image of the photographed image of the first camera 20 is obtained from the edge position information of the extraction edge memory 112. The distance may be calculated by extracting and associating with each stripe of the photographed image of the second camera 30, or the stripe of the photographed image of the first camera 20 and the stripe of the photographed image of the second camera 30 at the time of measurement may be used. After that, the edge position information may be extracted from the extracted edge storage unit 113 as the stripe edge of the captured image of the first camera 20 and the distance may be calculated.

また、上述実施例では、ハーフミラー20を用いて投影装置10とモニタ用の撮像装置20とを同一の光軸(同主点)に配置したが、図22に示すように、投影装置10および撮像装置20を、パターンのストライプ(エッジ)の方向に無視できる程度に離間して配置し,実質的に同一の光軸上(同主点)に配置しても良い。この場合ハーフミラーによるパターン光のロスや配分に伴うパワーの低下やバラツキを回避できる。   In the above-described embodiment, the projection device 10 and the monitor imaging device 20 are arranged on the same optical axis (same principal point) using the half mirror 20, but as shown in FIG. The imaging devices 20 may be arranged so as to be negligible in the direction of the stripe (edge) of the pattern, and may be arranged on substantially the same optical axis (same principal point). In this case, it is possible to avoid power reduction and variation due to pattern light loss and distribution by the half mirror.

本発明の実施例の装置構成を示す図である。It is a figure which shows the apparatus structure of the Example of this invention. 上述実施例を説明するためのパターンと被写体の一例を示す図である。It is a figure which shows an example of the pattern and subject for demonstrating the said Example. 上述実施例のストライプパターン例を示す図である。It is a figure which shows the example of a stripe pattern of the above-mentioned Example. 上述実施例の動作を説明する概要図である。It is a schematic diagram explaining operation | movement of the said Example. 上述実施例の構成例を説明するブロック図である。It is a block diagram explaining the structural example of the said Example. 上述構成例の測定点の第2カメラの画像上の座標xの補間計算を行う回路構成例を説明する図である。It is a figure explaining the circuit structural example which performs the interpolation calculation of the coordinate x on the image of the 2nd camera of the measurement point of the said structural example. 上述実施例の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the said Example. 上述実施例のコード化を説明する図である。It is a figure explaining coding of the above-mentioned example. 上述実施例のコード化を説明するためのカメラと被写体の配置図である。It is an arrangement diagram of a camera and a subject for explaining the coding of the embodiment. 上述実施例のコード化を説明するためのパターン図である。It is a pattern diagram for demonstrating the encoding of the said Example. 上述実施例の第1カメラのモニタ画像の例を示す図である。It is a figure which shows the example of the monitor image of the 1st camera of the above-mentioned Example. 上述実施例の第2カメラ2のモニタ画像の例を示す図である。It is a figure which shows the example of the monitor image of the 2nd camera 2 of the above-mentioned Example. 上述実施例において被写体にあたって輝度が変化した部分を説明する図である。It is a figure explaining the part to which the brightness | luminance changed in the to-be-photographed object in the above-mentioned Example. 上述実施例における距離計算を説明する図である。It is a figure explaining distance calculation in the above-mentioned example. 上述実施例のエッジ座標の算出説明図である。It is calculation explanatory drawing of the edge coordinate of the above-mentioned Example. 上述実施例における階調差によるエッジ座標算出の差を説明する図である。It is a figure explaining the difference of the edge coordinate calculation by the gradation difference in the said Example. 上述実施例の投光器(プロジェクタ)のガンマ特性とパターンの入力値算出説明図である。It is a gamma characteristic and pattern input value calculation explanatory drawing of the light projector (projector) of the said Example. 上述実施例のスリットパターンをエッジ情報を保持したまま再コード化する例を説明する図である。It is a figure explaining the example which recodes the slit pattern of the said Example, hold | maintaining edge information. 上述実施例の変形例で用いるリファレンスボードによるエッジ抽出を説明する図である。It is a figure explaining the edge extraction by the reference board used in the modification of the above-mentioned Example. 図19のエッジ抽出で用いる他の投影パターンを説明する図である。It is a figure explaining the other projection pattern used by the edge extraction of FIG. 上述実施例の変形例で用いる抽出エッジ記憶部を説明する図である。It is a figure explaining the extraction edge memory | storage part used by the modification of the above-mentioned Example. 上述実施例の他の変形例を説明する図である。It is a figure explaining the other modification of the above-mentioned Example.

符号の説明Explanation of symbols

10 パターン投影装置
20 モニタ用の第1カメラ
30 三角測量用の第2カメラ
40 ハーフミラー
50 対象物
110 フレームメモリ
111 基準ストライプパターン記憶部
112 エッジ抽出部
113 抽出エッジ記憶部
120 パターン画像メモリ
130 領域分割部
140 輝度値メモリ
150 パターン画像メモリ
160 再コード化部
170 コード復号部
180 3次元画像メモリ
200 補間計算部
210 エッジ右近傍画素位置入力部
220 エッジ右セル輝度平均値入力部
230 エッジ左近傍画素位置入力部
240 エッジ左セル輝度平均値入力部
250 エッジ輝度入力部
DESCRIPTION OF SYMBOLS 10 Pattern projection apparatus 20 1st camera 30 for a monitor 2nd camera 40 for a triangulation 50 Half mirror 50 Object 110 Frame memory 111 Reference stripe pattern storage part 112 Edge extraction part 113 Extraction edge storage part 120 Pattern image memory 130 Area division Unit 140 luminance value memory 150 pattern image memory 160 recoding unit 170 code decoding unit 180 three-dimensional image memory 200 interpolation calculation unit 210 edge right neighboring pixel position input unit 220 edge right cell luminance average value input unit 230 edge left neighboring pixel position Input unit 240 Edge left cell luminance average value input unit 250 Edge luminance input unit

Claims (8)

所定の輝度範囲で予め設定された複数レベルの輝度でコード化されたストライプパターンを被写体に投影する投光器と、
前記投光器の光軸と同一の方向から投影像を撮像する第1のカメラと、
前記投光器の光軸からずれた方向から前記投影像を撮影する第2のカメラと、
前記第1のカメラの撮影画像の各領域の前記ストライプパターンに対する変化量に基づいて基準のストライプパターンを再コード化し、再コード化した前記基準のストライプパターンと前記第2のカメラの撮影画像とを対応づけて前記基準のストライプパターンの隣接ストライプのエッジ上の点と前記第2のカメラの撮影画像の隣接ストライプのエッジ上の点との間で三角測量を行い前記被写体に対する距離を計算する距離計算手段とを有し、
前記基準のストライプパターンの隣接ストライプのエッジの座標の各々を予め定めたものとしたことを特徴とする3次元形状測定装置。
A projector that projects a stripe pattern encoded with a plurality of levels of brightness set in advance in a predetermined brightness range onto a subject;
A first camera that captures a projected image from the same direction as the optical axis of the projector;
A second camera that captures the projected image from a direction deviated from the optical axis of the projector;
The reference stripe pattern is re-encoded based on the amount of change in each region of the image captured by the first camera with respect to the stripe pattern, and the re-encoded reference stripe pattern and the image captured by the second camera are obtained. A distance calculation for calculating a distance to the subject by performing triangulation between a point on the edge of the adjacent stripe of the reference stripe pattern and a point on the edge of the adjacent stripe of the image taken by the second camera in association with each other. Means,
3. A three-dimensional shape measuring apparatus according to claim 1, wherein each of the coordinates of edges of adjacent stripes of the reference stripe pattern is predetermined.
前記基準のストライプパターンは前記投光器から投影されるストライプパターンであり、前記投光器から投影されるストライプパターンを前記第1のカメラの撮影画像の各領域の前記ストライプパターンに対する変化量に基づいて再コード化し、再コード化した前記投光器から投影されるストライプパターンと前記第2のカメラの撮影画像とを対応づけて前記投光器から投影されるストライプパターンの隣接ストライプのエッジ上の点と前記第2のカメラの撮影画像の隣接ストライプのエッジ上の点との間で三角測量を行い前記被写体の距離情報を計算する請求項1記載の3次元形状測定装置。   The reference stripe pattern is a stripe pattern projected from the projector, and the stripe pattern projected from the projector is re-encoded based on a change amount of each region of the image captured by the first camera with respect to the stripe pattern. A point on the edge of an adjacent stripe of the stripe pattern projected from the projector by associating the re-coded stripe pattern projected from the projector and the captured image of the second camera, and the second camera The three-dimensional shape measuring apparatus according to claim 1, wherein the distance information of the subject is calculated by performing a triangulation with a point on an edge of an adjacent stripe of a photographed image. 前記投光器から投影されるストライプパターンの各領域が前記第1のカメラの撮影画像の各領域と固定的に対応づけられる請求項2記載の3次元形状測定装置。   The three-dimensional shape measuring apparatus according to claim 2, wherein each region of the stripe pattern projected from the projector is fixedly associated with each region of a captured image of the first camera. 前記基準のストライプパターンは前記第1のカメラの撮影画像であり、前記第1のカメラの撮影画像の各領域の前記ストライプパターンに対する変化量に基づいて前記第1のカメラの撮影画像を再コード化するとともに、予め前記投光器により較正用のストライプパターンを基準被写体に投影し、前記第2のカメラで投影像を撮像し、撮影画像から隣接ストライプのエッジを抽出し、このエッジを、再コード化した前記第1のカメラの撮影画像の隣接ストライプの基準エッジとし、再コード化した前記第1のカメラの撮影画像と前記第2のカメラの撮影画像とを対応づけて前記第1のカメラの撮影画像の隣接ストライプの基準エッジ上の点と前記第2のカメラの撮影画像の隣接ストライプのエッジ上の点との間で三角測量を行い前記被写体までの距離を計算する請求項1記載の3次元形状測定装置。   The reference stripe pattern is a photographed image of the first camera, and the photographed image of the first camera is re-encoded based on the amount of change with respect to the stripe pattern in each region of the photographed image of the first camera. At the same time, a stripe pattern for calibration is projected on the reference subject in advance by the projector, the projected image is captured by the second camera, the edge of the adjacent stripe is extracted from the captured image, and the edge is recoded. The reference image of the adjacent stripe of the image captured by the first camera is used as a reference edge, and the re-encoded image captured by the first camera and the image captured by the second camera are associated with each other. Triangulation is performed between a point on the reference edge of the adjacent stripe and a point on the edge of the adjacent stripe of the image taken by the second camera. 3-dimensional shape measuring apparatus according to claim 1, wherein calculating the distance. 前記基準被写体は輝度が同一の平面を有する請求項4記載の3次元形状測定装置。   The three-dimensional shape measuring apparatus according to claim 4, wherein the reference subject has a plane having the same luminance. 前記較正用のストライプパターンは、測定時のストライプパターンのエッジに対応する位置に線分を背景に描画したものである請求項4または5記載の3次元形状測定装置。   6. The three-dimensional shape measuring apparatus according to claim 4, wherein the calibration stripe pattern is drawn with a line segment in the background at a position corresponding to an edge of the stripe pattern at the time of measurement. 前記較正用のストライプパターンは、測定時のストライプパターンの各ストライプに対応して2つのレベルのストライプを交互に配列したものである請求項4または5記載の3次元形状測定装置。   6. The three-dimensional shape measuring apparatus according to claim 4, wherein the calibration stripe pattern is obtained by alternately arranging two levels of stripes corresponding to each stripe of the stripe pattern at the time of measurement. 所定の輝度範囲で予め設定された複数レベルの輝度でコード化されたストライプパターンを投光器により被写体に投影し、第1のカメラでこの投光器の光軸と同一の方向から投影像を撮像し、第2のカメラで前記投光器の光軸からずれた方向から前記投影像を撮影し、前記第1のカメラの撮影画像の各領域の前記ストライプパターンに対する変化量に基づいて基準のストライプパターンを再コード化し、再コード化した前記基準のストライプパターンと前記第2のカメラの撮影画像とを対応づけて前記基準のストライプパターンの隣接ストライプのエッジ上の点と前記第2のカメラの撮影画像の隣接ストライプのエッジ上の点との間で三角測量を行い前記被写体に対する距離を計算する3次元形状測定方法において、前記基準のストライプパターンの隣接ストライプのエッジの座標の各々を予め定めたものとしたことを特徴とする3次元形状測定方法。   A stripe pattern encoded with a plurality of levels of brightness set in advance within a predetermined brightness range is projected onto a subject by a projector, and a projected image is captured from the same direction as the optical axis of the projector by a first camera, The projected image is captured from a direction deviated from the optical axis of the projector with the two cameras, and a reference stripe pattern is re-encoded based on the amount of change with respect to the stripe pattern in each region of the captured image of the first camera. The re-encoded reference stripe pattern and the captured image of the second camera are associated with each other, the point on the edge of the adjacent stripe of the reference stripe pattern and the adjacent stripe of the captured image of the second camera. In the three-dimensional shape measuring method for calculating the distance to the subject by performing triangulation with a point on the edge, the reference stripe pattern 3-dimensional shape measuring method characterized in that it is assumed that predetermined each coordinates of the edges of adjacent stripes over emissions.
JP2004199816A 2004-07-06 2004-07-06 Instrument and method for measuring three-dimensional shape Pending JP2006023133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004199816A JP2006023133A (en) 2004-07-06 2004-07-06 Instrument and method for measuring three-dimensional shape

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004199816A JP2006023133A (en) 2004-07-06 2004-07-06 Instrument and method for measuring three-dimensional shape

Publications (1)

Publication Number Publication Date
JP2006023133A true JP2006023133A (en) 2006-01-26

Family

ID=35796510

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004199816A Pending JP2006023133A (en) 2004-07-06 2004-07-06 Instrument and method for measuring three-dimensional shape

Country Status (1)

Country Link
JP (1) JP2006023133A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007198988A (en) * 2006-01-30 2007-08-09 National Institute Of Advanced Industrial & Technology Measuring method and device of surface shape error
CN103913130A (en) * 2014-04-14 2014-07-09 哈尔滨理工大学 Fault-tolerance method for combined encoding and decoding of three-dimensional visual measurement
CN104897085A (en) * 2015-06-16 2015-09-09 哈尔滨理工大学 N-frequency encoded structured light decoding fast algorithm based on exact division judgment
CN104897081A (en) * 2015-06-16 2015-09-09 哈尔滨理工大学 N-frequency encoded structured light decoding fast algorithm
CN103679688B (en) * 2012-09-18 2016-11-09 浙江大华技术股份有限公司 A kind of method and device extracting target image
US9781397B2 (en) 2015-10-05 2017-10-03 Panasonic Intellectual Property Management Co., Ltd. Projector and projector system
US11272147B2 (en) 2017-03-17 2022-03-08 Panasonic Intellectual Property Management Co., Ltd. Projector and projector system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007198988A (en) * 2006-01-30 2007-08-09 National Institute Of Advanced Industrial & Technology Measuring method and device of surface shape error
CN103679688B (en) * 2012-09-18 2016-11-09 浙江大华技术股份有限公司 A kind of method and device extracting target image
CN103913130A (en) * 2014-04-14 2014-07-09 哈尔滨理工大学 Fault-tolerance method for combined encoding and decoding of three-dimensional visual measurement
CN104897085A (en) * 2015-06-16 2015-09-09 哈尔滨理工大学 N-frequency encoded structured light decoding fast algorithm based on exact division judgment
CN104897081A (en) * 2015-06-16 2015-09-09 哈尔滨理工大学 N-frequency encoded structured light decoding fast algorithm
US9781397B2 (en) 2015-10-05 2017-10-03 Panasonic Intellectual Property Management Co., Ltd. Projector and projector system
US11272147B2 (en) 2017-03-17 2022-03-08 Panasonic Intellectual Property Management Co., Ltd. Projector and projector system

Similar Documents

Publication Publication Date Title
US10681318B2 (en) Camera-assisted arbitrary surface characterization and slope-based correction
US11592732B2 (en) Camera-assisted arbitrary surface characterization and correction
CN112106105B (en) Method and system for generating three-dimensional image of object
JP6102088B2 (en) Image projection device, image processing device, image projection method, program for image projection method, and recording medium recording the program
KR101626072B1 (en) Method and Apparatus for Compensating Image
US9007602B2 (en) Three-dimensional measurement apparatus, three-dimensional measurement method, and computer-readable medium storing control program
JP5633058B1 (en) 3D measuring apparatus and 3D measuring method
CN110689581A (en) Structured light module calibration method, electronic device and computer readable storage medium
CN107808398B (en) Camera parameter calculation device, calculation method, program, and recording medium
JP4501587B2 (en) Three-dimensional image measuring apparatus and method
CN104111038A (en) Method for using phase fusion algorithm to repair phase error caused by saturation
JP2013174547A (en) Stereo three-dimensional measuring instrument
US8970674B2 (en) Three-dimensional measurement apparatus, three-dimensional measurement method and storage medium
KR102160340B1 (en) Method and apparatus for generating 3-dimensional data of moving object
US20190108617A1 (en) Image processing apparatus, system, image processing method, calibration method, and computer-readable recording medium
JP2006023133A (en) Instrument and method for measuring three-dimensional shape
CN116608794B (en) Anti-texture 3D structured light imaging method, system, device and storage medium
JP4433907B2 (en) Three-dimensional shape measuring apparatus and method
JP4501551B2 (en) Three-dimensional shape measuring apparatus and method
JP2007122328A (en) Distortion aberration correction device and distortion aberration correction method
JP4525240B2 (en) Three-dimensional image input apparatus and method
JP2005003631A (en) Apparatus and method for measuring three-dimensional shape
JP4241250B2 (en) Three-dimensional shape measuring apparatus and method
JP5743433B2 (en) 3D shape measuring device
JP2009216650A (en) Three-dimensional shape measuring device