JP2012085093A - Imaging device and acquisition method - Google Patents

Imaging device and acquisition method Download PDF

Info

Publication number
JP2012085093A
JP2012085093A JP2010229435A JP2010229435A JP2012085093A JP 2012085093 A JP2012085093 A JP 2012085093A JP 2010229435 A JP2010229435 A JP 2010229435A JP 2010229435 A JP2010229435 A JP 2010229435A JP 2012085093 A JP2012085093 A JP 2012085093A
Authority
JP
Japan
Prior art keywords
image
subject
distance
unit
light
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010229435A
Other languages
Japanese (ja)
Inventor
Haruo Yamashita
春生 山下
Takeshi Ito
武志 井東
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.)
Panasonic Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2010229435A priority Critical patent/JP2012085093A/en
Publication of JP2012085093A publication Critical patent/JP2012085093A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To accurately calculate information on a distance from images taken with/without auxiliary light emitted from a stroboscope, the information having been not accurate due to influence of a reflectance ratio of a subject.SOLUTION: An acquisition method acquires a first image of a subject image while irradiating thereof with the auxiliary light, and a second image of the identical subject image without irradiating thereof with the auxiliary light. Moreover, a value relating to external light from which the influence of the reflectance ratio of the subject is removed is calculated from image data constituting the acquired first image and image data constituting the second image. Then, on the basis of the calculated value and properties of light attenuating corresponding to a distance, information on a distance from the imaging device to the subject is acquired.

Description

本発明は、撮像装置を用いて距離に関する情報を取得する撮像装置および取得方法に関する。   The present invention relates to an imaging apparatus and an acquisition method for acquiring information about distance using an imaging apparatus.

通常カメラは、照明を当てた被写体の明暗に関する情報をモノクロやカラーの濃淡画像として撮影する機能がある。この撮影機能に加えて被写体までの距離に関する情報が二次元で距離画像として得られると様々な処理において有用である。距離に関する情報が取得できると、小径レンズを用いたコンパクトカメラで被写界深度の浅いボケ味を生かした画像処理などが可能になる。   A normal camera has a function of photographing information about the brightness of an illuminated subject as a monochrome or color grayscale image. In addition to this photographing function, it is useful in various processes if information about the distance to the subject is obtained as a two-dimensional distance image. If information about the distance can be acquired, image processing using a bokeh with a shallow depth of field can be performed with a compact camera using a small-diameter lens.

従来の距離画像を得る方法として、2眼のステレオカメラにより視差のある2枚の画像を撮影し、2枚の画像に写っている対応点同士の視差を検出して奥行きを得る方法がある。   As a conventional method for obtaining a distance image, there is a method in which two images with parallax are photographed with a two-lens stereo camera, and the depth is obtained by detecting the parallax between corresponding points in the two images.

また、TOF(Time of Flight)と呼ばれる技術で、特殊なイメージセンサと高周波で変調された光源を用い画素毎に被写体からの反射光の到達時間を計測することで距離を得る方法がある(特に、特許文献1および、特許文献2を参照)。   Further, there is a technique called TOF (Time of Flight), and there is a method of obtaining a distance by measuring the arrival time of reflected light from a subject for each pixel using a special image sensor and a light source modulated at high frequency (particularly, Patent Document 1 and Patent Document 2).

さらに、単一のカメラに対して照明を変化させて複数枚の画像を撮影し、それらの画像の違いを用いて距離を推定する技術もある。そのひとつが、ステレオレンジファインダ技術であり変調された照明やレーザー光を用いて距離の計測を行う(特に、特許文献3を参照)。   Furthermore, there is a technique for photographing a plurality of images by changing illumination with respect to a single camera and estimating a distance using a difference between the images. One of them is a stereo range finder technique, which measures distance using modulated illumination or laser light (see particularly Patent Document 3).

また、非常に精度は悪いが単なるフラッシュオンとオフの2枚の画像を用いて光量変化から距離を得る技術もある。フラッシュオンとオフの画像を用いて被写体領域画像データと背景領域画像データとに分離し、背景領域画像データに対してぼかし効果のあるフィルタ処理を施して合成することにより背景をぼかす技術が開示されている(特に、特許文献4を参照)   In addition, there is a technique for obtaining a distance from a change in the amount of light using two images of flash on and off, although the accuracy is very low. Disclosed is a technique for blurring the background by separating the subject area image data and the background area image data using the flash on and off images, and applying a filter process with a blurring effect to the background area image data and combining them. (In particular, see Patent Document 4)

特開2000−121339号公報JP 2000-121339 A 特開2006−84429号公報JP 2006-84429 A 特開2001−12909号公報Japanese Patent Laid-Open No. 2001-12909 特開2005−229198号公報JP 2005-229198 A

しかしながら、従来技術には、以下のような課題がある。   However, the prior art has the following problems.

2眼や多眼方式、およびTOF方式などの技術は何れも特殊な光学系やイメージセンサを有するカメラが必要であり、一般的な民生のデジタルカメラ等に容易に利用することは困難である。また、ステレオレンジファインダ方式は特殊な照明手段が必要になりやはり民生機器で容易に利用できないという課題がある。   All of the technologies such as the binocular, multi-view, and TOF methods require a camera having a special optical system and an image sensor, and are difficult to easily use for general consumer digital cameras. In addition, the stereo range finder method has a problem that special illumination means are required and it cannot be easily used in consumer equipment.

また、民生機器への応用が容易なフラッシュオンとオフの画像を用いる方式は、極めて精度が悪いという課題がある。   In addition, a method using a flash on / off image that can be easily applied to a consumer device has a problem that the accuracy is extremely low.

この技術は、フラッシュオン画像とオフ画像の差分がフラッシュ光による光量増加成分であるため、光量増加が大きい画素は近景であり、光量増加が小さいまたは光量増加が無い画素は遠景であると判断し、二つの領域に分離している。しかし、光量増加が小さいからと言って遠いとは限らず、被写体の反射率が小さい(暗い色)場合にも光量増加は小さくなる、即ち黒い被写体は遠いと判断され、白い被写体は近いと判断されることになり、必ずしも正しく遠近を表すことにならない。   In this technology, since the difference between the flash-on image and the off-image is a component that increases the amount of light by flash light, a pixel with a large light amount increase is a foreground, and a pixel with a small light amount increase or no light amount increase is a distant view. , Separated into two regions. However, the increase in the amount of light is not necessarily far away, but the increase in the amount of light is small even when the reflectance of the subject is small (dark color), that is, the black subject is determined to be far and the white subject is determined to be near. Will not necessarily represent the perspective correctly.

さらに撮影環境により、外光とフラッシュ光の照度のバランスは大きく異なるため、その差分値の大きさだけで正しく前景と背景を分離することは困難である。   Furthermore, since the balance between the illuminance of outside light and flash light varies greatly depending on the shooting environment, it is difficult to correctly separate the foreground and the background only by the magnitude of the difference value.

本発明は、上記課題を鑑みて、一般的なデジタルカメラに搭載されるストロボ機能を用いて得られるストロボによる補助光の発光あり/なしの画像から被写体の反射率の影響を除去した値を算出し、算出した値を基に被写体までの距離に関する情報を精度よく取得する撮像装置および取得方法を提供することを目的とする。   In view of the above problems, the present invention calculates a value obtained by removing the influence of the reflectance of a subject from an image with or without auxiliary light emitted by a strobe obtained by using a strobe function mounted on a general digital camera. An object of the present invention is to provide an imaging apparatus and an acquisition method that can accurately acquire information related to a distance to a subject based on a calculated value.

上記の課題を解決するため、本発明は被写体を撮影し当該被写体までの距離に関する情報を生成する撮像装置であって、前記被写体の被写体像を形成する光学部と、前記被写体像を基に画像信号を得る撮影部と、前記被写体を照射する補助光発光部と、前記補助光発光部により前記被写体に補助光を照射させ第1の画像を撮影するよう前記光学部および前記撮影部を制御するとともに、補助光を照射しないで第2の画像を撮影するよう前記光学部および前記撮影部を制御する撮影モードを少なくとも備える撮影制御部と、前記撮影モードで撮影して得られる前記第1の画像を構成する画像データおよび第2の画像を構成する画像データを用いて被写体の反射率の影響を除去した値を算出し、当該算出した値と前記補助光が被写体までの距離に応じて減衰する特性である減衰特性とを用いて前記被写体までの距離に関する情報を取得する距離取得部を備える。   In order to solve the above-described problems, the present invention is an imaging apparatus that captures a subject and generates information about a distance to the subject, and includes an optical unit that forms a subject image of the subject and an image based on the subject image. An imaging unit that obtains a signal, an auxiliary light emitting unit that irradiates the subject, and the optical unit and the imaging unit are controlled so that the auxiliary light emitting unit irradiates the subject with auxiliary light and captures a first image. In addition, a shooting control unit including at least a shooting mode for controlling the optical unit and the shooting unit so as to take a second image without irradiating auxiliary light, and the first image obtained by shooting in the shooting mode. A value obtained by removing the influence of the reflectance of the subject is calculated using the image data constituting the image and the image data constituting the second image, and the calculated value and the auxiliary light are calculated as the distance to the subject. By using the attenuation characteristic is a characteristic to attenuate Flip comprises a distance acquisition section that acquires information about the distance to the subject.

上記の構成により、本発明の撮影装置は同じ被写体像に対して補助光を照射した第1の画像と、補助光を照射しない第2の画像と、を取得することができる。さらに、取得した第1の画像を構成する画像データと、第2の画像を構成する画像データとから、被写体の反射率の影響が除去された外光に関する値を算出することが出来る。そして、算出した値と光が距離に応じて減衰する特性を基に、撮像装置から被写体までの距離に関する情報を取得することが出来る。これにより、補助光を照射した画像と補助光を照射しない画像の画像データから、被写体までの距離に関する情報を算出する場合であっても、被写体の反射率に依存することなくより好適に当該距離に関する情報を取得することが可能となる効果を奏する。   With the configuration described above, the photographing apparatus of the present invention can acquire the first image in which the same subject image is irradiated with the auxiliary light and the second image in which the auxiliary light is not irradiated. Furthermore, a value related to external light from which the influence of the reflectance of the subject is removed can be calculated from the acquired image data constituting the first image and image data constituting the second image. Then, based on the calculated value and the characteristic that the light attenuates according to the distance, information regarding the distance from the imaging device to the subject can be acquired. Thus, even when information on the distance to the subject is calculated from the image data of the image irradiated with the auxiliary light and the image not irradiated with the auxiliary light, the distance is more preferably determined without depending on the reflectance of the subject. It is possible to obtain information regarding the above.

また好ましくは、前記撮像装置はさらに、前記光学部において形成した被写体像内の合焦領域に位置する主被写体像までの距離に関する情報を測距する測距部と、を備え、前記距離取得部は、前記主被写体像までの距離に関する情報、前記被写体の反射率の影響を除去した値のうち前記主被写体に対応する値、前記被写体の反射率の影響を除去した値に基づいて算出される外光の影響を除去した値および、前記減衰特性を用いて前記被写体までの距離に関する情報を取得する。   Preferably, the imaging apparatus further includes a distance measuring unit that measures information related to a distance to a main subject image located in a focus area in a subject image formed in the optical unit, and the distance acquisition unit Is calculated based on information on the distance to the main subject image, a value corresponding to the main subject among values obtained by removing the influence of the reflectance of the subject, and a value obtained by removing the influence of the reflectance of the subject. Information relating to the distance to the subject is acquired using a value obtained by removing the influence of external light and the attenuation characteristic.

上記の構成により、少なくとも他よりも精確に距離に関する情報を取得することが出来る主被写体の距離に関する情報を基準にすることにより、外光の影響を除去した値を算出することができる。さらに、外光の影響を除去した値に基づいて被写体までの距離を取得することが出来る。これにより、例えば建物等の遮蔽物の影響で外光が変化する場合であっても、この外光を除去した値を基に距離に関する情報を取得することができるため、より精確な距離に関する情報を取得することができる。   With the above-described configuration, it is possible to calculate a value from which the influence of external light is removed by using, as a reference, information related to the distance of the main subject that can acquire information related to the distance more accurately than others. Furthermore, the distance to the subject can be acquired based on the value from which the influence of external light has been removed. As a result, even when the outside light changes due to the influence of a shielding object such as a building, information on the distance can be acquired based on the value obtained by removing the outside light. Can be obtained.

また好ましくは、前記撮像装置はさらに、前記第2の画像を構成する画像データに対して、局所階調特性に基づく変換処理を行う変換処理部を有し、前記距離取得部は、前記第1の画像を構成する画像データと前記第2の画像を構成する画像データとの差分値と、前記変換処理された第2の画像を構成する画像データと、の比率を外光の影響を除去した値とする。   Preferably, the imaging apparatus further includes a conversion processing unit that performs conversion processing based on local gradation characteristics for image data constituting the second image, and the distance acquisition unit includes the first acquisition unit. The ratio of the difference between the image data constituting the second image and the image data constituting the second image and the image data constituting the second image subjected to the conversion process is removed from the influence of external light Value.

上記のように構成することにより、第2の画像に対して輝度ムラを軽減することができるため、より精度よく距離に関する情報を取得することが可能となる。   By configuring as described above, luminance unevenness can be reduced with respect to the second image, and thus it is possible to acquire information on the distance with higher accuracy.

本発明によれば、ストロボによる補助光の発光あり/なしの2枚の画像から、被写体の色(反射率)の影響なしに精度よい距離に関する情報を取得することが出来る。   According to the present invention, accurate distance information can be acquired from two images with and without auxiliary light emitted by a strobe without being affected by the color (reflectance) of the subject.

本実施形態1における撮影環境を含めた撮像装置の概略図Schematic of an imaging apparatus including a shooting environment in the first embodiment ストロボ発光有無における撮影条件の説明図Illustration of shooting conditions with and without flash 撮影画像を説明するための図Illustration for explaining the captured image 被写体距離とストロボ光の強度の関係のグラフを示す図A graph showing the relationship between subject distance and strobe light intensity 距離の評価関数のフローチャートDistance evaluation function flowchart 本実施形態2における撮像装置の概略図Schematic diagram of an imaging apparatus according to the second embodiment 外光推定部のフローチャートExternal light estimation unit flowchart 距離推定部のフローチャートFlow chart of distance estimation unit 本実施形態3における撮影装置の概略図Schematic of the imaging device in the third embodiment 局所階調処理部の構成図Configuration diagram of local gradation processing unit 動的階調補正部の変換特性のグラフを示す図The figure which shows the graph of the conversion characteristic of a dynamic gradation correction part

以下、本実施形態に係るデジタルカメラについて、図面を参照しながら説明する。   Hereinafter, the digital camera according to the present embodiment will be described with reference to the drawings.

[第1実施形態]
本実施形態では、補助光としてストロボ(フラッシュと同意味)を使うデジタルカメラを例に、以下、説明する。
[First Embodiment]
In the present embodiment, a digital camera that uses a strobe (synonymous with flash) as auxiliary light will be described below as an example.

<構成>
図1は、本実施形態において、撮影環境を含めた撮像装置の概略構成図である。
<Configuration>
FIG. 1 is a schematic configuration diagram of an imaging apparatus including a shooting environment in the present embodiment.

撮像装置100は、光学系101、イメージセンサ102、ピント制御部103、補助光発光部104、撮影制御部105、メモリ106、距離取得部107を備える。   The imaging apparatus 100 includes an optical system 101, an image sensor 102, a focus control unit 103, an auxiliary light emitting unit 104, a shooting control unit 105, a memory 106, and a distance acquisition unit 107.

光学系101は、被写体の光学像を集光する複数のレンズから構成される光学系である。また、光学系101は、ピント調節機能を有した光学系である。撮像光学系101は、外光による照射光201で照明が照射する主被写体202、その他の被写体203および、その他の被写体204からの光学像をイメージセンサ102に導く。   The optical system 101 is an optical system including a plurality of lenses that collect an optical image of a subject. The optical system 101 is an optical system having a focus adjustment function. The imaging optical system 101 guides the optical image from the main subject 202, the other subject 203, and the other subject 204 that is illuminated by the illumination light 201 from outside light to the image sensor 102.

@102は、光学系101が集光した光学像を電気信号に変換するイメージセンサである。例えば、イメージセンサ102は、撮影シーン200に示す被写体の光学像を電気信号に変換する。ここで、撮影シーン200はある撮影シーンを示すものである。この撮影シーン200には、外光である外光による照射光201、撮影シーン200における主被写体202、背景における被写体である主被写体202およびその他の被写体204を含む。   @ 102 is an image sensor that converts an optical image collected by the optical system 101 into an electrical signal. For example, the image sensor 102 converts an optical image of a subject shown in the shooting scene 200 into an electrical signal. Here, the shooting scene 200 shows a certain shooting scene. This shooting scene 200 includes irradiation light 201 by external light that is external light, a main subject 202 in the shooting scene 200, a main subject 202 that is a subject in the background, and other subjects 204.

ピント制御部103は、被写体にピントを合わせるために光学系101が有するレンズを調整する制御部である。ピント制御部103は撮影制御部105の指示により光学系101を前後に動かし外光による照射光201をイメージセンサ102上に結像させる。   The focus control unit 103 is a control unit that adjusts a lens included in the optical system 101 in order to focus on a subject. The focus control unit 103 moves the optical system 101 back and forth in response to an instruction from the imaging control unit 105 to form an image of the irradiation light 201 by external light on the image sensor 102.

@104は、被写体に対して撮影を補助する光を発光するストロボである。   @ 104 is a strobe that emits light for assisting photographing with respect to the subject.

撮影制御部105は、補助光発光部104の発光や、ピント制御部103におけるピント調節の指令を出す。さらに、撮影制御部105は、撮像部102が撮像した電気信号を読み出す。撮影制御部105は、補助光発光部104を発光させ撮影シーン200を撮影しメモリ部106に格納する。以下、補助光発光部104を発光させて撮影シーン200を撮影した画像を第1の画像とする。また、撮影制御部105は、補助光発光部104を発光させずに撮影シーン200を撮影しメモリ部106に格納する。以下、補助光発光部104を発光させずに撮影シーン200を撮影した画像を第2の画像とする。なお、第1の画像および第2の画像は時間的に連続して撮影される。つまり、撮影制御部105は、少なくとも第1の画像と第2の画像を時間的に連続して撮影する撮影モードを有する。2枚の画像の撮影間隔は被写体の動きの影響を受けない程度に十分に短時間で行われる。なお、ストロボ発光および非発光での撮影順は任意でよい。また、2枚の撮影での絞りやシャッタ時間などによる露光量は必ずしも一致させる必要が無く、ストロボ発光および非発光で各々最適な露光量で撮影し、各々の露光量の違いは電気的なゲインで補正すればよい。   The imaging control unit 105 issues a command for light emission from the auxiliary light emitting unit 104 and focus adjustment in the focus control unit 103. Furthermore, the imaging control unit 105 reads the electrical signal captured by the imaging unit 102. The photographing control unit 105 causes the auxiliary light emitting unit 104 to emit light and photographs the photographing scene 200 and stores it in the memory unit 106. Hereinafter, an image obtained by shooting the shooting scene 200 by causing the auxiliary light emitting unit 104 to emit light is referred to as a first image. Further, the photographing control unit 105 photographs the photographing scene 200 without causing the auxiliary light emitting unit 104 to emit light, and stores the photographing scene 200 in the memory unit 106. Hereinafter, an image obtained by shooting the shooting scene 200 without causing the auxiliary light emitting unit 104 to emit light is referred to as a second image. Note that the first image and the second image are taken continuously in time. That is, the photographing control unit 105 has a photographing mode in which at least the first image and the second image are photographed continuously in time. The shooting interval between the two images is sufficiently short so as not to be affected by the movement of the subject. Note that the order of shooting with and without strobe light emission may be arbitrary. Also, it is not always necessary to match the exposure amount due to the aperture and shutter time of the two shots, and the exposure is made with the optimum exposure amount for both strobe light emission and non-light emission. It can be corrected by.

メモリ部106は、撮影制御部105が取得した電気信号を一時蓄える。   The memory unit 106 temporarily stores the electrical signal acquired by the imaging control unit 105.

@107は、メモリ部106に蓄積される電気信号に基づいて、撮像装置100から被写体までの距離に関する情報を取得する。メモリ部106は、光が距離に応じて減衰する特性である減衰特性を有し、この減衰特性に基づメモリ部106に蓄積される電気信号から距離に関する情報を算出する。   @ 107 acquires information related to the distance from the imaging device 100 to the subject based on the electrical signal stored in the memory unit 106. The memory unit 106 has an attenuation characteristic that is a characteristic in which light attenuates according to the distance, and calculates information related to the distance from the electrical signal stored in the memory unit 106 based on the attenuation characteristic.

距離取得部107は、メモリ部106に格納されている第1および第2の画像を用いて距離推定を行い距離画像として出力する。   The distance acquisition unit 107 performs distance estimation using the first and second images stored in the memory unit 106 and outputs the distance image.

<動作>
以下、図面を参照しながら撮像装置100の動作について説明する。
<Operation>
Hereinafter, the operation of the imaging apparatus 100 will be described with reference to the drawings.

図2は、ストロボ発光有無における撮影条件を示す説明図である。   FIG. 2 is an explanatory diagram showing shooting conditions with and without strobe light emission.

図3は、撮像装置100が撮影する画像を示す図である。   FIG. 3 is a diagram illustrating an image captured by the imaging apparatus 100.

図2(A)は、ストロボ発光ありでの撮影条件を示す。   FIG. 2A shows shooting conditions with strobe light emission.

図2(B)は、ストロボ発光無しでの撮影条件を示す。   FIG. 2B shows shooting conditions without strobe light emission.

ここでは、外光201の強度レベルをC、ストロボ光の強度レベルをW、任意の被写体までの距離をL、その被写体の反射率をRとする。   Here, the intensity level of the external light 201 is C, the intensity level of the strobe light is W, the distance to an arbitrary subject is L, and the reflectance of the subject is R.

この条件では、外光201の強度C、任意の被写体204の距離Lと反射率R、および任意の被写体204にとどくストロボ光の強度W、は全て不明である。   Under this condition, the intensity C of the external light 201, the distance L and the reflectance R of the arbitrary subject 204, and the intensity W of the strobe light reaching the arbitrary subject 204 are all unknown.

図2(a)と図2(b)を用いて、距離取得部107の動作を、数式を用いて説明する。   The operation of the distance acquisition unit 107 will be described using mathematical expressions with reference to FIGS. 2 (a) and 2 (b).

以下、メモリ部106にはストロボ発光で撮影した第1の画像Img1および、ストロボ非発光で撮影した第2の画像Img2が蓄えられているとする。このImg1は、ストロボによる光と、その他の被写体203による光の影響が含まれる。また、Img2は、その他の被写体203の光の影響が含まれる。   Hereinafter, it is assumed that the memory unit 106 stores a first image Img1 photographed with strobe light emission and a second image Img2 photographed with no strobe light emission. This Img1 includes the influence of the light from the strobe and the light from the other subject 203. Further, Img2 includes the influence of the light of the other subject 203.

ここで、任意の被写体204が画像中の座標(x,y)に位置する場合、Img1の明るさを表す画素値は、照明の光量と被写体の反射率との積に比例するため、kを比例定数として次式で表せる。   Here, when an arbitrary subject 204 is located at the coordinates (x, y) in the image, the pixel value representing the brightness of Img1 is proportional to the product of the amount of illumination light and the reflectance of the subject, so that k is set. It can be expressed by the following formula as a proportionality constant.

(数式1) Img1(x,y)=k*(C+W)*R
同様に、ストロボを発光しないで撮影した場合の、同じ画素は次式で表現される。
(Formula 1) Img1 (x, y) = k * (C + W) * R
Similarly, the same pixel when shooting without flash is expressed by the following equation.

(数式2) Img2(x,y)=k*C*R
距離取得部107は、被写体の反射率に影響されない値をImg1およびImg2から算出する。以下、算出する値をHと表現する。このHは、外光Cがどの被写体に対しても一様であると見なせるという仮定を設定することにより、Img1およびImg2の画素値から反射率の影響をキャンセルしたものである。距離取得部107は、Hをストロボ光による画素値(Img1−Img2)と外光のみによる画素値(Img2)との比として算出する。上記のように比を取ることにより反射率Rが除去されるため、被写体の色にかかわらない距離の評価が可能になる。要するに、メモリ部106は次式によってHを算出する。
(Formula 2) Img2 (x, y) = k * C * R
The distance acquisition unit 107 calculates a value not affected by the reflectance of the subject from Img1 and Img2. Hereinafter, the calculated value is expressed as H. This H is obtained by canceling the influence of the reflectance from the pixel values of Img1 and Img2 by setting the assumption that the external light C can be regarded as uniform for any subject. The distance acquisition unit 107 calculates H as the ratio of the pixel value (Img1-Img2) based on strobe light and the pixel value (Img2) based only on external light. Since the reflectance R is removed by taking the ratio as described above, it is possible to evaluate the distance regardless of the subject color. In short, the memory unit 106 calculates H by the following equation.

(数式5) H(x,y)=(Img1(x,y)−Img2(x,y))/Img2(x,y)=w(x、y)/C
以下、距離取得部107の動作について図面を参照しながら説明する。
(Formula 5) H (x, y) = (Img1 (x, y) −Img2 (x, y)) / Img2 (x, y) = w (x, y) / C
Hereinafter, the operation of the distance acquisition unit 107 will be described with reference to the drawings.

図4は、距離取得部107がHを求める際のフローチャートである。   FIG. 4 is a flowchart when the distance acquisition unit 107 calculates H.

まず、距離取得部107は、補助光発光部104を発光して撮影した第1の画像の画素値Img1を取得する(S10)。   First, the distance acquisition unit 107 acquires the pixel value Img1 of the first image captured by emitting light from the auxiliary light emitting unit 104 (S10).

次に、距離取得部107は、補助光発光部104を発光せずに撮影した第2の画像の座標(x,y)の画素値Img2を取得する(S11)。なお、S10およびS11の撮影取得順序は逆であっても構わない。   Next, the distance acquisition unit 107 acquires the pixel value Img2 of the coordinates (x, y) of the second image captured without emitting the auxiliary light emitting unit 104 (S11). Note that the imaging acquisition order in S10 and S11 may be reversed.

そして、距離取得部107は(数5)を用いてストロボ光のみによる画素レベル(Img1−Img2)の外光のみによる画素レベル(Img2)に対する比をHとして算出する。   Then, the distance acquisition unit 107 calculates the ratio of the pixel level (Img1-Img2) by only the strobe light to the pixel level (Img2) by only the external light as H using (Equation 5).

以下、距離取得部107がHに基づき距離に関する情報を算出する動作を説明する。   Hereinafter, an operation in which the distance acquisition unit 107 calculates information on the distance based on H will be described.

図5は、被写体距離Lとストロボ光の強度Wの関係を表す図である。ストロボからの光は点光源と見なせるため、原理的には距離が遠くなると被写体距離間の2乗に概ね反比例して減衰する。この減衰特性に基づきHから距離を算出する。なお、この減衰特性は実測値を基に設定される特性であっても構わない。その場合、現実に起こりうる要因に対応することが可能となる。   FIG. 5 is a diagram illustrating the relationship between the subject distance L and the intensity W of the strobe light. Since the light from the strobe light can be regarded as a point light source, in principle, when the distance increases, the light attenuates approximately in inverse proportion to the square of the subject distance. Based on this attenuation characteristic, the distance is calculated from H. Note that this attenuation characteristic may be a characteristic set based on an actual measurement value. In that case, it becomes possible to deal with factors that may actually occur.

具体的にメモリ部106は、算出されるHおよび図5に示す減衰特性から、撮影した画像内の被写体における相対距離を算出することができる。   Specifically, the memory unit 106 can calculate the relative distance of the subject in the captured image from the calculated H and the attenuation characteristic shown in FIG.

上記のように、本実施形態の距離取得部107は、ストロボ発光/非発光の2枚の画像から反射率の影響を除去または軽減することができる。そのため、外光の強度Cそのものは未知ではあるが、撮影シーン毎に固有の定数とみなすと、そのシーン内の多くの被写体の相対距離(相対的な前後関係)を算出することが出来る。これにより、前景と背景の切り分けなども、被写体の色にかかわらず行うことができる。   As described above, the distance acquisition unit 107 according to the present embodiment can remove or reduce the influence of the reflectance from the two images of strobe light emission / non-light emission. For this reason, the intensity C of the external light itself is unknown, but if it is regarded as a constant that is unique to each shooting scene, the relative distances (relative context) of many subjects in the scene can be calculated. Thereby, foreground and background can be separated regardless of the color of the subject.

また、外光201の居度が一定という仮定が常に成り立つわけではないが、現実に撮影されることが多い典型的な種々の撮影シーン(風景、人物ポートレート、花のアップなど)における評価実験をした結果、これらのシーンの撮影において上記仮定はおおむね成立すると見なして問題ないとの知見を得ている。   In addition, the assumption that the outside light 201 is constant is not always true, but evaluation experiments in various typical shooting scenes (landscapes, portraits of people, close-up of flowers, etc.) that are often taken in reality As a result, it has been found that the above assumptions are generally satisfied in the shooting of these scenes and that there is no problem.

なお、このように画像の比を用いることにより反射率の影響をキャンセルする評価式は、別の一例を下記するように無数に造ることが出来る。例えば、次式から算出される値をHとしても構わない。   In addition, the evaluation formula which cancels the influence of a reflectance by using the ratio of an image in this way can be made innumerable as another example below. For example, the value calculated from the following equation may be H.

(数6) H‘(x,y)=Img1(x,y)/Img2(x,y)=(C+w)/C
上記の構成により、反射率Rを含めずに撮像装置100から被写体までの距離に関する情報算出することが出来るようになる。そのため、様々な反射率の被写体があるシーンにおいても好適に距離に関する情報を取得することが可能となる。
(Equation 6) H ′ (x, y) = Img1 (x, y) / Img2 (x, y) = (C + w) / C
With the above configuration, it is possible to calculate information related to the distance from the imaging apparatus 100 to the subject without including the reflectance R. For this reason, it is possible to suitably acquire information regarding the distance even in a scene where subjects having various reflectances exist.

要するに、本実施形態における撮像装置100は、被写体を撮影し当該被写体までの距離に関する情報を生成する撮像装置100であって、前記被写体の被写体像を形成する光学系101と、前記被写体像を基に画像信号を得るイメージセンサ102と、前記被写体を照射する補助光発光部104と、前記補助光発光部104により前記被写体に補助光を照射させ第1の画像を撮影するよう前記光学系101および前記イメージセンサ102を制御するとともに、補助光を照射しないで第2の画像を撮影するよう前記光学系101および前記イメージセンサ102を制御する撮影モードを少なくとも備える撮影制御部105と、前記撮影モードで撮影して得られる前記第1の画像を構成する画像データおよび第2の画像を構成する画像データを用いて被写体の反射率の影響を除去した値を算出し、当該算出した値と前記補助光が被写体までの距離に応じて減衰する特性である減衰特性とを用いて前記被写体までの距離に関する情報を取得する距離取得部107を備える。   In short, the imaging apparatus 100 according to the present embodiment is an imaging apparatus 100 that shoots a subject and generates information about a distance to the subject, and includes an optical system 101 that forms a subject image of the subject and the subject image. An image sensor 102 that obtains an image signal, an auxiliary light emitting unit 104 that irradiates the subject, and the optical system 101 and the auxiliary light emitting unit 104 to irradiate the subject with auxiliary light and take a first image. A shooting control unit 105 that controls the image sensor 102 and includes at least a shooting mode for controlling the optical system 101 and the image sensor 102 so as to take a second image without irradiating auxiliary light, and in the shooting mode Image data constituting the first image and image data constituting the second image obtained by photographing Information about the distance to the subject using the calculated value and an attenuation characteristic that is a characteristic that the auxiliary light attenuates according to the distance to the subject. Is provided.

上記の構成により、撮像装置100は同じ被写体像に対して補助光を照射した第1の画像と、補助光を照射しない第2の画像と、を取得することができる。さらに、取得した第1の画像を構成する画像データと、第2の画像を構成する画像データとから、被写体の反射率の影響が除去された外光に関する値を算出することが出来る。そして、算出した値と光が距離に応じて減衰する特性を基に、撮像装置から被写体までの距離に関する情報を取得することが出来る。これにより、補助光を照射した画像と補助光を照射しない画像の画像データから、被写体までの距離に関する情報を算出する場合であっても、被写体の反射率に依存することなくより好適に当該距離に関する情報を取得することが可能となる効果を奏する。   With the configuration described above, the imaging apparatus 100 can acquire a first image in which auxiliary light is irradiated on the same subject image and a second image in which auxiliary light is not irradiated. Furthermore, a value related to external light from which the influence of the reflectance of the subject is removed can be calculated from the acquired image data constituting the first image and image data constituting the second image. Then, based on the calculated value and the characteristic that the light attenuates according to the distance, information regarding the distance from the imaging device to the subject can be acquired. Thus, even when information on the distance to the subject is calculated from the image data of the image irradiated with the auxiliary light and the image not irradiated with the auxiliary light, the distance is more preferably determined without depending on the reflectance of the subject. It is possible to obtain information regarding the above.

[第2実施形態]
次に、本実施形態2を図面を参照しながら説明する。
[Second Embodiment]
Next, Embodiment 2 will be described with reference to the drawings.

<構成>
図6は、本実施形態2における撮像装置の概略構成図である。図1に示す第1の実施形態と共通のものは同じ要素番号を振っており説明を省略する。
<Configuration>
FIG. 6 is a schematic configuration diagram of an imaging apparatus according to the second embodiment. The same elements as those in the first embodiment shown in FIG.

撮像装置300は、本実施形態における撮像装置である。撮像装置300は、新たに距離取得部307、外光推定部308および距離推定部309を備える。   The imaging device 300 is an imaging device in the present embodiment. The imaging apparatus 300 newly includes a distance acquisition unit 307, an external light estimation unit 308, and a distance estimation unit 309.

@307は、メモリ部106に蓄積される画像データから撮像装置300から被写体までの距離に関す情報を算出する。距離取得部307は、外光推定部308と距離推定部309を備える。   @ 307 calculates information regarding the distance from the imaging apparatus 300 to the subject from the image data stored in the memory unit 106. The distance acquisition unit 307 includes an outside light estimation unit 308 and a distance estimation unit 309.

外光推定部308は、@103から得られる情報を用いて外光の強度Cを推定する。推定の詳細な動作については、後述する。   The outside light estimation unit 308 estimates the intensity C of outside light using information obtained from @ 103. Detailed operation of estimation will be described later.

距離推定部309は、外光推定部308で算出された外光の強度Cおよび、メモリ部106に蓄積される画像データに基づいて、撮像装置300から被写体までの距離に関す情報を算出する。距離推定部309は、距離取得部107と同じ動作となる。違いは、減衰特性に基づき算出したHから距離に関する情報を算出する際、外光推定部308が推定する外光の強度Cを用いることにある。これにより、撮影した画像内の被写体における相対距離ではなく、絶対距離を算出することが可能となる。   The distance estimation unit 309 calculates information related to the distance from the imaging device 300 to the subject based on the intensity C of the external light calculated by the external light estimation unit 308 and the image data stored in the memory unit 106. The distance estimation unit 309 performs the same operation as the distance acquisition unit 107. The difference lies in the use of the external light intensity C estimated by the external light estimation unit 308 when calculating the distance information from H calculated based on the attenuation characteristics. This makes it possible to calculate the absolute distance, not the relative distance of the subject in the captured image.

実施形態1における距離取得部107は(数式5)のHを用いて距離に関する情報を算出していたが、撮影シーン毎に異なる未知の外光の強度Cがあるため、同じ外光の強度とみなせるひとつの撮影シーン内での距離の相対比較への利用に留まった。   The distance acquisition unit 107 according to the first embodiment calculates the information about the distance using H in (Equation 5). However, since there is an unknown external light intensity C for each shooting scene, the same external light intensity and It was only used for relative comparison of distances within a single shooting scene.

本実施形態2では、外光の強度Cを推定することにより、被写体毎に異なる反射率Rの影響無し、かつ、外光の強度の影響もなしに距離推定ができる距離取得部307を有する撮像装置300を提案する。   In the second embodiment, an image having a distance acquisition unit 307 that can estimate the distance C without the influence of the reflectance R that differs for each subject and without the influence of the intensity of the external light by estimating the intensity C of the external light. An apparatus 300 is proposed.

<動作>
以下、外光推定部308の動作について図面を参照しながら説明する。
<Operation>
Hereinafter, the operation of the external light estimation unit 308 will be described with reference to the drawings.

実際に外光の強度Cは未知であり、しかも撮影条件により大きく異なる。例えば、日中屋外での順光での撮影ではCは非常に大きく、室内や逆光条件ではCは小さくなる。したがって、外光の強度Cが不明では、(数式5)のHにより相対的な前後関係は分かるが実際の絶対距離は不明である。   Actually, the intensity C of the outside light is unknown and varies greatly depending on the photographing conditions. For example, C is very large when shooting in the daylight outdoors in the daytime, and C is small under indoor and backlight conditions. Therefore, when the intensity C of the external light is unknown, the relative absolute relationship is known by H in (Equation 5), but the actual absolute distance is unknown.

外光推定部308は、メモリ部106から、ストロボ発光で撮影したImg1とストロボ非発光のImg2を入力し、さらにピント制御部103から得られる主被写体202のピント距離情報L0を入力し、推定した外光の強度Cを距離推定部309に送る。主被写体の反射率はR0とする。   The external light estimation unit 308 receives from the memory unit 106 Img1 captured with strobe light emission and Img2 without strobe light emission, and further receives the focus distance information L0 of the main subject 202 obtained from the focus control unit 103 to perform estimation. The external light intensity C is sent to the distance estimation unit 309. The reflectance of the main subject is R0.

以下、外光推定部308の動作を図面を参照しながら説明する。   Hereinafter, the operation of the external light estimation unit 308 will be described with reference to the drawings.

図7は、外光推定部308の動作を示すフローチャートであ。   FIG. 7 is a flowchart showing the operation of the external light estimation unit 308.

まず、外光推定部308は、ピント制御部103から、フォーカスを制御しピント調節を行う課程で得られた主被写体202の距離L0を入力する(S20)。   First, the external light estimation unit 308 inputs the distance L0 of the main subject 202 obtained in the process of controlling the focus and adjusting the focus from the focus control unit 103 (S20).

次に、外光推定部308は、予め測定されている図5に示す減衰特性を用いて、主被写体204を照らすストロボ光の強度W0を得る(S21)。   Next, the external light estimation unit 308 obtains the intensity W0 of the strobe light that illuminates the main subject 204 using the attenuation characteristics shown in FIG. 5 measured in advance (S21).

さらに、外光推定部308は、図3に示すような主被写体202の画像中の位置(x0,y0)における、画像1および画像2の画素レベルを用いて、次式により基準H0を得る(S22)。   Further, the external light estimation unit 308 obtains a reference H0 by the following equation using the pixel levels of the image 1 and the image 2 at the position (x0, y0) in the image of the main subject 202 as shown in FIG. S22).

(数式7) H0=(Img1(x0,y0)−Img2(x0,y0))/Img2(x0,y0)
そして、@208は、基準H0 と基準ストロボ光の強度W0 から外光の強度Cを推定する(S23)。
(Formula 7) H0 = (Img1 (x0, y0) −Img2 (x0, y0)) / Img2 (x0, y0)
Then, @ 208 estimates the intensity C of outside light from the reference H0 and the intensity W0 of the reference strobe light (S23).

以上のように、ピント調節により距離L0を知ることが出来る画素位置(x0,y0)での、ストロボ光と外光の比率を元にすることにより、外光の強度Cを推定できる。   As described above, the intensity C of the external light can be estimated based on the ratio of the strobe light to the external light at the pixel position (x0, y0) where the distance L0 can be known by the focus adjustment.

次に、距離推定部309の動作を、図8のフローチャートを用いて説明する。   Next, the operation of the distance estimation unit 309 will be described using the flowchart of FIG.

距離の推定は、画素毎に行うものであるため、画素単位の処理のループを構成している。   Since the estimation of the distance is performed for each pixel, a processing loop for each pixel is configured.

まず、距離推定部309は、外光推定部308で推定した外光の強度Cを取得する(S30)
次に、距離推定部309は、処理を行う画素位置の初期化 x=0,y=0を行う(S31)。なお、S30およびS31は、距離推定部309における初期設定動作となる。つまり、距離推定部309は、画素単位での処理を行う前に、S30およびS31を実行する。
First, the distance estimation unit 309 acquires the intensity C of the external light estimated by the external light estimation unit 308 (S30).
Next, the distance estimation unit 309 performs initialization of pixel positions to be processed x = 0, y = 0 (S31). Note that S30 and S31 are initial setting operations in the distance estimation unit 309. That is, the distance estimation unit 309 executes S30 and S31 before performing the process in units of pixels.

次に、距離推定部309は画像1と画像2における画素(x,y)の画素レベルからHを取得する(S32)。   Next, the distance estimation unit 309 acquires H from the pixel level of the pixel (x, y) in the images 1 and 2 (S32).

そして、@距離推定部309は、Hと外光の強度Cから、画素(x,y)のストロボ光の強度Wを得る(S33)。   Then, the @ distance estimating unit 309 obtains the strobe light intensity W of the pixel (x, y) from H and the intensity C of the external light (S33).

さらに、距離推定部309は、画素(x,y)のストロボ光の強度Wから距離Lを推定する。   Further, the distance estimation unit 309 estimates the distance L from the strobe light intensity W of the pixel (x, y).

そして、距離推定部309は、未処理の画素があるか否かを確認する(S35)。未処理の画素がある場合は、S36に移行する。未処理の画素がない場合は、そのまま動作を終了する。   Then, the distance estimation unit 309 confirms whether there is an unprocessed pixel (S35). If there is an unprocessed pixel, the process proceeds to S36. If there is no unprocessed pixel, the operation is terminated as it is.

距離推定部309は、特定の画素でS32からS34の処理を終えると、未処理の画素に処理対象を変更する(S35)。そして、未処理の画素に対して、S32からS34の処理を行う。   The distance estimation unit 309 changes the processing target to an unprocessed pixel after finishing the processing from S32 to S34 for a specific pixel (S35). And the process of S32 to S34 is performed with respect to an unprocessed pixel.

S32からS34の処理を画素数分繰り返すことにより、全画素数分の距離が求まり、距離画像として出力することが出来る。   By repeating the processes from S32 to S34 for the number of pixels, the distances for all the pixels can be obtained and output as a distance image.

なお、本実施形態では、ピント情報から実際の距離が分かっている主被写体における、ストロボ発光/非発光の2枚の撮影画像の画素レベルを用いて外光の強度を推定し、距離推定を行う構成を例にとって説明した。   In the present embodiment, the distance estimation is performed by estimating the intensity of external light using the pixel levels of the two captured images of the strobe light emission / non-light emission in the main subject whose actual distance is known from the focus information. The configuration has been described as an example.

しかし、本実施形態のポイントは、外光の強度を推定することそのものにあるわけではなく、唯一実際の距離が分かる主被写体を基準として、ストロボ発光/非発光の2枚の撮影画像による距離推定結果を校正(キャリブレーション)するというアイデアにある。実際、明示的に外光の強度を推定するという段階を経なくても、2枚の撮影画像における2つの画素レベルを用いてHを用いて推定した距離が、距離が分かっている主被写体において実際の距離に合うようにレンジ調整・校正することを意味している。外光の強度の推定はこの具現化手段のひとつではあるが、この考えに基づく限り、いかなる手法で行おうと同じ結果を得ることが出来る。   However, the point of the present embodiment is not to estimate the intensity of the external light itself, but to estimate the distance by using two captured images of strobe light emission / non-light emission on the basis of a main subject whose only actual distance is known. The idea is to calibrate the results. In fact, the distance estimated using H using the two pixel levels in the two photographed images does not have to explicitly estimate the intensity of the external light in the main subject whose distance is known. This means that the range is adjusted and calibrated to match the actual distance. Although the estimation of the intensity of outside light is one of the means for realizing this, as long as it is based on this idea, the same result can be obtained by any method.

本実施形態では、被写体毎に異なる反射率(色)の影響もキャンセルし、さらに撮影シーン毎に異なる外光の強度の違いもキャンセルすることができるため、距離の絶対値を知ることが出来るため、別の撮影シーン間との距離の比較も可能である。   In this embodiment, the influence of the reflectance (color) that differs for each subject can be canceled, and the difference in the intensity of external light that differs for each shooting scene can also be canceled, so the absolute value of the distance can be known. It is also possible to compare the distance between different shooting scenes.

被写体までの距離を連続値として扱うことが可能であり、応用範囲は極めて広い。   The distance to the subject can be treated as a continuous value, and the application range is extremely wide.

例えば、背景をぼかして被写界深度の浅い画像を生成する応用においても、単に前景と背景に切り分けるのではなく、距離毎に連続的にボケ量をコントロールできるため、光学的なボケ味に極めて近い高品位なボケ生成が可能である。また、どんな撮影シーンでも、距離によって安定したボケ味を得ることが出来る。   For example, even in applications where the background is blurred and an image with a shallow depth of field is generated, the amount of blur can be controlled continuously for each distance rather than simply separating the foreground and background. Near high-quality blur generation is possible. In any shooting scene, a stable bokeh can be obtained depending on the distance.

本実施形態2における撮像装置300は、前記撮像装置100に加えて前記光学系101において形成した被写体像内の合焦領域に位置する主被写体像までの距離に関する情報を測距するピント制御部103と、を備え、前記距離取得部307は、前記主被写体像までの距離に関する情報、前記被写体の反射率の影響を除去した値のうち前記主被写体に対応する値、前記被写体の反射率の影響を除去した値に基づいて算出される外光の影響を除去した値および、前記減衰特性を用いて前記被写体までの距離に関する情報を取得する。   The imaging apparatus 300 according to the second exemplary embodiment includes a focus control unit 103 that measures information about a distance to a main subject image located in a focus area in a subject image formed in the optical system 101 in addition to the imaging device 100. The distance acquisition unit 307 includes information on the distance to the main subject image, a value corresponding to the main subject among values obtained by removing the influence of the reflectance of the subject, and the influence of the reflectance of the subject. Information on the distance to the subject is acquired using the value obtained by removing the influence of the external light calculated based on the value obtained by removing the light and the attenuation characteristic.

上記の構成により、少なくとも他よりも精確に距離に関する情報を取得することが出来る主被写体の距離に関する情報を基準にすることにより、外光の影響を除去した値を算出することができる。さらに、外光の影響を除去した値に基づいて被写体までの距離を取得することが出来る。これにより、例えば建物等の遮蔽物の影響で外光が変化する場合であっても、この外光を除去した値を基に距離に関する情報を取得することができるため、より精確な距離に関する情報を取得することができる。   With the above-described configuration, it is possible to calculate a value from which the influence of external light is removed by using, as a reference, information related to the distance of the main subject that can acquire information related to the distance more accurately than others. Furthermore, the distance to the subject can be acquired based on the value from which the influence of external light has been removed. As a result, even when the outside light changes due to the influence of a shielding object such as a building, information on the distance can be acquired based on the value obtained by removing the outside light. Can be obtained.

[第3実施形態]
次に、本実施形態3を説明する。
[Third Embodiment]
Next, the third embodiment will be described.

<構成>
図9は、本実施形態3における撮像装置の概略構成図である。図6に示す第2の実施形態と共通のものは同じ要素番号を振っており説明を省略する。
<Configuration>
FIG. 9 is a schematic configuration diagram of an imaging apparatus according to the third embodiment. Components common to the second embodiment shown in FIG. 6 are assigned the same element numbers and will not be described.

撮像装置400は本実施形態3における撮像装置であり、外光補正部401は撮像された画像から外光の影響を補正する外光補正部である。   The imaging device 400 is the imaging device according to the third embodiment, and the external light correction unit 401 is an external light correction unit that corrects the influence of external light from the captured image.

本実施形態は3、第1および第2の実施形態が、当該撮影シーンにおいて外光の強度Cがどの被写体に対しても一様であると見なせるという仮定を設定することにより、反射率をキャンセルしていた。また、この仮定は多くのシーンで有効であるとしてきた。   In this embodiment, the reflectance is canceled by setting the assumption that the first and second embodiments can assume that the intensity C of the external light is uniform for any subject in the shooting scene. Was. This assumption has been valid in many scenes.

しかし、現実のシーンの中にはこの仮定が成り立たないシーンも存在する。   However, there are scenes where this assumption does not hold in real scenes.

例えば、木陰のように日陰の領域では外光の強度が期待よりも小さい。そのため暗いのにかかわらず、ストロボ光により明るくなるため、この領域を前述の実施形態の手法で距離を推定すると、実際より距離が近いと推定される。また逆に、太陽に向いている屋根などの斜面は、外光が期待より強くなるため、実際より距離が遠く推定される。   For example, the intensity of external light is smaller than expected in shaded areas such as shade. For this reason, the area is brightened by the strobe light regardless of whether it is dark. Therefore, when the distance of this area is estimated by the method of the above-described embodiment, it is estimated that the distance is closer than the actual distance. Conversely, the slopes such as the roof facing the sun are estimated to be farther away than the actual distance because the outside light is stronger than expected.

本実施形態3は、このような外光の不均一を軽減することにより、外光の当たり方による距離の誤差を減少させるものである。   In the third embodiment, the non-uniformity of the outside light is reduced, thereby reducing the distance error due to the way the outside light hits.

図10は外光補正部を構成する主要な機能ブロックである局所階調変換部500の構成を示している。   FIG. 10 shows a configuration of a local gradation conversion unit 500 which is a main functional block constituting the external light correction unit.

周囲明度検出部501は、比較的広い範囲の周囲の平均的な明るさを検出する周囲明度検出部である。   The ambient brightness detection unit 501 is an ambient brightness detection unit that detects average brightness around a relatively wide range.

@502は、周囲の平均的な明るさに応じて階調変換特性が変化する動的階調変換部である。   @ 502 is a dynamic gradation conversion unit in which gradation conversion characteristics change according to the average brightness of the surroundings.

<動作>
外光補正部401の動作を説明する。
<Operation>
The operation of the external light correction unit 401 will be described.

外光補正部401は、ストロボを発光う撮影にて得られるImg1からストロボを発光せずに撮影して得られるImg2を減算した、ストロボ光のみの画像(Img1−Img2)に対しては補正を行わず、外光のみで照明されているImg2に対してのみ、図10に示す局所階調処理部500を用いて外光の補正を行う。   The external light correction unit 401 corrects the strobe light only image (Img1-Img2) obtained by subtracting Img2 obtained by photographing without firing the strobe from Img1 obtained by photographing with the strobe. Without correction, correction of external light is performed using only the local gradation processing unit 500 shown in FIG. 10 only for Img2 that is illuminated only with external light.

局所階調処理部500を構成する周囲明度検出部501は画像中の処理すべき画素ISの周りの比較的広い範囲の明るさの平均USを出力する。   The ambient lightness detection unit 501 constituting the local gradation processing unit 500 outputs an average US of a relatively wide range of brightness around the pixel IS to be processed in the image.

また、動的階調変換部502は図11に示すように、周囲明度検出部501が出力する周囲の明度の平均値USごとに異なる階調変換特性(入力IS、出力OS)を持つ。   Further, as shown in FIG. 11, the dynamic gradation conversion unit 502 has different gradation conversion characteristics (input IS, output OS) for each average value US of ambient brightness output by the ambient brightness detection unit 501.

また、この変換特性は、IS=USの交点(図中の黒丸)を結んだ曲線(図中の太線)は逆S字特性を持っている。これは、比較的広い面積の階調特性を意味するIS=USの条件下では、広い範囲で暗部は明るく変換し、広い範囲で明部は暗くする特性をもつ。さらに、処理すべき画素周辺の局所領域(US=一定と見なせる範囲)では、変換特性が原点を通る直線になっているため、局所的なコントラストが維持される特性を持つ。   As for this conversion characteristic, a curve (bold line in the figure) connecting the intersections of IS = US (black circles in the figure) has an inverted S-characteristic. This means that under the condition of IS = US, which means a gradation characteristic of a relatively large area, the dark part is brightly converted over a wide range and the bright part is darkened over a wide range. Further, in the local region around the pixel to be processed (US = a range that can be regarded as constant), since the conversion characteristic is a straight line passing through the origin, the local contrast is maintained.

したがって、この特性の局所階調処理部500は、被写体の反射率の変化に繋がる局所コントラストは変化させずに、照明の当たり方の変化に繋がる大局的な明暗変化を軽減させる動作をするため、外光による照明ムラを除去・軽減する働きをする。   Therefore, the local gradation processing unit 500 having this characteristic operates to reduce a general change in brightness and darkness that leads to a change in lighting without changing the local contrast that leads to a change in reflectance of the subject. It works to remove and reduce uneven illumination due to external light.

なお、局所階調変換部500は被写体の反射率の変化に繋がる局所コントラストは変化させずに、照明の当たり方の変化に繋がる大局的な明暗変化を軽減させる動作を実行できる方法であればどのような方法を用いても構わない。   It should be noted that the local gradation conversion unit 500 can execute any operation that can reduce an overall change in brightness and darkness that leads to a change in lighting without changing the local contrast that leads to a change in the reflectance of the subject. Such a method may be used.

また、公知なRetinex技術や局所ヒストグラム処理も照明ムラを低減させる傾向の動作をするため使用することが出来る。   In addition, known Retinex technology and local histogram processing can also be used because they tend to reduce illumination unevenness.

本実施形態により、前述の実施形態が仮定していた外光の当たり方が均一という仮定が崩れる撮影シーンにおいても、より正確な距離推定が行え、良好な距離画像を得ることが出来る。   According to the present embodiment, it is possible to perform more accurate distance estimation and obtain a good distance image even in a shooting scene where the assumption that the external light hitting method assumed in the above-described embodiment is uniform is lost.

上記の構成により、撮像装置400は、撮像装置100および撮像装置300に加えて、前記第2の画像を構成する画像データに対して、局所階調特性に基づく変換処理を行う外光補正部401を有し、距離取得部307は、前記第1の画像を構成する画像データと前記第2の画像を構成する画像データとの差分値と、前記変換処理された第2の画像を構成する画像データと、の比率を外光の影響を除去した値とする。   With the above configuration, the imaging apparatus 400 performs an external light correction unit 401 that performs conversion processing based on local gradation characteristics on the image data constituting the second image, in addition to the imaging apparatus 100 and the imaging apparatus 300. The distance acquisition unit 307 includes a difference value between image data constituting the first image and image data constituting the second image, and an image constituting the second image subjected to the conversion process. The ratio to the data is set to a value from which the influence of external light is removed.

上記のように構成することにより、第2の画像に対して輝度ムラを軽減することができるため、より精度よく距離に関する情報を取得することが可能となる。   By configuring as described above, luminance unevenness can be reduced with respect to the second image, and thus it is possible to acquire information on the distance with higher accuracy.

[他の実施形態]
なお、上記実施形態で説明した撮像装置において、各ブロックは、LSIなどの半導体装置により個別に1チップ化されても良いし、一部又は全部を含むように1チップ化されても良い。なお、ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。
[Other Embodiments]
In the imaging device described in the above embodiment, each block may be individually made into one chip by a semiconductor device such as an LSI, or may be made into one chip so as to include a part or the whole. Here, although LSI is used, it may be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration.

また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。   Further, the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.

さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適用等が可能性としてあり得る。   Further, if integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied as a possibility.

また、上記実施形態の各処理をハードウェアにより実現してもよいし、ソフトウェア(OS(オペレーティングシステム)、ミドルウェア、あるいは、所定のライブラリとともに実現される場合を含む。)により実現してもよい。さらに、ソフトウェアおよびハードウェアの混在処理により実現しても良い。なお、上記実施形態に係る立体撮像装置をハードウェアにより実現する場合、各処理を行うためのタイミング調整を行う必要があるのは言うまでもない。上記実施形態においては、説明便宜のため、実際のハードウェア設計で生じる各種信号のタイミング調整の詳細については省略している。   Each processing of the above embodiment may be realized by hardware, or may be realized by software (including a case where the processing is realized together with an OS (Operating System), middleware, or a predetermined library). Further, it may be realized by mixed processing of software and hardware. Needless to say, when the stereoscopic imaging apparatus according to the above-described embodiment is realized by hardware, it is necessary to perform timing adjustment for performing each process. In the above embodiment, for convenience of explanation, details of timing adjustment of various signals generated in actual hardware design are omitted.

また、上記実施形態における処理方法の実行順序は、必ずしも、上記実施形態の記載に制限されるものではなく、発明の要旨を逸脱しない範囲で、実行順序を入れ替えることができるものである。   Moreover, the execution order of the processing method in the said embodiment is not necessarily restricted to description of the said embodiment, The execution order can be changed in the range which does not deviate from the summary of invention.

また、本発明の具体的な構成は、前述の実施形態に限られるものではなく、発明の要旨を逸脱しない範囲で種々の変更および修正が可能である。例えば、補助光としてストロボを用いて説明したが、フラッシュやLED光源などいかなる照明を用いても良い。   The specific configuration of the present invention is not limited to the above-described embodiment, and various changes and modifications can be made without departing from the scope of the invention. For example, although a strobe is used as auxiliary light, any illumination such as a flash or an LED light source may be used.

本発明に係る撮像装置、取得方法は、デジタルカメラ等の撮影装置に対して適用することが出来る。   The imaging apparatus and acquisition method according to the present invention can be applied to a photographing apparatus such as a digital camera.

100、300、400 撮像装置
101 光学系
102 イメージセンサ
103 ピント制御部
104 補助光発光部
105 撮影制御部
106 メモリ部
107、307 距離取得部
109、309 距離推定部
200 撮影シーン
201 外光による照射光
202 主被写体
203、204 その他の被写体
308 外光推定部
401 外光補正部
500 局所階調変換部
501 周囲明度検出部
502 動的階調補正部
DESCRIPTION OF SYMBOLS 100, 300, 400 Image pick-up device 101 Optical system 102 Image sensor 103 Focus control part 104 Auxiliary light emission part 105 Imaging | photography control part 106 Memory part 107,307 Distance acquisition part 109,309 Distance estimation part 200 Shooting scene 201 Irradiation light by external light 202 Main subjects 203 and 204 Other subjects 308 Ambient light estimation unit 401 Ambient light correction unit 500 Local gradation conversion unit 501 Ambient lightness detection unit 502 Dynamic gradation correction unit

Claims (4)

被写体を撮影し当該被写体までの距離に関する情報を生成する撮像装置であって、
前記被写体の被写体像を形成する光学部と、
前記被写体像を基に画像信号を得る撮影部と、
前記被写体を照射する補助光発光部と、
前記補助光発光部により前記被写体に補助光を照射させ第1の画像を撮影するよう前記光学部および前記撮影部を制御するとともに、補助光を照射しないで第2の画像を撮影するよう前記光学部および前記撮影部を制御する撮影モードを少なくとも備える撮影制御部と、
前記撮影モードで撮影して得られる前記第1の画像を構成する画像データおよび第2の画像を構成する画像データを用いて被写体の反射率の影響を除去した値を算出し、当該算出した値と光が距離に応じて減衰する特性である減衰特性とを用いて前記被写体までの距離に関する情報を取得する距離取得部を備える、
撮像装置
An imaging device that shoots a subject and generates information about a distance to the subject,
An optical unit for forming a subject image of the subject;
A photographing unit for obtaining an image signal based on the subject image;
An auxiliary light emitting unit for illuminating the subject;
The optical unit and the imaging unit are controlled to irradiate the subject with auxiliary light by the auxiliary light emitting unit to capture the first image, and the optical to capture the second image without irradiating the auxiliary light. A photographing control unit comprising at least a photographing mode for controlling the photographing unit and the photographing unit;
Using the image data constituting the first image and the image data constituting the second image obtained by photographing in the photographing mode, a value obtained by removing the influence of the reflectance of the subject is calculated, and the calculated value And a distance acquisition unit that acquires information on the distance to the subject using attenuation characteristics that are characteristics in which light attenuates according to distance.
Imaging device
前記撮像装置はさらに、前記光学部において形成した被写体像内の合焦領域に位置する主被写体像までの距離に関する情報を測距する測距部と、を備え、
前記距離取得部は、前記主被写体像までの距離に関する情報、前記被写体の反射率の影響を除去した値のうち前記主被写体に対応する値、前記被写体の反射率の影響を除去した値に基づいて算出される外光の影響を除去した値および、前記減衰特性を用いて前記被写体までの距離に関する情報を取得する
請求項1に記載の撮像装置。
The imaging apparatus further includes a distance measuring unit that measures information related to a distance to a main subject image located in a focus area in a subject image formed in the optical unit,
The distance acquisition unit is based on information on a distance to the main subject image, a value corresponding to the main subject among values obtained by removing the influence of the reflectance of the subject, and a value obtained by removing the influence of the reflectance of the subject. The image pickup apparatus according to claim 1, wherein information relating to a distance to the subject is acquired using a value obtained by removing an influence of external light calculated in the above and the attenuation characteristic.
前記撮像装置はさらに、前記第2の画像を構成する画像データに対して、局所階調特性に基づく変換処理を行う変換処理部を有し、
前記距離取得部は、前記第1の画像を構成する画像データと前記第2の画像を構成する画像データとの差分値と、前記変換処理された第2の画像を構成する画像データと、の比率を外光の影響を除去した値とする請求項1に記載の撮像装置。
The imaging apparatus further includes a conversion processing unit that performs conversion processing based on local gradation characteristics with respect to image data constituting the second image,
The distance acquisition unit includes a difference value between image data constituting the first image and image data constituting the second image, and image data constituting the converted second image. The imaging apparatus according to claim 1, wherein the ratio is a value from which an influence of external light is removed.
被写体を撮影する撮像装置における当該被写体までの距離に関する情報を取得する取得方法であって、
前記被写体の被写体像を形成する光学部と、
前記被写体像を基に画像信号を得る撮影部と、
前記被写体を照射する補助光発光部と、
自装置の制御を行う制御部と、を備え、
前記制御部は、
前記補助光発光部により前記被写体に補助光を照射させ第1の画像を撮影するよう前記光学部および前記撮影部を制御するとともに、補助光を照射しないで第2の画像を撮影するよう前記光学部および前記撮影部を制御し、
前記撮影モードで撮影して得られる前記第1の画像を構成する画像データおよび第2の画像を構成する画像データを用いて被写体の反射率の影響を除去した値を算出し、
前記算出した値と光が距離に応じて減衰する特性である減衰特性とを用いて前記被写体までの距離に関する情報を取得する、
取得方法。
An acquisition method for acquiring information related to a distance to a subject in an imaging apparatus that captures the subject,
An optical unit for forming a subject image of the subject;
A photographing unit for obtaining an image signal based on the subject image;
An auxiliary light emitting unit for illuminating the subject;
A control unit for controlling the own device,
The controller is
The optical unit and the imaging unit are controlled to irradiate the subject with auxiliary light by the auxiliary light emitting unit to capture the first image, and the optical to capture the second image without irradiating the auxiliary light. Control the imaging unit and the imaging unit,
Using the image data constituting the first image and the image data constituting the second image obtained by photographing in the photographing mode to calculate a value obtained by removing the influence of the reflectance of the subject,
Obtaining information on the distance to the subject using the calculated value and an attenuation characteristic that is a characteristic that light attenuates according to the distance;
Acquisition method.
JP2010229435A 2010-10-12 2010-10-12 Imaging device and acquisition method Pending JP2012085093A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010229435A JP2012085093A (en) 2010-10-12 2010-10-12 Imaging device and acquisition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010229435A JP2012085093A (en) 2010-10-12 2010-10-12 Imaging device and acquisition method

Publications (1)

Publication Number Publication Date
JP2012085093A true JP2012085093A (en) 2012-04-26

Family

ID=46243492

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010229435A Pending JP2012085093A (en) 2010-10-12 2010-10-12 Imaging device and acquisition method

Country Status (1)

Country Link
JP (1) JP2012085093A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5849150B1 (en) * 2014-12-25 2016-01-27 アキュートロジック株式会社 Imaging method
CN111343418A (en) * 2018-12-19 2020-06-26 发那科株式会社 Object monitoring system with distance measuring device
US11710343B2 (en) 2019-09-11 2023-07-25 Canon Kabushiki Kaisha Image processing device, image processing method, and storage medium for correcting brightness

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5849150B1 (en) * 2014-12-25 2016-01-27 アキュートロジック株式会社 Imaging method
CN105744248A (en) * 2014-12-25 2016-07-06 安奇逻辑股份有限公司 Image Capturing Method
CN105744248B (en) * 2014-12-25 2017-08-01 安奇逻辑股份有限公司 Image capture method
CN111343418A (en) * 2018-12-19 2020-06-26 发那科株式会社 Object monitoring system with distance measuring device
US11710343B2 (en) 2019-09-11 2023-07-25 Canon Kabushiki Kaisha Image processing device, image processing method, and storage medium for correcting brightness

Similar Documents

Publication Publication Date Title
JP5108093B2 (en) Imaging apparatus and imaging method
US20200043225A1 (en) Image processing apparatus and control method thereof
JP6445844B2 (en) Imaging device and method performed in imaging device
JP4999763B2 (en) Imaging apparatus, imaging method, program, recording medium, and integrated circuit
US10084967B1 (en) Systems and methods for regionally controlling exposure time in high dynamic range imaging
US8358370B2 (en) Flash light compensation system for digital camera system
JP6381404B2 (en) Image processing apparatus and method, and imaging apparatus
JP6463177B2 (en) Image processing apparatus and control method thereof
TWI801637B (en) Infrared pre-flash for camera
JP5848662B2 (en) Image processing apparatus and control method thereof
JP6412386B2 (en) Image processing apparatus, control method therefor, program, and recording medium
US9894339B2 (en) Image processing apparatus, image processing method and program
US9191573B2 (en) Image capturing apparatus for determining an exposure condition by calculating aphotmetric value for each object region and method of controlling the same
JP7059076B2 (en) Image processing device, its control method, program, recording medium
JP2017152866A (en) Image processing system and image processing method
JP2015090562A (en) Image processing device, method, and program
JP2012085093A (en) Imaging device and acquisition method
JP6921606B2 (en) Image processing equipment, image processing methods and programs
TWI764484B (en) Dual sensor imaging system and calibration method thereof
CN112866596B (en) Anti-strong light three-dimensional capturing method and system based on CMOS sensor
KR100978675B1 (en) Method of controlling white balance at flashlight photographing
JP2014098859A (en) Imaging apparatus and imaging method
JP2011135379A (en) Imaging apparatus, imaging method and program
JP7446080B2 (en) Image processing device, imaging device, control method, program and imaging system
CN115278098A (en) Image shooting method and system and shooting device thereof