JP5587756B2 - Optical distance measuring device, distance measuring method of optical distance measuring device, and distance measuring program - Google Patents

Optical distance measuring device, distance measuring method of optical distance measuring device, and distance measuring program Download PDF

Info

Publication number
JP5587756B2
JP5587756B2 JP2010276301A JP2010276301A JP5587756B2 JP 5587756 B2 JP5587756 B2 JP 5587756B2 JP 2010276301 A JP2010276301 A JP 2010276301A JP 2010276301 A JP2010276301 A JP 2010276301A JP 5587756 B2 JP5587756 B2 JP 5587756B2
Authority
JP
Japan
Prior art keywords
image data
subject
distance
pattern
optical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010276301A
Other languages
Japanese (ja)
Other versions
JP2012122975A (en
Inventor
章人 酒本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Maxell Energy Ltd
Original Assignee
Hitachi Maxell Energy 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 Hitachi Maxell Energy Ltd filed Critical Hitachi Maxell Energy Ltd
Priority to JP2010276301A priority Critical patent/JP5587756B2/en
Publication of JP2012122975A publication Critical patent/JP2012122975A/en
Application granted granted Critical
Publication of JP5587756B2 publication Critical patent/JP5587756B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、イメージセンサによって被写体を撮像して得た画像データに基づいて、被写体までの距離を計測する光学式距離計測装置に関する。   The present invention relates to an optical distance measuring device that measures the distance to a subject based on image data obtained by imaging the subject with an image sensor.

このような光学式距離計測装置の距離計測方法としては、特許文献1に記載のステレオ画像法、特許文献2に記載の空間コード化法、特許文献3に記載の光伝播時間計測法などが知られている。ステレオ画像法は、所定間隔で配置された2台以上の撮像装置で被写体を撮像して得た複数の画像データから三角測量の原理で被写体までの距離を計測する。空間コード法は、白黒の投射パターンを、パターンを変化させながら被写体に複数回投射して、被写体上に点滅で形成されるコードに基づいて被写体までの距離を計測する。光伝播時間計測法は、パルス状の光を照射し、この照射光が物体で反射してイメージセンサで受光するまでの時間に基づいて被写体までの距離を計測する。   As a distance measuring method of such an optical distance measuring device, a stereo image method described in Patent Document 1, a spatial encoding method described in Patent Document 2, a light propagation time measuring method described in Patent Document 3, and the like are known. It has been. In the stereo image method, a distance to a subject is measured based on the principle of triangulation from a plurality of image data obtained by imaging the subject with two or more imaging devices arranged at predetermined intervals. In the spatial code method, a monochrome projection pattern is projected onto a subject a plurality of times while changing the pattern, and the distance to the subject is measured based on a code formed by blinking on the subject. In the light propagation time measurement method, pulsed light is irradiated, and the distance to the subject is measured based on the time until the irradiated light is reflected by the object and received by the image sensor.

特開2007−114168号公報JP 2007-114168 A 特開2007−315864号公報JP 2007-315864 A 特開2002−22425号公報Japanese Patent Laid-Open No. 2002-22425

ここで、ステレオ画像法を用いて被写体までの距離を計測する場合には、複数台の撮像装置を搭載する必要がある。空間コード化法を用いて被写体までの距離を計測する場合には、投射パターンを変化させながら投射するパターン投射装置を搭載する必要がある。光伝播時間計測法を用いて被写体までの距離を計測する場合には、被写体との距離が近いときに極めて短い時間を計測する必要があるので、例えば、1画素に2個の光電変換素子を備えており、これらの光電変換素子から時間差で検出される光量の差分に基づいて時間を計測可能な特殊なイメージセンサを搭載する必要がある。従って、これらの各方法を用いて被写体までの距離を計測する場合には、光学式距離計測装置の製造コストを抑制することが難しいという問題がある。   Here, when measuring the distance to the subject using the stereo image method, it is necessary to mount a plurality of imaging devices. When measuring the distance to the subject using the spatial coding method, it is necessary to mount a pattern projection device that projects while changing the projection pattern. When measuring the distance to the subject using the light propagation time measurement method, it is necessary to measure an extremely short time when the distance to the subject is short. For example, two photoelectric conversion elements are provided for one pixel. It is necessary to mount a special image sensor that can measure the time based on the difference in the amount of light detected from these photoelectric conversion elements. Therefore, when measuring the distance to the subject using each of these methods, there is a problem that it is difficult to reduce the manufacturing cost of the optical distance measuring device.

本発明の課題は、この点に鑑みて、低コストで製造することが可能な光学式距離計測装置を提供することにある。また、このような光学式距離計測装置に用いられる距離計測方法および距離計測用プログラムを提案することにある。   In view of this point, an object of the present invention is to provide an optical distance measuring device that can be manufactured at low cost. Another object of the present invention is to propose a distance measuring method and a distance measuring program used in such an optical distance measuring device.

上記の課題を解決するために、本発明の光学式距離計測装置は、
光源、および、所定の投射パターンを被写体に投射するために前記光源からの光線の一部分を透過あるいは反射する素子を備え、前記投射パターンを前記被写体に断続的に投射するパターン投射装置と、
イメージセンサを備え、前記所定の投射パターンが投射されたときに前記被写体を撮像して第1画像データを取得するとともに、前記所定の投射パターンが投射されていないときに前記被写体を撮像して第2画像データを取得する撮像装置と、
前記第1画像データと前記第2画像データとの差分から前記所定の投射パターンの反射光のみを含む第3画像データを取得する差分画像データ抽出部と、
前記第3画像データの画素間の自己相関係数を予め定めた所定の画素について算出する自己相関係数取得部と、
前記所定の画素の自己相関係数に基づいて、前記被写体までの距離を取得する距離取得部とを有することを特徴とする。
In order to solve the above problems, the optical distance measuring device of the present invention is
A light source, and a pattern projection device that includes an element that transmits or reflects a part of the light beam from the light source to project a predetermined projection pattern onto the subject, and projects the projection pattern intermittently onto the subject;
An image sensor that captures the subject when the predetermined projection pattern is projected to acquire first image data, and captures the subject when the predetermined projection pattern is not projected; An imaging device for acquiring two image data;
A difference image data extraction unit that acquires third image data including only reflected light of the predetermined projection pattern from a difference between the first image data and the second image data;
An autocorrelation coefficient acquisition unit that calculates an autocorrelation coefficient between pixels of the third image data for a predetermined pixel;
And a distance acquisition unit that acquires a distance to the subject based on an autocorrelation coefficient of the predetermined pixel.

本発明の発明者らは、被写体に投射した所定の投射パターンの反射光を撮影した第3画像データの各画素について求めた画素間の自己相関係数と、各画素に対応する被写体までの距離との間に相関関係があり、画素の自己相関係数に基づいて被写体までの距離を取得できることを見出した。本発明によれば、一つの視点から被写体を撮像して得られる第1画像データおよび第2画像データに基づいて距離を計測できるので、撮像装置が1台で済む。また、第1画像データおよび第2画像データを取得するために、被写体に投射パターンを投射した状態と、被写体にパターンを投射しない状態とを形成すればよく、基本的には投射パターン自体を変化させる必要がない。よって、パターン投射装置を簡易な構成とすることができる。さらに、撮像に際して特殊なイメージセンサを用いる必要がなく、汎用のイメージセンサを用いることができる。従って、光学式距離計測装置の製造コストを抑えることができる。なお、所定の投射パターンを被写体に投射するために前記光源からの光線の一部分を透過あるいは反射する素子としては、フォトマスク、透過型の液晶パネル、反射型の液晶パネル、デジタル・マイクロミラー・デバイスなどの空間変調素子がある。また、パターン投射装置は、これらの素子によって固定された投射パターンを投射するだけではなく、必要に応じて投射パターンを変化させても構わない。さらに、所定の画素としてすべての画素に関して自己相関係数を算出してもよいが、被測定物の大きさによっては代表点のみの距離を算出してもよく、その場合は離散的な画素について自己相関係数を演算してもよい。   The inventors of the present invention provide an autocorrelation coefficient between pixels obtained for each pixel of the third image data obtained by photographing reflected light of a predetermined projection pattern projected on the subject, and a distance to the subject corresponding to each pixel. And the distance to the subject can be acquired based on the autocorrelation coefficient of the pixels. According to the present invention, since the distance can be measured based on the first image data and the second image data obtained by imaging the subject from one viewpoint, only one imaging device is required. In addition, in order to acquire the first image data and the second image data, it is only necessary to form a state in which the projection pattern is projected onto the subject and a state in which the pattern is not projected onto the subject. Basically, the projection pattern itself is changed. There is no need to let them. Therefore, the pattern projection apparatus can be simplified. Furthermore, it is not necessary to use a special image sensor for imaging, and a general-purpose image sensor can be used. Therefore, the manufacturing cost of the optical distance measuring device can be suppressed. The elements that transmit or reflect a part of the light from the light source in order to project a predetermined projection pattern onto the subject include a photomask, a transmissive liquid crystal panel, a reflective liquid crystal panel, and a digital micromirror device. There is a spatial modulation element. Moreover, the pattern projection apparatus may not only project the projection pattern fixed by these elements, but may change the projection pattern as necessary. Further, although the autocorrelation coefficient may be calculated for all pixels as the predetermined pixel, the distance of only the representative point may be calculated depending on the size of the object to be measured. An autocorrelation coefficient may be calculated.

本発明において、画素の自己相関係数に基づいて、前記被写体までの距離を取得するためには、前記第3画像データの画素の自己相関係数と被写体までの距離とを対応付けた形態で記憶保持しているテーブルを有し、前記距離取得部は、前記画素の自己相関係数に基づいて前記テーブルを参照して、前記被写体までの距離を取得することが望ましい。   In the present invention, in order to obtain the distance to the subject based on the autocorrelation coefficient of the pixel, the autocorrelation coefficient of the pixel of the third image data is associated with the distance to the subject. It is preferable that the distance acquisition unit has a table stored and held, and acquires the distance to the subject by referring to the table based on the autocorrelation coefficient of the pixel.

本発明において、前記光源からの投射光を前記被写体に導くとともに、前記被写体からの反射光を前記イメージセンサに導く光学素子を有し、前記光学素子から前記被写体に至る前記投射光の光路と前記被写体から前記光学素子に至る前記反射光の光路とは共通であり、前記パターン投射装置による投射照明画角と前記撮像装置による撮像画角とは、同一であることが望ましい。このようにすれば、パターン投射装置から被写体に至る投射光の光路の一部と、被写体から撮像装置に至る反射光の光路の一部とが共通の光路となっているので、装置を小型化することが容易となる。また、投射照明画角と撮像画角とが同一なので第1画像データを取得する際に被写体に影が発生することを抑制できる。従って、所定の投射パターンの反射光のみを含む第3画像データを精度よく抽出することができる。   In the present invention, there is provided an optical element that guides the projection light from the light source to the subject and guides the reflected light from the subject to the image sensor, and the optical path of the projection light from the optical element to the subject The optical path of the reflected light from the subject to the optical element is common, and it is desirable that the projection illumination field angle by the pattern projection device and the imaging field angle by the imaging device are the same. In this way, a part of the optical path of the projection light from the pattern projection device to the subject and a part of the optical path of the reflected light from the subject to the imaging device are a common optical path, so the device is downsized. Easy to do. In addition, since the projection illumination angle of view and the imaging angle of view are the same, it is possible to suppress the occurrence of a shadow on the subject when the first image data is acquired. Therefore, it is possible to accurately extract the third image data including only the reflected light of the predetermined projection pattern.

本発明において、前記イメージセンサは、インターレース走査方式であり、前記パターン投射装置は、前記所定の投射パターンを前記イメージセンサの奇数フィールドおよび前記偶数フィールドのいずれか一方に同期させて投射し、前記撮像装置は、前記奇数フィールドおよび偶数フィールドのうちのいずれか一方で前記第1画像データを取得し、いずれか他方で前記第2画像データを取得することが望ましい。このようにすれば、CCDイメージセンサなどを用いて、第1画像データおよび第2画像データをほぼリアルタイムに取得することが可能となる。   In the present invention, the image sensor is an interlace scanning method, and the pattern projection device projects the predetermined projection pattern in synchronization with either the odd field or the even field of the image sensor, and the imaging It is preferable that the apparatus acquires the first image data in one of the odd field and the even field and acquires the second image data in either one. In this way, it is possible to obtain the first image data and the second image data almost in real time using a CCD image sensor or the like.

本発明において、前記イメージセンサは、2次元イメージセンサを前提としているが、被測定物の形状や移動がある特定された方向に限定されているのであれば1次元イメージセンサであってもよい。1次元イメージセンサを用いれば、装置の製造コストをより抑制することができ、高速走査も可能となる。   In the present invention, the image sensor is assumed to be a two-dimensional image sensor, but may be a one-dimensional image sensor as long as the shape and movement of the object to be measured are limited to a specified direction. If a one-dimensional image sensor is used, the manufacturing cost of the apparatus can be further suppressed, and high-speed scanning is also possible.

本発明において、前記光源は、近赤外線を放射することが望ましい。すなわち、パターン投射装置が波長0.7μm〜1.1μmの範囲の赤外域の光線を用いて所定の投射パターンを被写体に投射すれば、被写体となっている人間、あるいは、被写体の近傍に位置する人間に投射パターンの投射を意識させることなく被写体までの距離を計測することができる。   In the present invention, the light source preferably emits near infrared rays. That is, if the pattern projection device projects a predetermined projection pattern onto the subject using infrared rays in the wavelength range of 0.7 μm to 1.1 μm, the pattern projection device is located in the vicinity of the subject who is the subject or the subject. The distance to the subject can be measured without making humans aware of the projection pattern.

本発明において、前記パターン投射装置は、光軸方向に前記素子を移動させるフォトマスク移動機構を備えていることが望ましい。このようにすれば、光源からの光量を2次元的に変化させる素子を移動させて投射パターンの結像点の位置を変化させることができるので、第1画像データの取得時における距離に対する感度を調整することができる。   In the present invention, the pattern projection apparatus preferably includes a photomask moving mechanism that moves the element in the optical axis direction. In this way, since the position of the image formation point of the projection pattern can be changed by moving the element that changes the light amount from the light source two-dimensionally, the sensitivity to the distance at the time of acquiring the first image data is improved. Can be adjusted.

次に、本発明は、光学式距離計測装置の距離計測方法であって、
被写体に対して所定の投射パターンを投射した状態でイメージセンサにより撮像を行って第1画像データを取得するとともに、前記被写体に対して前記所定の投射パターンを投射していない状態で前記イメージセンサによる撮像を行なって第2画像データを取得する画像取得工程と、
前記第1画像データと前記第2画像データの差分から、前記所定の投射パターンの反射光のみを含む第3画像データを抽出する差分画像抽出工程と、
前記第3画像データの画素間の自己相関係数を予め定めた所定の画素について算出する自己相関係数算出工程と、
前記画素の自己相関係数に基づいて、前記被写体までの距離を取得する距離取得工程とを含むことが望ましい。
Next, the present invention is a distance measuring method of an optical distance measuring device,
The image sensor captures the first image data in a state where a predetermined projection pattern is projected onto the subject, and the image sensor does not project the predetermined projection pattern onto the subject. An image acquisition step of performing imaging to acquire second image data;
A difference image extraction step of extracting third image data including only reflected light of the predetermined projection pattern from the difference between the first image data and the second image data;
An autocorrelation coefficient calculating step for calculating an autocorrelation coefficient between pixels of the third image data for a predetermined pixel;
It is desirable to include a distance acquisition step of acquiring a distance to the subject based on the autocorrelation coefficient of the pixel.

本発明によれば、一つの視点から被写体を撮像して得られる第1画像データおよび第2画像データに基づいて距離を計測できるので、撮像装置が1台で済む。また、第1画像データおよび第2画像データを取得するために、被写体に投射パターンを投射した状態と、被写体にパターンを投射しない状態とを形成すればよく、基本的に投射パターン自体を変化させる必要がない。よって、パターン投射装置を簡易な構成とすることができる。さらに、撮像に際して特殊なイメージセンサを用いる必要がなく、汎用のイメージセンサを用いることができる。従って、光学式距離計測装置の製造コストを抑えることができる。   According to the present invention, since the distance can be measured based on the first image data and the second image data obtained by imaging the subject from one viewpoint, only one imaging device is required. Further, in order to acquire the first image data and the second image data, a state in which a projection pattern is projected onto the subject and a state in which no pattern is projected onto the subject may be formed, and basically the projection pattern itself is changed. There is no need. Therefore, the pattern projection apparatus can be simplified. Furthermore, it is not necessary to use a special image sensor for imaging, and a general-purpose image sensor can be used. Therefore, the manufacturing cost of the optical distance measuring device can be suppressed.

次に、本発明は、上記の距離計測方法によって被写体までの距離を計測する光学式距離計測装置において、
光源、および、所定の投射パターンを被写体に投射するために前記光源からの光線の一部分を透過あるいは反射する素子を備え、前記投射パターンを前記被写体に断続的に投射するパターン投射装置と、
イメージセンサを備え、前記所定の投射パターンが投射されたときに前記被写体を撮像して第1画像データを取得するとともに、前記所定の投射パターンが投射されていないときに前記被写体を撮像して第2画像データを取得する撮像装置と、
前記撮像装置に接続されており、前記撮像装置で取得された前記第1画像データおよび前記第2画像データを記憶保持するための画像メモリを備えるコンピュータと、
前記コンピュータに、前記差分画像抽出工程、前記自己相関係数算出工程、および前記距離取得工程を行わせる距離計測用プログラムとを有することを特徴とする。
Next, the present invention provides an optical distance measuring device for measuring a distance to a subject by the distance measuring method described above.
A light source, and a pattern projection device that includes an element that transmits or reflects a part of the light beam from the light source to project a predetermined projection pattern onto the subject, and projects the projection pattern intermittently onto the subject;
An image sensor that captures the subject when the predetermined projection pattern is projected to acquire first image data, and captures the subject when the predetermined projection pattern is not projected; An imaging device for acquiring two image data;
A computer that is connected to the imaging device and includes an image memory for storing and holding the first image data and the second image data acquired by the imaging device;
And a distance measurement program that causes the computer to perform the difference image extraction step, the autocorrelation coefficient calculation step, and the distance acquisition step.

本発明によれば、撮像装置により取得された第1画像データおよび第2画像データをコンピュータによって画像処理して、被写体までの距離を取得する。画像処理および距離の取得に専用の制御装置を用いる必要がないので、装置の製造コストを更に抑えることができる。   According to the present invention, the first image data and the second image data acquired by the imaging device are subjected to image processing by the computer, and the distance to the subject is acquired. Since it is not necessary to use a dedicated control device for image processing and distance acquisition, the manufacturing cost of the device can be further reduced.

次に、本発明は、上記の光学式距離計測装置の距離計測用のプログラムとすることができる。   Next, the present invention can be a distance measurement program for the optical distance measuring device.

本発明によれば、1台の撮像装置によって取得した画像データに基づいて被写体までの距離を計測できる。また所定のパターンを被写体に投射するパターン投射装置を簡易な構成とすることができる。さらに、画像データの取得に汎用のイメージセンサを用いることができる。従って、装置の製造コストを抑えることができる。   According to the present invention, it is possible to measure the distance to the subject based on the image data acquired by one imaging device. In addition, a pattern projection apparatus that projects a predetermined pattern onto a subject can be configured simply. Furthermore, a general-purpose image sensor can be used for acquiring image data. Therefore, the manufacturing cost of the apparatus can be suppressed.

本発明を適用した光学式距離計測装置の概略構成図である。It is a schematic block diagram of the optical distance measuring device to which this invention is applied. フォトマスクによって投射されるパターンの例である。It is an example of the pattern projected with a photomask. 撮像装置のCCDイメージセンサの垂直同期信号とパターン投射装置の光源を点滅させるための制御信号とを示すタイミングチャートである。It is a timing chart which shows the vertical synchronizing signal of the CCD image sensor of an imaging device, and the control signal for blinking the light source of a pattern projector. 自己相関係数の算出方法を説明するための第3画像データの模式図である。It is a schematic diagram of the 3rd image data for demonstrating the calculation method of an autocorrelation coefficient. 画素の自己相関係数と被写体までの距離との関係を示すグラフである。It is a graph which shows the relationship between the autocorrelation coefficient of a pixel, and the distance to a to-be-photographed object. 光学式距離計測装置の距離計測方法を示す概略フローチャートである。It is a schematic flowchart which shows the distance measuring method of an optical distance measuring device. 第1画像データ、第2画像データ、第3画像データ、および、距離画像データの説明図である。It is explanatory drawing of 1st image data, 2nd image data, 3rd image data, and distance image data.

以下に、図面を参照して、本発明を適用した光学式距離計測装置の実施の形態を説明する。   Embodiments of an optical distance measuring device to which the present invention is applied will be described below with reference to the drawings.

(全体構成)
図1は本発明を適用した光学式距離計測装置の概略構成図である。光学式距離計測装置1は、被写体100に対して所定の投射パターンを断続的に投射するパターン投射装置2と、撮像装置3と、パターン投射装置2および撮像装置3を駆動制御するとともに、撮像装置3が取得した画像データを演算処理して被写体100までの距離Dを算出する制御装置4を備えている。なお、本例の被写体は円柱100aと壁100bである。
(overall structure)
FIG. 1 is a schematic configuration diagram of an optical distance measuring device to which the present invention is applied. The optical distance measuring device 1 drives and controls the pattern projection device 2 that intermittently projects a predetermined projection pattern onto the subject 100, the imaging device 3, the pattern projection device 2, and the imaging device 3, and the imaging device. 3 includes a control device 4 that calculates the distance D to the subject 100 by calculating the image data acquired by the computer 3. The subject in this example is a column 100a and a wall 100b.

パターン投射装置2は、光源5として波長0.85μmの近赤外線を射出する発光素子(LED)を備えている。また、光源5から被写体100に向かう投射光の光路上に、所定の投射パターンを投射するためのフォトマスク(光源からの光線の一部分を透過する素子)6、プリズム(光学素子)7、および、対物レンズ8を備えている。   The pattern projection apparatus 2 includes a light emitting element (LED) that emits near infrared rays having a wavelength of 0.85 μm as the light source 5. In addition, a photomask (element that transmits a part of the light beam from the light source) 6, a prism (optical element) 7, and the like for projecting a predetermined projection pattern on the optical path of the projection light from the light source 5 toward the subject 100, An objective lens 8 is provided.

図2は、フォトマスク6によって投射されるパターンの一例である。図2に示すように、フォトマスク6は光源5から放出される投射光を部分的に通過させるランダムなパターンを備えている。フォトマスク6はピエゾ素子を備えるフォトマスク移動機構9によって光軸方向に移動可能とされている。   FIG. 2 is an example of a pattern projected by the photomask 6. As shown in FIG. 2, the photomask 6 has a random pattern that partially passes the projection light emitted from the light source 5. The photomask 6 can be moved in the optical axis direction by a photomask moving mechanism 9 including a piezo element.

撮像装置3は、撮像素子として、インターレース走査方式のCCDイメージセンサ10を搭載している。また、CCDイメージセンサ10と被写体100との間の光路上に、プリズム7と対物レンズ8を備えている。撮像装置3は、パターン投射装置2との間でプリズム7および対物レンズ8を共有している。   The imaging device 3 includes an interlace scanning CCD image sensor 10 as an imaging device. Further, a prism 7 and an objective lens 8 are provided on the optical path between the CCD image sensor 10 and the subject 100. The imaging device 3 shares the prism 7 and the objective lens 8 with the pattern projection device 2.

プリズム7は2個の三角プリズム7a、7bを張り合わせて形成されており、張り合わせ面7cには、パターン投射装置2の光源5からの投射光を透過して被写体100に導くとともに、被写体100からの反射光を投射光の光路とは異なる方向に反射してCCDイメージセンサ10に導く光学特性を備える薄膜が形成されている。これにより、プリズム7から対物レンズ8を介して被写体100に至る投射光の光路と被写体100から対物レンズ8を介してプリズム7に至る反射光の光路が共通となっている。なお、パターン投射装置2による投射照明画角と撮像装置3による撮像画角とは、同一であり、重なっている。   The prism 7 is formed by bonding two triangular prisms 7 a and 7 b, and the projection light from the light source 5 of the pattern projection device 2 is transmitted to the bonding surface 7 c and guided to the subject 100, and from the subject 100. A thin film having optical characteristics for reflecting the reflected light in a direction different from the optical path of the projection light and guiding it to the CCD image sensor 10 is formed. Thereby, the optical path of the projection light from the prism 7 via the objective lens 8 to the subject 100 and the optical path of the reflected light from the subject 100 to the prism 7 via the objective lens 8 are common. Note that the projection illumination angle of view by the pattern projection device 2 and the imaging angle of view by the imaging device 3 are the same and overlap.

制御装置4は、ドライバ11を介してパターン投射装置2の光源5を駆動制御すると共に、撮像装置3のCCDイメージセンサ10を駆動制御する駆動制御部12を備えている。また、制御装置4は、被写体100の撮像によりCCDイメージセンサ10が取得した画像データを一時的に記憶保持する画像メモリ13を備えている。さらに、制御装置4は、差分画像データ抽出部14、自己相関係数取得部15、距離取得部16およびテーブル記憶部17を有している。   The control device 4 includes a drive control unit 12 that drives and controls the light source 5 of the pattern projection device 2 via the driver 11 and drives and controls the CCD image sensor 10 of the imaging device 3. Further, the control device 4 includes an image memory 13 that temporarily stores and holds image data acquired by the CCD image sensor 10 by imaging the subject 100. Furthermore, the control device 4 includes a difference image data extraction unit 14, an autocorrelation coefficient acquisition unit 15, a distance acquisition unit 16, and a table storage unit 17.

図3は、撮像装置3のCCDイメージセンサ10の垂直同期信号と、パターン投射装置2の光源5を点滅させるための制御信号とを示すタイミングチャートである。図3に示すように、駆動制御部12は、光源5を駆動制御して、所定の投射パターンをCCDイメージセンサ10の奇数フィールドに同期させて投射する。また、駆動制御部12は、CCDイメージセンサ10を駆動制御して、投射パターンが投射された状態で被写体100を撮像して得られる第1画像データを奇数フィールドに取得するとともに、所定の投射パターンが投射されていない状態で被写体100を撮像して得られる第2画像データを偶数フィールドに取得する。さらに、駆動制御部12は撮像装置3を駆動制御して、第1画像データおよび第2画像データを撮像装置3から制御装置4に転送させる。   FIG. 3 is a timing chart showing a vertical synchronization signal of the CCD image sensor 10 of the imaging device 3 and a control signal for causing the light source 5 of the pattern projection device 2 to blink. As shown in FIG. 3, the drive control unit 12 drives and controls the light source 5 to project a predetermined projection pattern in synchronization with the odd field of the CCD image sensor 10. Further, the drive control unit 12 drives and controls the CCD image sensor 10 to acquire first image data obtained by imaging the subject 100 in a state where the projection pattern is projected in an odd field, and a predetermined projection pattern. The second image data obtained by imaging the subject 100 in a state where no is projected is acquired in the even field. Further, the drive control unit 12 drives and controls the imaging device 3 to transfer the first image data and the second image data from the imaging device 3 to the control device 4.

画像メモリ13は、第1画像データを2次元展開した状態で記憶保持する第1画像メモリ13aと、第2画像データを2次元展開した状態で記憶保持する第2画像メモリ13bを備えている。第1画像メモリ13aに展開される第1画像データ、および、第2画像メモリ13bに展開される第2画像データは、CCDイメージセンサ10による撮像に伴って逐次に更新される。なお、第2メモリに展開された第2画像データは、光学式距離計測装置1に接続されているモニタ18に逐次に出力される。   The image memory 13 includes a first image memory 13a that stores and holds the first image data in a two-dimensionally developed state, and a second image memory 13b that stores and holds the second image data in a two-dimensionally developed state. The first image data developed in the first image memory 13a and the second image data developed in the second image memory 13b are sequentially updated as the CCD image sensor 10 captures images. The second image data developed in the second memory is sequentially output to the monitor 18 connected to the optical distance measuring device 1.

差分画像データ抽出部14は、第1画像メモリ13aに2次元展開されている第1画像データと第2画像メモリ13bに2次元展開されている第2画像データの差分を、所定の投射パターンの反射光のみを含む第3画像データとして抽出する。本例では、第1画像データおよび第2画像データを各画素の輝度に基づいてモノクロ化した後に、第1画像データから第2画像データを差し引き、第3画像データを抽出している。   The difference image data extraction unit 14 uses the difference between the first image data two-dimensionally developed in the first image memory 13a and the second image data two-dimensionally developed in the second image memory 13b as a predetermined projection pattern. Extracted as third image data including only reflected light. In this example, the first image data and the second image data are converted into monochrome based on the luminance of each pixel, and then the second image data is subtracted from the first image data to extract the third image data.

自己相関係数取得部15は、第3画像データの画素間の自己相関係数を各画素Pについて算出する。図4は自己相関係数の算出方法を説明するための第3画像データの模式図である。自己相関係数R(x,y)は、第3画像データの座標(x,y)における画素P(x,y)を含むN×N画素を1ブロックQとして次式で定義する。
R(x,y):座標(x,y)における自己相関係数
I(x,y) :輝度
N:ブロックサイズ
<I>:ブロック内の平均輝度
The autocorrelation coefficient acquisition unit 15 calculates an autocorrelation coefficient between pixels of the third image data for each pixel P. FIG. 4 is a schematic diagram of third image data for explaining a method of calculating an autocorrelation coefficient. The autocorrelation coefficient R (x, y) is defined by the following equation with N × N pixels including the pixel P (x, y) at the coordinates (x, y) of the third image data as one block Q.
R (x, y): autocorrelation coefficient I (x, y) at coordinates (x, y): luminance N: block size <I>: average luminance in the block

なお、Nは8画素程度が好ましく、1画素毎にこのブロックQをスライドさせてR(x,y)を求める。演算時間の制限がある場合、または距離画像として精細度が低くても良い場合には、複数の画素について自己相関係数R(x,y)を算出する毎にこのブロックQをスライドさせてもよい。なお、上式において<I>は被測定物体の反射率などによる光量を補正するための規格化因子として用いている。 N is preferably about 8 pixels, and R (x, y) is obtained by sliding the block Q for each pixel. When the calculation time is limited, or when the definition of the distance image may be low, the block Q may be slid each time the autocorrelation coefficient R (x, y) is calculated for a plurality of pixels. Good. In the above equation, <I> 2 is used as a normalization factor for correcting the light quantity due to the reflectance of the object to be measured.

ここで、本発明の発明者らは、各画素P(x,y)について求めた画素間の自己相関係数R(x,y)と、各画素Pに対応している被写体100までの距離Dとの間に相関関係があり、各画素P(x,y)の自己相関係数R(x,y)に基づいて被写体100までの距離Dを取得できることを見出した。すなわち、パターン投射装置2が結像光学系を構成しており、投射部からある距離に結像点を設定しておけば、フォトマスクによる光点の像の大きさは距離に逆比例し、近接した物体に投射された光点は互いに重なりが生じて自己相関係数が大きくなる。ここで、数学的には自己相関係数のフーリエ変換は一義的に画像を直接フーリエ変換したものと同等である。したがって、第3画像のフーリエ変換と距離との相関関係を取ってもよい。   Here, the inventors of the present invention calculated the autocorrelation coefficient R (x, y) between the pixels obtained for each pixel P (x, y) and the distance to the subject 100 corresponding to each pixel P. It has been found that there is a correlation with D, and the distance D to the subject 100 can be acquired based on the autocorrelation coefficient R (x, y) of each pixel P (x, y). That is, if the pattern projection device 2 constitutes an imaging optical system and the imaging point is set at a certain distance from the projection unit, the size of the image of the light spot by the photomask is inversely proportional to the distance, Light spots projected on adjacent objects overlap each other and the autocorrelation coefficient increases. Here, mathematically, the Fourier transform of the autocorrelation coefficient is uniquely equivalent to a direct Fourier transform of the image. Therefore, a correlation between the Fourier transform of the third image and the distance may be taken.

図5は画素P(x,y)の自己相関係数R(x,y)と、画素P(x,y)に対応する被写体100までの距離Dとの関係を示すグラフである。図5は、光学式距離計測装置1を固定し、壁100bの前で光学式距離計測装置1から円柱100aまでの距離を2m〜40cmの間で変化させた場合における自己相関係数R(x,y)と距離Dとの関係を示している。自己相関係数R(x,y)を求める際の画素間の相関距離は4pixelである。図5に示すように、光学式距離計測装置1と円柱100aとの間の距離Dが短くなるのに伴って、各画素P(x,y)は近傍の画素Pとの相関性が高くなり、各画素P(x,y)の自己相関係数R(x,y)の値が高くなっている。また、自己相関係数R(x,y)と被写体100までの距離Dの間には対応関係があることが認められる。従って、第3画像データの各画素P(x,y)の自己相関係数R(x,y)を算出すれば、各画素P(x,y)の自己相関係数R(x,y)に基づいて被写体100までの距離Dを把握することが可能となる。   FIG. 5 is a graph showing the relationship between the autocorrelation coefficient R (x, y) of the pixel P (x, y) and the distance D to the subject 100 corresponding to the pixel P (x, y). FIG. 5 shows an autocorrelation coefficient R (x when the optical distance measuring device 1 is fixed and the distance from the optical distance measuring device 1 to the cylinder 100a is changed between 2 m and 40 cm in front of the wall 100b. , Y) and the distance D. The correlation distance between pixels when obtaining the autocorrelation coefficient R (x, y) is 4 pixels. As shown in FIG. 5, as the distance D between the optical distance measuring device 1 and the cylinder 100a becomes shorter, each pixel P (x, y) becomes highly correlated with the neighboring pixel P. The value of the autocorrelation coefficient R (x, y) of each pixel P (x, y) is high. It is also recognized that there is a correspondence between the autocorrelation coefficient R (x, y) and the distance D to the subject 100. Therefore, if the autocorrelation coefficient R (x, y) of each pixel P (x, y) of the third image data is calculated, the autocorrelation coefficient R (x, y) of each pixel P (x, y) It becomes possible to grasp the distance D to the subject 100 based on the above.

次に、距離取得部16は、各画素P(x,y)の自己相関係数R(x,y)が算出されると、テーブル記憶部17に記憶保持されているテーブルを参照して、各画素P(x,y)に対応する被写体100の部位までの距離Dを取得する。また、距離取得部16は、各画素P(x,y)に、取得された距離Dに対応付けられた色を付ける着色処理を施して距離画像データを生成し、この距離画像データをモニタ18に出力する。   Next, when the autocorrelation coefficient R (x, y) of each pixel P (x, y) is calculated, the distance acquisition unit 16 refers to the table stored and held in the table storage unit 17. The distance D to the part of the subject 100 corresponding to each pixel P (x, y) is acquired. Further, the distance acquisition unit 16 generates distance image data by performing a coloring process for attaching a color associated with the acquired distance D to each pixel P (x, y), and the distance image data is monitored 18. Output to.

ここで、テーブルは、第3画像データの各画素P(x,y)について算出した自己相関係数R(x,y)と、光学式距離計測装置1から各画素P(x,y)に対応する被写体100の部位までの距離Dを予め実測し、自己相関係数R(x,y)と被写体100までの距離Dを対応付けた形態で記憶保持したものである。なお、図5の円柱までの距離のグラフに示されるように、自己相関係数R(x,y)と被写体100までの距離Dとの間に線形的な対応が認められる範囲がある場合には、距離取得部16は、テーブルを参照せずに、各画素P(x,y)の自己相関係数R(x,y)に基づいて、被写体100までの距離Dを算出することができる。   Here, the table shows the autocorrelation coefficient R (x, y) calculated for each pixel P (x, y) of the third image data and the optical distance measuring device 1 for each pixel P (x, y). The distance D to the corresponding part of the subject 100 is measured in advance, and is stored and held in a form in which the autocorrelation coefficient R (x, y) and the distance D to the subject 100 are associated with each other. As shown in the graph of the distance to the cylinder in FIG. 5, there is a range where a linear correspondence is recognized between the autocorrelation coefficient R (x, y) and the distance D to the subject 100. The distance acquisition unit 16 can calculate the distance D to the subject 100 based on the autocorrelation coefficient R (x, y) of each pixel P (x, y) without referring to the table. .

(距離計測方法)
図6は光学式距離計測装置1の距離計測方法を示す概略フローチャートである。図7(a)〜(d)はそれぞれ第1画像データ、第2画像データ、第3画像データ、および、距離画像データの説明図である。図7(a)〜(d)のそれぞれにおいて、被写体100は図1に示されている円柱100aと壁100bである。また、図7(a)〜(d)のそれぞれにおいて、左端の画像データは、円柱100aを壁100bに近い位置に配置した第1状態を撮像して得られたものであり、中央の画像データは、円柱100aを壁100bから離して第1状態よりも光学式距離計測装置1に近い位置に配置した第2状態を撮像して得られたものであり、右端の画像データは、円柱100aを壁100bからさらに離して、第2状態よりも光学式距離計測装置1に近い位置に配置した第3状態を撮像して得られたものである。
(Distance measurement method)
FIG. 6 is a schematic flowchart showing a distance measuring method of the optical distance measuring apparatus 1. 7A to 7D are explanatory diagrams of the first image data, the second image data, the third image data, and the distance image data, respectively. In each of FIGS. 7A to 7D, the subject 100 is the cylinder 100a and the wall 100b shown in FIG. In each of FIGS. 7A to 7D, the image data at the left end is obtained by imaging the first state in which the column 100a is arranged at a position close to the wall 100b. Is obtained by imaging the second state in which the cylinder 100a is separated from the wall 100b and is positioned closer to the optical distance measuring device 1 than the first state. This is obtained by imaging the third state that is further away from the wall 100b and is located closer to the optical distance measuring device 1 than the second state.

被写体100までの距離Dを計測する際には、撮像装置3はCCDイメージセンサ10による撮像を開始し、パターン投射装置2は所定の投射パターンをCCDイメージセンサ10の奇数フィールドに同期させて投射する。これにより、CCDイメージセンサ10は、図7(a)に示すように、所定の投射パターンが投射された状態の被写体100の第1画像データを奇数フィールドに取得する。また、図7(b)に示すように、所定の投射パターンを投射していない状態の被写体100の第2画像データを偶数フィールドに取得する(ステップST1)。   When measuring the distance D to the subject 100, the imaging device 3 starts imaging with the CCD image sensor 10, and the pattern projection device 2 projects a predetermined projection pattern in synchronization with the odd field of the CCD image sensor 10. . Thereby, as shown in FIG. 7A, the CCD image sensor 10 acquires the first image data of the subject 100 in a state where a predetermined projection pattern is projected in an odd field. Further, as shown in FIG. 7B, the second image data of the subject 100 in a state where a predetermined projection pattern is not projected is acquired in the even field (step ST1).

第1画像データおよび第2画像データが取得されると、差分画像データ抽出部14は、第1画像データから第2画像データを差し引いて、図7(c)に示すように、所定の投射パターンの反射光のみを含む第3画像データを抽出する(ステップST2)。   When the first image data and the second image data are acquired, the difference image data extraction unit 14 subtracts the second image data from the first image data to obtain a predetermined projection pattern as shown in FIG. The third image data including only the reflected light is extracted (step ST2).

第3画像データが抽出されると、自己相関係数取得部15は、第3画像データの画素間の自己相関係数R(x,y)を、第3画像データの各画素P(x,y)について算出する(ステップST3)。また、各画素P(x,y)の自己相関係数R(x,y)が算出されると、距離取得部16は算出された自己相関係数R(x,y)に基づいてテーブルを参照して、被写体100までの距離Dを取得する(ステップST4)。しかる後に、各画素P(x,y)に距離Dに対応する着色を施して、図7(d)に示すように距離画像データを生成して、モニタ18に出力する(ステップST5)。   When the third image data is extracted, the autocorrelation coefficient acquisition unit 15 calculates the autocorrelation coefficient R (x, y) between the pixels of the third image data to each pixel P (x, y) of the third image data. y) is calculated (step ST3). In addition, when the autocorrelation coefficient R (x, y) of each pixel P (x, y) is calculated, the distance acquisition unit 16 creates a table based on the calculated autocorrelation coefficient R (x, y). Referring to, distance D to subject 100 is acquired (step ST4). Thereafter, each pixel P (x, y) is colored corresponding to the distance D, and distance image data is generated as shown in FIG. 7D and output to the monitor 18 (step ST5).

(作用効果)
本例によれば、一つの視点から被写体100を撮像して得られる第1画像データおよび第2画像データに基づいて被写体までの距離Dを計測できるので、光学式距離計測装置1は撮像装置3を1台備えればよい。また、第1画像データおよび第2画像データを取得するために、被写体100に投射パターンを投射した状態と、被写体100にパターンを投射しない状態とを形成すればよく、投射パターン自体を変化させる必要がない。よって、パターン投射装置2を簡易な構成とすることができる。さらに、撮像に際して特殊なイメージセンサを用いる必要がなく、汎用のCCDイメージセンサ10を用いることができる。従って、光学式距離計測装置1の製造コストを抑えることができる。
(Function and effect)
According to this example, since the distance D to the subject can be measured based on the first image data and the second image data obtained by imaging the subject 100 from one viewpoint, the optical distance measuring device 1 is used for the imaging device 3. It is sufficient to provide one. Further, in order to acquire the first image data and the second image data, it is only necessary to form a state in which a projection pattern is projected onto the subject 100 and a state in which no pattern is projected onto the subject 100, and it is necessary to change the projection pattern itself. There is no. Therefore, the pattern projection device 2 can have a simple configuration. Furthermore, it is not necessary to use a special image sensor for imaging, and a general-purpose CCD image sensor 10 can be used. Therefore, the manufacturing cost of the optical distance measuring device 1 can be suppressed.

また、本例によれば、各画素P(x,y)の自己相関係数R(x,y)と被写体100までの距離Dとを対応付けた形態で記憶保持しているテーブルを有しており、距離取得部16は、各画素P(x,y)の自己相関係数R(x,y)に基づいてテーブルを参照して被写体100までの距離Dを取得している。従って、フォトマスク6によって投射される投射パターンに拘わらず、被写体100までの距離Dを取得することができる。   Further, according to this example, the table is stored and held in a form in which the autocorrelation coefficient R (x, y) of each pixel P (x, y) and the distance D to the subject 100 are associated with each other. The distance acquisition unit 16 acquires the distance D to the subject 100 with reference to the table based on the autocorrelation coefficient R (x, y) of each pixel P (x, y). Accordingly, the distance D to the subject 100 can be acquired regardless of the projection pattern projected by the photomask 6.

さらに、本例では、第3画像データの各画素P(x,y)について距離Dを取得しているので、被写体100の形状を把握することができる。   Furthermore, in this example, since the distance D is acquired for each pixel P (x, y) of the third image data, the shape of the subject 100 can be grasped.

また、本例によれば、パターン投射装置2から被写体100に至る投射光の光路の一部と、被写体100から撮像装置3に至る反射光の光路の一部とが共通の光路となっているので、光学式距離計測装置1を小型化することが容易となる。   Further, according to this example, a part of the optical path of the projection light from the pattern projection device 2 to the subject 100 and the part of the optical path of the reflected light from the subject 100 to the imaging device 3 are a common optical path. Therefore, it becomes easy to reduce the size of the optical distance measuring device 1.

さらに、本例では、投射照明画角と撮像画角とが同一であり、重なっているので、第1画像データを取得する際に被写体100に影が発生することを抑制できる。従って、所定の投射パターンの反射光のみを含む第3画像データを精度よく抽出することができる。   Furthermore, in this example, since the projection illumination angle of view and the imaging angle of view are the same and overlap, it is possible to suppress the occurrence of a shadow on the subject 100 when acquiring the first image data. Therefore, it is possible to accurately extract the third image data including only the reflected light of the predetermined projection pattern.

また、本例では、パターン投射装置2は、所定の投射パターンをCCDイメージセンサ10の奇数フィールドに同期させて投射し、撮像装置3は、奇数フィールドで第1画像データを取得し、偶数フィールドで第2画像データを取得している。従って、第1画像データおよび第2画像データを、ほぼリアルタイムに取得することが可能となる。また、第2画像データを利用して、モニタ18から被写体100の映像を出力できる。   In this example, the pattern projection device 2 projects a predetermined projection pattern in synchronization with the odd field of the CCD image sensor 10, and the imaging device 3 acquires the first image data in the odd field, and in the even field. Second image data is acquired. Therefore, the first image data and the second image data can be acquired almost in real time. Also, the video of the subject 100 can be output from the monitor 18 using the second image data.

さらに、本例は、パターン投射装置2が光軸方向にフォトマスク6を移動させるフォトマスク移動機構9を備えている。従って、フォトマスク6を移動させて、投射パターンの結像点の位置を変化させることにより、第1画像データの取得時における距離に対する感度を調整することができる。   Furthermore, in this example, the pattern projection apparatus 2 includes a photomask moving mechanism 9 that moves the photomask 6 in the optical axis direction. Therefore, by moving the photomask 6 and changing the position of the image formation point of the projection pattern, it is possible to adjust the sensitivity with respect to the distance when the first image data is acquired.

また、所定の投射パターンを投射するためのパターン投射装置2の光源5は、近赤外線を放射しているので、被写体100となっている人間、あるいは、被写体100の近傍に位置する人間に投射パターンの投射を意識させることなく被写体100までの距離Dを計測することができる。   Further, since the light source 5 of the pattern projection apparatus 2 for projecting a predetermined projection pattern emits near infrared rays, the projection pattern is applied to a person who is the subject 100 or a person located near the subject 100. The distance D to the subject 100 can be measured without being conscious of the projection.

ここで、制御装置4はパターン投射装置2および撮像装置3が接続されたコンピュータを用いて構成することができる。   Here, the control device 4 can be configured using a computer to which the pattern projection device 2 and the imaging device 3 are connected.

この場合には、コンピュータ上でパターン投射装置2および撮像装置3を駆動制御するための第1のプログラムを動作させて、被写体100に対して所定の投射パターンを投射した状態でイメージセンサによる撮像を行って第1画像データを取得するとともに、被写体100に対して所定の投射パターンを投射していない状態でイメージセンサによる撮像を行なって第2画像データを取得する画像取得工程を行なう。また、撮像装置3が取得した第1画像データおよび第2画像データを、撮像装置3からコンピュータに逐次に転送させて、コンピュータの画像メモリ13に記憶保持する。   In this case, the first program for driving and controlling the pattern projection device 2 and the imaging device 3 is operated on the computer, and imaging by the image sensor is performed while a predetermined projection pattern is projected onto the subject 100. The first image data is acquired and an image acquisition process is performed in which the second image data is acquired by performing imaging with the image sensor in a state where a predetermined projection pattern is not projected onto the subject 100. Further, the first image data and the second image data acquired by the imaging device 3 are sequentially transferred from the imaging device 3 to the computer, and stored and held in the image memory 13 of the computer.

しかる後に、コンピュータ上で、被写体100までの距離Dを取得するための第2のプログラムを動作させて、当該コンピュータに、撮像装置3が取得した第1画像データと第2画像データの差分から、所定の投射パターンの反射光のみを含む第3画像データを抽出する差分画像抽出工程と、第3画像データの画素間の自己相関係数R(x,y)を当該第3画像データの各画素P(x,y)について算出する自己相関係数算出工程と、各画素P(x,y)の自己相関係数R(x,y)に基づいて、被写体100までの距離Dを取得する距離取得工程を行なわせる。なお、第1のプログラムと第2のプログラムは単一のプログラムとしてもよい。当然、プログラムをハードウエア化してゲートアレーなどに置き換えてもよい。   Thereafter, the second program for acquiring the distance D to the subject 100 is operated on the computer, and the computer is caused to calculate the difference between the first image data and the second image data acquired by the imaging device 3. A differential image extraction step for extracting third image data including only reflected light of a predetermined projection pattern, and an autocorrelation coefficient R (x, y) between the pixels of the third image data is set for each pixel of the third image data. The distance for obtaining the distance D to the subject 100 based on the autocorrelation coefficient calculation step for calculating P (x, y) and the autocorrelation coefficient R (x, y) of each pixel P (x, y) Let the acquisition process be performed. Note that the first program and the second program may be a single program. Of course, the program may be converted to hardware and replaced with a gate array or the like.

(その他の実施の形態)
上記の例では、投射パターンが投射された状態で被写体100を撮像して得られる第1画像データを奇数フィールドに取得するとともに、所定の投射パターンが投射されていない状態で被写体100を撮像して得られる第2画像データを第1画像データを取得した奇数フィールドに隣接した偶数フィールドから取得しているが、第1画像データおよび第2画像データは隣接したフィールドでなく、離散したフィールドから取得しても構わない。
(Other embodiments)
In the above example, the first image data obtained by imaging the subject 100 with the projection pattern projected is acquired in the odd field, and the subject 100 is imaged without the predetermined projection pattern being projected. The obtained second image data is acquired from the even field adjacent to the odd field from which the first image data was acquired. However, the first image data and the second image data are acquired from the discrete fields instead of the adjacent fields. It doesn't matter.

また、上記の例では、撮像装置3は、撮像素子としてインターレース方式のCCDイメージセンサ10を搭載しているが、プログレッシブ走査方式のイメージセンサを用いて第1画像データおよび第2画像データを取得してもよい。また、CMOS型のイメージセンサを用いてもよい。   In the above example, the image pickup apparatus 3 includes the interlaced CCD image sensor 10 as the image pickup device, but acquires the first image data and the second image data using the progressive scan image sensor. May be. A CMOS type image sensor may be used.

さらに、上記の例では、すべての画素に関して自己相関係数を算出しているが、被測定物の大きさによっては代表点のみの距離を算出してもよく、その場合は離散的な画素について自己相関係数を演算してもよい。   Furthermore, in the above example, the autocorrelation coefficient is calculated for all the pixels, but depending on the size of the object to be measured, the distance of only the representative point may be calculated. An autocorrelation coefficient may be calculated.

また、上記の例では光源5は0.85μmの波長の光線を放射しているが、光源5から放射される光に波長はこれに限られるものではなく、CCDイメージセンサ10、或いは、CMOS型のイメージセンサによって撮像可能な波長の近赤外線、例えば、波長0.7〜1.1μmの光線であれば適宜に選択することができる。ここで、汎用品として流通している一般的なイメージセンサであっても、その波長感度は1.0μm程度まで広がっている。なお、より波長の長い光線を利用して第1画像データを取得する場合には、パターン投射装置2の光源強度を十分なものとしておくことが望ましい。また、SN比が十分に取れる環境での使用を前提とすることが望ましい。ここで、近赤外光を用いる際は通常イメージセンサの受光面の前に配置される赤外遮断フィルターの波長選択性を適宜変更する必要があることはいうまでもない。また赤外波長に対する感度を高め、波長域を広げたイメージセンサもあり、それを用いる際にはさらに長波長の光源を使用できる。いずれの波長を選択しても同じ波長の背景光は必ず存在するのでその除去を行うために、前述した第1、第2画像データ間の差分を算出することは有効な手段である。   In the above example, the light source 5 emits a light beam having a wavelength of 0.85 μm. However, the wavelength of the light emitted from the light source 5 is not limited to this, and the CCD image sensor 10 or the CMOS type is used. As long as it is a near infrared ray having a wavelength that can be imaged by the image sensor, for example, a light ray having a wavelength of 0.7 to 1.1 μm, it can be appropriately selected. Here, even in a general image sensor distributed as a general-purpose product, the wavelength sensitivity extends to about 1.0 μm. In addition, when acquiring 1st image data using the light ray with a longer wavelength, it is desirable to make the light source intensity | strength of the pattern projector 2 sufficient. In addition, it is desirable to assume use in an environment where a sufficient SN ratio can be obtained. Here, when using near-infrared light, it is needless to say that it is necessary to appropriately change the wavelength selectivity of an infrared cutoff filter that is usually arranged in front of the light receiving surface of the image sensor. There are also image sensors with increased sensitivity to infrared wavelengths and a wider wavelength range, and when using them, longer wavelength light sources can be used. It is an effective means to calculate the difference between the first and second image data described above in order to eliminate the background light of the same wavelength without fail regardless of which wavelength is selected.

さらに、フォトマスク6によって投射される所定の投射パターンは、ストライプなどの規則性のある投射パターンであってもよい。また、被写体100や撮像環境に応じて投射パターンを異なるものとしてもよい。この場合には、フォトマスク6の替わりに、透過型の液晶パネル、反射型の液晶パネル、デジタル・マイクロミラー・デバイスなどの光源からの光線の一部分を透過、あるいは、反射する空間変調素子を用い、投射パターンを変化させることができる。   Further, the predetermined projection pattern projected by the photomask 6 may be a regular projection pattern such as a stripe. Further, the projection pattern may be different depending on the subject 100 and the imaging environment. In this case, instead of the photomask 6, a spatial modulation element that transmits or reflects a part of light from a light source such as a transmissive liquid crystal panel, a reflective liquid crystal panel, or a digital micromirror device is used. The projection pattern can be changed.

また、精度を要求されない用途においては、パターン投射装置2と撮像装置3の光路を共通にする必要はなく、それぞれ独立した光学系を用いてもよいことはいうまでもない。   In applications where accuracy is not required, it is needless to say that the optical paths of the pattern projection device 2 and the imaging device 3 do not have to be shared, and independent optical systems may be used.

さらに、被測定物の形状や移動がある特定された方向に限定されているのであれば、CCDイメージセンサ10として、1次元CCDイメージセンサを採用してもよい。1次元CCDイメージセンサを用いれば、装置の製造コストをより抑制することができ、高速走査も可能となる。   Furthermore, a one-dimensional CCD image sensor may be employed as the CCD image sensor 10 as long as the shape and movement of the object to be measured are limited to a specified direction. If a one-dimensional CCD image sensor is used, the manufacturing cost of the apparatus can be further suppressed, and high-speed scanning is also possible.

1・光学式距離計測装置、2・パターン投射装置、3・撮像装置、4・制御装置、5・光源、6・フォトマスク、7・プリズム、8・対物レンズ、9・フォトマスク移動機構、10・CCDイメージセンサ、11・ドライバ、12・駆動制御部、13・画像メモリ、13a・第1画像メモリ、13b・第2画像メモリ、14・差分画像データ抽出部、15・自己相関係数取得部、16・距離取得部、17・テーブル記憶部、18・モニタ、100・被写体、100a・円柱、100b・壁、D・距離、P・画素、Q・画素領域 1. Optical distance measuring device 2. Pattern projection device 3. Imaging device 4. Control device 5. Light source 6. Photo mask 7. Prism 8. Objective lens 9. Photo mask moving mechanism 10. CCD image sensor, 11 driver, 12 drive control unit, 13 image memory, 13a first image memory, 13b second image memory, 14 differential image data extraction unit, 15 autocorrelation coefficient acquisition unit , 16 / distance acquisition unit, 17 / table storage unit, 18 / monitor, 100 / subject, 100a / cylinder, 100b / wall, D / distance, P / pixel, Q / pixel area

Claims (10)

光源、および、所定の投射パターンを被写体に投射するために前記光源からの光線の一部分を透過あるいは反射する素子を備え、前記投射パターンを前記被写体に断続的に投射するパターン投射装置と、
イメージセンサを備え、前記所定の投射パターンが投射されたときに前記被写体を撮像して第1画像データを取得するとともに、前記所定の投射パターンが投射されていないときに前記被写体を撮像して第2画像データを取得する撮像装置と、
前記第1画像データと前記第2画像データとの差分から前記所定の投射パターンの反射光のみを含む第3画像データを取得する差分画像データ抽出部と、
前記第3画像データの画素間の自己相関係数を予め定めた所定の画素について算出する自己相関係数取得部と、
前記所定の画素の自己相関係数に基づいて、前記被写体までの距離を取得する距離取得部とを有することを特徴とする光学式距離計測装置。
A light source, and a pattern projection device that includes an element that transmits or reflects a part of the light beam from the light source to project a predetermined projection pattern onto the subject, and projects the projection pattern intermittently onto the subject;
An image sensor that captures the subject when the predetermined projection pattern is projected to acquire first image data, and captures the subject when the predetermined projection pattern is not projected; An imaging device for acquiring two image data;
A difference image data extraction unit that acquires third image data including only reflected light of the predetermined projection pattern from a difference between the first image data and the second image data;
An autocorrelation coefficient acquisition unit that calculates an autocorrelation coefficient between pixels of the third image data for a predetermined pixel;
An optical distance measuring device comprising: a distance acquisition unit that acquires a distance to the subject based on an autocorrelation coefficient of the predetermined pixel.
請求項1において、
前記第3画像データの画素の自己相関係数と被写体までの距離とを対応付けた形態で記憶保持しているテーブルを有し、
前記距離取得部は、前記画素の自己相関係数に基づいて前記テーブルを参照して、前記被写体までの距離を取得することを特徴とする光学式距離計測装置。
In claim 1,
A table that stores and holds the autocorrelation coefficients of the pixels of the third image data in association with the distance to the subject;
The distance acquisition unit refers to the table based on the autocorrelation coefficient of the pixel and acquires the distance to the subject.
請求項1または2において、
前記光源からの投射光を前記被写体に導くとともに、前記被写体からの反射光を前記イメージセンサに導く光学素子を有し、
前記光学素子から前記被写体に至る前記投射光の光路と前記被写体から前記光学素子に至る前記反射光の光路とは共通であり、
前記パターン投射装置による投射照明画角と前記撮像装置による撮像画角とは、同一であることを特徴とする光学式距離計測装置。
In claim 1 or 2,
An optical element that guides the projection light from the light source to the subject and guides the reflected light from the subject to the image sensor;
The optical path of the projection light from the optical element to the subject and the optical path of the reflected light from the subject to the optical element are common,
An optical distance measuring device characterized in that a projection illumination angle of view by the pattern projection device and an imaging angle of view by the imaging device are the same.
請求項1ないし3のうちのいずれかの項において、
前記イメージセンサは、インターレース走査方式であり、
前記パターン投射装置は、前記所定の投射パターンを前記イメージセンサの奇数フィールドおよび前記偶数フィールドのいずれか一方に同期させて投射し、
前記撮像装置は、前記奇数フィールドおよび偶数フィールドのうちのいずれか一方で前記第1画像データを取得し、いずれか他方で前記第2画像データを取得することを特徴とする光学式距離計測装置。
In any one of claims 1 to 3,
The image sensor is an interlace scanning method,
The pattern projection device projects the predetermined projection pattern in synchronization with either the odd field or the even field of the image sensor,
The optical imaging apparatus according to claim 1, wherein the imaging device acquires the first image data in one of the odd field and the even field, and acquires the second image data in either one.
請求項1ないし3のうちのいずれかの項において、
前記イメージセンサは、1次元イメージセンサであることを特徴とする光学式距離計測装置。
In any one of claims 1 to 3,
The optical distance measuring device, wherein the image sensor is a one-dimensional image sensor.
請求項1ないし5のうちのいずれかの項において、
前記光源は、近赤外線を放射することを特徴とする光学式距離計測装置。
In any one of claims 1 to 5,
The optical distance measuring device, wherein the light source emits near infrared rays.
請求項1ないし6のうちのいずれかの項において、
前記パターン投射装置は、光軸方向に前記素子を移動させるフォトマスク移動機構を備えていることを特徴とする光学式距離計測装置。
In any one of claims 1 to 6,
The said pattern projection apparatus is provided with the photomask moving mechanism which moves the said element to an optical axis direction, The optical distance measuring device characterized by the above-mentioned.
被写体に対して所定の投射パターンを投射した状態でイメージセンサにより撮像を行って第1画像データを取得するとともに、前記被写体に対して前記所定の投射パターンを投射していない状態で前記イメージセンサによる撮像を行なって第2画像データを取得する画像取得工程と、
前記第1画像データと前記第2画像データの差分から、前記所定の投射パターンの反射光のみを含む第3画像データを抽出する差分画像抽出工程と、
前記第3画像データの画素間の自己相関係数を予め定めた所定の画素について算出する自己相関係数算出工程と、
前記画素の自己相関係数に基づいて、前記被写体までの距離を取得する距離取得工程とを含むことを特徴とする光学式距離計測装置の距離計測方法。
The image sensor captures the first image data in a state where a predetermined projection pattern is projected onto the subject, and the image sensor does not project the predetermined projection pattern onto the subject. An image acquisition step of performing imaging to acquire second image data;
A difference image extraction step of extracting third image data including only reflected light of the predetermined projection pattern from the difference between the first image data and the second image data;
An autocorrelation coefficient calculating step for calculating an autocorrelation coefficient between pixels of the third image data for a predetermined pixel;
And a distance acquisition step of acquiring a distance to the subject based on the autocorrelation coefficient of the pixel.
請求項8に記載の距離計測方法によって被写体までの距離を計測する光学式距離計測装置において、
光源、および、所定の投射パターンを被写体に投射するために前記光源からの光線の一部分を透過あるいは反射する素子を備え、前記投射パターンを前記被写体に断続的に投射するパターン投射装置と、
イメージセンサを備え、前記所定の投射パターンが投射されたときに前記被写体を撮像して第1画像データを取得するとともに、前記所定の投射パターンが投射されていないときに前記被写体を撮像して第2画像データを取得する撮像装置と、
前記撮像装置に接続されており、前記撮像装置で取得された前記第1画像データおよび前記第2画像データを記憶保持するための画像メモリを備えるコンピュータと、
前記コンピュータに、前記差分画像抽出工程、前記自己相関係数算出工程、および前記距離取得工程を行わせる距離計測用のプログラムとを有することを特徴とする光学式距離計測装置。
In the optical distance measuring device which measures the distance to a subject by the distance measuring method according to claim 8,
A light source, and a pattern projection device that includes an element that transmits or reflects a part of the light beam from the light source to project a predetermined projection pattern onto the subject, and projects the projection pattern intermittently onto the subject;
An image sensor that captures the subject when the predetermined projection pattern is projected to acquire first image data, and captures the subject when the predetermined projection pattern is not projected; An imaging device for acquiring two image data;
A computer that is connected to the imaging device and includes an image memory for storing and holding the first image data and the second image data acquired by the imaging device;
An optical distance measurement apparatus comprising: a distance measurement program that causes the computer to perform the difference image extraction step, the autocorrelation coefficient calculation step, and the distance acquisition step.
請求項9に記載の光学式距離計測装置の距離計測用プログラム。   The program for distance measurement of the optical distance measuring device according to claim 9.
JP2010276301A 2010-12-10 2010-12-10 Optical distance measuring device, distance measuring method of optical distance measuring device, and distance measuring program Active JP5587756B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010276301A JP5587756B2 (en) 2010-12-10 2010-12-10 Optical distance measuring device, distance measuring method of optical distance measuring device, and distance measuring program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010276301A JP5587756B2 (en) 2010-12-10 2010-12-10 Optical distance measuring device, distance measuring method of optical distance measuring device, and distance measuring program

Publications (2)

Publication Number Publication Date
JP2012122975A JP2012122975A (en) 2012-06-28
JP5587756B2 true JP5587756B2 (en) 2014-09-10

Family

ID=46504540

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010276301A Active JP5587756B2 (en) 2010-12-10 2010-12-10 Optical distance measuring device, distance measuring method of optical distance measuring device, and distance measuring program

Country Status (1)

Country Link
JP (1) JP5587756B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11263768B2 (en) 2018-12-20 2022-03-01 Samsung Electronics Co., Ltd. 3D information calculation apparatuses, 3D measurement apparatuses, 3D information calculation methods, and 3D information calculation programs

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3088839B1 (en) * 2013-12-27 2018-12-26 Sony Corporation Image processing device and image processing method
WO2016084926A1 (en) * 2014-11-28 2016-06-02 日立マクセル株式会社 Image pickup system
JP2017147853A (en) * 2016-02-17 2017-08-24 トヨタ自動車株式会社 Electric power transmission device and vehicle
JP2020034465A (en) * 2018-08-31 2020-03-05 ソニー株式会社 Information processing device, information processing method and program

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06102197A (en) * 1992-09-21 1994-04-15 Kawasaki Steel Corp Surface flaw detection method
JPH0791951A (en) * 1993-09-27 1995-04-07 Toyota Motor Corp Distance measuring apparatus for vehicle
JP3818028B2 (en) * 2000-07-10 2006-09-06 富士ゼロックス株式会社 3D image capturing apparatus and 3D image capturing method
JP2002213931A (en) * 2001-01-17 2002-07-31 Fuji Xerox Co Ltd Instrument and method for measuring three-dimensional shape
JP3884321B2 (en) * 2001-06-26 2007-02-21 オリンパス株式会社 3D information acquisition apparatus, projection pattern in 3D information acquisition, and 3D information acquisition method
JP2006222637A (en) * 2005-02-09 2006-08-24 Olympus Corp Imaging apparatus
JP2008145290A (en) * 2006-12-11 2008-06-26 Seiko Precision Inc Range finder

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11263768B2 (en) 2018-12-20 2022-03-01 Samsung Electronics Co., Ltd. 3D information calculation apparatuses, 3D measurement apparatuses, 3D information calculation methods, and 3D information calculation programs

Also Published As

Publication number Publication date
JP2012122975A (en) 2012-06-28

Similar Documents

Publication Publication Date Title
JP6296401B2 (en) Distance measuring device and solid-state imaging device
JP6309459B2 (en) Time-of-flight camera with stripe lighting
JP2009300268A (en) Three-dimensional information detection device
JP5587756B2 (en) Optical distance measuring device, distance measuring method of optical distance measuring device, and distance measuring program
WO2013012335A1 (en) Imaging device for motion detection of objects in a scene, and method for motion detection of objects in a scene
JP6302414B2 (en) Motion sensor device having a plurality of light sources
WO2021038984A1 (en) Measurement device, elevator system, and measurement method
WO2004044522A1 (en) Three-dimensional shape measuring method and its device
JP2011069965A (en) Image capturing apparatus, image display method, and recording medium with image display program recorded thereon
EP2813809A1 (en) Device and method for measuring the dimensions of an objet and method for producing an item using said device
CN106896370B (en) Structured light ranging device and method
JP2011510315A (en) Spatial colorimetric measuring device and spatial colorimetric measuring method for three-dimensional objects
JP6961082B2 (en) Mobile speed measuring device and elevator
JP4843544B2 (en) 3D image correction method and apparatus
JP2013257162A (en) Distance measuring device
JP2021113832A (en) Surface shape measurement method
JP6426753B2 (en) Imaging system
CN113302541A (en) Process and apparatus for capturing plenoptic images between arbitrary planes
JP6273109B2 (en) Optical interference measurement device
JP3818028B2 (en) 3D image capturing apparatus and 3D image capturing method
CN116670713A (en) Method for depth sensing using candidate images selected based on epipolar lines
Munkelt et al. Large-volume NIR pattern projection sensor for continuous low-latency 3D measurements
JP3668466B2 (en) Real-time range finder
US10921248B2 (en) Measurement apparatus and measurement method
JP2005221368A5 (en)

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20120703

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131206

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140616

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140724

R150 Certificate of patent or registration of utility model

Ref document number: 5587756

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250