Movement vector detection device

Abstract: The present invention relates to a movement vector detection apparatus for obtaining the movement amount of an image from the density difference between frames and the spatial inclination. More particularly, the present invention relates to a movement vector detection apparatus having a first operation circuit for operating the movement vector in accordance with an estimation equation approximating an influence of the diagonal spatial inclination component, a second operation circuit for obtaining a signal denoting the amount of the diagonal spatial inclination component of a supplied image signal and a third operation circuit for averaging the output from the first operation circuit under a weight which corresponds to the output from the second operation circuit.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to a movement vector detection device, and, more particularly to a movement vector detection device for use in an optical imaging apparatus such as a TV camera, an electronic camera, a video camera and an industrial image measurement meter. In particular, the present invention relates to a movement vector detection device for use in an optical imaging apparatus possessing a vibration isolation function and a tracking function. Related Background Art A method of detecting a movement vector by processing an image signal is exemplified by a time spatial inclination method disclosed in U.S. Patent No. 3,890,462. By letting the image displacement amount in the direction x be α and the image displacement amount in the direction y be β, they are calculated from the following equations in accordance with the former method: α = {Σ B g y ' 2 (Σ B g x 'd) - (Σ B g x 'g y ') (Σ B g y 'd)} /{Σ B g x ' 2 Σ B g y ' 2 - (Σ B g x 'g y ') 2 } β = {Σ B g x ' 2 (Σ B g y 'd) - (Σ B g x 'g y ') (Σ B g x 'd)} /{Σ B g x ' 2 Σ B g y ' 2 - (Σ B g x 'g y ') 2 } In accordance with the latter method, they can be calculated by the following equations: α = Σ B d·sign(g x ')/Σ B g x ′ β = Σ B d·sign(g y ')/Σ B g y ′ where d is the density (level) difference at the same position between the images which are time sequentially continued, that is, the time inclination, g x ' and g y ' are respectively spatial inclination ∂g(x,y)/∂x in the direction x and spatial inclination ∂g(x,y)/∂y in the direction y when the image is expressed by g, Σ B means the sum calculation within a block which is a unit calculation region consisting of a plurality of pixels and sign ( ) is a function for transmitting the sign of g x ' and g y '. Although the movement vector calculation by using Equation (1) has been used in accordance with the conventional inclination method, Equation (2) has attracted attention in an actual time image processing in which high speed calculations are required. However, a problem arises in Equation (2) in that the accuracy excessively deteriorates when Σ B g X 'g Y ' is a large value because Equation (2) is obtained by simplifying Equation (1) in such a manner that the term ε B g X 'g Y ' of Equation (1) is approximated by 0. A concern of the present invention is to provide a movement vector detection device which is capable of overcoming the above-described problems, in which accuracy deterioration can be prevented and which is suitable for real time processing. In accordance with the present invention there is provided a device for detecting movement vectors as set out in claim 1. In order that the present invention may be more readily understood embodiments thereof will now be described by way of example and with reference to the accompanying drawings. British Patent Specification No. GB-A-2,165,417 disclosed apparatus for converting a film image into a video image which detects motion vectors but does not use a weighted average in determining a final motion vector. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a structural block diagram which illustrates an embodiment of the present invention; Fig. 2 is a comparison view which illustrate a result of an estimation made about the vertical movement amount with respect to the horizontal movement amount according to the present invention and the conventional structure; Fig. 3 is a structural block diagram which illustrates a third embodiment of the present invention; Fig. 4 is a structural block diagram which illustrates a fourth embodiment of the present invention; Fig. 5 illustrates the frequency characteristics of a cross filter 14; Fig. 6 illustrates a result of a comparison made about the result of an estimation of the vertical movement amount with respect to the horizontal movement amount realized by the cross filter with that realized by a low-pass filter; Fig. 7 is a circuit diagram which illustrates a filter for limiting the diagonal component in a spatial region; Fig. 8 illustrates a method of designing a convolution mask for band-limiting the diagonal component; Fig. 9 is a structural block diagram which illustrates an embodiment of the present invention; Fig. 10 illustrates a result of a simulation made in according with the conventional structure; Fig. 11 is a flow chart for a pattern classification operation performed according to the embodiment of the present invention; and Figs. 12 and 13 are block diagrams which illustrate embodiments in which the movement vector detection device according to the present invention is applied to an image deviation compensating device for a video camera or the like. THE DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of a movement vector detection device according to the present invention will now be described with reference to the drawings. Fig. 1 is a block diagram which illustrates the structure of an embodiment of the present invention. Referring to Fig. 1, reference numeral 10 represents a terminal to which image signals are supplied and 12 represents a register for storing (that is, time delaying) the input signals for one field (or frame). Reference numeral 14 represents a subtracter for subtracting the output from the register 12 from an image signal supplied to the input terminal 10. Reference numeral 16 represents a register for storing (that is, time delaying) the input signals for a scanning time for a plurality of pixels which are necessary to calculate the spatial inclination of an image density distribution. Reference numeral 18 represents a subtracter for subtracting the output from the register 16 from the image signal supplied to the input terminal 10. Reference numeral 20 represents a register for storing (that is, time delaying) the image signals supplied to the input terminal 10 for a predetermined scanning period, so that the spatial inclination in a direction perpendicular to spatial inclination is obtained by the register 16 and the subtracter 18. Reference numeral 22 represents a subtracter for subtracting the output from the register 20 from the image signal supplied to the input terminal 10. Reference numeral 24 represents a sign output circuit for transmitting a signal denoting the sign (positive, negative or zero) of the output from the subtracter 18. Reference numeral 26 represents a multiplier for multiplying the output from the subtracter 14 by the sign denoted by the signal transmitted from the sign output circuit 24. Reference numeral 28 represents a multiplier for multiplying the output from the subtracter 18 by the output from the subtracter 22. Reference numeral 30 represents an absolute value circuit for transmitting the absolute value of the output from the subtracter 24. Reference numerals 32, 34, 36 respectively represent summing circuits for cumulatively adding output data from the multiplier 32, the absolute value circuit 30 and the multiplier 28. Reference numeral 38 represents a divider for dividing the output from the summing circuit 32 by the output from the summing circuit 34. The outputs from the divider 38 are movement vectors for the corresponding blocks. Reference numeral 40 represents a memory for storing the movement vector for each of the blocks. Reference numeral 42 represents an arrangement circuit for arranging (sorting) the movement vectors for the corresponding blocks to be stored by the memory 40, the movement vectors being arranged in accordance with the magnitude of the outputs Σ B g' x ·g' y from the summing circuit 36. Reference numeral 44 represents a weighted averaging circuit for averaging the movement vectors, which have been arranged by the arranging circuit 42, while properly weighting the movement vectors. Reference numeral 46 represents an output terminal through which the final movement vectors are transmitted. Then, the operation will now be described with reference to Fig. 1. An image signal g supplied to the input terminal is divided into three passages. That is, the density difference (level difference) between two fields (or frames) which are time sequentially continued, that is, time inclination d, is calculated by the register 12 and the subtracter 14. Furthermore, the x-directional spatial inclination g x ′ in the former field (or frame) is calculated by the register 16 and the subtracter 18. Furthermore, the y-directional spatial inclination g y ′ in the former field (or frame) is calculated by the register 20 and the subtracter 22. The x-directional spatial inclination g x ′ is supplied to the sign output circuit 24, the absolute value circuit 30 and the multiplier 28. The sign output circuit 24 transmits "+1" when the spatial inclination g x ′ is positive, "0" when the same is zero and "- 1" when the same is negative. The absolute value circuit 30 transmits the absolute value of the spatial inclination g x ′. The multiplier 26 multiplies the time inclination d (the output from the subtracter 14) by the output from the sign output circuit 24. The summing circuits 32 and 34 respectively sum up the outputs from the multiplier 26 and the absolute value circuit 30 in a detection block composed of a predetermined number of pixels. That is, the summing circuit 32 calculates Σ B d·sign(g x '), while the summing circuit 34 calculates Σ B |g x ′|. The divider 38 divides the output from the summing circuit 32 by the output from the summing circuit 34. The output from the divider 38 corresponds to α of the above-described Equation (2). As a result, the one-dimensional (horizontal or vertical) movement amount can be obtained. The multiplier 28 multiplies the x-directional spatial inclination g x ′ by the y-directional spatial inclination g y ′. The summing circuit 36 sums up the outputs from the multiplier 28 in the similar block for the summing circuits 32 and 34. The output Σ B g x '·g y ' from the summing circuit 36 is the term approximated to zero in order to simplify Equation (1) to Equation (2). Therefore, the reliability or the certainty of the movement vector (the output from the divider 38) can be determined in accordance with the output from the summing circuit 36 by examining Σ B g x '·g y '. That is, if the output from the summing circuit 36 is sufficiently approximated to zero, the result of the estimation made by using Equation (2) is reliable. On the contrary, if the same is a large value, the reliability is insufficient. Therefore, the movement vector obtained by the divider 38 is temporarily stored in the memory 40 before it is arranged by the arrangement circuit 42 in accordance with the magnitude of Σ B g x '·g y '. In the weighted averaging circuit 44, the averaging operation is performed in such a manner that the weight is increased in inverse proportion to Σ B g x '·g y '. As a result, a signal denoting a further reliable image movement amount can be obtained from the output terminal 46. Then, an effect of this embodiment will now be described with reference to Fig. 2. Fig. 2 is a graph which illustrates a result of a simulation performed in a case where this embodiment is applied to an image signal of horizontal x vertical x gradation = 256 x 256 x 8 bits obtained from a solid imaging element camera. The axis of abscissa of the graph stands for the horizontal movement of the image, while the axis of ordinate of the same stands for the estimation amount generated in the vertical direction due to the horizontal movement of the image. The graph shows the result of the estimation about an output denoting the number of vertical pixels in which the image is moved when the image has been moved in the horizontal direction by 1 to 10 pixels. Since no vertical movement is not made in actual fact, the result of the estimation in the vertical direction is, so to call, an erroneous detection amount. Referring to Fig. 2, symbol O denotes erroneous detection amount according to this embodiment and X denotes the erroneous detection amount obtained by a conventional inclination method in which Equation (2) is simply used. The result expressed by the mark O shown in Fig. 2 and according to this embodiment is obtained by averaging Σ B g x '·g y ' while increasing the weight in inverse proportion to its magnitude. As can be seen from Fig. 2, the erroneous detection amount can be significantly reduced according to the present invention. In this simulation, the number of the blocks in one frame is arranged to be 16 and the movement blocks obtained in the corresponding blocks are arranged in accordance with the inverse proportion to the evaluation function Σ B g x '·g y '. Furthermore, the averaging operation is performed in such a manner that the weight is decreased successively starting from 16 (16:15:14:,..., :3:2:1) of a constant inclination. According to the above-described embodiment, the weighting method, which is employed at the time of averaging the output results from the detection blocks, is arranged to use the sequential order in accordance with the magnitude of the evaluation function Σ B g x '·g y '. Therefore, the necessity of storing the values of the evaluation function after a comparison with the evaluation function Σ B g x '·g y ' for each of the blocks has been made can be eliminated. As a result, the algorithm can be simplified because only the relationship of the magnitude of the evaluation function is extracted. Then, a weighting method characterized in that the magnitude of the evaluation function is considerably reflected will now be described. That is, a method of weighting, which is performed in the weighted averaging circuit 44, may be employed which is arranged in such a manner that the movement vector obtained from the output from the divider 38 is multiplied by an inverse number of the evaluation function Σ B g x '·g y '. As a result, the value of the evaluation function Σ B g x '·g y ' is reflected, the reliability of the movement vector can be further improved. In this case, the arranging circuit 42 can, of course, be omitted from the structure. That is, letting the output results from the blocks be α 1 , α 2 ..., α m , the weighted averaging equation in which the inverse numbers of the evaluation function are used as the weight can be expressed by the following equation: α = α/Σ B1 g x ′·g y ′ + α 2 /Σ B2 g x ′·g y ′ ··· +α m /Σ Bm g x ′·g y ′ 1/Σ B1 g x ′·g y ′ +1/Σ B2 g x ′·g y ′ + ··· +1/Σ Bm g x ′·g y ′ According to any one of the above-described embodiments, Σ B g x '·g y ' is employed as the evaluation function. The evaluation function of Σ B g x '·g y ' has a physical meaning of a spatial inclination component of the image in a diagonal direction. Therefore, the fact that the value of the above-described evaluation function is large means a fact that the diagonal spatial inclination component is large. According to the above-described embodiments, the evaluation function denoting the diagonal spatial inclination function is arranged to be the sum |Σ B g x '| + |Σ B g y '| of the absolute value |Σ B g X '| of the sum of the horizontal spatial inclinations in a block and the absolute value |Σ B g y ′| of the sum of the vertical spatial inclinations in a block. Fig. 3 is a structural block diagram which illustrates this embodiment, where the same elements as those shown in Fig. 1 are given the same reference numerals. Then, the portions changed from those shown in Fig. 1 will be described. Reference numerals 48 and 50 represent the summing circuits arranged similarly to the summing circuits 32 and 34, the summing circuits 48 and 50 calculating the outputs from the subtracters 18 and 22 for each block. Reference numerals 52 and 54 represent absolute value circuits for calculating the absolute values of the summing circuits 48 and 50. An adder 56 adds the outputs from the absolute value circuits 52 and 54. The arranging circuit 58 arranges the movement vectors in the memory 40 in accordance with their values. The weighted averaging circuit 60 weights the arranged order established by the arranging circuit 58 so as to average it, the result of the averaging operation being transmitted to an output terminal 62. The adder 56 transmits the value of |Σ B g x ′| + |Σ B g y ′| which denotes the diagonal inclination component amount. The weighted averaging circuit 60 rates the movement vector in a block, in which the diagonal component is large, low, while rates the movement vector in a block, in which the diagonal component is small, high. However, if the value of |Σ B g x ′| and that of |Σ B g y ′| are excessively different, for example, if either one is 20 times or larger than the other one, it means, according to the embodiment shown in Fig. 3, a fact that there is one directional spatial inclination in the horizontal direction or the vertical direction. The actual fact is that the diagonal component is small. Therefore, it is necessary to perform the weighting operation in consideration of the above-described fact in the weighted averaging circuit 60. As will be easily understood from the above, the deterioration in the detection accuracy due to the diagonal component can be prevented. Therefore, the movement vector can be detected accurately and at high speed. Then, a fourth embodiment of the present invention will now be described with reference to Figs. 4 to 8, the fourth embodiment being arranged to be capable of preventing the deterioration of the accuracy in detecting the movement vector due to the diagonal spatial inclination of an image. According to the fourth embodiment of the present invention, there is provided a movement vector detection device including a filter means for band limiting the diagonal spatial inclination component of a supplied image signal and operation means for operating the vector in accordance with an estimation equation which approximates the influence of the diagonal spatial inclination component. That is, the limiting operation of the diagonal spatial inclination component performed in the above-described embodiments is carried out by means of the filter means. Then, the movement vector detection device according to this embodiment of the present invention will now be described with reference to the drawings. Fig. 4 is a structural block diagram which illustrates the embodiment of the present invention. Reference numeral 110 represents an input terminal through which the image signal is supplied. Reference numeral 112 represents a two-dimensional Fourier transformation circuit and 114 represents a cross filter having a cross shaped frequency characteristics. Reference numeral 116 represents a two-dimensional inverse Fourier transformation circuit and 118 represents a register for storing (that is, time delaying) the supplied signal for one field (or frame) period. Reference numeral 120 represents a register for storing (that is, time delaying) the input signal for a scanning time for a plurality of pixels which are necessary to calculate the spatial inclination of the image density distribution. Reference numerals 122 and 124 represent subtracters and 126 represents a sign output circuit for transmitting a signal denoting the sign (positive, negative or zero) of the input signal (the spatial inclination is denoted by the output from the subtracter 124). Reference numeral 128 represents a multiplier and 130 represents an absolute value circuit for transmitting the absolute value of the output from the subtracter 124. Reference numerals 132 and 134 represent summing circuits for cumulatively adding data in a specified block and 136 represents a divider for dividing the output from the summing circuit 132 by the output from the summing circuit 134. Reference numeral 138 represents an output terminal through which a signal denoting the horizontal or vertical movement amount of an image transmitted. Then, the operation will now be described with reference to Fig. 4. An image signal g 0 supplied to the input terminal 110 is subjected to the two-dimensional Fourier transformation by the Fourier transformation circuit 112 so as to be a signal G 0 . The output G 0 from the Fourier transformation circuit 112 is supplied to the cross filter 114 so that its horizontal and vertical components are transmitted and the component of the inclination in the diagonal direction is removed. The output from the cross filter 114 is subjected to the inverse Fourier transformation by the inverse Fourier transformation circuit 116. That is, an output g from the inverse Fourier transformation circuit 116 is an image signal formed by sufficiently removing the diagonal inclination component from the image signal supplied to the input terminal 110. The output g from the inverse Fourier transformation circuit 116 is divided into two passages in either of which the density difference (level difference) between two fields (frames), which are time sequentially continued, that is the time inclination d, is calculated by the register 118 and the subtracter 122. On the other hand, in the other passage, the spatial inclination g′ between a predetermined number of pixels in the present frame (field or frame) is calculated by the register 120 and the subtracter 124. The thus obtained spatial inclination g′ is supplied to the sign output circuit 126 and the absolute value circuit 130. The signal output circuit 126 transmits "+ 1" when the the spatial inclination g′ is positive, "0" when the same is zero and "- 1" when the same is negative. The absolute value circuit 130 transmits the absolute value of the spatial inclination g′. The multiplier 128 multiplies the time inclination d (the output from the subtracter 122) by the output from the sign output circuit 126 so as to transmit d.sign(g′). The summing circuits 132 and 134 respectively sum up the outputs from the multiplier 128 and the absolute value circuit 134 in blocks respectively composed of a predetermined number of pixels. That is, the summing circuit 132 calculates Σ B d·sign(g'), while the summing circuit 134 calculates Σ B |g'|. The divider 136 divides the output from the summing circuit 132 by the output from the summing circuit 134, that is, Σ B d·sign(g')/Σ B |g'| is calculated. Therefore, in a case where the horizontal spatial inclination g x ' is obtained by the register 120 and the subtracter 124, the horizontal movement amount α can be obtained from the output terminal 138. In a case where the vertical spatial inclination g y ′ is obtained by the register 120 and the subtracter 124, the vertical movement amount β can be obtained from the output terminal 138. Then, the operation and effect of the cross filter 114 will now be described with reference to Figs. 5 and 6. Fig. 5 illustrates a pass band characteristic of the cross filter 114 designed for treating an image of 256 x 256 x 1 byte taken from a video camera, the filter 114 having a size of 256 x 256 which is the same as that of the image. The input image g 0 is transformed into G 0 by the two-dimensional Fourier transformation before filtered by the cross filter 114 so that an image spectrum G is obtained. The spectrum G is then again subjected to the two-dimensional inverse Fourier transformation so as to be an image g which has been transformed into an actual space. As a result, the movement amount of the image is calculated. The horizontal movement amount was estimated by using the above-described Equation (2) for an actual time treatment in a case where the cross filter having the above-described characteristics was used and that was estimated in a case where a simple low-pass filter of 20 x 20 was used. Fig. 6 illustrates the result of the estimation of the vertical image movement amount with respect to its horizontal movement amount when the image has been moved by 1 to 10 pixels in only the horizontal direction. Referring to Fig. 6, symbol O denotes the result of the estimation according to this embodiment in which the cross filter is used, while X denotes the result of the estimation in a case where the low-pass filter is used. Since the image is move in only the horizontal direction in the above-described simulation, the result of the estimation of the vertical movement amount is to be zero ideally. However, the result of the estimation of the vertical movement amount is not made to be zero due to the influence of the approximation of Equation (2). In a case where the low-pass filter is used, the result of the estimation increases in proportion to the image movement amount. However, according to this embodiment in which the cross filter is used, the image movement amount can be significantly reduced with respect to the result in the case of the low-pass filter although the result of the estimation of the vertical movement amount cannot be made to be exactly zero. Furthermore, the vertical component, that is, the error can be made larger even if the image movement amount has been enlarged. That is, since the diagonal component Σ B g x '·Σ B g y ' is simply made to be "0" in the calculation performed in accordance with Equation (2), the accuracy is excessively deteriorated if the diagonal inclination component is large. Referring to Fig. 6, the results plotted by X denote the detected movement amount of the image in the vertical direction in a case where the spectrum G of the image is multiplied by a 20 x 20 square low-pass filter and Equation (2) is applied to the image which has been transformed into an actual space by the two-dimensional Fourier transformation. As can be clearly seen from the above, the actual movement amount of the image is increased and as well as the output is enlarged. This fact means the enlargement of the error. On the other hand, the results plotted by O denote the detected movement amount of the image in the vertical direction in a case of the present invention in which the spectrum G (fx, fy) of the image is multiplied by the above-described cross filter and Equation (2) is applied to the image which has been transformed into an actual space by the two-dimensional Fourier transformation. The results plotted by O show an excellent result of preventing the increase in the vertical component, that is, the error, in comparison to the results plotted by X. Although the band of the diagonal inclination component is limited by the frequency region according to the embodiment shown in Fig. 4, it may be limited by the spatial region. Fig. 7 illustrates an example of the structure of the circuit for use in a filter designed to limit it by the spatial region. Fig. 7 illustrates an example of the structure of a filter circuit for removing the diagonal inclination component of an analog TV signal. Referring to Fig. 7, reference numeral 140 represents an input terminal through which an analog TV singal is supplied. Reference numerals 142 and 144 represent delay circuits for one horizontal scanning period. Reference numeral 146 represents an addition circuit for adding a signal supplied to the input terminal 140, a signal which has been delayed by one horizontal scanning period by the delay circuits 142 and a signal which has been delayed by two horizontal scanning periods by the delay circuits 142 and 144, the above-described signals being respectively applied with weights of -1/4, 1/2 and -1/4. Reference numeral 148 represents a band pass filter (BPF) and 150 represents a delay circuit for adjusting the degree of the delay of the BPF 148. Reference numeral 152 represents a subtracter for subtracting the output from the BPF 148 from the output from the delay circuit 150. Reference numeral 154 represents an output terminal. In a case where the polarity of each of the TV signals on the upper and lower scanning lines with respect to an optional scanning line have been inverted, the output from the BPF 148 and that from the delay circuit 150 become the same. Therefore, the output from the output terminal 154 becomes zero in the pass band region for the BPF 148, causing the diagonal inclination component to be removed. Another method is available which is arranged in such a manner that the mask for an image is subjected to a convolution calculation in a spatial region, whereby the band of the diagonal inclination component is limited. Since this method is mathematically equivalent to the process shown in Fig. 4, the Fourier transformation and the inverse Fourier transformation can be omitted from the structure. Therefore, the processing speed can be raised and the structure of the hardware can be simplified. Referring to Fig. 8, a method of designing the mask in a spatial region will now be described. The design procedure is arranged as follows: first, a function denoting a low-pass filter (an A X A square around the origin shown in Fig. 8) including a cross filter which is desired to be designed in the frequency region is determined. Then, a function denoting the four corners of the low-pass filter is determined. Subsequently, the thus determined two functions are subjected to a subtraction. As a result, a function having a cross shaped frequency characteristic in the frequency region can be obtained approximately. The function obtained due to the above-described subtraction is subjected to a Fourier transformation, resulting a convolution mask in a spatial region to be obtained. Then, a description will now be made by using a specific function of the convolution mask in the spatial region. Referring to Fig. 8, a low-pass filter a side of which is A is approximated by the following equation: F 1 = 4/A 2 sinc (2/A·fx)·sinc (2/A·fy) In this case, the width, with which the sinc function first becomes 0 when viewed from a low frequency side, is made coincide with A. Now, let the center coordinates of a hatched section of Fig. 8 be (±α, ±α) and this is approximated by the following equation. F 2 = {sinc(2/B·fx - α) + sinc (2/B·fx + α)} x {sinc(2/B·fy - α) + sinc (2/B·fy + α)} x 4/B 2 Transforming this, the following equation can be obtained: F 2 = [sinc (2/B·fx) * {δ(fx - α) + δ(fx + α)}] x [sinc (2/B·fy) * {δ(fy - α) + δ(fy + α)}] x 4/B 2 where * is an operator for the convolution operation. Also in this case, the width, with which the sinc function first becomes 0 when viewed from the centers of four hatched sections, is made coincide with B shown in Fig. 8. Subtracting F 2 from F 1 , the following result can be obtained. F = F 1 - F 2 = 4 A 2 sinc ( 2 A · fx) ·sinc ( 2 A · fy) - 4 B 2 [sinc ( 2 B · fx) * {δ(fx-α) + δ(fx + α)}] x [sinc( 2 B · fy) * {δ(fy-α) + δ (fy + α)}] Letting the inverse Fourier transformation of F be f, the following result can be obtained. f = rect(Ax/2)·rect(Ay/2) - rect(Bx/2){exp(-j2π x α) + exp(j2π x α)} rect(By/2){exp(-j2πyα) + exp (j2πyα)} = rect(Ax/2)·rect(Ay/2) - 2cos(2πxα)·cos(2πyα) x rect(Bx/2)·rect(By/2) Since α = (A - B)/2, α can be eliminated and the following result is obtained: f = rect(Ax/2)·rect(Ay/2) - 2cos(2πx(A-B)/2)·cos(2πy(A-B)/2) x rect(Bx/2)·rect(By/2) By substituting desired A and B into the above-described equation, a desired convolution mask in a spatial region can be designed. As will be easily understood from the above, the deterioration in the detection accuracy due to the diagonal component can be prevented according to the present invention. As a result, the movement vector can be accurately detected at high speed. A seventh embodiment of the present invention will now be described. As described above, the displacement of an image can be given from Equation (2) in such a manner that the x-directional movement amount is obtained from the x-directional spatial inclination and the density difference and the y-directional movement amount is obtained from the y-directional spatial inclination and the density difference. Therefore, the influence of the spatial inclinations in the relative directions of x and y is not taken into consideration. As a result, the two-dimensional image movement cannot be satisfactorily treated by the above-described method. It will now be further specifically described with reference to Fig. 10. Fig. 10 illustrates the result of a detection made by the conventional method in a case where an image having a diagonal (right down) direction is sectioned into 16 blocks and they are moved in an upper right direction as shown in the upper portion of Fig. 10, the result being illustrated with the movement vector for each block. Circular arcs shown in Fig. 10 are constant density lines. In blocks #6, #11 and #16, strong diagonal spatial inclination components are shown. However, the time spatial inclination method is premised on that "there is no large time spatial inclination in the diagonal direction in a block". Since the above-described results do not meet this premise, correct estimations are not made in both the directions x and y. In blocks #2, #3 and #4, although the x-directional movement is correctly estimated, the y-directional movement is not correctly estimated. In blocks #5, #9 and #13 contrarily to the blocks #2, #3 and #4, the y-directional movement is correctly estimated but the x-directional movement is not estimated correctly. The reason for this lies in that "the movement in a direction in which there is no spatial inclination cannot be estimated" according to the time spatial inclination method. In addition, in blocks #7, #8, #10 and #14, a critical error is generated in a direction in which the spatial inclination is small due to the same principle of the time spatial inclination method. Accordingly, an object of the present invention is to provide a high speed and accurate movement vector detection device which can overcome the above-described problems and which can be adapted to the actual time process. In order to achieve this object, there is provided a movement vector detection device for obtaining the image movement amount from the density difference between frames and the spatial inclination in a frame, the movement vector detection device comprising: first operation means for operating the movement vector for each block in accordance with an estimation equation which approximates the influence of a diagonal spatial inclination component; second operation means for obtaining a signal denoting the diagonal spatial inclination component amount of an input image signal; classifying means for classifying the blocks into patterns which correspond to the result of the operation performed by the second operation means; and averaging means for averaging the movement vectors of the corresponding blocks obtained by the first operation means by the weight which is determined in accordance with the classification made by the classifying means. As a result of the operation of the first operation means, the movement vector is basically obtained from an approximated estimation equation. Therefore, the process can be completed at high speed. Furthermore, since the blocks are classified in consideration of the diagonal spatial inclination component amount by the second operation means and the classifying means and the averaging means performs the weighted averaging operation in accordance with the thus made classification, the evaluation of the estimated result involving an error generated due to the approximated estimation equation can be lowered. Therefore, the movement vector can be reliably obtained. Specifically, the distribution of the spatial inclination is classified into a plurality of simple patterns. Furthermore, the result of the estimation of the movement amount in a direction in which each of the blocks can be easily detected is raised, while that in a direction in which they cannot be correctly detected is lowered. Therefore, the error generated when the principle or the assumption of the inclination method cannot be met can be prevented. Then, this embodiment will now be described with reference to the drawings. Fig. 9 is a structural block diagram which illustrates an embodiment of the present invention in which the structure of the present invention is applied to a frame shake preventing apparatus for a TV camera or video camera. Referring to Fig. 9, reference numeral 210 represents an input terminal through which an image signal is supplied. Reference numeral 212 represents a register for storing (that is, time delaying) the input signals for one field (or frame). Reference numeral 214 represents a subtracter for subtracting the output from the register 212 from an image signal supplied to the input terminal 210. Reference numeral 216 represents a register for storing (that is, time delaying) the input signals for a scanning time for a plurality of pixels which are necessary to calculate the x-directional spatial inclination of an image density distribution. Reference numeral 218 represents a subtracter for subtracting the output from the register 216 from the image signal supplied to the input terminal 210. Reference numeral 220 represents a register for storing (that is, time delaying) the image singals supplied to the input terminal 210 for a predetermined scanning period, so that the y-directional spatial inclination is obtained. Reference numeral 222 represents a subtracter for subtracting the output from the register 220 from the image signal supplied to the input terminal 210. The output from the subtracter 214 is the density inclination d, the output from the subtracter 218 is the x-directional spatial inclination g x ′ and the output from the subtracter 222 is the y-directional spatial inclination g y ′. Reference numerals 224 and 226 respectively represent sign output circuits for transmitting a signal denoting the sign (positive, negative or zero) of the outputs from the subtracters 218 and 222. Reference numerals 228 and 230 respectively represent multipliers for multiplying the outputs from the sign output circuits 224 and 226 by the output (the density inclination d) from the subtracter 214. Reference numerals 232 and 234 respectively represent absolute value circuits for transmitting the absolute values of the outputs from the subtracters 218 and 222. Reference numerals 236 represents a multiplier for multiplying the output g x ' from the subtracter 218 by the output g y ' from the subtracter 222. Reference numerals 238, 240, 242, 244, 246, 248 and 250 are respectively summing circuits for summing up the output data from the multiplier 228, the absolute value circuit 232, the multiplier 230, the absolute value circuit 234, the multiplier 236, the subtracter 218 and the subtracter 222. Reference numeral 252 represents a divider for dividing the output from the summing circuit 238 by the output from the summing circuit 240. Reference numeral 254 represents a divider for dividing the output from the summing circuit 242 by the out from the summing circuit 244. Reference numeral 256 represents a divider for dividing the output from the summing circuit 248 by the output from the summing circuit 250. The output from the subracter 252 shows the movement amount in the direction x, while the output from the subtracter 254 represents the movement amount in the direction y. Reference numeral 258 represents an absolute value circuit for transmitting the absolute value of the output from the divider 256. Reference numeral 260 represents a memory for storing the movement amounts transmitted from the dividers 252 and 254 and the spatial inclination information transmitted from the absolute value circuit 258. Reference numeral 262 represents a pattern classifying circuit for classifying, as described later, the blocks into a plurality of spatial inclination patterns in accordance with the spatial inclination information. Reference numeral 264 represents an averaging circuit for averaging the blocks, which have been classified by the classifying circuit 262, while properly weighting them. Reference numeral 266 represents an output terminal for transmitting the movement vector, which is the result of the detection. Then, the operation will now be described with reference to Fig. 19. The register 212 and the subtracter 214 calculate the density difference in the two fields (or frames) which are time sequentially continued, that is, the time inclination d from the image signal g supplied to the input terminal 210. The register 216 and the subtracter 218 calculate the x-directional spatial inclination g x ′ in the former field (or frame). The register 220 and the subtracter 222 calculate the y-directional spatial inclination g y ' in the former field (or frame). The sign output circuit 224 transmits "+ 1" when the output g x ′ from the subtracter 218 is positive, "0" when the same is zero and "- 1" when the same is negative. The absolute value circuit 230 transmits the absolute value of the spatial inclination g x . The multiplier 228 multiplies the output d from the subtracter 214 by the output from the sign output circuit 224. Similarly, the sign output circuit 226 transmits a signal denoting the output g y ′ from the subtracter 222. The absolute value circuit 234 transmits the absolute value of the spatial inclination g y ′. The multiplier 230 multiplies the output d from the subtracter 214 by the output from the sign output circuit 226. The summing circuits 238, 240, 242 and 244 respectively sum up the output from the multiplier 228, that from the absolute value circuit 232, that of the multiplier 230 and that of the absolute value circuit 234 in a block composed of a predetermined number of pixels. That is, the summing circuit 238 calculates Σ B d·sign(g x '), the summing circuit 240 calculates Σ B d·|g x '|, the summing circuit 242 calculates Σ B d·sign(g y ') and the summing circuit 244 calculates Σ B |g y '|. The divider 252 divides the output from the summing circuit 238 by the output from the summing circuit 240. The divider 254 divides the output from the summing circuit 242 by the output from the summing circuit 244. The outputs from the dividers 252 and 254 respectively correspond to α and β in the above-described equation. The outputs from the dividers 252 and 254 are temporarily stored in the memory 260. The multiplier 236 multiplies the output g x ' from the subtracter 218 by the output g y ' from the subtracter 222. The summing circuit 246 sums up the outputs from the multiplier 236 in a predetermined block. The summing circuits 248 and 250 respectively sum up the outputs g x ' ang g y ' from the subtracters 218 and 222. The divider 256 divides the output from the summing circuit 248 by the output from the summing circuit 250. The absolute value circuit 258 outputs the absolute value of the output from the divider 256. That is, the absolute value 258 outputs |Σ B g x '/Σ B g y '| The output Σ B g x '·g y ' from the summing circuit 246 and the output from the absolute value circuit 258 are supplied to the memory 260. The pattern classifying circuit 262 classifies each of the blocks into a plurality of simple patterns from information about |Σ B g x '/Σ B g y '| and Σ B g x '·g y ' stored in the memory 260. The flow chart about this classifying operation is shown in Fig. 10. That is, if Σ B g x '·g y ', which serves as a parameter, in a certain block is larger than predetermined threshold Th (S1), a determination is made that the diagonal spatial inclination component is large. In this case, the result of the output from the subject block is omitted (S2). At this time, it may be weighted in accordance with Σ B g x '·g y ' similarly to the above-described embodiments in place of simply omitting it. Then, if a determination is made that |Σ B g x ′| is considerably larger than |Σ B g y ′| from the result of |Σ B g x ′/Σ B g y ′|, the estimation result α in the direction x is evaluated high, the estimation result β in the direction y is evaluated low (S4). If a determination is made that |Σ B g x ′| is substantially the same as |Σ B g y ′|, both the estimation resuls α and β in the directions x and y are determined to be reliable and evaluated high (S5). If |Σ B g x ′| is sufficiently smaller than |Σ B g y ′|, the estimation result β in the direction y is evaluated high and the estimation result α in the direction x is evaluated low (S6). As described above, each of the blocks is classified and weighting them in accordance with the result of the classification in the averaging circuit 264 so as to average the result of the estimation of each of the blocks. The averaged results are transmitted from the output terminal 266. As a result, the influence of the detected block which prossesses steep diagonal spatial inclination and thereby involves a large error can be eliminated. Therefore, the movement vector can be detected accurately. As can be easily understood from the above, according to the present invention, the error in the detected result in the movement in a direction in which there is not spatial inclination can be prevented. Furthermore, the error in the detected result generated due to the fact that there is a large diagonal spatial inclination in a block can also be prevented. Therefore, the movement vector can accurate detected at high speed. Figs. 12 and 13 illustrate embodiments in which the above-described movement vector detection circuit is actually applied to a shake compensation device (vibration isolating device) for a video camera. Fig. 12 illustrates a structure arranged in such a manner that a variable apex-angle prism is employed as the shake compensation means, the variable apex-angle prism being arranged in such a manner that the optical axis of an imaging lens is arranged to be variable so as to optically compensate the shake. Referring to Fig. 12, reference numeral 301 represents a variable apex-angle prism arranged in such a manner that the direction of the optical axis of its imaging lens optical system, that is, the apex angle, the variable apex-angle prism being manufactured by injecting silicon type liquid between two parallel glass plates. Reference numeral 302 represents an imaging lens and 303 represents an imaging element such as a CCD for transmitting an signal denoting the result of imaging by photoelectrically converting the subject image imaged by the imaging lens 302. Reference numeral 304 represents a pre-amplifier and 305 represents a camera signal processing circuit for transmitting a standardized video signal by subjecting the signal denoting the result of imaging and transmitted from the imaging element to a variety of processes such as a blanking process, a process of adding a synchronizing signal and a γ-correction process. Reference numeral 306 represents the movement vector detection circuit described in the above-described embodiments. Reference numeral 307 represents a system control circuit for calculating information about the direction of the operation of the variable apex-angle prism which fetches in information about the image movement vector supplied from the movement vector detection circuit 306 so as to compensate the image movement due to the shake of the camera, the system control circuit 307 further calculating the amount of its action. Reference numeral 308 represents a drive circuit for driving the variable apex-angle prism 301 in accordance with information calculated by the system control circuit 307. As a result, the movement vector due to the image shape (camera shake) can be detected by the movement vector detection circuit 306 according to each of the above-described embodiments. Then, the direction and amount of the movement of the variable apex-angle prism can be calculated in accordance with the movement vector thus detected so that the variable apex-angle prism is driven, whereby the shake can be corrected. Since the operation of the movement vector detection circuit is the same as that according to each of the above-described embodiments, its description if omitted here. Fig. 13 illustrates a structure arranged in such a manner that no optical system is used in the shake compensating means, the image is temporarily fetched in a memory and the read region from the memory can be changed whereby the movement of the image can be compensated. The same elements as those according to the embodiment shown in Fig. 12 are given the same reference numerals and their descriptions are omitted here. An image signal transmitted from the preamplifier 304 is converted into a digital signal by an A/D converter 309 before it is received by a memory in a digital signal processing circuit 310. The rate and the timing of the A/D conversion performed for the purpose of making the image to be received by the memory and the writing timing and address are controlled by a memory control circuit 313. Also the reading address from the memory and the timing control are controlled by the memory control circuit 313. A digital image signal read from the memory 310 is subjected to a variety of camera signal processes in the camera signal processing circuit 311. Then, it is converted into an analog signal by a D/A conversion circuit 312 so as to be transmitted as a video signal. It may be transmitted as it is in the form of the digital image signal. In a movement vector detection circuit 315, the movement vector due to the camera shake is detected similarly to the above-described embodiment shown in Fig. 1, the detected movement vector being then supplied to the system control circuit 314. In the system control circuit 314, the direction and amount of the movement of the image are calculated in accordance with the movement vector detected by the movement vector detection circuit 315. As a result, the system control circuit 314 controls the memory control circuit 313 in accordance with the result of the calculations so as to control the memory read range. That is, the image is fetched by the memory at an angle of view wider than an angle of view which is previously transmitted and the read angle is changed at the time of reading the memory so that the movement is compensated. By shifting the read range to the direction of the movement, the movement of the image can be compensated. The above-described structure may be modified in such a manner that the camera signal processing circuit is disposed behind the D/A converter 312 so as to perform the analog signal processing. However, the process can easily be completed by performing the digital signal process and an advantage is obtained in terms of noise elimination. As described above, the shake taken place in a video camera can be compensated by the movement vector detection circuit according to the present invention. Furthermore, the present invention can be widely applied to, for example, punning motion in a camera as well as the shake compensation as a movement detection means. As a result, a video camera possessing a shake compensating function possessing an extremely wide movement detection range, capable of performing the detection compensation of various movements regardless of the extent and exhibiting satisfactorily performance can be realized.

Claims: A device for detecting a movement vector of an image signal output from image sensing means based on an inclination of a variation of the image signal in an image frame, and comprising: first means (12, 14, 24, 26, 32, 16, 18, 20, 22, 30, 32, 34, 38) for receiving the image signal and determining the movement vector by detecting the inclination (gx', gy') of a variation of the image signal within the frame; and second means (36) for detecting a diagonal inclination component of the image signal and for outputting a diagonal inclination signal; and characterised in that there is additionally provided: third means (40, 42, 44) for averaging the movement vector signal output from said first operation means in a weighted manner, the weighting being in accordance with the diagonal inclination signal output from said second means so as to generate a weighted-averaged movement vector. A device according to claim 1 wherein the first means includes first calculating means (12, 14) for calculating the time inclination (d) of a motion vector in the image signal. A device according to claim 2 wherein the means for calculating the time inclination comprise a register (12) for storing a frame of the image signal and a subtractor (14) for subtracting the contents of said register from the image signal. A device according to claim 3, wherein the first means include calculating means (16, 18) for calculating a first diagonal directional spatial inclination of the movement vector and means (24, 26, 30, 32, 34, 38) for deriving the movement vector from the time inclination calculation means and the diagonal directional calculation means. Apparatus according to claim 4, wherein the means for deriving the movement vector comprise a multiplier (26) for multiplying the output of the subtractor with the sign of the output of said second calculating means. Apparatus according to claim 5, wherein said first means include means (32) for summing the output of said multiplier, means (34) for summing the absolute value of said second calculating means and means (38) for dividing the outputs of said summing means. Apparatus according to any one of claims 2 to 6, wherein the third calculating means comprise a register (20) for delaying the input signal and a subtractor (22) for subtracting the input signal from the contents of the register. Apparatus according to claim 7, wherein said second operation means includes a multiplier (28) for multiplying the outputs of said second and third calculating means together, and means (36) for summing the output of said multiplier. Apparatus according to claim 8 and including a memory (40) for temporarily storing the output of said divider; means (42) for arranging the contents of said memory in accordance with the output of said second operational means, and means (44) for carrying out weighted averaging on the output of said memory to derive a signal denoting movement in the input signal.

Inventors: KONDO TOSHIAKI, SEKINE MASAYOSHI, KONDO, TOSHIAKI, SEKINE, MASAYOSHI, KONDO, TOSHIAKI, CANON K.K., SEKINE, MASAYOSHI, CANON K.K.
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: H04N5
IPC codes: G06T7, H04N5