JP7341843B2 - Image processing device, image processing method, imaging device, program - Google Patents

Image processing device, image processing method, imaging device, program Download PDF

Info

Publication number
JP7341843B2
JP7341843B2 JP2019190302A JP2019190302A JP7341843B2 JP 7341843 B2 JP7341843 B2 JP 7341843B2 JP 2019190302 A JP2019190302 A JP 2019190302A JP 2019190302 A JP2019190302 A JP 2019190302A JP 7341843 B2 JP7341843 B2 JP 7341843B2
Authority
JP
Japan
Prior art keywords
information
image
color
distance
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019190302A
Other languages
Japanese (ja)
Other versions
JP2021068925A (en
Inventor
知 小松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2019190302A priority Critical patent/JP7341843B2/en
Publication of JP2021068925A publication Critical patent/JP2021068925A/en
Application granted granted Critical
Publication of JP7341843B2 publication Critical patent/JP7341843B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)

Description

本発明は、距離情報に対応するカラー画像および撮影情報を用いて距離計測誤差を補正する技術に関する。 The present invention relates to a technique for correcting distance measurement errors using color images and photographic information corresponding to distance information.

撮影時に距離情報を取得可能な撮像装置がある。距離情報は、被写体の合焦距離、距離画像、視差画像等の、撮像装置から被写体までの距離分布に関連する深度情報である。取得された距離情報は、カラー画像と共に付属情報の記憶領域に保存される。 There are imaging devices that can acquire distance information when shooting. The distance information is depth information related to the distance distribution from the imaging device to the subject, such as the focal distance of the subject, a distance image, and a parallax image. The acquired distance information is stored in the attached information storage area together with the color image.

特許文献1に開示の撮像素子は、特定の画素(距離計測用画素)にてマイクロレンズと2つの光電変換部を配置した構成を有し、視点が異なる2つの画像のデータを生成する。2つの画像から画素ごとの視差を算出し、撮像光学系のパラメータを用いて視差を被写体までの距離に変換することで距離を算出することができる。距離計測用画素を撮像素子全面に配置することで、全画素において距離計測が可能である。また、距離計測に利用した2つの画像を合成することで撮像画像を同時に生成できる。つまりカラー画像と同時に、カラー画像と同じ解像度であって、ほぼ同じ視点での距離画像の生成が可能となる。 The image sensor disclosed in Patent Document 1 has a configuration in which a microlens and two photoelectric conversion units are arranged at a specific pixel (distance measurement pixel), and generates data of two images from different viewpoints. The distance can be calculated by calculating the parallax for each pixel from the two images and converting the parallax into a distance to the subject using parameters of the imaging optical system. By arranging distance measurement pixels over the entire surface of the image sensor, distance measurement is possible in all pixels. Further, by combining two images used for distance measurement, a captured image can be generated simultaneously. In other words, it is possible to simultaneously generate a color image and a distance image with the same resolution as the color image and from approximately the same viewpoint.

特許文献1に開示の距離計測方式では、撮像光学系を通して被写体像が撮像素子上に形成され、その画像から距離情報が取得される。撮像光学系の色収差(軸上色収差、倍率色収差)の影響によって、同じ距離に存在する被写体でもその色(分光分布)に依存して結像位置が変化するので、算出される距離が変化する。そこで特許文献1では、距離計測時の色収差による被写体色の影響を補正する方法として、距離計測に用いる画像信号にて色成分ごとに距離計測へ与える寄与率を算出し、寄与率および撮像光学系の色収差情報に基づく距離の補正を行う。 In the distance measurement method disclosed in Patent Document 1, a subject image is formed on an image sensor through an imaging optical system, and distance information is acquired from the image. Due to the effects of chromatic aberration (axial chromatic aberration, lateral chromatic aberration) of the imaging optical system, the imaging position changes depending on the color (spectral distribution) of objects even if they are located at the same distance, so the calculated distance changes. Therefore, in Patent Document 1, as a method of correcting the influence of subject color due to chromatic aberration during distance measurement, the contribution rate to distance measurement is calculated for each color component in the image signal used for distance measurement, and the contribution rate and the imaging optical system are The distance is corrected based on the chromatic aberration information.

特開2019-9511号公報JP2019-9511A

特許文献1のような被写体色による距離計測誤差の補正は、計測装置において距離計測時に実施されるが、一般的なデジタルカメラにおいて合焦した被写体までの距離を付属情報として出力する用途では実施されていない。特許文献1の距離計測誤差の補正方法は、デジタルカメラでの撮影後に保存されたカラー画像を用いて距離を補正する場合に適用できる。しかしながら、デジタルカメラで撮影して保存されたカラー画像は、視覚的に好ましくなるように様々な画像処理が施されているので、距離計測を実行した際の画像信号とは異なる画像信号になっている。このような画像信号を用いて、距離計測誤差の補正処理を実行しても、正しい補正値が得られず十分な補正効果が得られない可能性がある。
本発明は、距離計測に用いた画像とは異なるカラー画像と撮影情報を用いて、被写体色による距離計測誤差の補正を精度よく行うことを目的とする。
Correction of distance measurement errors based on object color as in Patent Document 1 is performed in a measuring device when measuring a distance, but it is not performed in a typical digital camera for outputting the distance to a focused object as attached information. Not yet. The distance measurement error correction method disclosed in Patent Document 1 can be applied to the case where distance is corrected using a color image saved after shooting with a digital camera. However, color images taken and saved with a digital camera undergo various image processing to make them more visually pleasing, so the image signal may be different from the image signal used when distance measurement is performed. There is. Even if distance measurement error correction processing is performed using such an image signal, there is a possibility that a correct correction value may not be obtained and a sufficient correction effect may not be obtained.
An object of the present invention is to accurately correct distance measurement errors due to subject color by using a color image and photographing information different from the image used for distance measurement.

本発明の実施形態の装置は、被写体の距離情報に対して、前記距離情報とともに取得されたカラー画像の情報を用いて補正する画像処理装置であって、前記カラー画像および距離情報の取得時の撮影情報である第1の情報と、前記距離情報の算出に用いられた第2の情報を取得する取得手段と、前記第1および第2の情報を用いて、前記距離情報の補正量を算出する算出手段と、前記補正量と前記第1の情報を用いて、前記距離情報を補正する補正手段と、を備える。前記取得手段は、前記第1の情報として前記カラー画像の生成にて色別に用いられた情報を取得し、前記第2の情報として撮像装置が備える撮像光学系の色収差情報を取得する。 An apparatus according to an embodiment of the present invention is an image processing apparatus that corrects distance information of a subject using information of a color image acquired together with the distance information, the apparatus comprising: an acquisition unit that acquires first information that is photographing information and second information used to calculate the distance information; and calculating a correction amount of the distance information using the first and second information. and a correction means that corrects the distance information using the correction amount and the first information. The acquisition means acquires information used for each color in the generation of the color image as the first information, and acquires chromatic aberration information of an imaging optical system included in the imaging apparatus as the second information.

本発明によれば、距離計測に用いた画像とは異なるカラー画像と撮影情報を用いて、被写体色による距離計測誤差の補正を精度よく行うことができる。 According to the present invention, it is possible to accurately correct a distance measurement error due to the subject color by using a color image different from the image used for distance measurement and photographing information.

撮像光学系の軸上色収差の説明図である。FIG. 3 is an explanatory diagram of axial chromatic aberration of the imaging optical system. 実施形態および変形例に係る画像処理装置の機能構成を示すブロック図である。FIG. 2 is a block diagram showing a functional configuration of an image processing device according to an embodiment and a modification. 実施形態の画像処理装置で実行される処理を例示するフローチャートである。3 is a flowchart illustrating a process executed by the image processing apparatus according to the embodiment. 撮像素子上に配置されたカラーフィルタの分光分布の説明図である。FIG. 2 is an explanatory diagram of a spectral distribution of a color filter placed on an image sensor. 第1変形例に係る距離補正量の算出を説明するフローチャートである。It is a flowchart explaining calculation of the distance correction amount concerning the 1st modification. 第2変形例に係る距離補正量の算出を説明するフローチャートである。It is a flowchart explaining calculation of the distance correction amount concerning the 2nd modification.

以下、本発明の実施形態について添付図面を参照して詳細に説明する。本発明は、被写体の距離分布に関連する深度情報を取得可能な撮像装置や情報処理装置等に適用可能である。深度情報は撮像画像の奥行方向の情報であり、深度画像または深度マップは深度情報の分布を表す情報である。深度情報としては、視点の異なる複数の視点画像から算出される像ずれ量マップや、像ずれ量に所定の変換係数を乗算して算出されるデフォーカス量マップ、デフォーカス量を被写体距離情報に換算した距離マップ、距離画像等を用いることができる。被写体距離情報は、撮像装置から被写体までの距離を表す情報である。 Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. INDUSTRIAL APPLICATION This invention is applicable to an imaging device, an information processing device, etc. which can acquire depth information related to distance distribution of a subject. Depth information is information in the depth direction of a captured image, and a depth image or depth map is information representing a distribution of depth information. Depth information includes an image shift amount map calculated from multiple viewpoint images from different viewpoints, a defocus amount map calculated by multiplying the image shift amount by a predetermined conversion coefficient, and a defocus amount used as object distance information. A converted distance map, distance image, etc. can be used. The subject distance information is information representing the distance from the imaging device to the subject.

一例として、撮像面位相差検出方式の撮像素子を用いる距離計測法では、撮像素子の画素アレイを構成する各画素部がマイクロレンズ、カラーフィルタ、光電変換部を有する。各マイクロレンズに対応する複数の光電変換部が配置され、第1の光電変換部は撮像光学系の射出瞳における第1の瞳部分領域を通過した光を受光し、第2の光電変換部は撮像光学系の射出瞳における第2の瞳部分領域を通過した光を受光する。各画素部の第1の光電変換部からそれぞれ出力される信号に対応する第1の像信号と、各画素部の第2の光電変換部からそれぞれ出力される信号に対応する第2の像信号とにより、視点の異なる複数の視点画像の信号が取得される。複数の像信号の位相検出に基づいて像ずれ量、デフォーカス量、被写体距離情報を公知の方法で算出可能である。 As an example, in a distance measurement method using an imaging device using an imaging surface phase difference detection method, each pixel section forming a pixel array of the imaging device has a microlens, a color filter, and a photoelectric conversion section. A plurality of photoelectric conversion sections corresponding to each microlens are arranged, the first photoelectric conversion section receives light that has passed through the first pupil partial region in the exit pupil of the imaging optical system, and the second photoelectric conversion section The light passing through the second pupil partial area in the exit pupil of the imaging optical system is received. A first image signal corresponding to the signal output from the first photoelectric conversion section of each pixel section, and a second image signal corresponding to the signal output from the second photoelectric conversion section of each pixel section. As a result, signals of a plurality of viewpoint images from different viewpoints are acquired. Based on phase detection of a plurality of image signals, the image shift amount, defocus amount, and object distance information can be calculated using a known method.

図1を参照して、距離計測における被写体色による距離計測誤差に関して説明する。距離計測法には、撮像面位相差に基づく距離計測法やDFD(Depth from Defocus)法等がある。撮像光学系を通して結像した画像のデータを用いて距離計測を行う方法では、撮像光学系の色収差の影響を受ける。 Referring to FIG. 1, distance measurement errors due to subject color in distance measurement will be described. Distance measurement methods include a distance measurement method based on an imaging plane phase difference, a DFD (Depth from Defocus) method, and the like. A method of measuring distance using data of an image formed through an imaging optical system is affected by chromatic aberration of the imaging optical system.

図1は、撮像光学系101の軸上色収差を説明する概略図である。撮像光学系101および光学素子(撮像素子)103に対して、その光軸100上の物点102に被写体が存在する。物点102から発した光は、理想的には撮像光学系101により、像面上に配置された光学素子103上の一点に結像する。しかしながら、撮像光学系101の軸上色収差の影響によって、光の波長に応じて結像する位置が光軸方向にずれると、デフォーカスが生じる。図1では3種類の波長帯域として、赤波長帯の光束104、緑波長帯の光束105、青波長帯の光束106の例を示す。 FIG. 1 is a schematic diagram illustrating longitudinal chromatic aberration of the imaging optical system 101. A subject exists at an object point 102 on an optical axis 100 of an imaging optical system 101 and an optical element (imaging element) 103 . Ideally, the light emitted from the object point 102 is imaged by the imaging optical system 101 onto a point on the optical element 103 arranged on the image plane. However, due to the influence of axial chromatic aberration of the imaging optical system 101, when the image forming position shifts in the optical axis direction according to the wavelength of light, defocus occurs. FIG. 1 shows an example of three types of wavelength bands: a light beam 104 in a red wavelength band, a light beam 105 in a green wavelength band, and a light beam 106 in a blue wavelength band.

被写体から発した光の波長帯(被写体色)に応じて、像面上でのデフォーカス量が異なる。前述の距離計測方法はデフォーカス量に依存した計測方法であるので、同じ距離に位置する被写体であっても被写体の色により算出される距離が異なる。精度の高い計測が求められる距離計測装置の場合、被写体色による距離計測誤差は距離計測装置内で補正される。しかし、デジタルカメラ等の一般的な撮像装置から取得された距離は補正されていない場合がある。 The amount of defocus on the image plane differs depending on the wavelength band (object color) of the light emitted from the object. Since the above-described distance measurement method is a measurement method that depends on the amount of defocus, the distance calculated differs depending on the color of the object even if the objects are located at the same distance. In the case of a distance measuring device that requires highly accurate measurement, distance measurement errors due to subject color are corrected within the distance measuring device. However, distances obtained from general imaging devices such as digital cameras may not be corrected.

一例として、デジタルカメラにおいて、主被写体に合焦した撮像光学系の状態からその距離を算出して出力する際、被写体の色が考慮されていない場合を想定する。合焦は被写体の色に依らず実行可能であるが、被写体の色によりその合焦位置は異なる。よって、合焦位置から被写体距離を求める際には、一般に、ある基準の色(例えば緑波長、波長ごとの加重平均値)の合焦情報に基づいて距離が算出される。したがって同じ距離に位置する被写体であっても、被写体色によって距離計測結果は異なる。合焦時の被写体距離のデータは、カラー画像データと共に所定形式のファイル(Exifファイル等)に出力されるが、距離計測用途として精度が十分ではない。例えば、撮影画像を用いて寸法計測を実施する場合には撮影時の倍率が必要である。撮影倍率は撮像光学系の焦点距離と被写体までの距離から算出される。よって、精度の良い寸法計測を行うためには、Exifファイル等に出力された被写体距離よりも高精度な被写体距離が必要となる。 As an example, assume that in a digital camera, when calculating and outputting the distance from the state of the imaging optical system that is focused on the main subject, the color of the subject is not taken into account. Although focusing is possible regardless of the color of the subject, the focus position differs depending on the color of the subject. Therefore, when determining a subject distance from a focus position, the distance is generally calculated based on focus information of a certain reference color (eg, green wavelength, weighted average value for each wavelength). Therefore, even if objects are located at the same distance, the distance measurement results will differ depending on the color of the object. Data on the subject distance at the time of focus is output to a file in a predetermined format (such as an Exif file) together with the color image data, but the accuracy is not sufficient for distance measurement purposes. For example, when performing dimension measurement using a photographed image, a magnification at the time of photographing is required. The imaging magnification is calculated from the focal length of the imaging optical system and the distance to the subject. Therefore, in order to perform dimension measurements with high precision, a subject distance that is more accurate than the subject distance output to an Exif file or the like is required.

被写体色による距離計測誤差を補正するためには、距離計測に利用した被写体の色が必要となる。しかし、デジタルカメラで撮影された後に記憶媒体に保存されたカラー画像は画像処理が施されている。つまり、本来の被写体色とは異なる色の画像であるため、特許文献1の方法を適用しても正しい補正が実施できない。そこで本発明では、既に保存されたカラー画像と撮影情報を用いて距離情報(例えば距離画像)をより正確に補正する装置および方法を説明する。 In order to correct distance measurement errors due to subject color, the color of the subject used for distance measurement is required. However, color images taken with a digital camera and then stored in a storage medium are subjected to image processing. In other words, since the image has a color different from the original subject color, correct correction cannot be performed even if the method of Patent Document 1 is applied. Therefore, in the present invention, an apparatus and method for more accurately correcting distance information (for example, a distance image) using already stored color images and photographic information will be described.

図2は、本実施形態に係る画像処理装置200の機能構成を示すブロック図である。画像処理装置200は、例えば撮像装置やコンピュータ等に適用され、画像データを取得して距離情報の補正処理を実行する。画像処理装置200は、例えばCPU(中央演算処理装置)を備え、所定のプログラムを読み出して実行することにより、以下に示す処理を実現する。 FIG. 2 is a block diagram showing the functional configuration of the image processing apparatus 200 according to this embodiment. The image processing device 200 is applied to, for example, an imaging device or a computer, and acquires image data and executes distance information correction processing. The image processing device 200 includes, for example, a CPU (central processing unit), and implements the following processing by reading and executing a predetermined program.

画像読込部201は、記憶媒体等に保存された画像ファイルのデータを読み出し、カラー画像および距離画像のデータをメモリ206上に展開する。情報取得部202は、読み込まれた画像ファイルにおける付属情報(例えば、Exifファイル)から撮影時の情報を取得する。また情報取得部202は、画像を取得した撮像装置を識別し、当該撮像装置に関する情報を記憶部205から取得する。 The image reading unit 201 reads data of an image file stored in a storage medium or the like, and develops color image and distance image data on the memory 206. The information acquisition unit 202 acquires information at the time of shooting from the attached information (for example, an Exif file) in the read image file. The information acquisition unit 202 also identifies the imaging device that acquired the image, and acquires information regarding the imaging device from the storage unit 205.

補正量算出部203は、取得されたカラー画像と撮影情報から被写体色による距離計測誤差を推定し、推定結果に基づいて距離画像の補正量を算出する。距離補正部204は、補正量算出部203により算出された補正量を用いて距離画像を補正する。補正された距離画像のデータはメモリ206に記憶され、また表示装置や外部機器等に出力される。 The correction amount calculation unit 203 estimates the distance measurement error due to the subject color from the acquired color image and photographing information, and calculates the correction amount of the distance image based on the estimation result. The distance correction unit 204 corrects the distance image using the correction amount calculated by the correction amount calculation unit 203. The corrected distance image data is stored in the memory 206 and output to a display device, external device, etc.

図3を参照して、画像処理装置200が実行する距離補正処理について具体的に説明する。図3は、取得後に保存された距離画像の被写体色による距離計測誤差を補正する距離補正処理を説明するフローチャートである。図3(A)は距離補正処理の流れを示し、図3(B)はS305に示す距離補正量算出処理の流れを示す。 The distance correction process executed by the image processing apparatus 200 will be specifically described with reference to FIG. 3. FIG. 3 is a flowchart illustrating a distance correction process for correcting a distance measurement error due to the subject color of a distance image saved after acquisition. FIG. 3(A) shows the flow of distance correction processing, and FIG. 3(B) shows the flow of distance correction amount calculation processing shown in S305.

図3(A)のS301で、画像読込部201は、撮像装置によって取得された後、不図示の外部記憶装置に保存されたカラー画像(観賞用画像)のデータを読み込んでメモリ206に展開する。カラー画像は、撮像装置が備える撮像素子上に配置されたカラーフィルタごとの輝度情報をもつ画像である。一般にカラーフィルタとしてRフィルタ(赤波長帯)、Gフィルタ(緑波長帯)、Bフィルタ(青波長帯)が使用される。カラー画像は、各カラーフィルタを通して得られた輝度画像、つまりR画像(I)、G画像(I)、B画像(I)を含む画像である。 In S301 of FIG. 3A, the image reading unit 201 reads data of a color image (ornamental image) acquired by the imaging device and stored in an external storage device (not shown), and develops it in the memory 206. . A color image is an image that has luminance information for each color filter arranged on an image sensor included in an imaging device. Generally, R filters (red wavelength band), G filters (green wavelength band), and B filters (blue wavelength band) are used as color filters. The color image is an image including brightness images obtained through each color filter, that is, an R image (I R ), a G image (I G ), and a B image (I B ).

S302で、画像読込部201はカラー画像と共に取得された距離画像を、外部記憶装置から読み込んでメモリ206に展開する。距離画像は、撮像面位相差に基づく距離計測法やDFD法によって、前記カラー画像が画像処理される前の画像から生成される。よって距離画像は前記カラー画像とほぼ同じ視点で算出された距離情報を有する。距離画像の解像度は、前記カラー画像と同様の解像度が好ましいが、双方の解像度が異なる場合であっても距離補正処理を実行可能である。 In S302, the image reading unit 201 reads the distance image acquired together with the color image from the external storage device and develops it in the memory 206. The distance image is generated from an image before the color image is subjected to image processing by a distance measurement method or a DFD method based on the phase difference of the imaging plane. Therefore, the distance image has distance information calculated from approximately the same viewpoint as the color image. Although the resolution of the distance image is preferably the same as that of the color image, the distance correction process can be performed even if the resolutions of both images are different.

S303で、情報取得部202は前記カラー画像および距離画像の取得時の撮影情報を、カラー画像の付属情報(例えば、Exifファイル)から取得する。この付属情報は、撮影時に行われたカラー画像に対するホワイトバランス(以下、WBとも記す)処理の情報である。より具体的には、カラーフィルタごとの輝度画像に対するゲイン情報(WB、WB、WB)である。情報取得部202はまた、他の付属情報として、撮影時に用いられた撮像装置の機種情報および撮像装置に付属する撮像光学系の焦点距離情報を取得する。 In S303, the information acquisition unit 202 acquires shooting information at the time of acquisition of the color image and distance image from the attached information of the color image (for example, an Exif file). This attached information is information on white balance (hereinafter also referred to as WB) processing performed on a color image at the time of photographing. More specifically, it is gain information (WB R , WB G , WB B ) for the luminance image for each color filter. The information acquisition unit 202 also acquires, as other attached information, model information of the imaging device used at the time of photographing and focal length information of the imaging optical system attached to the imaging device.

S304で、情報取得部202は撮像装置の機種情報を用いて、記憶部205に格納済みの撮像装置の色収差情報(CAと記す)を読み込んでメモリ206に展開する。色収差情報CAは撮像装置の撮像光学系に応じて異なるので、記憶部205には複数の撮像装置に対する色収差情報がそれぞれ記憶されている。つまり撮像装置に対応する多くの色収差情報を記憶部205に格納しておくことで、汎用性を高めることができる。 In step S<b>304 , the information acquisition unit 202 uses the model information of the imaging device to read the chromatic aberration information (denoted as CA) of the imaging device stored in the storage unit 205 and develops it in the memory 206 . Since the chromatic aberration information CA differs depending on the imaging optical system of the imaging device, the storage unit 205 stores chromatic aberration information for each of the plurality of imaging devices. In other words, by storing a large amount of chromatic aberration information corresponding to the imaging device in the storage unit 205, versatility can be increased.

色収差情報CAは、カラー画像および距離画像を取得した際に使用された撮像装置の撮像光学系の色収差に係る情報である。色収差情報CAは下記の情報を含む。
・CA(赤波長帯用の色収差情報)。
・CA(緑波長帯用の色収差情報)。
・CA(青波長帯用の色収差情報)。
The chromatic aberration information CA is information related to the chromatic aberration of the imaging optical system of the imaging device used when acquiring the color image and the distance image. The chromatic aberration information CA includes the following information.
CAR (chromatic aberration information for red wavelength band).
- CA G (chromatic aberration information for green wavelength band).
- CA B (chromatic aberration information for blue wavelength band).

カラーフィルタに対応する波長帯ごとの色収差情報は、予め記憶部205に格納されている。色収差情報として、例えば撮像光学系の軸上色収差量を用いることができる。軸上色収差量は、特定の波長における最適な像面位置を基準として、基準位置からの各波長の最適な像面位置の距離(相対的な量)で表すことができる。特定の波長は、例えばGフィルタの中心波長またはピーク波長、撮像光学系の設計時に用いた基準波長等である。 Chromatic aberration information for each wavelength band corresponding to the color filter is stored in the storage unit 205 in advance. As the chromatic aberration information, for example, the amount of axial chromatic aberration of the imaging optical system can be used. The amount of axial chromatic aberration can be expressed as the distance (relative amount) of the optimum image plane position for each wavelength from the reference position, with the optimum image plane position for a specific wavelength as a reference. The specific wavelength is, for example, the center wavelength or peak wavelength of the G filter, the reference wavelength used when designing the imaging optical system, or the like.

図4を参照して各フィルタの、波長(横軸)に対する感度(縦軸)の特性を説明する。撮像素子上に配置されたカラーフィルタはR,G,Bごとに、図4に示すような波長幅を持っている。1つのカラーフィルタにおいても複数の波長が含まれ、波長ごとに軸上色収差量は異なる。そこで、各カラーフィルタの分光特性を用いて軸上色収差の加重平均を行い、カラーフィルタごとの代表値として色収差情報CA,CA,CAを算出することができる。簡易的には、それぞれのカラーフィルタの中心波長やピーク波長における軸上色収差量を代表値として色収差情報CA,CA,CAに設定することも可能である。 The sensitivity (vertical axis) characteristics of each filter with respect to wavelength (horizontal axis) will be explained with reference to FIG. The color filter arranged on the image sensor has wavelength widths for each of R, G, and B as shown in FIG. A single color filter also includes a plurality of wavelengths, and the amount of axial chromatic aberration differs for each wavelength. Therefore, by performing a weighted average of longitudinal chromatic aberrations using the spectral characteristics of each color filter, it is possible to calculate chromatic aberration information CA R , CA G , CA B as representative values for each color filter. For simplicity, it is also possible to set the chromatic aberration information CA R , CA G , CA B using the amount of axial chromatic aberration at the center wavelength or peak wavelength of each color filter as a representative value.

S304で情報取得部202は、以下の撮像装置情報を取得する。
・距離計測時に利用した空間周波数帯域の情報
・距離計測時に輝度画像を生成した際の各カラーの混合比率情報
・距離計測時に利用した画像に対するウィンドウサイズ情報。
空間周波数帯域の情報としては、距離計測時に所望の空間周波数帯域の成分を抽出するために利用したバンドパスフィルタの情報を利用するのが好適である。また混合比率情報としては、距離計測に利用した輝度画像を生成する際のR,G,Bの各カラーフィルタにおける輝度画像の混合比率(Y,Y,Y)が取得される。ウィンドウサイズ情報(Wと記す)は、ある注目画素における距離を算出する際に利用した、注目画素の周辺領域(局所領域)のウィンドウの大きさを表す情報である。
In S304, the information acquisition unit 202 acquires the following imaging device information.
・Information on the spatial frequency band used during distance measurement ・Information on the mixing ratio of each color when generating the brightness image during distance measurement ・Window size information for the image used during distance measurement.
As information on the spatial frequency band, it is preferable to use information on a bandpass filter used to extract components of a desired spatial frequency band during distance measurement. Further, as the mixture ratio information, the mixture ratio (Y R , Y G , Y B ) of the brightness images in each of the R, G, and B color filters when generating the brightness image used for distance measurement is acquired. Window size information (denoted as W) is information representing the size of a window in a peripheral area (local area) of a pixel of interest, which is used when calculating a distance at a certain pixel of interest.

S305で補正量算出部203は、情報取得部202で取得されたカラー画像、ホワイトバランス処理情報、軸上色収差情報を用いて、距離画像における画素ごとの補正量を算出する。距離補正量の算出処理については図3(B)を用いて後述する。 In S305, the correction amount calculation unit 203 uses the color image, white balance processing information, and longitudinal chromatic aberration information acquired by the information acquisition unit 202 to calculate the correction amount for each pixel in the distance image. The distance correction amount calculation process will be described later using FIG. 3(B).

S306で距離補正部204は、S305で算出された距離補正量、およびS303で取得された撮影情報(焦点距離)を用いて、距離画像を補正する。その後、距離補正処理を終了する。 In S306, the distance correction unit 204 corrects the distance image using the distance correction amount calculated in S305 and the photographing information (focal length) acquired in S303. After that, the distance correction process ends.

次に図3(B)を参照して、距離補正量の算出処理について詳細に説明する。S3051で、補正量算出部203は図3(A)のS301において読み込んだカラー画像のデータに対し、S304で取得した空間周波数帯域の情報(バンドパスフィルタ情報)を用いてフィルタリング処理を実行する。各カラーフィルタの輝度画像(R画像、G画像、B画像)ごとにフィルタリング処理が行われる。これにより、各色に係る輝度画像にて、距離計測時に利用した空間周波数帯域の成分が抽出された帯域制限画像のデータが生成される。 Next, the distance correction amount calculation process will be described in detail with reference to FIG. 3(B). In S3051, the correction amount calculation unit 203 performs filtering processing on the color image data read in S301 of FIG. 3A using the spatial frequency band information (bandpass filter information) acquired in S304. Filtering processing is performed for each brightness image (R image, G image, B image) of each color filter. As a result, band-limited image data is generated in which components of the spatial frequency band used during distance measurement are extracted from the luminance image for each color.

S3052で、補正量算出部203はカラーフィルタの色別に寄与率を算出する。寄与率は、各カラーフィルタからの輝度画像が距離計測に与えた影響度合いを表す比率であり、各カラーフィルタにおける帯域制限画像と、S304で取得された距離計測時のウィンドウサイズ情報を用いて、画素ごとに算出される。 In S3052, the correction amount calculation unit 203 calculates a contribution rate for each color of the color filter. The contribution rate is a ratio representing the degree of influence that the luminance image from each color filter has on distance measurement, and using the band-limited image in each color filter and the window size information at the time of distance measurement acquired in S304, Calculated for each pixel.

具体的には、まず各カラーの帯域制限画像にて、注目画素とその周囲の領域(所定のウィンドウサイズをもつ局所領域)における輝度和、または平均輝度、または標準偏差が算出される。補正量算出部203は、この処理を全画素位置に対して実行し、各カラーの各画素において強度情報を取得する。色別の強度情報をC,C,Cと表記する。得られた強度情報は、カラー画像に基づいて生成された情報であり、距離計測時の画像情報とは異なる。 Specifically, first, in the band-limited image of each color, the luminance sum, average luminance, or standard deviation of the pixel of interest and its surrounding area (local area with a predetermined window size) is calculated. The correction amount calculation unit 203 executes this process for all pixel positions and obtains intensity information for each pixel of each color. Intensity information for each color is expressed as C R , C G , and C B . The obtained intensity information is information generated based on a color image, and is different from the image information at the time of distance measurement.

次に補正量算出部203は、ゲイン情報(WB,WB,WB)から、逆ゲイン(WBI,WBI,WBI)を算出する。ゲイン情報(WB,WB,WB)は、S303で取得されたホワイトバランス調整のための情報である。また逆ゲイン(WBI、WBI、WBI)は、WB処理の実行前のカラー画像信号を復元するための情報である。 Next, the correction amount calculation unit 203 calculates inverse gains (WBI R , WBI G , WBI B ) from the gain information (WB R , WB G , WB B ). The gain information (WB R , WB G , WB B ) is information for white balance adjustment acquired in S303. Further, the inverse gains (WBI R , WBI G , WBI B ) are information for restoring the color image signal before execution of WB processing.

更に補正量算出部203は、距離計測に用いた輝度画像を生成するための混合比率(Y,Y,Y)を利用することで、各カラーフィルタの波長帯からの寄与分を補正する。下記数式[数1]を用いて、寄与率(CT,CT,CT)が算出される。

Figure 0007341843000001
数式中のx,yは距離画像における2次元座標値を表している。 Furthermore, the correction amount calculation unit 203 corrects the contribution from the wavelength band of each color filter by using the mixing ratio (Y R , Y G , Y B ) for generating the brightness image used for distance measurement. do. The contribution rate (CT R , CT G , CT B ) is calculated using the following formula [Equation 1].
Figure 0007341843000001
x and y in the formula represent two-dimensional coordinate values in the distance image.

S3053で、補正量算出部203は色収差情報(CA,CA,CA)と、S3052でカラーフィルタの色別に算出された寄与率(CT,CT,CT)から、下記数式[数2]を用いて距離補正量(DCと記す)を算出する。つまり、色別にCAとCTを乗算して、それらを加算することによって、距離補正量DCが得られる。

Figure 0007341843000002
In S3053, the correction amount calculation unit 203 calculates the following formula [ from the chromatic aberration information ( CAR , CA G , CA B ) and the contribution rate (CT R , CT G , CT B ) calculated for each color of the color filter in S3052. A distance correction amount (denoted as DC) is calculated using Equation 2]. That is, the distance correction amount DC is obtained by multiplying CA and CT for each color and adding them.
Figure 0007341843000002

距離補正量DCの算出後に、S305(距離補正量算出処理)を終了する。補正量算出部203は距離補正量DCを、入力された距離画像に対応して全ての画素位置で算出する。寄与率の算出に用いられるカラー画像のサイズが大きい場合には、距離画像の注目画素とその周辺領域(局所領域)に対応するカラー画像の画像領域を用いて寄与率が算出される。最終的に寄与率は距離画像の全ての画素位置において算出することができる。 After calculating the distance correction amount DC, S305 (distance correction amount calculation process) is ended. The correction amount calculation unit 203 calculates the distance correction amount DC at all pixel positions corresponding to the input distance image. When the size of the color image used to calculate the contribution rate is large, the contribution rate is calculated using the image area of the color image corresponding to the pixel of interest in the distance image and its surrounding area (local area). Finally, the contribution rate can be calculated at all pixel positions in the distance image.

距離補正量DCの算出後、図3(A)のS306にて距離補正部204は、距離補正量DCと、S303で取得された焦点距離を用いて、距離画像の補正処理を行う。算出された距離補正量DCは像側での補正量であり、距離画像中の距離は物側での距離(zと記す)となっている。撮像光学系の焦点距離をfと表記し、像側での距離をzと表記するとき、ニュートンのレンズの公式(z×z=f)を適用して、物側での距離zを像側での距離zに変換することができる。ここで、距離画像中の距離は被写体から撮像光学系の物側焦点までの距離とする。得られた像側距離zに距離補正量DCを加算し、再び前記レンズの公式を用いて、物側距離(zmodと記す)に変換することで距離補正が行われる。一連の変換をまとめて、下記数式[数3]で表すことができる。

Figure 0007341843000003
After calculating the distance correction amount DC, in S306 of FIG. 3A, the distance correction unit 204 performs correction processing on the distance image using the distance correction amount DC and the focal length acquired in S303. The calculated distance correction amount DC is the correction amount on the image side, and the distance in the distance image is the distance on the object side (denoted as z). When the focal length of the imaging optical system is expressed as f and the distance on the image side is expressed as z * , applying Newton's lens formula (z x z * = f 2 ), the distance on the object side is z can be converted to the distance z * on the image side. Here, the distance in the distance image is the distance from the subject to the object-side focal point of the imaging optical system. Distance correction is performed by adding the distance correction amount DC to the obtained image side distance z * and converting it into an object side distance (denoted as z mod ) using the lens formula again. A series of conversions can be collectively expressed by the following formula [Math. 3].
Figure 0007341843000003

距離補正部204は、距離画像のすべての画素位置に対して同様の補正を繰り返すことで距離画像全体の補正を行い、距離補正処理を終了する。補正後の距離画像のデータは、メモリ206に保存され、他の画像処理に利用されるか、または、外部記憶装置等にカラー画像データと併せて保存される。 The distance correction unit 204 corrects the entire distance image by repeating the same correction for all pixel positions of the distance image, and ends the distance correction process. The corrected distance image data is stored in the memory 206 and used for other image processing, or is stored together with the color image data in an external storage device or the like.

本実施形態では、距離補正量の算出処理(図3(A):S305)において、カラー画像信号と距離計測時に利用した画像信号との色の違いに関し、WB処理のゲイン情報を用いて色別に寄与率を算出する処理が行われる(図3(B):S3052)。カラーフィルタの色別の寄与率に基づく距離補正量を用いて距離画像の補正処理が行われる。 In this embodiment, in the distance correction amount calculation process (FIG. 3A: S305), the difference in color between the color image signal and the image signal used for distance measurement is determined by color using gain information of WB processing. A process of calculating the contribution rate is performed (FIG. 3(B): S3052). A distance image correction process is performed using a distance correction amount based on the contribution rate of each color of the color filter.

本実施形態の画像処理装置によれば、既に保存された距離画像に対して、被写体色による距離計測誤差の影響をより正しく補正することができる。より詳しくは、カラー画像と撮影情報を利用することで、距離計測時の被写体色による距離計測誤差の影響をより正確に推定することが可能となる。よって、カラー画像のみを用いて距離計測誤差の推定を行う場合に比べて高精度な距離補正を行うことができる。 According to the image processing device of this embodiment, it is possible to more accurately correct the influence of distance measurement errors due to subject color on distance images that have already been stored. More specifically, by using color images and photographic information, it is possible to more accurately estimate the influence of distance measurement errors due to subject color during distance measurement. Therefore, it is possible to perform distance correction with higher accuracy than when estimating distance measurement errors using only color images.

[第1変形例]
図5を参照して、前記実施形態の第1変形例に係る距離補正量算出処理について説明する。前記実施形態では、図3(B)のS3052に示す色別寄与率の算出時にWB処理でのゲイン情報を利用する態様について説明したが、前記色の違いの補正において必ずしもWB処理でのゲイン情報を利用せずともよい。また、前記色の違いの補正は色別寄与率の算出時以外で行うこともできる。本変形例では、撮影時に推定した光源の色温度情報を用いて補正処理を実行する。また、画像の色味の補正処理をカラー画像に対して直接実行することができる。
[First modification]
With reference to FIG. 5, distance correction amount calculation processing according to the first modification of the embodiment will be described. In the embodiment described above, a mode has been described in which the gain information in the WB processing is used when calculating the contribution rate for each color shown in S3052 of FIG. You don't have to use it. Further, the correction of the difference in color can also be performed at a time other than when calculating the contribution rate for each color. In this modification, correction processing is performed using color temperature information of the light source estimated at the time of photographing. Further, image color correction processing can be directly performed on a color image.

図5は、本変形例に係る距離補正量算出処理を説明するフローチャートである。S501で、補正量算出部203は観賞用画像(カラー画像)に対して光源色補正処理を実行する。その際、図3(A)のS303で取得された撮影情報の1つである、光源の色温度情報が利用される。補正量算出部203は、カラー画像の色味を補正して距離計測時に利用した画像の色味を復元する。色温度情報は、距離計測時に利用した画像における光源の色温度情報と、カラー画像を生成するために利用した光源の色温度情報である。色温度情報は、まずプランクの法則および等色関数を利用してxy色度図上の座標に変換され、XYZ表色系で表される。さらに変換行列によりRGB表色系に変換される。補正量算出部203はカラー画像の生成前後の色温度に対してRGB値を算出し、その比から距離計測時に利用した画像の色味に戻すための補正ゲインを算出する。算出された補正ゲインはカラー画像のデータに適用されることで、距離計測時に利用した画像の色味に変換することができる。 FIG. 5 is a flowchart illustrating distance correction amount calculation processing according to this modification. In S501, the correction amount calculation unit 203 executes light source color correction processing on the ornamental image (color image). At this time, color temperature information of the light source, which is one of the photographic information acquired in S303 of FIG. 3(A), is used. The correction amount calculation unit 203 corrects the tint of the color image to restore the tint of the image used at the time of distance measurement. The color temperature information is the color temperature information of the light source in the image used at the time of distance measurement and the color temperature information of the light source used to generate the color image. Color temperature information is first converted into coordinates on an xy chromaticity diagram using Planck's law and color matching functions, and is expressed in an XYZ color system. Furthermore, it is converted into the RGB color system using a conversion matrix. The correction amount calculation unit 203 calculates RGB values for the color temperatures before and after the color image is generated, and calculates a correction gain for returning to the color tone of the image used at the time of distance measurement from the ratio thereof. By applying the calculated correction gain to the color image data, it can be converted to the color tone of the image used during distance measurement.

S502は、図3(B)に示すS3051と同様の処理である。S501で補正された画像に対してバンドパスフィルタ処理が実行される。次に補正量算出部203はS503にて、混合比率を用いてカラーフィルタの色別に寄与率を算出する。S502で生成されたバンドパスフィルタ処理後の画像から、図3(B)に示すS3052での処理と同様に各色において強度情報(C,C,C)が算出される。その後、輝度信号を生成するためのR画像、G画像、B画像の混合比率(Y,Y,Y)を用いて下記数式[数4]のように色別寄与率(CT,CT,CT)が算出される。

Figure 0007341843000004
S502 is the same process as S3051 shown in FIG. 3(B). Bandpass filter processing is performed on the image corrected in S501. Next, in S503, the correction amount calculation unit 203 calculates a contribution rate for each color of the color filter using the mixture ratio. From the band-pass filter processed image generated in S502, intensity information (C R , C G , C B ) for each color is calculated in the same way as the process in S3052 shown in FIG. 3(B). After that, using the mixing ratio (Y R , Y G , Y B ) of the R image, G image, and B image to generate the luminance signal, the contribution rate for each color (CT R , CT G , CT B ) are calculated.
Figure 0007341843000004

S504で補正量算出部203は、S503で算出した色別寄与率(CT,CT,CT)と色収差情報(CA,CA,CA)を用いて、図3(B)に示すS3053と同様の処理で、[数2]により距離補正値DCを算出する。 In S504, the correction amount calculation unit 203 uses the color contribution ratios (CT R , CT G , CT B ) and the chromatic aberration information ( CAR , CA G , CA B ) calculated in S 503 to calculate the amount shown in FIG. 3(B). In the same process as shown in S3053, the distance correction value DC is calculated using [Equation 2].

本変形例では、距離補正量算出処理における最初の処理で光源の色温度情報を用いてカラー画像の色味を補正する場合に関して説明した。色味の補正を最初に実行する場合と、色別寄与率の算出時にWB処理でのゲイン情報を考慮する場合とで結果は同様であり、どちらの順に処理を行ってもよい。 In this modification, a case has been described in which the color temperature information of the light source is used to correct the tint of a color image in the first process in the distance correction amount calculation process. The results are the same whether the color correction is executed first or when the gain information in the WB processing is taken into consideration when calculating the contribution rate for each color, and the processing may be performed in either order.

本変形例によれば、ホワイトバランス処理の情報が取得できなかった場合でも、光源の色温度情報を取得できる場合には、被写体色による距離計測誤差の影響に対する、より高精度な補正が可能である。 According to this modification, even if white balance processing information cannot be acquired, if color temperature information of the light source can be acquired, it is possible to more accurately compensate for the effects of distance measurement errors due to subject color. be.

[第2変形例]
図6を参照して、第2変形例に係る距離補正量算出処理について説明する。前記実施形態では、撮像装置情報として色収差情報、距離計測時に利用した空間周波数帯域の情報、各カラーの混合比率情報、ウィンドウサイズ情報を取得できる場合に関して説明した。この中で色収差情報は、高精度な距離補正量の算出にあたって必須の情報であるが、その他の撮像装置情報については近似値を用いることができる。本変形例では、距離計測時に利用した空間周波数帯域の情報、各カラーの混合比率情報、またはウィンドウサイズ情報が取得できなかった場合の処理に関して説明する。
[Second modification]
With reference to FIG. 6, distance correction amount calculation processing according to the second modification will be described. In the embodiment, a case has been described in which chromatic aberration information, information on the spatial frequency band used during distance measurement, mixing ratio information for each color, and window size information can be acquired as imaging device information. Among these, chromatic aberration information is essential information for calculating a highly accurate distance correction amount, but approximate values can be used for other imaging device information. In this modification, a process will be described when information on the spatial frequency band used during distance measurement, mixing ratio information for each color, or window size information cannot be acquired.

図6は、第2変形例に係る距離補正量算出処理を説明するフローチャートである。図3(B)に示したS3051、S3052、S3053の他に、各種撮像装置情報の有無を判定する処理が追加されている。 FIG. 6 is a flowchart illustrating distance correction amount calculation processing according to the second modification. In addition to S3051, S3052, and S3053 shown in FIG. 3B, processing for determining the presence or absence of various types of imaging device information is added.

S601で、補正量算出部203は撮像装置情報として距離計測時に利用した空間周波数帯の情報が取得できたか否かを判定する。空間周波数情報が取得できたと判定された場合、S3051に進んでフィルタリング処理が実行される。そしてS602へ処理を進める。一方、空間周波数情報が取得できなかったと判定された場合には、S3051を実行せずにS602の処理へ移行する。 In S601, the correction amount calculation unit 203 determines whether information on the spatial frequency band used during distance measurement has been acquired as imaging device information. If it is determined that the spatial frequency information has been acquired, the process advances to S3051 and filtering processing is executed. The process then advances to S602. On the other hand, if it is determined that the spatial frequency information could not be acquired, the process proceeds to S602 without executing S3051.

S602で、補正量算出部203は撮像装置情報として距離計測時に利用した輝度画像を生成するための各カラーの混合比率情報が取得できたか否かを判定する。混合比率情報が取得できたと判定された場合、S604へ処理を進める。一方、混合比率情報が取得できなかったと判定された場合には、S603へ処理を進める。 In S602, the correction amount calculation unit 203 determines whether mixing ratio information of each color for generating a brightness image used at the time of distance measurement has been acquired as imaging device information. If it is determined that the mixture ratio information has been acquired, the process advances to S604. On the other hand, if it is determined that the mixture ratio information could not be acquired, the process advances to S603.

S603にて補正量算出部203は、予め設定された混合比率を撮像装置の混合比率情報として設定した後、S604へ処理を進める。既定の混合比率としては、R画像、G画像、B画像を均等に混合する際の比率[1:1:1]が設定される。また、映像信号の伝送やビデオ記録で使用されるYUV信号等の規格を利用することもできる。例えば、YUV信号の規格に従う場合、輝度信号を生成する際の混合比率[0.299:0.587:0.114]が設定される。 In S603, the correction amount calculation unit 203 sets a preset mixing ratio as mixing ratio information of the imaging device, and then advances the process to S604. As the default mixing ratio, a ratio [1:1:1] for equally mixing the R image, G image, and B image is set. It is also possible to use standards such as YUV signals used in video signal transmission and video recording. For example, when following the YUV signal standard, a mixing ratio [0.299:0.587:0.114] is set when generating a luminance signal.

S604で、補正量算出部203は撮像装置情報として距離計測時に利用したウィンドウサイズ情報が取得できたか否かを判定する。ウィンドウサイズ情報が取得できたと判定された場合、S3052へ処理を進める。一方、ウィンドウサイズ情報が取得できなかったと判定された場合には、S605へ処理を進める。 In S604, the correction amount calculation unit 203 determines whether window size information used at the time of distance measurement has been acquired as imaging device information. If it is determined that the window size information has been acquired, the process advances to S3052. On the other hand, if it is determined that the window size information could not be acquired, the process advances to S605.

S605にて補正量算出部203は、予め設定されたウィンドウサイズ(既定値)を撮像装置のウィンドウサイズ情報Wとして設定した後、S3052へ処理を進める。そしてS3052、S3053の処理が実行される。 In S605, the correction amount calculation unit 203 sets a preset window size (default value) as the window size information W of the imaging device, and then advances the process to S3052. Then, the processes of S3052 and S3053 are executed.

本変形例では、距離計測時に利用した空間周波数帯域の情報、各カラーの混合比率情報、またはウィンドウサイズ情報が取得できなかった場合でも、各種撮像装置情報の既定値を用いることで、距離補正量の算出精度の低下を抑制できる。 In this modification, even if information on the spatial frequency band used during distance measurement, mixing ratio information for each color, or window size information cannot be obtained, the distance correction amount can be adjusted by using the default values of various imaging device information. The decrease in calculation accuracy can be suppressed.

[第3変形例]
本変形例では、距離画像以外の補正について説明する。補正対象は距離画像でなくてもよく、撮像装置のAF機能(オートフォーカス機能)により合焦した画像中の1点または複数の点における距離であってもよい。AF機能では、制御部が撮像光学系を構成するフォーカスレンズの駆動によって撮像画像における所望の位置または領域に焦点を合わせる制御を行う。その際、画像処理装置200はAF動作が実行された画像中の領域をウィンドウサイズ情報として取得し、前述の実施形態と同様に距離の補正を実施する。
[Third modification]
In this modification, corrections other than distance images will be explained. The correction target may not be a distance image, but may be a distance at one or more points in an image focused by the AF function (autofocus function) of the imaging device. In the AF function, a control unit performs control to focus on a desired position or area in a captured image by driving a focus lens that constitutes an imaging optical system. At that time, the image processing device 200 acquires the area in the image where the AF operation has been performed as window size information, and performs distance correction as in the above embodiment.

このように距離画像の補正だけでなく、合焦した1点または複数点に対応する距離を補正することが可能である。デジタルカメラで撮像された画像における合焦被写体までの距離を、より高精度に算出することができる。 In this way, it is possible to correct not only the distance image but also the distance corresponding to one or more focused points. The distance to a focused subject in an image captured by a digital camera can be calculated with higher precision.

前記実施形態および変形例によれば、距離計測時に用いた画像信号とは異なる画像信号に変換されてから保存されたカラー画像と、撮影情報を用いることで被写体色による距離画像の距離計測誤差を補正することが可能となる。 According to the embodiments and modifications, distance measurement errors in distance images due to subject color can be corrected by using a color image that is converted into an image signal different from the image signal used for distance measurement and then stored, and the photographing information. It becomes possible to make corrections.

[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other embodiments]
The present invention provides a system or device with a program that implements one or more functions of the embodiments described above via a network or a storage medium, and one or more processors in a computer of the system or device reads and executes the program. This can also be achieved by processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

200 画像処理装置
201 画像読込部
202 情報取得部
203 補正量算出部
204 距離補正部

200 Image processing device 201 Image reading section 202 Information acquisition section 203 Correction amount calculation section 204 Distance correction section

Claims (15)

被写体の距離情報に対して、前記距離情報とともに取得されたカラー画像の情報を用いて補正する画像処理装置であって、
前記カラー画像および距離情報の取得時の撮影情報である第1の情報と、前記距離情報の算出に用いられた第2の情報を取得する取得手段と、
前記第1および第2の情報を用いて、前記距離情報の補正量を算出する算出手段と、
前記補正量と前記第1の情報を用いて、前記距離情報を補正する補正手段と、を備え、
前記取得手段は、前記第1の情報として前記カラー画像の生成にて色別に用いられた情報を取得し、前記第2の情報として撮像装置が備える撮像光学系の色収差情報を取得する
ことを特徴とする画像処理装置。
An image processing device that corrects distance information of a subject using information of a color image acquired together with the distance information,
acquisition means for acquiring first information that is photographing information at the time of acquiring the color image and distance information, and second information used to calculate the distance information;
Calculation means for calculating a correction amount of the distance information using the first and second information;
a correction means for correcting the distance information using the correction amount and the first information,
The acquisition means acquires information used for each color in the generation of the color image as the first information, and acquires chromatic aberration information of an imaging optical system provided in the imaging device as the second information. Image processing device.
前記第1の情報は、前記カラー画像の生成にて算出されたホワイトバランス処理のゲイン情報または撮影時の光源の色温度情報を有する
ことを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the first information includes gain information of white balance processing calculated in generating the color image or color temperature information of a light source at the time of photographing.
前記取得手段は、距離計測時に利用した空間周波数帯域、距離計測時に輝度信号の生成に用いたカラー画像の混合比率、および距離計測時に利用したウィンドウサイズのうち、1つ以上の情報を取得する
ことを特徴とする請求項1または請求項2に記載の画像処理装置。
The acquisition means acquires one or more of the following information: a spatial frequency band used when measuring the distance, a mixing ratio of color images used to generate a luminance signal when measuring the distance, and a window size used when measuring the distance. The image processing device according to claim 1 or 2, characterized in that:
前記取得手段は、前記撮像光学系の焦点距離をさらに取得し、
前記補正手段は、前記被写体までの距離、前記焦点距離、および前記補正量を用いて、前記距離情報を補正する
ことを特徴とする請求項1から3のいずれか1項に記載の画像処理装置。
The acquisition means further acquires a focal length of the imaging optical system,
The image processing device according to any one of claims 1 to 3, wherein the correction means corrects the distance information using the distance to the subject, the focal length, and the correction amount. .
前記算出手段は、前記カラー画像の局所領域における色別の強度情報を算出し、前記強度情報および前記第1の情報を用いて、各色に係る輝度画像が距離計測に与えた影響度合いを表す寄与率を算出して、前記寄与率および前記第2の情報に基づく加重平均から前記補正量を算出する
ことを特徴とする請求項1から4のいずれか1項に記載の画像処理装置。
The calculation means calculates intensity information for each color in a local area of the color image, and uses the intensity information and the first information to calculate a contribution representing the degree of influence of the luminance image of each color on distance measurement. The image processing apparatus according to any one of claims 1 to 4, wherein the correction amount is calculated from a weighted average based on the contribution rate and the second information.
前記算出手段は、前記空間周波数帯域の情報を用いて前記カラー画像から所定の空間周波数帯域の成分を抽出した画像にて、前記カラー画像の局所領域における色別の強度情報を算出し、前記強度情報および前記第1の情報を用いて、各色に係る輝度画像が距離計測に与えた影響度合いを表す寄与率を算出して、前記寄与率および前記第2の情報に基づく加重平均から前記補正量を算出する
ことを特徴とする請求項3に記載の画像処理装置。
The calculating means calculates intensity information for each color in a local region of the color image using an image in which components of a predetermined spatial frequency band are extracted from the color image using information on the spatial frequency band, and calculates intensity information for each color in a local area of the color image. Using the information and the first information, a contribution rate representing the degree of influence of the luminance image of each color on distance measurement is calculated, and the correction amount is calculated from a weighted average based on the contribution rate and the second information. The image processing device according to claim 3, wherein the image processing device calculates .
前記算出手段は、前記カラー画像の局所領域における色別の強度情報を算出し、前記強度情報と前記第1の情報と前記混合比率を用いて、各色に係る輝度画像が距離計測に与えた影響度合いを表す寄与率を算出して、前記寄与率と前記第2の情報に基づく加重平均から前記補正量を算出する
ことを特徴とする請求項3に記載の画像処理装置。
The calculation means calculates intensity information for each color in a local area of the color image, and uses the intensity information, the first information, and the mixing ratio to determine the influence of the luminance image of each color on distance measurement. The image processing apparatus according to claim 3, wherein a contribution rate representing a degree is calculated, and the correction amount is calculated from a weighted average based on the contribution rate and the second information.
前記算出手段は、前記空間周波数帯域の情報を用いて前記カラー画像から所定の空間周波数帯域の成分を抽出した画像にて、前記カラー画像の局所領域における色別の強度情報を算出し、前記強度情報と前記混合比率を用いて、各色に係る輝度画像が距離計測に与えた影響度合いを表す寄与率を算出して、前記寄与率と前記第2の情報に基づく加重平均から前記補正量を算出する
ことを特徴とする請求項3に記載の画像処理装置。
The calculating means calculates intensity information for each color in a local region of the color image using an image in which components of a predetermined spatial frequency band are extracted from the color image using information on the spatial frequency band, and calculates intensity information for each color in a local area of the color image. Using the information and the mixing ratio, a contribution rate representing the degree of influence of the luminance image of each color on distance measurement is calculated, and the correction amount is calculated from a weighted average based on the contribution rate and the second information. The image processing device according to claim 3, characterized in that:
前記算出手段は、前記局所領域における色別の強度情報を算出する際、距離計測時に利用したウィンドウサイズを用いる
ことを特徴とする請求項5から8のいずれか1項に記載の画像処理装置。
The image processing apparatus according to any one of claims 5 to 8, wherein the calculation means uses a window size used at the time of distance measurement when calculating the intensity information for each color in the local area.
前記強度情報は、前記局所領域における輝度和、平均輝度、または標準偏差の情報である
ことを特徴とする請求項5から9のいずれか1項に記載の画像処理装置。
The image processing device according to any one of claims 5 to 9, wherein the intensity information is information on a sum of brightness, average brightness, or standard deviation in the local area.
請求項1から10のいずれか1項に記載の画像処理装置と、
前記カラー画像および距離情報の取得に用いられる撮像素子と、を備える
ことを特徴とする撮像装置。
An image processing device according to any one of claims 1 to 10,
An imaging device comprising: an imaging device used to acquire the color image and distance information.
前記算出手段は、像側でのデフォーカス量である前記補正量を算出する
ことを特徴とする請求項11に記載の撮像装置。
The imaging device according to claim 11, wherein the calculation means calculates the correction amount that is a defocus amount on the image side.
前記距離情報は、前記カラー画像が画像処理される前の画像から生成される距離画像の情報、または、オートフォーカス機能により合焦した画像中の1点または複数の点における距離情報である
ことを特徴とする請求項11または請求項12に記載の撮像装置。
The distance information is information on a distance image generated from an image before the color image is subjected to image processing, or distance information at one or more points in the image focused by an autofocus function. The imaging device according to claim 11 or claim 12.
被写体の距離情報に対して、前記距離情報とともに取得されたカラー画像の情報を用いて補正する画像処理装置にて実行される画像処理方法であって、
前記カラー画像および距離情報の取得時の撮影情報である第1の情報と、前記距離情報の算出に用いられた第2の情報を取得する取得工程と、
前記第1および第2の情報を用いて、前記距離情報の補正量を算出する算出工程と、
前記補正量と前記第1の情報を用いて、前記距離情報を補正する補正工程と、を有し、
前記取得工程にて、前記第1の情報として前記カラー画像の生成にて色別に用いられた情報を取得し、前記第2の情報として撮像装置が備える撮像光学系の色収差情報を取得する処理が行われる
ことを特徴とする画像処理方法。
An image processing method executed by an image processing device that corrects distance information of a subject using information of a color image acquired together with the distance information, the method comprising:
an acquisition step of acquiring first information that is photographing information at the time of acquiring the color image and distance information, and second information used to calculate the distance information;
a calculation step of calculating a correction amount of the distance information using the first and second information;
a correction step of correcting the distance information using the correction amount and the first information,
In the acquisition step, information used for each color in the generation of the color image is acquired as the first information, and chromatic aberration information of an imaging optical system provided in the imaging device is acquired as the second information. An image processing method characterized by:
請求項14に記載の画像処理方法の各工程をコンピュータに実行させるプログラム。 A program that causes a computer to execute each step of the image processing method according to claim 14.
JP2019190302A 2019-10-17 2019-10-17 Image processing device, image processing method, imaging device, program Active JP7341843B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019190302A JP7341843B2 (en) 2019-10-17 2019-10-17 Image processing device, image processing method, imaging device, program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019190302A JP7341843B2 (en) 2019-10-17 2019-10-17 Image processing device, image processing method, imaging device, program

Publications (2)

Publication Number Publication Date
JP2021068925A JP2021068925A (en) 2021-04-30
JP7341843B2 true JP7341843B2 (en) 2023-09-11

Family

ID=75637594

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019190302A Active JP7341843B2 (en) 2019-10-17 2019-10-17 Image processing device, image processing method, imaging device, program

Country Status (1)

Country Link
JP (1) JP7341843B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006293035A (en) 2005-04-11 2006-10-26 Canon Inc Imaging apparatus, focusing device and its control method
JP2013090265A (en) 2011-10-21 2013-05-13 Nikon Corp Image processing apparatus and image processing program
JP2019009511A (en) 2017-06-20 2019-01-17 キヤノン株式会社 Distance information generating apparatus, imaging apparatus, distance information generating method, and program
JP2019078626A (en) 2017-10-24 2019-05-23 キヤノン株式会社 Distance detection device, imaging apparatus, distance detection method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006293035A (en) 2005-04-11 2006-10-26 Canon Inc Imaging apparatus, focusing device and its control method
JP2013090265A (en) 2011-10-21 2013-05-13 Nikon Corp Image processing apparatus and image processing program
JP2019009511A (en) 2017-06-20 2019-01-17 キヤノン株式会社 Distance information generating apparatus, imaging apparatus, distance information generating method, and program
JP2019078626A (en) 2017-10-24 2019-05-23 キヤノン株式会社 Distance detection device, imaging apparatus, distance detection method, and program

Also Published As

Publication number Publication date
JP2021068925A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
JP5358039B1 (en) Imaging device
JP5054248B2 (en) Image processing apparatus, image processing method, image processing program, and imaging apparatus
US20130050546A1 (en) Image processing apparatus and method
JP6516429B2 (en) Distance measuring device, imaging device, and distance measuring method
TWI471004B (en) Imaging apparatus, imaging method, and program
US20110199514A1 (en) Image processing apparatus and image processing method
GB2460241A (en) Correction of optical lateral chromatic aberration
US20220082370A1 (en) Electronic apparatus, control method thereof and computer readable storage medium
US10326951B2 (en) Image processing apparatus, image processing method, image capturing apparatus and image processing program
US9143762B2 (en) Camera module and image recording method
US10339665B2 (en) Positional shift amount calculation apparatus and imaging apparatus
JP7341843B2 (en) Image processing device, image processing method, imaging device, program
US10531029B2 (en) Image processing apparatus, image processing method, and computer readable recording medium for correcting pixel value of pixel-of-interest based on correction amount calculated
JP5055588B2 (en) Image processing apparatus and image processing method
JP2014241580A (en) Imaging apparatus
JP6395790B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND FOCUS CONTROL PROGRAM
US10334161B2 (en) Image processing apparatus, image processing method, computer program and imaging apparatus
JP7445508B2 (en) Imaging device
JP7300962B2 (en) Image processing device, image processing method, imaging device, program, and storage medium
JP6604737B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP2022181027A (en) Image processing apparatus, image processing method, imaging apparatus, and program
JP5501884B2 (en) Color shift correction device
JP2016001782A (en) Image processing system, imaging device, image processing method, program, and storage medium
JP6415228B2 (en) Image synthesizing apparatus and image synthesizing apparatus control method
JP2022036505A (en) Imaging device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220927

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230710

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230801

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230830

R151 Written notification of patent or utility model registration

Ref document number: 7341843

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151