Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7057717B2 - Phase difference detector, image processing device, and program - Google Patents
[go: Go Back, main page]

JP7057717B2 - Phase difference detector, image processing device, and program - Google Patents

Phase difference detector, image processing device, and program Download PDF

Info

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
Application number
JP2018101403A
Other languages
Japanese (ja)
Other versions
JP2019207464A (en
Inventor
大輝 岡本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Priority to JP2018101403A priority Critical patent/JP7057717B2/en
Publication of JP2019207464A publication Critical patent/JP2019207464A/en
Application granted granted Critical
Publication of JP7057717B2 publication Critical patent/JP7057717B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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.

Figure 0007057717000001
Figure 0007057717000001

上記の式(数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 Patent Document 2, a plurality of types of complex filters are applied to two patterns to be collated, and pattern matching is performed based on a feature amount to which not only pixel value information but also phase information is added. It enables accurate position shift measurement.

特開2018-022128号公報Japanese Unexamined Patent Publication No. 2018-022128 特許5558127号明細書Japanese Patent No. 5558127

上述したように、従来の画像の位相差を検出する技法として、上記の式(数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 Patent Document 2 can improve the detection accuracy of the phase difference by adding the feature amount to which not only the pixel value information but also the phase information is added, but it is multiplied by a plurality of types of complex filters. Therefore, complicated conditional branching and calculation are required, and the processing cost itself increases, which causes problems such as an increase in device cost.

しかし、従来の画像の位相差を検出する技法は、いずれも長所と短所がある。このため、撮像カメラの解像度の高低によらず、且つ色情報が少ない環境でも当該位相差の検出精度の差異を殆ど生じさせることなく、低処理コストで、当該位相差の検出精度を向上させる技法が望まれる。例えばテレビカメラ等、多様な環境での使用が想定される撮像カメラでは、撮像環境によらず低処理コストで、上記の式(数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.

本発明による第1実施形態の位相差検出器、及びこれを備える画像処理装置の概略構成を示すブロック図である。It is a block diagram which shows the schematic structure of the phase difference detector of 1st Embodiment by this invention, and the image processing apparatus provided with this. (a)乃至(e)は、それぞれ第1実施形態の位相差検出器における主周波数検出部の処理例を示す図である。FIGS. (A) to (e) are diagrams showing processing examples of the main frequency detection unit in the phase difference detector of the first embodiment, respectively. (a)乃至(c)は、それぞれ第1実施形態の位相差検出器における一実施例(Type1)の複素矩形ウェーブレット変換(CReW:Complex Rectangular Wavelet Transform)計算部の処理例を示す図である。(A) to (c) are diagrams showing a processing example of a complex rectangular wavelet transform (CReW: Complex Rectangular Wavelet Transform) calculation unit of one embodiment (Type 1) in the phase difference detector of the first embodiment, respectively. (a)乃至(c)は、それぞれ第1実施形態の位相差検出器における一実施例(Type2)の複素矩形ウェーブレット変換(CReW)計算部の処理例を示す図である。FIGS. (A) to (C) are diagrams showing processing examples of the complex rectangular wavelet transform (CReW) calculation unit of the first embodiment (Type 2) in the phase difference detector of the first embodiment, respectively. (a)乃至(c)は、それぞれ比較例のフーリエ変換の処理例を示す図である。(A) to (c) are diagrams showing a processing example of the Fourier transform of the comparative example, respectively. (a)及び(b)は、それぞれ第1実施形態の位相差検出器における一実施例(Type1,2)の複素矩形ウェーブレット変換(CReW)計算部と、比較例のフーリエ変換の処理コストを比較可能に示す図である。(A) and (b) compare the processing cost of the complex rectangular wavelet transform (CReW) calculation unit of the first embodiment (Type 1 and 2) and the Fourier transform of the comparative example in the phase difference detector of the first embodiment, respectively. It is a figure which shows as possible. (a)乃至(c)は、それぞれ本発明による第1実施形態の位相差検出器における複素矩形ウェーブレット変換(CReW)計算部のより具体的な処理例を示す図である。(A) to (c) are diagrams showing more specific processing examples of the complex rectangular wavelet transform (CREW) calculation unit in the phase difference detector of the first embodiment according to the present invention, respectively. 本発明による第1実施形態の位相差検出器及び信号処理部を備える画像処理装置の処理を示すフローチャートである。It is a flowchart which shows the processing of the image processing apparatus provided with the phase difference detector and the signal processing unit of 1st Embodiment by this invention. 本発明による第1実施形態の位相差検出器を備える画像処理装置の動作例を示す図である。It is a figure which shows the operation example of the image processing apparatus provided with the phase difference detector of 1st Embodiment by this invention. 本発明による第1実施形態の位相差検出器を備える画像処理装置の動作とその作用・効果を示す図である。It is a figure which shows the operation of the image processing apparatus provided with the phase difference detector of 1st Embodiment by this invention, and the operation | effect thereof. 本発明による第2実施形態の位相差検出器、及びこれを備える画像処理装置の概略構成を示すブロック図である。It is a block diagram which shows the schematic structure of the phase difference detector of 2nd Embodiment by this invention, and the image processing apparatus provided with this. 本発明による第2実施形態の位相差検出器及び信号処理部を備える画像処理装置の処理を示すフローチャートである。It is a flowchart which shows the processing of the image processing apparatus provided with the phase difference detector and the signal processing unit of 2nd Embodiment by this invention. 本発明による第2実施形態の位相差検出器を備える画像処理装置の動作例を示す図である。It is a figure which shows the operation example of the image processing apparatus provided with the phase difference detector of 2nd Embodiment by this invention.

以下、図面を参照して、本発明による各実施形態の位相差検出器11及びこれを備える画像処理装置1について説明する。 Hereinafter, with reference to the drawings, the phase difference detector 11 of each embodiment according to the present invention and the image processing device 1 including the same will be described.

〔第1実施形態〕
図1は、本発明による第1実施形態の位相差検出器11、及びこれを備える画像処理装置1の概略構成を示すブロック図である。画像処理装置1は、1台の撮像カメラ10で時間的に連続して取得された撮像画像を逐次入力し、位相差検出器11により、その入力される時間的に連続して取得された2枚一組の撮像画像を基にして、その双方に映る被写体の位相差を検出することで、被写体の画像上の移動速度の検出や被写体の動きを追跡する装置として構成される。
[First Embodiment]
FIG. 1 is a block diagram showing a schematic configuration of a phase difference detector 11 according to a first embodiment of the present invention and an image processing device 1 including the same. The image processing device 1 sequentially inputs the captured images acquired by one image pickup camera 10 continuously in time, and is continuously acquired by the phase difference detector 11 in time. It is configured as a device for detecting the movement speed of a subject on the image and tracking the movement of the subject by detecting the phase difference of the subject reflected on both of them based on a set of captured images.

(撮像カメラ)
まず、本実施形態に係る撮像カメラ10は、時間的に連続して逐次、被写体を撮像して撮像画像を形成し出力するカメラであり、撮像レンズ101、撮像素子102、及び画像処理部103を備える。
(Image camera)
First, the image pickup camera 10 according to the present embodiment is a camera that continuously images a subject in a time-sequential manner to form and output an image captured image, and includes an image pickup lens 101, an image pickup element 102, and an image processing unit 103. Be prepared.

本実施形態に係る撮像レンズ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 image processing unit 103 according to the present embodiment sequentially forms an image captured by a subject obtained from the image sensor 102 in frame units, and outputs the image to the signal processing unit 13 and the phase difference detector 11. In particular, the image processing unit 103 forms an image pickup image P1 in which the subject obtained from the image pickup element 102 is captured at the time when the operation of the image phase difference detector 11 starts, and outputs the image processing unit 103 to the signal processing unit 13 and the phase difference detector 11. do.

画像位相差検出器11の作動開始後、本実施形態の画像処理部103は、撮像画像P1の形成の後に時間的に連続して、撮像素子102から得られる被写体が撮像された当該撮像画像P2を形成し、信号処理部13及び位相差検出器11に出力する。 After the operation of the image phase difference detector 11 is started, the image processing unit 103 of the present embodiment continuously captures the subject obtained from the image pickup device 102 in time after the formation of the image pickup image P1. Is formed and output to the signal processing unit 13 and the phase difference detector 11.

このようにして、本実施形態の画像処理部103は、撮像素子102から得られる被写体が撮像された撮像画像をフレーム単位で逐次形成し信号処理部13に出力する。そして、画像位相差検出器11の作動開始時点で、本実施形態の画像処理部103は、時間的に連続して取得された2枚一組の撮像画像P1,P2について逐次、信号処理部13及び位相差検出器11に出力する。 In this way, the image processing unit 103 of the present embodiment sequentially forms an image captured by the subject obtained from the image sensor 102 in frame units and outputs the image to the signal processing unit 13. Then, at the time when the operation of the image phase difference detector 11 is started, the image processing unit 103 of the present embodiment sequentially receives the signal processing unit 13 for the pair of captured images P1 and P2 acquired continuously in time. And output to the phase difference detector 11.

(画像処理装置)
画像処理装置1は、位相差検出器11、メモリ12、及び信号処理部13を備える。
(Image processing device)
The image processing device 1 includes a phase difference detector 11, a memory 12, and a signal processing unit 13.

位相差検出器11は、操作部16からの指示に基づいて被写体の注目領域(縦、横、斜めを問わない)を初期設定して作動を開始し、1台の撮像カメラ10で時間的に連続して取得された2枚一組の撮像画像P1,P2を用いて、その双方に映る被写体の位相差を検出する機能部である。被写体の注目領域の初期設定は、操作者が任意位置を指定するか、或いは撮像画像の中央領域など予め定めた範囲とすることができる。画像位相差検出器11の作動開始時点で、初期設定された被写体の注目領域は、以後の画像位相差検出器11の作動により動的に座標算出されて、被写体の画像上の移動速度の検出や被写体の動きを追跡するよう例えば方形状に囲むように切り出される。 The phase difference detector 11 initially sets the area of interest (regardless of vertical, horizontal, or diagonal) of the subject based on the instruction from the operation unit 16 and starts operation, and one image pickup camera 10 temporally starts the operation. It is a functional unit that detects the phase difference of the subject reflected on both of the continuously acquired two images P1 and P2. The initial setting of the area of interest of the subject can be specified by the operator at an arbitrary position, or can be set to a predetermined range such as the central area of the captured image. At the start of operation of the image phase difference detector 11, the initially set area of interest of the subject is dynamically calculated in coordinates by the subsequent operation of the image phase difference detector 11 to detect the moving speed of the subject on the image. It is cut out so as to track the movement of the subject or the subject, for example, by enclosing it in a square shape.

メモリ12は、信号処理部13の処理に必要な撮像画像P1,P2を逐次更新しながら一時記憶する機能、及び当該位相差検出器11の処理に必要な各信号値を一時記憶する機能を有する。 The memory 12 has a function of temporarily storing captured images P1 and P2 required for processing of the signal processing unit 13 while sequentially updating them, and a function of temporarily storing each signal value required for processing of the phase difference detector 11. ..

信号処理部13は、位相差検出器11により、当該時間的に連続して取得された2枚一組の撮像画像P1,P2を基にして検出されたその双方に映る被写体の位相差φに対応する変位座標xを用いて撮像画像P2から被写体領域を切り出し、被写体の画像上の移動速度の検出や被写体の動きを追跡する機能部である。このため、信号処理部13は、1台の撮像カメラ10で時間的に連続して取得された撮像画像を逐次入力し、その入力される時間的に連続して取得された2枚一組の撮像画像を逐次更新しながらメモリ12に一時記憶する。そして、例えば、信号処理部13は、逐次入力される撮像画像から被写体領域を例えば方形状に囲むように切り出し、ディスプレイパネル等の表示部14に対し区画表示するか、又は当該切り出した画像領域を示す態様で記録部15に対し画像記録することを繰り返す。 The signal processing unit 13 determines the phase difference φ of the subject reflected in both of the captured images P1 and P2, which are continuously acquired in time by the phase difference detector 11. It is a functional unit that cuts out a subject area from the captured image P2 using the corresponding displacement coordinates x, detects the moving speed of the subject on the image, and tracks the movement of the subject. Therefore, the signal processing unit 13 sequentially inputs the captured images acquired by one image pickup camera 10 in a timely manner, and a set of two images continuously acquired in the input time. The captured images are temporarily updated and temporarily stored in the memory 12. Then, for example, the signal processing unit 13 cuts out the subject area from the sequentially input captured images so as to surround the subject area, for example, in a square shape, and displays the section on the display unit 14 such as a display panel, or displays the cut out image area. Image recording is repeated for the recording unit 15 in the manner shown.

以下より具体的に、位相差検出器11及び画像処理装置1について詳細に説明する。 More specifically, the phase difference detector 11 and the image processing device 1 will be described in detail below.

(位相差検出器)
図1に示すように、本実施形態の位相差検出器11は、主周波数検出部111、CReW計算部112、位相差算出部113、及び座標算出部114を備える。
(Phase difference detector)
As shown in FIG. 1, the phase difference detector 11 of the present embodiment includes a main frequency detection unit 111, a CREW calculation unit 112, a phase difference calculation unit 113, and a coordinate calculation unit 114.

主周波数検出部111は、画像位相差検出器11の作動開始時点で、撮像画像P1の主周波数の波長λを算出するよう動作する。つまり、主周波数検出部111は、画像位相差検出器11の作動開始時点で画像処理部103から入力される撮像画像P1の注目領域について、図2を参照して例示する周波数成分検出を行い、撮像画像P1のパワー(画素値の振幅)が最大となる主周波数の波長λを算出し、その波長λをメモリ12に一時記憶する。 The main frequency detection unit 111 operates so as to calculate the wavelength λ of the main frequency of the captured image P1 at the time when the operation of the image phase difference detector 11 starts. That is, the main frequency detection unit 111 detects the frequency component exemplified with reference to FIG. 2 for the region of interest of the captured image P1 input from the image processing unit 103 at the start of operation of the image phase difference detector 11. The wavelength λ of the main frequency at which the power (amplitude of the pixel value) of the captured image P1 is maximized is calculated, and the wavelength λ is temporarily stored in the memory 12.

また、本実施形態の主周波数検出部111は、後述するCReW計算部112によって2枚一組の撮像画像P1,P2の注目領域における各々について計算される周波数成分の信号ベクトルFのパワーを監視し、該周波数成分の信号ベクトルFのパワーが予め定められた範囲(絶対的な値又は直前の周波数検出時のパワーを元に決定される相対的な値)を外れた場合に、主周波数の波長λを改めて算出しメモリ12に対する一時記憶を更新するよう動作する。 Further, the main frequency detection unit 111 of the present embodiment monitors the power of the signal vector F of the frequency component calculated for each of the two image pickup images P1 and P2 in the region of interest by the CREW calculation unit 112 described later. , The wavelength of the main frequency when the power of the signal vector F of the frequency component is out of a predetermined range (absolute value or relative value determined based on the power at the time of the immediately preceding frequency detection). It operates to calculate λ again and update the temporary storage for the memory 12.

図2(a)乃至図2(e)は、それぞれ第1実施形態の位相差検出器11における主周波数検出部111の処理例を示す図である。 2 (a) and 2 (e) are diagrams showing processing examples of the main frequency detection unit 111 in the phase difference detector 11 of the first embodiment, respectively.

主周波数検出部111は、撮像画像P1を入力し、その注目領域における画像信号の代表的な主周波数の波長λを検出するため、まず、図2(a)に示すように、当該画像信号の長さより短い長さMを設定し、最大振幅aを持つ画像信号から画像幅Mの領域を抽出する。尚、図2では、説明の便宜上、最大振幅aを持つ矩形状の画像信号で正規化表示しているが、実信号(画素値)は正の値の種々の振幅を有する。 The main frequency detection unit 111 inputs the captured image P1 and detects the wavelength λ of the typical main frequency of the image signal in the region of interest. Therefore, first, as shown in FIG. 2A, the main frequency detection unit 111 of the image signal A length M shorter than the length is set, and a region of the image width M is extracted from the image signal having the maximum amplitude a. In FIG. 2, 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 amplitudes of positive values.

続いて、図2(b)及び図2(c)に示すように、主周波数検出部111は、M/2の長さで当該信号を分割し、画像幅M/2で分割した前半部分と後半部分とをそれぞれ抽出する。 Subsequently, as shown in FIGS. 2 (b) and 2 (c), the main frequency detection unit 111 divides the signal by the length of M / 2, and the first half portion divided by the image width M / 2. Extract the latter half and each.

続いて、図2(d)に示すように、主周波数検出部111は、画像幅M/2で分割した前半部分と後半部分とをその信号順で重ねて差分して、その結果となる差分信号(長さM/2)を算出する。これにより、パワーPとして強調された差分信号が得られる。 Subsequently, as shown in FIG. 2D, the main frequency detection unit 111 superimposes the first half portion and the second half portion divided by the image width M / 2 in the signal order and makes a difference, resulting in a difference. Calculate the signal (length M / 2). As a result, a difference signal emphasized as the power P is obtained.

続いて、図2(e)に示すように、主周波数検出部111は、差分信号のパワーPの絶対値の総和をMで除した正規化パワーを算出する。 Subsequently, as shown in FIG. 2E, the main frequency detection unit 111 calculates the normalized power obtained by dividing the sum of the absolute values of the powers P of the difference signals by M.

そして、主周波数検出部111は、当該画像信号の長さより短い範囲でMの値を変化させながら繰り返し、当該正規化パワーが最大となるMの値を求め、このMの値を主周波数の波長λとする。 Then, the main frequency detection unit 111 repeats while changing the value of M in a range shorter than the length of the image signal, obtains the value of M that maximizes the normalized power, and uses this value of M as the wavelength of the main frequency. Let it be λ.

つまり、図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 frequency detection unit 111 has a main frequency based on other techniques for detecting the main frequency, such as calculating a power spectrum using a Fourier transform, in addition to the technique based on the autocorrelation function according to FIG. It may be configured to detect the wavelength λ. For example, the main frequency detection unit 111 assumes that the subject is a range of similar colors defined by a predetermined standard based on the color information of the center of the input image signal, and sets the length twice as wide as the main frequency. The wavelength λ may be used.

CReW計算部112は、まず、メモリ12から波長λ、分割ブロック数N及び変位座標xを示す座標算出情報を読み出し、当該変位座標xを基に画像処理部112から入力される2枚一組の撮像画像P1,P2の注目領域を較正し、当該波長λを基に2枚一組の撮像画像P1,P2の注目領域の各々の画像信号を波長λ/4で一方向にNブロック以上(N≧4の整数固定値)に分割しそれぞれの総和(或いは、平均)を算出することで、分割方向にN画素となる圧縮画像を生成する。 The CREW calculation unit 112 first reads out coordinate calculation information indicating the wavelength λ, the number of divided blocks N, and the displacement coordinates x from the memory 12, and is a set of two images input from the image processing unit 112 based on the displacement coordinates x. The region of interest of the captured images P1 and P2 is calibrated, and the image signals of each of the region of interest of the two captured images P1 and P2 based on the wavelength λ are N blocks or more (N) in one direction at the wavelength λ / 4. By dividing into (a fixed integer value of ≧ 4) and calculating the sum (or average) of each, a compressed image having N pixels in the dividing direction is generated.

尚、画像位相差検出器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 phase difference detector 11 is started, the displacement coordinate x as the initial value indicates zero displacement amount. That is, at the time when the operation of the image phase difference detector 11 starts, the region of interest of the captured images P1 and P2 of the two images is at the same position as at the time of the initial setting, but after that, the images are continuously acquired 2 in time. When detecting the phase difference of a set of captured images, the region of interest of the captured image after the time is captured before the time by calibration based on the displacement coordinates x corresponding to the subject region to be cut out. The coordinates are different from the area of interest in the image. Further, the number of divided blocks N is a predetermined value stored in the memory 12 and can be externally set from the operation unit 16.

そして、CReW計算部112は、2枚一組の撮像画像P1,P2の注目領域の各々における分割・圧縮方向にN画素となる圧縮画像に対して、当該方向に少なくとも4象限の要素値を持つ矩形数列で表される複素矩形数列(CReWフィルタ)を基底とする複素矩形ウェーブレット変換(CReW:Complex Rectangular Wavelet Transform)を施し、複素(実数成分及び虚数成分)の周波数成分の信号ベクトルFを1種類以上生成して、位相差算出部113に出力する。 Then, the CREW calculation unit 112 has element values of at least four quadrants in the direction of the compressed image having N pixels in the division / compression direction in each of the attention regions of the two image capture images P1 and P2. Complex Rectangular Wavelet Transform (CReW) based on a complex rectangular wavelet (CREW filter) represented by a complex number sequence is applied, and one type of signal vector F for the frequency component of the complex (real number component and imaginary number component) is obtained. The above is generated and output to the phase difference calculation unit 113.

ただし、時系列の処理順として、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 calculation unit 112 is temporarily stored in the memory 12 and used as the reference signal vector F'for phase difference detection, and is used as the reference signal vector F'for the phase difference detection. The signal vector F for the captured image P2 obtained by the above is output to the phase difference calculation unit 113.

ここで、一実施例の複素矩形ウェーブレット変換(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 calculation unit 112 of one embodiment (Type 1) in the phase difference detector 11 of the first embodiment, respectively. Further, FIGS. 4 (a) to 4 (c) are diagrams showing processing examples of the CREW calculation unit 112 of one embodiment (Type 3) in the phase difference detector 11 of the first embodiment, respectively.

CReW計算部112は、本質的に、複素成分を有するウェーブレット変換であるが、4象限の要素値を持つ矩形数列で表されるフィルタを構成し、これにより位相情報を付加してパワー及び正規化位相の計算コストを低減させる信号ベクトルに変換する点で、厳密には、一般的なウェーブレット変換とは相違している。 The CREW calculator 112 is essentially a wavelet transform with complex components, but constitutes a filter represented by a rectangular sequence with element values in four quadrants, thereby adding phase information for power and normalization. Strictly speaking, it differs from the general wavelet transform in that it converts into a signal vector that reduces the phase calculation cost.

例えば、図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 CREW calculation unit 112 is included in the signal. The normalized phase of the frequency component of the period N (the value obtained by dividing the phase θ of the frequency component by the phase of one cycle, and when θ ′ = 1, the signal is displaced by exactly one cycle of the signal cycle) is θ. ′, The power (maximum amplitude) is a. Therefore, the signal component in the (N / 2) region has a positive amplitude a, and is negative in the other (N / 2) regions {(θ'N) and (N / 2-θ'N) regions}. It can be represented by a signal component of amplitude a.

そして、図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 Type 1 applied to the signal component shown in FIG. 3 (a) is shown in FIG. 3 (b), and the shape example of the CREW filter of Type 2 applied to the signal component shown in FIG. 4 (a) is shown. It is shown in 4 (b). Both Type1 and Type2 are represented by a rectangular sequence having four quadrant element values that divide the signal period N into four, and are CREW filters that are rectangular waves in which the real and imaginary components are staggered (orthogonal). ing. That is, in Type 1, the CREW filter is represented by a rectangular sequence [1, i, -1, −i] having element values of four quadrants when expressed as a real number component “1” and an imaginary number component “i”. Further, Type 2 is a CREW filter represented by a rectangular sequence [1-i, 1 + i, -1 + i, -1-i] having four quadrant element values. In FIGS. 3 (b) and 4 (b), the amplitude of the CREW filter is b.

そして、図3(a)に示す信号成分に図3(b)に示すType1のCReWフィルタを適用して信号解析することで、図3(c)にて複素平面上に図示するように、周波数成分がその位相によってとり得る値(複素数)として、正方形の辺上の信号ベクトルを示すものとなる。図3(c)に示すType1の場合、原点を中心として、一辺がabN、各辺がそれぞれ実数軸又は虚数軸と平行な正方形となる。 Then, by applying the CREW filter of Type 1 shown in FIG. 3 (b) to the signal component shown in FIG. 3 (a) and performing signal analysis, the frequency is as shown on the complex plane in FIG. 3 (c). The value (complex number) that the component can take depending on its phase indicates the signal vector on the side of the square. In the case of Type 1 shown in FIG. 3 (c), one side is abN and each side is a square parallel to the real number axis or the imaginary number axis, respectively, with the origin as the center.

また、図4(a)に示す信号成分に図4(b)に示すType2のCReWフィルタを適用して信号解析することで、図4(c)にて複素平面上に図示するように、周波数成分がその位相によってとり得る値(複素数)として、正方形の辺上の信号ベクトルを示すものとなる。図4(c)に示すType2の場合、原点を中心として、実数軸及び虚数軸上のabN、-abNをそれぞれ囲んだ正方形となる。 Further, by applying the CREW filter of Type 2 shown in FIG. 4 (b) to the signal component shown in FIG. 4 (a) and performing signal analysis, the frequency is as shown on the complex plane in FIG. 4 (c). The value (complex number) that the component can take depending on its phase indicates the signal vector on the side of the square. In the case of Type 2 shown in FIG. 4 (c), it is a square centered on the origin and surrounding abN and -abN on the real number axis and the imaginary number axis, respectively.

そして、対比する信号ベクトルの位相差φは、各信号ベクトルの正規化位相θ′の差で得られ、複素平面上にマッピングされた各信号ベクトルの正規化位相θ′の差を、マンハッタン距離により算出することができる。 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 CreW calculation unit 112 of one embodiment (Types 1 and 2) in the phase difference detector 11 of the first embodiment, respectively, and the Fourier transform of the comparative example shown in FIG. It is a figure which shows the processing cost of the above in a comparable manner.

特に、図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 CREW calculation unit 112 according to the present invention can calculate the power and the normalized phase corresponding to the complex number regardless of whether the CREW filter of Type 1 or 2 is used. It can be realized by several conditional branching (detection of the quadrant on the complex plane of the frequency component), absolute value calculation within several times according to the conditional branching, power of 2, and one division.

特に、演算処理において、絶対値計算はビットレジスタの値の反転と加算で実現される。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 CREW calculation unit 112 according to the present invention can be applied to a high-resolution image or a high-frequency video by using any of the Type 1 and Type 3 CReW filters, and the processing cost is reduced and high-speed processing is possible. Therefore, it is possible to suppress an increase in mounting cost.

一方、図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 CREW calculation unit 112 according to the present invention can reduce the processing cost by using the CREW filter as exemplified by Types 1 and 2.

尚、図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 Type 1 and 2 shown in FIG. 6A and the like, when expressed as a real number component "1" and an imaginary number component "i", a rectangular sequence of rectangles having element values of four quadrants [1, i , -1, -i] or the rectangular sequence [1-i, 1 + i, -1 + i, -1-i] can be arbitrarily replaced in the element order or arrangement. For example, the same applies even if the rectangular sequence of Type 1 is set to [-1, i, 1, -i] or the rectangular sequence of Type 1 is set to [1 + i, 1-i, -1 + i, -1-i]. The processing result and effect of the above can be obtained.

図7(a)乃至図7(c)は、それぞれ本発明による第1実施形態の位相差検出器11におけるCReW計算部112のより具体的な処理例を示す図である。 7 (a) to 7 (c) are diagrams showing more specific processing examples of the CREW calculation unit 112 in the phase difference detector 11 of the first embodiment according to the present invention, respectively.

図7(a)に示すように、CReW計算部112は、まず、メモリ12から波長λ、分割ブロック数N及び変位座標xを示す座標算出情報を読み出し、当該変位座標xを基に画像処理部112から入力される2枚一組の撮像画像P1,P2の注目領域を定め、この注目領域を処理対象の画像とする。尚、画像位相差検出器11の作動開始時点では、当該変位座標xの値は計算されていないため、初期値としての当該変位座標xは変位量ゼロを示すものとする。 As shown in FIG. 7A, the CREW calculation unit 112 first reads out the coordinate calculation information indicating the wavelength λ, the number of divided blocks N, and the displacement coordinates x from the memory 12, and the image processing unit 112 is based on the displacement coordinates x. The area of interest of the pair of captured images P1 and P2 input from 112 is defined, and this area of interest is used as the image to be processed. Since the value of the displacement coordinate x is not calculated at the time when the operation of the image phase difference detector 11 is started, the displacement coordinate x as the initial value indicates zero displacement amount.

尚、CReW計算部112の処理対象とする画像は、処理コストのより一層の低減のため本例では操作部16からの指示に基づいて初期設定した被写体の注目領域を基にしているが、画像全体でもよい。 The image to be processed by the CREW calculation unit 112 is based on the attention area of the subject initially set based on the instruction from the operation unit 16 in this example in order to further reduce the processing cost. It may be the whole.

そして、CReW計算部112は、当該波長λ及び分割ブロック数Nを基に、2枚一組の撮像画像P1,P2の注目領域の各々を波長λ/4で一方向(図示する例では横方向)にN個以上(図示する例ではN=6)のブロックに分割し各ブロックでそれぞれの総和(或いは、平均)を算出する。画像として見ると、一方向が非常に粗い6画素となる圧縮画像が生成される。このとき、各ブロックの幅は、使用するCReWフィルタの波長λの4分の1となる。ブロック4つで、CReWフィルタの長さと同等の信号長となる。 Then, the CREW calculation unit 112 sets each of the attention regions of the two image pickup images P1 and P2 in one direction at the wavelength λ / 4 based on the wavelength λ and the number of divided blocks N (horizontal direction in the illustrated example). ) Is divided into N or more blocks (N = 6 in the illustrated example), and the total sum (or average) of each block is calculated. When viewed as an image, a compressed image with 6 pixels, which is very coarse in one direction, is generated. At this time, the width of each block is one-fourth of the wavelength λ of the CREW filter used. With four blocks, the signal length is equivalent to the length of the CREW filter.

続いて、図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 CREW calculation unit 112 spatially moves (scans) the compressed image of four consecutive blocks out of the compressed images of six blocks in the one direction (division direction). Then apply the CREW filter. That is, for example, in the case of Type 1 shown in FIG. 3 (b), the CREW filter composed of the four elements [1, i, -1, −i] is applied to the compressed image of four blocks. Further, in the case of Type 2 shown in FIG. 4 (b), a CREW filter composed of four elements [1-i, 1 + i, -1 + i, -1-i] is applied to a compressed image of four blocks. In any case of the Type 1 and Type 2 CREW filters, a value in which the number of blocks is reduced by 3 is obtained.

続いて、図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 calculation unit 112 converts the number of pixels in the vertical direction × 3 types of signal vectors (complex signals). As a result, three types of signal vectors corresponding to the addresses of the pixels consisting of three sets of real number components and three sets of imaginary number components are obtained, and ideally, the signal vectors are phase-rotated by 90 °. That is, if N = 4, one signal vector is obtained, if N = 5, two signal vectors are obtained, and if N = 6, three signal vectors are obtained. Therefore, the larger the value of N (the larger the number of signal vectors), the wider the range as the feature quantity expression for one processed image, but even if it is larger than necessary, the signal vector is unnecessary for the implementation purpose. Will be obtained and waste will occur as a processing cost. From the results of the experiment, it is known that it is preferable to set N = 6, but it is preferable to set it to about N = 4 to 8. This has the advantage that the total (or average) calculation can be performed several times (for the number of blocks) for one signal string while maintaining high accuracy in phase difference detection.

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 calculation unit 112 is Type 1 shown in FIG. 3 (b), Type 2 shown in FIG. 4 (b) is shown in FIG. 3 (c). If so, as shown in FIG. 4 (c), it becomes equivalent to the state where the frequency component of the wavelength N is mapped on the side of the square on the complex plane, and as shown in FIG. 6 (a), the power and It indicates the normalized phase.

このようにして、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 CREW calculation unit 112 is temporarily stored in the memory 12 and used as the reference signal vector F'for phase difference detection, and is obtained by the CREW calculation unit 112. The signal vector F for the captured image P2 is output to the phase difference calculation unit 113.

位相差算出部113は、撮像画像P1の1種類以上の参照信号ベクトルF’をメモリ12から読み出し、今回計算した撮像画像P2に対する1種類以上の信号ベクトルFと当該1種類以上の参照信号ベクトルF’とを種類毎に個別に比較して、被写体領域のサイズ変化を示すように位相差φを算出し、座標算出部114に出力する。尚、図3及び図4を参照して上述したように、位相差算出部113は、CReW計算によって得られる各信号ベクトルの位相差φを算出するにあたり、複素平面上にマッピングされた各信号ベクトルのマンハッタン距離により算出する。これにより、位相差φの算出に係る処理コストの低減に寄与するものとなる。 The phase difference calculation unit 113 reads out one or more types of reference signal vectors F'of the captured image P1 from the memory 12, and one or more types of signal vectors F and the one or more types of reference signal vectors F for the captured image P2 calculated this time. 'And are compared individually for each type, the phase difference φ is calculated so as to indicate the size change of the subject area, and is output to the coordinate calculation unit 114. As described above with reference to FIGS. 3 and 4, the phase difference calculation unit 113 calculates each signal vector mapped on the complex plane in calculating the phase difference φ of each signal vector obtained by the CREW calculation. Calculated from the Manhattan distance of. This contributes to the reduction of the processing cost related to the calculation of the phase difference φ.

座標算出部114は、まず、メモリ12から波長λ及び変位座標xを示す座標算出情報を読み出し、当該変位座標x(初期値はゼロ)を基に画像処理部112から入力される2枚一組の撮像画像P1,P2の注目領域を較正する。続いて、座標算出部114は、位相差φの情報を撮像画像P2上の被写体の位置座標に合わせるために、位相差算出部113から得られる位相差φと当該波長λとを乗じて撮像画像P2上の被写体の変位座標(即ち注目領域の変位座標)xを算出し、変位座標xの情報を信号処理部13に出力するとともに、メモリ12に更新保持する。 The coordinate calculation unit 114 first reads out the coordinate calculation information indicating the wavelength λ and the displacement coordinate x from the memory 12, and is input from the image processing unit 112 based on the displacement coordinate x (initial value is zero). The region of interest of the captured images P1 and P2 of the above is calibrated. Subsequently, the coordinate calculation unit 114 multiplies the phase difference φ obtained from the phase difference calculation unit 113 and the wavelength λ in order to match the information of the phase difference φ with the position coordinates of the subject on the image captured image P2. The displacement coordinates (that is, the displacement coordinates of the region of interest) x of the subject on P2 are calculated, the information of the displacement coordinates x is output to the signal processing unit 13, and the memory 12 is updated and held.

信号処理部13は、位相差検出器11により時間的に連続して取得された2枚一組の撮像画像P1,P2を基にして検出されたその双方に映る被写体の位相差φに対応する変位座標xを用いて撮像画像P2から被写体領域を切り出し(区画表示)する。以後、信号処理部13は、1台の撮像カメラ10で時間的に連続して取得された撮像画像を逐次入力し、逐次入力される撮像画像から被写体領域を例えば方形状に囲むように切り出し、ディスプレイパネル等の表示部14に対し区画表示するか、又は当該切り出した画像領域を示す態様で記録部15に対し画像記録することを繰り返す。 The signal processing unit 13 corresponds to the phase difference φ of the subject reflected in both of the captured images P1 and P2 of the two images continuously acquired by the phase difference detector 11 in time. The subject area is cut out (section display) from the captured image P2 using the displacement coordinates x. After that, the signal processing unit 13 sequentially inputs the captured images acquired continuously in time by one imaging camera 10, and cuts out the subject region from the sequentially input captured images so as to surround the subject area, for example, in a square shape. It is repeated to display a section on the display unit 14 of a display panel or the like, or to record an image on the recording unit 15 in a manner indicating the cut out image area.

(1台の撮像カメラによる被写体の追尾に係る処理例)
以下、より具体的に、図1に示す1台の撮像カメラ10による被写体の追尾に係る画像処理装置1の処理例を説明する。
(Example of processing related to tracking a subject with one image pickup camera)
Hereinafter, a processing example of the image processing device 1 relating to the tracking of the subject by one image pickup camera 10 shown in FIG. 1 will be described more specifically.

図8は、本発明による第1実施形態の位相差検出器11及び信号処理部13を備える画像処理装置1の処理を示すフローチャートである。 FIG. 8 is a flowchart showing the processing of the image processing apparatus 1 including the phase difference detector 11 and the signal processing unit 13 of the first embodiment according to the present invention.

まず、操作部16から被写体の追尾開始(位相差検出の作動開始)の指示の基に、位相差検出器11は、主周波数検出部111により波長λを決定しメモリ12に保持する(ステップS1)。 First, the phase difference detector 11 determines the wavelength λ by the main frequency detection unit 111 and holds it in the memory 12 based on the instruction from the operation unit 16 to start tracking the subject (start of the phase difference detection operation) (step S1). ).

続いて、位相差検出器11は、撮像カメラで取得した今回処理対象の画像Pnについて、CReW計算部112により、一方向に長さλ/4で分割し、それぞれ総和演算(或いは平均演算)を行う(ステップS2)。 Subsequently, the phase difference detector 11 divides the image Pn to be processed this time acquired by the image pickup camera by the CREW calculation unit 112 in one direction with a length of λ / 4, and performs a total calculation (or an average calculation) for each. (Step S2).

続いて、位相差検出器11は、CReW計算部112により、画像Pnの周波数成分の信号ベクトルFを計算しメモリ12に保持する(ステップS3)。 Subsequently, the phase difference detector 11 calculates the signal vector F of the frequency component of the image Pn by the CREW calculation unit 112 and holds it in the memory 12 (step S3).

続いて、位相差検出器11は、位相差算出部113により計算済みの参照信号ベクトルF’をメモリ12から読み出し(参照信号ベクトルF’がメモリ12に保持されていなければゼロとする)、今回計算した画像Pnの信号ベクトルFと参照信号ベクトルF’間の位相差φを計算する(ステップS4)。 Subsequently, the phase difference detector 11 reads the reference signal vector F'calculated by the phase difference calculation unit 113 from the memory 12 (it is set to zero if the reference signal vector F'is not held in the memory 12), and this time. The phase difference φ between the signal vector F of the calculated image Pn and the reference signal vector F'is calculated (step S4).

ここで、位相差算出部113は、2種以上の信号ベクトルFと当該2種以上の参照信号ベクトルF’と求めるように構成しているときは、被写体領域のサイズ変化を示すように位相差φを算出することができる。 Here, when the phase difference calculation unit 113 is configured to obtain two or more types of signal vectors F and the two or more types of reference signal vectors F', the phase difference so as to indicate a change in the size of the subject area. φ can be calculated.

続いて、位相差検出器11は、座標算出部114によりφ*λによる画像Pn上の被写体の変位座標xを算出しメモリ12に更新保持するとともに、信号処理部13に出力する(ステップS5)。ここで、変位座標xは、上記の被写体領域のサイズ変化を示す情報を含めることができる。 Subsequently, the phase difference detector 11 calculates the displacement coordinates x of the subject on the image Pn by φ * λ by the coordinate calculation unit 114, updates and holds them in the memory 12, and outputs them to the signal processing unit 13 (step S5). .. Here, the displacement coordinates x can include information indicating the size change of the subject area.

続いて、信号処理部13は、変位座標xを基に画像Pnから被写体領域を切り出し、区画表示する(ステップS6)。ここで、変位座標xが、上記の被写体領域のサイズ変化を示す情報を含んでいるときは、被写体領域の切り出しに関して、当該注目領域のサイズを更新させることができる。例えば、時間的に連続する撮像画像がズーム等により画角が変化するような場合でも、これに追従して被写体領域の切り出し(区画表示)が可能となる。 Subsequently, the signal processing unit 13 cuts out the subject area from the image Pn based on the displacement coordinates x and displays the section (step S6). Here, when the displacement coordinates x include the information indicating the size change of the subject region, the size of the region of interest can be updated with respect to the cutting out of the subject region. For example, even when the angle of view of a temporally continuous captured image changes due to zooming or the like, it is possible to cut out (partition display) the subject area in accordance with this.

以後、位相差検出器11は、操作部16からの終了の指示の有無を監視しており(ステップS7)、操作部16から終了の指示があるときは(ステップS7:Y)、被写体の追尾(位相差検出の作動)を停止して、その旨を信号処理部13に通知し、信号処理部13による切り出し(区画表示)処理を停止させる。 After that, the phase difference detector 11 monitors whether or not there is an end instruction from the operation unit 16 (step S7), and when the operation unit 16 gives an end instruction (step S7: Y), the subject is tracked. (Operation of phase difference detection) is stopped, the signal processing unit 13 is notified to that effect, and the cutting (partition display) processing by the signal processing unit 13 is stopped.

一方、位相差検出器11は、操作部16から終了の指示が無いときは(ステップS7:N)、被写体の追尾(位相差検出の作動)を継続し、設計上必要であればその旨を信号処理部13に通知する。 On the other hand, the phase difference detector 11 continues tracking the subject (operation of phase difference detection) when there is no instruction to end from the operation unit 16 (step S7: N), and if necessary in design, to that effect. Notify the signal processing unit 13.

被写体の追尾(位相差検出の作動)を継続する際、位相差検出器11は、ステップS2に移行してもよいが、ここではより好適な例として、ステップS8に移行する。 When continuing the tracking of the subject (operation of phase difference detection), the phase difference detector 11 may shift to step S2, but here, as a more preferable example, it shifts to step S8.

具体的には、被写体の追尾(位相差検出の作動)を継続する際、位相差検出器11は、信号処理部13による切り出しに係る変位座標xの情報を基に、改めて当該画像Pnにおける当該切り出した被写体領域について、CReW計算部112により、一方向に長さλ/4で分割し、それぞれ総和演算(或いは平均演算)を行う(ステップS8)。 Specifically, when the tracking of the subject (operation of phase difference detection) is continued, the phase difference detector 11 renews the said in the image Pn based on the information of the displacement coordinates x related to the cutout by the signal processing unit 13. The cut-out subject area is divided by the CREW calculation unit 112 in one direction with a length of λ / 4, and a total calculation (or an average calculation) is performed for each (step S8).

続いて、位相差検出器11は、当該画像Pnにおける当該切り出した被写体領域について、CReW計算部112により改めて信号ベクトルF(ここでは、区別のために信号ベクトルFcと称する)を再計算する(ステップS9)。 Subsequently, the phase difference detector 11 recalculates the signal vector F (here, referred to as a signal vector Fc for distinction) by the CREW calculation unit 112 for the cut-out subject area in the image Pn (step). S9).

続いて、位相差検出器11は、CReW計算部112により、信号ベクトルFcと計算済みの信号ベクトルFとを比較し(ステップS10)、信号ベクトルFcと信号ベクトルFとの差が閾値以下であるか否かを判定する(ステップS11)。信号ベクトルFcと信号ベクトルFとの差が閾値以下でなければ(ステップS11:N)、ステップS1に移行し、信号ベクトルFcと信号ベクトルFとの差が閾値以下であれば(ステップS11:Y)、ステップS12に移行する。 Subsequently, the phase difference detector 11 compares the signal vector Fc with the calculated signal vector F by the CREW calculation unit 112 (step S10), and the difference between the signal vector Fc and the signal vector F is equal to or less than the threshold value. Whether or not it is determined (step S11). If the difference between the signal vector Fc and the signal vector F is not equal to or less than the threshold value (step S11: N), the process proceeds to step S1, and if the difference between the signal vector Fc and the signal vector F is not equal to or less than the threshold value (step S11: Y). ), The process proceeds to step S12.

ステップS12に移行すると、位相差検出器11は、CReW計算部112により、撮像カメラ10で取得した新たに入力される画像Pnの解析のために、信号ベクトルFcを参照信号ベクトルF’としてメモリ12に更新保持して、ステップS2に移行する。 When the process proceeds to step S12, the phase difference detector 11 uses the signal vector Fc as the reference signal vector F'as the memory 12 for analysis of the newly input image Pn acquired by the image pickup camera 10 by the CREW calculation unit 112. The update is held in and the process proceeds to step S2.

即ち、CReW計算部112は、当該位相差の検出を時間方向に連続する画像に対して継続的に行う際に、逐次、今回切り出された被写体領域で今回計算対象の画像の信号ベクトルFcを今回値として再計算し、前回切り出された被写体領域で計算した該今回計算対象の画像に対する前回値の信号ベクトルFと比較し、今回値の信号ベクトルFcと前回値の信号ベクトルFとの差が閾値以下であるか否かを判定する。そして、CReW計算部112は、当該閾値以下のときには今回値の信号ベクトルFcを次回の位相差の検出で対比する参照信号ベクトルF’として更新し、当該閾値以下でないときは参照信号ベクトルF’の更新は行わず、主周波数検出部111に対して、波長λを改めて算出させる処理を有するように構成することができる。 That is, when the CREW calculation unit 112 continuously detects the phase difference for images that are continuous in the time direction, the signal vector Fc of the image to be calculated this time is sequentially calculated in the subject area cut out this time. It is recalculated as a value and compared with the signal vector F of the previous value for the image to be calculated this time calculated in the subject area cut out last time, and the difference between the signal vector Fc of the current value and the signal vector F of the previous value is the threshold value. It is determined whether or not it is as follows. Then, the CREW calculation unit 112 updates the signal vector Fc of the current value as the reference signal vector F'to be compared in the next detection of the phase difference when it is below the threshold value, and when it is not below the threshold value, the reference signal vector F'is updated. It is possible to configure the main frequency detection unit 111 to have a process of calculating the wavelength λ again without updating.

このように、CReW計算部112に対して、ステップS9乃至S12の処理を設けることで、位相差検出対象とする時間方向の一組の画像間で、被写体が急減に変化するような場合でも頑健に参照信号ベクトルF’及び被写体領域の更新が可能となる。 In this way, by providing the CREW calculation unit 112 with the processes of steps S9 to S12, it is robust even when the subject suddenly decreases between a set of images in the time direction for which the phase difference is to be detected. The reference signal vector F'and the subject area can be updated.

尚、本実施形態の説明では、被写体の注目領域を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 image processing device 1 can be configured to perform tracking processing of the subject by one image pickup camera 10 shown in FIG. In particular, in the case of a configuration in which a plurality of types of signal vectors are used for one image signal, the displacement coordinates x can include information indicating the size change of the subject area. Therefore, regarding the cutting out of the subject area, the size of the area of interest can be updated. For example, as shown in FIG. 9, in the captured image Pn (t1) at time t1, when the subject area displayed as a cutout section for the subject Obj indicated by the broken line is SQ (t1), the time t2 that follows in time. In the captured image Pn (t2), it is also possible to track the subject Obj shown by the solid line while changing the size of the subject area to be cut out by the subject area displayed in the cutout section as in SQ (t2).

尚、図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 phase difference detector 11 of the present embodiment, the phase difference can be detected stably and with high accuracy at a low processing cost regardless of the photographing environment.

図10は、本発明による第1実施形態の位相差検出器11を備える画像処理装置1の動作とその作用・効果を示す図である。図10に示すように、背景を持つ被写体が撮像された元画像に対し、CReW計算部112による処理過程で一方向に総和(或いは平均化)した圧縮画像は、元画像の「変位なし」、「右変位(位相が進む)」、及び「左変位(位相が戻る)」に応じて輝度分布の高低が大まかに変化する(撮影環境に依らず安定)。この圧縮画像に対し、CReW計算部112により、例えばType2のCReWフィルタを適用すると、例えばCReWフィルタの振幅b=1の場合でも、図示するように、複素平面上の信号ベクトルは元画像の「変位なし」、「右変位(位相が進む)」、及び「左変位(位相が戻る)」に応じて顕著に位相変化する。そして、元画像の「変位なし」、「右変位(位相が進む)」、及び「左変位(位相が戻る)」に応じた位相差を、低処理コストで、且つ高精度で検出できる。 FIG. 10 is a diagram showing the operation of the image processing device 1 provided with the phase difference detector 11 of the first embodiment according to the present invention and its action / effect. As shown in FIG. 10, the compressed image summed (or averaged) in one direction in the processing process by the CREW calculation unit 112 with respect to the original image captured by the subject with the background is "no displacement" of the original image. The height of the luminance distribution changes roughly according to "right displacement (phase advance)" and "left displacement (phase return)" (stable regardless of the shooting environment). When the CREW filter of Type 2 is applied to this compressed image by the CREW calculation unit 112, for example, even when the amplitude b = 1 of the CREW filter, the signal vector on the complex plane is "displaced" of the original image as shown in the figure. The phase changes significantly according to "none", "right displacement (phase advances)", and "left displacement (phase returns)". Then, the phase difference according to "no displacement", "right displacement (phase advances)", and "left displacement (phase returns)" of the original image can be detected at low processing cost and with high accuracy.

そして、本発明によれば、パワーと正規化位相を示す信号ベクトルを評価値として用いるため、従来技法のような式(数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 phase difference detector 11 of the present embodiment, the phase difference detection can be made highly accurate and the mounting cost can be suppressed to a low level. Further, the phase difference detector 11 of the present embodiment is not limited to the use of detecting the movement speed of the subject on the image and tracking the movement of the subject, but also detects the dynamic change of the subject (dynamic strain inspection of the object, etc.). ), It can be applied to any application that can utilize the detection of the phase difference indicating the deviation of the position of the subject from a set of images in the time direction.

〔第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 phase difference detector 11 according to a second embodiment of the present invention and an image processing device 1 including the same. The same reference numbers are assigned to the same components as those in the first embodiment. The image processing device 1 of the present embodiment is a set of two images acquired spatially simultaneously and in the same direction by a binocular camera 10RL in which two image pickup cameras 10R and 10L are spatially arranged and imaged simultaneously and in the same direction. By inputting the captured image of the above and detecting the phase difference of the subject reflected on both of them based on the input image of a pair of images in the spatial direction by the phase difference detector 11, the image pickup camera is concerned. It is configured as a device for detecting the distance between 10R and 10L and the subject, or the spatial position between the subjects.

(両眼カメラ)
まず、本実施形態に係る両眼カメラ10RLを構成する各撮像カメラ10R,10Lは、それぞれ同性能の撮像レンズ101、撮像素子102、及び画像処理部103を備える。
(Binocular camera)
First, each of the image pickup cameras 10R and 10L constituting the binocular camera 10RL according to the present embodiment includes an image pickup lens 101, an image pickup element 102, and an image processing unit 103 having the same performance, respectively.

本実施形態に係る撮像レンズ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 image processing unit 103 according to the present embodiment sequentially forms an image captured by a subject obtained from the image sensor 102 in frame units, and outputs the image to the signal processing unit 13 and the phase difference detector 11. In particular, the image processing unit 103 in each of the image pickup cameras 10R and 10L forms the image pickup images Pr and Pl in which the subject obtained from each image pickup element 102 is imaged at the time when the operation of the image phase difference detector 11 starts, and signals. It is output to the processing unit 13 and the phase difference detector 11.

(画像処理装置)
画像処理装置1は、第1実施形態と同様に、位相差検出器11、メモリ12、及び信号処理部13を備え、位相差検出器11は時間方向でなく空間方向の2枚一組の撮像画像を扱う点を除き、第1実施形態とほぼ同様に動作する。
(Image processing device)
Similar to the first embodiment, the image processing device 1 includes a phase difference detector 11, a memory 12, and a signal processing unit 13, and the phase difference detector 11 captures a set of two images in the spatial direction instead of the time direction. The operation is almost the same as that of the first embodiment except that the image is handled.

位相差検出器11は、操作部16からの指示に基づいて被写体の注目領域(縦、横、斜めを問わない)を1以上初期設定して作動を開始し、両眼カメラ10RLで空間的に同時・同方向取得された2枚一組の撮像画像を入力し、その双方に映る被写体の位相差を検出する機能部である。被写体の注目領域の初期設定は、操作者が任意位置を指定するか、或いは撮像画像の中央領域など予め定めた範囲とすることができる。画像位相差検出器11の作動開始時点で、初期設定された被写体の注目領域は、以後の画像位相差検出器11の作動により動的に座標算出されて、被写体を例えば方形状に囲むように切り出される。 The phase difference detector 11 initially sets one or more areas of interest (regardless of vertical, horizontal, or diagonal) of the subject based on an instruction from the operation unit 16 and starts operation, and spatially with the binocular camera 10RL. It is a functional unit that inputs a set of two images acquired at the same time and in the same direction and detects the phase difference of the subject reflected on both of them. The initial setting of the area of interest of the subject can be specified by the operator at an arbitrary position, or can be set to a predetermined range such as the central area of the captured image. At the start of operation of the image phase difference detector 11, the initially set area of interest of the subject is dynamically calculated in coordinates by the subsequent operation of the image phase difference detector 11 so as to surround the subject in a square shape, for example. It is cut out.

メモリ12は、信号処理部13の処理に必要な撮像画像Pr,Plを逐次更新しながら一時記憶する機能、及び当該位相差検出器11の処理に必要な各信号値を一時記憶する機能を有する。本例のメモリ12には、両眼カメラ10RLを構成する各撮像カメラ10R,10Lの配置情報が操作部16を介して予め設定されて格納されている。 The memory 12 has a function of temporarily storing captured images Pr and Pl required for processing of the signal processing unit 13 while sequentially updating them, and a function of temporarily storing each signal value required for processing of the phase difference detector 11. .. In the memory 12 of this example, the arrangement information of the imaging cameras 10R and 10L constituting the binocular camera 10RL is preset and stored via the operation unit 16.

信号処理部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 signal processing unit 13 measures the phase difference φ of the subject reflected in both of them, which is detected based on the pair of captured images Pr and Pl spatially acquired simultaneously and in the same direction by the phase difference detector 11. It is a functional unit that cuts out a subject area from each of the captured images Pr and Pl using the corresponding displacement coordinates x and detects the distance between the imaging cameras 10R and 10L and the subject or the spatial position between the subjects by calculation. Therefore, the signal processing unit 13 sequentially inputs a set of two captured images Pr and Pl that are spatially acquired simultaneously and in the same direction by the binocular camera 10RL, and sequentially updates the captured images Pr and Pl. Temporarily stored in the memory 12. Then, for example, the signal processing unit 13 cuts out the subject area from the sequentially input captured images so as to surround the subject region, for example, and determines the distance between the imaging cameras 10R and 10L and the subject, or the spatial position between the subjects. Repeat the detection. The distance from the binocular camera 10RL to each subject is calculated by the arrangement information of each image pickup camera 10R, 10L including the distance between the image pickup cameras 10R, 10L of the binocular camera 10RL and the angle of view, and the phase difference detector 11. It can be obtained by calculation based on the phase difference φ (difference in the normalized phase θ ′ of the signal vector to be compared).

以下より具体的に、位相差検出器11及び画像処理装置1について詳細に説明する。 More specifically, the phase difference detector 11 and the image processing device 1 will be described in detail below.

(位相差検出器)
図11に示すように、本実施形態の位相差検出器11は、第1実施形態と同様に、主周波数検出部111、CReW計算部112、位相差算出部113、及び座標算出部114を備える。
(Phase difference detector)
As shown in FIG. 11, the phase difference detector 11 of the present embodiment includes a main frequency detection unit 111, a CREW calculation unit 112, a phase difference calculation unit 113, and a coordinate calculation unit 114, as in the first embodiment. ..

主周波数検出部111は、画像位相差検出器11の作動開始時点で、撮像画像Pr,Plのいずれか一方又は双方の主周波数の波長λを算出するよう動作する。つまり、主周波数検出部111は、画像位相差検出器11の作動開始時点で画像処理部103から入力される撮像画像Pr,Plの注目領域について、上述した図2を参照して例示する周波数成分検出を行い、撮像画像Pr,Plのパワー(画素値の振幅)が最大となる主周波数の波長λを算出し、その波長λをメモリ12に一時記憶する。撮像画像Pr,Plのいずれか一方の算出でよいが、双方の主周波数の波長λを算出するときは、その平均値を用いる。 The main frequency detection unit 111 operates so as to calculate the wavelength λ of the main frequency of either one or both of the captured images Pr and Pl at the time when the operation of the image phase difference detector 11 starts. That is, the main frequency detection unit 111 exemplifies the region of interest of the captured images Pr and Pl input from the image processing unit 103 at the start of operation of the image phase difference detector 11 with reference to FIG. 2 described above. The detection is performed, the wavelength λ of the main frequency at which the power (amplitude of the pixel value) of the captured images Pr and Pl is maximized is calculated, and the wavelength λ is temporarily stored in the memory 12. Either one of the captured images Pr and Pl may be calculated, but when calculating the wavelength λ of both main frequencies, the average value is used.

CReW計算部112は、まず、メモリ12から波長λ、分割ブロック数N及び両眼カメラ10RLを構成する各撮像カメラ10R,10Lの配置情報を示す座標算出情報を読み出し、当該各撮像カメラ10R,10Lの配置情報を基に画像処理部112から入力される2枚一組の撮像画像Pr,Plの注目領域を較正し、当該波長λを基に2枚一組の撮像画像Pr,Plの注目領域の各々を波長λ/4で一方向にNブロック以上(N≧4の整数固定値)に分割しそれぞれの総和(或いは、平均)を算出することで、分割方向にN画素となる圧縮画像を生成する。 The CREW calculation unit 112 first reads out the coordinate calculation information indicating the arrangement information of the image pickup cameras 10R and 10L constituting the binocular camera 10RL and the wavelength λ, the number of divided blocks N, from the memory 12, and the respective image pickup cameras 10R and 10L. The attention area of the two images Pr and Pl input from the image processing unit 112 is calibrated based on the arrangement information of the above, and the attention area of the two images Pr and Pl based on the wavelength λ. By dividing each of these into N blocks or more (fixed integer value of N ≧ 4) in one direction at a wavelength of λ / 4 and calculating the sum (or average) of each, a compressed image with N pixels in the dividing direction can be obtained. Generate.

尚、例えば撮像カメラ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 operation unit 16 for the image captured image Pr from the image pickup camera 10R, each image pickup camera is set from the image pickup camera 10L to the image capture image Pl. According to the arrangement information of 10R and 10L, the setting of the region of interest of the corresponding subject can be calibrated. It should be noted that the areas of interest of each of the imaging cameras 10R and 10L do not need to be strictly matched with respect to the subject.

そして、CReW計算部112は、2枚一組の撮像画像Pr,Plの注目領域の各々における分割・圧縮方向にN画素となる圧縮画像に対して、当該方向に少なくとも4象限の要素値を持つ矩形数列で表される複素矩形数列(CReWフィルタ)を基底とする複素矩形ウェーブレット変換(CReW)を施し、右眼画像用と左眼画像用として、複素(実数成分及び虚数成分)の周波数成分の信号ベクトルFr,Flをそれぞれ1種類以上生成して、位相差算出部113に出力する。 Then, the CREW calculation unit 112 has element values of at least four quadrants in the direction of the compressed image having N pixels in the division / compression direction in each of the attention regions of the captured images Pr and Pl of the two sheets. A complex rectangular wavelet transform (CREW) based on a complex rectangular sequence (CREW filter) represented by a rectangular sequence is applied, and the complex (real and imaginary component) frequency components are used for the right-eye image and the left-eye image. One or more types of signal vectors Fr and Fl are generated and output to the phase difference calculation unit 113.

本実施形態におけるCReW計算部112の処理自体は、上述した第1実施形態と同様であり、Type1,2のいずれかのCReWフィルタとすることができる。 The processing itself of the CREW calculation unit 112 in this embodiment is the same as that of the first embodiment described above, and can be a CREW filter of either Type 1 or 2.

尚、CReW計算部112の処理対象とする画像は、処理コストのより一層の低減のため本例では操作部16からの指示に基づいて初期設定した被写体の注目領域を基にしているが、画像全体でもよい。 The image to be processed by the CREW calculation unit 112 is based on the attention area of the subject initially set based on the instruction from the operation unit 16 in this example in order to further reduce the processing cost. It may be the whole.

位相差算出部113は、今回計算した各撮像画像Pr,Plに対する1種類以上の信号ベクトルFr,Flを個別に比較して、1以上の被写体の注目領域毎に位相差φを算出し、座標算出部114に出力する。尚、図3及び図4を参照して上述したように、位相差算出部113は、CReWフィルタによって得られる各信号ベクトルの位相差φを算出するにあたり、複素平面上にマッピングされた各信号ベクトルのマンハッタン距離により算出する。これにより、位相差φの算出に係る処理コストの低減に寄与するものとなる。 The phase difference calculation unit 113 individually compares one or more types of signal vectors Fr and Fl for each of the captured images Pr and Pl calculated this time, calculates the phase difference φ for each region of interest of one or more subjects, and calculates the coordinates. It is output to the calculation unit 114. As described above with reference to FIGS. 3 and 4, the phase difference calculation unit 113 calculates each signal vector mapped on the complex plane in calculating the phase difference φ of each signal vector obtained by the CREW filter. Calculated from the Manhattan distance of. This contributes to the reduction of the processing cost related to the calculation of the phase difference φ.

座標算出部114は、まず、メモリ12から波長λ及び両眼カメラ10RLを構成する各撮像カメラ10R,10Lの配置情報を示す座標算出情報を読み出し、設計上必要であれば当該各撮像カメラ10R,10Lの配置情報を基に画像処理部112から入力される2枚一組の撮像画像Pr,Plの注目領域を較正する。続いて、座標算出部114は、位相差φの情報を撮像画像Pr,Plの各注目領域の座標上のずれ量に復元するために、位相差算出部113から得られる1以上の被写体の注目領域毎に位相差φと当該波長λとを乗じて撮像画像Pr,Pl上の被写体の変位座標(即ち注目領域の変位座標)xを算出し、変位座標xの情報を信号処理部13に出力するとともに、メモリ12に更新保持する。 The coordinate calculation unit 114 first reads out the coordinate calculation information indicating the arrangement information of each image pickup camera 10R, 10L constituting the wavelength λ and the binocular camera 10RL from the memory 12, and if necessary for designing, each image pickup camera 10R, Based on the arrangement information of 10L, the region of interest of the pair of captured images Pr and Pl input from the image processing unit 112 is calibrated. Subsequently, the coordinate calculation unit 114 pays attention to one or more subjects obtained from the phase difference calculation unit 113 in order to restore the information of the phase difference φ to the displacement amount on the coordinates of each of the focused areas of the captured images Pr and Pl. The displacement coordinates (that is, the displacement coordinates of the region of interest) x of the subject on the captured images Pr and Pl are calculated by multiplying the phase difference φ and the wavelength λ for each region, and the information of the displacement coordinates x is output to the signal processing unit 13. At the same time, it is updated and held in the memory 12.

信号処理部13は、位相差検出器11により空間的に同時・同方向取得された2枚一組の撮像画像Pr,Plを基にして検出されたその双方に映る1以上の被写体の注目領域毎に位相差φに対応する変位座標xを用いて各撮像画像Pr,Plから被写体領域を切り出し(区画表示)、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を演算により検出する。尚、信号処理部13は、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を演算により検出する際に、メモリ12から各撮像カメラ10R,10Lの配置情報を読み出して演算する(図11では図示略)。 The signal processing unit 13 is a region of interest of one or more subjects reflected in both of the captured images Pr and Pl detected by the phase difference detector 11 based on a pair of captured images Pr and Pl spatially acquired simultaneously and in the same direction. The subject area is cut out from each of the captured images Pr and Pl (section display) using the displacement coordinates x corresponding to the phase difference φ for each, and the distance between the imaging cameras 10R and 10L and the subject, or the spatial position between the subjects. Is detected by calculation. The signal processing unit 13 reads out the arrangement information of each image pickup camera 10R, 10L from the memory 12 when detecting the distance between the image pickup cameras 10R, 10L and the subject or the spatial position between the subjects by calculation. (Not shown in FIG. 11).

以後、信号処理部13は、両眼カメラ10RLを構成する各撮像カメラ10R,10Lで空間的に同時・同方向取得された各撮像画像を逐次入力し、逐次入力される撮像画像から被写体領域を例えば方形状に囲むように切り出し、上記の距離や空間的な位置を示す情報を付与して、ディスプレイパネル等の表示部14に対し区画表示するか、又は当該切り出した画像領域を示す態様で記録部15に対し画像記録することを繰り返す。 After that, the signal processing unit 13 sequentially inputs each of the captured images spatially acquired simultaneously and in the same direction by the respective imaging cameras 10R and 10L constituting the binocular camera 10RL, and sequentially inputs the subject area from the sequentially input captured images. For example, it is cut out so as to surround it in a square shape, information indicating the above distance and spatial position is given, and the image is divided and displayed on the display unit 14 of a display panel or the like, or recorded in a mode indicating the cut out image area. The image recording for the unit 15 is repeated.

(両眼カメラによる距離測定に係る処理例)
以下、より具体的に、図11に示す両眼カメラ10RLによる当該撮像カメラ10R,10Lと被写体との距離測定に係る画像処理装置1の処理例を説明する。
(Processing example related to distance measurement with a binocular camera)
Hereinafter, a processing example of the image processing device 1 relating to the distance measurement between the image pickup cameras 10R and 10L and the subject by the binocular camera 10RL shown in FIG. 11 will be described more specifically.

図12は、本発明による第2実施形態の位相差検出器11及び信号処理部13を備える画像処理装置1の処理を示すフローチャートである。 FIG. 12 is a flowchart showing the processing of the image processing apparatus 1 including the phase difference detector 11 and the signal processing unit 13 of the second embodiment according to the present invention.

まず、操作部16から被写体との距離測定開始(位相差検出の作動開始)の指示の基に、位相差検出器11は、主周波数検出部111により波長λを決定しメモリ12に保持する(ステップS21)。 First, the phase difference detector 11 determines the wavelength λ by the main frequency detection unit 111 and holds it in the memory 12 based on the instruction from the operation unit 16 to start the distance measurement to the subject (start the operation of the phase difference detection). Step S21).

続いて、位相差検出器11は、両眼カメラ10RLで取得した今回処理対象の撮像画像Pr,Plの各注目領域について、CReW計算部112により、一方向に長さλ/4で分割し、それぞれ総和演算(或いは平均演算)を行う(ステップS22)。 Subsequently, the phase difference detector 11 divides each region of interest of the captured images Pr and Pl to be processed this time acquired by the binocular camera 10RL by the CREW calculation unit 112 in one direction with a length of λ / 4. A total calculation (or an average calculation) is performed for each (step S22).

続いて、位相差検出器11は、CReW計算部112により、撮像画像Pr,Plの各注目領域の周波数成分の信号ベクトルFr,Flを計算しメモリ12に保持する(ステップS23)。 Subsequently, the phase difference detector 11 calculates the signal vectors Fr and Fl of the frequency components of the respective attention regions of the captured images Pr and Pl by the CREW calculation unit 112 and holds them in the memory 12 (step S23).

続いて、位相差検出器11は、位相差算出部113により、撮像画像Pr,Plの各注目領域毎の周波数成分の信号ベクトルFr,Fl間の位相差φを計算する(ステップS24)。 Subsequently, the phase difference detector 11 calculates the phase difference φ between the signal vectors Fr and Fl of the frequency components for each region of interest of the captured images Pr and Pl by the phase difference calculation unit 113 (step S24).

ここで、位相差算出部113は、第1実施形態と同様に、2種以上の信号ベクトルFrと当該2種以上の参照信号ベクトルFlと求めるように構成しているときは、被写体領域のサイズ変化を示すように位相差φを算出することができる。 Here, when the phase difference calculation unit 113 is configured to obtain two or more types of signal vector Fr and the two or more types of reference signal vector Fl as in the first embodiment, the size of the subject area. The phase difference φ can be calculated to indicate the change.

続いて、位相差検出器11は、座標算出部114により両眼カメラ10RLにおける各撮像カメラ10R,10Lの配置情報と、φ*λに基づいて、よる画像Pn上の被写体の変位座標xを算出し、信号処理部13に出力する(ステップS25)。ここで、変位座標xは、上記の被写体領域のサイズ変化を示す情報を含めることができる。 Subsequently, the phase difference detector 11 calculates the displacement coordinates x of the subject on the image Pn based on the arrangement information of the imaging cameras 10R and 10L in the binocular camera 10RL and φ * λ by the coordinate calculation unit 114. Then, it is output to the signal processing unit 13 (step S25). Here, the displacement coordinates x can include information indicating the size change of the subject area.

続いて、信号処理部13は、変位座標xを用いて各撮像画像Pr,Plから被写体領域を切り出し、当該撮像カメラ10R,10Lと被写体との距離、或いは被写体間の空間的な位置を演算により検出する(ステップS26)。ここで、変位座標xが、上記の被写体領域のサイズ変化を示す情報を含んでいるときは、被写体領域の切り出しに関して、当該注目領域のサイズを更新させることができる。例えば、時間的に連続する撮像画像がズーム等により画角が変化するような場合でも、これに追従して被写体領域の切り出し(区画表示)が可能となる。 Subsequently, the signal processing unit 13 cuts out a subject area from each of the captured images Pr and Pl using the displacement coordinates x, and calculates the distance between the imaging cameras 10R and 10L and the subject or the spatial position between the subjects. Detect (step S26). Here, when the displacement coordinates x include the information indicating the size change of the subject region, the size of the region of interest can be updated with respect to the cutting out of the subject region. For example, even when the angle of view of a temporally continuous captured image changes due to zooming or the like, it is possible to cut out (partition display) the subject area in accordance with this.

以後、位相差検出器11は、操作部16からの終了の指示の有無を監視しており(ステップS27)、操作部16から終了の指示があるときは(ステップS27:Y)、被写体との距離測定(位相差検出の作動)を停止して、その旨を信号処理部13に通知し、信号処理部13による切り出し(区画表示)処理を停止させる。 After that, the phase difference detector 11 monitors whether or not there is an end instruction from the operation unit 16 (step S27), and when there is an end instruction from the operation unit 16 (step S27: Y), the subject and the subject. The distance measurement (operation of phase difference detection) is stopped, the signal processing unit 13 is notified to that effect, and the cutting (partition display) processing by the signal processing unit 13 is stopped.

一方、位相差検出器11は、操作部16から終了の指示が無いときは(ステップS27:N)、被写体との距離測定(位相差検出の作動)を継続し、設計上必要であればその旨を信号処理部13に通知する。 On the other hand, when the operation unit 16 does not instruct the end of the phase difference detector 11 (step S27: N), the phase difference detector 11 continues to measure the distance to the subject (operation of the phase difference detection), and if necessary for designing, the phase difference detector 11 continues to measure the distance to the subject. Notify the signal processing unit 13 to that effect.

被写体との距離測定(位相差検出の作動)を継続する際、位相差検出器11は、ステップS2に移行し、継続中はメモリ12に保持される波長λを使用し続けてもよいが、本例では、ズーム等の画角の変更にも適応的に対応するためにステップS1に移行する。 When continuing the distance measurement with the subject (operation of phase difference detection), the phase difference detector 11 may move to step S2 and continue to use the wavelength λ held in the memory 12 during the continuation. In this example, the process proceeds to step S1 in order to adaptably respond to changes in the angle of view such as zooming.

このようにして、画像処理装置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 image processing device 1 can be configured to perform distance measurement processing with the subject by the binocular camera 10RL shown in FIG. In particular, in the case of a configuration in which a plurality of types of signal vectors are used for one image signal, the displacement coordinates x can include information indicating the size change of the subject area. Therefore, regarding the cutting out of the subject area, the size of the area of interest can be updated. In addition, distance measurement can be performed on a plurality of subjects in the captured image. For example, as shown in FIG. 13, in the captured image Pr of the imaging camera 10R (or the captured image Pl of the imaging camera 10L), the subject areas SQ1, SQ2, SQ3 are individually cut out and displayed for a plurality of subjects Obj1, Obj2, Obj3. Distance measurement can be performed by setting each of the above to the distance measuring areas 1, 2, and 3, respectively. Therefore, as one of the physical distance measurement processes relating to the subject, the distance between the imaging cameras 10R and 10L constituting the binocular camera 10RL and the subject, or the spatial position between the subjects is detected. be able to.

また、第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 phase difference detector 11 detects the phase difference for automatic focus adjustment by the same process. Can be configured as.

そして、第2実施形態に係る位相差検出器11は、第1実施形態と実質的に同様な動作であるため、第1実施形態と同様、低処理コストで撮影環境に依らず安定し高精度で位相差を検出することができる。 Since the phase difference detector 11 according to the second embodiment has substantially the same operation as that of the first embodiment, it is stable and highly accurate at low processing cost regardless of the photographing environment as in the first embodiment. The phase difference can be detected with.

以上、特定の実施形態の例を挙げて本発明を説明したが、本発明は前述した例に限定されるものではなく、その技術思想を逸脱しない範囲で種々変形可能である。例えば、上述した各実施形態では、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 calculation unit 112 has described a one-dimensional CREW filter that is spatially targeted in one direction as an example, but a two-dimensional CREW filter that is spatially targeted in two directions. , And a CREW filter having three or more dimensions including the time direction in addition to the two directions.

また、上述した各実施形態では、CReW計算部112において、処理コストと動作の安定化のために、圧縮画像を生成してからCReW計算を行う好適例を説明したが、CReW計算部112において上記の圧縮画像を生成せずに非圧縮の処理対象画像に対して直接的に、上記の複素矩形ウェーブレット(CReWフィルタ)の各要素値をλ/4個ずつ連続させてCReWフィルタを冗長化させたCReW計算を行うことで、圧縮画像を生成する場合と同等の信号ベクトルを得ることができる。この場合、例えばシリアル的に画素値が得られるシステム(ハードウェア上)で当該非圧縮画像の画素値をバッファせずに逐次加減算することができる。 Further, in each of the above-described embodiments, a preferred example in which the CREW calculation unit 112 performs the CREW calculation after generating a compressed image in order to stabilize the processing cost and operation has been described. The CREW filter is made redundant by continuously connecting each element value of the above complex rectangular wavelet (CREW filter) by λ / 4 directly to the uncompressed processed target image without generating the compressed image of. By performing the CREW calculation, it is possible to obtain a signal vector equivalent to that in the case of generating a compressed image. In this case, for example, in a system (on hardware) where pixel values can be obtained serially, the pixel values of the uncompressed image can be sequentially added or subtracted without buffering.

また、上述した各実施形態では、特定の用途について詳細に説明したが、本発明に係る位相差検出器11は、時間方向又は空間方向の一組の画像から被写体の位置のずれを示す位相差を利用可能とする用途であれば、種々の用途に利用できる。 Further, in each of the above-described embodiments, the specific use has been described in detail, but the phase difference detector 11 according to the present invention has a phase difference indicating a deviation of the position of the subject from a set of images in the time direction or the space direction. Can be used for various purposes as long as it can be used.

本発明によれば、低処理コストで撮影環境に依らず安定し高精度で位相差を検出することができるので、時間方向又は空間方向の一組の画像から被写体の位置のずれを示す位相差を利用可能とする用途に有用である。 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 Image processing device 10 Imaging camera 10RL Binocular camera 10R Right eye imaging camera 10L Left eye imaging camera 11 Phase difference detector 12 Memory 13 Signal processing unit 14 Display unit 15 Recording unit 16 Operation unit 101 Imaging lens 102 Imaging element 103 Image processing unit 111 Main frequency detection unit 112 Complex rectangular wavelet transform (CREW) calculation unit 113 Phase difference detection unit 114 Coordinate calculation unit

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.
前記複素矩形ウェーブレット変換の基底は、少なくとも4象限の要素値を持つ複素矩形数列のフィルタで表されていることを特徴とする、請求項1に記載の位相差検出器。 The phase difference detector according to claim 1, wherein 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. 前記位相差算出手段は、当該位相差を複素平面上にマッピングされた各信号ベクトルのマンハッタン距離により算出することを特徴とする、請求項1又は2に記載の位相差検出器。 The phase difference detector according to claim 1 or 2, wherein the phase difference calculating means calculates the phase difference by the Manhattan distance of each signal vector mapped on a complex plane. 前記CReW計算手段は、前記波長を基に前記処理対象画像をそれぞれ空間的に少なくとも一方向に分割・圧縮し、該一方向の画素数がN(N≧4)となる圧縮画像を生成し、該圧縮画像に対して複素矩形ウェーブレット変換(CReW)を行うことを特徴とする、請求項1から3のいずれか一項に記載の位相差検出器。 The CREW calculation means spatially divides and compresses the image to be processed in at least one direction based on the wavelength, and generates a compressed image in which the number of pixels in the one direction is N (N ≧ 4). The phase difference detector according to any one of claims 1 to 3, wherein a complex rectangular wavelet transform (CREW) is performed on the compressed image. 前記CReW計算手段は、前記波長の1/4で分割・圧縮した一方向がN(N≧4)画素の圧縮画像に対して4象限の要素値を持つCReWフィルタを基底とする複素矩形ウェーブレット変換を行うことを特徴とする、請求項4に記載の位相差検出器。 The CREW calculation means is a complex rectangular wavelet transform based on a CREW filter having element values of four quadrants for a compressed image having N (N ≧ 4) pixels in one direction divided and compressed at 1/4 of the wavelength. 4. The phase difference detector according to claim 4. 前記CReW計算手段は、前記波長の1/4で分割・圧縮した一方向がN(N>4)画素の圧縮画像に対して4象限の要素値を持つCReWフィルタを基底とする複素矩形ウェーブレット変換を行い、画素のアドレスに応じて複数種類の信号ベクトルを生成することを特徴とする、請求項4又は5に記載の位相差検出器。 The CREW calculation means is a complex rectangular wavelet transform based on a CREW filter having element values of four quadrants for a compressed image having N (N> 4) pixels in one direction divided and compressed at 1/4 of the wavelength. The phase difference detector according to claim 4 or 5, wherein a plurality of types of signal vectors are generated according to the address of the pixel. 前記CReW計算手段は、前記処理対象画像に対して直接的に、前記複素矩形ウェーブレット変換の各要素値を前記波長の1/4ずつ連続させてCReWフィルタを冗長化させたCReW計算を行うことを特徴とする、請求項1から3のいずれか一項に記載の位相差検出器。 The CREW calculation means directly performs a CREW calculation on the image to be processed by making each element value of the complex rectangular wavelet transform continuous by 1/4 of the wavelength to make the CREW filter redundant. The phase difference detector according to any one of claims 1 to 3, wherein the phase difference detector is characterized. 前記CReW計算手段は、前記複素矩形ウェーブレット変換として、空間的に一方向を対象とした一次元のCReWフィルタ、空間的に二方向を対象とした二次元のCReWフィルタ、又は該二方向に加え時間方向を含む三次元以上のCReWフィルタを基底とするウェーブレット変換を行うことを特徴とすることを特徴とする、請求項1から7のいずれか一項に記載の位相差検出器。 The CREW calculation means, as the complex rectangular wavelet transform, is a one-dimensional CREW filter that is spatially targeted in one direction, a two-dimensional CREW filter that is spatially targeted in two directions, or a time added to the two directions. The phase difference detector according to any one of claims 1 to 7, wherein the wavelet transform is performed based on a CREW filter having three or more dimensions including a direction. 当該位相差検出器は、時間方向に連続する画像から当該位相差を逐次検出するように構成され、
前記主周波数検出手段は、当該位相差を逐次検出する際の初期値として前記波長を算出する手段、及び、前記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.
時間方向に連続する画像から当該位相差を逐次検出するように構成された、請求項1から10のいずれか一項に記載の位相差検出器と、
該位相差を基に、被写体の画像上の移動速度の検出処理、又は被写体の動きの追跡処理、或いは被写体の動的変化の検出を行う信号処理手段と、
を備えることを特徴とする画像処理装置。
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.
空間方向に同時・同方向に撮像された一組の画像から当該位相差を逐次検出するように構成された、請求項1から10のいずれか一項に記載の位相差検出器と、
該位相差を基に、被写体に係る物理的な距離測定処理を行う信号処理手段と、
を備えることを特徴とする画像処理装置。
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.
コンピュータを、請求項1から10のいずれか一項に記載の位相差検出器として機能させるためのプログラム。 A program for causing a computer to function as the phase difference detector according to any one of claims 1 to 10.
JP2018101403A 2018-05-28 2018-05-28 Phase difference detector, image processing device, and program Active JP7057717B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10198657A (en) * 1997-01-08 1998-07-31 Toshiba Corp Signal processing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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