Method and device for detecting motion vectors
Abstract
A method of detecting motion vectors within a predetermined search range for motion-compensation predictive coding is disclosed. The method includes the steps of searching for first motion vectors between two frames which are separated from each other in a time dimension by a first frame distance, selecting a second frame distance of two frames between which picture motion is represented by second motion vectors, making a check whether the predetermined search range covers a predetermined percentage of the second motion vectors, the check using the first motion vectors as estimates of the second motion vectors after compensation for a difference between the first frame distance and the second frame distance, and deciding, based on results of the check, whether to increase a frame distance for prediction.

Term
Term ended
Projected expiry passed 19 September 2016, 10 years ago.
- Priority
- Filed
- Published
- Projected expiry
- Today
20 claims: 2 independent, 18 dependent
- 1A method of detecting motion vectors within a predetermined search range for motion-compensation predictive coding, said method characterized by comprising the steps of:a) searching for first motion vectors between two frames which are separated from each other in a time dimension by a first frame distance;b) selecting a second frame distance of two frames between which picture motion is represented by second motion vectors;c) making a check whether said predetermined search range covers a predetermined percentage of said second motion vectors, said check using said first motion vectors as estimates of said second motion vectors after compensation for a difference between said first frame distance and said second frame distance;andd) deciding, based on results of said check, whether to increase a frame distance for prediction.
- 18A device for detecting motion vectors within a predetermined search range for motion-compensation predictive coding, said device characterized by comprising:motion-detection means (1) for searching for first motion vectors between two frames which are separated from each other in a time dimension by a first frame distance;analysis-and-determination means (15) for selecting a second frame distance of two frames between which picture motion is represented by second motion vectors, and for making a check whether said predetermined search range covers a predetermined percentage of said second motion vectors, said check using said first motion vectors as estimates of said second motion vectors after compensation for a difference between said first frame distance and said second frame distance;control means (14) for controlling, based on results of said check, a change in a frame distance for prediction.
Independent claims2
77 paragraphs in 4 sections, as filed
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention generally relates to motion-vector search methods, and particularly relates to a motion-vector search method used for inter-frame predictive coding of image information.
Image-information-compression coding schemes include internationally-standardized H.261 and H.262, MPEG1 (moving picture experts group 1), and MPEG2 (moving picture experts group 2) among others. These compression coding schemes employ various compression processes such as DCT (discrete cosine transform), motion-compensation inter-frame prediction, etc. Effective enhancement of these compression processes is expected to bring about an improvement in overall compression rates of these schemes.
2. Description of the Related Art
Image-information-compression coding schemes include inter-frame predictive coding which draws on redundancy in a time dimension to achieve compression. In using this inter-frame predictive coding, MPEG1 and MPEG2 can handle both a forward prediction and a backward prediction. The forward prediction detects changes between a previous frame and a current frame, and generates the current frame based on the previous frame.
Fig.1A is an illustrative drawing for explaining the forward prediction.
As shown in Fig.1A, picture movement between a current frame, which is to be forwardly predicted, and a reference frame (previous frame) is detected within a predetermined range defined for motion-vector search. Then, parts of the picture showing no movement are provided with zero motion vectors, and parts of the picture showing some movement are provided with corresponding motion vectors. These motion vectors are used for coding.
Fig.1B is an illustrative drawing for explaining the motion-vector search. As shown in Fig.1B, a given frame is divided into a plurality of blocks B<sub>1</sub>, B<sub>2</sub>, ···. Each of these blocks is separately subjected to subsequent DCT and quantization processes. In a motion-vector-search process, a given block B<sub>N</sub> of a forwardly-predicted frame is searched for in the reference frame within the motion-vector-search range. Namely, a block B'<sub>N</sub> having the highest correlation with the block B<sub>N</sub> is detected within the motion-vector-search range of the reference frame. As shown in Fig.1B, movement of the block B<sub>N</sub> is then represented by a motion vector M<sub>N</sub>. At subsequent stages, a differential between the block B<sub>N</sub> and the block B'<sub>N</sub> is obtained by aligning these two blocks, and is subjected to the DCT and quantization processes. Results thus obtained and the motion vector M<sub>N</sub> are transmitted, stored, etc., as a part of coded pictures. The same processes are applied to all the blocks shown in Fig.1B
In the forward prediction of Fig.1A, the larger the motion-vector-search range, the longer the detectable motion displacement, thereby providing higher compression rates. However, a larger motion-vector-search range requires a longer processing time.
A bidirectional prediction generates the current frame based on a previous frame (past frame) and a subsequent frame (future frame). Fig.2 is an illustrative drawing for explaining the bidirectional prediction. As shown in Fig.2, the current frame is coded by using a backward motion vector and a forward motion vector which are obtained based on a backward reference frame and a forward reference frame. Assuming the same motion-vector-search-range size, the directional prediction has a higher prediction efficiency than does the forward prediction. Since the directional prediction suffers from twice the processing load, however, it is a general practice to reduce the size of the motion-vector-search range by half for the directional prediction.
Pictures coded based on the forward prediction are called P-pictures (predictive pictures), and pictures coded based on the directional prediction are called B-pictures (bidirectionally predictive pictures). Also, pictures coded by intra-frame coding are called I-pictures (intra pictures). MPEG1 and MPEG2 employ a coding scheme which combines the intra-frame coding, the forwardly-predictive coding, and the directionally-predictive coding together, so that a picture sequence can be represented as IBBPBBPBB···IBBPBBPBBP···, for example.
In the inter-frame predictive coding of the related art, a fixed inter-frame distance is used for motion-vector search. (The inter-frame distance refers to a time distance between frames.) When an inter-frame distance is short for the forward prediction and the motion-vector-search range is relatively large, for example, some motion-vector-search process is likely to be wasted by searching in excess of a maximum range of actually existing picture motions. Also, the inter-frame predictive coding of the related art uses a fixed number of bidirectionally-predictive-coded frames. An increase in the number of these frames may result in a situation where the motion-vector-search range for the forward prediction is not sufficiently large. In this case, the prediction efficiency is decreased.
Accordingly, there is a need for a motion-vector-search method which enhances prediction efficiency by optimizing an inter-frame distance for the motion-vector search in accordance with picture characteristics.
SUMMARY OF THE INVENTION
Accordingly, it is a general object of the present invention to provide a motion-vector-search method which can satisfy the need described above.
It is another and more specific object of the present invention to provide a motion-vector-search method which enhances prediction efficiency by optimizing an inter-frame distance for the motion-vector search in accordance with picture characteristics.
In order to achieve the above objects according to the present invention, a method of detecting motion vectors within a predetermined search range for motion-compensation predictive coding is disclosed. The method includes the steps of searching for first motion vectors between two frames which are separated from each other in a time dimension by a first frame distance, selecting a second frame distance of two frames between which picture motion is represented by second motion vectors, making a check whether the predetermined search range covers a predetermined percentage of the second motion vectors, the check using the first motion vectors as estimates of the second motion vectors after compensation for a difference between the first frame distance and the second frame distance, and deciding, based on results of the check, whether to increase a frame distance for prediction.
In the method described above, whether a sufficient motion-vector-search range can be maintained under an increased frame distance (second frame distance) is decided based on the motion vectors obtained under a current frame distance (first frame distance). Based on this decision, the frame distance is subjected to an increase to have a larger number of bidirectionally predictive pictures, thereby enhancing the prediction efficiency. Therefore, this method achieves an inter-frame predictive coding which optimizes an inter-frame distance for the motion-vector search in accordance with picture characteristics.
Other objects and further features of the present invention will be apparent from the following detailed description when read in conjunction with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
<ul id="ul0001" list-style="none" compact="compact"><li>Fig.1A is an illustrative drawing for explaining a forward prediction;</li><li>Fig.1B is an illustrative drawing for explaining a motion-vector search;</li><li>Fig.2 is an illustrative drawing for explaining a bidirectional prediction;</li><li>Fig.3 is an illustrative drawing for explaining a principle of the present invention;</li><li>Fig.4 is an illustrative drawing showing a forward prediction according to the present invention;</li><li>Fig.5 is a flowchart of a process of changing an inter-frame distance according to an embodiment of the present invention;</li><li>Fig.6 is an illustrative drawing for explaining a check on a motion-vector-search range of a bidirectional prediction according to the present invention;</li><li>Fig.7 is an illustrative drawing for explaining another check on a motion-vector-search range of the bidirectional prediction according to the present invention;</li><li>Fig.8 is a block diagram of an embodiment of an image processing device according to the present invention; and</li><li>Figs.9A through 9F are table charts for explaining the reason why the inter-frame distance should start from a possible maximum distance.</li></ul>
DESCRIPTION OF THE PREFERRED EMBODIMENTS
In the following, a principle and embodiments of the present invention will be described with reference to the accompanying drawings.
Fig.3 is an illustrative drawing for explaining the principle of the present invention. In Fig.3, frames O and F<sub>1</sub>-F<sub>6</sub> are temporary successive frames. When the frame F<sub>2</sub> is to be forwardly predicted based on the current reference frame O, the frame F<sub>1</sub> is a frame to be bidirectionally predicted based on the frames O and F<sub>2</sub>. When time comes for a motion-vector search of the frame F<sub>2</sub> to be started, the frame F<sub>4</sub> is then the frame to be forwardly predicted using the frame F<sub>2</sub> as a reference frame. At this time, the frame F<sub>3</sub> is bidirectionally predicted using the frames F<sub>2</sub> and F<sub>4</sub> as reference frames. Likewise, the frame F<sub>6</sub> will be a frame to be forwardly predicted using the frame F<sub>4</sub> as a reference frame, and the frame F<sub>5</sub> will be bidirectionally predicted based on the frames F<sub>4</sub> and F<sub>6</sub>.
Assume that a change in a coding scheme is made such that the frame F<sub>5</sub> currently scheduled for the bidirectional prediction will be forwardly predicted based on the frame F<sub>2</sub> after this change. Also, assume that this change must be made without a decline in the prediction efficiency. When such a change is possible, the frame F<sub>4</sub> becomes a frame to be bidirectionally predicted based on the frames F<sub>2</sub> and F<sub>5</sub>. Moving pictures tend to have little change in motion characteristics between frames within a short time range. This tendency provides a reasonable assumption that motion-vector characteristics detected between the frames F<sub>5</sub> and F<sub>2</sub> are similar to those detected between the frames F<sub>3</sub> and O. Thus, an evaluation as to whether a sufficient range is provided for motion-vector search between the frames F<sub>5</sub> and F<sub>2</sub> can be made by looking into the frames F<sub>3</sub> and O.
In Fig. 3, x<sub>u3</sub> and x <sub>l3</sub> are boundaries to define a motion-vector-search range used when the frame F<sub>3</sub> is forwardly predicted based on the frame O. Although a motion-vector-search range is actually a two-dimensional range spreading in horizontal and vertical directions, only one dimension, either horizontal or vertical, is used in explanation for the sake of simplicity. That is, x<sub>u3</sub> and x <sub>l3</sub> denote either horizontal boundaries or vertical boundaries. Then, a horizontal or vertical component x of a motion vector, detected between the frame F<sub>3</sub> and the frame O, should satisfy x<sub>u3</sub> < x < x <sub>l3</sub> in order to make an appropriate forward prediction for the frame F<sub>3</sub> based on the frame O.
In Fig. 3, x<sub>u2</sub> and x <sub>l2</sub> define a range within which motion vectors detected between the frame F<sub>2</sub> and the frame O are contained. This range is used for checking whether the boundaries x<sub>u3</sub> and x <sub>l3</sub> are appropriate for forward prediction of the frame F<sub>3</sub>.
Based on an assumption that motions in pictures do not have abrupt speed changes in a short time period, the boundaries x<sub>u3</sub> and x <sub>l3</sub> should be equivalent to the boundaries x<sub>u2</sub> and x <sub>l2</sub> after compensation for a frame-distance difference. Taking into consideration the inter-frame distances, the boundaries x<sub>u3</sub> and x <sub>l3</sub> and the boundaries x<sub>u2</sub> and x <sub>l2</sub> should be related as:<maths id="math0001" num=""><math display="block"><mrow><mtable><mtr><mtd><mrow><mtable><mtr><mtd><mrow><mtable><mlabeledtr><mtext>(1)</mtext><mtd><mrow><msub><mrow><mtext>x</mtext></mrow><mrow><mtext>u2</mtext></mrow></msub><msub><mrow><mtext> = (2/3)(x</mtext></mrow><mrow><mtext>u3</mtext></mrow></msub><mtext>)</mtext></mrow></mtd></mlabeledtr></mtable></mrow></mtd></mtr><mtr><mtd><mrow><mtable><mlabeledtr><mtext>(2)</mtext><mtd><mrow><msub><mrow><mtext>x</mtext></mrow><mrow><mtext>l2</mtext></mrow></msub><msub><mrow><mtext> = (2/3)(x</mtext></mrow><mrow><mtext>l3</mtext></mrow></msub><mtext>) </mtext></mrow></mtd></mlabeledtr></mtable></mrow></mtd></mtr></mtable></mrow></mtd></mtr></mtable></mrow></math><img file="EP0804034A2_D0001.tif" /></maths> Strictly speaking, all the motion vectors do not possibly fall into the above range. Namely, the boundaries x<sub>u2</sub> and x <sub>l2</sub> shown as a hatched region in Fig.3 include most of the motion vectors but not all of them.
When a ratio of the number of the motion vectors satisfying x<sub>u2</sub> < x' < x <sub>l2</sub> to the total number of motion vectors exceeds a predetermined threshold, the boundaries x<sub>u2</sub> and x <sub>l2</sub> are regarded as an appropriate range. Enlarged in proportion to the inter-frame distance, the boundaries x<sub>u3</sub> and x <sub>l3</sub> shown by dashed lines in Fig.3 include the motion vectors by approximately the same ratio. Since the motion-vector-search range defined by the boundaries x<sub>u3</sub> and x <sub>l3</sub> can be regarded as appropriate, it is fair to assume that the same motion-vector-search range is sufficient for motion-vector search between the frames F<sub>5</sub> and F<sub>2</sub>.
In this manner, when the above-mentioned ratio exceeds a certain threshold, the frame F<sub>5</sub> can be forwardly predicted by using the frame F<sub>2</sub> as a reference frame.
There are cases in which the above ratio does not exceed the predetermined threshold. It is possible that, even under this condition, the motion-vector-search range is still appropriate to maintain the current coding scheme. On the other hand, when the current motion-vector-search range is insufficient even for the current coding scheme, a larger motion-vector-search range would have to be arranged in order to avoid a decline in prediction efficiency. Distinction between these two cases can be made by pixel-to-pixel differentials between original pictures and predicted pictures created based on motion vectors.
When the motion-vector-search range is ascertained to be insufficient, an inter-frame distance for the forward prediction is shortened to have a forward prediction between the frames F<sub>3</sub> and F<sub>2</sub>, thereby regaining a sufficient motion-vector-search range. When the motion-vector-search range is ascertained to be sufficient but not enough to satisfy the required condition between the above ratio and the predetermined threshold, a forward prediction is made between the frames F<sub>4</sub> and F<sub>2</sub> as originally scheduled.
In this manner, at the time when a motion-vector search for the frame O is finished, a decision can be made whether to have a next forward prediction between the frames F<sub>5</sub> and F<sub>2</sub>, between the frames F<sub>4</sub> and F<sub>2</sub>, or between the frames F<sub>3</sub> and F<sub>2</sub>. When a scene change occurs in pictures, however, this decision, which is made as described above, becomes invalid. To cope with this situation, a reliability measure of the evaluation made on the motion-vector-search range between the frames F<sub>2</sub> and O is obtained. Namely, pixel-to-pixel differentials between the frames F<sub>2</sub> and O are obtained, and are added for all pixels to provide an accumulated differential. When this accumulated differential exceeds a predetermined amount, no change is made to the inter-frame distance.
Fig.4 is an illustrative drawing showing a forward prediction according to the present invention. In Fig.4, the forward prediction is generalized by using integers N and M. A frame F<sub>N</sub> is a N-th frame when frames are successively counted from the frame O, and, likewise, a frame F<sub>M</sub> is a M-th frame. Currently, a forward prediction is made for the frame F<sub>N</sub> by using the frame O as a reference frame. Then, a check is made whether the motion-vector-search range is sufficient for the frame F<sub>M</sub> to use the frame O as a reference frame. This check is made based on results which are obtained from the motion-vector search at the frame F<sub>N</sub>.
Under an assumption that no abrupt change is present in picture motion, a forward prediction for the frame F<sub>M</sub> requires a motion-vector component x detected between the frame F<sub>N</sub> and the frame O to satisfy:<maths id="math0002" num="(3)"><math display="block"><mrow><msub><mrow><mtext>[(N·x</mtext></mrow><mrow><mtext>lM</mtext></mrow></msub><msub><mrow><mtext>)/M] < x < [(N·x</mtext></mrow><mrow><mtext>uM</mtext></mrow></msub><mtext>)/M]</mtext></mrow></math><img file="EP0804034A2_D0002.tif" /></maths> where x<sub>lM</sub> and x<sub>um</sub> are boundaries to define the motion-vector-search range used between the frame F<sub>M</sub> and the frame O.
Namely, assuming no abrupt change in picture motion, a forward prediction of the frame F<sub>M</sub> based on the reference frame O can be made, if motion vectors detected between the frame F<sub>N</sub> and the frame O satisfies the inequality (3) in a sufficient number so that a ratio of such motion vectors to all the motion vectors exceeds a predetermined threshold. In this manner, an enhancement of the prediction efficiency can be achieved.
Fig.5 is a flowchart of a process of changing the inter-frame distance according to an embodiment of the present invention.
At a step S1, an inter-frame distance N for the forward prediction between the reference frame O and a predicted frame is set to 2, and an inter-frame-distance increment a is set to 1.
At a step S2, motion vectors are searched for between the frame O and the frame F<sub>2</sub>.
At a step S3, a check is made whether an accumulated differential E exceeds a predetermined amount. Here, the accumulated differential E is a sum of absolute values of pixel-to-pixel differentials between the frame O and the frame F<sub>2</sub>. If the accumulated differential E exceeds the predetermined amount, the procedure goes to a step S7. Otherwise, the procedure goes to a step S4.
At the step S7, the inter-frame distance N is maintained at 2. This is the case where a scene change is present.
At the step S4 when the accumulated differential E is below the predetermined range, a ratio of the motion vectors having a component x satisfying:<maths id="math0003" num="(4)"><math display="block"><mrow><msub><mrow><mtext>[(N·x</mtext></mrow><mrow><mtext>l3</mtext></mrow></msub><msub><mrow><mtext>)/(N+a)] < x < [(N·x</mtext></mrow><mrow><mtext>u3</mtext></mrow></msub><mtext>)/(N+a)]</mtext></mrow></math><img file="EP0804034A2_D0003.tif" /></maths> to all the motion vectors detected between the frame F<sub>2</sub> and the frame O is obtained.
At a step S5, a check is made whether the ratio exceeds a predetermined threshold. If it does, the procedure goes to a step S6. Otherwise, the procedure goes to a step S8.
At the step S6, the inter-frame distance is increased to N+a for subsequent forward predictions. (The inter-frame distance is increased to 3 according to the conditions set at the step S1.)
At the step S8 when the ratio is below the predetermined threshold, a check is made whether an accumulated pixel-to-pixel differential between a forwardly-predicted-frame-F<sub>2</sub> result and the frame O exceeds a predetermined amount. If it does not, the procedure goes to the step S7 to maintain the inter-frame distance N at 2. If the accumulated differential exceeds a predetermined amount, the procedure goes to a step S9.
At the step S9, the inter-frame distance is decreased to N-1 for subsequent forward predictions. (The inter-frame distance is decreased to 1 according to the conditions set at the step S1.)
In this manner, whether a sufficient motion-vector-search range can be maintained under an increased inter-frame distance is decided based on the motion vectors obtained from the forward prediction. Based on this decision, the inter-frame distance is subjected to an increase or a decrease to achieve a inter-frame predictive coding responsive to picture-information characteristics.
Fig.6 is an illustrative drawing for explaining a check on a motion-vector-search range of a bidirectional prediction according to the present invention. The same as in Fig.4, a forward prediction is currently made for the frame F<sub>N</sub> by using the reference frame O, which is provided N-frames before in a time dimension. Also, a backward prediction of the frame B<sub>n</sub> for the bidirectional prediction is made based on the frame F<sub>N</sub>. Based on motion-vector-search results for the frame F<sub>N</sub>, a check is made whether a sufficient backward motion-vector-search range is maintained for the bidirectional prediction of the frame B<sub>n</sub> even when the forward-prediction is made for the frame F<sub>M</sub>.
Under an assumption that no abrupt change is present in picture motion, a backward prediction of the frame B<sub>n</sub> based on the frame F<sub>M</sub> requires a motion-vector component x detected between the frame F<sub>N</sub> and the frame O to satisfy:<maths id="math0004" num="(5)"><math display="block"><mrow><msub><mrow><mtext>[(N·x</mtext></mrow><mrow><mtext>nlb</mtext></mrow></msub><msub><mrow><mtext>)/(M-n)] < x < [(N·x</mtext></mrow><mrow><mtext>nub</mtext></mrow></msub><mtext>)/(M-n)]</mtext></mrow></math><img file="EP0804034A2_D0004.tif" /></maths> where x<sub>nlb</sub> and x<sub>nub</sub> are boundaries to define the backward motion-vector-search range used between the frame B<sub>n</sub> and the frame F<sub>M</sub>. Here, N in the inequality (5) is the inter-frame distance between the frame F<sub>N</sub> and the frame O, and (M-n) is the inter-frame distance between the frame F<sub>M</sub> and the frame B<sub>n</sub>. That is, the range defined by the inequality (5) is equivalent to the backward motion-vector-search range defined by the boundaries x<sub>nlb</sub> and x<sub>nub</sub> after compensation for a difference of these inter-frame distances.
Under an assumption of no abrupt motion change, a sufficient backward motion-vector-search range can be maintained even when the backward reference frame is changed from the frame F<sub>N</sub> to the frame F<sub>M</sub>, i.e., even when a frame forwardly predicted based on the reference frame O is changed from the frame F<sub>N</sub> to the frame F<sub>M</sub>. This sufficient backward motion-vector-search range can be maintained for any frames appearing immediately after the reference frame O which satisfies the inequality (5) together with the frame F<sub>N</sub>. In actuality, a requirement is that a ratio of motion vectors satisfying the inequality (5) to all the motion vectors detected between the frame F<sub>N</sub> and the reference frame O exceed a predetermined threshold. As long as this requirement is met, the frame B<sub>n</sub> can be backwardly predicted based on the frame F<sub>M</sub>.
Accordingly, a check as to whether the inter-frame distance can be increased may involve two decision making processes. First, a check may be made whether the vector-search range is sufficient for a forward prediction under an increased inter-frame distance. Then, another check may be made whether the vector-search range is sufficient for a backward prediction under the increased inter-frame distance. In the flowchart of Fig.5, for example, both of these two checks may be made at the step S4.
In this manner, whether a sufficient motion-vector-search range for bidirectional prediction can be maintained under an increased inter-frame distance is decided based on the motion vectors obtained from the forward prediction. Based on this decision, the inter-frame distance for the forward prediction is subjected to an increase or a decrease, and, in response, the number of bidirectionally predicted frames is increased or decreased.
Fig.7 is an illustrative drawing for explaining another check on a motion-vector-search range of the bidirectional prediction according to the present invention. A check shown in Fig.7 is used in the same manner as the check of Fig.6, and provides another method of deciding whether the motion-vector-search range is sufficient for a bidirectional prediction under an increased inter-frame distance.
The same as in Fig.4 and Fig.6, a forward prediction is currently made for the frame F<sub>N</sub> by using the reference frame O, which is provided N-frames before in a time dimension. Also, a backward prediction of the frame B<sub>n</sub> for the bidirectional prediction is made based on the frame F<sub>N</sub>. Based on backward-motion-vector-search results obtained between the frame F<sub>N</sub> and the frame B<sub>n</sub>, a check is made whether a sufficient backward motion-vector-search range is maintained for the bidirectional prediction of the frame B<sub>n</sub> even when the forward-prediction is made for the frame F<sub>M</sub>.
Under an assumption that no abrupt change is present in picture motion, a backward prediction of the frame B<sub>n</sub> based on the frame F<sub>M</sub> requires a motion-vector component x detected between the frame B<sub>n</sub> and the frame F<sub>N</sub> to satisfy:<maths id="math0005" num="(6)"><math display="block"><mrow><msub><mrow><mtext>[(N-n)·x</mtext></mrow><mrow><mtext>nlb</mtext></mrow></msub><msub><mrow><mtext>/(M-n)] < x < [(N-n)·x</mtext></mrow><mrow><mtext>nub</mtext></mrow></msub><mtext>/(M-n)]</mtext></mrow></math><img file="EP0804034A2_D0005.tif" /></maths> where x<sub>nlb</sub> and x<sub>nub</sub> are boundaries to define the backward motion-vector-search range used between the frame B<sub>n</sub> and the frame F<sub>M</sub>. Here, (N-n) in the inequality (6) is the inter-frame distance between the frame F<sub>N</sub> and the frame B<sub>n</sub>, and (M-n) is the inter-frame distance between the frame F<sub>M</sub> and the frame B<sub>n</sub>. That is, the range defined by the inequality (6) on the frame F<sub>N</sub> is equivalent to the backward motion-vector-search range defined by the boundaries x<sub>nlb</sub> and x<sub>nub</sub> on the frame F<sub>M</sub> after compensation for a difference of the inter-frame distances.
Under an assumption of no abrupt motion change, a sufficient backward motion-vector-search range can be maintained even when the backward reference frame is changed from the frame F<sub>N</sub> to the frame F<sub>M</sub>, i.e., even when a frame forwardly predicted based on the reference frame O is changed from the frame F<sub>N</sub> to the frame F<sub>M</sub>. This sufficient backward motion-vector-search range can be maintained for any frames appearing immediately after motion-vector-search results satisfying the inequality (6) are obtained. In actuality, a requirement is that a ratio of motion vectors satisfying the inequality (6) to all the motion vectors detected between the frame F<sub>N</sub> and the frame B<sub>n</sub> exceed a predetermined threshold. As long as this requirement is met, the frame B<sub>n</sub> can be backwardly predicted based on the frame F<sub>M</sub>.
In this manner, whether a sufficient motion-vector-search range for bidirectional prediction can be maintained under an increased inter-frame distance is decided based on the motion vectors obtained from the bidirectional prediction. Based on this decision, the inter-frame distance for the forward prediction is subjected to an increase or a decrease, and, in response, the number of bidirectionally predicted frames is increased or decreased.
Fig.8 is a block diagram of an embodiment of an image processing device according to the present invention. The image processing device of Fig.8 includes a motion-detection unit 1, a frame memory 2, a first operation unit 3, a DCT unit 4, a quantization unit 5, a variable-length coding unit 6, an inverse-quantization unit 7, an inverse-DCT unit 8, a second operation unit 9, a frame memory 10, a local-decoder unit 11, a statistical-analysis unit 12, a coding-pattern-determination unit 13, a coding-pattern-based control unit 14, and an analysis/determination unit 15.
The frame memory 2 has a multi-bank structure to cope with different inter-frame distances which are used for detection of motion vectors. The frame memory 10 of the local-decoder unit 11 has two banks for storing pictures of the forward reference and the backward reference. The first operation unit 3 and the second operation unit 9 are in a through operation mode to pass data through when the intra-frame coding is applied. When the inter-frame coding is used, the first operation unit 3 operates as a subtracter, and the second operation unit 9 operates as an adder.
Motion vectors detected by the motion-detection unit 1 are supplied to the statistical-analysis unit 12 of the coding-pattern-analysis/determination unit 15. The statistical-analysis unit 12 obtains statistics of the magnitude of the motion vectors. Based on the obtained statistics, the coding-pattern-determination unit 13 determines a coding pattern of pictures by deciding the inter-frame distances for predictions, and notifies the coding-pattern-based control unit 14 of the determined coding pattern. The coding-pattern-based control unit 14 takes care of bank management of the frame memory 2 according to the inter-frame distances of the coding pattern. Also, the coding-pattern-based control unit 14 is responsible for control of the first operation unit 3, the DCT unit 4, the quantization unit 5, the variable-length coding unit 6, the inverse-quantization unit 7, the inverse-DCT unit 8, the second operation unit 9, and the frame memory 10, according to the coding pattern.
In the case of the I picture, the first operation unit 3 and the second operation unit 9 are in a through operation mode to pass the data through. Picture information is DCT-transformed by the DCT unit 4, is quantized by the quantization unit 5, and is coded by the variable-length coding unit 6 before being output from the image processing device. Also, the transformed and quantized picture information is inverse-quantized by the inverse-quantization unit 7, and is inverse-DCT-transformed by the inverse-DCT unit 8 before being stored in the frame memory 10.
In the case of the P picture, the motion-detection unit 1 reads from the frame memory 2 a previous frame in accordance with the inter-frame distance of the forward prediction, and compares this previous frame with the current frame to obtain motion vectors within a motion-vector-search range. The first operation unit 3 is controlled to work as a subtracter, and the second operation unit 9 is controlled to serve as an adder. The first operation unit 3 receives each block of the current frame from the motion-detection unit 1, and receives each corresponding block of the previous frame from the frame memory 10 in accordance with the detected motion vectors. Then, the first operation unit 3 takes block-to-block differentials between the current frame and the previous frame. The block-to-block differentials are coded by the DCT unit 4, the quantization unit 5, and the variable-length coding unit 6 to achieve inter-frame coding of the current frame. The second operation unit 9 obtains a sum between these differentials and the previous frame to obtain a predicted current frame, which is stored in the frame memory 10.
In the case of the B picture, the coding-pattern-based control unit 14 determines the number of B pictures inserted between a P picture and one of an I picture and a P picture. As previously described, the B picture is predicted by using the forwardly-predicted P picture and the reference picture, which is one of an I picture and a previous P picture. In order to achieve this, pictures are generally provided in a partially reversed order at the time of coding. When a picture sequence is I1B2P3 (i.e., a sequence of an intra picture, a bidirectionally predictive picture, and a forwardly predictive picture), for example, an actual picture sequence for coding is I1P3B2. Namely, a first frame is coded as an I picture based on intra-frame coding, and, then, a third frame is coded as a P picture based on forward prediction. Finally, a second frame is coded based on bidirectional prediction by using the I picture and the P picture.
In MPEG, three different modes are prepared for the bidirectional prediction. A first mode is use of only the forward prediction. A second mode is use of only the backward prediction, and a third mode is use of both the backward prediction and the forward prediction. The best mode among these three mode is determined for each block, and is used for coding the respective block. In the following description, the third mode using both the backward prediction and the forward prediction will be taken as an example for the sake of simplicity of explanation.
The frame memory 2 is controlled by the coding-pattern-based control unit 14 based on the determined coding pattern, and the motion-detection unit 1 searches for motion vectors for the forward prediction and the backward prediction of the bidirectional prediction. The first operation unit 3 and the second operation unit 9 are controlled in the same manner as in the case of coding the P picture. Both banks for the forward prediction and the backward prediction are used in the frame memory 10.
The motion-detection unit 1 reads from the frame memory 2 two reference frames for the forward prediction and the backward prediction, and compares the current frame with both the forward reference frame and the backward reference frame to obtain motion vectors within a motion-vector-search range. The first operation unit 3 receives each block of the current frame from the motion-detection unit 1, and receives each corresponding block of these two reference frames from the frame memory 10 in accordance with the detected motion vectors. Then, the first operation unit 3 takes block-to-block differentials between the current frame and an average of the two reference frames. The block-to-block differentials are coded by the DCT unit 4, the quantization unit 5, and the variable-length coding unit 6 to achieve bidirectionally predictive coding of the current frame.
The present invention is not limited to the above described embodiment, but other variations and modifications can be made. For example, inter-frame differences between the reference frame and a frame to be predicted (forward prediction or bidirectional prediction) may be obtained to check the existence of a scene change. Namely, an absolute-value sum of the inter-frame differences between the reference frame and the frame to be predicted is obtained and compared with a predetermined value. This may be done by the motion-detection unit 1 and the statistical-analysis unit 12, for example. When this sum exceeds the predetermined value, the coding-pattern-based control unit 14 controls the other elements so as not to change the inter-frame distances.
Further, an absolute-value sum of differences between an original frame and a prediction-resulted frame (forward prediction or bidirectional prediction) may be obtained and compared with a predetermined value. This may be done by the coding-pattern-based control unit 14. When this sum exceeds the predetermined value, the coding-pattern-based control unit 14 controls the other elements to shorten the inter-frame distance between a reference frame and a frame to be predicted. In this manner, the inter-frame distance is reduced to regain an appropriate motion-vector-search range.
Preferably, the inter-frame distance is set at the possible maximum distance of the device at the start of the moving-picture coding of the present invention. For example, when a forward-prediction inter-frame distance M is 3 at a maximum according to the capacity of the device, the forward-prediction inter-frame distance M should start from 3 in the moving-picture coding.
Figs.9A through 9F are table charts for explaining the reason why the inter-frame distance should start from the possible maximum distance. In Figs.9A through 9F, the forward-prediction inter-frame distance M is changed once in every 6 frames. In each table chart of Figs.9A through 9F, the top row shows the forward-prediction inter-frame distance M, the middle row shows a sequence of I, P, and B pictures of the input picture information, and the bottom row shows a coded-picture sequence of I, P, and B pictures. A numeral after the symbol I, P, or B denote the frame number. For example, I0, P1, P2, P3, P4, P5, and B6 represent an I picture of frame number 1, P pictures of frame numbers 2-5, and a B picture of frame number 6, respectively.
Fig.9A shows a case in which an initial inter-frame distance for the forward prediction is 1. In Fig.9A, the forward-prediction inter-frame distance M (hereinafter, merely referred to as an inter-frame distance unless there is possibility of creating confusion) is changed from 1, 2, to 1, successively. When a picture sequence of I0, P1, P2, P3, ··· is provided as the picture information at the start of the picture coding, a coded-picture sequence I0, P1, P2, P3, ··· is obtained with a delay of one frame period because of processing time for coding.
When the initial value of the inter-frame distance M is started from 1 as shown in Fig.9A, a coded frame is not present for a certain frame period, as shown by the symbol x. Namely, in the frame period indicated by the symbol x, P7 should be output as a coded frame ahead of B6, but is still in the process of coding. This lack of the frame occurs after the inter-frame distance M is changed from 1 to 2.
Fig.9B shows a case in which an initial inter-frame distance for the forward prediction is 1. In Fig.9B, the forward-prediction inter-frame distance M is changed from 1, 2 to 3, successively.
When the initial value of the inter-frame distance M is 1 as shown in Fig.9B, a coded frame is not present for a certain frame period, as shown by the symbol x. This lack of the frame occurs after the inter-frame distance M is changed from 1 to 2 and after it is changed from 2 to 3.
Fig.9C shows a case in which the inter-frame distance M is started at 2 and changed to 3. In this case, a coded frame is lacking during a certain frame period shown by the symbol x, and this occurs after the inter-frame distance M is changed from 2 to 3
Figs.9D through 9F show cases in which the inter-frame distance M is initially at the maximum distance of 3. Fig.9D shows a case in which the inter-frame distance M is changed from 3, 2, 3, 2, to 1, successively. In Fig.9E, the inter-frame distance M is changed from 3, 2, 1, 2, 1, to 2, successively. Fig.9F shows changes of the inter-frame distance M from 3, 2, 1, 2, 3, to 2. In these figures, a picture sequence of B0, B1, I2, B3, ··· is provided as the picture information at the start of the picture coding, and a coded-picture sequence I2, B0, B1, ··· is obtained with a delay of three frame periods because I2 should be coded first ahead of B0 and B1.
In the cases of Figs.9D through 9F, an initial value of the inter-frame distance is set to the possible maximum value, so that the delay of the coded-picture sequence is maximized from the beginning. As a result, a change in the inter-frame distance M does not bring about a frame period lacking a coded frame. Figs.9D through 9F show only the cases in which the inter-frame distance M is changed by ±1. However, even when the inter-frame distance M is changed by ±2, a maximum initial value of the inter-frame distance ensures that any frame period has a coded frame.
Occurrence of such a frame period as having no coded frame does not mean that a motion-vector-search process is impaired. In the operation of the image processing device, however, discontinuity in the coded-frame sequence caused by such a frame period is undesirable in terms of the stability of the operation. As described above, the use of the possible maximum value for the initial inter-frame distance ensures continuity of the coded-frame-output data stream. Also, if image characteristics are known or can be estimated in advance, the inter-frame distance may be set to a distance of the highest occurrence.
As described above, according to the present invention used in a coding scheme employing a combination of the forward prediction and the bidirectional prediction, an inter-frame distance with an appropriate motion-vector-search range is determined based on detected motion vectors by drawing on an assumed image characteristic that no abrupt change is present in picture motions within a short time period. In the case of motion vectors being small, an increase in the inter-frame distance is justified since an appropriate motion-vector-search range can be maintained after the increase. In this case, the inter-frame distance is stretched to increase the number of bidirectionally-predicted frames which have high prediction efficiency.
Further, the present invention is not limited to these embodiments, but various variations and modifications may be made without departing from the scope of the present invention.
Contents4
21 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| EP1204279A3 | Cited by | European Patent Office (EPO) | Search report |
| US7616690B2 | Cited by | United States of America | Applicant |
| CN100373952C | Cited by | China | Search report |
| AU751909B2 | Cited by | Australia | Search report |
| USRE44457E1 | Cited by | United States of America | Applicant |
| EP0874525A3 | Cited by | European Patent Office (EPO) | Search report |
| WO0024202A1 | Cited by | World Intellectual Property Organization (WIPO) | International search |
| USRE44457E | Cited by | United States of America | Applicant |
| EP1204279A2 | Cited by | European Patent Office (EPO) | Search report |
| US6052417A | Cited by | United States of America | Search report |
| EP0874525A2 | Cited by | European Patent Office (EPO) | Search report |
| EP1202579A1 | Cited by | European Patent Office (EPO) | Search report |
| WO9520863A1 | Cites | World Intellectual Property Organization (WIPO) | Search report |
6 members in 3 offices
Priority claims4
| Document | Office | Kind | Date |
|---|---|---|---|
| 10657796 | Japan | – | |
| 10657796 | Japan | A | |
| 10657796 | – | – | – |
| JP19960106577 | – | – | – |
Members6
| Document | Office | Kind | |
|---|---|---|---|
| EP0804034A2This record | European Patent Office (EPO) | A2 | |
| JPH09294266A | Japan | A | |
| EP0804034A3 | European Patent Office (EPO) | A3 | |
| US5894526A | United States of America | A | |
| EP0804034B1 | European Patent Office (EPO) | B1 | |
| JP3876392B2 | Japan | B2 |
23 legal events, as 3 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Notification of lapseLapsedST | ST | FR | |
| Gb: european patent ceased through non-payment of renewal feeCeasedGBPC | GBPC | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| No opposition filedOpposition26N | 26N | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Fr: translation filedET | ET | EP | |
| Designated contracting statesAK | AK | EP | |
| European patent in force as of 2002-01-01IF02 | IF02 | GB | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOS IGRAGRAH | GRAH | EP | |
| Despatch of communication of intention to grantORIGINAL CODE: EPIDOS AGRAGRAG | GRAG | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOS IGRAGRAH | GRAH | EP | |
| First examination report despatched17Q | 17Q | EP | |
| Despatch of communication of intention to grantORIGINAL CODE: EPIDOS AGRAGRAG | GRAG | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Search report despatchedORIGINAL CODE: 0009013PUAL | PUAL | EP | |
| Designated contracting statesAK | AK | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 0804034
- Publication, DOCDB
- 0804034
- Publication, EPODOC
- EP0804034
- Application
- 96306812
- Application, DOCDB
- 96306812
- Application, EPODOC
- EP19960306812
Titles3
- German
- Verfahren und Vorrichtung zur Detektion von Bewegungsvektoren
- English
- Method and device for detecting motion vectors
- French
- Méthode et dispositif de détection de vecteurs de mouvement
Classification
- CPC, 3
- H04N19/577
- H04N19/51
- H04N19/58
- IPC, 19
- H04N19 50
- G06T9 00
- H04N19 105
- H04N19 114
- H04N19 139
- H04N19 142
- H04N19 172
- H04N19 189
- H04N19 196
- H04N19 423
- H04N19 503
- H04N19 51
- H04N19 56
- H04N19 57
- H04N19 577
- H04N19 61
- H04N19 625
- H04N19 87
- H04N19 91
Designated states2
- Contracting states, 2
- France
- United Kingdom