Movement vector detecting method/apparatus and encoding method/apparatus using such method/apparatus

Abstract: A movement vector detecting apparatus for detecting a movement vector of an object between frames which are close to each other on a block unit basis is provided. A first mode to detect the movement vector by using color components and a second mode to detect the movement vector by using a luminance component are switched in accordance with chromaticity statistics of an input block, thereby detecting the movement vector. There is also provided an encoding apparatus wherein a difference between an input signal to be encoded and a prediction value is quantized, the quantized signal is generated, the quantized differential signal is inversely quantized, the sum of the inversely quantized reproduction differential signal and the prediction value is stored, the stored signal is read out on the basis of an address signal regarding the input signal, the read-out signal and the input signal are received as inputs and the prediction value is obtained, and when the prediction value is derived, an evaluation function to obtain the prediction value is determined in accordance with chromaticity statistics of the input signal.

Description: BACKGROUND OF THE INVENTION Field of the Invention The invention relates to movement vector detecting method/apparatus for detecting a movement vector of an object between frames and also relates to encoding method/apparatus using such vector detecting method/apparatus. Related Background Art What is called a block matching type is known as a movement vector detecting system. According to the movement vector detecting system of the block matching type, one block is formed by extracting pixels of (8 x 8), (16 x 16), or the like between the previous frame and the present frame, a matching is performed every block, and a movement vector is given to each block of the present frame. A fundamental idea of the movement vector detecting system will now be described in detail hereinbelow. A block in which the pixel position at the left upper corner on the present frame is set to (i, j) and which is constructed by m pixels in the lateral direction and n pixels in the vertical direction assumes B ij (m, n). A block at the same position on the previous frame as that of the block B ij (m, n) assumes P ij (m, n). In this instance, an evaluation function of an error between B and P is defined as follows. The movement vector is defined by using deviations x and y from i and j such as to obtain the minimum value of f when x and y are changed within a range from ±0 to s (s is a parameter of a retrieving area). Generally, a color moving image is constructed in a form such that one frame is divided into luminance data (Y) and color difference data (C r , C b , etc.). The luminance data (Y) including much structure information is used to retrieve the movement vector. There is also known a method of retrieving a new vector by using the block just before or the vector obtained in the peripheral block as a center, a method of estimating a movement of the whole picture plane by obtaining a correlation between the vectors which are generated from the individual blocks and the block positions, or the like. However, an actual meaning image (not a mere set of RGB luminance data but an image having information as what is called a picture such as person, scenery, test pattern, or the like) contains many colors and a set of points of the same hue inherently mean one collected object. According to the matching by the blocks using the luminance data which is generally executed, although an error value on calculation can be locally minimized, it is difficult to detect the same object in the image. Therefore, when a movement of the whole picture plane is obtained from the vectors or when the vectors generated in the previous block or the peripheral blocks which have been processed are used to retrieve the vector in the present block, a large error is contrarily caused. According to the block matching system, since an amount of calculations is very large, a too wide range cannot be retrieved. Therefore, when the movement of an object is large, the movement width of the block can easily exceed the retrieval range and matching cannot be effectively executed. Under such circumstances, it is a concern of the invention to provide a movement vector detecting apparatus which can with certainty extract the same object as an object in the present picture plane from picture planes close to the present picture plane, can detect a reliable movement vector, and also to provide an encoding apparatus using such a movement vector detecting apparatus. The Proceedings of the second international workshop on signal processing of HDTV, 1988, p.681-688 discloses an HDTV video signal processing system which includes a motion vector detector. United States Patent No US-A-5122876 discloses a movement detection system in which movement evaluation is always carried out on the basis of both colour and luminance components of the image signal. European Patent Specification No. EP-A-0484140, published after the priority date of the present application, discloses a compression method for interlaced moving positive signals. In accordance with a first aspect of the present invention there is provided an image processing apparatus as set out in claim 1. In accordance with a second aspect of the present invention there is provided a method of detecting movement vectors in an image signal as set out in claim 4. Other features and advantages of the invention will become apparent from the following detailed description given by way of example and with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a moving image compressing encoding apparatus in the first to fourth embodiments according to the invention; Fig. 2 is a block diagram of a vector detection circuit in Fig. 1 according to the first and second embodiments; Fig. 3 is a diagram showing functions f 1 and f ab to determine parameters of an evaluation function which is used in an operation circuit in Fig. 2 according to the second embodiment; Fig. 4 is a block diagram of a vector detection circuit in Fig. 1 according to the third embodiment; and Figs. 5A to 5C are diagrams for explaining a movement vector retrieving method of the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The first embodiment according to the invention will be described in detail hereinbelow with reference to Figs. 1 and 2. Fig. 1 is a block diagram of a moving image compressing encoding apparatus using a vector detection circuit according to the first embodiment of the invention. Fig. 2 is a block diagram showing a construction of the vector detection circuit. In Fig. 1, reference numeral 1 denotes a vector detection circuit, which will be explained in detail hereinlater; 2 indicates a frame memory to store the previous frame; 3 a subtracting circuit; 4 a buffer memory; 5 a quantization circuit; 6 a reversible encoding circuit; 7 an inverse quantization circuit which performs the operation substantially opposite to that of the quantization circuit 3; and 8 an adding circuit. The compressing operation of the moving image compressing encoding apparatus with the above construction will now be described in detail. Image data (each of a brightness L* and chromaticities a* and b* is expressed by eight bits) of the present frame is supplied to the vector detection circuit 1 on a block unit basis through signal lines 101 and 102 in a form such that one frame is divided into a plurality of blocks. A block address signal of the block supplied to the vector detection circuit 1 is given to the frame memory 2 through a signal line 103. The image data in a vector retrieval range around the block is read out from the frame memory 2 in accordance with the block address signal and is sent to the vector detection circuit 1 through a signal line 104. The vector detection circuit 1 generates the block data which is evaluated to be optimum in a predetermined retrieval range to signal lines 105 and 106. The present image block which has been delayed by a predetermined time by the buffer memory 4 is supplied to the subtracting circuit 3 through a signal line 107. The value of the optimum block is also given to the subtracting circuit 3 through the signal line 105. The subtracting circuit 3 executes the subtraction between the values of the present image block and the optimum block supplied. Differential value data of the subtracting circuit 3 is supplied to the quantization circuit 5 and is quantized. The quantized data is supplied to the encoding circuit 6 and the inverse quantization circuit 7. The encoding circuit 6 assigns a reversible code to the quantization data and the encoded data is transferred to a signal line 108. The inverse quantization circuit 7 reproduces a differential value and supplies to the adding circuit 8. The optimum block data is also supplied to the adding circuit 8 through a signal line 109. Those two input data are added. The added data is stored into the frame memory 2. The vector detection circuit 1 shown in Fig. 1 will now be described in detail with reference to Fig. 2. The previous frame image data of a predetermined retrieval area is supplied from the frame memory 2 (refer to Fig. 1) to a memory 20 through the signal line 104 on the basis of an address signal of the block received through the signal line 103. The image data of the present frame is supplied to an evaluation circuit 21 from the signal line 102 on a block unit basis. On the basis of a data distribution of the original image block data, the evaluation circuit 21 discriminates (evaluates) whether the block matching is executed in a brightness block matching mode in which it is executed by the brightness (L*), which will be explained in detail hereinlater, or in a chromaticity block matching mode in which it is executed by the chromaticities (a*, b*), which will be explained in detail hereinlater. The result of the evaluation is sent to an operation circuit 22 through a signal line 201. An evaluating method of discriminating whether the block matching is performed in the brightness mode or the chromaticity mode will be explained hereinlater. A vector to a target block to be matched is sent from the operation circuit 22 to an MPX (multiplexer) 23 through a signal line 202. The MPX 23 generates an address signal in accordance with the input vector. The address signal is transmitted to the memory 20 through a signal line 203. The MPX 23 receives the block data read out from the memory 20 by the address data through a signal line 204. The block data is supplied to the operation circuit 22 through a signal line 205. The operation circuit 22 receives the above two block data and calculates an error between the blocks by the following evaluation function equations. In case of the L* mode, In case of the a*, b* mode, In the above equations, L denotes an L* block; A indicates an a* block; B a b* block: i, j coordinates in the block; and x, y movement vector components. Each reference character added with a dash (') denotes the block on the previous frame. The error value between the blocks and the vector data of the matched block are supplied from the operation circuit 22 to a comparison circuit 24 through a signal line 206. The comparison circuit 24 selects the minimum one of the data of a number of block matching errors which are calculated for one present block and the vector in this instance and stores them. At a time point of the completion of the block matching for one present block, the operation circuit 22 notifies the end of block matching to a vector output circuit 25 through a signal line 208. In response to such a notification, the vector output circuit 25 reads out the vector data stored in the comparison circuit 24 and generates the vector data to the outside through the signal line 106 and also supplies the read-out signal of the block data to the MPX 23 through a signal line 209. The MPX 23 reads out the block data of the best matching from the memory 20 in accordance with the read-out signal and generates to the outside through the signal line 105. Explanation will now be made with respect to an evaluating method of discriminating whether the block matching in the evaluation circuit 21 shown in Fig. 2 is executed by the brightness data (brightness mode) or the chromaticity data (chromaticity mode). As for the input block, the brightness (L* = 255) denotes white and the chromaticity (a* = 127) indicates an achromatic color (the same shall also apply to the case of b*) in the axial direction. It is assumed that when a* = 0 and a* = 255, the saturations are highest in both directions of the axis (the same shall also apply to b*). The block is constructed by (m x n) pixels. It is now assumed that the block position in the frame is expressed by (i, j) and the pixel position in the block is expressed by (p, q). The blocks of L*, a*, and b* which are supplied are referred to as L ij , A ij , and B ij . Particularly, in order to describe the pixel position among them, for instance, it is expressed like L ij (p, q). In the evaluation circuit 21, powers in which a data value 127 is used as a reference are calculated with respect to the pixels in the blocks A (a* block) and B (b* block) in accordance with the following equations. The values of powers are set to PA and PB. The value of (PA + PB) is compared with a predetermined threshold value, which will be explained hereinlater. When it is larger than the predetermined threshold value, it is determined that the block matching by the chromaticity block is executed for the above blocks. A "1" signal is supplied to the operation circuit 22 through the signal line 201 in Fig. 2. On the other hand, when the value of (PA + PB) is equal to or less than the threshold value, it is determined that the block matching by the brightness block is executed for the above blocks. A "0" signal is supplied to the operation circuit 22 through the signal line 201 in Fig. 2. That is, the operation circuit 22 automatically switches the block matching mode by an output signal of "1" or "0" which is supplied through the signal line 201. A setting method of the threshold value will now be explained in detail. Generally, the saturation of the color which appears in a natural image is not so high and is nearly equal to or lower than the half of the dynamic range of each axis of a* and b*. Therefore, it is determined that the saturation which is equal to or less than 1/4 of the dynamic range is weak and that the saturation larger than 1/4 of the dynamic range is strong. When the block exists in an image area having a certain same chromaticity, all of the pixels in the block exhibit the same (a*, b*) values. However, in the edge portion of the image area, only parts of the pixels in the block exhibit those (a*, b*) values and the remaining pixels indicate the (a*, b*) values corresponding to the background. It is, accordingly, considered that, on the assumption that all of the portions in the block are filled with the pixels having certain (a*, b*) values, when its power is obtained, it is proper to set a value which is about 1/2 of the power value to the threshold value. In the embodiment, a value of about (1024 x m x n) is used as a threshold value for (PA + PB). The second embodiment according to the invention will now be described hereinbelow. Since a construction of the moving image compressing encoding apparatus and a construction of the vector detection circuit are similar to those in Figs. 1 and 2 described in the first embodiment, their descriptions are omitted here. In the second embodiment, the processing operation of the vector detection circuit differs from that described in the first embodiment. The processing operation of the vector detection circuit in the second embodiment will now be described in detail hereinbelow by using Fig. 2. The previous frame image data of the retrieval area is first supplied from the frame memory 2 (refer to Fig. 1) to the memory 20 through the signal line 104. The present image data is supplied to the evaluation circuit 21 through the signal line 102. On the basis of the data distribution of the original image blocks, the evaluation circuit 21 determines parameters of the evaluation function in the block matching and sends the result to the operation circuit 22 through the signal line 201. A determining method of the parameters of the evaluation function will be explained hereinlater. The vector to the target block to be matched is sent from the operation circuit 22 to the MPX 23 through the signal line 202. The MPX 23 generates the address signal in accordance with the input vector. The address signal is supplied to the memory 20 through the signal line 203. The MPX 23 receives the block data read out from the memory 20 by the address data through the signal line 204. The block data is sent to the operation circuit 22 through the signal line 205. The operation circuit 22 receives the above two block data and calculates an error between the blocks by the following evaluation function equation. In the above equation, ℓ, a, and b denote parameters which are determined by the evaluation circuit 21 and will be explained hereinlater. L denotes an L* block; A an a* block; B a b* block; i, j coordinates in the block; and x, y movement vector components. A reference character added with a dash (') denotes the block on the previous frame. The error value between the blocks and the vector data of the matched block are supplied from the operation circuit 22 to the comparison circuit 24 through the signal line 206. The comparison circuit 24 selects the minimum one of the data of a number of block matching errors which are calculated for one present block and the vector in this instance. At a time point of the end of the block matching for one present block, the operation circuit 22 sends a signal indicative of the end of the block matching to the vector output circuit 25 through the signal line 208. In response to such an end signal, the vector output circuit 25 reads out the vector data stored in the comparison circuit 24 and generates the vector data to the outside through the signal line 106 and supplies the read-out signal of the block data to the MPX 23 through the signal line 209. In accordance with the read-out signal, the MPX 23 reads out the block data of the best matching from the memory 20 and generates the block data to the outside through the signal line 105. The evaluating method in the evaluation circuit 21 shown in Fig. 2 will now be described. As for the input block, each of L*, a*, and b* is expressed by eight bits. In case of L*, L* = 255 denotes white. In case of a* and b*, a* = 127 indicates an achromatic color in the axial direction (the same shall also apply to b*). It is assumed that when a* = 0 and a* = 255, the saturation is highest in both directions of the axis (the same shall also apply to b*). The block is constructed by (m x n) pixels. It is assumed that the block position in the frame is expressed by (i, j) and the pixel position in the block is expressed by (p, q). The blocks of L*, a*, and b* which are supplied are referred to as L ij , A ij , and B ij . Particularly, to describe the pixel position among them, for instance, it is expressed like L ij (p, q). In the evaluation circuit 21, distribution values in which the data value 127 is used as a reference are calculated with respect to the pixels in the blocks of A (a* block) and B (b* block) in accordance with the following equations and the calculated values are set to VA and VB. From the results of the calculations by the above equations, the larger one of the values of VA and VB is set to VC. The coefficients a, b, and ℓ in the foregoing evaluation function equations are determined by using VA, VB and VC. The relations between (VA, VB, VC) and (a, b, ℓ) satisfy the following equations. a = f ab (VA) b = f ab (VB) ℓ = f ℓ (VC) f ℓ and f ab denote predetermined functions and Fig. 3 shows forms of the functions f ℓ and f ab . The values of the parameters a, b, and ℓ determined as mentioned above are generated from the signal line 201 in Fig. 2 and supplied to the operation circuit 22. A detailed construction of the vector detection circuit 1 in the third embodiment will now be described with reference to Fig. 4. In Fig. 4, the same or similar parts and components as those in Fig. 2 are designated by the same reference numerals and their descriptions are omitted. As shown in Fig. 4, the third embodiment differs from Fig. 2 with respect to a point that the evaluation circuit is omitted. The other constructions are substantially the same as those in Fig. 2. The processing operation of the vector detection circuit 1 shown in Fig. 4 will now be described. The third embodiment according to the invention will be described in detail hereinbelow. In the third embodiment, an outline of a movement vector detecting system for detecting a movement amount of an object between the previous frame and the present frame on a block unit basis will now be described. Generally, various objects included in a certain picture plane or a portion of an object are/is colored by colors of almost the same hue and a change in hue in the same color area is not so large. In the third embodiment, therefore, an attention is paid to such a point and the block matching is divided into two stages. That is, color data is used in the block matching at the first stage and the retrieval and matching are executed in a wide range by coarse steps. The retrieval of the second stage is performed around the location at which the best matching is derived. In the matching of the second stage, brightness (lightness, luminance, etc.) data is used and the retrieval and matching are executed by fine steps, thereby enabling both of the retrieval from a wide range and the retrieval in consideration of the color to be executed. There is no need to largely set a retrieval range at the second stage because it has already existed in the same color area. The movement vector detecting system will now be described with respect to the moving image compressing encoding apparatus using the vector detection circuit according to the third embodiment as an example. L*, a*, and b* similar to those in the first and second embodiments are used as input signals. Since a construction of the moving image compressing encoding apparatus in the third embodiment is similar to that of Fig. 1 described in the first embodiment, its description is omitted here. As mentioned above, the previous frame image data of the retrieval area is loaded into the memory 20 from the previous frame memory 2 through the signal line 104. On the other hand, the present image data is supplied to the operation circuit 22 via the signal line 102. The vector to the target block to be matched is sent from the operation circuit 22 to the MPX 23 through the signal line 202. In response to the vector received, the MPX 23 generates an address and sends the address to the memory 20 through the signal line 203 and receives the block data from the signal line 204 and transmits to the operation circuit 22 by the signal line 205. The operation circuit 22 receives the above two block data and calculates an error between the blocks by the following evaluation function equations. The error values and the vector at the block position are sent to the comparison circuit 24 through the signal lines 206 and 207. L denotes a block of L*; A a block of a*; B a block of b*; i, j coordinates in the block; and x, y movement vector components. A reference character added with a dash (') denotes the block on the previous frame. The equation (1) is used in the matching of the first stage. The equation (2) is used in the matching of the second stage. As shown in Fig. 5A, the comparison circuit 24 selects the minimum one of the data of a number of block matching errors by a plurality of (a*, b*) values which are calculated for one present block and the vector in this instance. When the block matching by all of the (a*, b*) values is finished for one present block, as shown in Fig. 5B, the block matching by L* of the second stage is executed, in which the vector that gives the best matching is used as a center. At a time point of the completion of the block matching by L* mentioned above, the operation circuit 22 notifies the end of the block matching to the vector output circuit 25 through the signal line 208. In response to such an end signal, the vector output circuit 25 reads out the vector data stored in the comparison circuit 24 and generates the vector data to the outside by the signal line 106 sends a readout request signal of the block data to the MPX 23 by the signal line 209. In response to the read-out signal, the MPX 23 reads out the block data of the best matching from the memory 20 and generates to the outside through the signal line 105. The vector which is generated here is the movement vector to be obtained. According to the embodiment as mentioned above, a wide retrieval range can be provided. Even when the luminance of the background is close to the luminance of the object or a motion of the object is large, the correct movement vector can be captured. There is also an effect such that the number of calculations can be reduced. Fig. 5C shows a conventional retrieving system by all searching type as an example. Now, assuming that the block size is set to (n x n) and the retrieval range is set to (2m x 2m), the number of calculating times of the error is equal to (4 x n 2 x m 2 ). In the system of the invention, when it is now assumed that the retrieval range of the first stage is set to (4m x 4m) and the retrieval range of the second stage is set to (m x m) and one matching is executed every four pixels in each of the vertical and lateral directions at the first stage in such a range and the matching is performed every pixel at the second stage, the number of error calculating times at each of the first and second stages is equal to (n 2 x m 2 ), so that the total number of error calculating times is equal to (2 x n 2 x m 2 ). Therefore, the retrieval of the range of (4m x 4m) can be performed by the calculations of the number which is 1/2 of the number of calculating times that is required to retrieve the range of (2m x 2m). As described in detail above, in the movement vector detecting apparatus according to the invention, in case of the first embodiment, the apparatus has the first mode to detect the movement vector by using color data as one of the color image information and the second mode to detect the movement vector by using the luminance data as one of the color image information and executes the detection of the movement vector in either one of the first and second modes. In the second embodiment, the color data and the luminance data are adaptively weighted and the movement vector is detected. In the third embodiment, after the retrieval by the color data was performed, the retrieval by the luminance data is executed, thereby detecting the movement vector. By the movement vector detecting method in each of the embodiments as mentioned above, even when the luminance of the background is close to the luminance of the object or the motion of the object is large, the correct movement vector can be detected. Therefore, in the case where the motion of a whole picture plane is presumed from the movement vector of each block or the movement vector of a new block is presumed from the past movement vectors or the movement vectors of the blocks around the target block, the movement vector can be accurately presumed. On the other hand, by performing a predictive encoding to an image by using the above movement vector detecting apparatus, the image can be obviously efficiently compressed. The present invention can be embodied by various forms without departing from the spirit and main features of the invention. For instance, although the brightness data (L*) and chromaticity data (a*, b*) have been used in the above embodiments, the invention can be also obviously realized by using the luminance data and color difference data (Y, Cr, Cb; Y, I, Q; L, U, V; etc.). Further, the present invention can be applied to a system comprising a plurality of apparatuses or to an apparatus comprising one apparatus. Or, the invention can be also obviously applied to the case where it is accomplished by supplying a program to the system or apparatus.

Claims: A movement vector detecting apparatus for detecting a movement vector of an object between frames which are close to each other, the movement detecting apparatus comprising: (a) input means (101) for receiving a color image signal representing successive frames; (b) memory means (2) for storing the image signal of a second frame close to a first frame in which a new movement vector has been detected; (c) detection means (1) for receiving an input signal supplied on a block unit basis and a signal read out on a block unit basis from said memory means (2) on the basis of address data regarding said input signal and for detecting a block in said second frame which matches a block of the first frame by using an evaluation function; and (d) evaluating means (21) for determining said function in accordance with said input signal; and characterised in that said evaluating means (21) are adapted to select a first evaluation function based on a color component of the image signal if said color component is above a predetermined threshold and otherwise to select a second evaluation function based on a luminance component of the image signal. Apparatus according to claim 1, wherein said detection means is adapted to perform detection of movement vector of said image signal using the first evaluation function and thereafter executes detection of movement vector of the input image signal using the second evaluation function on the basis of the result of the first evaluation function. Apparatus according to either of the preceding claims, further comprising encoding means (6) for encoding the image signal using the detection result generated by said detection means. A movement vector detecting method of detecting a movement vector of an object between frames which are close to each other on a block unit basis, comprising the steps of: (a) receiving a color image signal representing successive frames; (b) storing in memory means (2) the image signal of a second frame close to a first frame in which a new movement vector has been detected; (c) using detection means (1) for receiving an input signal supplied on a block unit basis and a signal read out on a block unit basis from said memory means (2) on the basis of address data regarding said input signal and for detecting a block in said second frame which matches a block of the first frame by using an evaluation function; and (d) utilising evaluating means (21) to determine said function in accordance with said input signal; and characterised in that said step of utilising evaluating means (21) selects a first evaluation function based on a color component of the image signal if said color component is above a predetermined threshold and otherwise selects a second evaluation function based on a luminance component of the image signal. A method according to claim 4, wherein said detection of movement vector of said image signal is performed using the first evaluation function and thereafter detection of movement vector of the input image signal is performed using the second evaluation function on the basis of the result of the first evaluation function. A method according to either of claims 4 or 5, further comprising encoding the image signal using the detection result generated by said detection means.

Inventors: HIRABAYASHI YASUJI, OHSAWA HIDEFUMI, YOSHIDA TADASHI, HIRABAYASHI, YASUJI, OHSAWA, HIDEFUMI, YOSHIDA, TADASHI, HIRABAYASHI, YASUJI, C/O CANON KABUSHIKI KAISHA, OHSAWA, HIDEFUMI, C/O CANON KABUSHIKI KAISHA, YOSHIDA, TADASHI, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: H04N5
IPC codes: G06T9, H04N7, H04N5, G06T7, H04N11