JP2009229125A - Distance measuring device and distance measuring method - Google Patents

Distance measuring device and distance measuring method Download PDF

Info

Publication number
JP2009229125A
JP2009229125A JP2008071969A JP2008071969A JP2009229125A JP 2009229125 A JP2009229125 A JP 2009229125A JP 2008071969 A JP2008071969 A JP 2008071969A JP 2008071969 A JP2008071969 A JP 2008071969A JP 2009229125 A JP2009229125 A JP 2009229125A
Authority
JP
Japan
Prior art keywords
pixel
image
value
distance
imaging
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
JP2008071969A
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 JP2008071969A priority Critical patent/JP2009229125A/en
Publication of JP2009229125A publication Critical patent/JP2009229125A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/557Depth or shape recovery from multiple images from light fields, e.g. from plenoptic cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10052Images from lightfield camera

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Measurement Of Optical Distance (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a small-sized inexpensive distance measuring device capable of measuring accurately distance information. <P>SOLUTION: This distance measuring device is equipped with an image sensor camera 1, an image capture board 2, a memory 3 for preserving image data, an image processing part 4 for calculating distance information to an object from the image data preserved 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 comprises a reconstitution part 4a, a brightness information calculation part 4b, a distance information calculation part 4c, and a mask part 4d. The mask part 4d converts a pixel value corresponding to a non-lens part of a microlens array 12 inside the image sensor camera 1 into a prescribed value. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、対象物までの距離を測定する距離測定装置および距離測定方法に関する。   The present invention relates to a distance measuring device and a distance measuring method for measuring a distance to an object.

近年、産業用ロボットや各種FA機器を用いて生産ラインを自動化するシステムや、知能ロボットのインテリジェント化を図るために、視覚センサが重要となってきている。特に、ロボットアームを用いたシステムにおいては、ワークの位置、姿勢、形状等の計測に視覚センサとして画像センサカメラが多く用いられている。   In recent years, visual sensors have become important for systems that automate production lines using industrial robots and various FA devices and intelligent robots. 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.

このようなニーズに対応すべく、従来より、複数の画像センサカメラを用いたステレオ方式による3次元情報測定システムなどが用いられている。しかしながら、このシステムには、複数のカメラや複雑な画像処理が必要などの課題があった。   In order to meet such needs, a stereo three-dimensional information measurement system using a plurality of image sensor cameras has been conventionally used. However, this system has a problem that a plurality of cameras and complicated image processing are required.

また、比較的小さな対象物の高さ情報を測定する方法として、共焦点顕微鏡の原理を利用した高さ測定法が提案されている。例えば、特開2003−75119号公報(特許文献1)に記載された共焦点顕微鏡の原理を用いた高さ情報測定装置は、図18に示すように、光源103、対物レンズ104、2次元画像カメラ102を備えた共焦点光学系101により、試料106をステージ105を高さ方向に移動させながら、その高さ方向において互いに異なる複数の高さ位置で水平面の共焦点画像107をそれぞれ撮像する構成を有している(図19(a)(b))。そして、複数の共焦点画像の画素毎の輝度情報を比較し最大輝度を有する画素を含む共焦点画素データを用いて粒子解析を行ない、特定領域を抽出した後、抽出された領域における輝度と高さの代表値を算出し、試料の高さ情報を求めるものである(図19(c))。   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, a height information measuring device using the principle of a confocal microscope described in Japanese Patent Laid-Open No. 2003-75119 (Patent Document 1) has a light source 103, an objective lens 104, and a two-dimensional image as shown in FIG. A configuration in which a confocal optical system 101 provided with a camera 102 captures a confocal image 107 on a horizontal plane at a plurality of height positions different from each other in the height direction while moving the sample 106 in the height direction. (FIGS. 19A and 19B). Then, the luminance information for each pixel of a plurality of confocal images is compared, particle analysis is performed using the confocal pixel data including the pixel having the maximum luminance, the specific region is extracted, and then the luminance in the extracted region is increased. The representative value of the height is calculated to obtain the height information of the sample (FIG. 19 (c)).

また、撮像素子を用いたカメラシステムにおいて、取得した画像データをデジタル処理により合成し、後で好きなようにピントを手前または奥に移動できるプレノプティックカメラ技術が“Single Lens Stereo with a Plenoptic Camera”,IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE,VOL.14,NO.2,FEBRUARY 1992(非特許文献1)や“Light Field Photography with a Hand−held Plenoptic Camera”,Stanford Tech Report CTSR 2005−02(非特許文献2)の中で提案されている。   In addition, in a camera system using an image sensor, a plenoptic camera technology that synthesizes acquired image data by digital processing and can move the focus to the front or back as desired later is “Single Lens Stereo with a Plenoptic”. "Camera", IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. 14, NO. 2, FEBRUARY 1992 (Non-patent Document 1) and “Light Field Photographic with a Hand-Held Plenoptic Camera”, Stanford Tech Report CTSR 2005-02 (Non-patent Document 2).

プレノプティックカメラは、通常の方法で画像を形成する普通のカメラレンズの他に、、カメラレンズの像平面に正確に配置されたマイクロレンズアレイを備える。さらに、マイクロレンズアレイのすぐ背後に配置され、マイクロレンズアレイより多くの撮像素子を有するイメージセンサアレイ(撮像素子アレイ)を備える。   In addition to ordinary camera lenses that form images in the usual way, plenoptic cameras include microlens arrays that are precisely placed in the image plane of the camera lens. Furthermore, the image sensor array (image sensor array) is provided immediately behind the micro lens array and has more image sensors than the micro lens array.

マイクロレンズアレイ内のレンズの数で最終画像の画素数は決まるが、単一マイクロレンズに割り当てられた多数のセンサピクセルにより、そのマイクロレンズに入射する光の方向と強度を記録することができる。そのデータを用いて、所定の距離にピントを合わせた画像を再構成することができるというものである。
特開2003−75119号公報 “Single Lens Stereo with a Plenoptic Camera”,IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE,VOL.14,NO.2,FEBRUARY 1992 “Light Field Photography with a Hand−held Plenoptic Camera”,Stanford Tech Report CTSR 2005−02
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. By using the data, an image focused on a predetermined distance can be reconstructed.
JP 2003-75119 A “Single Lens Stereo with a Plenoptic Camera”, IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. 14, NO. 2, FEBRUARY 1992 “Light Field Photography with a Hand-held Plenoptic Camera”, Stanford Tech Report CTSR 2005-02

特許文献1のように、共焦点顕微鏡の原理を用いて複数の共焦点画像を取得する場合、ステージの面方向への走査と高さ方向への移動という操作が必要で、オートフォーカス機構を含む移動機構系による大型化や、2次元画像データを高さを変えて複数回取得するための時間(ステージの移動時間、静止に要する時間、対物レンズなどのオートフォーカシング時間などが含まれる)が必要になるなどの課題がある。   When a plurality of confocal images are acquired using the principle of a confocal microscope as in Patent Document 1, an operation of scanning in the surface direction of the stage and moving in the height direction is necessary, and an autofocus mechanism is included. Necessary to increase the size of the moving mechanism system and to acquire 2D image data multiple times at different heights (including the time required to move the stage, the time required to stand still, and the auto-focusing time for the objective lens, etc.) There are issues such as becoming.

また、非特許文献1には、取得画像データに対して、例えばオペレータがピント位置(距離)を入力することで、その位置にフォーカシングされた画像をデータの並び替え(再構成)により作り出すことは示されているが、それを用いて対象物の距離情報を算出することは示されていない。   Further, in Non-Patent Document 1, for example, when an operator inputs a focus position (distance) to acquired image data, an image focused at that position is created by rearranging (reconstructing) data. Although it is shown, it is not shown that the distance information of the object is calculated using it.

また、マイクロレンズアレイの各マイクロレンズの間あるいは各マイクロレンズの周辺に存在する非レンズ部分により、再構成画像にノイズが発生するという問題もあった。非レンズ部分を透過して撮像素子に入射した光(不要光)は、再構成画像にはノイズとして現れる。   There is also a problem that noise is generated in the reconstructed image due to non-lens portions existing between or around each microlens of the microlens array. Light (unnecessary light) that has passed through the non-lens portion and entered the imaging element appears as noise in the reconstructed image.

本発明は、このような課題に着目してなされたものであり、精度よく距離情報を測定できる小型かつ低コストの距離測定装置を提供することを目的とする。   The present invention has been made paying attention to such a problem, and an object of the present invention is to provide a small and low-cost distance measuring device capable of measuring distance information with high accuracy.

1つの局面に係る本願発明は、対象物までの距離を測定するための距離測定装置であって、対象物からの物体光を撮像するカメラを備え、カメラは、物体光を集光する撮像レンズと、撮像レンズを通過した物体光が入射する複数のマイクロレンズからなるマイクロレンズアレイと、マイクロレンズアレイを通過した物体光を検出し、画像データに変換する撮像デバイスとを含み、撮像デバイスは、それぞれがマイクロレンズアレイを通過した物体光を検出し、画像信号に変換する複数の撮像素子を有し、複数の撮像素子は、それぞれに1つのマイクロレンズを透過した物体光が入射する複数の素子群に分割されており、マイクロレンズアレイの非レンズ部を透過した光が入射する外縁部の撮像素子に対応する画素データの画素値を所定の値に変換するマスク手段と、マスク手段により処理された画像データに含まれる複数の画素データを、各素子群における物体光を検出した撮像素子の位置により定まる物体光のマイクロレンズへの入射方向に基づいて並び替えて、撮像デバイスが複数の仮想位置の各々に位置する場合に得られるべき再構成画像を生成する再構成手段と、複数の再構成画像に共通の領域において、複数の再構成画像の各々について、各画素と各画素近傍の画素との間の輝度の差分値を算出する差分値算出手段と、共通の領域に含まれる各画素位置に対して、差分値が最大である画素を有する再構成画像に対応する仮想位置を特定し、カメラの光学系のパラメータに基づき特定された仮想位置を変換し距離を算出する距離算出手段とを備える。   The present invention according to one aspect is a distance measuring device for measuring a distance to an object, and includes a camera that images object light from the object, and the camera is an imaging lens that condenses the object light. A microlens array composed of a plurality of microlenses on which the object light that has passed through the imaging lens is incident, and an imaging device that detects the object light that has passed through the microlens array and converts it into image data. Each has a plurality of image sensors that detect object light that has passed through the microlens array and converts it into image signals, and each of the plurality of image sensors has a plurality of elements on which the object light that has passed through one microlens is incident. The pixel value of the pixel data corresponding to the image sensor on the outer edge portion that is divided into groups and that is incident on the light transmitted through the non-lens portion of the microlens array is set to a predetermined value. Based on the incident direction of the object light to the microlens determined by the position of the image sensor that detected the object light in each element group, the mask means to be replaced, and the plurality of pixel data included in the image data processed by the mask means Rearrangement means for generating a reconstructed image to be obtained when the imaging device is positioned at each of a plurality of virtual positions, and each of the plurality of reconstructed images in a region common to the plurality of reconstructed images A difference value calculating means for calculating a difference value of luminance between each pixel and a pixel in the vicinity of each pixel, and a pixel having a maximum difference value for each pixel position included in the common area. Distance calculating means for specifying a virtual position corresponding to the constituent image, converting the specified virtual position based on a parameter of the optical system of the camera, and calculating a distance;

好ましくは、差分値算出手段は、各素子群に対応する画像データの領域に含まれる複数の画素の画素値に基づいて一様輝度を算出し、各領域に含まれる複数の画素を一様輝度を有する画素に変換する平均化手段をさらに含み、一様輝度を有する画素に基づき差分値を算出する。   Preferably, the difference value calculating unit calculates uniform luminance based on pixel values of a plurality of pixels included in an area of image data corresponding to each element group, and the plurality of pixels included in each area are uniformly luminance. The image processing apparatus further includes an averaging unit that converts the pixel value into a pixel having a luminance value, and calculates a difference value based on the pixel having a uniform luminance.

さらに好ましくは、平均化手段は、各領域に含まれる画素のうち、外縁部の画素を除いた画素の画素値に基づいて一様輝度を算出する。   More preferably, the averaging means calculates the uniform luminance based on the pixel values of the pixels included in each region, excluding the pixels at the outer edge.

さらに好ましくは、平均化手段は、各領域に含まれる画素のうち、所定の値を持つ画素を除いた画素の画素値に基づいて一様輝度を算出する。   More preferably, the averaging means calculates uniform luminance based on pixel values of pixels excluding pixels having a predetermined value among pixels included in each region.

好ましくは、所定の値は、画素値の取りうる最小値である。
好ましくは、所定の値は、画素値の取りうる最大値である。
Preferably, the predetermined value is a minimum value that can be taken by the pixel value.
Preferably, the predetermined value is a maximum value that the pixel value can take.

好ましくは、マスク手段は、画像データの所定の領域に含まれる画素値の平均値が所定の閾値以上であるとき、所定の値を画像信号の取りうる最小値に設定し、平均値が所定の閾値未満であるとき、所定の値を画像信号の取りうる最大値に設定する。   Preferably, the masking unit sets the predetermined value to a minimum value that can be taken by the image signal when the average value of the pixel values included in the predetermined region of the image data is equal to or greater than a predetermined threshold, and the average value is equal to the predetermined value. When it is less than the threshold, the predetermined value is set to the maximum value that the image signal can take.

好ましくは、マスク手段は、画像データから外縁部の画素データを削除し、再構成手段は、外縁部の画素データが削除された画像データに含まれる複数の画素データを並び替えて、再構成画像を生成する。   Preferably, the mask means deletes the pixel data of the outer edge portion from the image data, and the reconstruction means rearranges the plurality of pixel data included in the image data from which the pixel data of the outer edge portion is deleted. Is generated.

他の局面に係る本願発明は、対象物からの物体光を撮像するカメラ対象物で対象物までの距離を測定するための距離測定方法であって、カメラは、物体光を集光する撮像レンズと、撮像レンズを通過した物体光が入射する複数のマイクロレンズからなるマイクロレンズアレイと、マイクロレンズアレイを通過した物体光を検出し、画像データに変換する撮像デバイスとを含み、撮像デバイスは、それぞれがマイクロレンズアレイを通過した物体光を検出し、画像信号に変換する複数の撮像素子を有し、複数の撮像素子は、それぞれに1つのマイクロレンズを透過した物体光が入射する複数の素子群に分割されており、マイクロレンズアレイの非レンズ部を透過した光が入射する外縁部の撮像素子に対応する画素データの画素値を所定の値に変換するステップと、外縁部の撮像素子に対応する画素データの画素値を所定の値に変換された画像データに含まれる複数の画素データを、各素子群における物体光を検出した撮像素子の位置により定まる物体光のマイクロレンズへの入射方向に基づいて並び替えて、撮像デバイスが複数の仮想位置の各々に位置する場合に得られるべき再構成画像を生成するステップと、複数の再構成画像に共通の領域において、複数の再構成画像の各々について、各画素と各画素近傍の画素との間の輝度の差分値を算出するステップと、共通の領域に含まれる各画素位置に対して、差分値が最大である画素を有する再構成画像に対応する仮想位置を特定し、カメラの光学系のパラメータに基づき特定された仮想位置を変換し距離を算出するステップとを備える。   The present invention according to another aspect is a distance measuring method for measuring a distance to an object with a camera object that images object light from the object, wherein the camera collects the object light. A microlens array composed of a plurality of microlenses on which the object light that has passed through the imaging lens is incident, and an imaging device that detects the object light that has passed through the microlens array and converts it into image data. Each has a plurality of image sensors that detect object light that has passed through the microlens array and converts it into image signals, and each of the plurality of image sensors has a plurality of elements on which the object light that has passed through one microlens is incident. The pixel value of the pixel data corresponding to the image sensor at the outer edge portion that is divided into groups and that is incident on the light transmitted through the non-lens portion of the microlens array is changed to a predetermined value. And a plurality of pixel data included in the image data obtained by converting the pixel value of the pixel data corresponding to the image sensor at the outer edge to a predetermined value according to the position of the image sensor that detects the object light in each element group. Reordering based on the incident direction of the fixed object light to the microlens to generate a reconstructed image to be obtained when the imaging device is located at each of a plurality of virtual positions, and common to the plurality of reconstructed images For each of a plurality of reconstructed images, a step of calculating a luminance difference value between each pixel and a pixel in the vicinity of each pixel, and a difference value for each pixel position included in the common region Identifying a virtual position corresponding to a reconstructed image having a pixel with the largest value, converting the identified virtual position based on a parameter of the optical system of the camera, and calculating a distance. .

本発明によれば、一度の撮像データから画像処理により、異なるフォーカシング状態の複数の画像を生成し、そのデータより距離画像を得ることができるため、カメラレンズのフォーカシング機構やステージなどの移動機構が不要である。また、非レンズ部分に対応する領域中の撮像素子からの画像情報をマスク処理して仮想位置の再構成像を生成することにより、高精度なマイクロレンズアレイを不要としながら、高精度な距離検出を行なえる。よって、小型かつ低コストな高精度の距離情報測定装置を実現できる。   According to the present invention, it is possible to generate a plurality of images in different focusing states by image processing from a single imaged data, and obtain a distance image from the data. Therefore, a camera lens focusing mechanism and a moving mechanism such as a stage are provided. It is unnecessary. In addition, by masking image information from the image sensor in the area corresponding to the non-lens part and generating a reconstructed image of the virtual position, high-precision distance detection is possible while eliminating the need for a high-precision microlens array. Can be done. Therefore, a small and low-cost highly accurate distance information measuring device can be realized.

本発明は、撮像レンズで結像した画像を、マイクロレンズアレイを通して撮像素子で撮影し、その画像データから対象物の3次元情報を取得する距離測定装置に関するものである。以下、図面を参照しながら本発明の実施の形態を説明する。なお、本発明は以下の実施形態に限定されるものではない。   The present invention relates to a distance measuring device that captures an image formed by an imaging lens with an imaging element through a microlens array and acquires three-dimensional information of an object from the image data. 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 distance measuring device)
With reference to FIG. 1, the structure of the distance measuring device according to the present invention will be described. FIG. 1 is a schematic configuration diagram of a distance measuring apparatus according to an embodiment of the present invention.

距離測定装置は、対象物の物体光を撮像する画像センサカメラ1と、画像センサカメラ1の撮像結果から画像データを取得する画像キャプチャボード2と、画像データを保存するメモリ3と、画像データに基づいて対象物までの距離情報を算出する画像処理部4とを備える。また、必要に応じて、画像処理部4で算出された距離情報を表示する表示モニタ5をさらに備える。   The distance measuring device includes an image sensor camera 1 that captures object light of an object, an image capture board 2 that acquires image data from an imaging result of the image sensor camera 1, a memory 3 that stores image data, and image data. And an image processing unit 4 that calculates distance information to the object. Moreover, the display monitor 5 which displays the distance information calculated by the image processing part 4 is further provided as needed.

画像処理部4は、再構成部4aと、輝度情報算出部4bと、距離情報算出部4cと、マスク部4dとを含む。   The image processing unit 4 includes a reconstruction unit 4a, a luminance information calculation unit 4b, a distance information calculation unit 4c, and a mask unit 4d.

マスク部4dは、画像キャプチャボード2より取得した対象物の画像データの一部分の画素値を特定の値に変換する。再構成部4aは、画像データに含まれる画素データを並び替えて、異なる複数の仮想焦点位置の再構成画像を生成する。輝度情報算出部4bは、複数の再構成画像において、各画素あるいは複数の画素からなる画素群の各々の輝度情報を算出する。距離情報算出部4cは、輝度情報および画像センサカメラ1の光学系のパラメータに基づいて、対象物までの距離を算出する。   The mask unit 4d converts a pixel value of a part of the image data of the object acquired from the image capture board 2 into a specific value. The reconstruction unit 4a rearranges the pixel data included in the image data, and generates reconstructed images at a plurality of different virtual focus positions. The luminance information calculation unit 4b calculates luminance information of each pixel or a pixel group including a plurality of pixels in the plurality of reconstructed images. The distance information calculation unit 4c calculates the distance to the object based on the luminance information and the parameters of the optical system of the image sensor camera 1.

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

メインレンズ11には、対象物からの物体光が入射する。メインレンズ11は、物体光を集光する。マイクロレンズアレイ12には、メインレンズ11を通過した物体光が入射する。マイクロレンズアレイ12に含まれる複数のマイクロレンズの各々は、物体光を集光する。   Object light from the object is incident on the main lens 11. The main lens 11 collects object light. 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.

撮像素子アレイ13に含まれる複数の撮像素子の各々は、入射した光を画像信号に変換する。撮像素子アレイ13により取得される画像データについては、後で詳述する。   Each of the plurality of image sensors included in the image sensor array 13 converts incident light into an image signal. The image data acquired by the image sensor array 13 will be described in detail later.

(2.画像センサカメラの光学系)
本実施の形態においては、画像センサカメラ1の光学系の構成に特徴がある。図2を参照して、画像センサカメラ1の光学系について説明する。図2は、画像センサカメラ1の光学系を示す図である。なお、簡単のため、図2には、対象物14が点光源である場合を示す。
(2. Image sensor camera optical system)
The present embodiment is characterized by the configuration of the optical system of the image sensor camera 1. The optical system of the image sensor camera 1 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には、マイクロレンズアレイ12上に集光された光対象物の光が、マイクロレンズを通して、拡大されて入射される。   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 focus position, the side closer to the main lens 11 than the focus position is called a near point position, and the side farther from the main lens 11 than the focus position is called a far point position. The image pickup device array 13 is disposed almost at the focal position of the microlens array 12. The light of the light object condensed on the microlens array 12 is enlarged and incident on the imaging element array 13 through the microlens.

また、それぞれのマイクロレンズを通過した光が、撮像素子アレイ13上の互いに異なる領域に入射するように、画像センサカメラ1の光学系のパラメータ(メインレンズ12およびマイクロレンズのFナンバーなど)は調整されているものとする。   Also, the parameters of the optical system of the image sensor camera 1 (such as the F number of the main lens 12 and the microlens) are adjusted so that the light that has passed through each microlens is incident on different areas on the image sensor array 13. It is assumed that

次に、図3〜図9を用いて、この画像センサカメラ1による撮像および距離情報検出の原理を説明する。   Next, the principle of imaging and distance information detection 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の位置に相当する。結像面F,E,DをそれぞれC,A,Bに対する仮想焦点面と呼ぶ。   With reference to FIG. 3, the imaging of the target 14 will be described. 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. The imaging planes F, E, and D are called virtual focal planes for C, A, and B, respectively.

続いて、対象物14が図3の位置A,B,Cにある場合にマイクロレンズアレイ12上にどのような形状の入射光15が入射するかについて図4を用いて説明する。図4はマイクロレンズアレイ12上の入射光15の形状を示す図である。   Next, the shape of the incident light 15 incident on the microlens array 12 when the object 14 is at the positions A, B, and C in FIG. 3 will be described with reference to FIG. FIG. 4 is a diagram showing the shape of the incident light 15 on the microlens array 12.

図4に示すように、本実施の形態においては、マイクロレンズアレイ12は、2次元面内に配列された円形のマイクロレンズからなるものとする。また、各マイクロレンズには、それらを識別するための番号M(i,j)が与えられているものとする。図4(a)、図4(b)、図4(c)は、それぞれ、対象物14が、遠点位置Cにある場合、合焦位置Aにある場合、近点位置Bにある場合のマイクロレンズアレイ12上の入射光15の形状を示す図である。   As shown in FIG. 4, in the present embodiment, the microlens array 12 is made 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 array 13 will be described with reference to FIG. As shown in FIG. 5, the imaging element array 13 includes a plurality of element groups. Each element group is given a number T (i, j). Each element 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 an element group is comprised with a 10x10 image pick-up element, the number of the elements which comprise an element group is not restricted to this.

対象物14が合焦位置Aにある場合、図4(b)のようにほぼマイクロレンズM(2,2)上に集光された光が、撮像素子アレイ13に入射する。したがって、撮像素子アレイ13に入射する光は、図5(b)に示すように、素子群T(2,2)に対して全面に広がる。   When the object 14 is at the in-focus position A, the light condensed on the micro lens M (2, 2) as shown in FIG. Therefore, the light incident on the image sensor array 13 spreads over the entire surface with respect to the element group T (2, 2) 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. The light that has spread to M (3, 2) also enters the image sensor array 13. As shown in FIG. 5A, the light incident on these peripheral lenses is grouped with element groups T (1,2), T (2,1), corresponding to each microlens, as shown in FIG. Incident on part of T (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 array 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 element 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 the present invention, 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 element group T (2, 2), and the surrounding element 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 around the element 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. As described above, information on the incident direction of the object light to the microlens installed at a position corresponding to each element group can be obtained depending on which image sensor among the image sensors included in each element group is incident. it can.

この入射方向の情報、仮想面の位置(仮想位置)、および、光学系のパラメータ(各レンズの焦点距離や、メインレンズ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 (focal length of each lens, distance between the main lens 11 and the microlens array 12, etc.) By rearranging the pixel data acquired by 13, it is possible to acquire image data to be acquired when the image sensor array 13 is on a virtual plane.

並び替えの具体例を図6を用いて説明する。図6は、対象物14の撮影像のデータを変換して得た再構成画像を示す図である。例えば、図6(a)は図5(a)に示した画像データから再構成した仮想面F上での光の分布を示したもので、図5(b)の合焦位置での光ビーム状態とほぼ同じになる。周囲の決まった撮像素子の出力を集めて、素子群T(2,2)の中央付近の出力と足し合わせ、改めて素子群T(2,2)の出力とすることで、仮想面Fでの画像を作り出すことができる。   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. By collecting the outputs of the surrounding imaging elements and adding them together with the output near the center of the element group T (2, 2), the output of the element group T (2, 2) is obtained again. An image can be created.

近点位置Bにある対象物(点像)に対しても、出力の足し合わせにより、図6(c)のような再構成像が生成できる。ただし、図5からも分かるように、撮像素子アレイ13上での広がり(分割状態)が遠点状態とは異なるので、再構成像を得るためには、異なる演算(周囲画素群の内側の一部の画素出力を足し合わせる)を行なう必要がある。   For the object (point image) at the near point position B, a reconstructed image as shown in FIG. 6C can be generated by adding the outputs. However, as can be seen from FIG. 5, since the spread (division state) on the image sensor array 13 is different from the far point state, different operations (one inside the surrounding pixel group) are required to obtain a reconstructed image. Part pixel outputs must be added).

なお、ここでは対象物が点像の場合の例を示したが、大きさを有する対象物の場合にも、同様の操作で画像の再構成ができる。ただし、大きさを有する画像の場合、全てのマイクロレンズに光が入射するので、各マイクロレンズに対応する画素群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 imaging element array 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.距離情報の取得方法について)
次に、対象物の距離情報(3次元情報)を取得する方法の基本的な流れについて、図10を参照しつつ説明する。図10は、距離情報の取得の各工程で生成される画像データについて説明するための図である。
(4. How to obtain distance information)
Next, a basic flow of a method for acquiring distance information (three-dimensional information) of an object will be described with reference to FIG. FIG. 10 is a diagram for explaining image data generated in each process of obtaining distance information.

距離情報の取得にあたっては、まず、画像センサカメラ1により、対象物の画像データを取得する。取得された画像データは、画像キャプチャーボード2を介してメモリ3に記憶される。この画像データを、図10(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. 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 broadly divided into “reconstruction step”, “difference value calculation step”, and “distance information calculation step”. Hereinafter, each processing will be described.

(1)再構成ステップ
画像処理部4に含まれる再構成部4aは、画像データf(i,j)を並び替えて、図10(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. 10B. 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)が、図10(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 piece of image data f (i, j) is converted into N pieces of reconstructed image data as shown in FIG. 10B, 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) Difference Value Calculation Step The luminance information calculation unit 4b calculates the difference value of the luminance of adjacent pixels from the reconstructed image data gn (i, j). The calculation of the difference value 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.

平均化処理の具体例を図11を用いて説明する。図11は、図9に示す画像に対し平均化処理を行った場合の画素群の輝度分布を示す図である。図11(a)〜(d)はそれぞれ図9(a)〜(d)の輝度分布を画素群内で平均化処理したものである。   A specific example of the averaging process will be described with reference to FIG. FIG. 11 is a diagram showing the luminance distribution of the pixel group when the averaging process is performed on the image shown in FIG. FIGS. 11A to 11D 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’)において、各画素群について隣接画素群との輝度の差分値を計算し、図10(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次微分を用いるラプラシアン法など様々なフィルタ窓を設定することができる。図10(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 FIG. 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. 10D, 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 data obtained in the difference value calculation step.

まず、距離情報算出部4cは、差分値画像データに基づき、複数の再構成画像に共通の各画素位置 p=(i’,j’) での差分値強度の最大値を検出し、その最大値が検出されるn値(以後、代表値と呼ぶ)を求め、図10(e)に示すような代表値画像データs(i’,j’)を生成する。すなわち、各p=(i’,j’)においてkn(i’,j’)〜kN(i’,j’)を最大とするnの値をs(i’,j’)とおく。図9あるいは図11で示すように、エッジ周辺の輝度変化は、合焦位置での画像において、最も大きい。よって、差分値が最大となる仮想面の位置が合焦状態を示していると判定できる。このことを利用して、対象物までの距離を算出することができる。   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. 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. 11, the luminance change around the edge 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 difference value indicates the in-focus state. Using this fact, the distance to the object can be calculated.

あるいは、差分値分布の近似曲線から、代表値を求めてもよい。この求め方を図12を用いて説明する。図12は、差分値分布の近似曲線から代表値を求める方法を説明するための図である。図12(a)は、異なる距離に配置されている2つの対象物の再構成像を示す図である。図12(b)は、図12(a)に示した各対象物のエッジ付近の画素位置(14A、15B)における差分値強度を、仮想面の位置(n値)について、プロットしたものである。各対象物に対して、画素位置(i',j')において、n値についてプロットした差分値強度の近似曲線を求め、近似曲線のピークのn値(図12(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. 12 is a diagram for explaining a method for obtaining the representative value from the approximate curve of the difference value distribution. FIG. 12A shows a reconstructed image of two objects arranged at different distances. FIG. 12B is a plot of the difference value intensities at the pixel positions (14A, 15B) near the edge of each object shown in FIG. 12A 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. 12B). ) 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’)に変換し、図10(f)に示すような最終的な距離画像データ d(i’,j’)を生成する。   Finally, the distance information calculation unit 4c obtains the representative value image s (i ′, j ′) from which the maximum difference value intensity is obtained at each pixel position from the distance measurement device using the magnification data of a known optical system. The absolute distance d (i ′, j ′) to the object is converted into final distance image data d (i ′, j ′) as shown in FIG.

上記アルゴリズムは、輝度情報算出処理および距離情報算出処理を画素すべてについて行い、画素すべてについて距離データを求める場合のものであるが、画素すべてについて距離データを求めなくてもよい場合は、アルゴリズム処理領域を限定してもよい。例えば、複数の再構成画像に共通の処理領域を設定し、設定した処理領域において、輝度情報算出処理および距離情報算出処理を行なってもよい。処理領域を限定することで、処理時間や計算負荷を低減できる。   The above algorithm is for performing luminance information calculation processing and distance information calculation processing for all pixels and obtaining distance data for all pixels, but if it is not necessary to obtain distance data for all pixels, the algorithm processing area May be limited. For example, a common processing area may be set for a plurality of reconstructed images, and the luminance information calculation process and the distance information calculation process may be performed in the set processing area. By limiting the processing area, processing time and calculation load can be reduced.

また、差分値強度画像kn(i’,j’)に閾値処理を施すなどして、画像内のエッジ領域を抽出し、抽出したエッジ領域に限定して、代表値の算出および距離情報の計算を行なってもよい。このようにエッジ領域についてのみ距離を求める構成によれば、処理時間や計算負荷を大幅に低減できる。   Further, by performing threshold processing on the difference value intensity image kn (i ′, j ′), the edge region in the image is extracted, and the calculation of the representative value and the calculation of the distance information are limited to the extracted edge region. May be performed. Thus, according to the structure which calculates | requires distance only about an edge area | region, processing time and a calculation load can be reduced significantly.

上記距離情報算出アルゴリズムにより、単一の撮像データから画像処理により、異なるフォーカシング状態(仮想面)の複数の画像を生成し、そのデータより対象物の距離画像を得ることができる。   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.

(5.マスク処理について)
基本的には、上述の方法で撮像画像から距離画像を得ることができる。しかしながら、上述の方法では、マイクロレンズアレイ12の品質が、再構成画像の画質に影響を及ぼす。その具体例を図13および図14を参照して説明する。図13は、被写体を説明する図、図14は、図13に示す被写体の撮像画像および再構成画像を示す図である。図14に示す撮像画像は、図13に示す被写体についてモノクロ品質で撮影したものである。
(5. Mask processing)
Basically, a distance image can be obtained from a captured image by the method described above. However, in the above-described method, the quality of the microlens array 12 affects the quality of the reconstructed image. A specific example will be described with reference to FIGS. FIG. 13 is a diagram for explaining a subject, and FIG. 14 is a diagram showing a captured image and a reconstructed image of the subject shown in FIG. The captured image shown in FIG. 14 is a photograph of the subject shown in FIG. 13 taken in monochrome quality.

図13に示すように、被写体は15mm間隔で文字(SHA)の描かれたカードを並べたものである。正面から撮影したときに全ての文字が見えるように、各文字の位置は、メインレンズ11の径方向にずらして配置されている。メインレンズ11から100mmの位置に最前列のカードを置き、2番目のカードの位置を基準焦点面とする。つまり、2番目のカードがある面に焦点を合わせて撮影する。   As shown in FIG. 13, the subject is an array of cards (SHA) on which characters (SHA) are drawn at intervals of 15 mm. The position of each character is shifted in the radial direction of the main lens 11 so that all characters can be seen when photographed from the front. The frontmost card is placed at a position 100 mm from the main lens 11, and the position of the second card is taken as the reference focal plane. In other words, the photograph is focused on the surface on which the second card is located.

図14(a)は、上記の条件下での、この被写体の撮像画像である。また、図14(a)の四角で囲んだ部分の拡大図を図14(d)に示す。撮像画像(図14(a))について、基準焦点面からメインレンズ11側に15mm移動した位置の仮想面での再構成画像を図14(b)に示す。さらに、図14(b)の再構成画像に対し、画素群の平均化処理を施した画像を図14(c)に示す。   FIG. 14A shows a captured image of the subject under the above conditions. Moreover, the enlarged view of the part enclosed with the square of Fig.14 (a) is shown in FIG.14 (d). FIG. 14B shows a reconstructed image on the virtual plane at a position moved by 15 mm from the reference focal plane to the main lens 11 side with respect to the captured image (FIG. 14A). Further, FIG. 14C shows an image obtained by subjecting the reconstructed image of FIG. 14B to pixel group averaging processing.

今の場合、仮想面を基準焦点面からメインレンズ11側に15mm移動した位置に設定しているので、図13の被写体の最前列のカードに焦点が合った画像が得られるはずであるが、図14(c)では、最前列のカードの文字(図14(c)の最も左の文字)の輪郭があまり明瞭になっていない。   In this case, since the virtual plane is set at a position moved 15 mm from the reference focal plane to the main lens 11 side, an image focused on the card in the front row of the subject in FIG. 13 should be obtained. In FIG. 14 (c), the outline of the characters on the front row of cards (the leftmost character in FIG. 14 (c)) is not so clear.

ここでの画像品質が悪いと、その後の処理であるエッジ検出、ひいては最大差分値強度検出の精度が落ちる。輪郭が明瞭でない画像のエッジ強度は検出しにくく、最大差分値強度を見つけにくいためである。これは、つまり、画像品質が悪くなると、距離検出精度が低下する事を意味する。   If the image quality here is poor, then the accuracy of edge detection, that is, maximum difference value intensity detection, which is a subsequent process, is reduced. This is because it is difficult to detect the edge intensity of an image whose outline is not clear, and it is difficult to find the maximum difference value intensity. This means that the distance detection accuracy decreases when the image quality deteriorates.

図14に示すような画像品質の劣化は、マイクロレンズアレイ12の非レンズ部によるところが大きい。一般に、マイクロレンズアレイにおいては、製造上の問題からマイクロレンズ間はレンズ形状を維持していない事が多い。また、マイクロレンズの周辺部分は、加工精度が出にくく必ずしもレンズとして機能しない。このようにマイクロレンズ間あるいはマイクロレンズ周辺部に存在し、レンズとして機能しない非レンズ部が、画像品質の劣化をもたらす。   The deterioration of the image quality as shown in FIG. 14 is largely due to the non-lens portion of the microlens array 12. In general, in a microlens array, the lens shape is often not maintained between microlenses due to manufacturing problems. Further, the peripheral portion of the microlens does not necessarily function as a lens because processing accuracy is difficult to obtain. As described above, the non-lens portion that exists between the microlenses or around the microlens and does not function as a lens causes deterioration in image quality.

撮像画像の拡大図である図14(d)を参照してこのことを説明する。図14(d)で四角で囲んだ部分が、一つのマイクロレンズに対応する部分である。図14の撮像に用いたマイクロレンズアレイのマイクロレンズ間には、平坦状の隙間がある。そのため、図14(d)から分かるように、実際のマイクロレンズは、四角で囲んだ部分の内側にある。   This will be described with reference to FIG. 14D which is an enlarged view of the captured image. A portion surrounded by a square in FIG. 14D is a portion corresponding to one microlens. There is a flat gap between the microlenses of the microlens array used for imaging in FIG. Therefore, as can be seen from FIG. 14D, the actual microlens is inside the portion enclosed by the square.

再構成画像を生成する計算において、マイクロレンズ間およびマイクロレンズ周辺の画素は、ノイズであると考えられる。ノイズを含んだ画像を再構成および平均化しているため、図14(c)のように、エッジが十分はっきりしない画像になってしまう。   In the calculation for generating the reconstructed image, the pixels between and around the microlenses are considered to be noise. Since an image including noise is reconstructed and averaged, an image whose edges are not sufficiently clear as shown in FIG.

この画像劣化を防ぐためには、非レンズ部の少ない高精度なレンズを用いることが考えられる。しかし、そのようなレンズは、一般に高価である。   In order to prevent this image deterioration, it is conceivable to use a highly accurate lens with few non-lens portions. However, such lenses are generally expensive.

また、非レンズ部分の光学的特性を考慮して、非レンズ部分の補正演算を行なうことも考えられるが、この方法には、非レンズ部分の詳細な光学的特性を把握する必要が生じるとともに、それを反映して演算処理が煩雑となり処理時間が長くなるという問題がある。   In addition, it is conceivable to perform the correction calculation of the non-lens part in consideration of the optical characteristics of the non-lens part, but this method requires grasping the detailed optical characteristics of the non-lens part, Reflecting this, there is a problem that calculation processing becomes complicated and processing time becomes long.

本発明では、この問題を解決するため、撮像画像のマイクロレンズ間およびマイクロレンズ周辺部分にマスク部4dによりマスク処理を施す。   In the present invention, in order to solve this problem, mask processing is performed between the microlenses and the microlens peripheral portion of the captured image by the mask unit 4d.

マスク処理としては、例えば、マスク対象部分の画素値を特定の値に設定する。設定する特定の値としては、例えば画素値の取り得る範囲の最小値とする。あるいは、画素値の取りうる範囲の最大値とする。   As the mask processing, for example, the pixel value of the mask target portion is set to a specific value. The specific value to be set is, for example, the minimum value in the range that the pixel value can take. Alternatively, the maximum value of the range that the pixel value can take is set.

本実施の形態では、図14(a)の撮像画像の非レンズ部分に対応する画素として図15の斜線部で示すマスク画素に対して、マスク処理を行なうものとする。また、マスク処理後の値を、画素値=0(黒色)に設定するものとする。   In the present embodiment, it is assumed that mask processing is performed on the mask pixels indicated by the hatched portion in FIG. 15 as pixels corresponding to the non-lens portion of the captured image in FIG. Also, the value after mask processing is set to pixel value = 0 (black).

この処理を施した画像を図16(a)に示す。また、図16(a)の四角で囲んだ部分の拡大図を図16(d)に示す。図16(d)より、マイクロレンズ間およびマイクロレンズ周辺部分がマスクされて黒くなっていることが分かる。   An image subjected to this processing is shown in FIG. Moreover, the enlarged view of the part enclosed with the square of Fig.16 (a) is shown in FIG.16 (d). It can be seen from FIG. 16D that the portions between the microlenses and the peripheral portions of the microlenses are masked and blackened.

基準焦点面からメインレンズ側に15mm移動した仮想面における、図16(a)の画像の再構成画像を図16(b)に示す。さらに、図16(b)の再構成画像に平均化処理を施した画像を図16(c)に示す。   FIG. 16B shows a reconstructed image of the image of FIG. 16A on the virtual plane moved 15 mm from the reference focal plane to the main lens side. Further, FIG. 16C shows an image obtained by performing averaging processing on the reconstructed image of FIG.

図14(c)に比べて図15(c)の方が、最前列のカードに描かれた文字(最も左の文字)の輪郭が明瞭に出ている。また、図15(c)においては、3枚のカードの中で最前列のカードに書かれた文字にもっとも焦点が合っていることが分かる。このように、マスク処理を行なって再構成画像を生成する事で、マイクロレンズ間およびマイクロレンズ周辺部分のノイズの影響を排除する事が出来る。   Compared to FIG. 14C, the outline of the character (leftmost character) drawn on the card in the front row is clearer in FIG. 15C. In FIG. 15C, it can be seen that the character written on the card in the front row among the three cards is most focused. Thus, by performing mask processing and generating a reconstructed image, it is possible to eliminate the influence of noise between the microlenses and the peripheral portion of the microlenses.

なお、マスク部分の画素を含んで平均化すると、画像全体がマスク部分の画素値にバイアスされる。本実施の形態の場合、画像全体が暗くなる。そこで、マスク部分の画素は平均化の対象から外すことが望ましい。   Note that when averaging is performed including the pixels of the mask portion, the entire image is biased to the pixel values of the mask portion. In the case of this embodiment, the entire image becomes dark. Therefore, it is desirable to exclude the pixels in the mask portion from the objects of averaging.

このためには、ある条件を満たす画素を平均化計算から除外すればよい。マスク部分の画素値が含まれる条件を設定して、マスク画素と他の画素とを区別する。   For this purpose, pixels satisfying a certain condition may be excluded from the averaging calculation. A condition including the pixel value of the mask portion is set to distinguish the mask pixel from other pixels.

例えば、閾値を用いて、マスク画素と他の画素とを区別する。つまり、マスク画素の変換後の値が最小値である場合、所定の閾値以下の画素値をもつ画素をマスク画素とみなす。逆に、マスク画素の変換後の値が最大値である場合、所定の閾値以上の画素値をもつ画素をマスク画素とみなす。あるいは、変換後のマスク画素の画素値を持つ画素を、除外対象としてもよい。   For example, a mask pixel is distinguished from other pixels using a threshold value. That is, when the converted value of the mask pixel is the minimum value, a pixel having a pixel value equal to or less than a predetermined threshold is regarded as a mask pixel. On the contrary, when the converted value of the mask pixel is the maximum value, a pixel having a pixel value equal to or greater than a predetermined threshold is regarded as a mask pixel. Alternatively, pixels having the pixel value of the mask pixel after conversion may be excluded.

このように画素値を用いてマスク画素の抽出を行なう場合、画像全体が明るい場合や、注目したい物体画像が明るい場合は、マスク対象部分の画素値を最小値(黒)に、逆に、画像全体が暗い場合や、注目したい物体画像が暗い場合は、マスク対象部分の画素値を最大値(白)に設定するほうが、必要な画素とマスク画素との区別が明確になされるため、好ましい。   When extracting mask pixels using pixel values in this way, if the entire image is bright or the object image to be noticed is bright, the pixel value of the mask target portion is set to the minimum value (black), conversely, When the entire image is dark or the object image to be noticed is dark, it is preferable to set the pixel value of the mask target portion to the maximum value (white) because the distinction between necessary pixels and mask pixels is made clear.

さらに、画像によって、自動的にマスク画素の変換後の値を設定するようにしてもよい。例えば、画像全体あるいは注目する物体画像が明るいか暗いかを、画像全体あるいは、画像の一部の領域の画素値の平均値を所定の閾値と比較することで判断し、平均値が閾値以上の場合、マスク処理後の画素値を最小値に、平均値が閾値未満の場合、マスク処理後の画素値を最大値とすれば、マスク画素と他の画素との区別をより明確にできる。   Furthermore, the converted value of the mask pixel may be automatically set depending on the image. For example, whether the entire image or the object image of interest is bright or dark is determined by comparing the average value of the pixel values of the entire image or a part of the image with a predetermined threshold, and the average value is equal to or greater than the threshold. In this case, if the pixel value after mask processing is the minimum value and the average value is less than the threshold value, the pixel value after mask processing is set to the maximum value, so that the distinction between the mask pixel and other pixels can be made clearer.

マスク部分の画素を平均化の対象から外すための他の方法として、マスク対象部分に含まれる画素を平均化の対象から除外してもよい。この方法では、平均化処理において閾値による画素の判断が省略できるために、処理速度が高速化できる。   As another method for removing the pixels of the mask portion from the averaging target, the pixels included in the mask target portion may be excluded from the averaging target. In this method, since the pixel determination based on the threshold can be omitted in the averaging process, the processing speed can be increased.

特に、マスク部4dは、マスク対象部分の画素データを画像データから削除してもよい。マスク部分が図15のようであった場合、対象部分の削除後の画像データは、格子状になる。再構成部4aは、この画像データに対して、画素データの並び替え、平均化を行なう。このようにマスク部分のデータを画像データから削除することで、画像データ量が減る。   In particular, the mask unit 4d may delete the pixel data of the mask target portion from the image data. When the mask portion is as shown in FIG. 15, the image data after deletion of the target portion has a lattice shape. The reconstruction unit 4a rearranges and averages the pixel data for this image data. By deleting the mask portion data from the image data in this way, the amount of image data is reduced.

(6.処理の流れ)
本実施の形態に係る距離測定における処理の流れを図16を用いて説明する。図17は本実施の形態に係る距離測定の処理の流れを示すフローチャートである。
(6. Process flow)
A flow of processing in distance measurement according to the present embodiment will be described with reference to FIG. FIG. 17 is a flowchart showing a flow of distance measurement processing according to the present embodiment.

まず、画像処理部4は、ステップS101において、画像データを取得する。この画像データは、画像センサ1により対象物を1回撮影することにより得られる。   First, the image processing unit 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 unit 4 performs mask processing on the image data. That is, the pixel data of the mask target portion corresponding to the non-lens portion is converted into a predetermined value.

そして、画像処理部4は、ステップS103において、画像データから、距離測定を行なう対象となる処理領域を決定する。処理領域は、エッジ判定によって行なわれてもよいし、利用者が設定してもよい。また、画像データの全領域について距離測定を行なう場合は、このステップは、省略される。   In step S103, the image processing unit 4 determines a processing area to be subjected to distance measurement from the image data. The processing area may be performed by edge determination or may be set by the user. Further, this step is omitted when distance measurement is performed for the entire area of 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 unit 4 averages each pixel group. That is, each pixel group is converted into a pixel having uniform luminance. At this time, the pixels of the mask target portion may be excluded from the averaging target.

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

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

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

(7.まとめ)
これまで説明してきたように、本発明によれば、単一の撮像データから画像処理により、異なるフォーカシング状態(仮想面)の複数の画像を生成し、そのデータより対象物の距離画像を得ることができる。また、奥行き方向の前後の位置関係や、対象物の異なるエッジの距離情報から傾きや姿勢を求めることも可能である。
(7. Summary)
As described above, according to the present invention, a plurality of images in different focusing states (virtual surfaces) are generated from a single image data by image processing, and a distance image of the object is obtained from the data. Can do. 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に記載されているような従来のプレノプティックカメラは、設定した距離にピントを合せた画像は再構成できるが、画像の対象物の距離情報を求めることはできなかった。これに対し、本発明では、距離情報を算出することができる。   A conventional plenoptic camera as described in Non-Patent Document 1 can reconstruct an image focused on a set distance, but cannot obtain distance information of an object of the image. 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.

さらに、本光学系は、撮像素子のごく近傍にマイクロレンズアレイを組み込む構成なので、従来の画像センサカメラとほぼ同サイズであるため、広く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.

さらに、マイクロレンズ間やマイクロレンズ周辺の非レンズ部分の画像情報をマスク処理して仮想面での再構成像を生成する事により、高精度なマイクロレンズアレイを用いなくても、精度よく距離検出する事ができる。   In addition, it can accurately detect distances without using a high-precision microlens array by masking image information between non-lens parts around microlenses and around microlenses to generate reconstructed images on virtual surfaces. I can do it.

今回開示された実施の形態はすべての点で例示であって制限的なものではない。本発明の範囲は上記した実施の形態ではなくて特許請求の範囲によって示され、特許請求の範囲と均等な意味および範囲内でのすべての変更点が含まれることが意図される。   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.

本発明の実施の形態に係る距離情報検出装置の概略構成図である。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 array. 対象物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 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 figure explaining a to-be-photographed object. 図13に示す被写体の撮像画像および再構成画像を示す図である。FIG. 14 is a diagram illustrating a captured image and a reconstructed image of the subject illustrated in FIG. 13. マスク部分を説明する図である。It is a figure explaining a mask part. マスク画像およびマスク画像の再構成画像を示す図である。It is a figure which shows the reconstructed image of a mask image and a mask image. 本実施の形態に係る距離測定の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process of the distance measurement which concerns on this Embodiment. 共焦点顕微鏡の原理を用いた高さ情報測定装置の構成を示す図である。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 距離情報算出部、5 表示モニタ、11 撮像レンズ、12 マイクロレンズアレイ、13 撮像素子アレイ、14 対象物、15 マイクロレンズアレイ12上の入射光、16 撮像素子アレイ13上の入射光。   DESCRIPTION OF SYMBOLS 1 Image sensor camera, 2 Image capture board, 3 Memory, 4 Image processing part, 4a Reconstruction part, 4b Luminance information calculation part, 4c Distance information calculation part, 5 Display monitor, 11 Imaging lens, 12 Micro lens array, 13 Imaging Element array, 14 Object, 15 Incident light on microlens array 12, 16 Incident light on imaging element array 13.

Claims (9)

対象物までの距離を測定するための距離測定装置であって、
前記対象物からの物体光を撮像するカメラを備え、
前記カメラは、
前記物体光を集光する撮像レンズと、
前記撮像レンズを通過した前記物体光が入射する複数のマイクロレンズからなるマイクロレンズアレイと、
前記マイクロレンズアレイを通過した前記物体光を検出し、画像データに変換する撮像デバイスとを含み、
前記撮像デバイスは、それぞれが前記マイクロレンズアレイを通過した前記物体光を検出し、画像信号に変換する複数の撮像素子を有し、
前記複数の撮像素子は、それぞれに1つの前記マイクロレンズを透過した前記物体光が入射する複数の素子群に分割されており、
前記マイクロレンズアレイの非レンズ部を透過した光が入射する外縁部の前記撮像素子に対応する画素データの画素値を所定の値に変換するマスク手段と、
前記マスク手段により処理された前記画像データに含まれる複数の前記画素データを、各前記素子群における前記物体光を検出した前記撮像素子の位置により定まる前記物体光の前記マイクロレンズへの入射方向に基づいて並び替えて、前記撮像デバイスが複数の仮想位置の各々に位置する場合に得られるべき再構成画像を生成する再構成手段と、
前記複数の再構成画像に共通の領域において、前記複数の再構成画像の各々について、各画素と前記各画素近傍の画素との間の輝度の差分値を算出する差分値算出手段と、
前記共通の領域に含まれる各画素位置に対して、前記差分値が最大である前記画素を有する前記再構成画像に対応する前記仮想位置を特定し、前記カメラの光学系のパラメータに基づき前記特定された前記仮想位置を変換し前記距離を算出する距離算出手段とを備える、距離測定装置。
A distance measuring device for measuring a distance to an object,
Comprising a camera for imaging object light from the object;
The camera
An imaging lens for condensing the object light;
A microlens array comprising a plurality of microlenses on which the object light having passed through the imaging lens is incident;
An imaging device that detects the object light that has passed through the microlens array and converts it into image data;
The imaging device includes a plurality of imaging elements that each detect the object light that has passed through the microlens array and convert it into an image signal.
The plurality of image sensors are divided into a plurality of element groups on which the object light transmitted through one micro lens is incident,
Mask means for converting a pixel value of pixel data corresponding to the imaging element on an outer edge portion where light transmitted through a non-lens portion of the microlens array is incident into a predetermined value;
The plurality of pieces of pixel data included in the image data processed by the masking means are incident in the incident direction of the object light on the microlens determined by the position of the imaging element that detected the object light in each of the element groups. Reconstructing means for rearranging and generating a reconstructed image to be obtained when the imaging device is located at each of a plurality of virtual positions;
Difference value calculation means for calculating a difference value of luminance between each pixel and a pixel in the vicinity of each pixel for each of the plurality of reconstructed images in a region common to the plurality of reconstructed images;
For each pixel position included in the common area, the virtual position corresponding to the reconstructed image having the pixel having the maximum difference value is specified, and the specification is performed based on a parameter of the optical system of the camera A distance measuring device comprising: a distance calculating unit that converts the calculated virtual position and calculates the distance.
前記差分値算出手段は、
各素子群に対応する前記画像データの領域に含まれる複数の前記画素の画素値に基づいて一様輝度を算出し、各前記領域に含まれる複数の前記画素を前記一様輝度を有する画素に変換する平均化手段をさらに含み、
前記一様輝度を有する画素に基づき前記差分値を算出する、請求項1に記載の距離測定装置。
The difference value calculating means includes:
Uniform luminance is calculated based on pixel values of the plurality of pixels included in the region of the image data corresponding to each element group, and the plurality of pixels included in each of the regions are converted into pixels having the uniform luminance. Further comprising an averaging means for converting,
The distance measuring device according to claim 1, wherein the difference value is calculated based on the pixels having the uniform luminance.
前記平均化手段は、各前記領域に含まれる前記画素のうち、前記外縁部の前記画素を除いた前記画素の画素値に基づいて前記一様輝度を算出する、請求項2に記載の距離測定装置。   The distance measurement according to claim 2, wherein the averaging unit calculates the uniform luminance based on a pixel value of the pixel excluding the pixel at the outer edge portion of the pixels included in each of the regions. apparatus. 前記平均化手段は、各前記領域に含まれる前記画素のうち、前記所定の値を持つ画素を除いた前記画素の画素値に基づいて前記一様輝度を算出する、請求項3に記載の距離測定装置。   The distance according to claim 3, wherein the averaging means calculates the uniform luminance based on a pixel value of the pixel excluding a pixel having the predetermined value among the pixels included in each of the regions. measuring device. 前記所定の値は、前記画素値の取りうる最小値である、請求項1から4のいずれか1項に記載の距離測定装置。   The distance measuring device according to claim 1, wherein the predetermined value is a minimum value that the pixel value can take. 前記所定の値は、前記画素値の取りうる最大値である、請求項1から4のいずれか1項に記載の距離測定装置。   The distance measuring apparatus according to claim 1, wherein the predetermined value is a maximum value that the pixel value can take. 前記マスク手段は、前記画像データの所定の領域に含まれる画素値の平均値が所定の閾値以上であるとき、前記所定の値を前記画像信号の取りうる最小値に設定し、前記平均値が前記所定の閾値未満であるとき、前記所定の値を前記画像信号の取りうる最大値に設定する、請求項1から4のいずれか1項に記載の距離測定装置。   The mask means sets the predetermined value to a minimum value that can be taken by the image signal when an average value of pixel values included in a predetermined region of the image data is equal to or greater than a predetermined threshold, and the average value is The distance measuring device according to any one of claims 1 to 4, wherein when the value is less than the predetermined threshold, the predetermined value is set to a maximum value that the image signal can take. 前記マスク手段は、前記画像データから前記外縁部の前記画素データを削除し、
前記再構成手段は、前記外縁部の前記画素データが削除された前記画像データに含まれる複数の前記画素データを並び替えて、前記再構成画像を生成する、請求項1に記載の距離測定装置。
The mask means deletes the pixel data of the outer edge from the image data;
The distance measuring device according to claim 1, wherein the reconstruction unit rearranges a plurality of the pixel data included in the image data from which the pixel data of the outer edge portion is deleted, and generates the reconstructed image. .
対象物からの物体光を撮像するカメラ対象物で前記対象物までの距離を測定するための距離測定方法であって、
前記カメラは、
前記物体光を集光する撮像レンズと、
前記撮像レンズを通過した前記物体光が入射する複数のマイクロレンズからなるマイクロレンズアレイと、
前記マイクロレンズアレイを通過した前記物体光を検出し、画像データに変換する撮像デバイスとを含み、
前記撮像デバイスは、それぞれが前記マイクロレンズアレイを通過した前記物体光を検出し、画像信号に変換する複数の撮像素子を有し、
前記複数の撮像素子は、それぞれに1つの前記マイクロレンズを透過した前記物体光が入射する複数の素子群に分割されており、
前記マイクロレンズアレイの非レンズ部を透過した光が入射する外縁部の前記撮像素子に対応する画素データの画素値を所定の値に変換するステップと、
前記外縁部の前記撮像素子に対応する画素データの画素値を前記所定の値に変換された前記画像データに含まれる複数の前記画素データを、各前記素子群における前記物体光を検出した前記撮像素子の位置により定まる前記物体光の前記マイクロレンズへの入射方向に基づいて並び替えて、前記撮像デバイスが複数の仮想位置の各々に位置する場合に得られるべき再構成画像を生成するステップと、
前記複数の再構成画像に共通の領域において、前記複数の再構成画像の各々について、各画素と前記各画素近傍の画素との間の輝度の差分値を算出するステップと、
前記共通の領域に含まれる各画素位置に対して、前記差分値が最大である前記画素を有する前記再構成画像に対応する前記仮想位置を特定し、前記カメラの光学系のパラメータに基づき前記特定された前記仮想位置を変換し前記距離を算出するステップとを備える、距離測定方法。
A distance measurement method for measuring a distance to an object with a camera object that images object light from the object,
The camera
An imaging lens for condensing the object light;
A microlens array comprising a plurality of microlenses on which the object light having passed through the imaging lens is incident;
An imaging device that detects the object light that has passed through the microlens array and converts it into image data;
The imaging device includes a plurality of imaging elements that each detect the object light that has passed through the microlens array and convert it into an image signal.
The plurality of image sensors are divided into a plurality of element groups on which the object light transmitted through one micro lens is incident,
Converting a pixel value of pixel data corresponding to the imaging element at an outer edge portion where light transmitted through a non-lens portion of the microlens array is incident into a predetermined value;
The imaging in which the object light in each of the element groups is detected from a plurality of the pixel data included in the image data obtained by converting pixel values of pixel data corresponding to the imaging element at the outer edge to the predetermined value Rearranging based on the incident direction of the object light determined by the position of the element to the microlens, and generating a reconstructed image to be obtained when the imaging device is located at each of a plurality of virtual positions;
Calculating a luminance difference value between each pixel and a pixel in the vicinity of each pixel for each of the plurality of reconstructed images in a region common to the plurality of reconstructed images;
For each pixel position included in the common area, the virtual position corresponding to the reconstructed image having the pixel having the maximum difference value is specified, and the specification is performed based on a parameter of the optical system of the camera Converting the virtual position thus calculated and calculating the distance.
JP2008071969A 2008-03-19 2008-03-19 Distance measuring device and distance measuring method Withdrawn JP2009229125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008071969A JP2009229125A (en) 2008-03-19 2008-03-19 Distance measuring device and distance measuring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008071969A JP2009229125A (en) 2008-03-19 2008-03-19 Distance measuring device and distance measuring method

Publications (1)

Publication Number Publication Date
JP2009229125A true JP2009229125A (en) 2009-10-08

Family

ID=41244711

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008071969A Withdrawn JP2009229125A (en) 2008-03-19 2008-03-19 Distance measuring device and distance measuring method

Country Status (1)

Country Link
JP (1) JP2009229125A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012191376A (en) * 2011-03-10 2012-10-04 Canon Inc Image pickup apparatus and image pickup optical system
JP2012242841A (en) * 2011-05-23 2012-12-10 Ricoh Co Ltd Focusing and focus metrics for plenoptic imaging system
KR20130059813A (en) * 2011-11-29 2013-06-07 엘지이노텍 주식회사 Apparatus and system for measuring distance
JP2013141100A (en) * 2011-12-28 2013-07-18 Casio Comput Co Ltd Image generating apparatus, digital camera, method, and program
JP2013178684A (en) * 2012-02-28 2013-09-09 Casio Comput Co Ltd Depth estimation apparatus, reconfigured image generation device, depth estimation method, reconfigured image generation method and program
JP2013200296A (en) * 2012-02-24 2013-10-03 Ricoh Co Ltd Distance measuring device and distance measuring method
CN112802135A (en) * 2021-01-15 2021-05-14 安徽大学 Ultrathin lens-free separable compression imaging system and calibration and reconstruction method thereof

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012191376A (en) * 2011-03-10 2012-10-04 Canon Inc Image pickup apparatus and image pickup optical system
JP2012242841A (en) * 2011-05-23 2012-12-10 Ricoh Co Ltd Focusing and focus metrics for plenoptic imaging system
US9471728B2 (en) 2011-05-23 2016-10-18 Ricoh Company, Ltd. Metrics for designing a plenoptic imaging system
KR20130059813A (en) * 2011-11-29 2013-06-07 엘지이노텍 주식회사 Apparatus and system for measuring distance
KR101982650B1 (en) 2011-11-29 2019-05-28 엘지이노텍 주식회사 Apparatus and system for measuring distance
JP2013141100A (en) * 2011-12-28 2013-07-18 Casio Comput Co Ltd Image generating apparatus, digital camera, method, and program
US8929685B2 (en) 2011-12-28 2015-01-06 Casio Computer Co., Ltd. Device having image reconstructing function, method, and recording medium
JP2013200296A (en) * 2012-02-24 2013-10-03 Ricoh Co Ltd Distance measuring device and distance measuring method
US9605944B2 (en) 2012-02-24 2017-03-28 Ricoh Company, Ltd. Distance measuring device and distance measuring method
JP2013178684A (en) * 2012-02-28 2013-09-09 Casio Comput Co Ltd Depth estimation apparatus, reconfigured image generation device, depth estimation method, reconfigured image generation method and program
CN112802135A (en) * 2021-01-15 2021-05-14 安徽大学 Ultrathin lens-free separable compression imaging system and calibration and reconstruction method thereof
CN112802135B (en) * 2021-01-15 2022-12-02 安徽大学 Ultrathin lens-free separable compression imaging system and calibration and reconstruction method thereof

Similar Documents

Publication Publication Date Title
KR101632578B1 (en) Image capturing apparatus, image processing apparatus, and image processing method for generating auxiliary information for captured image
JP5988790B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP5868183B2 (en) Imaging apparatus and imaging method
JP2009115541A (en) Distance measuring instrument and distance measuring method
JP5237978B2 (en) Imaging apparatus and imaging method, and image processing method for the imaging apparatus
EP2709352B1 (en) Image pickup apparatus, image pickup system and method of controlling image pickup apparatus
JP2009229125A (en) Distance measuring device and distance measuring method
JP5963606B2 (en) Imaging apparatus and control method thereof
JP6071333B2 (en) Image processing apparatus, method and program, and imaging apparatus having image processing apparatus
JP6746359B2 (en) Image processing device, imaging device, image processing method, program, and storage medium
JP2014178474A (en) Digital microscope apparatus, focusing position searching method therefor, and program
JP2017158018A (en) Image processing apparatus, control method of the same, and imaging apparatus
JP5369563B2 (en) Shape measuring device
JP6353233B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP2019168479A (en) Controller, imaging device, method for control, program, and, and storage medium
JP5050282B2 (en) Focus detection device, focus detection method, and focus detection program
JPWO2015128918A1 (en) Imaging device
JP2009210520A (en) Distance measuring instrument and distance measuring method
JP6171110B2 (en) Focus control device, focus control method, focus control program, lens device, imaging device
JP2009250685A (en) Distance measuring device and distance measuring method
JP7373297B2 (en) Image processing device, image processing method and program
JP2018010245A (en) Signal processor and control method therefor
JP6566800B2 (en) Imaging apparatus and imaging method
JP2009229124A (en) Distance measuring device and distance measuring method
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