JP2009210520A - Distance measuring instrument and distance measuring method - Google Patents

Distance measuring instrument and distance measuring method Download PDF

Info

Publication number
JP2009210520A
JP2009210520A JP2008056385A JP2008056385A JP2009210520A JP 2009210520 A JP2009210520 A JP 2009210520A JP 2008056385 A JP2008056385 A JP 2008056385A JP 2008056385 A JP2008056385 A JP 2008056385A JP 2009210520 A JP2009210520 A JP 2009210520A
Authority
JP
Japan
Prior art keywords
image
region
pixel
edge
distance
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.)
Withdrawn
Application number
JP2008056385A
Other languages
Japanese (ja)
Inventor
Toshihisa Matsuo
順向 松尾
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2008056385A priority Critical patent/JP2009210520A/en
Publication of JP2009210520A publication Critical patent/JP2009210520A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Measurement Of Optical Distance (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a small information measuring instrument for measuring distance information on an object in a short time. <P>SOLUTION: This distance measuring instrument includes an image sensor camera 1, an image capture board 2, a memory 3 for storing image data, an image processing part 4 for calculating distance information to the object from the image data stored in the memory 3, and a display monitor 5 for displaying the distance information calculated by the image processing part 4. The image processing part 4 includes a reconstruction part 4a, a luminance information calculation part 4b, a distance information calculation part 4c, and a region selecting part 4d. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、撮像レンズ、マイクロレンズアレイを通して撮像素子で取得した、対象物の画像データに基づいて、対象物までの距離を測定する技術に関する。   The present invention relates to a technique for measuring a distance to an object based on image data of the object acquired by an imaging element through an imaging lens and a microlens array.

近年、産業用ロボットや各種FA(Factory Automation)機器を用いた生産ラインを自動化するシステムの構築、あるいは、知能ロボットのインテリジェント化を図るために、対象物の距離情報を取得するための視覚センサが重要となってきている。特に、ロボットアームを用いたシステムにおいては、ワークの位置、姿勢、形状等の計測のための視覚センサとして画像センサカメラが多く用いられている。   In recent years, in order to construct a system that automates production lines using industrial robots and various FA (Factory Automation) devices, or to make intelligent robots intelligent, there has been a visual sensor for acquiring distance information of objects. It has become important. In particular, in a system using a robot arm, an image sensor camera is often used as a visual sensor for measuring the position, posture, shape, and the like of a workpiece.

また、半導体デバイスや回路部品の実装基板の製造などにおいても、品質を管理するために半田バンプや金バンプなど2次元状に配置された微小なデバイスの高さ情報を測定するというニーズが高まっている。   Also, in the manufacture of mounting boards for semiconductor devices and circuit components, there is an increasing need to measure height information of minute devices arranged in two dimensions such as solder bumps and gold bumps in order to control quality. Yes.

このようなニーズに対応するために、従来、2次元の画像センサカメラの画像から擬似的に高さや姿勢情報を検出する方法や、複数の画像センサカメラを用いたステレオ方式による3次元情報測定システムなどが用いられている。   In order to meet such needs, a conventional method for detecting height and posture information from an image of a two-dimensional image sensor camera, and a stereo three-dimensional information measurement system using a plurality of image sensor cameras. Etc. are used.

また、比較的小さな対象物の高さ情報を測定する方法として、共焦点顕微鏡の原理を利用した高さ測定法が提案されている。例えば、特開2003−75119号公報(特許文献1)には、共焦点顕微鏡の原理を用いた高さ情報測定装置が記載されている。   As a method for measuring the height information of a relatively small object, a height measurement method using the principle of a confocal microscope has been proposed. For example, Japanese Patent Laid-Open No. 2003-75119 (Patent Document 1) describes a height information measuring device using the principle of a confocal microscope.

この高さ情報測定装置について、図17、図18を用いて説明する。図17は、共焦点顕微鏡の原理を用いた高さ情報測定装置の構成を示す図である。また、図18は、共焦点顕微鏡の原理を用いた高さ情報測定装置による試料の高さ情報の検出アルゴリズムを説明する図である。図17に示すように、光源103、対物レンズ104、2次元画像カメラ102を備えた共焦点光学系101により、試料106をステージ105を高さ方向に移動させながら、その高さ方向において互いに異なる複数の高さ位置で水平面の共焦点画像をそれぞれ撮像する構成を有している(図18(a)(b))。この高さ情報測定装置は、複数の共焦点画像の画素毎の輝度情報を比較し最大輝度を求め、最大輝度を有する画素を含む共焦点画素データを用いて粒子解析を行なって特定領域を抽出する。そして、抽出された領域における輝度と高さの代表値を算出し、試料の高さ情報を求めるものである(図18(c))。   This height information measuring apparatus will be described with reference to FIGS. FIG. 17 is a diagram illustrating a configuration of a height information measuring device using the principle of a confocal microscope. FIG. 18 is a diagram for explaining an algorithm for detecting the height information of the sample by the height information measuring device using the principle of the confocal microscope. As shown in FIG. 17, the confocal optical system 101 provided with the light source 103, the objective lens 104, and the two-dimensional image camera 102 moves the sample 106 in the height direction while moving the sample 106 in the height direction. It has the structure which each images the confocal image of a horizontal surface in several height positions (FIG. 18 (a) (b)). This height information measuring device compares the luminance information for each pixel of a plurality of confocal images to obtain the maximum luminance, and performs particle analysis using confocal pixel data including the pixel having the maximum luminance to extract a specific region. To do. Then, representative values of luminance and height in the extracted region are calculated to obtain sample height information (FIG. 18C).

また、撮像素子を用いたカメラシステムにおいて、取得した画像データをデジタル処理により合成し、後で好きなようにピントを手前または奥に移動できるプレノプティックカメラ技術が“Light Field Photography with a Hand−held Plenoptic Camera”,Stanford Tech Report CTSR 2005−02(非特許文献1)の中で提案されている。非特許文献1に記載のプレノプティックカメラは、普通のカメラレンズと同様の撮像レンズを有するが、普通のカメラとは、マイクロレンズアレイが像平面に正確に配置され、さらにマイクロレンズアレイより多くの撮像ピクセルを有するイメージセンサアレイ(撮像素子)がマイクロレンズアレイのすぐ背後に置かれている点で異なる。マイクロレンズアレイ内のレンズの数で最終画像の画素数は決まるが、単一マイクロレンズに割り当てられた多数のセンサピクセルにより、そのマイクロレンズに入射する光の方向と強度を記録することができる。そのデータを用いて、所定の距離にピントを合せた画像を再構成することができるというものである。
特開2003−75119号公報 “Light Field Photography with a Hand−held Plenoptic Camera”,Stanford Tech Report CTSR 2005−02
Also, in a camera system using an image sensor, a plenoptic camera technology that can synthesize acquired image data by digital processing and move the focus to the front or back as desired later is “Light Field Photography with a Hand”. -Held Plenoptic Camera ", Stanford Tech Report CTSR 2005-02 (Non-Patent Document 1). The plenoptic camera described in Non-Patent Document 1 has an imaging lens similar to an ordinary camera lens, but is different from an ordinary camera in that a microlens array is accurately arranged on an image plane, and moreover than a microlens array. The difference is that an image sensor array (imaging device) having many imaging pixels is placed immediately behind the microlens array. Although the number of pixels in the final image is determined by the number of lenses in the microlens array, the direction and intensity of light incident on the microlens can be recorded by a large number of sensor pixels assigned to a single microlens. Using that data, an image focused on a predetermined distance can be reconstructed.
JP 2003-75119 A “Light Field Photography with a Hand-held Plenoptic Camera”, Stanford Tech Report CTSR 2005-02

2次元の画像センサカメラの画像から擬似的に高さや姿勢情報を検出する方法では直接奥行き距離や高さ情報が検出できないといった問題がある。また、複数の画像センサカメラを用いたステレオ方式による3次元情報測定システムを用いた距離測定には、複数のカメラや複雑な画像処理が必要などの課題があった。   There is a problem that the depth distance and height information cannot be directly detected by the method of detecting height and posture information in a pseudo manner from the image of the two-dimensional image sensor camera. Further, distance measurement using a stereo three-dimensional information measurement system using a plurality of image sensor cameras has a problem that a plurality of cameras and complicated image processing are required.

また、特許文献1に記載の、共焦点顕微鏡の原理を用いて複数の共焦点画像を取得する場合には、ステージの面方向への走査と高さ方向への移動という操作が必要で、オートフォーカス機構を含む移動機構系が大型になるという問題がある。また、2次元画像データを高さを変えて複数回取得するには、ステージの移動、静止、対物レンズのオートフォーカシングなどのため、要する時間が長くなるといった課題もある。   In addition, when acquiring a plurality of confocal images using the principle of the confocal microscope described in Patent Document 1, an operation of scanning in the surface direction of the stage and moving in the height direction is necessary. There is a problem that the moving mechanism system including the focus mechanism becomes large. In addition, in order to acquire two-dimensional image data at a plurality of times with different heights, there is a problem that the time required is long because of movement of the stage, stationary, auto-focusing of the objective lens, and the like.

また、非特許文献1に記載のプレノプティックカメラ技術においては、取得画像データに対して、例えばオペレータがピント位置(距離)を入力することで、その位置にフォーカシングされた画像をデータの並び替え(再構成)により作り出すことはできるが、それを用いて対象物の距離情報を算出することはできない。   In the plenoptic camera technique described in Non-Patent Document 1, for example, when an operator inputs a focus position (distance) to acquired image data, an image focused on that position is arranged in data. Although it can be created by replacement (reconstruction), the distance information of the object cannot be calculated using it.

本発明は、このような課題に着目してなされたものであり、その目的とするところは、対象物の距離情報を短時間で測定できる、小型の情報測定装置を提供することにある。   The present invention has been made paying attention to such a problem, and an object of the present invention is to provide a small information measuring apparatus capable of measuring distance information of an object in a short time.

1つの局面に係る本願発明は、対象物までの距離を測定するための距離測定装置であって、対象物からの物体光を集光する撮像レンズと、撮像レンズを通過した物体光が入射する複数の集光器からなる集光アレイと、集光アレイを通過した物体光の画像データを取得する撮像素子とを含むカメラを備え、撮像素子は、複数の画素を有し、複数の画素は、集光器の1つを通過した物体光を検出する複数の画素群に分割されており、画像データからエッジを抽出し、エッジの少なくとも一部を含む領域を選択する領域選択手段と、選択された領域において、各画素群における物体光を検出した画素の位置により定まる物体光の集光器への入射方向に基づき複数の画素を並び替えて、撮像素子が複数の仮想位置の各々に位置する場合に得られるべき選択された領域の再構成画像を生成する再構成手段と、複数の再構成画像の各々について、各画素と当該画素近傍の画素との間の輝度の差分値を算出する差分値算出手段と、複数の再構成画像に共通の各画素位置に対して、差分値が最大である画素を有する再構成画像に対応する仮想位置を特定し、カメラの光学系のパラメータに基づき特定された仮想位置を変換し距離を算出する距離算出手段とを備える。   The present invention according to one aspect is a distance measuring device for measuring a distance to an object, and an imaging lens that collects object light from the object and object light that has passed through the imaging lens are incident thereon. A camera including a condensing array composed of a plurality of concentrators and an image sensor that acquires image data of object light that has passed through the condensing array, the image sensor includes a plurality of pixels, An area selection means for extracting an edge from the image data and selecting an area including at least a part of the edge, which is divided into a plurality of pixel groups for detecting object light that has passed through one of the condensers; In this area, the plurality of pixels are rearranged based on the incident direction of the object light to the light collector determined by the position of the pixel that detected the object light in each pixel group, and the image sensor is positioned at each of the plurality of virtual positions. Should be obtained when you do Reconstructing means for generating a reconstructed image of the selected region, difference value calculating means for calculating a difference value of luminance between each pixel and pixels in the vicinity of the pixel for each of the plurality of reconstructed images, For each pixel position common to a plurality of reconstructed images, a virtual position corresponding to a reconstructed image having a pixel having a maximum difference value is specified, and a virtual position specified based on a parameter of a camera optical system is determined. Distance calculating means for converting and calculating the distance.

好ましくは、領域選択手段は、画像データの中から処理領域を決定し、処理領域中のエッジを含む領域を選択する。   Preferably, the region selection unit determines a processing region from the image data and selects a region including an edge in the processing region.

さらに好ましくは、領域選択手段は、一繋がりのエッジを含む領域を処理領域として決定する。   More preferably, the region selection means determines a region including a continuous edge as a processing region.

さらに好ましくは、画像データに含まれるエッジ全体を含む領域を処理領域として決定する。   More preferably, an area including the entire edge included in the image data is determined as the processing area.

さらに好ましくは、領域選択手段は、処理領域中のエッジおよび処理領域中のエッジの近傍領域を選択する。   More preferably, the region selection means selects an edge in the processing region and a region near the edge in the processing region.

さらに好ましくは、領域選択手段は、エッジからの距離が設定された値以下の領域を近傍領域として決定する。   More preferably, the region selection means determines a region whose distance from the edge is equal to or less than a set value as a neighboring region.

他の局面に係る本願発明は、対象物までの距離を測定するための距離測定方法であって、撮像レンズと複数の集光器からなる集光アレイとを通過した対象物からの物体光の画像データを、複数の画素を有し、複数の画素は、集光器の1つを通過した物体光を検出する複数の画素群に分割されている撮像素子で取得するステップと、画像データからエッジを抽出するステップと、エッジ部分を含む領域を選択するステップと、選択された領域において、各画素群における物体光を検出した画素の位置により定まる物体光の集光器への入射方向に基づき複数の画素を並び替えて、撮像素子が複数の仮想位置の各々に位置する場合に得られるべき選択された領域の再構成画像を生成するステップと、再構成画像の各々について、各画素と当該画素近傍の画素との間の輝度の差分値を算出するステップと、複数の再構成画像に共通の各画素位置に対して、差分値が最大である画素を有する再構成画像に対応する仮想位置を特定するステップと、カメラの光学系のパラメータに基づき特定された仮想位置を変換し距離を算出するステップとを備える。   The present invention according to another aspect is a distance measurement method for measuring a distance to an object, in which object light from an object that has passed through an imaging lens and a condensing array composed of a plurality of concentrators. From the image data, the image data has a plurality of pixels, and the plurality of pixels are acquired by an image sensor that is divided into a plurality of pixel groups that detect object light that has passed through one of the condensers; Extracting an edge; selecting a region including an edge portion; and, in the selected region, based on an incident direction of the object light to the collector determined by the position of the pixel that detected the object light in each pixel group. Rearranging a plurality of pixels to generate a reconstructed image of a selected region to be obtained when the image sensor is located at each of a plurality of virtual positions; for each of the reconstructed images, Near pixel A step of calculating a difference value of luminance between the pixels and a virtual position corresponding to a reconstructed image having a pixel having a maximum difference value for each pixel position common to a plurality of reconstructed images And a step of calculating a distance by converting a virtual position specified based on a parameter of the optical system of the camera.

本発明は、一度の撮像データから画像処理により、異なるフォーカシング状態の複数の画像データを生成し、その画像データより対象物までの距離情報を得ることができる。従って、カメラレンズのフォーカシング機構やステージなどの移動機構が不要となり、小型の距離情報測定装置が実現できる。また、一度の撮像操作で情報が取得できるため、カメラや対象物の複数回の移動時間や撮影時間または移動に伴う各画像のマッチング操作などの時間が不要となり、短時間で距離測定を行なえる。   According to the present invention, a plurality of pieces of image data in different focusing states can be generated from imaged data once by image processing, and distance information to an object can be obtained from the image data. Accordingly, a camera lens focusing mechanism and a moving mechanism such as a stage are not required, and a small distance information measuring apparatus can be realized. In addition, since information can be acquired with a single imaging operation, the time required to move the camera or object multiple times, the shooting time, or the matching operation of each image associated with the movement is not required, and distance measurement can be performed in a short time. .

以下、図面を参照しながら本発明の実施形態を説明する。なお、本発明は以下の実施形態に限定されるものではない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, this invention is not limited to the following embodiment.

(1.本発明の構成)
図1を用いて、本発明に係る距離情報検出装置の構成について説明する。図1は、本発明の実施の形態に係る距離情報検出装置の概略構成図である。
(1. Configuration of the present invention)
The configuration of the distance information detection apparatus according to the present invention will be described with reference to FIG. FIG. 1 is a schematic configuration diagram of a distance information detection apparatus according to an embodiment of the present invention.

距離情報検出装置は、画像センサカメラ1と、画像センサカメラ1で撮影された対象物の画像データを取得する画像キャプチャボード2と、画像データを保存するメモリ3と、メモリ3に保存された画像データから対象物までの距離情報を算出する画像処理部4と、画像処理部4で算出された距離情報を表示する表示モニタ5とを備える。   The distance information detection apparatus includes an image sensor camera 1, an image capture board 2 that acquires image data of an object photographed by the image sensor camera 1, a memory 3 that stores image data, and an image stored in the memory 3. An image processing unit 4 that calculates distance information from the data to the object, and a display monitor 5 that displays the distance information calculated by the image processing unit 4 are provided.

画像センサカメラ1は、対象物の画像データを取得する。画像センサカメラ1は、撮像レンズ11(以後は、メインレンズと呼ぶ)と、複数のマイクロレンズからなるマイクロレンズアレイ12と、撮像素子13とからなる。撮像素子13としては、例えば、CCD(charge-coupled device)やCMOS(Complementary Metal Oxide Semiconductor)センサなどを用いることができる。   The image sensor camera 1 acquires image data of an object. The image sensor camera 1 includes an imaging lens 11 (hereinafter referred to as a main lens), a microlens array 12 including a plurality of microlenses, and an imaging element 13. As the imaging device 13, for example, a charge-coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) sensor can be used.

メインレンズ11には、対象物からの物体光が入射する。メインレンズ11は、入射した対象物からの物体光を集光する。マイクロレンズアレイ12には、メインレンズ11を通過した物体光が入射する。マイクロレンズアレイ12に含まれる複数のマイクロレンズの各々は、物体光を集光する。なお、マイクロレンズアレイ12は、複数の集光器からなる集光アレイの一例である。例えば、マイクロレンズアレイ12のかわりに、複数のピンホールからなるピンホールアレイを用いても構わない。   Object light from the object is incident on the main lens 11. The main lens 11 condenses object light from the incident object. Object light that has passed through the main lens 11 enters the microlens array 12. Each of the plurality of microlenses included in the microlens array 12 collects object light. Note that the microlens array 12 is an example of a light collection array including a plurality of light collectors. For example, instead of the microlens array 12, a pinhole array composed of a plurality of pinholes may be used.

撮像素子13は、マイクロレンズアレイ12を通過した物体光の画像データを取得する。撮像素子13は、複数の画素を有する。撮像素子13の画素および撮像素子13により取得される画像データについては、後で詳述する。   The image sensor 13 acquires image data of object light that has passed through the microlens array 12. The image sensor 13 has a plurality of pixels. The pixels of the image sensor 13 and the image data acquired by the image sensor 13 will be described in detail later.

画像キャプチャーボード2は、撮像素子13で取得された画像データを取り込み、以降の処理が行なえる形に変換する。メモリ3は、画像キャプチャーボード2から転送された画像データを格納する。   The image capture board 2 captures the image data acquired by the image sensor 13 and converts it into a form that allows subsequent processing. The memory 3 stores the image data transferred from the image capture board 2.

画像処理部4は、メモリ3から画像データを読出し、読み出した画像データに基づき、物体までの距離を算出する処理を行なう。画像処理部4は、画像データの一部領域を選択する領域選択部4dと、選択領域に含まれる画素データを並び替えて、撮像素子13が異なる複数の仮想位置の各々に位置する場合に得られるべき再構成画像を生成する再構成部4aと、複数の再構成画像の各々において、輝度情報を算出する輝度情報算出部4bと、対象物までの距離を算出する距離情報算出部4cとからなる。画像処理部4の行なう処理の詳細については、後述する。   The image processing unit 4 reads image data from the memory 3 and performs a process of calculating a distance to the object based on the read image data. The image processing unit 4 obtains the region selection unit 4d that selects a partial region of the image data and the pixel data included in the selection region, and the image sensor 13 is located at each of a plurality of different virtual positions. A reconstruction unit 4a that generates a reconstructed image to be performed, a luminance information calculation unit 4b that calculates luminance information in each of the plurality of reconstructed images, and a distance information calculation unit 4c that calculates a distance to an object. Become. Details of the processing performed by the image processing unit 4 will be described later.

(2.画像センサカメラの特徴について)
本発明においては、画像センサカメラ1の光学系の構成に特徴があり、図2を用いて、その特徴を説明する。図2は、画像センサカメラ1の光学系を示す図である。なお、簡単のため、図2には、対象物14が点光源である場合を示す。
(2. Features of image sensor camera)
In the present invention, there is a feature in the configuration of the optical system of the image sensor camera 1, and the feature will be described with reference to FIG. FIG. 2 is a diagram illustrating an optical system of the image sensor camera 1. For simplicity, FIG. 2 shows a case where the object 14 is a point light source.

画像センサカメラ1のマイクロレンズアレイ12は、対象物14がAの位置にある場合に、メインレンズ12より対象物14がほぼ結像する位置に配置される。このときのAの位置を合焦点位置、合焦点位置よりもメインレンズ11に近い側を近点位置、合焦点位置よりもメインレンズ11から遠い側を遠点位置と呼ぶ。撮像素子13はマイクロレンズアレイ12のほぼ焦点位置に配置されている。撮像素子13には、対象物の光が、マイクロレンズを通して、入射される。また、それぞれのマイクロレンズを通過した光が、互いに重なることなく撮像素子13上に入射するように、画像センサカメラ1の光学系は調整されているものとする。   The microlens array 12 of the image sensor camera 1 is disposed at a position where the object 14 is substantially imaged by the main lens 12 when the object 14 is at the position A. The position A at this time is called a focal point position, the side closer to the main lens 11 than the focal point position is called a near point position, and the side farther from the main lens 11 than the focal point position is called a far point position. The image pickup device 13 is disposed almost at the focal position of the microlens array 12. The light of the object enters the image sensor 13 through the microlens. In addition, it is assumed that the optical system of the image sensor camera 1 is adjusted so that light that has passed through each microlens enters the image sensor 13 without overlapping each other.

次に、図3〜図9を用いて、この画像センサカメラ1により撮像される画像について説明する。   Next, an image captured by the image sensor camera 1 will be described with reference to FIGS.

図3を用いて、対象物14の結像について説明する。図3は、対象物14が近点位置Bまたは遠点位置Cにある場合の集光の様子を示す図である。対象物14が位置Bにある場合、対象物14からの光は、メインレンズ11により、面Dに集光(結像)する。また、位置Cにある場合、面Fに集光(結像)する。また、面Eは、合焦位置Aに対する集光面であり、ほぼマイクロレンズアレイ12の位置に相当する。   The imaging of the object 14 will be described with reference to FIG. FIG. 3 is a diagram illustrating a state of light collection when the object 14 is at the near point position B or the far point position C. When the object 14 is at the position B, the light from the object 14 is condensed (imaged) on the surface D by the main lens 11. Further, when it is at the position C, it is condensed (imaged) on the surface F. The surface E is a light condensing surface with respect to the in-focus position A and substantially corresponds to the position of the microlens array 12.

続いて、対象物14が図3の位置A,B,Cにある場合に撮像素子13により、どのような画像が撮像されるかを図4、図5を用いて説明する。図4はマイクロレンズアレイ12上の入射光15の形状を示す図であり、図5は撮像素子13上の入射光16の形状を示す図である。   Next, what kind of image is picked up by the image pickup device 13 when the object 14 is at the positions A, B, and C in FIG. 3 will be described with reference to FIGS. 4 and 5. FIG. 4 is a diagram showing the shape of the incident light 15 on the microlens array 12, and FIG. 5 is a diagram showing the shape of the incident light 16 on the image sensor 13.

まず、対象物14が図3の位置A,B,Cにある場合にマイクロレンズアレイ12上にどのような形状の入射光15が入射するかについて図4を用いて説明する。図4に示すように、本実施例においては、マイクロレンズアレイ12は、2次元面内に配列された円形のマイクロレンズからなるものとする。また、各マイクロレンズには、それらを識別するための番号M(i,j)が与えられているものとする。図4(a)、図4(b)、図4(c)は、それぞれ、対象物14が、遠点位置Cにある場合、合焦位置Aにある場合、近点位置Bにある場合のマイクロレンズアレイ12上の入射光15の形状を示す図である。   First, the shape of the incident light 15 incident on the microlens array 12 when the object 14 is at positions A, B, and C in FIG. 3 will be described with reference to FIG. As shown in FIG. 4, in the present embodiment, the microlens array 12 is composed of circular microlenses arranged in a two-dimensional plane. Each microlens is given a number M (i, j) for identifying them. 4 (a), 4 (b), and 4 (c) respectively show the case where the object 14 is at the far point position C, the in-focus position A, and the near point position B. It is a figure which shows the shape of the incident light 15 on the micro lens array 12. FIG.

合焦位置Aにある対象物14からの光は図4(b)のようにほぼマイクロレンズM(2,2)上に集光される。   The light from the object 14 at the in-focus position A is collected almost on the microlens M (2, 2) as shown in FIG.

対象物14が遠点位置Cにある場合、対象物14からの光は、メインレンズ11を通して一旦集光された後、さらにデフォーカス状態になって広がってマイクロレンズ12上に入射する。したがって、図4(a)に示すように、マイクロレンズアレイ12上の入射光15は、マイクロレンズM(2,2)の周辺レンズM(1,2)、M(2,1)、M(2,3)、M(3,2)にまで広がる。   When the object 14 is located at the far point position C, the light from the object 14 is once condensed through the main lens 11, then further defocused and spread on the microlens 12. Therefore, as shown in FIG. 4A, the incident light 15 on the microlens array 12 is transmitted from the peripheral lenses M (1,2), M (2,1), M (M (2,2) of the microlens M (2,2). 2, 3) and M (3, 2).

対象物14が近点位置Bにある場合は、集光前のデフォーカス状態の光が、マイクロレンズ12上に入射する。したがって、図4(b)に示すように、マイクロレンズアレイ12上の入射光15は、マイクロレンズM(2,2)の周辺レンズM(1,2)、M(2,1)、M(2,3)、M(3,2)にまで広がる。   When the object 14 is at the near point position B, light in a defocused state before focusing is incident on the microlens 12. Therefore, as shown in FIG. 4B, the incident light 15 on the microlens array 12 is transmitted to the peripheral lenses M (1,2), M (2,1), M (M (2,2) of the microlens M (2,2). 2, 3) and M (3, 2).

撮像素子13上の入射光16について図5を用いて説明する。図5に示すように、撮像素子13は、複数の画素群からなる。各画素群には、番号T(i,j)が付されている。また、各画素群は、マイクロレンズの1つを通過した物体光を検出する。言い換えると、マイクロレンズM(i,j)を通過した光は、画素群T(i,j)に入射する。なお、図では、画素群が10×10の画素で構成されている場合を示しているが、画素群を構成する画素の数はこれに限られない。   The incident light 16 on the image sensor 13 will be described with reference to FIG. As shown in FIG. 5, the image sensor 13 includes a plurality of pixel groups. Each pixel group is assigned a number T (i, j). Each pixel group detects object light that has passed through one of the microlenses. In other words, the light that has passed through the microlens M (i, j) enters the pixel group T (i, j). In addition, although the figure has shown the case where a pixel group is comprised by the pixel of 10x10, the number of the pixels which comprise a pixel group is not restricted to this.

対象物14が合焦位置Aにある場合、図4(b)のようにほぼマイクロレンズM(2,2)上に集光された光が、撮像素子13に入射する。したがって、撮像素子13に入射する光は、図5(b)に示すように、撮像素子14の画素群T(2,2)に対して全面に広がる。   When the object 14 is at the in-focus position A, the light condensed on the microlenses M (2, 2) as shown in FIG. Therefore, the light incident on the image sensor 13 spreads over the entire surface of the pixel group T (2, 2) of the image sensor 14 as shown in FIG.

対象物14が遠点位置Cにある場合、マイクロレンズアレイ12上で、図4(a)のように周辺レンズM(1,2)、M(2,1)、M(2,3)、M(3,2)にも広がった光が、撮像素子13に入射する。これらの周辺レンズに入射した光は、撮像素子13上では、図5(a)に示すように、それぞれのマイクロレンズに対応する画素群T(1,2)、T(2,1)、T(2,3)、T(3,2)の一部に入射する。   When the object 14 is located at the far point position C, the peripheral lenses M (1,2), M (2,1), M (2,3), as shown in FIG. Light that has spread to M (3, 2) also enters the image sensor 13. As shown in FIG. 5A, the light incident on these peripheral lenses is pixel groups T (1,2), T (2,1), T corresponding to the respective microlenses, as shown in FIG. Incident on a part of (2, 3) and T (3, 2).

図5(c)は、近点位置Bに対象物14が位置する場合に、撮像素子13に入射する光の形状を示す図である。対象物が遠点位置Cにある場合と同様に、画素群T(1,2)、T(2,1)、T(2,3)、T(3,2)の一部にも光が入射する。   FIG. 5C is a diagram illustrating the shape of light incident on the image sensor 13 when the object 14 is located at the near point position B. FIG. Similarly to the case where the object is located at the far point position C, light is also emitted to a part of the pixel groups T (1,2), T (2,1), T (2,3), and T (3,2). Incident.

(3.画像の再構成について)
次に、本装置において距離情報を算出するための基本操作である、各仮想面での像の再構成について説明する。
(3. Image reconstruction)
Next, image reconstruction on each virtual plane, which is a basic operation for calculating distance information in this apparatus, will be described.

画像の再構成にあたっては、画像センサカメラ1で取得した画像データから、マイクロレンズへの物体光の入射方向の情報を得られるという点が重要である。画像データから入射方向の情報が得られることを、図5を再度用いて説明する。例えば、遠点位置Cにある対象物14からの光は、図5(a)に示すように、画素群T(2,2)を中心に、周囲の画素群T(1,2)、T(2,1)、T(2,3)、T(3,2)の中の外側の一部の決まった画素に入射する。また、逆に、近点位置Bにある対象物14からの光は、図5(c)に示すように、画素群T(2,2)を中心に、周囲の画素群T(1,2)、T(2,1)、T(2,3)、T(3,2)の中の内側の一部の決まった画素に入射する。このように各画素群に含まれる画素のうちどの画素に光が入射したかにより、各画素群に対応する位置に設置されたマイクロレンズへの物体光の入射方向の情報を得ることができる。   When reconstructing an image, it is important that information on the incident direction of the object light on the microlens can be obtained from the image data acquired by the image sensor camera 1. The fact that information on the incident direction can be obtained from the image data will be described with reference to FIG. 5 again. For example, as shown in FIG. 5A, the light from the object 14 at the far-point position C is centered on the pixel group T (2, 2), and the surrounding pixel groups T (1, 2), T The incident light is incident on some fixed pixels outside (2,1), T (2,3), and T (3,2). On the other hand, as shown in FIG. 5C, the light from the object 14 at the near point position B is centered on the pixel group T (2, 2), and the surrounding pixel group T (1, 2). ), T (2,1), T (2,3), and T (3,2) are incident on some fixed pixels inside. Thus, information on the incident direction of the object light to the microlens installed at the position corresponding to each pixel group can be obtained depending on which pixel among the pixels included in each pixel group is incident.

この入射方向の情報、仮想面の位置(仮想位置)、および、光学系のパラメータ(メインレンズ11とマイクロレンズアレイ12間の距離など)に基づき、撮像素子13が取得した画素データを並び替えることで、撮像素子13が仮想位置にある場合に取得されるべき画像データを取得することができる。   Based on the information on the incident direction, the position of the virtual plane (virtual position), and the parameters of the optical system (such as the distance between the main lens 11 and the microlens array 12), the pixel data acquired by the image sensor 13 is rearranged. Thus, it is possible to acquire image data to be acquired when the image sensor 13 is in a virtual position.

並び替えの具体例を図6を用いて説明する。図6は、対象物14の撮影像のデータを変換して得た再構成画像を示す図である。例えば、図6(a)は図5(a)に示した画像データから再構成した仮想面F上での光の分布を示したもので、図5(b)の合焦位置での光ビーム状態とほぼ同じになる。周囲の決まった画素に入射する光、すなわち、画素出力だけを集めて、画素群T(2,2)の中央付近の画素出力と足し合わせ、改めて画素群T(2,2)の出力とすることで、仮想面Fでの画像を作り出すことができる。一方、近点位置Bにある対象物(点像)に対しては、撮像素子13上での広がり(分割状態)は、図5(c)のように遠点状態とは異なるので、異なる演算(周囲画素群の内側の一部の画素出力を足し合わせる)により、同じく図6(c)の再構成像が生成できる。   A specific example of rearrangement will be described with reference to FIG. FIG. 6 is a diagram showing a reconstructed image obtained by converting data of a captured image of the object 14. For example, FIG. 6A shows the distribution of light on the virtual plane F reconstructed from the image data shown in FIG. 5A, and the light beam at the in-focus position in FIG. 5B. It becomes almost the same as the state. Only the light incident on the surrounding fixed pixels, that is, the pixel output is collected and added to the pixel output in the vicinity of the center of the pixel group T (2, 2) to be the output of the pixel group T (2, 2) again. Thus, an image on the virtual plane F can be created. On the other hand, for the object (point image) at the near point position B, the spread (division state) on the image sensor 13 is different from the far point state as shown in FIG. Similarly, the reconstructed image in FIG. 6C can be generated by adding together the pixel outputs inside the surrounding pixel group.

なお、ここでは対象物が点像の場合の例を示したが、大きさを有する対象物の場合にも、同様の操作で画像の再構成ができる。ただし、大きさを有する画像の場合、全てのマイクロレンズに光が入射するので、各マイクロレンズに対応する画素群T(1,1)〜T(3,3)に対して同様の操作を行う必要がある。   Although an example in which the object is a point image is shown here, an image can be reconstructed by a similar operation even in the case of an object having a size. However, in the case of an image having a size, since light is incident on all the microlenses, the same operation is performed on the pixel groups T (1,1) to T (3,3) corresponding to each microlens. There is a need.

対象物14が点像でない場合の再構成画像について、図7および図8を用いて説明する。図7は、矢印形状の対象物14が近点位置Bにある場合の集光の様子を示す図であり、図8は、図7中に示される仮想面で取得される画像を示す図である。   A reconstructed image in the case where the object 14 is not a point image will be described with reference to FIGS. 7 and 8. FIG. 7 is a diagram illustrating a state of light collection when the arrow-shaped object 14 is at the near point position B, and FIG. 8 is a diagram illustrating an image acquired on the virtual plane illustrated in FIG. is there.

対象物14が近点位置Bにあるため、ほぼ撮像素子13の位置にある仮想面Eにおける取得画像は図8(a)のようにボケた画像となる。しかし、仮想面をD1,D2,D3と変えていくと、それぞれの再構成画像は図8(b)、(c)、(d)のようになる。D3まで変えると、D3は位置Bに対する仮想面であるため、位置Bにある対象物のフォーカシングされた画像が得られる。   Since the object 14 is at the near point position B, the acquired image on the virtual plane E almost at the position of the image sensor 13 is a blurred image as shown in FIG. However, when the virtual plane is changed to D1, D2, and D3, the respective reconstructed images are as shown in FIGS. 8B, 8C, and 8D. When changing to D3, since D3 is a virtual plane with respect to position B, a focused image of the object at position B is obtained.

なお、図8の画像は、マイクロレンズアレイ12を通して取得した画像に相当するため、画像を拡大すると、図9に示すように、マイクロレンズ毎の画素群を1つの単位とした画像となっている。図9は、図8中に枠で囲った部分を拡大した画像を示す図である。   8 corresponds to an image acquired through the microlens array 12, and when the image is enlarged, as shown in FIG. 9, the pixel group for each microlens is an image as one unit. . FIG. 9 is a diagram showing an enlarged image of a portion surrounded by a frame in FIG.

このように、一度の撮像により得た撮像データを画像処理することにより、複数の仮想面での画像を再構成することができる。   As described above, by performing image processing on imaging data obtained by one imaging, images on a plurality of virtual planes can be reconstructed.

(4.選択領域の決定)
続いて、本発明の特徴である、処理対象となる領域の選択について説明する。図8、図9から分かるように、仮想面を変えた場合、エッジ部分(画像上の輝度変化が大きい部分)の画素には変化が現れるが、エッジ部分以外の領域には、ほとんど画像の変化は生じない。
(4. Determination of selection area)
Next, selection of a region to be processed, which is a feature of the present invention, will be described. As can be seen from FIGS. 8 and 9, when the virtual plane is changed, a change appears in the pixel in the edge portion (a portion where the luminance change on the image is large), but the image changes almost in the region other than the edge portion. Does not occur.

このことから、撮像画像のエッジ部分あるいはエッジ部分の近傍領域に含まれる画素のみを並び替えても、適切な再構成画像を得ることができる。このように、一部の領域の画素データを用いて画像の並び替えを行なえば、全領域について画像の再構成を行なうのに比べ、大幅に処理が高速化され、かつ、処理に必要な画像用メモリも少ない容量で済ませることができる。本発明はこの点に着目したものである。   Thus, an appropriate reconstructed image can be obtained even when only the pixels included in the edge portion of the captured image or in the vicinity region of the edge portion are rearranged. In this way, if the images are rearranged using the pixel data of a part of the area, the processing speed is greatly increased compared to the case where the image is reconstructed for the entire area, and the image necessary for the processing is also obtained. A small amount of memory can be used. The present invention focuses on this point.

さて、撮像画像上のエッジ部分を検出する方法を図10を用いて述べる。図10は、エッジ部分の検出について説明するための図である。撮像画像が図10(a)のようであったとする。領域選択部4dは、この画像に対して、エッジを検出するための空間フィルタを適用する。エッジ検出のための空間フィルタとして、隣接画素との差分を計算する一次微分フィルタがある。例えばsobelフィルタ、Robertsフィルタ等が提案されている。図10(a)に一次フィルタを施した結果を図10(b)に示す。この図では、隣接画素との差分が大きい部分ほど暗い色で示している。ここで、図10(b)の画像上の鎖線で示した部分の画素の値の分布を図10(c)に示す。大きな矢印のエッジ部分はほぼ合焦点であり、背景とのコントラストが大きいために差分値も大きく出ている。小さな矢印のエッジ部分は合焦点から外れて若干ボケが出ており、背景とのコントラストがあまり大きくないために差分値はやや小さく出ている。また、丸状の物体については全体にボケており、背景とのコントラストがあまりないため差分値も小さい。   Now, a method for detecting an edge portion on a captured image will be described with reference to FIG. FIG. 10 is a diagram for explaining detection of an edge portion. Assume that the captured image is as shown in FIG. The area selection unit 4d applies a spatial filter for detecting edges to this image. As a spatial filter for edge detection, there is a first-order differential filter that calculates a difference from adjacent pixels. For example, a sobel filter and a Roberts filter have been proposed. The result of applying the primary filter to FIG. 10 (a) is shown in FIG. 10 (b). In this figure, the darker the color, the greater the difference between adjacent pixels. Here, FIG. 10C shows a distribution of pixel values in a portion indicated by a chain line on the image of FIG. The edge portion of the large arrow is almost in focus and the difference value is large because the contrast with the background is large. The edge portion of the small arrow is slightly out of focus, and the difference value is slightly smaller because the contrast with the background is not so large. In addition, the round object is blurred as a whole, and the difference value is small because there is not much contrast with the background.

差分値はこのようにエッジと相関のある分布を示すため、ある閾値を設け、差分値画像に閾値処理を施すことによりエッジ領域を抽出することができる。例えば、閾値よりも大きい値を持つ部分をエッジとみなすものとする。閾値は目的に応じて適宜決めればよく、コントラストの強いエッジのみを検出するには閾値を大きく、逆に、コントラストの弱いエッジも検出するには閾値を小さく設定すればよい。エッジの分布を、撮像画像全てについて調べて検出されたエッジを示したものが図10(d)である。   Since the difference value indicates a distribution correlated with the edge in this way, an edge region can be extracted by providing a certain threshold value and performing threshold value processing on the difference value image. For example, a portion having a value larger than the threshold value is regarded as an edge. The threshold value may be appropriately determined according to the purpose, and the threshold value may be set large to detect only edges with high contrast, and conversely, the threshold value should be set small to detect edges with low contrast. FIG. 10D shows the edges detected by examining the distribution of edges for all the captured images.

画像の再構成を行うには、選択領域は、検出されたエッジに加えて、エッジの近傍領域を含むことが好ましい。エッジを中心とした領域は、遠点、近点による光の分布を含むからである。この領域は、光学系によって変わるため適宜設定する必要があるが、通常は、マイクロレンズ毎の画素群を1つの単位とした時、エッジを中心とした数画素群の領域である。例えば、エッジの位置座標を(xedge,yedge)、x方向、y方向の画素群の長さをそれぞれx,yとして、xedge−sx≦x≦xedge+tx、yedge−uy≦x≦yedge+vyを満たす(x,y)の集合を選択領域とする。ここで、s、t、u、vは正の整数である。なお、通常はs=t=u=vととる。 In order to perform image reconstruction, it is preferable that the selected region includes a region near the edge in addition to the detected edge. This is because the region centered on the edge includes the light distribution by far points and near points. Since this region varies depending on the optical system, it is necessary to set it appropriately. Usually, however, when the pixel group for each microlens is used as one unit, it is a region of several pixel groups centered on the edge. For example, the position coordinates of the edge (x edge, y edge), x -direction, x the length of the pixel group in the y-direction, respectively p, as y p, x edge -sx p ≦ x ≦ x edge + tx p, y edge A set of (x, y) satisfying −uy p ≦ x ≦ y edge + by p is set as a selection region. Here, s, t, u, and v are positive integers. In general, s = t = u = v.

図10(e)の網掛け部分は、図10(d)のエッジに対応して選択された領域である。図10(a)上で図10(e)の領域部分を切り取ることで、図10(f)のような選択領域画像を得ることができる。   The shaded portion in FIG. 10E is an area selected corresponding to the edge in FIG. A selected region image as shown in FIG. 10F can be obtained by cutting out the region portion of FIG. 10E on FIG.

ただし、図10(e)、図10(f)は、あくまで選択領域のイメージを示す図であって、厳密には、選択領域の形は、これらの図のようにはならず、図11のようになる。図11は、エッジと選択領域の関係を示した図である。この図は、選択領域が、xedge−x≦x≦xedge+x、yedge−y≦x≦yedge+yを満たす(x,y)の集合である場合に対応する。図11中の近傍領域とエッジ部分とを合わせた部分が選択領域となる。 However, FIG. 10 (e) and FIG. 10 (f) are diagrams only showing an image of the selection region. Strictly speaking, the shape of the selection region is not as shown in these drawings. It becomes like this. FIG. 11 is a diagram showing the relationship between edges and selected areas. This figure selection area corresponds to the case where a set of x edge -x p ≦ x ≦ x edge + x p, satisfies the y edge -y p ≦ x ≦ y edge + y p (x, y). A portion obtained by combining the vicinity region and the edge portion in FIG. 11 becomes the selection region.

また、以上では、画像データ全体から選択領域を決定する場合を示したが、画像データ中の設定された領域(以下、処理領域とよぶ)から選択領域を決定してもよい。処理領域は、例えば、ユーザの指示に応じて決定される。この構成によれば、ユーザがモニタ5に表示された画像データを確認し処理領域を決定することで、計算量を削減でき、処理を高速化できる。   In the above description, the selection area is determined from the entire image data. However, the selection area may be determined from a set area (hereinafter referred to as a processing area) in the image data. The processing area is determined according to a user instruction, for example. According to this configuration, when the user confirms the image data displayed on the monitor 5 and determines the processing area, the amount of calculation can be reduced and the processing speed can be increased.

なお、処理領域を選択する場合には、一繋がりのエッジを分断するような選択は好ましくない。この理由を図12を用いて説明する。図12は、一繋がりのエッジの分断について説明するための図である。図12(a)のような画像があるとする。この画像のエッジを検出した結果、図12(b)の画像を得たとする。この画像上のエッジの一部(四角で囲んだ部分)の拡大図を図12(c)に示す。   When selecting a processing region, it is not preferable to select a connection edge. The reason for this will be described with reference to FIG. FIG. 12 is a diagram for explaining division of a single edge. Assume that there is an image as shown in FIG. Assume that the image shown in FIG. 12B is obtained as a result of detecting the edge of the image. FIG. 12C shows an enlarged view of a part of the edge (the part surrounded by a square) on the image.

図12(b)の画像について領域を選択する際に、図12(d)に示すような画像のエッジを分断する処理領域Rを選んだとする。また、図12(d)中の四角で囲んだ部分の拡大図を図12(e)に示す。処理領域Rを選択した場合、図12(e)のGの部分の画素群については、斜め右下方向および下方向の光の分布を含む領域の情報が失われてしまう。したがって、エッジを分断する領域を選択することは、再構成に好ましくない。以上より、領域の選択時には、エッジを途中で分断することなく、一繋がりのエッジを含む領域であることが好ましい。一繋がりのエッジを含む領域を選択するには、例えば、検出されたエッジ領域をすべて含むように領域を選択すればよい。   Assume that when selecting an area for the image in FIG. 12B, a processing area R for dividing the edge of the image as shown in FIG. 12D is selected. FIG. 12E shows an enlarged view of a portion surrounded by a square in FIG. When the processing region R is selected, information on the region including the light distribution in the diagonally lower right direction and the downward direction is lost for the pixel group in the G portion in FIG. Therefore, it is not preferable for reconstruction to select a region where the edge is divided. As described above, when selecting a region, it is preferable that the region includes a continuous edge without dividing the edge in the middle. In order to select a region including a continuous edge, for example, a region may be selected so as to include all detected edge regions.

しかしながら、予め距離情報の検出が必要な領域が決まっているのであれば、エッジを分断するような領域を選択しても構わない。図12(e)を用いて説明すると、Gの部分の距離情報が不要ならば、処理領域Rを選択してもよい。このような領域選択を行い必要な領域のみ処理することで、全体の処理時間を短縮できる。   However, if an area where distance information needs to be detected is determined in advance, an area that divides the edge may be selected. If it demonstrates using FIG.12 (e), if the distance information of the part of G is unnecessary, you may select the process area | region R. FIG. By performing such region selection and processing only necessary regions, the entire processing time can be shortened.

なお、ここに記した一連の処理は、領域選択部4dで行う。
(5.距離情報の取得方法について)
次に、上記の方法により選択された領域について、仮想面の画像を再構成し、さらに画像の中の対象物の距離情報(3次元情報)を取得する方法について、図13を参照しつつ説明する。図13は、距離情報の取得の各工程で生成される画像データについて説明するための図である。
The series of processing described here is performed by the region selection unit 4d.
(5. How to get distance information)
Next, a method for reconstructing an image of a virtual surface for a region selected by the above method and further acquiring distance information (three-dimensional information) of an object in the image will be described with reference to FIG. To do. FIG. 13 is a diagram for explaining image data generated in each process of obtaining distance information.

距離情報の取得にあたっては、まず、画像センサカメラ1により、対象物の画像データを取得する。取得された画像データは、画像キャプチャーボード2を介してメモリ3に記憶される。そして、画像処理部4に含まれる領域選択部4dは、上に説明した方法により、選択領域を決定する。この画像データを、図13(a)に示すようにf(i,j)とする。   In acquiring distance information, first, image data of the object is acquired by the image sensor camera 1. The acquired image data is stored in the memory 3 via the image capture board 2. Then, the area selection unit 4d included in the image processing unit 4 determines the selection area by the method described above. This image data is assumed to be f (i, j) as shown in FIG.

その後、画像処理部4は、画像データf(i、j)を処理することにより、対象物の距離情報を取得する。この処理は大きく、「再構成ステップ」、「輝度情報算出ステップ」、「距離情報算出ステップ」に分かれる。以下、それぞれの処理について説明する。   Thereafter, the image processing unit 4 processes the image data f (i, j) to obtain distance information of the object. This process is largely divided into “reconstruction step”, “luminance information calculation step”, and “distance information calculation step”. Hereinafter, each processing will be described.

(1)再構成ステップ
画像処理部4に含まれる再構成部4aは、画像データf(i,j)を並び替えて、図13(b)に示すようなN個の仮想面での再構成画像データgn(i,j)を生成する。ここでn(n=1〜N)は仮想面の順番を示す。この並び替えを、焦点面変換係数An(n=1〜N)を用いて、gn(i,j)=An(f(i,j))と表すことにする。ここで、Anは、各画素群における物体光を検出した画素の位置により定まる各マイクロレンズへの物体光の入射方向、仮想位置、および、光学系のパラメータに基づいて決定されるものである。
(1) Reconstruction Step The reconstruction unit 4a included in the image processing unit 4 rearranges the image data f (i, j), and reconstructs on N virtual planes as shown in FIG. 13B. Image data gn (i, j) is generated. Here, n (n = 1 to N) indicates the order of the virtual surfaces. This rearrangement is expressed as gn (i, j) = An (f (i, j)) using the focal plane conversion coefficient An (n = 1 to N). Here, An is determined based on the incident direction of the object light on each microlens determined by the position of the pixel that detected the object light in each pixel group, the virtual position, and the parameters of the optical system.

なお、再構成部4aは、例えば、特に限られるわけではないが、本実施例においては予め定められた間隔で並んだ複数の仮想位置に対して再構成画像データを取得するものとする。また、再構成部4aは、以下で述べる方法で焦点の合った仮想位置が算出された場合、焦点の合った仮想位置近傍では、仮想位置の間隔をさらに狭くして、狭い間隔の仮想位置に対して再構成画像を取得してもよい。この構成によれば、距離検出の精度を高めることができる。   Note that, for example, the reconstruction unit 4a is not particularly limited, but in the present embodiment, the reconstruction unit 4a acquires reconstruction image data for a plurality of virtual positions arranged at predetermined intervals. In addition, when the in-focus virtual position is calculated by the method described below, the reconstruction unit 4a further narrows the interval between the virtual positions near the in-focus virtual position so that the virtual position is narrow. On the other hand, a reconstructed image may be acquired. According to this configuration, the accuracy of distance detection can be increased.

このステップでは、1個の画像データf(i,j)が、図13(b)に示すようなN個の再構成画像データ、すなわち、g01(i,j)=An(f(i,j))、g02(i,j)=An(f(i,j))、…、gn(i,j)=An(f(i,j))、…、gN(i,j)=An(f(i,j))が得られる。 In this step, one image data f (i, j) is converted into N pieces of reconstructed image data as shown in FIG. 13B, that is, g 01 (i, j) = An (f (i, j j)), g 02 (i, j) = An (f (i, j)),..., gn (i, j) = An (f (i, j)),..., gN (i, j) = An (f (i, j)) is obtained.

(2)輝度情報算出ステップ
輝度情報算出部4bは、再構成画像データgn(i,j)から、輝度に関連する輝度情報を算出する。ここで、輝度情報とは、具体的には、輝度の差分値に関する情報である。この輝度に関する情報の算出は、以下の手順で行なわれる。
(2) Luminance information calculation step The luminance information calculation unit 4b calculates luminance information related to the luminance from the reconstructed image data gn (i, j). Here, the luminance information is specifically information related to a luminance difference value. The calculation of information relating to luminance is performed according to the following procedure.

まず、輝度情報算出部4bは、各再構成画像データgn(i,j)に対して、図13(c)に示すような各画素群を一様輝度を有する画素に変換した画像データhn(i’,j’)を生成する。ここで、一様輝度は、各画素群に含まれる画素の輝度と対応する輝度であればよい。例えば、輝度情報算出部4bは、一様輝度として、各画素群に含まれる画素の輝度の平均値、あるいは輝度の総和を算出する。   First, the luminance information calculation unit 4b converts image data hn () obtained by converting each pixel group as shown in FIG. 13C into pixels having uniform luminance for each reconstructed image data gn (i, j). i ′, j ′). Here, the uniform luminance may be a luminance corresponding to the luminance of the pixels included in each pixel group. For example, the luminance information calculation unit 4b calculates the average value of the luminance of the pixels included in each pixel group or the total luminance as the uniform luminance.

本実施例では、m×m個の画素からなる画素群が、一様な輝度を有する1つの画素に変換(平均化)されるものとする。この変換は、平均化係数をBnとして、hn(i’,j’)=Bn(gn(i,j))と表される。   In this embodiment, it is assumed that a pixel group composed of m × m pixels is converted (averaged) into one pixel having uniform luminance. This conversion is expressed as hn (i ′, j ′) = Bn (gn (i, j)) where Bn is an averaging coefficient.

平均化処理の具体例を図14を用いて説明する。図14は、図9に示す画像に対し平均化処理を行った場合の画素群の輝度分布を示す図である。図14(a)〜(d)はそれぞれ図9(a)〜(d)の輝度分布を画素群内で平均化処理したものである。   A specific example of the averaging process will be described with reference to FIG. FIG. 14 is a diagram showing the luminance distribution of the pixel group when the averaging process is performed on the image shown in FIG. FIGS. 14A to 14D are obtained by averaging the luminance distributions of FIGS. 9A to 9D in the pixel group.

本ステップにより、処理対象となるデータ量を1/mに削減できる。そのため、以降の処理の画像処理速度が大幅に向上する。ただし、この処理は、必須ではない。 With this step, the amount of data to be processed can be reduced to 1 / m 2 . Therefore, the image processing speed of the subsequent processing is greatly improved. However, this process is not essential.

次に、輝度情報算出部4cは、各再構成画像について、画素間の輝度の差分値を計算する。上述の平均化処理が行なわれている場合、輝度情報算出部4cは、各画像データhn(i’,j’)において、各画素群について隣接画素群との輝度の差分値を計算し、図13(d)に示すような差分値画像データkn(i’,j’)を作成する。hnとknとの関係を、差分値変換係数をCnとして、kn(i’,j’)=Cn(h(i’,j’))と表すことにする。ここで、差分値変換係数Cnは、例えば、一般的に用いられているRoberts法と呼ばれるエッジ検出法を利用する場合には、(i’,j’)の画素群に対して、x方向の微分値dx=h(i',j’)−h(i'+1,j’+1)、y方向の微分値dy=h(i'+1,j’)−h(i',j’+1)を用いて、(dx+dy1/2で与えられる。ただし、差分値変換係数としては、これに限ることなく、単純な微分法、Sobel法や2次微分を用いるラプラシアン法など様々なフィルタ窓を設定することができる。図13(d)に示すように、N枚の差分値画像が作成される。 Next, the luminance information calculation unit 4c calculates a luminance difference value between pixels for each reconstructed image. When the above-described averaging process is performed, the luminance information calculation unit 4c calculates a luminance difference value between each pixel group and the adjacent pixel group in each image data hn (i ′, j ′). Difference value image data kn (i ′, j ′) as shown in 13 (d) is created. The relationship between hn and kn is expressed as kn (i ′, j ′) = Cn (h (i ′, j ′)), where Cn is the difference value conversion coefficient. Here, the difference value conversion coefficient Cn is, for example, in the x direction with respect to the pixel group of (i ′, j ′) when using a generally used edge detection method called the Roberts method. Differential value dx = h (i ′, j ′) − h (i ′ + 1, j ′ + 1), y-direction differential value dy = h (i ′ + 1, j ′) − h (i ′, j ′ + 1) And (dx 2 + dy 2 ) 1/2 . However, the difference value conversion coefficient is not limited to this, and various filter windows such as a simple differentiation method, a Sobel method, and a Laplacian method using a secondary differentiation can be set. As shown in FIG. 13D, N difference value images are created.

なお、上述の平均化処理を行なっていない場合には、輝度情報算出部4bは、単純に、各再構成画像の各画素について、隣接する画素との輝度値の差分を計算し、差分値画像データを取得する。   When the above-described averaging process is not performed, the luminance information calculation unit 4b simply calculates a difference in luminance value between adjacent pixels for each pixel of each reconstructed image, and calculates a difference value image. Get the data.

(3)距離情報算出ステップ
距離情報算出部4cは、輝度情報算出ステップで得られた情報に基づき、次の手順で、対象物の距離情報を算出する。
(3) Distance information calculation step The distance information calculation unit 4c calculates the distance information of the object in the following procedure based on the information obtained in the luminance information calculation step.

まず、距離情報算出部4cは、差分値画像データに基づき、複数の再構成画像に共通の各画素位置 p=(i’,j’) での差分値強度の最大値を検出し、その最大値が検出されるn値(以後、代表値と呼ぶ)を求め、図13(e)に示すような代表値画像データs(i’,j’)を生成する。すなわち、各p=(i’,j’)においてkn(i’,j’)〜kN(i’,j’)を最大とするnの値をs(i’,j’)とおく。図9あるいは図14で示すように、合焦位置での画像において、最もエッジ部の画素群輝度変化が大きい。よってエッジ強度値が最大となる仮想面の位置が合焦状態を示していると判定できる。このことを利用して、対象物までの距離を算出することができる。   First, the distance information calculation unit 4c detects the maximum value of the difference value intensity at each pixel position p = (i ′, j ′) common to a plurality of reconstructed images based on the difference value image data, and the maximum An n value (hereinafter referred to as a representative value) from which a value is detected is obtained, and representative value image data s (i ′, j ′) as shown in FIG. 13E is generated. That is, the value of n that maximizes kn (i ′, j ′) to kN (i ′, j ′) at each p = (i ′, j ′) is set as s (i ′, j ′). As shown in FIG. 9 or FIG. 14, the pixel group luminance change at the edge portion is the largest in the image at the in-focus position. Therefore, it can be determined that the position of the virtual surface having the maximum edge strength value indicates the in-focus state. Using this fact, the distance to the object can be calculated.

あるいは、差分値分布の近似曲線から、代表値を求めてもよい。この求め方を図15を用いて説明する。図15は、差分値分布の近似曲線から代表値を求める方法を説明するための図である。図15(a)は、異なる距離に配置されている2つの対象物の再構成像を示す図である。図15(b)は、図15(a)に示した各対象物のエッジ付近の画素位置(14A、15B)における差分値強度を、仮想面の位置(n値)について、プロットしたものである。各対象物に対して、画素位置(i',j')において、n値についてプロットした差分値強度の近似曲線を求め、近似曲線のピークのn値(図15(b)中のn1、n2)を、代表値s(i',j')として求める。この代表値は対象物の像にピントが合っている仮想面の位置を示している。   Alternatively, the representative value may be obtained from an approximate curve of the difference value distribution. This finding method will be described with reference to FIG. FIG. 15 is a diagram for explaining a method of obtaining the representative value from the approximate curve of the difference value distribution. FIG. 15A is a diagram showing a reconstructed image of two objects arranged at different distances. FIG. 15B is a plot of the difference value intensity at the pixel position (14A, 15B) near the edge of each object shown in FIG. 15A with respect to the position (n value) of the virtual plane. . For each object, an approximate curve of difference value intensities plotted with respect to the n value is obtained at the pixel position (i ′, j ′), and the n value of the peak of the approximate curve (n1, n2 in FIG. 15B). ) As a representative value s (i ′, j ′). This representative value indicates the position of the virtual plane in focus on the image of the object.

最後に、距離情報算出部4cは、各画素位置において最大差分値強度が得られる代表値画像s(i’,j’)を、既知の光学系の倍率データ等を用いて、距離情報検出装置から対象物までの絶対距離d(i’,j’)に変換し、図13(f)に示すような最終的な距離画像データ d(i’,j’)を生成する。   Lastly, the distance information calculation unit 4c uses a distance information detection device to obtain a representative value image s (i ′, j ′) from which the maximum difference value intensity is obtained at each pixel position using magnification data of a known optical system. Is converted into an absolute distance d (i ′, j ′) from the object to the object to generate final distance image data d (i ′, j ′) as shown in FIG.

本願発明が行なう処理の流れを図16を用いて説明する。図16は本願発明が行なう処理を説明するためのフローチャートである。   The flow of processing performed by the present invention will be described with reference to FIG. FIG. 16 is a flowchart for explaining processing performed by the present invention.

まず、画像処理装置4は、ステップS101において、画像データを取得する。この画像データは、画像センサ1により対象物を1回撮影することにより得られる。   First, the image processing apparatus 4 acquires image data in step S101. This image data is obtained by photographing the object once by the image sensor 1.

次に、画像処理装置4は、ステップS102において、画像データから、エッジ領域を抽出する。   Next, in step S102, the image processing apparatus 4 extracts an edge region from the image data.

そして、画像処理装置4は、ステップS103において、画像データから、エッジ領域を含む選択領域を決定する。   In step S103, the image processing apparatus 4 determines a selection area including an edge area from the image data.

続いて、画像処置装置4は、ステップS104において、選択領域中の画像データを並び替え、複数の仮想位置について再構成画像を作成する。   Subsequently, in step S104, the image processing device 4 rearranges the image data in the selected region, and creates reconstructed images for a plurality of virtual positions.

そして、画像処理装置4は、ステップS105において、各画素群の平均化を行なう。すなわち、各画素群を一様輝度を有する画素に変換する。ただし、このステップは必須ではない。   In step S105, the image processing apparatus 4 averages each pixel group. That is, each pixel group is converted into a pixel having uniform luminance. However, this step is not mandatory.

そして、画像処理装置4は、ステップS106において、再構成画像データから差分値画像データを作成する。   In step S106, the image processing apparatus 4 creates difference value image data from the reconstructed image data.

さらに、画像処理装置4は、ステップS107において、差分値画像データから、代表値データを作成する。   Further, in step S107, the image processing device 4 creates representative value data from the difference value image data.

そして、画像処理装置4は、ステップS108において、光学系の倍率より、代表値データを対象物の距離データに変換し、距離データを作成する。   In step S108, the image processing apparatus 4 converts the representative value data into the distance data of the object based on the magnification of the optical system, and creates distance data.

上記距離情報算出アルゴリズムにより、単一の撮像データから画像処理により、異なるフォーカシング状態(仮想面)の複数の画像を生成し、そのデータより対象物の距離画像を得ることができる。また、奥行き方向の前後の位置関係や、対象物の異なるエッジの距離情報から傾きや姿勢を求めることも可能である。   With the distance information calculation algorithm, a plurality of images in different focusing states (virtual planes) can be generated from a single image data by image processing, and a distance image of the object can be obtained from the data. It is also possible to obtain the tilt and posture from the positional relationship before and after in the depth direction and the distance information of different edges of the object.

非特許文献1に記載されているような従来のプレノプティックカメラとしては、設定した距離にピントを合せた画像は再構成できるが、画像の対象物の距離情報を求めることはできなかった。これに対し、本発明では、距離情報を算出することができる。   As a conventional plenoptic camera as described in Non-Patent Document 1, an image focused on a set distance can be reconstructed, but distance information of the object of the image cannot be obtained. . On the other hand, distance information can be calculated in the present invention.

また、特許文献1のようにステージ等で対象物の高さを変化させて、オートフォーカシングを行った後、複数枚の画像を取得し、それらの輝度情報に基づいて、高さ情報を求める方法に対して、本発明の方法は、カメラレンズのフォーカシング機構やステージなどの移動機構が不要となるため、小型かつ低コストである。   Further, as in Patent Document 1, after autofocusing is performed by changing the height of an object on a stage or the like, a plurality of images are acquired, and height information is obtained based on the luminance information. In contrast, the method of the present invention eliminates the need for a camera lens focusing mechanism and a moving mechanism such as a stage, and is therefore small and low-cost.

しかも一度の撮像操作で取得した画像データから距離データを算出できるため、カメラや対象物の複数回の移動時間や撮影時間または移動に伴う各画像のマッチング操作などの時間が不要となり、大幅な測定時間短縮も可能となる。1つの取得画像から複数の再構成画像を生成する操作については、シリアルに処理する必要はなくパラレルに合成できるため、複数回の撮影時間が省略でき、高速測定に有利である。   In addition, since distance data can be calculated from image data acquired by a single imaging operation, the time required to move the camera or object multiple times, the shooting time, or the matching operation of each image associated with the movement is not required, making significant measurements. Time can also be shortened. The operation for generating a plurality of reconstructed images from one acquired image can be combined in parallel without the need for serial processing, so that a plurality of shooting times can be omitted, which is advantageous for high-speed measurement.

特に、本発明は、画像データからエッジを抽出し、エッジを含む領域に対し、距離データを求めるので、大幅に処理を高速化できる。また、処理に必要な画像用メモリも少ない容量で済ませることができる。   In particular, according to the present invention, since the edge is extracted from the image data and the distance data is obtained for the region including the edge, the processing can be greatly speeded up. Also, the image memory required for processing can be reduced with a small capacity.

さらに、本光学系は、撮像素子のごく近傍にマイクロレンズアレイを組み込む構成なので、従来の画像センサカメラとほぼ同サイズであるため、広くFA用途としてロボットなどの視覚センサに用いられている2次元画像センサカメラとほぼ同じ外径サイズに収まるため、従来カメラとの互換性(置換え)が高い。   Furthermore, since this optical system is configured to incorporate a microlens array in the immediate vicinity of the image sensor, it is almost the same size as a conventional image sensor camera, so it is widely used in visual sensors such as robots for FA applications. Because it fits in the same outer diameter size as the image sensor camera, compatibility (replacement) with conventional cameras is high.

また、本方法では、撮像素子の画素単位ではなく、1つのマイクロレンズに対応する複数の画素から構成される画素群単位での輝度情報を用いることで、距離情報の算出にあたっての計算回数、処理時間を短縮することができる。   In addition, in this method, the number of calculations and processing for calculating distance information are performed by using luminance information in units of pixels composed of a plurality of pixels corresponding to one microlens instead of in units of pixels of the image sensor. Time can be shortened.

今回開示された実施の形態はすべての点で例示であって制限的なものではない。本発明の範囲は上記した実施の形態ではなくて特許請求の範囲によって示され、特許請求の範囲と均等な意味および範囲内でのすべての変更点が含まれることが意図される。   The embodiments disclosed herein are illustrative and non-restrictive in every respect. The scope of the present invention is shown not by the above-described embodiment but by the scope of claims, and is intended to include all modifications within the meaning and scope equivalent to the scope of claims.

本発明は、カメラを用いた距離測定に関し、例えば、製造ライン等における機械部品の3次元的な位置、姿勢、形状の計測、または製品の外形形状などの検査に用いられる。   The present invention relates to distance measurement using a camera, and is used, for example, for measuring a three-dimensional position, posture, and shape of a machine part in a production line or the like, or for inspecting an outer shape of a product.

本発明の実施の形態に係る距離情報検出装置の概略構成図である。It is a schematic block diagram of the distance information detection apparatus which concerns on embodiment of this invention. 画像センサカメラ1の光学系を示す図である。1 is a diagram illustrating an optical system of an image sensor camera 1. FIG. 対象物14が近点位置Bまたは遠点位置Cにある場合の集光の様子を示す図である。It is a figure which shows the mode of condensing in case the target object 14 exists in the near point position B or the far point position C. マイクロレンズアレイ12上の入射光15の形状を示す図である。It is a figure which shows the shape of the incident light 15 on the micro lens array 12. FIG. 撮像素子13上の入射光16の形状を示す図である。It is a figure which shows the shape of the incident light 16 on the image pick-up element 13. FIG. 対象物14の撮影像のデータを変換して得た再構成画像を示す図である。It is a figure which shows the reconstruction image obtained by converting the data of the picked-up image of the target object. 矢印形状の対象物14が近点側Bある場合の集光の様子を示す図である。It is a figure which shows the mode of condensing in case the arrow-shaped target object 14 exists in the near point side B. FIG. 図7中に示される仮想面で取得される画像を示す図である。It is a figure which shows the image acquired by the virtual surface shown in FIG. 図8中に枠で囲った部分を拡大した画像を示す図である。It is a figure which shows the image which expanded the part enclosed with the frame in FIG. エッジ部分の検出について説明するための図である。It is a figure for demonstrating the detection of an edge part. エッジと選択領域の関係を示した図である。It is the figure which showed the relationship between an edge and a selection area. 一繋がりのエッジの分断について説明するための図である。It is a figure for demonstrating the division | segmentation of one edge. 距離情報の取得の各工程で生成される画像データについて説明するための図である。It is a figure for demonstrating the image data produced | generated at each process of acquisition of distance information. 図9に示す画像に対し平均化処理を行った場合の画素群の輝度分布を示す図である。It is a figure which shows the luminance distribution of a pixel group at the time of performing the averaging process with respect to the image shown in FIG. 差分値分布の近似曲線から代表値を求める方法を説明するための図である。It is a figure for demonstrating the method of calculating | requiring a representative value from the approximated curve of difference value distribution. 本願発明が行なう処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process which this invention performs. 共焦点顕微鏡の原理を用いた高さ情報測定装置の構成を示す図である。It is a figure which shows the structure of the height information measuring apparatus using the principle of a confocal microscope. 共焦点顕微鏡の原理を用いた高さ情報測定装置による試料の高さ情報の検出アルゴリズムを説明する図である。It is a figure explaining the detection algorithm of the sample height information by the height information measuring device using the principle of a confocal microscope.

符号の説明Explanation of symbols

1 画像センサカメラ、2 画像キャプチャボード、3 メモリ、4 画像処理部、4a 再構成部、4b 輝度情報算出部、4c 距離情報算出部、4d 領域選択部、5 表示モニタ、11 撮像レンズ、12 マイクロレンズアレイ、13 撮像素子、14 対象物、15 マイクロレンズアレイ12上の入射光、16 撮像素子13上の入射光。   1 image sensor camera, 2 image capture board, 3 memory, 4 image processing unit, 4a reconstruction unit, 4b luminance information calculation unit, 4c distance information calculation unit, 4d region selection unit, 5 display monitor, 11 imaging lens, 12 micro Lens array, 13 Image sensor, 14 Object, 15 Incident light on microlens array 12, 16 Incident light on image sensor 13

Claims (7)

対象物までの距離を測定するための距離測定装置であって、
対象物からの物体光を集光する撮像レンズと、前記撮像レンズを通過した前記物体光が入射する複数の集光器からなる集光アレイと、前記集光アレイを通過した前記物体光の画像データを取得する撮像素子とを含むカメラを備え、
前記撮像素子は、複数の画素を有し、前記複数の画素は、前記集光器の1つを通過した前記物体光を検出する複数の画素群に分割されており、
前記画像データからエッジを抽出し、前記エッジの少なくとも一部を含む領域を選択する領域選択手段と、
前記選択された領域において、各前記画素群における前記物体光を検出した前記画素の位置により定まる前記物体光の前記集光器への入射方向に基づき前記複数の画素を並び替えて、前記撮像素子が複数の仮想位置の各々に位置する場合に得られるべき前記選択された領域の再構成画像を生成する再構成手段と、
前記複数の再構成画像の各々について、各前記画素と当該画素近傍の画素との間の前記輝度の差分値を算出する差分値算出手段と、
前記複数の再構成画像に共通の各画素位置に対して、前記差分値が最大である前記画素を有する前記再構成画像に対応する前記仮想位置を特定し、前記カメラの光学系のパラメータに基づき前記特定された前記仮想位置を変換し前記距離を算出する距離算出手段とを備える、距離測定装置。
A distance measuring device for measuring a distance to an object,
An imaging lens that condenses object light from a target, a condensing array that includes a plurality of condensers on which the object light that has passed through the imaging lens is incident, and an image of the object light that has passed through the condensing array A camera including an image sensor for acquiring data;
The imaging device has a plurality of pixels, and the plurality of pixels are divided into a plurality of pixel groups that detect the object light that has passed through one of the condensers,
An area selecting means for extracting an edge from the image data and selecting an area including at least a part of the edge;
In the selected region, the plurality of pixels are rearranged based on the incident direction of the object light to the condenser determined by the position of the pixel that detected the object light in each pixel group, and the imaging element Reconstructing means for generating a reconstructed image of the selected region to be obtained when is located at each of a plurality of virtual positions;
For each of the plurality of reconstructed images, difference value calculating means for calculating a difference value of the luminance between each of the pixels and pixels in the vicinity of the pixel;
For each pixel position common to the plurality of reconstructed images, the virtual position corresponding to the reconstructed image having the pixel having the maximum difference value is specified, and based on the parameters of the optical system of the camera A distance measuring device comprising: distance calculating means for converting the identified virtual position and calculating the distance.
前記領域選択手段は、前記画像データの中から処理領域を決定し、前記処理領域中のエッジを含む領域を選択する、請求項1に記載の距離測定装置。   The distance measuring device according to claim 1, wherein the region selecting unit determines a processing region from the image data and selects a region including an edge in the processing region. 前記領域選択手段は、一繋がりの前記エッジを含む領域を前記処理領域として決定する、請求項2に記載の距離測定装置。   The distance measuring device according to claim 2, wherein the region selecting unit determines a region including a continuous edge as the processing region. 前記画像データに含まれる前記エッジ全体を含む領域を前記処理領域として決定する、請求項3に記載の距離測定装置。   The distance measuring device according to claim 3, wherein an area including the entire edge included in the image data is determined as the processing area. 前記領域選択手段は、前記処理領域中のエッジおよび前記処理領域中のエッジの近傍領域を選択する、請求項2から4のいずれか1項に記載の距離測定装置。   5. The distance measuring device according to claim 2, wherein the region selecting unit selects an edge in the processing region and a region near the edge in the processing region. 6. 前記領域選択手段は、前記エッジからの距離が設定された値以下の領域を前記近傍領域として決定する、請求項5に記載の距離測定装置。   The distance measuring device according to claim 5, wherein the region selecting unit determines a region whose distance from the edge is equal to or less than a set value as the neighboring region. 対象物までの距離を測定するための距離測定方法であって、
撮像レンズと複数の集光器からなる集光アレイとを通過した前記対象物からの物体光の画像データを、複数の画素を有し、前記複数の画素は、前記集光器の1つを通過した前記物体光を検出する複数の画素群に分割されている撮像素子で取得するステップと、
前記画像データからエッジを抽出するステップと、
前記エッジ部分を含む領域を選択するステップと、
前記選択された領域において、各前記画素群における前記物体光を検出した前記画素の位置により定まる前記物体光の前記集光器への入射方向に基づき前記複数の画素を並び替えて、前記撮像素子が複数の仮想位置の各々に位置する場合に得られるべき前記選択された領域の再構成画像を生成するステップと、
前記再構成画像の各々について、各前記画素と当該画素近傍の画素との間の前記輝度の差分値を算出するステップと、
前記複数の再構成画像に共通の各画素位置に対して、前記差分値が最大である前記画素を有する前記再構成画像に対応する前記仮想位置を特定するステップと、
前記カメラの光学系のパラメータに基づき前記特定された前記仮想位置を変換し前記距離を算出するステップとを備える、距離測定方法。
A distance measurement method for measuring a distance to an object,
The image data of the object light from the object that has passed through the imaging lens and a light collecting array including a plurality of light collectors has a plurality of pixels, and the plurality of pixels includes one of the light collectors. Acquiring with an imaging device that is divided into a plurality of pixel groups that detect the object light that has passed; and
Extracting an edge from the image data;
Selecting a region including the edge portion;
In the selected region, the plurality of pixels are rearranged based on the incident direction of the object light to the condenser determined by the position of the pixel that detected the object light in each pixel group, and the imaging element Generating a reconstructed image of the selected region to be obtained when is located at each of a plurality of virtual locations;
For each of the reconstructed images, calculating a difference value of the brightness between each of the pixels and a pixel near the pixel;
Identifying the virtual position corresponding to the reconstructed image having the pixel with the largest difference value for each pixel position common to the plurality of reconstructed images;
Converting the identified virtual position based on a parameter of an optical system of the camera and calculating the distance.
JP2008056385A 2008-03-06 2008-03-06 Distance measuring instrument and distance measuring method Withdrawn JP2009210520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008056385A JP2009210520A (en) 2008-03-06 2008-03-06 Distance measuring instrument and distance measuring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008056385A JP2009210520A (en) 2008-03-06 2008-03-06 Distance measuring instrument and distance measuring method

Publications (1)

Publication Number Publication Date
JP2009210520A true JP2009210520A (en) 2009-09-17

Family

ID=41183816

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008056385A Withdrawn JP2009210520A (en) 2008-03-06 2008-03-06 Distance measuring instrument and distance measuring method

Country Status (1)

Country Link
JP (1) JP2009210520A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013040791A (en) * 2011-08-11 2013-02-28 Canon Inc Image processing device, image processing method, and program
JPWO2021172256A1 (en) * 2020-02-27 2021-09-02

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013040791A (en) * 2011-08-11 2013-02-28 Canon Inc Image processing device, image processing method, and program
JPWO2021172256A1 (en) * 2020-02-27 2021-09-02
WO2021172256A1 (en) * 2020-02-27 2021-09-02 ファナック株式会社 Three-dimensional imaging device and imaging condition adjustment method
JP7368590B2 (en) 2020-02-27 2023-10-24 ファナック株式会社 3D imaging device and imaging condition adjustment method
US11943422B2 (en) 2020-02-27 2024-03-26 Fanuc Corporation Three-dimensional image-capturing device and image-capturing condition adjusting method

Similar Documents

Publication Publication Date Title
JP2009115541A (en) Distance measuring instrument and distance measuring method
KR101441586B1 (en) Apparatus and method for capturing image
JP5868183B2 (en) Imaging apparatus and imaging method
JP6509027B2 (en) Object tracking device, optical apparatus, imaging device, control method of object tracking device, program
JP5288752B2 (en) Imaging device
JP5963606B2 (en) Imaging apparatus and control method thereof
JP2012073285A (en) Imaging method and microscope device
KR20150107571A (en) Image pickup apparatus and image pickup method of generating image having depth information
JP2011095027A (en) Imaging device
JP2014178474A (en) Digital microscope apparatus, focusing position searching method therefor, and program
JP2009229125A (en) Distance measuring device and distance measuring method
JP7380777B2 (en) Control devices, control methods, computer programs and electronic equipment
JP6671130B2 (en) Imaging device, imaging device, focus detection device, image processing device, and control method therefor
JP2017158018A (en) Image processing apparatus, control method of the same, and imaging apparatus
JP2019168479A (en) Controller, imaging device, method for control, program, and, and storage medium
JP2019129374A (en) Image processing apparatus, image processing method, program, storage medium, and imaging apparatus
JP2009210520A (en) Distance measuring instrument and distance measuring method
JP5050282B2 (en) Focus detection device, focus detection method, and focus detection program
JP2009250685A (en) Distance measuring device and distance measuring method
JP5019279B2 (en) Confocal microscope and method for generating focused color image
JP6171110B2 (en) Focus control device, focus control method, focus control program, lens device, imaging device
JP3488762B2 (en) Image processing apparatus and image processing method
JP2018010245A (en) Signal processor and control method therefor
JP5939945B2 (en) Apparatus and method for detecting position of moving object
JP2009092584A (en) Distance information detection device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101013

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20110509