JP2006337254A - Imaging apparatus, method and program for measuring distance of photographed image, and recording medium - Google Patents

Imaging apparatus, method and program for measuring distance of photographed image, and recording medium Download PDF

Info

Publication number
JP2006337254A
JP2006337254A JP2005164137A JP2005164137A JP2006337254A JP 2006337254 A JP2006337254 A JP 2006337254A JP 2005164137 A JP2005164137 A JP 2005164137A JP 2005164137 A JP2005164137 A JP 2005164137A JP 2006337254 A JP2006337254 A JP 2006337254A
Authority
JP
Japan
Prior art keywords
image
subject
distance
flash
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.)
Granted
Application number
JP2005164137A
Other languages
Japanese (ja)
Other versions
JP4872035B2 (en
Inventor
Kazunori Umeda
和昇 梅田
Naoya Ogawa
直哉 小川
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.)
Tama TLO Co Ltd
Original Assignee
Tama TLO Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tama TLO Co Ltd filed Critical Tama TLO Co Ltd
Priority to JP2005164137A priority Critical patent/JP4872035B2/en
Publication of JP2006337254A publication Critical patent/JP2006337254A/en
Application granted granted Critical
Publication of JP4872035B2 publication Critical patent/JP4872035B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging apparatus and the algorithm thereof, which can more correctly and simply measure distance from a photographic subject, by compensating the distance according to the tilt angle, even when the photographic subject is tilted to the imaging apparatus in a direction close thereto or away therefrom. <P>SOLUTION: A controller 15 comprises a flash image acquiring section 22 for acquiring an image 4c, by calculating the differences between an image 4a photographed under where a flash light 1a is emitted along with natural light 3 of figure 1 obtained from an optics 10 by using a flash unit 1, and an image 4b photographed by using only the natural light 3 without the flash unit 1; a photographed image distance calculating section 23 for calculating the distance from the photographic subject, based on the image acquired by the flash image acquiring section 22; a photographed image tilt calculating section 24 for calculating the tilt value of the photographic subject, based on the image acquired by the flash image acquiring section 22; and a distance compensation calculating section 25, for compensating for the distance from the photographic subject calculated by the photographed image distance calculating section 23, based on the tilt value calculated by the photographed image tilt calculating section 24. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、被写体までの距離を測距する機能を備えた撮像装置に関し、さらに詳しくは、被写体の姿勢の傾斜の有無を正確に判別することにより、被写体までの距離を正確に測定することを可能とした技術に関するものである。   The present invention relates to an imaging apparatus having a function of measuring a distance to a subject, and more specifically, to accurately measure the distance to a subject by accurately determining whether or not the posture of the subject is inclined. It relates to the technology that has been made possible.

現在、距離計測や形状復元の手法として様々な手法が提案されているが、大がかりな装置や特殊な環境が必要とされるものが多い。例えば、非特許文献1、2に記載の三角測量の原理を利用したステレオ法では、複数台のカメラを用いる方法や、レーザプロジェクタを用いる方法が提案されている。非特許文献2には、異なった照明条件で撮影された複数の画像から形状を求める照度差ステレオ法が開示されているが、光源のコントロールが必要であり、無限遠光源により照明する必要があり、その光源を実環境で実現することが困難であるといった問題がある。また非特許文献2の単画像で観測される陰影から形状を復元するShape-from-Shading法では、単光源のみを必要とするが、照度差ステレオ法と同様に無限遠光源を仮定し、光源のコントロールが必要である。しかし実環境ではこれらの条件を実現することは困難である。また、非特許文献3には安価な装置を利用して三次元形状を復元するものとしてCyber Modelerが開示されている。これは、参照マークが印刷された回転台上に物体を設置し、回転台を回転させながら市販のデジタルカメラで複数枚の画像を撮像し、参照マークからカメラの位置を計算し、全方位の画像を取得することでシルエットから三次元形状を計算するものである。この装置は安価であるが、回転台が必要であり、シルエットを抜き出すために背景紙を設置しなければならないなど環境に制約があるといった問題がある。
また非特許文献4には、カメラの周囲に配置されたLEDから近赤外光を発光し、反射光の強さが物体までの距離にほぼ反比例することを利用して、物体の切り出しや大まかな三次元形状の取得を行う技術について開示されている。
また特許文献1には、設定された露光時間で撮像対象の画像を撮像する撮像手段と、前記撮像対象に光を照射するための発光手段とを具備した画像入力装置において、撮像指示が入力されると、露光時間を第1の時間に設定し、発光手段で撮像対象に光を照射して撮像手段で撮像対象の第1の画像を撮像し、露光時間を第1の時間に設定し、発光手段で撮像対象に光を照射せずに、撮像手段で撮像対象の第2の画像を撮像し、第1の画像と第2の画像の差分を求めて、発光手段で撮像対象に照射した光の当該撮像対象による反射光の強度分布を表す画像であって撮像対象の奥行き情報を含む第3の画像を得る技術について開示されている。
また特許文献2には、反射光画像と自然光画像の両方が取得できる画像取得装置を用いて、この画像取得装置が取得した自然画像から、反射特性情報を抽出して参照し、反射光画像を補正することで、正確な距離情報を取得する技術について開示されている。
特開2004−328657公報 特開2003−185412公報 井口征士、佐藤宏介、“三次元画像計測”、昭晃堂、1990 B. K. P. Horn著、NTTヒューマンインタフェース研究所プロジェクトRVT訳、“ロボットビジョン”、朝倉書店、1993 藤村恒太、大上靖弘、寺内智哉、江見哲一、福崎勤、“ディジタルカメラ画像から簡単に3次元データを生成するソフトウェア技術”、SANYO TECHNICAL REVIEW, Vol. 35, No.1, Jun. 2003 沼崎俊一、土井美和子、“手振りで気持ちを伝えるインタフェース〜モーションプロセッサ〜”、IPSJ Magazine, Vol.41, No.2, Feb. 2000
Currently, various methods for distance measurement and shape restoration have been proposed, but many require large-scale devices and special environments. For example, in the stereo method using the principle of triangulation described in Non-Patent Documents 1 and 2, a method using a plurality of cameras and a method using a laser projector have been proposed. Non-Patent Document 2 discloses an illuminance difference stereo method for obtaining a shape from a plurality of images taken under different illumination conditions. However, it is necessary to control the light source and to illuminate with an infinite light source. There is a problem that it is difficult to realize the light source in an actual environment. The shape-from-shading method that restores the shape from the shadows observed in a single image of Non-Patent Document 2 requires only a single light source, but assumes an infinity light source as in the illuminance difference stereo method. Control is necessary. However, it is difficult to realize these conditions in a real environment. Non-Patent Document 3 discloses Cyber Modeler as a method for restoring a three-dimensional shape using an inexpensive apparatus. This is done by placing an object on a turntable on which a reference mark is printed, taking multiple images with a commercially available digital camera while rotating the turntable, calculating the position of the camera from the reference mark, and A three-dimensional shape is calculated from a silhouette by acquiring an image. Although this device is inexpensive, there is a problem that there is a restriction on the environment, for example, a rotating table is necessary and background paper must be installed to extract the silhouette.
Non-Patent Document 4 uses a fact that near-infrared light is emitted from LEDs arranged around the camera and the intensity of the reflected light is almost inversely proportional to the distance to the object. A technique for obtaining a three-dimensional shape is disclosed.
Further, in Patent Document 1, an imaging instruction is input in an image input apparatus that includes an imaging unit that captures an image to be captured with a set exposure time, and a light emitting unit that irradiates the imaging target with light. Then, the exposure time is set to the first time, the light emitting means irradiates the imaging target with light, the imaging means takes the first image of the imaging target, the exposure time is set to the first time, The light emitting unit does not irradiate the imaging target with light, the imaging unit captures a second image of the imaging target, obtains the difference between the first image and the second image, and the light emitting unit irradiates the imaging target. A technique for obtaining a third image that is an image representing the intensity distribution of light reflected by the imaging target of light and that includes depth information of the imaging target is disclosed.
Further, Patent Document 2 uses an image acquisition device that can acquire both a reflected light image and a natural light image, extracts and refers to reflection characteristic information from the natural image acquired by the image acquisition device, and refers to the reflected light image. A technique for acquiring accurate distance information by correction is disclosed.
JP 2004-328657 A Japanese Patent Laid-Open No. 2003-185412 Seiji Iguchi, Kosuke Sato, “Three-dimensional image measurement”, Shoshodo, 1990 BKP Horn, NTT Human Interface Laboratory Project RVT translation, “Robot Vision”, Asakura Shoten, 1993 Kota Fujimura, Tomohiro Ohkami, Tomoya Terauchi, Tetsuichi Emi, Tsutomu Fukuzaki, “Software Technology for Easily Generating 3D Data from Digital Camera Images”, SANYO TECHNICAL REVIEW, Vol. 35, No.1, Jun. 2003 Shunichi Numasaki, Miwako Doi, “An interface that conveys feelings by motion-motion processor”, IPSJ Magazine, Vol.41, No.2, Feb. 2000

しかしながら、特許文献1に開示されている従来技術は、被写体に光を照射することにより得られた第1の画像と被写体に光を照射せずに得られた第2の画像との差分から第3の画像を得て、この第3の画像に基づいて距離を計測するものであるが、被写体の反射特性が一様でないために正確に距離を計測できないといった問題がある。
また特許文献2に開示されている従来技術は、特許文献1の課題を解決するために、被写体の反射特性を補正して距離を計測するものであるが、何れの場合も被写体が撮像装置に対して接近、或いは離間する方向へ傾いている場合には距離による照度変化と、傾斜による照度変化との区別をつけることが困難であり、撮像装置と被写体との間の距離を正確に測定できないといった問題がある。
本発明は、かかる課題に鑑み、被写体が撮像装置に対して接近、或いは離間する方向へ傾斜している場合でも、その傾斜角に応じて距離を補正することにより、被写体までの距離を更に正確に且つ簡便に計測が可能な撮像装置とそのアルゴリズムを提供することを目的とする。
However, the prior art disclosed in Patent Document 1 is based on the difference between the first image obtained by irradiating the subject with light and the second image obtained without irradiating the subject with light. 3 is obtained, and the distance is measured based on the third image. However, there is a problem that the distance cannot be measured accurately because the reflection characteristics of the subject are not uniform.
The prior art disclosed in Patent Document 2 is to measure the distance by correcting the reflection characteristics of the subject in order to solve the problem of Patent Document 1, but in either case, the subject is attached to the imaging device. However, it is difficult to distinguish between the illuminance change due to distance and the illuminance change due to inclination when tilting in the direction of approaching or separating, and the distance between the imaging device and the subject cannot be measured accurately. There is a problem.
In view of such problems, the present invention corrects the distance to the subject more accurately by correcting the distance according to the inclination angle even when the subject is inclined toward or away from the imaging device. It is another object of the present invention to provide an imaging apparatus and an algorithm capable of easily measuring.

本発明はかかる課題を解決するために、請求項1は、被写体からの撮像光を所定の光路に沿って導く撮像光学系と、該撮像光学系からの撮像光を受光して電気信号に変換する撮像素子と、該撮像素子から出力された電気信号に所要の処理を施す信号処理手段と、該信号処理手段により処理された画像信号を記憶する画像記憶手段と、被写体を照射する光を発光する閃光手段と、前記各手段を制御する制御手段と、を備え、前記制御手段が自然光により得られる第1の被写体画像と前記自然光中の被写体を前記閃光手段により閃光したときに得られる第2の被写体画像との差分から得られる第3の被写体画像に基づいて撮像装置から被写体までの距離を測定する撮像装置において、前記制御手段は前記第3の被写体画像に基づいて、当該被写体の傾斜量を演算して当該被写体までの距離を補正することを特徴とする。
本発明は撮像光学系、撮像素子、信号処理手段、画像記憶手段、閃光手段及び制御手段とを備えた撮像装置であって、特に自然光により得られる第1の被写体画像と自然光中の被写体を閃光手段により閃光したときに得られる第2の被写体画像から第3の被写体画像を取得して撮像装置から被写体までの距離を測定する場合、被写体の傾斜量を演算して距離の誤差を補正するものである。
請求項2は、前記制御手段は、前記撮像光学系から得られる前記第1の被写体画像と前記第2の被写体画像の差分を求めて第3の被写体画像を得る閃光画像取得手段と、該閃光画像取得手段により得られた画像に基づいて当該被写体までの距離を演算する距離演算手段と、前記閃光画像取得手段により得られた画像に基づいて当該被写体の傾きを演算する撮像画像傾き演算手段と、該撮像画像傾き演算手段により演算された前記被写体の傾き量に基づいて前記距離演算手段により得られた当該被写体までの距離を補正する距離補正手段と、を備えたことを特徴とする。
本発明の制御手段は、第1の被写体画像と第2の被写体画像の差分を求めて第3の被写体画像を取得し、この画像に基づいて被写体までの距離を演算すると共に、被写体の傾斜を演算し、この傾き量に基づいて被写体までの距離を補正して正確な距離を導き出すものである。
In order to solve this problem, the present invention provides an imaging optical system that guides imaging light from a subject along a predetermined optical path, and receives imaging light from the imaging optical system and converts it into an electrical signal. Imaging device, signal processing means for performing a required process on the electrical signal output from the imaging element, image storage means for storing the image signal processed by the signal processing means, and light for irradiating the subject Flashing means for controlling and each of the means for controlling each of the means, and the control means flashes a first subject image obtained by natural light and a subject in natural light by the flashing means. In the imaging device that measures the distance from the imaging device to the subject based on the third subject image obtained from the difference from the subject image, the control means is configured to measure the subject based on the third subject image. And it calculates the amount of tilt and corrects the distance to the subject.
The present invention is an image pickup apparatus including an image pickup optical system, an image pickup device, a signal processing unit, an image storage unit, a flash unit, and a control unit, and particularly flashes a first subject image obtained by natural light and a subject in natural light. When measuring the distance from the imaging device to the subject by acquiring the third subject image from the second subject image obtained when flashing by means, the amount of inclination of the subject is calculated to correct the distance error It is.
According to a second aspect of the present invention, the control means obtains a third subject image by obtaining a difference between the first subject image obtained from the imaging optical system and the second subject image, and the flashlight. Distance computing means for computing the distance to the subject based on the image obtained by the image obtaining means; and captured image inclination computing means for computing the inclination of the subject based on the image obtained by the flash image obtaining means; And a distance correction unit that corrects the distance to the subject obtained by the distance calculation unit based on the tilt amount of the subject calculated by the captured image tilt calculation unit.
The control means of the present invention obtains a third subject image by obtaining a difference between the first subject image and the second subject image, calculates a distance to the subject based on the image, and controls the inclination of the subject. An accurate distance is derived by calculating and correcting the distance to the subject based on the amount of inclination.

請求項3は、前記被写体上の小領域の光軸に沿ったレンズからの距離は、前記閃光手段の放射強度および対象物体の反射率の平方根に比例し、照度の差分の平方根に反比例することを特徴とする。
被写体上の小領域の光軸に沿ったレンズからの距離は、閃光手段の放射強度および対象物体の反射率の平方根に比例し、照度の差分の平方根に反比例する。
請求項4は、前記撮像光学系から前記撮像素子までの距離をf、前記撮像光学系のレンズ直径をd、前記被写体表面上の小領域から前記レンズの中心に向かう光線が当該レンズの光軸となす角度をα、前記光線と前記被写体表面の法線となす角度をθ、前記閃光手段の放射強度をI、前記閃光手段を使用したときの前記撮像素子上の放射照度をEF image、前記閃光手段を使用しなかったときの前記撮像素子上の放射照度をENF imageとすると、前記撮像素子上の小領域の放射照度Eimage=EF image−ENF imageであり、前記閃光手段の位置を前記レンズの中心と同じ位置であると仮定するとαf=α、θf=θとなり、且つ前記被写体表面が反射率rの拡散反射面であると仮定したとき、前記被写体上の小領域の光軸に沿った前記レンズからの距離zを、

により求めることを特徴とする。
反射光は、物体表面法線と視線とのなす角のコサインに比例して弱くなる。従って、面の傾きを考慮しないと計算結果は実際よりも距離が遠い結果になってしまう。そこで本発明のアルゴリズムでは、被写体表面上の小領域からレンズの中心に向かう光線が当該レンズの光軸となす角度αと、光線と被写体表面の法線となす角度θを、距離を導出する式に導入した点である。これにより、被写体の傾斜による照度の変化を補正することができるので、正確な距離を測定することができる。
According to a third aspect of the present invention, the distance from the lens along the optical axis of the small area on the subject is proportional to the square root of the radiant intensity of the flash means and the reflectance of the target object, and inversely proportional to the square root of the difference in illuminance. It is characterized by.
The distance from the lens along the optical axis of the small area on the subject is proportional to the square root of the radiant intensity of the flashing means and the reflectance of the target object, and inversely proportional to the square root of the difference in illuminance.
According to a fourth aspect of the present invention, the distance from the imaging optical system to the imaging element is f, the lens diameter of the imaging optical system is d, and a light beam traveling from a small area on the subject surface toward the center of the lens is an optical axis of the lens. Α, the angle between the ray and the normal of the subject surface, θ, the radiant intensity of the flash means, I, the irradiance on the image sensor when the flash means is used, E F image , If the irradiance on the image sensor when the flash means is not used is E NF image , the irradiance E image = E F image −E NF image of a small area on the image sensor, and the flash means Is assumed to be the same position as the center of the lens, α f = α, θ f = θ, and the subject surface is a diffuse reflection surface having a reflectance r. The distance z from the lens along the optical axis of the region The

It is calculated | required by.
The reflected light becomes weaker in proportion to the cosine of the angle formed by the object surface normal and the line of sight. Therefore, if the inclination of the surface is not taken into consideration, the calculation result will be a result farther than the actual distance. Therefore, in the algorithm of the present invention, the angle α between the light beam from the small area on the object surface toward the center of the lens and the optical axis of the lens and the angle θ between the light beam and the normal of the object surface are used to derive the distance. It is a point introduced in. Thereby, since the change of the illumination intensity by the inclination of a to-be-photographed object can be correct | amended, an exact distance can be measured.

請求項5は、被写体までの距離を測定する方法において、自然光により得られる第1の被写体画像と自然光中の被写体を前記閃光手段により閃光したときに得られる第2の被写体画像との差分を求めて第3の被写体画像を得る閃光画像取得手順と、該閃光画像取得手順により得られた画像に基づいて当該被写体までの距離を演算する距離演算手順と、前記閃光画像取得手順により得られた画像に基づいて当該被写体の傾きを演算する撮像画像傾き演算手順と、該撮像画像傾き演算手順により演算された前記被写体の傾き量に基づいて前記距離演算手順により得られた当該被写体までの距離を補正する距離補正手順と、を備えたことを特徴とする。
請求項6は、被写体までの距離を計測するために制御手段を、自然光により得られる第1の被写体画像と自然光中の被写体を前記閃光手段により閃光したときに得られる第2の被写体画像との差分を求めて第3の被写体画像を得る閃光画像取得手段、該閃光画像取得手段により得られた画像に基づいて当該被写体までの距離を演算する距離演算手段、前記閃光画像取得手段により得られた画像に基づいて当該被写体の傾きを演算する撮像画像傾き演算手段、該撮像画像傾き演算手段により演算された前記被写体の傾き量に基づいて前記距離演算手段により得られた当該被写体までの距離を補正する距離補正手段、として機能させることを特徴とする。
制御部はCPUにより構成されている。そしてこのCPUはROMに記憶されたプログラムにより動作される。従って、本発明の撮像画像距離測定プログラムは、閃光画像取得手段、距離演算手段、撮像画像傾き演算手段、及び距離補正手段の一連の機能を実行するように構成されている。
請求項7は、請求項6に記載の撮像画像距離測定プログラムをコンピュータが読み取り可能な形式で記録したことを特徴とする。
According to a fifth aspect of the present invention, in the method for measuring the distance to the subject, a difference between the first subject image obtained by natural light and the second subject image obtained when the subject in natural light is flashed by the flash means is obtained. The flash image acquisition procedure for obtaining the third subject image, the distance calculation procedure for calculating the distance to the subject based on the image obtained by the flash image acquisition procedure, and the image obtained by the flash image acquisition procedure The captured image tilt calculation procedure for calculating the tilt of the subject based on the correction and the distance to the subject obtained by the distance calculation procedure based on the tilt amount of the subject calculated by the captured image tilt calculation procedure And a distance correction procedure.
According to a sixth aspect of the present invention, there is provided a control means for measuring the distance to the subject, the first subject image obtained by natural light and the second subject image obtained when the subject in natural light is flashed by the flash means. The flash image acquisition means for obtaining the third subject image by obtaining the difference, the distance calculation means for calculating the distance to the subject based on the image obtained by the flash image acquisition means, and the flash image acquisition means A captured image tilt calculating means for calculating the tilt of the subject based on the image, and correcting the distance to the subject obtained by the distance calculating means based on the tilt amount of the subject calculated by the captured image tilt calculating means It is made to function as a distance correction means to perform.
The control unit is composed of a CPU. The CPU is operated by a program stored in the ROM. Therefore, the captured image distance measurement program of the present invention is configured to execute a series of functions of a flash image acquisition unit, a distance calculation unit, a captured image tilt calculation unit, and a distance correction unit.
A seventh aspect is characterized in that the captured image distance measuring program according to the sixth aspect is recorded in a computer-readable format.

請求項1の発明によれば、特に自然光により得られる第1の被写体画像と自然光中の被写体を閃光手段により閃光したときに得られる第2の被写体画像から第3の被写体画像を取得して、被写体の傾斜による距離の誤差を補正するので、簡易な方法で被写体までの距離を正確に測定することができる。
また請求項2、5では、制御手段は、第1の被写体画像と第2の被写体画像の差分を求めて第3の被写体画像を取得し、この画像に基づいて被写体までの距離を演算すると共に、被写体の傾斜を演算し、この傾き量に基づいて被写体までの距離を補正するので、被写体が傾斜していても明るさを補正して正確な距離を演算することができる。
また請求項3、4では、本発明のアルゴリズムでは、被写体表面上の小領域からレンズの中心に向かう光線が当該レンズの光軸となす角度αと、光線と被写体表面の法線となす角度θを、距離を導出する式に導入したので、被写体の傾斜角に応じて距離を補正した結果を演算することができる。
また請求項6では、本発明の撮像画像距離測定プログラムは、閃光画像取得手段、距離演算手段、撮像画像傾き演算手段、及び距離補正手段の一連の機能を実行するように構成されているので、撮像装置としての基本的な機能のほかに、被写体までの距離を被写体が傾いていても正確に演算することをプログラムにより実行することができる。
また請求項7では、撮像画像距離測定プログラムをコンピュータが読み取り可能な形式で記録媒体に記録することにより、この記録媒体を持ち運ぶことにより何処でもプログラムを稼動することができる。
According to the invention of claim 1, the third subject image is obtained from the first subject image obtained by natural light and the second subject image obtained when the subject in natural light is flashed by the flash means, Since the error in the distance due to the inclination of the subject is corrected, the distance to the subject can be accurately measured by a simple method.
Further, in claims 2 and 5, the control means obtains a third subject image by obtaining a difference between the first subject image and the second subject image, and calculates a distance to the subject based on the image. Since the inclination of the subject is calculated and the distance to the subject is corrected based on the amount of inclination, the correct distance can be calculated by correcting the brightness even if the subject is inclined.
According to the third and fourth aspects of the present invention, in the algorithm of the present invention, an angle α formed by a light beam traveling from a small region on the object surface toward the center of the lens with the optical axis of the lens and an angle θ formed between the light beam and the normal line of the object surface Is introduced in the equation for deriving the distance, so that the result of correcting the distance according to the tilt angle of the subject can be calculated.
Further, in claim 6, the captured image distance measurement program of the present invention is configured to execute a series of functions of the flash image acquisition means, the distance calculation means, the captured image inclination calculation means, and the distance correction means. In addition to the basic functions of the imaging device, the program can accurately calculate the distance to the subject even if the subject is tilted.
According to a seventh aspect of the present invention, the captured image distance measurement program is recorded on a recording medium in a computer-readable format, and the program can be operated anywhere by carrying the recording medium.

以下、本発明を図に示した実施形態を用いて詳細に説明する。但し、この実施形態に記載される構成要素、種類、組み合わせ、形状、その相対配置などは特定的な記載がない限り、この発明の範囲をそれのみに限定する主旨ではなく単なる説明例に過ぎない。
図1は本発明の距離情報を得る一手法を説明する模式図である。距離情報を得るには、専用の装置や特殊な環境が必要となり手軽に行うことは難しい。そこで本発明では図1に示すように、自然光3中でフラッシュ1を使用してフラッシュ光1aを照射して撮影した画像4aと、フラッシュ1を使用せずに自然光3だけで撮像した画像4bの差分を取ることにより、自然光3を除去したフラッシュ光1aのみによる画像4cを得ることができる。フラッシュ光1aからの反射光は距離の二乗に比例して弱くなる。この性質を利用することにより、差分画像4cから距離を得ることができる。また、反射光の強度は物体表面の傾きによって変化するが、本発明ではこの補正方法も提案している。本発明により−般的なデジタルカメラを使用して誰でも距離情報を容易に得ることができる。
図2は本発明のデジタルカメラ2の内部の構成を示すブロック図である。同じ構成要素には同じ符号を付して説明する。このデジタルカメラ2は、複数のレンズ、絞り等により構成され、被写体からの撮像光を所定の光路に沿ってCCD(撮像素子)11に導く光学系(撮像光学系)10と、光学系10からの撮像光を受光して電気信号に変換するCCD(撮像素子)11と、CCD11により変換されたアナログ信号をデジタル信号に変換するA/D変換器12と、A/D変換器12により変換されたデジタル信号に所要の処理を施す信号処理回路(信号処理手段)13と、信号処理回路13により処理された画像信号を記憶するフレームメモリ(画像記憶手段)14と、被写体を照射する光を発光するフラッシュ(閃光手段)1と、全ての回路を制御する制御部(制御手段)15と、を備えて構成される。尚、図2のブロック図では、本発明を説明する主要な部分のみを記載してあり、それ以外の部分は省略している。
Hereinafter, the present invention will be described in detail with reference to embodiments shown in the drawings. However, the components, types, combinations, shapes, relative arrangements, and the like described in this embodiment are merely illustrative examples and not intended to limit the scope of the present invention only unless otherwise specified. .
FIG. 1 is a schematic diagram for explaining a method for obtaining distance information according to the present invention. In order to obtain distance information, a dedicated device and a special environment are required, which is difficult to carry out easily. Therefore, in the present invention, as shown in FIG. 1, an image 4 a captured by irradiating flash light 1 a using a flash 1 in natural light 3 and an image 4 b captured using only natural light 3 without using the flash 1. By taking the difference, it is possible to obtain an image 4c using only the flash light 1a from which the natural light 3 is removed. The reflected light from the flash light 1a becomes weaker in proportion to the square of the distance. By utilizing this property, the distance can be obtained from the difference image 4c. Further, the intensity of the reflected light varies depending on the inclination of the object surface, but the present invention also proposes this correction method. According to the present invention, anyone can easily obtain distance information using a general digital camera.
FIG. 2 is a block diagram showing an internal configuration of the digital camera 2 of the present invention. The same components will be described with the same reference numerals. The digital camera 2 includes a plurality of lenses, a diaphragm, and the like, and includes an optical system (imaging optical system) 10 that guides imaging light from a subject to a CCD (imaging device) 11 along a predetermined optical path, and an optical system 10. A CCD (imaging device) 11 that receives the imaged light and converts it into an electrical signal, an A / D converter 12 that converts the analog signal converted by the CCD 11 into a digital signal, and an A / D converter 12 A signal processing circuit (signal processing means) 13 for performing required processing on the digital signal, a frame memory (image storage means) 14 for storing an image signal processed by the signal processing circuit 13, and a light for irradiating the subject. And a control section (control means) 15 for controlling all circuits. In the block diagram of FIG. 2, only the main parts for explaining the present invention are shown, and the other parts are omitted.

次に本発明のデジタルカメラ2の概略動作について説明する。図示しない被写体から反射した光学画像は光学系10により合焦されてCCD11の面に光の強弱となって投影される。CCD11はその光の強弱を2次元的な画像として電気信号の強弱に変換してA/D変換器12に伝達する。A/D変換器12ではその信号を信号レベルに応じて所定のビット(一般的には8ビット)に変換して信号処理回路13に伝達する。信号処理回路13ではデジタル信号に基づいてホワイトバランス等の信号処理を行った後にフレームメモリ14に記憶する。尚、フラッシュ1は被写体が露出不足の時に被写体を照明するために発光される。これら全ての制御は制御部15により制御される。
図3は図2の制御部の機能ブロック図である。この制御部15は光学系10から得られる図1の自然光3中でフラッシュ1を使用してフラッシュ光1aを照射して撮影した画像4a(第1の被写体画像)とフラッシュ1を使用せずに自然光3だけで撮像した画像4b(第2の被写体画像)の差分を求めて画像4c(第3の被写体画像)を得るフラッシュ画像取得部(閃光画像取得手段)22と、フラッシュ画像取得部22により得られた画像に基づいて被写体までの距離を演算する撮像画像距離演算部(距離演算手段)23と、フラッシュ画像取得部22により得られた画像に基づいてカメラに対して接近、或いは離間する方向への傾きを演算する撮像画像傾き演算部(撮像画像傾き演算手段)24と、撮像画像傾き演算部24により演算された被写体の傾き量に基づいて撮像画像距離演算部23により得られた被写体までの距離を補正する距離補正演算部(距離補正手段)25と、を備えて構成される。
本発明では、デジタルカメラ2を使用して同じ被写体をフラッシュ光1aを使用した場合と使用しない場合の2通り撮像し、2枚の画像間での明るさの差を用いて距離計測を行う。即ち、デジタルカメラ2で撮像した画像の画素値は、CCD11上の放射照度に比例している。放射照度は線形性が成り立つので、フラッシュ光1aを照射して撮像した画像から得た放射照度と、同じ環境下でフラッシュ光1aを照射せずに撮像した画像から得た放射照度の差をとることによって、フラッシュ光1aによる反射光だけの放射照度値を得ることができる。反射光の強度が物体との距離の二乗にほぼ比例して弱くなることを利用することで距離情報を取得することができる。本発明はフラッシュ以外の光源環境を知る必要がないので、暗室などの特殊な環境を用意する必要はなく、安価な装置で簡便に距離計測ができるという利点がある。
Next, the schematic operation of the digital camera 2 of the present invention will be described. An optical image reflected from a subject (not shown) is focused by the optical system 10 and projected onto the surface of the CCD 11 as light intensity. The CCD 11 converts the intensity of the light into an intensity of an electric signal as a two-dimensional image and transmits it to the A / D converter 12. The A / D converter 12 converts the signal into a predetermined bit (generally 8 bits) according to the signal level and transmits it to the signal processing circuit 13. The signal processing circuit 13 performs signal processing such as white balance on the basis of the digital signal and then stores it in the frame memory 14. The flash 1 emits light to illuminate the subject when the subject is underexposed. All these controls are controlled by the control unit 15.
FIG. 3 is a functional block diagram of the control unit of FIG. This control unit 15 uses the flash 1 in the natural light 3 of FIG. 1 obtained from the optical system 10 and irradiates the flash light 1 a and captures the image 4 a (first subject image) without using the flash 1. A flash image acquisition unit (flash image acquisition unit) 22 that obtains an image 4c (third subject image) by obtaining a difference between images 4b (second subject image) captured only with natural light 3 and a flash image acquisition unit 22 A captured image distance calculation unit (distance calculation means) 23 that calculates the distance to the subject based on the obtained image and a direction in which the camera approaches or separates from the camera based on the image obtained by the flash image acquisition unit 22 A captured image tilt calculation unit (captured image tilt calculation means) 24 that calculates the tilt of the captured image and a captured image distance calculation based on the tilt amount of the subject calculated by the captured image tilt calculation unit 24. Distance correcting operation unit for correcting the distance to the subject obtained by the parts 23 and (distance correction means) 25, and includes a.
In the present invention, the digital camera 2 is used to capture the same subject in two ways, when the flash light 1a is used and when it is not used, and distance measurement is performed using the difference in brightness between the two images. That is, the pixel value of the image captured by the digital camera 2 is proportional to the irradiance on the CCD 11. Since the irradiance is linear, the difference between the irradiance obtained from the image captured by irradiating the flash light 1a and the irradiance obtained from the image captured without irradiating the flash light 1a in the same environment is taken. Thus, the irradiance value of only the reflected light from the flash light 1a can be obtained. The distance information can be acquired by utilizing the fact that the intensity of the reflected light becomes weak in proportion to the square of the distance to the object. Since the present invention does not need to know the light source environment other than the flash, there is no need to prepare a special environment such as a dark room, and there is an advantage that distance measurement can be easily performed with an inexpensive apparatus.

図4は本発明の距離情報を得る一手法を説明するフローチャートである。図3を参照して説明する。まず光学系10から得られる図1の自然光3中でフラッシュ1を使用せずに自然光3だけで撮像した画像4b(この画像を画像Aとする)をメモリに記憶する(S1)。次に光学系10から得られる図1の自然光3中でフラッシュ1を使用してフラッシュ光1aを照射して撮影した画像4a(この画像を画像Bとする)をメモリに記憶する(S2)。(尚、画像Aと画像Bの撮影順序は逆でも構わない)そしてフラッシュ画像取得部22により画像Bと画像Aの差分をとりその画像を画像Cとして、メモリに記憶する(S3)。次にフラッシュ画像取得部22に記憶された画像Cに基づいて撮像画像距離演算部23により被写体までの距離を演算する(S4)。またフラッシュ画像取得部22に記憶された画像Cに基づいて撮像画像傾き演算部24により被写体の傾きを演算する(S5)。そして距離補正演算部25により被写体までの距離と被写体の傾きから撮像画像距離演算部23により演算された被写体までの距離を補正し(S6)、補正した距離データをデジタルカメラ2の表示部に表示する(S7)。   FIG. 4 is a flowchart illustrating one method for obtaining distance information according to the present invention. This will be described with reference to FIG. First, in the natural light 3 of FIG. 1 obtained from the optical system 10, an image 4 b (this image is referred to as an image A) captured only with the natural light 3 without using the flash 1 is stored in the memory (S 1). Next, an image 4a (this image is referred to as an image B) taken by irradiating the flash light 1a using the flash 1 in the natural light 3 of FIG. 1 obtained from the optical system 10 is stored in the memory (S2). (The photographing order of the images A and B may be reversed.) Then, the flash image acquisition unit 22 takes the difference between the images B and A and stores the image in the memory as the image C (S3). Next, based on the image C stored in the flash image acquisition unit 22, the captured image distance calculation unit 23 calculates the distance to the subject (S4). Further, based on the image C stored in the flash image acquisition unit 22, the captured image tilt calculation unit 24 calculates the tilt of the subject (S5). Then, the distance correction calculation unit 25 corrects the distance to the subject calculated by the captured image distance calculation unit 23 from the distance to the subject and the inclination of the subject (S6), and the corrected distance data is displayed on the display unit of the digital camera 2. (S7).

図5は本発明のカメラ座標系について説明する図である。図5を参照して距離計算式の導出について説明する。まず本発明では以下の条件を仮定する。
(a)物体32表面の反射は拡散反射のみであり鏡面反射はしない。
(b)フラッシュ1とレンズ31の中心の位置は等しい。
物体32上のある1点での放射輝度と、その点に対応するCCD画像30上の1点での放射照度との関係を考える。CCD画像面30から距離f離れた直径dのレンズ31を考える。物体32表面上の小領域の面積をδO、対応するCCD画像30上の小領域の面積をδIとする。物体上の小領域δOからレンズ31の中心に向かう光線35が光軸33と角度αをなし、この光線35と表面法線34がなす角度がθであるとする。物体上の小領域δOが光軸33に沿ってレンズ31から距離のところにあるとすると、それに対応する画像小領域の放射照度は次式で与えられる。
(1)
ここで、Lobjectは物体小領域の放射輝度である。そして双方向性反射率分布関数ρ(θi,φi;θe,φe)を導入すると式(1)は、

(2)
となる。ここで、Eobjectは物体上の放射照度である。ここで双方向性反射率分布関数とは、ある視線方向(θi,φe)と光の照射方向(θi,φi)に対する表面の反射特性を表したもの、つまり放射照度に対する放射輝度の比率を表す関数である。
FIG. 5 is a diagram for explaining the camera coordinate system of the present invention. The derivation of the distance calculation formula will be described with reference to FIG. First, the following conditions are assumed in the present invention.
(A) The reflection on the surface of the object 32 is only diffuse reflection, and not specular reflection.
(B) The positions of the centers of the flash 1 and the lens 31 are equal.
Consider the relationship between the radiance at one point on the object 32 and the irradiance at one point on the CCD image 30 corresponding to that point. Consider a lens 31 with a diameter d that is a distance f away from the CCD image plane 30. The area of the small region on the surface of the object 32 is δO, and the area of the corresponding small region on the CCD image 30 is δI. It is assumed that a light beam 35 from the small region δO on the object toward the center of the lens 31 forms an angle α with the optical axis 33, and an angle formed by the light beam 35 and the surface normal 34 is θ. If the small area δO on the object is at a distance from the lens 31 along the optical axis 33, the irradiance of the corresponding small image area is given by the following equation.
(1)
Here, L object is the radiance of the small object region. When the bidirectional reflectance distribution function ρ (θ i , φ i ; θ e , φ e ) is introduced, the equation (1) is

(2)
It becomes. Here, E object is the irradiance on the object. Here, the bidirectional reflectance distribution function represents the reflection characteristics of the surface with respect to a certain gaze direction (θ i , φ e ) and light irradiation direction (θ i , φ i ), that is, radiance with respect to irradiance. Is a function representing the ratio of.

次に光源がフラッシュのみの場合を考える。フラッシュの放射強度をIとすると、物体上におけるフラッシュ光による放射照度は、
(3)
となる。ここで、θfはフラッシュから物体小領域δOへ向かう光線35と表面放線34とがなす角である。また、δωはフラッシュから物体上の微小領域を見たときの立体角で、
(4)
と表わせる。式(3)、(4)を考慮すると式(2)は、
(5)
となる。
Next, consider the case where the light source is only a flash. When the radiant intensity of the flash is I, the irradiance due to the flash light on the object is
(3)
It becomes. Here, θ f is an angle formed by the light ray 35 directed from the flash toward the small object region δO and the surface ray 34. Also, δω is the solid angle when looking at the minute area on the object from the flash,
(4)
It can be expressed as Considering equations (3) and (4), equation (2) is
(5)
It becomes.

フラッシュを使用したときの画像上の放射照度をEF image、フラッシュを使用しなかったときの画像上の放射照度をENF imageとすると、Eimage=EF image−ENF imageである。
ここで、フラッシュの位置はレンズの中心と同じ位置であると仮定しているので、αf=α、θf=θとおける。また、物体表面が反射率rの拡散反射面であると仮定すると、双方向性反射率分布関数は、
(6)
であるので式(5)より、
(7)
を得る。
式(7)より、距離はフラッシュの放射強度および対象物体の反射率の平方根に比例し、照度の差分の平方根に反比例することがわかる。先に述べたようにCCD面30の放射照度と画像の輝度値は比例するので、2枚の画像の差分から距離を求めることができる。
しかし、θが未知数であるのでこの段階では距離を求めることはできないので、面法線の推定を行なう。式(7)において、視線方向と物体表面の法線とがなす角θが未知数であるので、これを推定する必要がある。
If the irradiance on the image when the flash is used is E F image , and the irradiance on the image when the flash is not used is E NF image , E image = E F image −E NF image .
Here, since it is assumed that the position of the flash is the same as the center of the lens, α f = α and θ f = θ can be set. Assuming that the object surface is a diffuse reflection surface with a reflectance r, the bidirectional reflectance distribution function is
(6)
Therefore, from equation (5),
(7)
Get.
From equation (7), it can be seen that the distance is proportional to the square root of the flash radiation intensity and the reflectance of the target object, and inversely proportional to the square root of the illuminance difference. As described above, since the irradiance of the CCD surface 30 is proportional to the luminance value of the image, the distance can be obtained from the difference between the two images.
However, since θ is an unknown number, the distance cannot be obtained at this stage, so the surface normal is estimated. In equation (7), the angle θ formed by the line-of-sight direction and the normal of the object surface is an unknown quantity, and therefore it is necessary to estimate this.

図6はθを推定する場合の説明図である。CCD30上の第i画素と第i+1画素に写っている物体上の点をそれぞれPi、Pi+1とし、レンズ中心からCCD30上の第i画素と第i+1画素へのベクトルをそれぞれαi、αi+1、画像の差分により得たフラッシュのみによる放射照度をそれぞれEi、Ei+1とする。また、物体の表面は局所的に平面であると仮定し法線ベクトルをnとする。ここでベクトル
は、
(8)
と表せる。Pii+1とnは垂直なので、
(9)
である。これより、
(10)
を得る。また、
(11)
と表せることから、
(12)

を得る。式(12)を式(10)へ代入すると、
(13)
となる。式(7)より、
(14)
を得るので、式(13)と式(14)を連立すると、
(15)
となる。右辺をaと置くと、
(16)
となり、
はaを用いて、
(17)
と表せる。カメラの視野角が180[deg]を超えない限りziは負であり、通常は180[deg]未満であるので、式(17)から既知の情報のみで物体表面に平行なベクトルの向きが得られることになる。
この方法を用いて、注目する画素の四近傍でそれぞれ面に平行なベクトルを求め、それらの外積から三次元での面法線を求めることによりθの推定が可能になる。
FIG. 6 is an explanatory diagram for estimating θ. Points on the object appearing on the i th pixel and the i + 1 pixel on the CCD 30 are P i and P i + 1 , respectively, and vectors from the lens center to the i th pixel and the i + 1 pixel on the CCD 30 are α i , Let α i + 1 be the irradiance of only the flash obtained from the difference between the images, and let it be E i and E i + 1 , respectively. Further, it is assumed that the surface of the object is locally flat and the normal vector is n. Vector here
Is
(8)
It can be expressed. Since Pi Pi + 1 and n are vertical,
(9)
It is. Than this,
(10)
Get. Also,
(11)
Because it can be expressed as
(12)

Get. Substituting equation (12) into equation (10),
(13)
It becomes. From equation (7)
(14)
Therefore, when Equation (13) and Equation (14) are combined,
(15)
It becomes. If the right side is a,
(16)
And
Use a
(17)
It can be expressed. As long as the viewing angle of the camera does not exceed 180 [deg], z i is negative and is usually less than 180 [deg]. Will be obtained.
Using this method, θ can be estimated by obtaining vectors parallel to the surface in the four neighborhoods of the pixel of interest, and obtaining a three-dimensional surface normal from their outer product.

(実施例1)
対象物として図7に示すホワイトスクリーン(SANYO KA−LCV−101KZ)を約1.55[m]離れた位置で正面から撮像した。ホワイトスクリーン35は反射特性が均等な拡散反射に近く、図5で説明した仮定(b)に対して適当な対象である。結果を図8に示す。図8(a)はx−z軸からみた結果であり、図8(b)はx−y−z軸からみた結果である。この結果より、ばらつきはあるもののほぼ平面上に分布していることがわかる。このばらつきの主な原因は、ノイズが完全に除去できていないことであると考えられる。また中心付近にやや突出した部分があるが、これは鏡面反射成分の影響によるものと考えられる。
(実施例2)
次に同じ対象物を正面から30[deg]傾いた位置から撮像した。中心との距離は実施例1と同じである。結果を図9に示す。図9(a)はx−z軸からみた結果であり、図9(b)はx−y−z軸からみた結果である。反射光は物体表面法線と視線とのなす角のコサインに比例して弱くなる。よって、面の傾きを考慮しないと計算結果は実際よりも距離が遠い結果になってしまう。本発明では、図5で説明した傾きを考慮する部分を含んでいるので、この部分の有効性の検証のためこの実験を行った。結果を図9に示す。実施例1の結果よりもややばらつきが大きくなっているが、中心の距離はほぼ同じであり、30[deg]傾いた平面に近い位置に分布していることがわかる。実施例1よりもばらつきが大きくなった原因としては、隣接画素との照度比で面法線を推定しているために、同じノイズ強度でも面の傾きが大きいときにノイズの影響が強くなってしまうことが考えられる。
Example 1
A white screen (SANYO KA-LCV-101KZ) shown in FIG. 7 as an object was imaged from the front at a position about 1.55 [m] away. The white screen 35 is close to diffuse reflection with uniform reflection characteristics, and is a suitable target for the assumption (b) described in FIG. The results are shown in FIG. FIG. 8A shows the result seen from the xz axis, and FIG. 8B shows the result seen from the xyz axis. From this result, it can be seen that although there is variation, it is distributed almost on a plane. It is considered that the main cause of this variation is that noise has not been completely removed. There is a slightly protruding part near the center, which is considered to be due to the influence of the specular reflection component.
(Example 2)
Next, the same object was imaged from a position inclined 30 [deg] from the front. The distance from the center is the same as in the first embodiment. The results are shown in FIG. FIG. 9A shows the result viewed from the xz axis, and FIG. 9B shows the result viewed from the xyz axis. The reflected light becomes weaker in proportion to the cosine of the angle formed by the object surface normal and the line of sight. Therefore, if the inclination of the surface is not taken into consideration, the calculation result is a result that is farther than the actual distance. Since the present invention includes a portion considering the inclination described with reference to FIG. 5, this experiment was performed to verify the effectiveness of this portion. The results are shown in FIG. Although the variation is slightly larger than the result of Example 1, it can be seen that the distance between the centers is substantially the same and distributed at a position close to a plane inclined by 30 [deg]. The reason why the variation is larger than that of the first embodiment is that the surface normal is estimated based on the illuminance ratio with the adjacent pixels, and therefore the influence of noise becomes strong when the surface inclination is large even with the same noise intensity. It is possible to end up.

本発明は、上述した実施形態のみに限定されたものではない。上述した実施形態の撮像装置を構成する各機能をそれぞれプログラム化し、あらかじめCD−ROM等の記録媒体に書き込んでおき、コンピュータに搭載したCD−ROMドライブのような媒体駆動装置にこのCD−ROM等を装着して、これらのプログラムをコンピュータのメモリあるいは記憶装置に格納し、それを実行することによって、本発明の目的が達成されることは言うまでもない。
この場合、記録媒体から読み出されたプログラム自体が上述した実施形態の機能を実現することになり、そのプログラムおよびそのプログラムを記録した記録媒体も本発明を構成することになる。
なお、プログラムを格納する記録媒体としては半導体媒体(例えば、ROM、不揮発性メモリカード等)、光媒体(例えば、DVD、MO、MD、CD等)、磁気媒体(例えば、磁気テープ、フレキシブルディスク等)等のいずれであってもよい。
また、ロードしたプログラムを実行することにより上述した実施形態の機能が実現されるだけでなく、そのプログラムの指示に基づき、オペレーティングシステムあるいは他のアプリケーションプログラム等と共同して処理することによって上述した実施形態の機能が実現される場合も含まれる。
また市場に流通させる場合には、可搬型の記録媒体にプログラムを格納して流通させたり、インターネット等を介して接続されたサーバコンピュータの記憶装置にプログラムを格納しておき、インターネット等を通じて他のコンピュータに転送することもできる。この場合、このサーバコンピュータの記憶装置も本発明の記録媒体に含まれる。
なお、コンピュータでは、可搬型の記録媒体上のプログラム、または転送されてくるプログラムを、コンピュータに接続した記録媒体にインストールし、そのインストールされたプログラムを実行することによって上述した実施形態の機能が実現される。
The present invention is not limited only to the above-described embodiments. Each function constituting the imaging device of the above-described embodiment is programmed, written in advance on a recording medium such as a CD-ROM, and this CD-ROM or the like is stored in a medium driving device such as a CD-ROM drive mounted on a computer. Needless to say, the object of the present invention can be achieved by mounting these programs, storing these programs in a memory or storage device of a computer, and executing them.
In this case, the program itself read from the recording medium realizes the functions of the above-described embodiment, and the program and the recording medium recording the program also constitute the present invention.
As a recording medium for storing the program, a semiconductor medium (for example, ROM, nonvolatile memory card, etc.), an optical medium (for example, DVD, MO, MD, CD, etc.), a magnetic medium (for example, magnetic tape, flexible disk, etc.) ) Or the like.
Further, not only the functions of the above-described embodiment are realized by executing the loaded program, but also the above-described implementation by cooperating with the operating system or other application programs based on the instructions of the program. The case where the function of the form is realized is also included.
In the case of distribution to the market, the program is stored and distributed on a portable recording medium, or the program is stored in a storage device of a server computer connected via the Internet or the like. It can also be transferred to a computer. In this case, the storage device of this server computer is also included in the recording medium of the present invention.
In the computer, the functions of the above-described embodiments are realized by installing a program on a portable recording medium or a transferred program on a recording medium connected to the computer and executing the installed program. Is done.

以上の通り本発明によれば、特に自然光により得られる第1の被写体画像4bと自然光中の被写体をフラッシュ1により閃光したときに得られる第2の被写体画像4aから第3の被写体画像4cを取得して、被写体の傾斜による距離の誤差を補正するので、簡易な方法で被写体までの距離を正確に測定することができる。
また、制御部15は、第1の被写体画像4bと第2の被写体画像4aの差分を求めて第3の被写体画像4cを取得し、この画像に基づいて被写体までの距離を演算すると共に、被写体の傾斜を演算し、この傾き量に基づいて被写体までの距離を補正するので、被写体が傾斜していても明るさを補正して正確な距離を演算することができる。
また、本発明のアルゴリズムでは、被写体表面上の小領域σOからレンズ31の中心に向かう光線35が当該レンズ31の光軸33となす角度αと、光線35と被写体表面の法線34となす角度θを、距離を導出する式に導入したので、被写体の傾斜角に応じて距離を補正した結果を演算することができる。
また、本発明の撮像画像距離測定プログラムは、フラッシュ画像取得部22、撮像画像距離演算部23、撮像画像傾き演算部24、及び距離補正演算部25の一連の機能を実行するように構成されているので、デジタルカメラとしての基本的な機能のほかに、被写体までの距離を被写体が傾いていても正確に演算することをプログラムにより実行することができる。
また、撮像画像距離測定プログラムをコンピュータが読み取り可能な形式で記録媒体に記録することにより、この記録媒体を持ち運ぶことにより何処でもプログラムを稼動することができる。
As described above, according to the present invention, the third subject image 4c is obtained from the first subject image 4b obtained by natural light and the second subject image 4a obtained when the subject in natural light is flashed by the flash 1. Since the error in the distance due to the inclination of the subject is corrected, the distance to the subject can be accurately measured by a simple method.
Further, the control unit 15 obtains a third subject image 4c by obtaining a difference between the first subject image 4b and the second subject image 4a, calculates a distance to the subject based on the image, and calculates the subject. Since the distance to the subject is corrected based on the amount of inclination, the correct distance can be calculated by correcting the brightness even if the subject is tilted.
Further, according to the algorithm of the present invention, the angle α between the light beam 35 from the small region σO on the object surface toward the center of the lens 31 and the optical axis 33 of the lens 31 and the angle between the light beam 35 and the normal line 34 of the object surface. Since θ is introduced in the equation for deriving the distance, the result of correcting the distance according to the inclination angle of the subject can be calculated.
The captured image distance measurement program of the present invention is configured to execute a series of functions of the flash image acquisition unit 22, the captured image distance calculation unit 23, the captured image tilt calculation unit 24, and the distance correction calculation unit 25. Therefore, in addition to the basic function as a digital camera, it is possible to accurately calculate the distance to the subject even if the subject is inclined.
Further, by recording the captured image distance measurement program on a recording medium in a computer-readable format, the program can be operated anywhere by carrying the recording medium.

本発明の距離情報を得る一手法を説明する模式図である。It is a schematic diagram explaining one method for obtaining distance information of the present invention. 本発明のデジタルカメラ2の内部の構成を示すブロック図である。It is a block diagram which shows the internal structure of the digital camera 2 of this invention. 本発明の制御部の機能ブロック図である。It is a functional block diagram of a control part of the present invention. 本発明の距離情報を得る一手法を説明するフローチャートである。It is a flowchart explaining one method of obtaining the distance information of the present invention. 本発明のカメラ座標系について説明する図である。It is a figure explaining the camera coordinate system of this invention. 本発明のθを推定する場合の説明図である。It is explanatory drawing in the case of estimating (theta) of this invention. 実施例に使用したホワイトスクリーンの図である。It is the figure of the white screen used for the Example. 実施例1の結果を示す図である。It is a figure which shows the result of Example 1. 実施例2の結果を示す図である。It is a figure which shows the result of Example 2.

符号の説明Explanation of symbols

1 フラッシュ、1a フラッシュ光、3 自然光、4a 画像(第1の被写体画像)、4b 画像(第2の被写体画像)、4c 画像(第3の被写体画像)、10 光学系、15 制御部、22 フラッシュ画像取得部(閃光画像取得手段)、23 撮像画像距離演算部(距離演算手段)、24 撮像画像傾き演算部(撮像画像傾き演算手段)、25 距離補正演算部(距離補正手段)   1 flash, 1a flash light, 3 natural light, 4a image (first subject image), 4b image (second subject image), 4c image (third subject image), 10 optical system, 15 control unit, 22 flash Image acquisition unit (flash image acquisition unit), 23 captured image distance calculation unit (distance calculation unit), 24 captured image tilt calculation unit (captured image tilt calculation unit), 25 distance correction calculation unit (distance correction unit)

Claims (7)

被写体からの撮像光を所定の光路に沿って導く撮像光学系と、該撮像光学系からの撮像光を受光して電気信号に変換する撮像素子と、該撮像素子から出力された電気信号に所要の処理を施す信号処理手段と、該信号処理手段により処理された画像信号を記憶する画像記憶手段と、被写体を照射する光を発光する閃光手段と、前記各手段を制御する制御手段と、を備え、
前記制御手段が自然光により得られる第1の被写体画像と前記自然光中の被写体を前記閃光手段により閃光したときに得られる第2の被写体画像との差分から得られる第3の被写体画像に基づいて撮像装置から被写体までの距離を測定する撮像装置において、
前記制御手段は前記第3の被写体画像に基づいて、当該被写体の傾斜量を演算して当該被写体までの距離を補正することを特徴とする撮像装置。
An imaging optical system that guides imaging light from a subject along a predetermined optical path, an imaging element that receives imaging light from the imaging optical system and converts it into an electrical signal, and an electrical signal output from the imaging element Signal processing means for performing the above processing, image storage means for storing the image signal processed by the signal processing means, flash means for emitting light for irradiating the subject, and control means for controlling the means. Prepared,
Imaging based on the third subject image obtained from the difference between the first subject image obtained by the natural light by the control means and the second subject image obtained by flashing the subject in the natural light by the flash means. In an imaging device that measures the distance from the device to the subject,
The image pickup apparatus, wherein the control unit calculates an inclination amount of the subject based on the third subject image and corrects a distance to the subject.
前記制御手段は、前記撮像光学系から得られる前記第1の被写体画像と前記第2の被写体画像の差分を求めて第3の被写体画像を得る閃光画像取得手段と、該閃光画像取得手段により得られた画像に基づいて当該被写体までの距離を演算する距離演算手段と、前記閃光画像取得手段により得られた画像に基づいて当該被写体の傾きを演算する撮像画像傾き演算手段と、該撮像画像傾き演算手段により演算された前記被写体の傾き量に基づいて前記距離演算手段により得られた当該被写体までの距離を補正する距離補正手段と、を備えたことを特徴とする請求項1に記載の撮像装置。   The control means obtains a flash image acquisition means for obtaining a third subject image by obtaining a difference between the first subject image and the second subject image obtained from the imaging optical system, and obtained by the flash image acquisition means. Distance calculating means for calculating the distance to the subject based on the obtained image, captured image inclination calculating means for calculating the inclination of the subject based on the image obtained by the flash image acquiring means, and the captured image inclination The imaging apparatus according to claim 1, further comprising: a distance correction unit that corrects a distance to the subject obtained by the distance calculation unit based on an inclination amount of the subject calculated by the calculation unit. apparatus. 前記被写体上の小領域の光軸に沿ったレンズからの距離は、前記閃光手段の放射強度および対象物体の反射率の平方根に比例し、照度の差分の平方根に反比例することを特徴とする請求項1又は2に記載の撮像装置。   The distance from the lens along the optical axis of the small area on the subject is proportional to the square root of the radiant intensity of the flash means and the reflectance of the target object, and is inversely proportional to the square root of the difference in illuminance. Item 3. The imaging device according to Item 1 or 2. 前記撮像光学系から前記撮像素子までの距離をf、前記撮像光学系のレンズ直径をd、前記被写体表面上の小領域から前記レンズの中心に向かう光線が当該レンズの光軸となす角度をα、前記光線と前記被写体表面の法線となす角度をθ、前記閃光手段の放射強度をI、前記閃光手段を使用したときの前記撮像素子上の放射照度をEF image、前記閃光手段を使用しなかったときの前記撮像素子上の放射照度をENF imageとすると、前記撮像素子上の小領域の放射照度Eimage=EF image−ENF imageであり、前記閃光手段の位置を前記レンズの中心と同じ位置であると仮定するとαf=α、θf=θとなり、且つ前記被写体表面が反射率rの拡散反射面であると仮定したとき、前記被写体上の小領域の光軸に沿った前記レンズからの距離zを、
により求めることを特徴とする請求項1、2又は3に記載の撮像装置。
The distance from the image pickup optical system to the image pickup element is f, the lens diameter of the image pickup optical system is d, and the angle between the light beam from a small area on the subject surface toward the center of the lens and the optical axis of the lens is α , The angle between the ray and the normal of the subject surface is θ, the radiant intensity of the flash means is I, the irradiance on the image sensor when the flash means is used, E F image , and the flash means is used If the irradiance on the image sensor when it is not taken is E NF image , the irradiance E image = E F image −E NF image of a small area on the image sensor, and the position of the flash means is the lens Assuming that it is the same position as the center of the object, α f = α, θ f = θ, and assuming that the subject surface is a diffuse reflection surface having a reflectance r, the optical axis of the small area on the subject The distance z from the lens along
The imaging device according to claim 1, wherein the imaging device is obtained by:
被写体までの距離を測定する方法において、自然光により得られる第1の被写体画像と自然光中の被写体を前記閃光手段により閃光したときに得られる第2の被写体画像との差分を求めて第3の被写体画像を得る閃光画像取得手順と、該閃光画像取得手順により得られた画像に基づいて当該被写体までの距離を演算する距離演算手順と、前記閃光画像取得手順により得られた画像に基づいて当該被写体の傾きを演算する撮像画像傾き演算手順と、該撮像画像傾き演算手順により演算された前記被写体の傾き量に基づいて前記距離演算手順により得られた当該被写体までの距離を補正する距離補正手順と、を備えたことを特徴とする撮像画像距離測定方法。   In the method for measuring a distance to a subject, a third subject is obtained by obtaining a difference between a first subject image obtained by natural light and a second subject image obtained by flashing a subject in natural light by the flash means. A flash image acquisition procedure for obtaining an image, a distance calculation procedure for calculating a distance to the subject based on the image obtained by the flash image acquisition procedure, and the subject based on the image obtained by the flash image acquisition procedure A captured image tilt calculation procedure for calculating the tilt of the subject, and a distance correction procedure for correcting the distance to the subject obtained by the distance calculation procedure based on the tilt amount of the subject calculated by the captured image tilt calculation procedure; And a captured image distance measuring method. 被写体までの距離を計測するために制御手段を、
自然光により得られる第1の被写体画像と自然光中の被写体を前記閃光手段により閃光したときに得られる第2の被写体画像との差分を求めて第3の被写体画像を得る閃光画像取得手段、該閃光画像取得手段により得られた画像に基づいて当該被写体までの距離を演算する距離演算手段、前記閃光画像取得手段により得られた画像に基づいて当該被写体の傾きを演算する撮像画像傾き演算手段、該撮像画像傾き演算手段により演算された前記被写体の傾き量に基づいて前記距離演算手段により得られた当該被写体までの距離を補正する距離補正手段、として機能させることを特徴とする撮像画像距離測定プログラム。
Control means to measure the distance to the subject,
Flash image acquisition means for obtaining a third subject image by obtaining a difference between a first subject image obtained by natural light and a second subject image obtained by flashing a subject in natural light by the flash means, the flash Distance computing means for computing the distance to the subject based on the image obtained by the image obtaining means, captured image inclination computing means for computing the inclination of the subject based on the image obtained by the flash image obtaining means, A captured image distance measuring program that functions as a distance correcting unit that corrects a distance to the subject obtained by the distance calculating unit based on an inclination amount of the subject calculated by the captured image tilt calculating unit. .
請求項6に記載の撮像画像距離測定プログラムをコンピュータが読み取り可能な形式で記録したことを特徴とする記録媒体。   A recording medium in which the captured image distance measurement program according to claim 6 is recorded in a computer-readable format.
JP2005164137A 2005-06-03 2005-06-03 Imaging apparatus, captured image distance measuring method, captured image distance measuring program, and recording medium Expired - Fee Related JP4872035B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005164137A JP4872035B2 (en) 2005-06-03 2005-06-03 Imaging apparatus, captured image distance measuring method, captured image distance measuring program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005164137A JP4872035B2 (en) 2005-06-03 2005-06-03 Imaging apparatus, captured image distance measuring method, captured image distance measuring program, and recording medium

Publications (2)

Publication Number Publication Date
JP2006337254A true JP2006337254A (en) 2006-12-14
JP4872035B2 JP4872035B2 (en) 2012-02-08

Family

ID=37557937

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005164137A Expired - Fee Related JP4872035B2 (en) 2005-06-03 2005-06-03 Imaging apparatus, captured image distance measuring method, captured image distance measuring program, and recording medium

Country Status (1)

Country Link
JP (1) JP4872035B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015170322A (en) * 2014-03-10 2015-09-28 富士通株式会社 Image processing device, biometric authentication device, image processing method and program
JP2016529474A (en) * 2013-06-13 2016-09-23 ビーエーエスエフ ソシエタス・ヨーロピアBasf Se Detector for optically detecting at least one object
JP2017161405A (en) * 2016-03-10 2017-09-14 株式会社デンソー Distance measurement device
US10890491B2 (en) 2016-10-25 2021-01-12 Trinamix Gmbh Optical detector for an optical detection
US10948567B2 (en) 2016-11-17 2021-03-16 Trinamix Gmbh Detector for optically detecting at least one object
US10955936B2 (en) 2015-07-17 2021-03-23 Trinamix Gmbh Detector for optically detecting at least one object
US11041718B2 (en) 2014-07-08 2021-06-22 Basf Se Detector for determining a position of at least one object
US11125880B2 (en) 2014-12-09 2021-09-21 Basf Se Optical detector
US11211513B2 (en) 2016-07-29 2021-12-28 Trinamix Gmbh Optical sensor and detector for an optical detection
US11428787B2 (en) 2016-10-25 2022-08-30 Trinamix Gmbh Detector for an optical detection of at least one object
US11860292B2 (en) 2016-11-17 2024-01-02 Trinamix Gmbh Detector and methods for authenticating at least one object
JP7473965B2 (en) 2020-09-25 2024-04-24 株式会社ユニバーサルエンターテインメント Distance measuring sensor and distance measuring method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5735708A (en) * 1980-08-13 1982-02-26 Mitsutoyo Mfg Co Ltd Measuring method of microscopic displacement and microscopic inclination
JPS63233312A (en) * 1987-03-20 1988-09-29 Univ Osaka Method for measuring distance using reflected light from object to be measured
JPH0319906U (en) * 1989-07-07 1991-02-27
JP2003185412A (en) * 2001-12-18 2003-07-03 Toshiba Corp Apparatus and method for acquisition of image
JP2004328657A (en) * 2003-04-28 2004-11-18 Toshiba Corp Image input device, image input method and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5735708A (en) * 1980-08-13 1982-02-26 Mitsutoyo Mfg Co Ltd Measuring method of microscopic displacement and microscopic inclination
JPS63233312A (en) * 1987-03-20 1988-09-29 Univ Osaka Method for measuring distance using reflected light from object to be measured
JPH0319906U (en) * 1989-07-07 1991-02-27
JP2003185412A (en) * 2001-12-18 2003-07-03 Toshiba Corp Apparatus and method for acquisition of image
JP2004328657A (en) * 2003-04-28 2004-11-18 Toshiba Corp Image input device, image input method and program

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10845459B2 (en) 2013-06-13 2020-11-24 Basf Se Detector for optically detecting at least one object
JP2016529474A (en) * 2013-06-13 2016-09-23 ビーエーエスエフ ソシエタス・ヨーロピアBasf Se Detector for optically detecting at least one object
US10823818B2 (en) 2013-06-13 2020-11-03 Basf Se Detector for optically detecting at least one object
JP2015170322A (en) * 2014-03-10 2015-09-28 富士通株式会社 Image processing device, biometric authentication device, image processing method and program
US11041718B2 (en) 2014-07-08 2021-06-22 Basf Se Detector for determining a position of at least one object
US11125880B2 (en) 2014-12-09 2021-09-21 Basf Se Optical detector
US10955936B2 (en) 2015-07-17 2021-03-23 Trinamix Gmbh Detector for optically detecting at least one object
JP2017161405A (en) * 2016-03-10 2017-09-14 株式会社デンソー Distance measurement device
US11211513B2 (en) 2016-07-29 2021-12-28 Trinamix Gmbh Optical sensor and detector for an optical detection
US10890491B2 (en) 2016-10-25 2021-01-12 Trinamix Gmbh Optical detector for an optical detection
US11428787B2 (en) 2016-10-25 2022-08-30 Trinamix Gmbh Detector for an optical detection of at least one object
US10948567B2 (en) 2016-11-17 2021-03-16 Trinamix Gmbh Detector for optically detecting at least one object
US11415661B2 (en) 2016-11-17 2022-08-16 Trinamix Gmbh Detector for optically detecting at least one object
US11635486B2 (en) 2016-11-17 2023-04-25 Trinamix Gmbh Detector for optically detecting at least one object
US11698435B2 (en) 2016-11-17 2023-07-11 Trinamix Gmbh Detector for optically detecting at least one object
US11860292B2 (en) 2016-11-17 2024-01-02 Trinamix Gmbh Detector and methods for authenticating at least one object
JP7473965B2 (en) 2020-09-25 2024-04-24 株式会社ユニバーサルエンターテインメント Distance measuring sensor and distance measuring method

Also Published As

Publication number Publication date
JP4872035B2 (en) 2012-02-08

Similar Documents

Publication Publication Date Title
JP4872035B2 (en) Imaging apparatus, captured image distance measuring method, captured image distance measuring program, and recording medium
TWI576187B (en) Laser processing device
US6741279B1 (en) System and method for capturing document orientation information with a digital camera
JP6519265B2 (en) Image processing method
JP2015128242A (en) Image projection device and calibration method of the same
JP2003130621A (en) Method and system for measuring three-dimensional shape
WO2013005244A1 (en) Three-dimensional relative coordinate measuring device and method
KR101624120B1 (en) System and method for illuminating pattern light of structured light for measuring 3d forming
Ferstl et al. Learning Depth Calibration of Time-of-Flight Cameras.
JP2016075658A (en) Information process system and information processing method
JP2011106899A (en) Method of processing image
JP2006285763A (en) Method and device for generating image without shadow for photographic subject, and white board used therefor
JP7056131B2 (en) Image processing system, image processing program, and image processing method
JP5336325B2 (en) Image processing method
US20240087167A1 (en) Compensation of three-dimensional measuring instrument having an autofocus camera
JP2010281778A (en) Three-dimensional shape measuring device
JP5648159B2 (en) Three-dimensional relative coordinate measuring apparatus and method
JP7118776B2 (en) IMAGING DEVICE, IMAGE PROCESSING METHOD, IMAGE PROCESSING PROGRAM AND RECORDING MEDIUM
US11481917B2 (en) Compensation of three-dimensional measuring instrument having an autofocus camera
JP5506371B2 (en) Image processing apparatus, image processing method, and program
JP7028814B2 (en) External shape recognition device, external shape recognition system and external shape recognition method
CN111971523B (en) Vision sensor system, control method, and storage medium
JP6939501B2 (en) Image processing system, image processing program, and image processing method
US20180158205A1 (en) Apparatus and method for generating three-dimensional information
JP7312594B2 (en) Calibration charts and calibration equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080530

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110301

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110422

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110726

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20110824

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110824

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111102

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141202

Year of fee payment: 3

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees