JP2023004680A - Image processing device and control method for image processing device - Google Patents
Image processing device and control method for image processing device Download PDFInfo
- Publication number
- JP2023004680A JP2023004680A JP2021106532A JP2021106532A JP2023004680A JP 2023004680 A JP2023004680 A JP 2023004680A JP 2021106532 A JP2021106532 A JP 2021106532A JP 2021106532 A JP2021106532 A JP 2021106532A JP 2023004680 A JP2023004680 A JP 2023004680A
- Authority
- JP
- Japan
- Prior art keywords
- distance information
- image
- correction map
- image processing
- plane
- 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 65
- 238000000034 method Methods 0.000 title claims description 22
- 238000012937 correction Methods 0.000 claims abstract description 105
- 238000003384 imaging method Methods 0.000 claims abstract description 76
- 230000003287 optical effect Effects 0.000 claims abstract description 46
- 230000008859 change Effects 0.000 claims abstract description 32
- 238000001514 detection method Methods 0.000 claims abstract description 18
- 230000004075 alteration Effects 0.000 claims abstract description 6
- 238000006243 chemical reaction Methods 0.000 claims description 18
- 210000001747 pupil Anatomy 0.000 claims description 12
- 238000003672 processing method Methods 0.000 claims 1
- 238000005259 measurement Methods 0.000 description 37
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 7
- 230000004907 flux Effects 0.000 description 4
- 230000005484 gravity Effects 0.000 description 3
- 238000001444 catalytic combustion detection Methods 0.000 description 2
- 239000000470 constituent Substances 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
Images
Landscapes
- Measurement Of Optical Distance (AREA)
- Stereoscopic And Panoramic Photography (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、画像を使用した測距機能を有する、デジタルカメラやデジタルビデオカメラ、車載センサデバイス、ロボットビジョンセンサデバイスといった撮像装置の画像処理装置及びその制御方法に関する。 The present invention relates to an image processing apparatus and a control method thereof for an imaging apparatus such as a digital camera, a digital video camera, an in-vehicle sensor device, a robot vision sensor device, etc., having a distance measurement function using an image.
撮像装置において、異なる視点から撮像された画像信号に基づいて被写体のデフォーカス状態や撮像装置から被写体までの距離などの距離情報を検出できる測距機能を備えたものが提案されている(特許文献1参照)。 An imaging device has been proposed that has a distance measurement function capable of detecting distance information such as the defocus state of a subject and the distance from the imaging device to the subject based on image signals captured from different viewpoints (Patent Document 1).
このような測距機能を有する撮像装置では、撮像装置の温度変化や姿勢変化などでレンズや鏡筒、センサの状態が変化することで、像面湾曲や歪曲収差などの光学特性が変化し、画面全体に測距誤差が発生する可能性がある。 In imaging devices with such a range finding function, optical characteristics such as curvature of field and distortion change due to changes in the state of lenses, barrels, and sensors due to changes in the temperature and posture of the imaging device. Distance measurement errors may occur across the screen.
上記課題に鑑み、本発明に係る画像処理装置は、異なる視点で撮像された複数の画像信号を用いて距離情報を生成する生成手段と、前記画像信号における平面領域を検出する検出手段と、前記距離情報を補正するための補正マップを推定する推定手段と、を備え、前記推定手段は、前記補正マップを画像の位置座標を変数とする関数で表し、前記平面領域に対応する距離情報に基づいて前記補正マップを推定することを特徴とする。 In view of the above problems, an image processing apparatus according to the present invention provides a generation means for generating distance information using a plurality of image signals captured from different viewpoints, a detection means for detecting a plane area in the image signals, and the estimating means for estimating a correction map for correcting the distance information, wherein the estimating means expresses the correction map as a function having the position coordinates of the image as variables, and calculates the correction map based on the distance information corresponding to the plane area. and estimating the correction map.
本発明によれば、画面全体に生じる測距誤差を低減し、装置の姿勢変化や温度変動があっても高精度な測距が可能となる。 According to the present invention, it is possible to reduce distance measurement errors that occur in the entire screen, and to perform highly accurate distance measurement even if there is a change in the posture of the device or a change in temperature.
以下、図を参照して本発明の実施形態を詳細に説明するが、本発明は各実施例に記載された内容に限定されない。本発明は各実施例に示された構成の組み合わせや、種々の変形および変更が可能である。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings, but the present invention is not limited to the contents described in each example. The present invention can be combined with the configuration shown in each embodiment, and various modifications and changes can be made.
実施例1では、像面位相差測距機能を有する撮像装置を使用して、室内の人物を撮影するユースケースを例に説明する。本実施形態は、外部の撮像装置を使用して撮影された画像を取得し、測距演算の可能な画像処理装置にも適用可能である。画像処理装置には、デジタルカメラやスマートフォンを含む携帯電話機、ゲーム機、タブレット端末、時計型や眼鏡型の情報端末、医療機器、監視システムや車載用システムの機器などが含まれてよい。 In the first embodiment, a use case of photographing a person in a room using an imaging apparatus having an image plane phase-difference ranging function will be described as an example. This embodiment can also be applied to an image processing apparatus capable of obtaining an image captured by an external imaging device and performing distance measurement calculation. The image processing device may include mobile phones including digital cameras and smartphones, game machines, tablet terminals, watch-type and eyeglass-type information terminals, medical equipment, equipment for monitoring systems and in-vehicle systems, and the like.
図1は、本発明を適用できる画像処理装置を撮像装置100に応用した場合の構成図を示すブロック図である。撮像装置100は、光学系101、撮像部102、A/D変換部103、制御部104、画像処理部105、記録部106、揮発性メモリ107、不揮発性メモリ108を備える。
FIG. 1 is a block diagram showing a configuration diagram when an image processing apparatus to which the present invention can be applied is applied to an
光学系101はズームレンズやフォーカスレンズから構成されるレンズ群、絞り調整装置、およびシャッター装置を備えている。この光学系101は撮像部102に到達する被写体像の倍率やピント位置、あるいは光量を調整している。
The
撮像部102は光学系101を通過した被写体の光束を光電変換し、電気信号に変換するCCDやCMOSセンサ等の光電変換素子である。
The
光学系101および撮像部102にはそれぞれ駆動制御部を設けてもよい。駆動制御部は後述する制御部104からの指示により、光学系および撮像部を駆動し、ピント位置を自動調整することなどが可能である。
A drive control unit may be provided for each of the
A/D変換部103は、入力されたアナログ画像信号をデジタル画像信号のデータに変換する。
The A/
また、撮像部102は、A/D変換部を含み、後述の制御部104に位相差情報または位相差情報から換算されたデフォーカス情報を出力する撮像面位相差センサであってもよい。
Further, the
画像処理部105は、A/D変換部103等からのデータに対して通常の信号処理の他に、本発明における視差算出処理を行う。ここで通常の処理信号とは、ノイズ低減処理や現像処理、ガンマ変換による階調圧縮処理によって所定の出力レンジに階調圧縮する処理などを指す。
The
制御部104は、少なくとも1つのプロセッサまたは回路からなる制御部であり、撮像装置100全体を制御する。例えばCPUやMPUなどのプロセッサを含み、不揮発性メモリ108に記録されたプログラムを揮発性メモリ107に展開し、実行することにより、撮像装置100が備える各ブロックの動作を制御する。例えば、適正な明るさを持つ入力画像を得る為の撮影時の露光量を算出し、それを実現する為に光学系101と撮像部102を制御して、絞り、シャッタースピード、センサのアナログゲインを制御する。
A
記録部106は、画像を記録する機能を有し、たとえば、半導体メモリが搭載されたメモリカードや光磁気ディスク等の回転記録体を収容したパッケージなどを用いた情報記録媒体を含んでも良い。
The
図2(A)は、図1の撮像装置100における、光学系101と撮像部102の位置関係を記している。破線101aは光学系101の光軸であり、撮像部102は光軸101aと略垂直になるように配置されている。
FIG. 2A shows the positional relationship between the
図2(B)は、図1の撮像部102の画素配列構成を示している。ここで光軸101aはz軸方向に一致している。各画素200は図2(C)に示す断面図のように、マイクロレンズ201、カラーフィルタ202、光電変換部203A、203Bで構成されている。撮像部102は画素毎にカラーフィルタ202によって検出する波長帯域に応じたRed、Green、Blueの分光特性が与えられ、カラーフィルタは公知の配色パターンによって配置されている。基盤204には波長帯域に応じた感度を持つ光電変換部203A、203Bが形成されている。
FIG. 2B shows the pixel array configuration of the
図2(D)は光学系101の光軸101aと撮像部102の交点から射出瞳を見た図である。光電変換部203Aと203Bには、それぞれ射出瞳の異なる領域である第1の瞳領域210を通過した光束と第2の瞳領域220を主に通過した光束が入射する。光電変換部203Aおよび203Bに入射した光束をそれぞれ光電変換することで、異なる視点から撮像されたA画像およびB画像を生成する。検出されたA画像とB画像は画像処理部105に伝送され、測距演算処理により距離情報を算出し、記録部106に保存される。また、A画像とB画像を加算した画像は、画像情報として利用できる。
FIG. 2D is a view of the exit pupil viewed from the intersection of the
図2(D)の符号211は瞳領域210の重心位置であり、符号221は瞳領域220の重心位置である。本実施形態において、瞳領域210の重心位置211は、射出瞳の中心からx軸方向に偏心(移動)しており、瞳領域220の重心位置221はその逆方向に偏心(移動)している。この重心間距離が基線長222となり、その線分方向を瞳分割方向と呼ぶ。A画像とB画像は瞳分割方向と同じ方向に位置が変化する。この画像間の相対的な位置変化量、すなわちA画像とB画像の視差は、デフォーカス量に応じた値となる。この視差を公知の手法により検出、変換し、デフォーカス量や撮像装置から被写体までの距離といった距離情報に変換することができる。
次に、図3を参照して、本実施形態に係る画像処理部105の構成について説明する。なお、画像処理部105の各ブロックは、ソフトウェアとハードウェアの組み合わせによって実現されてもよい。また、複数の機能ブロックが統合され又は1つの機能ブロックが分離されてもよい。
Next, the configuration of the
信号処理部301は、ノイズ低減処理や現像処理など、上述の通常の信号処理を行う。なお、信号処理部301は、A画像とB画像の信号を合成して1つの画像信号として扱ってよい。
A
撮影情報取得部302は、撮影時にユーザが設定した撮影モードや、焦点距離、絞り値、露光時間などの各種情報を、例えば制御部104を介して不揮発性メモリ108又は揮発性メモリ107から取得して、距離情報生成部305に提供する。
The shooting
補正情報取得部303は、像面湾曲の補正情報や、歪曲収差の補正係数など、撮影設定に含まれない定常的な各種情報を、例えば制御部104を介して不揮発性メモリ108又は揮発性メモリ107から取得して、距離情報生成部305に提供する。
A correction
平面検出部304は、信号処理部301から出力された画像信号に基づいて、被写体の平面の領域を検出する。
The
距離情報生成部305は、A画像とB画像の画像信号を取得し、その視差及び撮影情報と補正情報に基づいて、デフォーカス量や撮像装置から被写体までの距離といった距離情報を生成する。
A distance
補正マップ推定部306は、平面検出部304と距離情報生成部305の出力を用いて、距離情報の歪みを補正する補正マップを出力する。補正マップは、例えば制御部104を介して不揮発性メモリ108又は揮発性メモリ107に保存され、次回の距離情報の生成に使用される。
A correction
以下、図4、図5を参照して、本実施形態に係る補正マップの推定処理の一連の動作について説明する。図5は入力画像501の一例の図である。入力画像501は、室内に3人の人物502、503、504が立っているシーンを撮影した画像である。
A series of operations of the correction map estimation process according to the present embodiment will be described below with reference to FIGS. 4 and 5. FIG. FIG. 5 is a diagram of an example of an
S401では、距離情報生成部305は、入力画像501のA画像とB画像を取得する。
In S<b>401 , the distance
S402では、距離情報生成部305は、A画像とB画像に基づいて、距離情報を生成する。具体的には、A画像とB画像の視差を算出し、視差をデフォーカス量に変換したのち、レンズの公式を用いてデフォーカス量を物面までの距離に変換する。視差の算出とデフォーカス量の変換は、例えば、特開2016-9062号公報に開示されているような公知の手法を用いて、画素毎のデフォーカス量の分布を生成してもよい。
In S402, the distance
ここでは像面湾曲によって生じるデフォーカス量を考慮して距離変換を行うため、像面湾曲補正マップWを使用してデフォーカス量を補正する。補正前のデフォーカス量をL、補正後のデフォーカス量をL′とすると、L′=L+Wと計算される。光学系101と撮像部102の状態が変わらなければ像面湾曲は変わらない。したがって、事前に設計データあるいは計測により像面湾曲補正マップWを求めておき、不揮発性メモリ107等に記録することも可能である。
Here, since the distance conversion is performed in consideration of the defocus amount caused by the field curvature, the field curvature correction map W is used to correct the defocus amount. Assuming that the defocus amount before correction is L and the defocus amount after correction is L', L'=L+W is calculated. If the states of the
上述したように、撮像装置から被写体までの距離は幾何光学におけるレンズの公式から計算することができる。 As described above, the distance from the imaging device to the subject can be calculated from the lens formula in geometric optics.
A:物面から光学系101の主点までの距離
B:光学系101の主点から結像位置までの距離
F:光学系101の焦点距離
A: Distance from the object surface to the principal point of the optical system 101 B: Distance from the principal point of the
式(1)において、主点から撮像素子までの距離とデフォーカス量からBの値を求め、Fは設計データもしくは計測して求めた値を使用することで、物面までの距離Aを画素毎に算出できる。以下、このように算出した撮像装置から被写体までの距離を測距値と呼ぶ。測距値の基準は、式(1)のAの値を用いれば光学系の主点となるが、適切なオフセット値を与えることで、センサやレンズ先端など測距値の基準を変更してもよい。 In equation (1), the value of B is obtained from the distance from the principal point to the image sensor and the amount of defocus, and F is the design data or the value obtained by measurement, so that the distance A to the object plane is can be calculated for each Hereinafter, the distance from the imaging device to the object calculated in this manner is referred to as a distance measurement value. If the value of A in equation (1) is used, the reference of the distance measurement value will be the principal point of the optical system. good too.
S403では、平面検出部304は、画像信号に基づいて入力画像501に写る被写体から平面の領域を検出する。検出方法は既存の手法を使用してよく、例えばニューラルネットによる画像セグメンテーションを用いて、室内の壁、床、天井と推定される領域を平面としてしてもよい。平面が検出された場合、処理はS404へ進み、検出されなかった場合、補正マップの推定処理は終了となる。
In S403, the
S404では、補正マップ推定部306は、平面検出部304の検出した平面(以下、平面と呼ぶ)に対応する距離情報に基づいて、補正マップを推定するかどうか判定する。
In S404, the correction
図6は、図5の破線510上の測距値を示すグラフである。破線510は、平面の被写体である室内の壁506、507、509と、平面でない被写体である人物502、503、504に跨っている。距離情報生成部305にて生成された距離情報が正しい場合、平面の領域における測距値の変化量は一定である。図6(A)は距離情報が正しく生成されたときのグラフであり、平面に対応する測距値の変化量は一定である。一方、図6(B)は距離情報が正しく生成されなかった場合であり、平面に対応する距離情報は曲線(曲面)となっている。このように、平面に対応する測距値の変化量が一定でない場合に、補正マップ推定部306は補正マップの推定を開始する。
FIG. 6 is a graph showing distance measurements on dashed
具体的な判定方法は、例えば、ある平面において、近接画素間の測距値の差を求め、前記差の近接画素間での変化量がある閾値を超えた場合に補正を開始してもよい。あるいは平面領域内の変化量がある閾値を超えた場合に、補正を開始してもよい。また、同一平面の各画素の測距値を抽出し、平面になるようにフィッティングを行い、得られた距離値と各画素の測距値とを比較して判定してもよい。各画素の平面上の距離値と測距値の誤差を求め、その平均誤差が閾値を上回った場合に補正マップの推定を開始する。あるいは各平面の一定領域内の誤差のばらつきが特定の閾値を上回った場合に補正マップの推定を開始してもよい。 As a specific determination method, for example, a difference in distance measurement values between adjacent pixels on a certain plane may be obtained, and correction may be started when the amount of change in the difference between adjacent pixels exceeds a certain threshold. . Alternatively, correction may be started when the amount of change in the planar region exceeds a certain threshold. Alternatively, the distance measurement value of each pixel on the same plane may be extracted, fitting may be performed so as to form a plane, and the obtained distance value may be compared with the distance measurement value of each pixel for determination. The error between the distance value on the plane of each pixel and the measured distance value is obtained, and estimation of the correction map is started when the average error exceeds the threshold value. Alternatively, estimation of the correction map may be started when the error variation within a certain area of each plane exceeds a specific threshold.
S405では、補正マップ推定部306は、平面に対応する距離情報に基づいて、測距値が平面に近づくように補正マップを推定する。補正マップは画像の位置座標を変数とする関数として表現される。すなわち、補正マップは画素毎に補正値を持つものとして扱うことが可能である。本実施例では、補正マップとして、像面湾曲補正マップWの変化量ΔWを推定する。また、本実施例では、式(2)のように、ΔWは画像のx、y座標を変数とする二次曲面とするが、球面やお椀型のような、連続的かつある位置で最大(または最小)となる関数であれば、どのようなものを使用してもよい。ΔWは像面湾曲補正マップWの変化量のため、補正後のデフォーカス量L′はL′=L+W+ΔWと表現される。
a1x2+a2y2+a3z2+a4xy+a5yz+a6zx+a7=0・・・(2)
a1,2,・・・7:二次曲面のパラメータ
(x,y):画像の位置座標
z:補正値
In S405, the correction
a1x2 + a2y2 + a3z2 + a4xy + a5yz + a6zx +a7=0 ( 2 )
a 1, 2, . . . 7 : Parameter of quadratic surface (x, y): Position coordinates of image z: Correction value
補正マップの推定処理について説明する。平面に対応するデフォーカス量L′を抽出し、その値に基づいて二次曲面のパラメータを推定する。レンズの公式に従うと、ΔWを考量した各画素の測距値Aは式(3)で計算される(B=L′とする)。 A correction map estimation process will be described. A defocus amount L' corresponding to the plane is extracted, and the parameter of the quadratic surface is estimated based on that value. According to the lens formula, the measured distance value A of each pixel considering .DELTA.W is calculated by equation (3) (assuming that B=L').
式(3)に従い算出される画素毎の測距値Aが、各平面の領域で、できるだけ平面に近づくように二次曲面パラメータを推定する。パラメータの推定方法は公知の方法を使用してよい。例えば、上記、補正開始の判定処理のように、近接画素間の測距値の差の変化量や、フィッティングで求めた距離値との差や差のばらつきといった評価値を最小化する最適化問題を解けばよい。ただし、画面全体の測距誤差を考慮する必要があるため、画像に存在するすべての平面において評価値を求め、その総和を最小化する必要がある。 The quadratic surface parameters are estimated so that the distance measurement value A for each pixel calculated according to Equation (3) is as close to a plane as possible in each plane region. A known method may be used for estimating parameters. For example, like the correction start determination process described above, an optimization problem that minimizes evaluation values such as the amount of change in the difference in the distance measurement value between adjacent pixels, the difference from the distance value obtained by fitting, and the variation in the difference. can be solved. However, since it is necessary to consider the distance measurement error of the entire screen, it is necessary to obtain evaluation values for all planes present in the image and minimize the sum total.
また、本実施例では、像面湾曲を考慮した補正であるため、像面湾曲の影響を受けにくい光学系101の光軸付近の撮像部における補正前の測距値Aを基に、二次曲面のオフセット成分を決定する。 In the present embodiment, since the correction is made in consideration of the curvature of field, a quadratic Determine the offset component of the surface.
ΔWは画像の位置座標を変数としているため、平面でない領域においても補正を行うことが可能である。 Since ΔW uses the position coordinate of the image as a variable, it is possible to perform correction even in a non-flat area.
図7のグラフは、破線510上の像面湾曲の補正量を示したものである。点線701は元々の像面湾曲補正マップWである。実線702は平面の領域におけるW+ΔWであり、破線703は平面でない領域におけるW+ΔWである。以上のように、補正マップ推定部306は、平面の測距値に基づいて、画像全体の補正マップを推定することができる。
The graph in FIG. 7 shows the correction amount of the curvature of field on the dashed
S406では、距離情報生成部305が補正マップ推定部306にて推定された補正マップを用いて距離情報を再生成する。これにより、画面全体の距離情報の補正が行われた補正距離情報が生成される。
In S406, the distance
上述した処理により、画面全体の距離情報の補正が行われる。平面の測距値に基づいて適切な補正マップを推定し、補正された距離情報を生成できるため、測距値の歪み成分が軽減され、高精度な測距が可能となる。 Through the processing described above, the correction of the distance information of the entire screen is performed. Since an appropriate correction map can be estimated based on the distance measurement value of the plane and the corrected distance information can be generated, the distortion component of the distance measurement value is reduced, and highly accurate distance measurement is possible.
撮像装置の温度変化や姿勢変化などにより像面湾曲が変化すると、工場出荷時の像面湾曲補正マップWでは補正しきれないため、画面全体に歪んだような測距誤差が発生する。像面湾曲は画像の位置座標に応じた所定の関数で表すことができるため、画面の一部の平面領域の情報を使用して、画面全体の補正マップを推定することが可能である。 If the curvature of field changes due to changes in the temperature or posture of the imaging apparatus, the curvature of field correction map W at the time of shipment from the factory cannot be used to correct the curvature of field. Since the curvature of field can be represented by a predetermined function according to the positional coordinates of the image, it is possible to estimate a correction map for the entire screen using information on a partial plane area of the screen.
本実施例では、平面の検出を画像処理で自動的に行ったが、画像の表示と接触入力機能を持つタッチパネルの備わった撮像装置を使用して、ユーザが直接平面を指定できるようにしてもよい。すなわち、画像処理では判定が困難な平面をユーザが検出対象として指定したり、誤検出した平面をユーザが指定して検出対象から外したりすることで、より高精度に補正マップを推定することができる。 In this embodiment, plane detection is automatically performed by image processing, but it is also possible to allow the user to directly specify a plane by using an imaging device equipped with a touch panel having image display and contact input functions. good. In other words, the user can specify a plane that is difficult to determine in image processing as a detection target, or the user can specify a falsely detected plane and exclude it from the detection target, thereby estimating the correction map with higher accuracy. can.
本実施例では平面の距離情報をすべて使用して補正マップを推定したが、視差演算のしやすい高コントラストの領域や、視差演算における相関値の高い領域など、より信頼度の高い距離情報に基づいて補正マップを推定してもよい。そうすることで、より高精度に補正マップを推定することができる。 In this embodiment, the correction map is estimated using all plane distance information. may be used to estimate the correction map. By doing so, the correction map can be estimated with higher accuracy.
本実施例では、1組のA画像とB画像を使用して補正マップを推定したが、2組以上のA画像とB画像を使用して、各組の平面の測距値に基づいて補正マップを推定してもよい。すなわち、複数回撮像して得た画像信号を用いる。例えば、画像501に加えて、図8(A)のような画像801を推定に使用してもよい。画像801は、画像501とシーンが少し異なっている。人物502と503の位置が移動し、504は撮像範囲から居なくなり、撮像装置の姿勢も画像501とは異なっている。図8(B)は画像801に画像501を点線にて重畳した図である。天井508と右側の壁507は各画像で平面の領域であり、各々の画像から求めた距離情報を利用することができる。また、縦線領域802は画像501とは異なる位置に平面領域があり、画像501のみと比べて広い平面領域の距離情報を利用することができる。いずれにおいても、平面領域の距離情報が多くなるため、よりロバストかつ高精度に補正マップを推定することができる。
In this example, one set of A and B images is used to estimate the correction map, but two or more sets of A and B images are used to correct based on the range measurements of each set of planes. Maps may be estimated. That is, image signals obtained by imaging multiple times are used. For example, in addition to the
画像処理装置に、平面の距離情報が存在しない領域を画面上に表示する報知機能を追加してもよい。そうすることで、より高精度な補正に必要な画像を、ユーザが新たに撮像することが容易となる。 A notification function may be added to the image processing apparatus to display on the screen an area where there is no plane distance information. By doing so, it becomes easier for the user to newly capture an image necessary for more accurate correction.
本実施例では、平面の測距値が正しく生成されていないと判定された場合に補正マップを生成したが、別の判定基準で補正マップを推定してもよい。例えば、撮像装置に温度センサや姿勢センサを取り付け、それらの変化量がある閾値を超えた場合に補正マップを推定してもよい。また、センサの値と補正マップの値を不揮発性メモリ108に保存しておき、現在のセンサの値に応じて過去に推定した補正マップを使用して補正を実施してもよい。
In this embodiment, the correction map is generated when it is determined that the distance measurement value of the plane is not correctly generated, but the correction map may be estimated based on another determination criterion. For example, a temperature sensor or an orientation sensor may be attached to the imaging device, and the correction map may be estimated when the amount of change in them exceeds a certain threshold. Alternatively, sensor values and correction map values may be stored in the
また、画像処理装置に補正マップによる補正が不十分だと推定される領域を検出する領域検出手段を追加してもよい。この場合、検出した領域を報知する領域報知手段も用意することで、より高精度な補正に必要な画像を、ユーザが新たに撮像することが容易となる。画像処理装置に補正マップの推定を実施するか否かを制御するスイッチのような機能を用意してもよい。不要な平面検出処理を実施しないことで、画像処理装置の消費電力を抑えることができる。 Also, an area detection means for detecting an area estimated to be insufficiently corrected by the correction map may be added to the image processing apparatus. In this case, by also providing area notification means for notifying the detected area, it becomes easier for the user to newly capture an image necessary for more accurate correction. A function such as a switch for controlling whether or not to perform correction map estimation may be provided in the image processing apparatus. Power consumption of the image processing apparatus can be suppressed by not performing unnecessary plane detection processing.
また、画像処理装置によって算出された距離情報をもとに制御部104が駆動制御部を駆動させてもよい。これによって光学系と撮像部の両方、または一方を駆動し、適切なピント位置に自動調整することが可能となり、ユーザが容易に被写体にピントの合った撮影を行うことができる。
Alternatively, the
実施例2では、ステレオ画像を撮像する撮像装置を例に、本発明を適用できる画像処理装置について説明する。なお、実施例1と同様の構成や処理の場合は、説明を省略する。 In a second embodiment, an image processing apparatus to which the present invention can be applied will be described using an image pickup apparatus that picks up stereo images as an example. In addition, in the case of the same configuration and processing as in the first embodiment, the description will be omitted.
本実施形態は、外部の撮像装置を使用して撮影された画像を取得し、測距演算の可能な画像処理装置にも適用可能である。画像処理装置には、デジタルカメラやスマートフォンを含む携帯電話機、ゲーム機、タブレット端末、時計型や眼鏡型の情報端末、医療機器、監視システムや車載用システムの機器などが含まれてよい。 This embodiment can also be applied to an image processing apparatus capable of obtaining an image captured by an external imaging device and performing distance measurement calculation. The image processing device may include mobile phones including digital cameras and smartphones, game machines, tablet terminals, watch-type and eyeglass-type information terminals, medical equipment, equipment for monitoring systems and in-vehicle systems, and the like.
図9(a)は、本発明を適用できる画像処理装置を撮像装置900に応用した場合の構成図を示すブロック図である。撮像装置900は、光学系9011、9012、撮像部9021、9022、A/D変換部9031、9032、制御部904、画像処理部905、記録部906、揮発性メモリ907、不揮発性メモリ908を備える。
FIG. 9A is a block diagram showing the configuration of an
撮像装置900の構成要素は、光学系9011,9012、撮像部9021、9022を除いて、実施例1の構成要素と同様の機能を有しているため、説明を省略する。
Except for
光学系9011、9012はズームレンズやフォーカスレンズから構成されるレンズ群、絞り調整装置、およびシャッター装置を備えている同一種類の光学系である。この光学系9011、9012はそれぞれ撮像部9021、9022に到達する被写体像の倍率やピント位置、あるいは光量を調整しており、それらのパラメータはそれぞれの光学系で同一になるように調整されている。
The
撮像部9021、9022は、光学系9011、9012それぞれを通過した被写体の光束を光電変換し、電気信号に変換するCCDやCMOSセンサ等の光電変換素子である。
The
A/D変換部9031、9032はそれぞれ撮像部9021、9022から入力されたアナログ画像信号をデジタル画像信号のデータに変換する。
A/
また、撮像部9021、9022はA/D変換部を含み、後述の制御部904にデフォーカス量情報を出力する撮像面位相差センサであってもよい。
Also, the
図9(b)は、撮像装置900の光学系9011、9012と撮像部9021、9022の位置関係を記したものである。光学系9011と光学系9012は、光軸9011aと光軸9012aが略平行になるように配置されている。光学系9011と光学系9012の主点の間の距離が基線長921となる。また撮像部9021及び9022は略同一平面上に配置されており、それぞれA画像およびB画像を生成する。A画像とB画像に写る同一被写体の基線長方向における画像上の相対的な位置変化を視差と呼ぶ。この視差を公知の方法により検出、変換することで、撮像装置から被写体までの距離を算出することができる。
FIG. 9B shows the positional relationship between
以下、本実施形態に係る補正マップの推定処理の一連の動作について説明するが、画像の取得、平面検出、補正マップ推定開始の処理は実施例1と同様のため省略し、距離情報生成と補正マップの推定処理についてのみ説明する。 A series of operations of the correction map estimation process according to the present embodiment will be described below. Only the map estimation process will be described.
画像処理部905の距離情報生成部305は、A画像とB画像に基づいて、公知の手法により撮像装置から被写体までの距離情報を生成する。距離情報の生成過程は、画像の前処理、視差演算、距離変換の三段階に分けられる。
A distance
まず画像の前処理について説明する。A画像とB画像はそれぞれ歪曲収差を含んでおり、そのままだと画像の領域に応じた測距誤差が生じてしまうため、距離情報生成部305は補正情報取得部より取得した歪曲補正パラメータkを使用して歪曲補正を行う。一般に歪曲収差は光軸を中心として円周方向、接線方向に生じる。したがって歪曲収差は、例えば、式(4)のようにモデル化することが可能である。 First, image preprocessing will be described. The A image and the B image each include distortion aberration, and if left as it is, a distance measurement error corresponding to the area of the image will occur. Use to correct distortion. Distortion generally occurs in the circumferential and tangential directions about the optical axis. Distortion can therefore be modeled, for example, as in Equation (4).
(xd,yd):歪曲収差のあるレンズの画像座標
k1,2,・・・5:歪曲補正パラメータ
歪曲補正パラメータkは、光学系8011,8012の状態が変わらなければ変化しないため、基本的には工場出荷時に不揮発性メモリ807に記録されたものを使用する。 Since the distortion correction parameter k does not change unless the states of the optical systems 8011 and 8012 change, basically the one recorded in the nonvolatile memory 807 at the time of shipment from the factory is used.
次に距離情報生成部305は視差を算出する。算出方法は、公知の方法を使用してよく、例えば、ブロックマッチングや位相限定相関法などにより視差を算出する。
Next, the distance
最後に距離情報生成部305は式(5)に従って、各画素にて算出された視差を撮像装置から被写体までの距離情報に変換する。
Finally, the distance
A:物面から光学系の主点までの距離
B:基線長の距離
F:光学系の焦点距離
Z:視差
A: Distance from object surface to principal point of optical system B: Distance of baseline length F: Focal length of optical system Z: Parallax
以上のように生成された撮像装置から被写体までの距離情報を測距値と呼ぶ。 The distance information from the imaging device to the object generated as described above is called a distance measurement value.
補正マップ推定部306は、平面に対応する測距値の変化量が一定でない場合に、補正マップの推定処理を開始する。撮像装置の温度変化などによってレンズの歪み係数が変化すると、領域に応じて光束の結像位置が変化するため、画面全体に歪んだような測距誤差が表れる。本実施例では、補正マップとして、歪曲による結像位置の変化量を推定する。すなわち、補正マップは式(4)と同様のモデルであり、歪曲補正パラメータkの変化量Δkを係数ごとに求めることで補正を行う。補正の方法は実施例1と同様に、補正開始の判定処理に使用した測距値の変化量の変化や、フィッティングで求めた平面との誤差やばらつきといった評価値を、画像のすべての平面を考慮して最小化すればよい。
The correction
上述した処理により、平面の測距値に基づいて適切な補正マップを推定できるため、測距値の歪み成分が軽減され、高精度な測距が可能となる。 By the above-described processing, an appropriate correction map can be estimated based on the distance measurement value of the plane, so the distortion component of the distance measurement value is reduced, and highly accurate distance measurement is possible.
温度変化や装置の姿勢変化により歪曲収差が変化すると、工場出荷時の歪曲補正パラメータkでは歪曲を補正しきれないため、画面全体に歪んだような測距誤差が発生する。歪曲収差は画像の位置座標に応じた所定の関数で表すことができるため、画面の一部の平面領域の情報を使用して、画面全体の補正マップを推定することが可能である。 If the distortion changes due to a change in temperature or a change in the posture of the apparatus, the distortion correction parameter k at the factory shipment cannot correct the distortion, resulting in a distance measurement error such that the entire screen is distorted. Since distortion aberration can be represented by a predetermined function according to the positional coordinates of the image, it is possible to estimate a correction map for the entire screen using information on a partial plane area of the screen.
[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えばASIC)によっても実現可能である。
[Other embodiments]
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
100 撮像装置
101 光学系
102 撮像部
103 A/D変換部
104 正刑部
105 画像処理部
106 記録部
107 揮発性メモリ
108 不揮発性メモリ
100
Claims (21)
前記画像信号における平面領域を検出する検出手段と、
前記距離情報を補正するための補正マップを推定する推定手段と、を備え、
前記推定手段は、前記補正マップを画像の位置座標を変数とする関数で表し、
前記平面領域に対応する距離情報に基づいて前記補正マップを推定することを特徴とする画像処理装置。 generating means for generating distance information using a plurality of image signals captured at different viewpoints;
a detecting means for detecting a plane area in the image signal;
estimating means for estimating a correction map for correcting the distance information;
The estimating means expresses the correction map as a function having the position coordinates of the image as variables,
An image processing apparatus, wherein the correction map is estimated based on distance information corresponding to the plane area.
前記推定手段は前記像面湾曲補正マップによる前記距離情報の誤差を補正する前記補正マップを推定することを特徴とする請求項1に記載の画像処理装置。 The generating means generates the distance information using a field curvature correction map that corrects aberration based on field curvature,
2. The image processing apparatus according to claim 1, wherein said estimating means estimates said correction map for correcting an error of said distance information due to said curvature of field correction map.
前記推定手段における前記関数は歪曲収差のモデルに基づいて表現されることを特徴とする請求項1に記載の画像処理装置。 The generating means generates the distance information based on the image signal corrected for distortion,
2. An image processing apparatus according to claim 1, wherein said function in said estimation means is expressed based on a model of distortion aberration.
前記画像信号における平面領域を検出する検出ステップと、
前記距離情報を補正するための補正マップを推定する推定ステップと、を備え、
前記推定ステップは、前記補正マップを画像の位置座標を変数とする関数で表し、前記平面領域に対応する距離情報に基づいて前記補正マップを推定することを特徴とする画像処理方法。 a generation step of generating distance information using a plurality of image signals captured at different viewpoints;
a detection step of detecting a planar area in the image signal;
an estimation step of estimating a correction map for correcting the distance information;
The image processing method, wherein the estimating step expresses the correction map by a function having positional coordinates of the image as variables, and estimates the correction map based on distance information corresponding to the plane area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021106532A JP2023004680A (en) | 2021-06-28 | 2021-06-28 | Image processing device and control method for image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021106532A JP2023004680A (en) | 2021-06-28 | 2021-06-28 | Image processing device and control method for image processing device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023004680A true JP2023004680A (en) | 2023-01-17 |
Family
ID=85100714
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021106532A Pending JP2023004680A (en) | 2021-06-28 | 2021-06-28 | Image processing device and control method for image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023004680A (en) |
-
2021
- 2021-06-28 JP JP2021106532A patent/JP2023004680A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4852591B2 (en) | Stereoscopic image processing apparatus, method, recording medium, and stereoscopic imaging apparatus | |
JP5825817B2 (en) | Solid-state imaging device and imaging apparatus | |
JP5868183B2 (en) | Imaging apparatus and imaging method | |
JP6585006B2 (en) | Imaging device and vehicle | |
JP5963606B2 (en) | Imaging apparatus and control method thereof | |
JP7009091B2 (en) | Distance information generator, image pickup device, distance information generation method, and program | |
CN109255810B (en) | Image processing apparatus and image processing method | |
JP2015194706A (en) | Focus detection device and control method thereof | |
US10306132B2 (en) | Distance calculation apparatus, imaging apparatus and distance calculation method that include confidence calculation of distance information | |
JP2014006388A (en) | Imaging apparatus, and its control method and program | |
WO2016140066A1 (en) | Signal processing device, signal processing method, program, electronic device, and imaging element | |
JP2020008415A (en) | Distance measuring camera | |
JP2019168479A (en) | Controller, imaging device, method for control, program, and, and storage medium | |
CN110995982B (en) | Image processing apparatus, control method therefor, imaging apparatus, and recording medium | |
KR20200014204A (en) | Control apparatus, imaging apparatus, and storage medium | |
JPWO2019202984A1 (en) | Imaging device and distance measurement method, distance measurement program and recording medium | |
JP2023004680A (en) | Image processing device and control method for image processing device | |
JP2016066995A (en) | Image deviation amount calculation device, imaging device and image deviation amount calculation method | |
JP2016099432A (en) | Focus detection device, and method, program and storage medium | |
JP2004007213A (en) | Digital three dimensional model image pickup instrument | |
JP2003057531A (en) | Method and device for phase difference detection, range finder, and image pickup device | |
JP2016066015A (en) | Focus detector, control method thereof, program, and memory medium | |
JP7293309B2 (en) | IMAGING DEVICE, CONTROL METHOD AND STORAGE MEDIUM | |
US20230292004A1 (en) | Image processing apparatus, measurement method, and storage medium for measuring distance from image | |
JP2017130890A (en) | Image processing device and control method and program thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20231213 |