JP7057717B2 - Phase difference detector, image processing device, and program - Google Patents
Phase difference detector, image processing device, and program Download PDFInfo
- Publication number
- JP7057717B2 JP7057717B2 JP2018101403A JP2018101403A JP7057717B2 JP 7057717 B2 JP7057717 B2 JP 7057717B2 JP 2018101403 A JP2018101403 A JP 2018101403A JP 2018101403 A JP2018101403 A JP 2018101403A JP 7057717 B2 JP7057717 B2 JP 7057717B2
- Authority
- JP
- Japan
- Prior art keywords
- phase difference
- image
- crew
- subject
- difference detector
- 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
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
- Image Analysis (AREA)
Description
本発明は、時間方向又は空間方向の一組の画像から被写体の位置のずれを示す位相差を検出する位相差検出器及び画像処理装置、並びに画像処理装置内の制御用のコンピュータに位相差検出に係る評価値演算を実行させるためのプログラムに関する。 INDUSTRIAL APPLICABILITY According to the present invention, a phase difference detector and an image processing device for detecting a phase difference indicating a deviation of the position of a subject from a set of images in the time direction or a spatial direction, and a computer for control in the image processing device can detect the phase difference. The present invention relates to a program for executing the evaluation value calculation according to the above.
特定の状況だけ変化させた極めて似た複数の画像から、それらに共通して映る被写体の位置のずれを示す位相差を求める需要がある。 There is a demand for finding a phase difference indicating a shift in the position of a subject that is commonly reflected in a plurality of very similar images that are changed only in a specific situation.
例えば、1台の撮像カメラで時間的に連続して2枚の画像を取得し、その時間方向の一組の画像から、その双方に映る被写体の位相差を検出することで、被写体の画像上の移動速度の検出や被写体の動きを追跡することができる。 For example, by acquiring two images in succession in time with one image pickup camera and detecting the phase difference of the subject reflected in both of them from a set of images in the time direction, the image of the subject is displayed. It is possible to detect the movement speed of the camera and track the movement of the subject.
また、両眼カメラ等の同性能の2台の撮像カメラを空間的に並べて同時・同方向に撮像を行い、得られた空間方向の一組の画像から、その双方に映る被写体の位相差を検出することで、当該撮像カメラと被写体との距離、或いは被写体間の空間的な位置を検出することができる。 In addition, two imaging cameras with the same performance, such as a binocular camera, are spatially arranged and imaged simultaneously and in the same direction, and the phase difference of the subject reflected in both of them is obtained from the obtained pair of images in the spatial direction. By detecting, it is possible to detect the distance between the image pickup camera and the subject, or the spatial position between the subjects.
更に、撮像素子の画素の一部を遮光した位相差検出画素を利用して、非合焦時の“ぼけ”の広がり方から、現在の合焦位置が被写体より近いか遠いかを判定する自動焦点技法も知られている(例えば、特許文献1参照)。その際、当該位相差検出画素を有する撮像素子を備える1台の撮像カメラで撮像した1枚の撮像画像から、遮光部分が異なる(一般的には左右や上下で対称となる)位相差検出画素に隣接する画素値を遮光部分ごとに抽出・集積して一組の位相差画像を構成し、当該一組の位相差画像の位相差を検出することで、合焦位置の判定を実現する。 Furthermore, using the phase difference detection pixel that blocks a part of the pixel of the image sensor, it automatically determines whether the current in-focus position is closer to or far from the subject from the way the "blurring" spreads when out of focus. Focusing techniques are also known (see, for example, Patent Document 1). At that time, the phase difference detection pixels whose light-shielding portions are different (generally symmetrical in the left-right and up-down directions) from one image captured by one image pickup camera equipped with an image sensor having the phase difference detection pixel. A set of phase difference images is formed by extracting and accumulating pixel values adjacent to each of the light-shielding portions, and the phase difference of the set of phase difference images is detected to realize the determination of the in-focus position.
ところで、これらの時間方向又は空間方向の一組の画像から被写体の位置のずれを示す位相差を検出する技法では、その位相差を検出するための評価値を求める技法として、以下の式(数1)で示すように、例えば一組の位相差画像を構成する右目画像と左目画像を1画素ずつ左右にずらしながら差分をとり、差分の絶対値の総和による評価値(相関値)が最小になるずらし幅kを求める技法が一般的である。ここでは評価値として相関値を示すSAD(Sum of Absolute Difference;差の絶対値)を例に説明しているが、SSD(Sum of Squared Difference;差の二乗値)とする場合もある。 By the way, in the technique of detecting the phase difference indicating the deviation of the position of the subject from a set of images in the temporal direction or the spatial direction, the following formula (number) is used as a technique for obtaining an evaluation value for detecting the phase difference. As shown in 1), for example, the difference is taken while shifting the right-eye image and the left-eye image constituting a set of phase difference images one pixel at a time to the left and right, and the evaluation value (correlation value) by the sum of the absolute values of the differences is minimized. The technique of finding the shift width k is common. Here, SAD (Sum of Absolute Difference; absolute value of difference) showing a correlation value is described as an example as an evaluation value, but SSD (Sum of Squared Difference; squared value of difference) may be used as an example.
上記の式(数1)におけるLとRは、それぞれ左目画像と右目画像の画素値を表し、LとRの右下の添え字で画素のアドレスが示されている。例えば、撮像素子における画素部の画素位置を示すi,jのアドレス値において合焦位置検出領域のSAD値を求めるときは、上記の式(数1)において、Li+k,j及びRi,jは、画素部内に離散的に配置される対角2画素1組の位相差検出画素(位相差検出画素L,R)のj列目i+k番目の画素値を表しており、Jは相関演算に用いる画素数、Iは相関演算を行う一対の像の列方向の数であり、J, Iは測距視野長(測距する視野長)等に応じて適切に設定される。最小のSAD値で求められるkは位相差画像のずらし幅(右目画像と左目画像の位相差)を示す。 L and R in the above equation (Equation 1) represent the pixel values of the left-eye image and the right-eye image, respectively, and the pixel addresses are indicated by the subscripts at the lower right of L and R, respectively. For example, when the SAD value of the in-focus position detection region is obtained from the address values of i and j indicating the pixel positions of the pixel portions in the image pickup element, Li + k, j and Ri, j in the above equation (Equation 1). Represents the j-th column i + k-th pixel value of the phase difference detection pixels (phase difference detection pixels L, R) of a pair of diagonal two pixels discretely arranged in the pixel portion, and J is used for correlation calculation. The number of pixels to be used and I are the numbers in the column direction of the pair of images for which the correlation calculation is performed, and J and I are appropriately set according to the distance measuring field length (distance measuring field length) and the like. K obtained from the minimum SAD value indicates the shift width of the phase difference image (phase difference between the right eye image and the left eye image).
従って、上記の式(数1)に基づく評価値は、合焦位置の検出や被写体の画像上の移動量の検出等に利用できる。 Therefore, the evaluation value based on the above equation (Equation 1) can be used for detecting the in-focus position, detecting the amount of movement of the subject on the image, and the like.
尚、上記の式(数1)においては画素値を直接的に用いているが、画像上の注目領域のカラーヒストグラムを画像特徴量として利用することや、画像平面上で微分して被写体の形状を画像特徴量として抽出する技法もある。特に、時間的に連続した画像を比較する場合には、直前の時間における被写体の移動に係る画素値による画像特徴量を用いることで、次の瞬間の被写体の画像上の位置を予測することができる。 Although the pixel value is directly used in the above equation (Equation 1), the color histogram of the region of interest on the image can be used as the image feature amount, or the shape of the subject can be differentiated on the image plane. There is also a technique for extracting as an image feature amount. In particular, when comparing images that are continuous in time, it is possible to predict the position of the subject on the image at the next moment by using the image feature amount based on the pixel value related to the movement of the subject in the immediately preceding time. can.
一方、半導体等の各種製造装置や製品の検査装置において、登録画像の画像パターンと照合画像の画像パターンとの相対的な位置関係をずらしながら、照合される2つのパターン間の相関値を算出し、相関値が最大になる位置を求めることで、両画像内の被写体の位置ずれを測定する技法が知られている(例えば、特許文献2参照)。特に、特許文献2の技法では、照合される2つのパターンに対し複数種類の複素フィルタを乗じて、画素値情報だけでなく位相情報を付加した特徴量を基にパターンマッチングを行うことで、高精度の位置ずれ測定を可能としている。
On the other hand, in various manufacturing devices such as semiconductors and product inspection devices, the correlation value between the two patterns to be collated is calculated while shifting the relative positional relationship between the image pattern of the registered image and the image pattern of the collated image. , A technique for measuring the positional deviation of a subject in both images by finding the position where the correlation value is maximized is known (see, for example, Patent Document 2). In particular, in the technique of
上述したように、従来の画像の位相差を検出する技法として、上記の式(数1)に基づく評価値を利用する技法、画像上の注目領域のカラーヒストグラムや画素値を画像特徴量として利用する技法、画像平面上で微分して被写体の形状特徴を抽出し、この形状を画像特徴量として利用する技法、或いは照合される2つのパターンに対し複数種類の複素フィルタを乗じて画素値情報だけでなく位相情報を付加した特徴量とする技法がある。 As described above, as a technique for detecting the phase difference of a conventional image, a technique using an evaluation value based on the above equation (Equation 1), a color histogram of a region of interest on an image, and a pixel value are used as an image feature amount. Techniques for There is a technique to make a feature quantity with phase information added instead.
しかし、上記の式(数1)に基づく評価値を利用する技法では、画素値情報のみに基づいた位相差検出技法であるため、位相差画像のずらし幅kの有効桁数も限られたものとなり、検出精度に改善の余地がある。 However, since the technique using the evaluation value based on the above equation (Equation 1) is a phase difference detection technique based only on the pixel value information, the number of significant digits of the shift width k of the phase difference image is also limited. Therefore, there is room for improvement in detection accuracy.
また、例えばカラーヒストグラムを用いる技法においては、例えば暗所での撮像や赤外線カメラによる撮像、夕方など特定の周波数の光の影響が支配的な環境での撮像など、色情報が少ない環境で撮像した撮像画像に対しては当該位相差の検出精度が悪化する。 In addition, for example, in the technique using a color histogram, an image is taken in an environment with little color information, such as an image taken in a dark place, an image taken with an infrared camera, or an image taken in an environment where the influence of light of a specific frequency is dominant such as in the evening. The detection accuracy of the phase difference deteriorates for the captured image.
また、例えば画像平面上で微分して被写体の形状特徴を抽出する技法は、被写体の移動量が小さい、或いは撮像カメラの解像度が低い等の理由により、位相差が1画素以下になってしまう場合は、位相差を正確に検出できない。逆に、被写体の移動量が大きい、或いは撮像カメラの解像度が高い等の理由により、位相差に対応する画素のずれ量が大きくなってしまう場合は、被写体を検出する範囲(走査範囲)の画素数を大きくとる必要があり、計算量が多くなってしまうという問題がある。 In addition, for example, the technique of differentiating on an image plane to extract the shape characteristics of a subject is a case where the phase difference becomes one pixel or less because the amount of movement of the subject is small or the resolution of the image pickup camera is low. Cannot accurately detect the phase difference. On the contrary, if the amount of pixel shift corresponding to the phase difference becomes large due to a large amount of movement of the subject or a high resolution of the image pickup camera, the pixels in the range (scanning range) for detecting the subject. There is a problem that it is necessary to take a large number and the amount of calculation becomes large.
また、特許文献2に開示される技法は、画素値情報だけでなく位相情報を付加した特徴量することで位相差の検出精度を向上させることが可能であるが、複数種類の複素フィルタを乗じるために複雑な条件分岐や演算を必要とし処理コスト自体は増大するため、装置コストの増大等の問題が生じる。
Further, the technique disclosed in
しかし、従来の画像の位相差を検出する技法は、いずれも長所と短所がある。このため、撮像カメラの解像度の高低によらず、且つ色情報が少ない環境でも当該位相差の検出精度の差異を殆ど生じさせることなく、低処理コストで、当該位相差の検出精度を向上させる技法が望まれる。例えばテレビカメラ等、多様な環境での使用が想定される撮像カメラでは、撮像環境によらず低処理コストで、上記の式(数1)に基づく評価値による位相差画像のずらし幅kの有効桁数よりも高い有効桁数の評価値により、当該位相差の検出精度を向上させる技法が要望される。 However, all conventional techniques for detecting the phase difference of an image have advantages and disadvantages. Therefore, a technique for improving the detection accuracy of the phase difference at a low processing cost without causing a difference in the detection accuracy of the phase difference regardless of the resolution of the image pickup camera and in an environment where there is little color information. Is desired. For example, in an imaging camera that is expected to be used in various environments such as a television camera, the shift width k of the phase difference image based on the evaluation value based on the above equation (Equation 1) is effective at low processing cost regardless of the imaging environment. There is a demand for a technique for improving the detection accuracy of the phase difference based on the evaluation value of the number of significant digits higher than the number of digits.
本発明の目的は、上述の問題に鑑みて、低処理コストで撮影環境に依らず安定し高精度で位相差を検出する位相差検出器及び画像処理装置、並びにプログラムを提供することにある。 In view of the above-mentioned problems, an object of the present invention is to provide a phase difference detector, an image processing device, and a program that stably detect a phase difference with high accuracy regardless of a shooting environment at a low processing cost.
即ち、本発明の位相差検出器は、時間方向又は空間方向の一組の画像から被写体の位置のずれを示す位相差を検出する位相差検出器であって、前記一組の画像の各注目領域における画像信号の主周波数の波長を検出する主周波数検出手段と、前記一組の画像の各注目領域の画像信号をそれぞれ処理対象画像とし、前記波長を基に該処理対象画像に対して複素矩形ウェーブレット変換(CReW)を施し、前記一組の画像の各注目領域の画像信号に関する複素の周波数成分の信号ベクトルを生成するCReW計算手段と、前記一組の画像の各注目領域の信号ベクトルを比較して位相差を算出する位相差算出手段と、当該算出した位相差を基に、前記一組の画像のうち少なくとも一方の注目領域における被写体の変位座標を算出する座標算出手段と、を備えることを特徴とする。 That is, the phase difference detector of the present invention is a phase difference detector that detects a phase difference indicating a deviation of the position of a subject from a set of images in the time direction or the spatial direction, and each attention of the set of images. The main frequency detecting means for detecting the wavelength of the main frequency of the image signal in the region and the image signal in each region of interest of the set of images are set as the processing target image, and the processing target image is complex based on the wavelength. A CREW calculation means that performs rectangular wavelet transform (CREW) to generate a signal vector of a complex frequency component for an image signal in each region of interest in the set of images, and a signal vector in each region of interest in the set of images. A phase difference calculating means for calculating the phase difference by comparison and a coordinate calculating means for calculating the displacement coordinates of the subject in at least one of the attention regions of the set of images based on the calculated phase difference are provided. It is characterized by that.
また、本発明の位相差検出器において、前記複素矩形ウェーブレット変換の基底は、少なくとも4象限の要素値を持つ複素矩形数列のフィルタで表されていることを特徴とする。 Further, in the phase difference detector of the present invention, the basis of the complex rectangular wavelet transform is represented by a filter of a complex rectangular sequence having element values of at least four quadrants.
また、本発明の位相差検出器において、前記位相差算出手段は、当該位相差を複素平面上にマッピングされた各信号ベクトルのマンハッタン距離により算出することを特徴とする。 Further, in the phase difference detector of the present invention, the phase difference calculating means is characterized in that the phase difference is calculated by the Manhattan distance of each signal vector mapped on the complex plane.
また、本発明の位相差検出器において、前記CReW計算手段は、前記波長を基に前記処理対象画像をそれぞれ空間的に少なくとも一方向に分割・圧縮し、該一方向の画素数がN(N≧4)となる圧縮画像を生成し、該圧縮画像に対して複素矩形ウェーブレット変換(CReW)を行うことを特徴とする。 Further, in the phase difference detector of the present invention, the CREW calculation means spatially divides and compresses the image to be processed in at least one direction based on the wavelength, and the number of pixels in the one direction is N (N). It is characterized in that a compressed image with ≧ 4) is generated, and a complex rectangular wavelet transform (CREW) is performed on the compressed image.
また、本発明の位相差検出器において、前記CReW計算手段は、前記波長の1/4で分割・圧縮した一方向がN(N≧4)画素の圧縮画像に対して4象限の要素値を持つCReWフィルタを基底とする複素矩形ウェーブレット変換を行うことを特徴とする。 Further, in the phase difference detector of the present invention, the CREW calculation means obtains element values of four quadrants with respect to a compressed image having N (N ≧ 4) pixels in one direction divided and compressed at 1/4 of the wavelength. It is characterized by performing a complex rectangular wavelet transform based on the CREW filter having.
また、本発明の位相差検出器において、前記CReW計算手段は、前記波長の1/4で分割・圧縮した一方向がN(N>4)画素の圧縮画像に対して4象限の要素値を持つCReWフィルタを基底とする複素矩形ウェーブレット変換を行い、画素のアドレスに応じて複数種類の信号ベクトルを生成することを特徴とする。 Further, in the phase difference detector of the present invention, the CREW calculation means obtains element values of four quadrants with respect to a compressed image having N (N> 4) pixels in one direction divided and compressed at 1/4 of the wavelength. It is characterized in that a complex rectangular wavelet transform based on the CREW filter is performed to generate a plurality of types of signal vectors according to the pixel addresses.
また、本発明の位相差検出器において、前記CReW計算手段は、前記処理対象画像に対して直接的に、前記複素矩形ウェーブレット変換の各要素値を前記波長の1/4ずつ連続させてCReWフィルタを冗長化させたCReW計算を行うことを特徴とする。 Further, in the phase difference detector of the present invention, the CREW calculation means directly connects each element value of the complex rectangular wavelet transform to the processing target image by 1/4 of the wavelength to make a CREW filter. It is characterized in that the CREW calculation is performed by making the above redundant.
また、本発明の位相差検出器において、前記CReW計算手段は、前記複素矩形ウェーブレット変換として、空間的に一方向を対象とした一次元のCReWフィルタ、空間的に二方向を対象とした二次元のCReWフィルタ、又は該二方向に加え時間方向を含む三次元以上のCReWフィルタを基底とするウェーブレット変換を行うことを特徴とすることを特徴とする。 Further, in the phase difference detector of the present invention, the CREW calculation means is a one-dimensional CREW filter spatially targeted in one direction and a two-dimensional spatially targeted two-dimensional as the complex rectangular wavelet transform. It is characterized in that the wavelet transform is performed based on the CREW filter of No. 1 or a CREW filter having three or more dimensions including the time direction in addition to the two directions.
また、本発明の位相差検出器において、当該位相差検出器は、時間方向に連続する画像から当該位相差を逐次検出するように構成され、前記主周波数検出手段は、当該位相差を逐次検出する際の初期値として前記波長を算出する手段、及び、前記CReW計算手段によって生成する当該信号ベクトルのパワーを監視し、該信号ベクトルのパワーが予め定められた範囲を外れた場合に、前記波長を改めて算出する手段を有することを特徴とする。 Further, in the phase difference detector of the present invention, the phase difference detector is configured to sequentially detect the phase difference from images continuous in the time direction, and the main frequency detecting means sequentially detects the phase difference. When the power of the signal vector generated by the means for calculating the wavelength and the CREW calculation means is monitored as an initial value at the time of the detection, and the power of the signal vector is out of a predetermined range, the wavelength It is characterized by having a means for calculating again.
また、本発明の位相差検出器において、当該位相差検出器は、時間方向に連続する画像から当該位相差を逐次検出するように構成され、前記CReW計算手段は、当該位相差の検出を時間方向に連続する画像に対して継続的に行う際に、逐次、信号ベクトルを今回値として再計算して前回値の信号ベクトルと比較し、今回値の信号ベクトルと前回値の信号ベクトルとの差が閾値以下であるか否かを判定し、当該閾値以下のときには今回値の信号ベクトルを次回の位相差の検出で対比する参照信号ベクトルとして更新し、閾値以下でないときは当該参照信号ベクトルの更新は行わず、前記主周波数検出手段に対して、前記波長を改めて算出させる処理を有することを特徴とする。 Further, in the phase difference detector of the present invention, the phase difference detector is configured to sequentially detect the phase difference from images continuously in the time direction, and the CREW calculation means detects the phase difference in time. When performing continuously for images that are continuous in the direction, the signal vector is sequentially recalculated as the current value and compared with the signal vector of the previous value, and the difference between the signal vector of the current value and the signal vector of the previous value. Is not less than or equal to the threshold, and if it is less than or equal to the threshold, the signal vector of the current value is updated as a reference signal vector to be compared in the next detection of the phase difference. However, the main frequency detecting means is characterized by having a process of recalculating the wavelength.
また、本発明による一態様の画像処理装置は、時間方向に連続する画像から当該位相差を逐次検出するように構成された本発明の位相差検出器と、該位相差を基に、被写体の画像上の移動速度の検出処理、又は被写体の動きの追跡処理、或いは被写体の動的変化の検出を行う信号処理手段と、を備えることを特徴とする。 Further, the image processing apparatus according to the present invention is the phase difference detector of the present invention configured to sequentially detect the phase difference from images continuously in the time direction, and the subject based on the phase difference. It is characterized by comprising a signal processing means for detecting a movement speed on an image, tracking a movement of a subject, or detecting a dynamic change of a subject.
また、本発明による一態様の画像処理装置は、空間方向に同時・同方向に撮像された一組の画像から当該位相差を逐次検出するように構成された本発明の位相差検出器と、該位相差を基に、被写体に係る物理的な距離測定処理を行う信号処理手段と、を備えることを特徴とする。 Further, the image processing apparatus of one aspect according to the present invention includes the phase difference detector of the present invention configured to sequentially detect the phase difference from a set of images simultaneously and simultaneously imaged in the spatial direction. It is characterized by comprising a signal processing means for performing a physical distance measurement process relating to a subject based on the phase difference.
また、本発明のプログラムは、コンピュータを、本発明の位相差検出器として機能させるためのプログラムとして構成する。 Further, the program of the present invention is configured as a program for causing the computer to function as the phase difference detector of the present invention.
本発明によれば、低処理コストで撮影環境に依らず安定し高精度で位相差を検出することができる。特に、本発明によれば、上記の式(数1)に基づく評価値による位相差画像のずらし幅kの有効桁数よりも高い有効桁数の評価値とすることができ、位相差検出を高精度化し、且つ実装コストを低く抑えることができる。 According to the present invention, the phase difference can be detected stably and with high accuracy regardless of the shooting environment at low processing cost. In particular, according to the present invention, the evaluation value of the number of significant digits higher than the number of significant digits of the shift width k of the phase difference image based on the evaluation value based on the above equation (Equation 1) can be set, and the phase difference detection can be performed. High accuracy and low mounting cost can be achieved.
以下、図面を参照して、本発明による各実施形態の位相差検出器11及びこれを備える画像処理装置1について説明する。
Hereinafter, with reference to the drawings, the
〔第1実施形態〕
図1は、本発明による第1実施形態の位相差検出器11、及びこれを備える画像処理装置1の概略構成を示すブロック図である。画像処理装置1は、1台の撮像カメラ10で時間的に連続して取得された撮像画像を逐次入力し、位相差検出器11により、その入力される時間的に連続して取得された2枚一組の撮像画像を基にして、その双方に映る被写体の位相差を検出することで、被写体の画像上の移動速度の検出や被写体の動きを追跡する装置として構成される。
[First Embodiment]
FIG. 1 is a block diagram showing a schematic configuration of a
(撮像カメラ)
まず、本実施形態に係る撮像カメラ10は、時間的に連続して逐次、被写体を撮像して撮像画像を形成し出力するカメラであり、撮像レンズ101、撮像素子102、及び画像処理部103を備える。
(Image camera)
First, the
本実施形態に係る撮像レンズ101は、被写体を撮像素子102に結像するため光学レンズであり、自動焦点可能に駆動されるものでもよいが、ここでは、所望の被写体に焦点が合致した状態を例に説明する。 The image pickup lens 101 according to the present embodiment is an optical lens for forming an image of a subject on the image pickup element 102, and may be driven so as to be able to automatically focus. However, here, a state in which the focus is on a desired subject is set. Let's take an example.
本実施形態に係る撮像素子102は、複数の画素からなる撮像部を有し、その撮像部内に遮光部分が異なる(一般的には左右や上下で対称となる)位相差検出画素を有していてもよいが、ここでは、そのような位相差検出画素を有していない例を説明する。 The image pickup device 102 according to the present embodiment has an image pickup unit composed of a plurality of pixels, and has phase difference detection pixels having different light-shielding portions (generally symmetrical in the left-right and up-down directions) in the image pickup unit. However, here, an example of not having such a phase difference detection pixel will be described.
本実施形態に係る画像処理部103は、撮像素子102から得られる被写体が撮像された撮像画像をフレーム単位で逐次形成し、信号処理部13及び位相差検出器11に出力する。特に、画像処理部103は、画像位相差検出器11の作動開始時点で、撮像素子102から得られる被写体が撮像された撮像画像P1を形成して信号処理部13及び位相差検出器11に出力する。
The
画像位相差検出器11の作動開始後、本実施形態の画像処理部103は、撮像画像P1の形成の後に時間的に連続して、撮像素子102から得られる被写体が撮像された当該撮像画像P2を形成し、信号処理部13及び位相差検出器11に出力する。
After the operation of the image
このようにして、本実施形態の画像処理部103は、撮像素子102から得られる被写体が撮像された撮像画像をフレーム単位で逐次形成し信号処理部13に出力する。そして、画像位相差検出器11の作動開始時点で、本実施形態の画像処理部103は、時間的に連続して取得された2枚一組の撮像画像P1,P2について逐次、信号処理部13及び位相差検出器11に出力する。
In this way, the
(画像処理装置)
画像処理装置1は、位相差検出器11、メモリ12、及び信号処理部13を備える。
(Image processing device)
The
位相差検出器11は、操作部16からの指示に基づいて被写体の注目領域(縦、横、斜めを問わない)を初期設定して作動を開始し、1台の撮像カメラ10で時間的に連続して取得された2枚一組の撮像画像P1,P2を用いて、その双方に映る被写体の位相差を検出する機能部である。被写体の注目領域の初期設定は、操作者が任意位置を指定するか、或いは撮像画像の中央領域など予め定めた範囲とすることができる。画像位相差検出器11の作動開始時点で、初期設定された被写体の注目領域は、以後の画像位相差検出器11の作動により動的に座標算出されて、被写体の画像上の移動速度の検出や被写体の動きを追跡するよう例えば方形状に囲むように切り出される。
The
メモリ12は、信号処理部13の処理に必要な撮像画像P1,P2を逐次更新しながら一時記憶する機能、及び当該位相差検出器11の処理に必要な各信号値を一時記憶する機能を有する。
The
信号処理部13は、位相差検出器11により、当該時間的に連続して取得された2枚一組の撮像画像P1,P2を基にして検出されたその双方に映る被写体の位相差φに対応する変位座標xを用いて撮像画像P2から被写体領域を切り出し、被写体の画像上の移動速度の検出や被写体の動きを追跡する機能部である。このため、信号処理部13は、1台の撮像カメラ10で時間的に連続して取得された撮像画像を逐次入力し、その入力される時間的に連続して取得された2枚一組の撮像画像を逐次更新しながらメモリ12に一時記憶する。そして、例えば、信号処理部13は、逐次入力される撮像画像から被写体領域を例えば方形状に囲むように切り出し、ディスプレイパネル等の表示部14に対し区画表示するか、又は当該切り出した画像領域を示す態様で記録部15に対し画像記録することを繰り返す。
The
以下より具体的に、位相差検出器11及び画像処理装置1について詳細に説明する。
More specifically, the
(位相差検出器)
図1に示すように、本実施形態の位相差検出器11は、主周波数検出部111、CReW計算部112、位相差算出部113、及び座標算出部114を備える。
(Phase difference detector)
As shown in FIG. 1, the
主周波数検出部111は、画像位相差検出器11の作動開始時点で、撮像画像P1の主周波数の波長λを算出するよう動作する。つまり、主周波数検出部111は、画像位相差検出器11の作動開始時点で画像処理部103から入力される撮像画像P1の注目領域について、図2を参照して例示する周波数成分検出を行い、撮像画像P1のパワー(画素値の振幅)が最大となる主周波数の波長λを算出し、その波長λをメモリ12に一時記憶する。
The main
また、本実施形態の主周波数検出部111は、後述するCReW計算部112によって2枚一組の撮像画像P1,P2の注目領域における各々について計算される周波数成分の信号ベクトルFのパワーを監視し、該周波数成分の信号ベクトルFのパワーが予め定められた範囲(絶対的な値又は直前の周波数検出時のパワーを元に決定される相対的な値)を外れた場合に、主周波数の波長λを改めて算出しメモリ12に対する一時記憶を更新するよう動作する。
Further, the main
図2(a)乃至図2(e)は、それぞれ第1実施形態の位相差検出器11における主周波数検出部111の処理例を示す図である。
2 (a) and 2 (e) are diagrams showing processing examples of the main
主周波数検出部111は、撮像画像P1を入力し、その注目領域における画像信号の代表的な主周波数の波長λを検出するため、まず、図2(a)に示すように、当該画像信号の長さより短い長さMを設定し、最大振幅aを持つ画像信号から画像幅Mの領域を抽出する。尚、図2では、説明の便宜上、最大振幅aを持つ矩形状の画像信号で正規化表示しているが、実信号(画素値)は正の値の種々の振幅を有する。
The main
続いて、図2(b)及び図2(c)に示すように、主周波数検出部111は、M/2の長さで当該信号を分割し、画像幅M/2で分割した前半部分と後半部分とをそれぞれ抽出する。
Subsequently, as shown in FIGS. 2 (b) and 2 (c), the main
続いて、図2(d)に示すように、主周波数検出部111は、画像幅M/2で分割した前半部分と後半部分とをその信号順で重ねて差分して、その結果となる差分信号(長さM/2)を算出する。これにより、パワーPとして強調された差分信号が得られる。
Subsequently, as shown in FIG. 2D, the main
続いて、図2(e)に示すように、主周波数検出部111は、差分信号のパワーPの絶対値の総和をMで除した正規化パワーを算出する。
Subsequently, as shown in FIG. 2E, the main
そして、主周波数検出部111は、当該画像信号の長さより短い範囲でMの値を変化させながら繰り返し、当該正規化パワーが最大となるMの値を求め、このMの値を主周波数の波長λとする。
Then, the main
つまり、図2に例示する技法は、信号の全パワーからM/2シフトの自己相関関数の値を引いた値を用いてパワーPとして強調し、その代表的な周波数を検出するものとなっている。従って図2(d)に示す差分信号は、波長M/2の周波数成分及びその整数倍の周波数成分のパワーが抑圧された概ね矩形波のパワーを持つ信号となる。奇数倍の周波数を持つ矩形波のパワーなども混ざり込むが、エネルギーも奇数分の1となるため、主周波数を計算する上では問題とならない。 That is, the technique illustrated in FIG. 2 emphasizes the power P by using the value obtained by subtracting the value of the autocorrelation function of the M / 2 shift from the total power of the signal, and detects the representative frequency. There is. Therefore, the difference signal shown in FIG. 2D is a signal having a power of a substantially square wave in which the power of the frequency component of the wavelength M / 2 and the frequency component of an integral multiple thereof is suppressed. The power of a square wave having an odd multiple frequency is also mixed, but the energy is also an odd number, so there is no problem in calculating the main frequency.
尚、主周波数検出部111は、図2に従う自己相関関数に立脚した技法以外にも、フーリエ変換を用いてパワースペクトルを計算するなど、主周波数を検出するその他の技法を基に、主周波数の波長λの検出を行う構成としてもよい。例えば、主周波数検出部111は、入力される画像信号における中心の色情報を基に、所定基準で規定した類似色の範囲を被写体と仮定して、その幅の倍の長さを主周波数の波長λとしてもよい。
The main
CReW計算部112は、まず、メモリ12から波長λ、分割ブロック数N及び変位座標xを示す座標算出情報を読み出し、当該変位座標xを基に画像処理部112から入力される2枚一組の撮像画像P1,P2の注目領域を較正し、当該波長λを基に2枚一組の撮像画像P1,P2の注目領域の各々の画像信号を波長λ/4で一方向にNブロック以上(N≧4の整数固定値)に分割しそれぞれの総和(或いは、平均)を算出することで、分割方向にN画素となる圧縮画像を生成する。
The
尚、画像位相差検出器11の作動開始時点では、当該変位座標xの値は計算されていないため、初期値としての当該変位座標xは変位量ゼロを示すものとする。つまり、画像位相差検出器11の作動開始時点では、2枚一組の撮像画像P1,P2の注目領域は初期設定時と同位置となるが、以降、時間的に連続して取得された2枚一組の撮像画像の位相差を検出する際には、時間的に後の撮像画像の注目領域は、切り出される被写体領域に対応する当該変位座標xに基づく較正によって、時間的に前の撮像画像の注目領域とは異なる座標となる。また、分割ブロック数Nは、メモリ12に記憶される予め定められた値であり、操作部16から外部設定可能である。
Since the value of the displacement coordinate x is not calculated at the time when the operation of the image
そして、CReW計算部112は、2枚一組の撮像画像P1,P2の注目領域の各々における分割・圧縮方向にN画素となる圧縮画像に対して、当該方向に少なくとも4象限の要素値を持つ矩形数列で表される複素矩形数列(CReWフィルタ)を基底とする複素矩形ウェーブレット変換(CReW:Complex Rectangular Wavelet Transform)を施し、複素(実数成分及び虚数成分)の周波数成分の信号ベクトルFを1種類以上生成して、位相差算出部113に出力する。
Then, the
ただし、時系列の処理順として、CReW計算部112によって得られた撮像画像P1に対する信号ベクトルFはメモリ12に一時記憶し位相差検出のための参照信号ベクトルF’として利用され、CReW計算部112によって得られた撮像画像P2に対する信号ベクトルFが位相差算出部113に出力される。
However, in the processing order of the time series, the signal vector F for the captured image P1 obtained by the
ここで、一実施例の複素矩形ウェーブレット変換(CReW)について、Type1,Type2の2例を説明する。 Here, two examples of Type1 and Type2 will be described with respect to the complex rectangular wavelet transform (CReW) of one embodiment.
図3(a)乃至図3(c)は、それぞれ第1実施形態の位相差検出器11における一実施例(Type1)のCReW計算部112の処理例を示す図である。また、図4(a)乃至図4(c)は、それぞれ第1実施形態の位相差検出器11における一実施例(Type3)のCReW計算部112の処理例を示す図である。
3 (a) to 3 (c) are diagrams showing processing examples of the
CReW計算部112は、本質的に、複素成分を有するウェーブレット変換であるが、4象限の要素値を持つ矩形数列で表されるフィルタを構成し、これにより位相情報を付加してパワー及び正規化位相の計算コストを低減させる信号ベクトルに変換する点で、厳密には、一般的なウェーブレット変換とは相違している。
The
例えば、図3(a)及び図4(a)には、CReWフィルタの適用対象として、最大振幅aを持つ画像信号に含まれる周期N(N≧4の整数固定値)の信号成分を例に説明する。尚、図3(a)及び図4(a)では、説明の便宜上、最大振幅aを持つ矩形状の画像信号で正規化表示しているが、実信号(画素値)は正の値の種々の振幅を有する。 For example, in FIGS. 3 (a) and 4 (a), a signal component having a period N (an integer fixed value of N ≧ 4) included in an image signal having a maximum amplitude a is taken as an example of application of the CREW filter. explain. In FIGS. 3A and 4A, for convenience of explanation, a rectangular image signal having a maximum amplitude a is normalized and displayed, but the actual signal (pixel value) has various positive values. Has an amplitude of.
図3(a)及び図4(a)において、CReW計算部112による周波数成分の信号ベクトル計算の対象となる信号の長さ(画像の場合は一方向の画素数)をN、信号に含まれる周期Nの周波数成分の正規化位相(周波数成分の位相θを1周分の位相で除した値であり、θ′=1のとき信号周期のちょうど1周分で信号が変位する。)をθ′、パワー(最大振幅)をaとしている。このため、(N/2)の領域の信号成分は正の振幅a、他の(N/2)の領域{(θ’N)及び(N/2-θ’N)の領域}では負の振幅aの信号成分で表すことができる。
In FIGS. 3A and 4A, the length of the signal (the number of pixels in one direction in the case of an image) to be the target of the signal vector calculation of the frequency component by the
そして、図3(a)に示す信号成分に適用するType1のCReWフィルタの形状例を図3(b)に、図4(a)に示す信号成分に適用するType2のCReWフィルタの形状例を図4(b)に示している。Type1,Type2のいずれも信号の周期Nを4分割する4象限の要素値を持つ矩形数列で表され、実数成分と虚数成分が互い違いとなる(直行している)矩形波となるCReWフィルタとなっている。つまり、Type1では実数成分“1”と虚数成分“i”として表すと4象限の要素値を持つ矩形数列[1,i,-1,-i]で数列表現されたCReWフィルタとなっている。また、Type2では4象限の要素値を持つ矩形数列[1-i,1+i,-1+i,-1-i]で数列表現されたCReWフィルタとなっている。尚、図3(b)及び図4(b)において、CReWフィルタの振幅をbとする。
Then, the shape example of the CREW filter of
そして、図3(a)に示す信号成分に図3(b)に示すType1のCReWフィルタを適用して信号解析することで、図3(c)にて複素平面上に図示するように、周波数成分がその位相によってとり得る値(複素数)として、正方形の辺上の信号ベクトルを示すものとなる。図3(c)に示すType1の場合、原点を中心として、一辺がabN、各辺がそれぞれ実数軸又は虚数軸と平行な正方形となる。
Then, by applying the CREW filter of
また、図4(a)に示す信号成分に図4(b)に示すType2のCReWフィルタを適用して信号解析することで、図4(c)にて複素平面上に図示するように、周波数成分がその位相によってとり得る値(複素数)として、正方形の辺上の信号ベクトルを示すものとなる。図4(c)に示すType2の場合、原点を中心として、実数軸及び虚数軸上のabN、-abNをそれぞれ囲んだ正方形となる。
Further, by applying the CREW filter of
そして、対比する信号ベクトルの位相差φは、各信号ベクトルの正規化位相θ′の差で得られ、複素平面上にマッピングされた各信号ベクトルの正規化位相θ′の差を、マンハッタン距離により算出することができる。 The phase difference φ of the signal vectors to be compared is obtained by the difference of the normalized phase θ ′ of each signal vector, and the difference of the normalized phase θ ′ of each signal vector mapped on the complex plane is calculated by the Manhattan distance. Can be calculated.
通常、ウェーブレット変換のフィルタにおける振幅bは、一般的なウェーブレット変換の規則に基づくと、そのウェーブレット変換のフィルタの形状及び画像の解像度に応じて決定される。しかしながら、本発明に係るCReWフィルタでは、bの値の影響を受けないように位相成分を扱うため、実装上、b=1として差し支えない。換言すると、b=1とすることで、信号ベクトルが当該複素平面上の正方形の辺上を位相の値によって変位するようになり、より一層、処理コストが軽減されるという利点がある。 Generally, the amplitude b in the wavelet transform filter is determined according to the shape of the wavelet transform filter and the image resolution, based on the general wavelet transform rules. However, in the CREW filter according to the present invention, since the phase component is handled so as not to be affected by the value of b, b = 1 may be set in terms of mounting. In other words, by setting b = 1, the signal vector is displaced on the side of the square on the complex plane by the phase value, and there is an advantage that the processing cost is further reduced.
尚、比較例として、図5(a)乃至図5(c)には、それぞれフーリエ変換の処理例を示している。図5(a)には、上記の図3(a)及び図4(a)と同様の信号成分を例示している。そして、図5(a)に示す信号成分に適用するフーリエ変換のフィルタの形状例を図5(b)に示している。図5(b)に示すフーリエ変換の数列は、変数αに対する振幅bの複素数e-2πiα/Nを用いた例であり、4象限の要素値を持つ三角関数数列[e-2πi/N),e-4πi/N,e-6πi/N,e-8πi/N]で数列表現されたものとなる。 As comparative examples, FIGS. 5 (a) to 5 (c) show examples of Fourier transform processing. FIG. 5 (a) illustrates the same signal components as those in FIGS. 3 (a) and 4 (a) above. An example of the shape of the Fourier transform filter applied to the signal component shown in FIG. 5 (a) is shown in FIG. 5 (b). The Fourier transform sequence shown in FIG. 5 (b) is an example using a complex number e -2πi α / N having an amplitude b with respect to the variable α, and is a trigonometric function sequence [e -2π i / N) having element values in four quadrants. e -4πi / N , e -6πi / N , e -8πi / N ] is expressed as a sequence.
そして、図5(a)に示す信号成分に図5(b)に示すフーリエ変換のフィルタを適用して信号解析することで、図5(c)にて複素平面上に図示するように、周波数成分がその位相によってとり得る値(複素数)として、円周上の信号ベクトルを示すものとなる。図5(c)に示す例の場合、原点を中心として、実数軸及び虚数軸上で半径2abN/πで囲んだ円形となる。この場合も、実装上、b=1として扱うことで、信号ベクトルが当該複素平面上の円形で示す線分を位相の値によって走査するようになるが、図6を参照して以下に説明するように、処理コストの観点からは、本発明に係るCReWフィルタと比較して不利なものとなる。 Then, by applying the Fourier transform filter shown in FIG. 5 (b) to the signal component shown in FIG. 5 (a) and performing signal analysis, the frequency is shown on the complex plane in FIG. 5 (c). As a value (complex number) that the component can take depending on its phase, it indicates a signal vector on the circumference. In the case of the example shown in FIG. 5 (c), it is a circle surrounded by a radius of 2abN / π on the real number axis and the imaginary number axis with the origin as the center. In this case as well, by treating it as b = 1 in terms of mounting, the signal vector scans the line segment indicated by the circle on the complex plane by the phase value, which will be described below with reference to FIG. As described above, from the viewpoint of processing cost, it is disadvantageous as compared with the CREW filter according to the present invention.
図6(a)及び図6(b)は、それぞれ第1実施形態の位相差検出器11における一実施例(Type1,2)のCReW計算部112と、図5に示した比較例のフーリエ変換の処理コストを比較可能に示す図である。
6 (a) and 6 (b) show the
特に、図6(a)及び図6(b)は、パワーPと正規化位相θ’の処理コストをまとめて図示している。正規化位相はそれぞれ、周波数成分の実数成分、虚数成分の正負又は大小によって、各係数の値が変化する。 In particular, FIGS. 6 (a) and 6 (b) collectively illustrate the processing costs of the power P and the normalized phase θ'. In the normalized phase, the value of each coefficient changes depending on the positive / negative or magnitude of the real number component and the imaginary number component of the frequency component, respectively.
図6(a)に示すように、本発明に係るCReW計算部112は、Type1,2のいずれのCReWフィルタを用いた場合でも、複素数からそれに応じたパワー及び正規化位相の算出のために、数回の条件分岐(周波数成分の複素平面上の象限の検出)、条件分岐に応じてそれぞれ数回以内の絶対値計算と2のべき乗、そして1回の除算で実現できる。
As shown in FIG. 6 (a), the
特に、演算処理において、絶対値計算はビットレジスタの値の反転と加算で実現される。2のべき乗は、レジスタの値のシフトによって実現される。総じて、本発明に係るCReW計算部112は、Type1,2のいずれのCReWフィルタを用いることで、解像度の高い画像や周波数の高い映像に適用しても、処理コストが軽くなり、高速処理を可能とし、実装コストの上昇を抑制することができる。
In particular, in arithmetic processing, absolute value calculation is realized by inversion and addition of bit register values. The power of 2 is realized by shifting the value of the register. As a whole, the
一方、図6(b)に示すように、比較例のフーリエ変換では、数回の条件分岐(周波数成分の複素平面上の象限の検出)、条件分岐に応じてそれぞれ数回以内の絶対値計算と2のべき乗、そして1回の除算で実現できず、複雑な演算を必要とする。これは、一般的なウェーブレット変換を用いた場合も同様である。このため、本発明に係るCReW計算部112は、Type1,2で例示するようなCReWフィルタを用いることで、処理コストを軽減させることができる。
On the other hand, as shown in FIG. 6B, in the Fourier transform of the comparative example, the absolute value is calculated within several times depending on the conditional branching (detection of the quadrant on the complex plane of the frequency component) and the conditional branching. It cannot be realized by a power of 2 and a power of 2, and a single division, and requires complicated operations. This is also the case when a general wavelet transform is used. Therefore, the
尚、図6(a)等に示すType1,2で例示するCReWフィルタの数列表現において、実数成分“1”と虚数成分“i”として表すと4象限の要素値を持つ矩形数列[1,i,-1,-i]又は矩形数列[1-i,1+i,-1+i,-1-i]の要素順や配列は任意に入れ替えることができる。例えば、Type1の矩形数列を[-1,i,1,-i]とすることや、Type1の矩形数列を[1+i,1-i,-1+i,-1-i]とするなどにしても同様の処理結果及び効果が得られる。
In the sequence representation of the CREW filter illustrated by
図7(a)乃至図7(c)は、それぞれ本発明による第1実施形態の位相差検出器11におけるCReW計算部112のより具体的な処理例を示す図である。
7 (a) to 7 (c) are diagrams showing more specific processing examples of the
図7(a)に示すように、CReW計算部112は、まず、メモリ12から波長λ、分割ブロック数N及び変位座標xを示す座標算出情報を読み出し、当該変位座標xを基に画像処理部112から入力される2枚一組の撮像画像P1,P2の注目領域を定め、この注目領域を処理対象の画像とする。尚、画像位相差検出器11の作動開始時点では、当該変位座標xの値は計算されていないため、初期値としての当該変位座標xは変位量ゼロを示すものとする。
As shown in FIG. 7A, the
尚、CReW計算部112の処理対象とする画像は、処理コストのより一層の低減のため本例では操作部16からの指示に基づいて初期設定した被写体の注目領域を基にしているが、画像全体でもよい。
The image to be processed by the
そして、CReW計算部112は、当該波長λ及び分割ブロック数Nを基に、2枚一組の撮像画像P1,P2の注目領域の各々を波長λ/4で一方向(図示する例では横方向)にN個以上(図示する例ではN=6)のブロックに分割し各ブロックでそれぞれの総和(或いは、平均)を算出する。画像として見ると、一方向が非常に粗い6画素となる圧縮画像が生成される。このとき、各ブロックの幅は、使用するCReWフィルタの波長λの4分の1となる。ブロック4つで、CReWフィルタの長さと同等の信号長となる。
Then, the
続いて、図7(b)に示すように、CReW計算部112は、6ブロックの圧縮画像のうち連続する4ブロックの圧縮画像に対し、当該一方向(分割方向)に空間移動(走査)させて、CReWフィルタを適用する。つまり、例えば図3(b)に示されたType1であれば[1,i,-1,-i]の4要素で構成されるCReWフィルタを4ブロックの圧縮画像に適用する。また、図4(b)に示されたType2であれば[1-i,1+i,-1+i,-1-i]の4要素で構成されるCReWフィルタを4ブロックの圧縮画像に適用する。Type1,2のCReWフィルタのいずれの場合でも、ブロック数が3つ減少した値が得られる。
Subsequently, as shown in FIG. 7B, the
続いて、図7(c)に示すように、CReW計算部112は、縦方向の画素数×3種類の信号ベクトル(複素信号)に変換する。これにより実数成分3組と虚数成分3組よりなる画素のアドレスに応じた3種類の信号ベクトルが得られ、理想的には90°ずつ、位相回転した信号ベクトルとなる。つまり、N=4とすれば1つの信号ベクトルが得られ、N=5とすれば2つの信号ベクトルが得られ、N=6とすれば3つの信号ベクトルが得られる。このため、Nの値を大きくするほど(信号ベクトル数が多いほど)、1つの処理画像に対する特徴量表現として広範囲化することになるが、必要以上に多くしても実施目的にとって不要な信号ベクトルが得られ処理コストとして無駄が生じることになる。実験した結果では、N=6とするのが好適であることが分かっているが、N=4~8程度に設定することが好ましい。これにより、位相差検出の高精度化を維持しながら、信号列一つに対して数回(ブロック数分)の総和(或いは平均)の演算で済むようになるという利点がある。
Subsequently, as shown in FIG. 7 (c), the
CReW計算部112によって得られた1種類以上の信号ベクトルFは、図3(b)に示されたType1であれば図3(c)に示すように、図4(b)に示されたType2であれば図4(c)に示すように、複素平面上の正方形の辺上に、波長Nの周波数成分がマッピングされた状態と同等になり、図6(a)に示すように、パワーと正規化位相を示すものとなる。
If the signal vector F of one or more types obtained by the
このようにして、CReW計算部112によって得られた撮像画像P1に対する信号ベクトルFはメモリ12に一時記憶し位相差検出のための参照信号ベクトルF’として利用され、CReW計算部112によって得られた撮像画像P2に対する信号ベクトルFは位相差算出部113に出力される。
In this way, the signal vector F for the captured image P1 obtained by the
位相差算出部113は、撮像画像P1の1種類以上の参照信号ベクトルF’をメモリ12から読み出し、今回計算した撮像画像P2に対する1種類以上の信号ベクトルFと当該1種類以上の参照信号ベクトルF’とを種類毎に個別に比較して、被写体領域のサイズ変化を示すように位相差φを算出し、座標算出部114に出力する。尚、図3及び図4を参照して上述したように、位相差算出部113は、CReW計算によって得られる各信号ベクトルの位相差φを算出するにあたり、複素平面上にマッピングされた各信号ベクトルのマンハッタン距離により算出する。これにより、位相差φの算出に係る処理コストの低減に寄与するものとなる。
The phase
座標算出部114は、まず、メモリ12から波長λ及び変位座標xを示す座標算出情報を読み出し、当該変位座標x(初期値はゼロ)を基に画像処理部112から入力される2枚一組の撮像画像P1,P2の注目領域を較正する。続いて、座標算出部114は、位相差φの情報を撮像画像P2上の被写体の位置座標に合わせるために、位相差算出部113から得られる位相差φと当該波長λとを乗じて撮像画像P2上の被写体の変位座標(即ち注目領域の変位座標)xを算出し、変位座標xの情報を信号処理部13に出力するとともに、メモリ12に更新保持する。
The coordinate
信号処理部13は、位相差検出器11により時間的に連続して取得された2枚一組の撮像画像P1,P2を基にして検出されたその双方に映る被写体の位相差φに対応する変位座標xを用いて撮像画像P2から被写体領域を切り出し(区画表示)する。以後、信号処理部13は、1台の撮像カメラ10で時間的に連続して取得された撮像画像を逐次入力し、逐次入力される撮像画像から被写体領域を例えば方形状に囲むように切り出し、ディスプレイパネル等の表示部14に対し区画表示するか、又は当該切り出した画像領域を示す態様で記録部15に対し画像記録することを繰り返す。
The
(1台の撮像カメラによる被写体の追尾に係る処理例)
以下、より具体的に、図1に示す1台の撮像カメラ10による被写体の追尾に係る画像処理装置1の処理例を説明する。
(Example of processing related to tracking a subject with one image pickup camera)
Hereinafter, a processing example of the
図8は、本発明による第1実施形態の位相差検出器11及び信号処理部13を備える画像処理装置1の処理を示すフローチャートである。
FIG. 8 is a flowchart showing the processing of the
まず、操作部16から被写体の追尾開始(位相差検出の作動開始)の指示の基に、位相差検出器11は、主周波数検出部111により波長λを決定しメモリ12に保持する(ステップS1)。
First, the
続いて、位相差検出器11は、撮像カメラで取得した今回処理対象の画像Pnについて、CReW計算部112により、一方向に長さλ/4で分割し、それぞれ総和演算(或いは平均演算)を行う(ステップS2)。
Subsequently, the
続いて、位相差検出器11は、CReW計算部112により、画像Pnの周波数成分の信号ベクトルFを計算しメモリ12に保持する(ステップS3)。
Subsequently, the
続いて、位相差検出器11は、位相差算出部113により計算済みの参照信号ベクトルF’をメモリ12から読み出し(参照信号ベクトルF’がメモリ12に保持されていなければゼロとする)、今回計算した画像Pnの信号ベクトルFと参照信号ベクトルF’間の位相差φを計算する(ステップS4)。
Subsequently, the
ここで、位相差算出部113は、2種以上の信号ベクトルFと当該2種以上の参照信号ベクトルF’と求めるように構成しているときは、被写体領域のサイズ変化を示すように位相差φを算出することができる。
Here, when the phase
続いて、位相差検出器11は、座標算出部114によりφ*λによる画像Pn上の被写体の変位座標xを算出しメモリ12に更新保持するとともに、信号処理部13に出力する(ステップS5)。ここで、変位座標xは、上記の被写体領域のサイズ変化を示す情報を含めることができる。
Subsequently, the
続いて、信号処理部13は、変位座標xを基に画像Pnから被写体領域を切り出し、区画表示する(ステップS6)。ここで、変位座標xが、上記の被写体領域のサイズ変化を示す情報を含んでいるときは、被写体領域の切り出しに関して、当該注目領域のサイズを更新させることができる。例えば、時間的に連続する撮像画像がズーム等により画角が変化するような場合でも、これに追従して被写体領域の切り出し(区画表示)が可能となる。
Subsequently, the
以後、位相差検出器11は、操作部16からの終了の指示の有無を監視しており(ステップS7)、操作部16から終了の指示があるときは(ステップS7:Y)、被写体の追尾(位相差検出の作動)を停止して、その旨を信号処理部13に通知し、信号処理部13による切り出し(区画表示)処理を停止させる。
After that, the
一方、位相差検出器11は、操作部16から終了の指示が無いときは(ステップS7:N)、被写体の追尾(位相差検出の作動)を継続し、設計上必要であればその旨を信号処理部13に通知する。
On the other hand, the
被写体の追尾(位相差検出の作動)を継続する際、位相差検出器11は、ステップS2に移行してもよいが、ここではより好適な例として、ステップS8に移行する。
When continuing the tracking of the subject (operation of phase difference detection), the
具体的には、被写体の追尾(位相差検出の作動)を継続する際、位相差検出器11は、信号処理部13による切り出しに係る変位座標xの情報を基に、改めて当該画像Pnにおける当該切り出した被写体領域について、CReW計算部112により、一方向に長さλ/4で分割し、それぞれ総和演算(或いは平均演算)を行う(ステップS8)。
Specifically, when the tracking of the subject (operation of phase difference detection) is continued, the
続いて、位相差検出器11は、当該画像Pnにおける当該切り出した被写体領域について、CReW計算部112により改めて信号ベクトルF(ここでは、区別のために信号ベクトルFcと称する)を再計算する(ステップS9)。
Subsequently, the
続いて、位相差検出器11は、CReW計算部112により、信号ベクトルFcと計算済みの信号ベクトルFとを比較し(ステップS10)、信号ベクトルFcと信号ベクトルFとの差が閾値以下であるか否かを判定する(ステップS11)。信号ベクトルFcと信号ベクトルFとの差が閾値以下でなければ(ステップS11:N)、ステップS1に移行し、信号ベクトルFcと信号ベクトルFとの差が閾値以下であれば(ステップS11:Y)、ステップS12に移行する。
Subsequently, the
ステップS12に移行すると、位相差検出器11は、CReW計算部112により、撮像カメラ10で取得した新たに入力される画像Pnの解析のために、信号ベクトルFcを参照信号ベクトルF’としてメモリ12に更新保持して、ステップS2に移行する。
When the process proceeds to step S12, the
即ち、CReW計算部112は、当該位相差の検出を時間方向に連続する画像に対して継続的に行う際に、逐次、今回切り出された被写体領域で今回計算対象の画像の信号ベクトルFcを今回値として再計算し、前回切り出された被写体領域で計算した該今回計算対象の画像に対する前回値の信号ベクトルFと比較し、今回値の信号ベクトルFcと前回値の信号ベクトルFとの差が閾値以下であるか否かを判定する。そして、CReW計算部112は、当該閾値以下のときには今回値の信号ベクトルFcを次回の位相差の検出で対比する参照信号ベクトルF’として更新し、当該閾値以下でないときは参照信号ベクトルF’の更新は行わず、主周波数検出部111に対して、波長λを改めて算出させる処理を有するように構成することができる。
That is, when the
このように、CReW計算部112に対して、ステップS9乃至S12の処理を設けることで、位相差検出対象とする時間方向の一組の画像間で、被写体が急減に変化するような場合でも頑健に参照信号ベクトルF’及び被写体領域の更新が可能となる。
In this way, by providing the
尚、本実施形態の説明では、被写体の注目領域を1つ初期設定して、当該被写体の被写体領域を1つ切り出すようにして追跡する例を説明したが、複数の被写体の注目領域を初期設定して、複数の被写体領域を個別に切り出すように構成することもできる。この場合、時間的に連続する撮像画像間で、切り出される被写体領域によって更新される各被写体の注目領域には識別子を付与し、当該識別子に基づいて位相差の検出対象を識別するようにすればよい。 In the description of the present embodiment, an example has been described in which one attention area of a subject is initially set and one subject area of the subject is cut out for tracking, but the attention areas of a plurality of subjects are initially set. Then, it can be configured to cut out a plurality of subject areas individually. In this case, an identifier is assigned to the region of interest of each subject that is updated by the subject region that is cut out between the captured images that are continuous in time, and the phase difference detection target is identified based on the identifier. good.
このようにして、画像処理装置1は、図1に示す1台の撮像カメラ10による被写体の追尾処理を行う構成とすることができる。特に、一画像信号に対し複数種の信号ベクトルを用いる構成であれば、変位座標xに、上記の被写体領域のサイズ変化を示す情報を含めることができる。このため、被写体領域の切り出しに関して、当該注目領域のサイズを更新させることができる。例えば、図9に示すように、時刻t1の撮像画像Pn(t1)では破線で示す被写体Objについて切り出し区画表示した被写体領域がSQ(t1)であったときに、時間的に後続する時刻t2の撮像画像Pn(t2)では実線で示す被写体Objについて切り出し区画表示した被写体領域がSQ(t2)のように切り出す被写体領域のサイズを変化させながら追跡することも可能となる。
In this way, the
尚、図8に示す処理を応用して、被写体の移動量とフレーム数から被写体の画像上の移動速度の検出も可能となる。 By applying the process shown in FIG. 8, it is possible to detect the moving speed of the subject on the image from the moving amount of the subject and the number of frames.
以上のように、本実施形態の位相差検出器11によれば、低処理コストで撮影環境に依らず安定し高精度で位相差を検出することができる。
As described above, according to the
図10は、本発明による第1実施形態の位相差検出器11を備える画像処理装置1の動作とその作用・効果を示す図である。図10に示すように、背景を持つ被写体が撮像された元画像に対し、CReW計算部112による処理過程で一方向に総和(或いは平均化)した圧縮画像は、元画像の「変位なし」、「右変位(位相が進む)」、及び「左変位(位相が戻る)」に応じて輝度分布の高低が大まかに変化する(撮影環境に依らず安定)。この圧縮画像に対し、CReW計算部112により、例えばType2のCReWフィルタを適用すると、例えばCReWフィルタの振幅b=1の場合でも、図示するように、複素平面上の信号ベクトルは元画像の「変位なし」、「右変位(位相が進む)」、及び「左変位(位相が戻る)」に応じて顕著に位相変化する。そして、元画像の「変位なし」、「右変位(位相が進む)」、及び「左変位(位相が戻る)」に応じた位相差を、低処理コストで、且つ高精度で検出できる。
FIG. 10 is a diagram showing the operation of the
そして、本発明によれば、パワーと正規化位相を示す信号ベクトルを評価値として用いるため、従来技法のような式(数1)に基づく評価値による位相差画像のずらし幅kの有効桁数よりも高い有効桁数の評価値とすることができる。これにより、本実施形態の位相差検出器11によれば、位相差検出を高精度化し、且つ実装コストを低く抑えることができる。更に、本実施形態の位相差検出器11は、被写体の画像上の移動速度の検出や被写体の動きの追跡を行う用途に限らず、被写体の動的変化の検出(物体の動的歪み検査など)、時間方向の一組の画像から被写体の位置のずれを示す位相差の検出を利用できる任意の用途に適用できる。
According to the present invention, since the signal vector indicating the power and the normalized phase is used as the evaluation value, the number of significant digits of the shift width k of the phase difference image by the evaluation value based on the equation (Equation 1) as in the conventional technique. It can be an evaluation value with a higher number of significant digits. As a result, according to the
〔第2実施形態〕
図11は、本発明による第2実施形態の位相差検出器11、及びこれを備える画像処理装置1の概略構成を示すブロック図である。尚、第1実施形態と同様な構成要素には同一の参照番号を付している。本実施形態の画像処理装置1は、2台の撮像カメラ10R,10Lを空間的に並べて同時・同方向に撮像を行う両眼カメラ10RLで空間的に同時・同方向取得された2枚一組の撮像画像を入力し、位相差検出器11により、その入力される空間方向の2枚一組の撮像画像を基にして、その双方に映る被写体の位相差を検出することで、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を検出する装置として構成される。
[Second Embodiment]
FIG. 11 is a block diagram showing a schematic configuration of a
(両眼カメラ)
まず、本実施形態に係る両眼カメラ10RLを構成する各撮像カメラ10R,10Lは、それぞれ同性能の撮像レンズ101、撮像素子102、及び画像処理部103を備える。
(Binocular camera)
First, each of the
本実施形態に係る撮像レンズ101は、被写体を撮像素子102に結像するため光学レンズであり、自動焦点可能に駆動されるものでもよいが、ここでは、所望の被写体に焦点が合致した状態を例に説明する。 The image pickup lens 101 according to the present embodiment is an optical lens for forming an image of a subject on the image pickup element 102, and may be driven so as to be able to automatically focus. However, here, a state in which the focus is on a desired subject is set. Let's take an example.
本実施形態に係る撮像素子102は、複数の画素からなる撮像部を有し、その撮像部内に遮光部分が異なる(一般的には左右や上下で対称となる)位相差検出画素を有していてもよいが、ここでは、そのような位相差検出画素を有していない例を説明する。 The image pickup device 102 according to the present embodiment has an image pickup unit composed of a plurality of pixels, and has phase difference detection pixels having different light-shielding portions (generally symmetrical in the left-right and up-down directions) in the image pickup unit. However, here, an example of not having such a phase difference detection pixel will be described.
本実施形態に係る画像処理部103は、撮像素子102から得られる被写体が撮像された撮像画像をフレーム単位で逐次形成し、信号処理部13及び位相差検出器11に出力する。特に、各撮像カメラ10R,10Lにおける画像処理部103は、画像位相差検出器11の作動開始時点で、それぞれの撮像素子102から得られる被写体が撮像された撮像画像Pr,Plを形成して信号処理部13及び位相差検出器11に出力する。
The
(画像処理装置)
画像処理装置1は、第1実施形態と同様に、位相差検出器11、メモリ12、及び信号処理部13を備え、位相差検出器11は時間方向でなく空間方向の2枚一組の撮像画像を扱う点を除き、第1実施形態とほぼ同様に動作する。
(Image processing device)
Similar to the first embodiment, the
位相差検出器11は、操作部16からの指示に基づいて被写体の注目領域(縦、横、斜めを問わない)を1以上初期設定して作動を開始し、両眼カメラ10RLで空間的に同時・同方向取得された2枚一組の撮像画像を入力し、その双方に映る被写体の位相差を検出する機能部である。被写体の注目領域の初期設定は、操作者が任意位置を指定するか、或いは撮像画像の中央領域など予め定めた範囲とすることができる。画像位相差検出器11の作動開始時点で、初期設定された被写体の注目領域は、以後の画像位相差検出器11の作動により動的に座標算出されて、被写体を例えば方形状に囲むように切り出される。
The
メモリ12は、信号処理部13の処理に必要な撮像画像Pr,Plを逐次更新しながら一時記憶する機能、及び当該位相差検出器11の処理に必要な各信号値を一時記憶する機能を有する。本例のメモリ12には、両眼カメラ10RLを構成する各撮像カメラ10R,10Lの配置情報が操作部16を介して予め設定されて格納されている。
The
信号処理部13は、位相差検出器11により、空間的に同時・同方向取得された2枚一組の撮像画像Pr,Plを基にして検出されたその双方に映る被写体の位相差φに対応する変位座標xを用いて各撮像画像Pr,Plから被写体領域を切り出し、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を演算により検出する機能部である。このため、信号処理部13は、両眼カメラ10RLで空間的に同時・同方向取得された2枚一組の撮像画像Pr,Plを逐次入力し、その撮像画像Pr,Plを逐次更新しながらメモリ12に一時記憶する。そして、例えば、信号処理部13は、逐次入力される撮像画像から被写体領域を例えば方形状に囲むように切り出し、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を検出することを繰り返す。両眼カメラ10RLから各被写体までの距離は、両眼カメラ10RLの撮像カメラ10R,10L間距離及び画角を含む各撮像カメラ10R,10Lの配置情報と、位相差検出器11により算出される位相差φ(対比する信号ベクトルの正規化位相θ′の差)を基に、演算により求めることができる。
The
以下より具体的に、位相差検出器11及び画像処理装置1について詳細に説明する。
More specifically, the
(位相差検出器)
図11に示すように、本実施形態の位相差検出器11は、第1実施形態と同様に、主周波数検出部111、CReW計算部112、位相差算出部113、及び座標算出部114を備える。
(Phase difference detector)
As shown in FIG. 11, the
主周波数検出部111は、画像位相差検出器11の作動開始時点で、撮像画像Pr,Plのいずれか一方又は双方の主周波数の波長λを算出するよう動作する。つまり、主周波数検出部111は、画像位相差検出器11の作動開始時点で画像処理部103から入力される撮像画像Pr,Plの注目領域について、上述した図2を参照して例示する周波数成分検出を行い、撮像画像Pr,Plのパワー(画素値の振幅)が最大となる主周波数の波長λを算出し、その波長λをメモリ12に一時記憶する。撮像画像Pr,Plのいずれか一方の算出でよいが、双方の主周波数の波長λを算出するときは、その平均値を用いる。
The main
CReW計算部112は、まず、メモリ12から波長λ、分割ブロック数N及び両眼カメラ10RLを構成する各撮像カメラ10R,10Lの配置情報を示す座標算出情報を読み出し、当該各撮像カメラ10R,10Lの配置情報を基に画像処理部112から入力される2枚一組の撮像画像Pr,Plの注目領域を較正し、当該波長λを基に2枚一組の撮像画像Pr,Plの注目領域の各々を波長λ/4で一方向にNブロック以上(N≧4の整数固定値)に分割しそれぞれの総和(或いは、平均)を算出することで、分割方向にN画素となる圧縮画像を生成する。
The
尚、例えば撮像カメラ10Rから撮像画像Prに対して、操作部16からの指示に基づいて被写体の注目領域を1以上初期設定することで、撮像カメラ10Lから撮像画像Plに対して、各撮像カメラ10R,10Lの配置情報に従い、対応する被写体の注目領域の設定を較正することができる。尚、各撮像カメラ10R,10Lの注目領域は、被写体に対して厳格に一致させる必要はない。
For example, by initializing one or more areas of interest of the subject based on the instruction from the
そして、CReW計算部112は、2枚一組の撮像画像Pr,Plの注目領域の各々における分割・圧縮方向にN画素となる圧縮画像に対して、当該方向に少なくとも4象限の要素値を持つ矩形数列で表される複素矩形数列(CReWフィルタ)を基底とする複素矩形ウェーブレット変換(CReW)を施し、右眼画像用と左眼画像用として、複素(実数成分及び虚数成分)の周波数成分の信号ベクトルFr,Flをそれぞれ1種類以上生成して、位相差算出部113に出力する。
Then, the
本実施形態におけるCReW計算部112の処理自体は、上述した第1実施形態と同様であり、Type1,2のいずれかのCReWフィルタとすることができる。
The processing itself of the
尚、CReW計算部112の処理対象とする画像は、処理コストのより一層の低減のため本例では操作部16からの指示に基づいて初期設定した被写体の注目領域を基にしているが、画像全体でもよい。
The image to be processed by the
位相差算出部113は、今回計算した各撮像画像Pr,Plに対する1種類以上の信号ベクトルFr,Flを個別に比較して、1以上の被写体の注目領域毎に位相差φを算出し、座標算出部114に出力する。尚、図3及び図4を参照して上述したように、位相差算出部113は、CReWフィルタによって得られる各信号ベクトルの位相差φを算出するにあたり、複素平面上にマッピングされた各信号ベクトルのマンハッタン距離により算出する。これにより、位相差φの算出に係る処理コストの低減に寄与するものとなる。
The phase
座標算出部114は、まず、メモリ12から波長λ及び両眼カメラ10RLを構成する各撮像カメラ10R,10Lの配置情報を示す座標算出情報を読み出し、設計上必要であれば当該各撮像カメラ10R,10Lの配置情報を基に画像処理部112から入力される2枚一組の撮像画像Pr,Plの注目領域を較正する。続いて、座標算出部114は、位相差φの情報を撮像画像Pr,Plの各注目領域の座標上のずれ量に復元するために、位相差算出部113から得られる1以上の被写体の注目領域毎に位相差φと当該波長λとを乗じて撮像画像Pr,Pl上の被写体の変位座標(即ち注目領域の変位座標)xを算出し、変位座標xの情報を信号処理部13に出力するとともに、メモリ12に更新保持する。
The coordinate
信号処理部13は、位相差検出器11により空間的に同時・同方向取得された2枚一組の撮像画像Pr,Plを基にして検出されたその双方に映る1以上の被写体の注目領域毎に位相差φに対応する変位座標xを用いて各撮像画像Pr,Plから被写体領域を切り出し(区画表示)、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を演算により検出する。尚、信号処理部13は、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を演算により検出する際に、メモリ12から各撮像カメラ10R,10Lの配置情報を読み出して演算する(図11では図示略)。
The
以後、信号処理部13は、両眼カメラ10RLを構成する各撮像カメラ10R,10Lで空間的に同時・同方向取得された各撮像画像を逐次入力し、逐次入力される撮像画像から被写体領域を例えば方形状に囲むように切り出し、上記の距離や空間的な位置を示す情報を付与して、ディスプレイパネル等の表示部14に対し区画表示するか、又は当該切り出した画像領域を示す態様で記録部15に対し画像記録することを繰り返す。
After that, the
(両眼カメラによる距離測定に係る処理例)
以下、より具体的に、図11に示す両眼カメラ10RLによる当該撮像カメラ10R,10Lと被写体との距離測定に係る画像処理装置1の処理例を説明する。
(Processing example related to distance measurement with a binocular camera)
Hereinafter, a processing example of the
図12は、本発明による第2実施形態の位相差検出器11及び信号処理部13を備える画像処理装置1の処理を示すフローチャートである。
FIG. 12 is a flowchart showing the processing of the
まず、操作部16から被写体との距離測定開始(位相差検出の作動開始)の指示の基に、位相差検出器11は、主周波数検出部111により波長λを決定しメモリ12に保持する(ステップS21)。
First, the
続いて、位相差検出器11は、両眼カメラ10RLで取得した今回処理対象の撮像画像Pr,Plの各注目領域について、CReW計算部112により、一方向に長さλ/4で分割し、それぞれ総和演算(或いは平均演算)を行う(ステップS22)。
Subsequently, the
続いて、位相差検出器11は、CReW計算部112により、撮像画像Pr,Plの各注目領域の周波数成分の信号ベクトルFr,Flを計算しメモリ12に保持する(ステップS23)。
Subsequently, the
続いて、位相差検出器11は、位相差算出部113により、撮像画像Pr,Plの各注目領域毎の周波数成分の信号ベクトルFr,Fl間の位相差φを計算する(ステップS24)。
Subsequently, the
ここで、位相差算出部113は、第1実施形態と同様に、2種以上の信号ベクトルFrと当該2種以上の参照信号ベクトルFlと求めるように構成しているときは、被写体領域のサイズ変化を示すように位相差φを算出することができる。
Here, when the phase
続いて、位相差検出器11は、座標算出部114により両眼カメラ10RLにおける各撮像カメラ10R,10Lの配置情報と、φ*λに基づいて、よる画像Pn上の被写体の変位座標xを算出し、信号処理部13に出力する(ステップS25)。ここで、変位座標xは、上記の被写体領域のサイズ変化を示す情報を含めることができる。
Subsequently, the
続いて、信号処理部13は、変位座標xを用いて各撮像画像Pr,Plから被写体領域を切り出し、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を演算により検出する(ステップS26)。ここで、変位座標xが、上記の被写体領域のサイズ変化を示す情報を含んでいるときは、被写体領域の切り出しに関して、当該注目領域のサイズを更新させることができる。例えば、時間的に連続する撮像画像がズーム等により画角が変化するような場合でも、これに追従して被写体領域の切り出し(区画表示)が可能となる。
Subsequently, the
以後、位相差検出器11は、操作部16からの終了の指示の有無を監視しており(ステップS27)、操作部16から終了の指示があるときは(ステップS27:Y)、被写体との距離測定(位相差検出の作動)を停止して、その旨を信号処理部13に通知し、信号処理部13による切り出し(区画表示)処理を停止させる。
After that, the
一方、位相差検出器11は、操作部16から終了の指示が無いときは(ステップS27:N)、被写体との距離測定(位相差検出の作動)を継続し、設計上必要であればその旨を信号処理部13に通知する。
On the other hand, when the
被写体との距離測定(位相差検出の作動)を継続する際、位相差検出器11は、ステップS2に移行し、継続中はメモリ12に保持される波長λを使用し続けてもよいが、本例では、ズーム等の画角の変更にも適応的に対応するためにステップS1に移行する。
When continuing the distance measurement with the subject (operation of phase difference detection), the
このようにして、画像処理装置1は、図11に示す両眼カメラ10RLによる被写体との距離測定処理を行う構成とすることができる。特に、一画像信号に対し複数種の信号ベクトルを用いる構成であれば、変位座標xに、上記の被写体領域のサイズ変化を示す情報を含めることができる。このため、被写体領域の切り出しに関して、当該注目領域のサイズを更新させることができる。また、撮像画像内の複数の被写体に対して距離測定を行うことができる。例えば、図13に示すように、撮像カメラ10Rの撮像画像Pr(又は撮像カメラ10Lの撮像画像Pl)において、複数の被写体Obj1,Obj2,Obj3について個別に切り出し区画表示した被写体領域SQ1,SQ2,SQ3の各々を測距領域1,2,3としてそれぞれ距離測定を行うことができる。従って、被写体に係る物理的な距離測定処理の1つとして、両眼カメラ10RLを構成する該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を検出するものとして構成することができる。
In this way, the
また、第2実施形態において、両眼カメラ10RLの代わりに、撮像レンズを駆動制御可能な撮像カメラとし、その撮像素子の画素部に遮光部分が異なる(一般的には左右や上下で対称となる)位相差検出画素を設けたものとすることで、被写体に係る物理的な距離測定処理の1つとして、位相差検出器11を同様な処理で自動焦点調節のための位相差を検出するものとして構成することができる。
Further, in the second embodiment, instead of the binocular camera 10RL, an image pickup lens is used as a drive-controllable image pickup camera, and the light-shielding portion is different in the pixel portion of the image pickup element (generally, it is symmetrical in the left-right and up-down directions). ) By providing the phase difference detection pixel, as one of the physical distance measurement processes relating to the subject, the
そして、第2実施形態に係る位相差検出器11は、第1実施形態と実質的に同様な動作であるため、第1実施形態と同様、低処理コストで撮影環境に依らず安定し高精度で位相差を検出することができる。
Since the
以上、特定の実施形態の例を挙げて本発明を説明したが、本発明は前述した例に限定されるものではなく、その技術思想を逸脱しない範囲で種々変形可能である。例えば、上述した各実施形態では、CReW計算部112は、空間的に一方向を対象とした一次元のCReWフィルタを例に説明したが、空間的に二方向を対象とした二次元のCReWフィルタ、及び該二方向に加え時間方向を含む三次元以上のCReWフィルタとすることができる。
Although the present invention has been described above with reference to examples of specific embodiments, the present invention is not limited to the above-mentioned examples, and can be variously modified without departing from the technical idea. For example, in each of the above-described embodiments, the
また、上述した各実施形態では、CReW計算部112において、処理コストと動作の安定化のために、圧縮画像を生成してからCReW計算を行う好適例を説明したが、CReW計算部112において上記の圧縮画像を生成せずに非圧縮の処理対象画像に対して直接的に、上記の複素矩形ウェーブレット(CReWフィルタ)の各要素値をλ/4個ずつ連続させてCReWフィルタを冗長化させたCReW計算を行うことで、圧縮画像を生成する場合と同等の信号ベクトルを得ることができる。この場合、例えばシリアル的に画素値が得られるシステム(ハードウェア上)で当該非圧縮画像の画素値をバッファせずに逐次加減算することができる。
Further, in each of the above-described embodiments, a preferred example in which the
また、上述した各実施形態では、特定の用途について詳細に説明したが、本発明に係る位相差検出器11は、時間方向又は空間方向の一組の画像から被写体の位置のずれを示す位相差を利用可能とする用途であれば、種々の用途に利用できる。
Further, in each of the above-described embodiments, the specific use has been described in detail, but the
本発明によれば、低処理コストで撮影環境に依らず安定し高精度で位相差を検出することができるので、時間方向又は空間方向の一組の画像から被写体の位置のずれを示す位相差を利用可能とする用途に有用である。 According to the present invention, since the phase difference can be detected stably and with high accuracy regardless of the shooting environment at a low processing cost, the phase difference indicating the deviation of the position of the subject from a set of images in the time direction or the space direction. It is useful for applications that make it available.
1 画像処理装置
10 撮像カメラ
10RL 両眼カメラ
10R 右眼用撮像カメラ
10L 左眼用撮像カメラ
11 位相差検出器
12 メモリ
13 信号処理部
14 表示部
15 記録部
16 操作部
101 撮像レンズ
102 撮像素子
103 画像処理部
111 主周波数検出部
112 複素矩形ウェーブレット変換(CReW)計算部
113 位相差検出部
114 座標算出部
1
Claims (13)
前記一組の画像の各注目領域における画像信号の主周波数の波長を検出する主周波数検出手段と、
前記一組の画像の各注目領域の画像信号をそれぞれ処理対象画像とし、前記波長を基に該処理対象画像に対して複素矩形ウェーブレット変換(CReW)を施し、前記一組の画像の各注目領域の画像信号に関する複素の周波数成分の信号ベクトルを生成するCReW計算手段と、
前記一組の画像の各注目領域の信号ベクトルを比較して位相差を算出する位相差算出手段と、
当該算出した位相差を基に、前記一組の画像のうち少なくとも一方の注目領域における被写体の変位座標を算出する座標算出手段と、
を備えることを特徴とする位相差検出器。 A phase difference detector that detects a phase difference indicating a shift in the position of a subject from a set of images in the temporal or spatial direction.
A main frequency detecting means for detecting the wavelength of the main frequency of the image signal in each region of interest of the set of images,
The image signal of each attention region of the set of images is used as the processing target image, and the complex rectangular wavelet transform (CREW) is applied to the processing target image based on the frequency, and each attention region of the set of images is applied. A CREW calculation means that generates a signal vector of complex frequency components related to the image signal of
A phase difference calculation means for calculating the phase difference by comparing the signal vectors of each region of interest of the set of images, and
Based on the calculated phase difference, a coordinate calculation means for calculating the displacement coordinates of the subject in at least one of the attention regions of the set of images, and a coordinate calculation means.
A phase difference detector characterized by comprising.
前記主周波数検出手段は、当該位相差を逐次検出する際の初期値として前記波長を算出する手段、及び、前記CReW計算手段によって生成する当該信号ベクトルのパワーを監視し、該信号ベクトルのパワーが予め定められた範囲を外れた場合に、前記波長を改めて算出する手段を有することを特徴とする、請求項1から8のいずれか一項に記載の位相差検出器。 The phase difference detector is configured to sequentially detect the phase difference from continuous images in the time direction.
The main frequency detecting means monitors the means for calculating the wavelength as an initial value when sequentially detecting the phase difference and the power of the signal vector generated by the CREW calculating means, and the power of the signal vector is used. The phase difference detector according to any one of claims 1 to 8, further comprising means for recalculating the wavelength when the wavelength deviates from a predetermined range.
前記CReW計算手段は、当該位相差の検出を時間方向に連続する画像に対して継続的に行う際に、逐次、信号ベクトルを今回値として再計算して前回値の信号ベクトルと比較し、今回値の信号ベクトルと前回値の信号ベクトルとの差が閾値以下であるか否かを判定し、当該閾値以下のときには今回値の信号ベクトルを次回の位相差の検出で対比する参照信号ベクトルとして更新し、閾値以下でないときは当該参照信号ベクトルの更新は行わず、前記主周波数検出手段に対して、前記波長を改めて算出させる処理を有することを特徴とする、請求項1から9のいずれか一項に記載の位相差検出器。 The phase difference detector is configured to sequentially detect the phase difference from continuous images in the time direction.
When the CREW calculation means continuously detects the phase difference for continuous images in the time direction, the signal vector is sequentially recalculated as the current value and compared with the signal vector of the previous value, and this time. It is determined whether or not the difference between the value signal vector and the previous value signal vector is less than or equal to the threshold value, and if it is less than or equal to the threshold value, the current value signal vector is updated as a reference signal vector to be compared in the next phase difference detection. However, if it is not equal to or less than the threshold value, the reference signal vector is not updated, and the main frequency detecting means has a process of recalculating the wavelength, which is any one of claims 1 to 9. The phase difference detector described in the section.
該位相差を基に、被写体の画像上の移動速度の検出処理、又は被写体の動きの追跡処理、或いは被写体の動的変化の検出を行う信号処理手段と、
を備えることを特徴とする画像処理装置。 The phase difference detector according to any one of claims 1 to 10, which is configured to sequentially detect the phase difference from images continuous in the time direction.
A signal processing means for detecting the moving speed of the subject on the image, tracking the movement of the subject, or detecting the dynamic change of the subject based on the phase difference.
An image processing device characterized by comprising.
該位相差を基に、被写体に係る物理的な距離測定処理を行う信号処理手段と、
を備えることを特徴とする画像処理装置。 The phase difference detector according to any one of claims 1 to 10, which is configured to sequentially detect the phase difference from a set of images simultaneously and simultaneously captured in the spatial direction.
A signal processing means that performs physical distance measurement processing related to the subject based on the phase difference, and
An image processing device characterized by comprising.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018101403A JP7057717B2 (en) | 2018-05-28 | 2018-05-28 | Phase difference detector, image processing device, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018101403A JP7057717B2 (en) | 2018-05-28 | 2018-05-28 | Phase difference detector, image processing device, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019207464A JP2019207464A (en) | 2019-12-05 |
| JP7057717B2 true JP7057717B2 (en) | 2022-04-20 |
Family
ID=68768576
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018101403A Active JP7057717B2 (en) | 2018-05-28 | 2018-05-28 | Phase difference detector, image processing device, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7057717B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11544935B2 (en) | 2020-02-26 | 2023-01-03 | Honda Motor Co., Ltd. | System for risk object identification via causal inference and method thereof |
| US11458987B2 (en) | 2020-02-26 | 2022-10-04 | Honda Motor Co., Ltd. | Driver-centric risk assessment: risk object identification via causal inference with intent-aware driving models |
| CN121048642B (en) * | 2025-11-05 | 2026-02-24 | 江苏拓邮信息智能技术研究院有限公司 | A Robot Trajectory Prediction Method Based on Time-Frequency Wavelet Transform and Graph Network |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004145466A (en) | 2002-10-22 | 2004-05-20 | Lasertec Corp | Position shift detection method, position shift detection apparatus, image processing method, image processing apparatus, and inspection apparatus using the same |
| JP2005055931A (en) | 2001-07-05 | 2005-03-03 | Advantest Corp | Image processor and image processing method |
| JP2011158383A (en) | 2010-02-02 | 2011-08-18 | Yamatake Corp | Positional deviation measuring device, positional deviation measuring method, and positional deviation measuring program |
| JP2011221788A (en) | 2010-04-09 | 2011-11-04 | Konica Minolta Holdings Inc | Image processing apparatus, image processing program, information processing apparatus, and information processing program |
| US20180018451A1 (en) | 2016-07-14 | 2018-01-18 | Magic Leap, Inc. | Deep neural network for iris identification |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH10198657A (en) * | 1997-01-08 | 1998-07-31 | Toshiba Corp | Signal processing device |
-
2018
- 2018-05-28 JP JP2018101403A patent/JP7057717B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005055931A (en) | 2001-07-05 | 2005-03-03 | Advantest Corp | Image processor and image processing method |
| JP2004145466A (en) | 2002-10-22 | 2004-05-20 | Lasertec Corp | Position shift detection method, position shift detection apparatus, image processing method, image processing apparatus, and inspection apparatus using the same |
| JP2011158383A (en) | 2010-02-02 | 2011-08-18 | Yamatake Corp | Positional deviation measuring device, positional deviation measuring method, and positional deviation measuring program |
| JP2011221788A (en) | 2010-04-09 | 2011-11-04 | Konica Minolta Holdings Inc | Image processing apparatus, image processing program, information processing apparatus, and information processing program |
| US20180018451A1 (en) | 2016-07-14 | 2018-01-18 | Magic Leap, Inc. | Deep neural network for iris identification |
Non-Patent Citations (1)
| Title |
|---|
| 笠谷 弘樹、外2名,"ビデオ画像における高精度動き検出と超解像",映像情報メディア学会技術報告,日本,(社)映像情報メディア学会,2010年02月27日,Vol.34, No.10,pp.93-96 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019207464A (en) | 2019-12-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3539788B2 (en) | Image matching method | |
| JP6395506B2 (en) | Image processing apparatus and method, program, and imaging apparatus | |
| KR101233013B1 (en) | Image photographing device, distance computing method for the device, and focused image acquiring method | |
| US10638109B2 (en) | Method for the FPGA-based long range multi-view stereo with differential image rectification | |
| US8995753B2 (en) | Stereo distance measurement apparatus and stereo distance measurement method | |
| KR100938195B1 (en) | Method for distance estimation and apparatus for the same using a stereo matching | |
| JP2014038151A (en) | Imaging apparatus and phase difference detection method | |
| WO2015050008A1 (en) | Imaging device and method for operating imaging device | |
| JP2015100066A (en) | Imaging apparatus, control method therefor, and program | |
| WO2014073670A1 (en) | Image processing method and image processing device | |
| JP7057717B2 (en) | Phase difference detector, image processing device, and program | |
| JP7378219B2 (en) | Imaging device, image processing device, control method, and program | |
| JPWO2012176556A1 (en) | Corresponding point search device and distance measurement device | |
| JP6494402B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
| JP6564284B2 (en) | Image processing apparatus and image processing method | |
| JP2015230703A (en) | Object detection device and object detection method | |
| JP2008216126A (en) | Distance image generating device, distance image generation method, and program | |
| JP7214368B2 (en) | Image processing device, imaging device, image processing method, program and recording medium | |
| JP5219024B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
| US10198617B2 (en) | Image-acquisition apparatus | |
| JP4069468B2 (en) | Image forming device | |
| JP2018074362A (en) | Image processing apparatus, image processing method, and program | |
| US10523861B2 (en) | Defocus estimation method independent of the scene content and use in an autofocus system | |
| JP6595858B2 (en) | Image processing apparatus and image processing method | |
| JP6818734B2 (en) | Image processing equipment, imaging equipment, image processing methods and programs |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210426 |
|
| TRDD | Decision of grant or rejection written | ||
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220310 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20220315 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220408 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7057717 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |