Moving vector extractor

Abstract: A moving vector extractor for detecting a shaking of an image through a video camera in order to improve accuracy of the detection even when the image is dark or of low density gradient as a whole, a density gradient value around representative point is calculated. A basic data of moving vector of the difference value between successive frames is obtained by calculating an absolute value or a squared value. The basic data of moving vector is weighted according to density gradient value so as to improve the precision of moving vector extraction.

Description: FIELD OF THE INVENTION The invention relates to a method for extracting a movement vector from an image signal and a video camera using a movement extractor for shaking compensation. BACKGROUND OF THE INVENTION Conventionally, there have been various methods contrived for the extraction of moving vectors for indicating the direction and speed of a movement of an image. The direction and speed is calculated by dividing a given image into blocks of predetermined size and by calculating moving vector according to the relationship between successive image frames for each block. In such methods, there are gradient method concerning spatial and time gradient of brightness, phase correlation method in which phase terms ratio of coefficients of Fourier transformation is used, and representative point matching method in which the accumulated value of the absolute value of difference between frames at representative points in successive images is used. And "representative point matching method " used in MUSE encoder is an advantageous method because of smaller size of hardware necessary than that for the above methods. This representative point matching method will be explained in a case a given frame image is divided into four blocks as shown in Fig. 2 and a moving vector of one of those blocks is calculated. First, representative points whose number is calculated by b × c = P are selected, and the absolute value of the difference between frames is generated by a following formula using multi-value in a searching area of m pixels × n pixels. P d,e (i, j) = a n d,e (i, j) - a n-1 d,e (0,0) For each representative point, the sum of the accumulated value of P d,e (i, j)is calculated by a following formula and the displacement value (i, j) that has the minimum value is considered as a moving vector. This is the representative matching method. Fig. 15 describes the concept. As will be understood from this figure, by calculating the absolute value of the difference between frames (mark I), a data for the absolute value of the difference including a curved line K whose value is 0 (mark J) will be obtained, then by accumulating this data for the absolute value of the difference for each representative point, the accumulated value at the intersection of the curved line K will be the minimum value, and this is the position of the moving vector. It means the accumulation function P(i, j) will be a funnel-like concavity centering the moving vector position (i, j). Such an image motion detector is described in EP-A-389 168, which is detecting an image motion vector using a representative point matching method. Therefore, it is described to compute a difference between image data in a motion vector detection area around a position of a representative point and image data of a preceding field in subsequent fields or frames. The calculated differences are converted into absolute values. These absolute values are cumulatively added for all absolute values, and calculated in relation to one representative point. Out of all cumulative additions carried out for all representative points, a location is calculated which shows a minimum value of cumulatively added values. A position associated with the minimum value, with reference to the position of the representative point, is obtained as a motion vector. It is further described to apply a coring operation to a motion vector calculated in accordance with the method described above. The coring operation is carried out in association with the magnitude of a detected motion vector, to suppress small motion vectors which also occur in still images due to noise components. EP-A3-095 560 is directed to a method for improving the transmitted picture quality and simultaneously achieving a high compression rate of the transmitted video data. Therefore, this document describes a method which is especially related to a prediction of a second field out of the video data of a first field, by further computing differences between the predicted second field and the real second field, to only transmit the minimum amount of necessary data for improving the transmitted picture quality. The difference between the predicted (interpolated) second field and the real second field is only transmitted for image locations in which neighbouring picture elements in a line of a first field directly above or under the corresponding picture elements of the second field show a sufficiently large difference. Since such a difference usually exists for very few locations of a picture, the quality of a transmitted video sequence can be improved by additionally transmitting only a small amount of data. There is a disadvantage in the above method that the extraction of moving vector is greatly influenced from noises in the successive frames when the input image is low in brightness or density gradient as a whole. It causes misoperations. The absolute value of the difference with respect to a representative point includes little information of movement at a position with low density gradient. The moving vector calculated appears in the total searching area due to random noises as shown in Fig. 4. The calculation precision is extremely low. The object of the present invention is to improve the precision of moving vector extraction. This is achieved by the features of claim 1 for a method of extracting a movement vector and by the features of claim 9 for a video camera using such a method. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 shows a block diagram of the first embodiment of the present invention. Fig. 2 shows a position of a representative point. Fig. 3 and 4 show a concept of representative point matching method used for an image with noises. Fig. 5 is a detailed block diagram of a timing generator in Fig. 3. Fig. 6 shows an address mapping. Fig. 7 and 8 show various block timings. Fig. 9 shows a concept of interpolation of lines in a field image. Fig. 10 shows an example of coefficients of an operator for calculating density gradient. Fig. 11 is a detailed block diagram of density gradient extractor. Fig. 12 shows a block diagram of the second embodiment of the present invention. Fig. 13 shows a block diagram of the third embodiment of the present invention. Fig. 14 shows a block diagram of the forth embodiment of the present invention. Fig. 15 shows a basic concept of representative point matching method. PREFERRED EMBODIMENT OF THE PRESENT INVENTION Hereinafter, the first embodiment of the present invention will be described with referring to the attached drawings. As shown in Fig. 2, representative points aligned on b columns in the horizontal direction and on c lines in the vertical direction are selected, so that a rectangle block is defined by each representative point centered in the block. The block is a searching area of m pixels in the horizontal direction and n pixels in the vertical direction. The brightness of each representative point in the previous field is stored in a memory. The brightness of representative point on dth column and eth row is denoted here as a n-1 d,e (0, 0). When the brightness of pixels around the representative point in the current field is a n d,e (i, j), the absolute value of the difference value P d,e (i, j) is calculated as below. P d,e (i, j) = a n-1 d,e (i, j) - a n-1 d,e (0,0) Fig. 3 illustratively shows the above concept. Points (i, j) satisfying P d,e (i, j) = 0 are candidates giving moving vector, which candidates generally define a curved line. However, when density gradient around representative point is small and random noises of two field images are added, point (i, j) satisfying P d,e (i, j) = 0 becomes uncertain as shown in Fig. 4, and when specially density gradient value = 0, points (i, j) satisfying P d,e (i, j) = 0 may exist all over the searching area of m x n pixels. Because of this, the accumulation result P d,e (i, j) will be greatly influenced by the point P (i, j) in successive images. Where, Therefore, the precision of extraction of becomes low. For solving this problem, a means for extracting the average value of density gradient around representative point is provided, which multiplies an absolute value or square value of the difference by a weight corresponding to the density gradient for each representative point so that misoperation due to noises is decreased. In the present embodiment, when a density gradient value is less than density gradient threshold B, weight is determined to be 0, and when a density gradient value is equal to or more than a density gradient threshold B, weight is determined to be 1. This is described as follows; When a density gradient < B, P d,e (i, j) = 0, When a density gradient ≧ B, P d,e (i, j) = a n d,e (i, j) - a n-1 d,e (0, 0) Fig. 1 shows a block diagram of moving vector extractor. In Fig. 1, an input terminal 10, to which an image signal is provided, is connected with a + input terminal of a subtracter 21 through , an A/D convertor 11, line interpolator 14, low band pass filter 12 for reducing influence from noise and high band pass filter 13 for reducing influence from the change of brightness over the whole image. A representative memory 18 for extracting and storing a representative point from the current field signal is connected with the subtracter 21 through a representative memory 19 for extracting representative point on the previous field. Subtracter 21 cooperates with an absolute value calculator 22 for calculation of correlation between two fields. The absolute value calculator 22 is connected with comparator 26 for binarization. Absolute value calculator 22 and comparator 26 are connected with adder 23 through a mode switch 39 and a weighting switch 38. The mode switch 39 is for selecting binary or multi-value mode while the weighting switch 38 is for weighting alternatively by 0 or 1 according to density gradient value. Adder 23 is connected with an accumulation memory 24 so that accumulating addition of P d,e (i, j) is calculated. Accumulation memory 24 is connected with an extractor 25 for extracting moving vector. A density gradient extractor 30 for calculating the average of density gradient value around a representative point in the current field is connected with a density gradient line memory 32 for outputting density gradient value of the previous field through a density gradient memory 31. Density gradient line memory 32 is connected with a comparator 33 for comparing density gradient of the previous field with threshold B. Comparator 33 is connected with weighting the switch 38 which is controlled according to the output from comparator 33. Clocks CK, horizontal synchronous signals HD and vertical synchronous signals VD are inputted to a timing generator 20 from outside, so that the generator counts these signals so as to generate control signals for such as A/D convertor 11, representative memory 18 and 19, accumulation memory 24, extractor 25, density gradient extractor 30, density gradient memory 31 and density gradient line memory 32. Timing generator in a block diagram of Fig. 1 is explained in details referring to Fig. 5. Clock signals CK 40 as a reference signal, horizontal synchronous signals HD 41 and vertical synchronous signals VD 42 generated by dividing clock signals are inputted to the timing generator 20. In timing generator 20, horizontal synchronous signals HD 41 is used as reset signals and clocks CK are counted so that an address XADR in horizontal direction in the searching area, and a carry of the counted value is counted so that a block address XBLK is generated in horizontal direction. Similarly, vertical synchronous signals VD is used as a reset signal and horizontal synchronous signals are counted so that an address YADR is generated in horizontal direction in the searching area, and a carry of the counted value is counted so that a block address YBLK is generated in vertical direction. Among these generated address signals, address XADR and YADR in the searching area are used for generating a timing signal for read/write of representative point , a sampling timing of density gradient around representative point for calculating density gradient, a reset timing for memory and a transfer timing to a line memory. Fig. 6 shows address mapping of XADR, YADR, XBLK and YBLK . Fig. 7 shows varieties of block timing. In Fig. 7, portions hatched with horizontal lines parts represent blocks for clearing the contents of accumulation memory, and portions hatched with diagonal lines represent invalid blocks and for not accumulating an accumulation memory. On the other hand, white-painted portions represent valid blocks for accumulating an accumulation memory. Portions hatched with vertical lines represent moving vector extraction blocks which gives timing for moving vector extraction from the accumulated data in the above blocks. Fig. 8 shows timing for read/write, reset and multiplication of x1/x2 that are generated from XADR and YADR. In Fig. 1, the operation manner will be explained. First, analog image signals inputted from image input terminal 10 are quantized into 8 bits in A/D convertor 11, and since each field line of one of even and odd field image displaces from the field line of the other by a half of distance between successive field lines, interpolated lines between successive field lines are to be generated in one of odd or even field. In line interpolator 14 shown in Fig. 9, interpolation is performed for only one of even or odd filed. A judgment signal of odd/even field is given to the interpolator from outside for determining whether the interpolation is necessary or not. Unnecessary noises are temporally removed by low pass filter 12 and high pass filter 13, and outputted as brightness a n d,e (i, j). Image signals whose noises are removed are stored in representative memory 18 as representative point a n d,e (0, 0) of current frame at the timing generated by timing generator 20. The brightness of this representative point is transferred to representative memory 19 during the next vertical synchronous term, and outputted to subtracter 21 as representative point a n-1 d,e (0, 0) of previous frame. At this moment, addressing of representative memory 18 and 19, and read/write indication are operated by timing generator 20. As explained above, brightness signal a n d,e (i, j) and a n-1 d,e (0, 0) are inputted into subtracter 21, and the difference is calculated, then the absolute value of the difference P d,e (i, j) = a n d,e (i, j) - a n-1 d,e (0, 0) is calculated by absolute value system 22 in the next step. This signal is accumulated in accumulation memory 24 by adder 23, through weighting switch 38. From the output signal of high band pass filter 13 a n d,e (i, j), the density gradients in horizontal and vertical directions are calculated independently from each other in density gradient extraction circuit 30 so that the density gradient is finally calculated. In this embodiment, the density gradient is calculated by Sobel operator as shown in the formula below. Density gradient in horizontal direction DX Density gradient in vertical direction DY Density gradient DV = DX + DY and DV = SQR(DX × DX + DY × DY) may be used, and instead of Sobel operator, Prewitt operator or Roberts operator may be used. Fig. 10 shows examples of coefficients of Sobel operator and Prewitt operator. Density gradient extractor 30 is explained in detail in Fig. 11. S 0 is a filtered image signal outputted from high band pass filter 13, S 1 is a block address signal in horizontal direction generated in timing generator 20, S 3 ,S 4 ,S 5 , and S 6 are read/write signals generated in timing generator 20 for giving sampling timing, S 2 is an indicating signal generated in timing generator 20 for indicating a multiplier of two or one, 66, 76, 86 and 96 are multipliers of x2 or x1, 67, 77, 87 and 97 are adders, 65, 75, 85 and 95 are line memories with a capacity for storing blocks in horizontal direction. The capacity of the embodiment in Fig. 2 is b x ( a + 2 bits) and S 4 is a reset timing signal generated by timing generator 20 from column address in horizontal direction and row address in vertical direction. Fig. 8 shows reset timing, sample timing around representative points and transfer timing to density gradient line memory 32. These timings are generated in the above timing generator 20 according to address in horizontal direction XADR and address in vertical direction YADR. In line memory 65 of Fig. 11, multiplier 66, adder 67 and switch 68, a calculation is operated according to the formula below; a n-1 d,e (-hx, -hy) + 2 × a n-1 d,e (-hx, 0) + a n-1 d,e (-hx, hy), in line memory 75, multiplier 76, adder 77 and switch 78, a calculation is operated according to the formula below; a n-1 d,e (hx, -hy) + 2 × a n-1 d,e (hx, 0) + a n-1 d,e (hx, hy), in line memory 85, multiplier 86, adder 87 and switch 88, a calculation is operated according to the formula below; a n-1 d,e (-hx, -hy) + 2 × a n-1 d,e (0, -hy) + a n-1 d,e (hx, -hy), in line memory 95, multiplier 96, adder 97 and switch 98, a calculation is operated according to the formula below; a n-1 d,e (-hx, hy) + 2 × a n-1 d,e (0, hy) + a n-1 d,e (hx, hy). After these calculations, the results are stored in density gradient calculation memories corresponding to the block addresses. Density gradient DX in x direction is calculated by subtracter 50 and absolute value calculator 52 from an absolute value of the difference of the data in calculation memory 65 and 75, and density gradient in y direction is calculated by subtracter 51 and absolute value calculator 53 from the an absolute value of the data in calculation memory 85 and 95. A density gradient value around representative point is calculated by adder 54 and outputted from DV = DX + DY. Density gradient extracted by density gradient extractor 30 is stored in density gradient memory 31 according to a block address generated in timing generator. However, when density gradient value of the current field is written in a memory, density gradient value of the previous field will be lost, therefore, before the density gradient value of the current field is stored in the memory 31, density gradient value of the previous field needs to be transferred to density gradient line memory 32 and inputted to comparator 33 in the next step. In comparator 33, when density gradient value is equal to or more than a predetermined threshold B, it will be outputted as 1. Output of comparator 33 is used for controlling switch 38, and when the output from comparator 33 is 1, output from absolute value calculator 22 is transmitted to the input of adder 23, and P d,e (i, j) is accumulated in accumulation memory 24. Contrary to this, when density gradient value is smaller than the threshold B, the output from comparator 33 will be 0, and switch 38 is connected to the ground terminal, and P d,e (i, j) is not accumulated. These series of calculation processing with respect to an image for one field are completed, P n (i, j) corresponding to the address is given to accumulation memory 24, and address is extracted corresponding to (i, j) that have P n (i, j) become the maximum or the minimum value by extractor 25 during the vertical synchronous term and outputted as moving vector. At this moment, timing such as read/write control signals from adder 23, accumulating and adding memory 24, and extractor 25 is controlled by time generator 20. Also this moving vector extractor 25 simultaneously extracts the maximum value, the minimum value and the mean value of the accumulated value, and outputs them. They are used as a parameter for judging the reliability of the moving vector extracted by such a microcomputer connected with the back step. Here, two successive field images mean a combination of an odd field image and an even field image, or a combination of an even field image and an odd field image, and a moving vector is extracted from these combinations. In stead of two successive field images, field images extracted from two successive frame images may also be used. In this case, since a combination can be taken of an odd field image and an odd field image, or an even field image and an even field image, the line interpolator 14 can be neglected. Fig. 12 describes the second embodiment of the present invention, and this is a compensation system for shaking of VTR with a camera incorporated therein which uses a moving vector extractor explained in the above first embodiment. In this figure, 101 represents a CCD TV signal processing portion, 102 is a moving vector extractor, 103 is a field memory or frame memory for storing an image of the previous field or frame, 104 represents a moving vector signal processing portion which judges the reliability of a band filter for determining compensation frequency and of moving vector extraction, 105 represents an interpolating enlargement processing portion which enlarges a part of an image with interpolation stored in a field memory or a frame memory. A brightness signal outputted from CCD TV signal processing portion 101 is inputted into moving vector extractor 102, and a moving vector is extracted from image signal of two successive fields or a frames. On the other hand, the brightness signal and a signal of color difference R-Y and B-Y outputted from CCD TV signal processing portion 101 are stored in a field or frame memory 103, and are partially enlarged in interpolating enlargement processing portion 105 after the delay of one field or one frame. At this moment, the moving vector extracted by moving vector extractor 102 is inputted into a control terminal of interpolating enlargement processing portion 105 through moving vector signal processing portion 104, and it is compensated for the amount of the extracted moving vectors that are elements of shaking, in upper and lower, right and left sides by interpolating enlargement processing portion 105 , and TV image signal, in which the shaking is controlled, is obtained. Since an enlargement of digital image is generally performed by magnifying power of an exponential of two, an image extracted from an input image is outputted, with interpolated and enlarged by twice. Fig. 13 shows the third embodiment of the present invention, and this is a compensation system for shaking of VTR with a camera incorporated therein, which uses a moving vector extractor explained in the above first embodiment. CCD TV signal processing portion 201 controls the number of high speed output clocks accompanying vertical electric change translation , so the movement of an image upward, downward, rightward or leftward is also controllable by controllable delay 202. Brightness signal of an image outputted from CCD TV signal processing portion 201 is inputted into moving vector extractor 203 through controllable delay line 202, and a moving vector is extracted from image signal as well as in the operation of the second embodiment. The moving vector extracted is inputted into moving vector processing portion 204 and processing is performed there, in which the reliability is judged of a band filter for determining compensation frequency and of moving vector extraction. The compensating vectors for upward and downward directions are fed back to CCD TV signal processing portion 201, and compensating vectors for rightward and leftward directions are fed back to controllable delay line 202, and shaking is compensated through closed loop servo. Fig. 14 shows the fourth embodiment of the present invention, and this is a compensation system for the shaking of VTR with a camera incorporated therein, including a moving vector extractor explained in the above first embodiment. 301 represents CCD TV signal processing portion, 302 is a moving vector extractor, and a moving vector is extracted similarly to the operation of the second embodiment. The extracted moving vector is inputted into moving vector processing portion 303 and processing is preformed, in which it is judged the reliability of a band filter for determining compensation frequency and of moving vector extraction. Lens 305 is supported by actuators 306 and 307 so as to be movable in two dimensions perpendicular to the optical axis of the lens. It means lens 305 is moved in two dimensions by impressing compensation voltage to the actuators. Compensating vector outputted from moving vector signal processing portion 303 is amplified in driver 304 in the directions of up, down, right and leftward, and by impressing compensation voltage to actuator 306 and 307, the position of lens 305 is compensated. A feed-back loop for compensating movement of an image is constructed. When a lens portion is provided with a zooming function, a loop gain of shaking compensation changes depending on the zoom magnification, therefore the zoom magnification information is inputted to gain compensator 308, and gain control is performed in inverse proportion to the zoom magnification. In the embodiment above, an absolute value of the difference between frames is calculated. It is also possible to calculate squared value of the difference value for obtaining the moving vector. According to the present invention mentioned above, since a basic data of moving vector is weighted by density gradient value and accumulated, it is possible to reduce influence from random noises in an flat image which has small density gradient value. It improves the precision of moving vector extraction. By means of this moving vector extractor, moving extracting system is obtained for compensating shaking of VTR with a camera incorporated therein.

Claims: Method for extracting a movement vector comprising the following steps: dividing successive images into blocks of a predetermined size; calculating a difference value between a value of a representative point of a first block and a value of a second block, said first block and said second block are located at the same position of successive images, and calculating a positive value of said difference value, accumulating all positive values which have been calculated for differences between the values of said representative points and the values of said second block at the same coordinate position with reference to the respective representative points for a plurality of coordinates, extracting a minimum value of said accumulation results representing said movement vector; characterised in that said method further comprises the following steps: calculating a density gradient value for each of said first blocks; and weighting said calculated positive values according to the corresponding density gradient value. A method according to claim 1 characterised in that said weighting is performed by a weight of "0", when a density gradient value is less than a density gradient threshold (B), and by a weight of "1", when a density gradient value is equal or greater than a density gradient threshold (B). A method according to claim 1 or 2 characterised in that said density gradient value is obtained by adding a horizontal density gradient value and a vertical density gradient value. A method according to any of claims 1-3 characterised in that said horizontal and vertical density gradient values are calculated by applying a Sobel operator, a Prewitt operator or a Robers operator. A method according to any of claims 1-4 characterised in that said density gradient value is calculated by multiplying a density of a pixel by a multiplier which is changeable according to a control signal. A method according to any of claims 1 to 5 characterised in that said density gradient is calculated at coordinates around a representative point. A method according to any of claims 1 to 6 characterised in that said positive value is an absolute value of said difference. A method according to any of claimed 1 to 6 characterised in that said positive value is a square value of said difference. A video camera comprising: a lens (305); actuator means (306,307) for moving said lens (305) in horizontal and vertical direction, respectively, in response to extracted moving vector; control means (303) for adjusting a magnitude of movement of said lens; a movement vector extractor (302) for calculating a movement vector between successive images, comprising: means (18,19,21) for calculating a difference value between a value of a representative point for a first block and the value of a second block, said first block and said second block being of a predetermined size and are located at the same position of successive frames, means (22) for calculating a positive value of said difference value, means (30-33) for calculating a density gradient for each of said blocks; means (38) for weighting said calculated positive values according to the corresponding density gradient value; means (23,24) for accumulating all weighted positive values which have been calculated for differences between the values of said representative points and the values of said second block, at the same coordinate position with reference to the respective representative points for a plurality of coordinates; and means (25) for extracting a minimum value of said accumulation results representing said movement vector. A video camera according to claim 9, further comprising: zoom means for changing a magnification of said lens (305); and gain control means (308) for changing a gain in controlling said magnitude adjusted by said control means (303), said gain controlled in reverse proportion to zoom magnification.

Inventors: TAKAHAMA KENGO, YAMANE YASUKUNI, TAKAHAMA, KENGO, YAMANE, YASUKUNI, TAKAHAMA, KENGO C/O SHARP CORPORATION, YAMANE, YASUKUNI C/O SHARP CORPORATION
Applicants: SHARP KK, YOZAN INC, SHARP CORPORATION, YOZAN INC.
Application year: 1991
Main classification: G06T7
IPC codes: H04N5, G06T7