METHOD AND APPARATUS FOR BACKGROUND EXTRACTION FOR THE REDUCTION OF NUMBER OF CODED BLOCKS IN VIDEO CODING

Abstract: A method and apparatus that distinguishes the static component of a frame from its dynamic component and provides a computationally efficient method for background extraction. If a block in a current frame is determined to correspond to a static component, it is not encoded or sent. A preferred embodiment of the present invention works on the block level and has two basic parts. First, the difference in pixel intensities between each block in the current frame and its best-matched corresponding block in a previous frame are determined. These differences are then processed further to reduce the effects of noise in subsequent calculations before they are passed to the second part. The second part applies a concept called herein "center of gravity" to determine a degree of similarity between two blocks in the respective current and previous frames. The center of gravity is determined for a chosen block (in the current frame) and compared with its best match (in the previous frame). A large discrepancy in the two figures indicates dis-similarity and a small discrepancy indicates similarity.

Description: METHOD AND APPARATUS FOR BACKGROUND EXTRACTION FOR THE REDUCTION OF NUMBER OF CODED BLOCKS IN VIDEO CODING FIELD OF THE INVENTION This application relates to a method and apparatus for improving the transmission of video information and, specifically, to a method and apparatus that identifies redundant information during video encoding. BACKGROUND OF THE INVENTION As a consequence of the limitations in transmission bandwidth, video signals have to undergo high-ratio compression before they can be transmitted in real-time. Extra compression is sometimes impossible without sacrificing the quality of the consequent pictures. Video data often has a fairly static background that is redundant in sequential frames. When video data is transmitted in real-time, it is desirable to identify this redundant data and to refrain from resending the redundant data if possible. Many conventional video compression standards use the technique of motion estimation in conjunction with DCT (Discrete Cosign Transfer). The DCT is a special case of a discrete Fourier transform in which the sine components of the coefficients have been eliminated, leaving a single number. DCT itself does not result in a reduction, since the transform yields as many coefficients as samples, but it converts the input video into a form where redundancy can be easily detected and removed. Because DCT is computation intensive, it is desirable to avoid transforming data if possible. SUMMARY OF THE INVENTION A preferred embodiment of the present invention provides a method and apparatus that distinguishes the static component of a frame from its dynamic component and provides a computationally efficient method for background extraction. If a block in a current frame is determined to correspond to a static component, it is not encoded or sent. A preferred embodiment of the present invention works on the block level and has two basic parts. First, the difference in pixel intensities between each block in the current frame and its best-matched corresponding block in a previous frame are determined. These differences are then processed further to reduce the effects of noise in subsequent calculations before they are passed to the second part. The second part applies a concept called herein "center of gravity" to determine a degree of similarity between two blocks in the respective current and previous frames. The term "center of gravity" is used because of the concept's similarity to the concept of center of gravity in the mechanical sciences. The center of gravity is determined for a chosen block (in the current frame) and compared with its best match (in the previous frame). A large discrepancy in the two figures indicates dis-similarity and a small discrepancy indicates similarity. To simplify computations, in the described embodiment, the center of gravity operation is carried out on a difference array instead of the current and previous blocks from which it is derived. In accordance with the purpose of the invention, as embodied and broadly described herein, the invention relates to a method of distinguishing a static component in a current frame of video data, comprising the steps of: determining a difference between a current block of the current frame and a best-matched block in a previous frame to yield a difference array; determining, in accordance with the difference array, a shift of center of gravity between the current block and the best- matched block; encoding the current block when the shift in the center of gravity does not exceed a predetermined threshold for the shift of gravity. A fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate several embodiments of the invention and, together with the description, serve to explain the principles of the invention. Fig. 1 is a block diagram of a computer system in accordance with a preferred embodiment of the present invention. Fig. 2 is a flow chart of steps performed by a transmitter in the embodiment of Fig. 1. Fig. 3 is a diagram of data structures used in the flow chart of Fig. 2. Fig. 4 contains pseudocode showing details of a preprocessing method of Fig. 2. Fig. 5 shows two reference points, refl and ref2, in a current block of a current frame. DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT The following paragraphs describe a preferred embodiment of the present invention. Where convenient, the same reference numbers will be used to the same or like parts. I General Description In conventional video-conferencing applications, a significant portion of the frames contain background images that are essentially static and that carry no fresh information in their corresponding bit streams. If these blocks can be identified from their complementary moving parts, redundant information in the temporal domain can be separated and zero-coded to save bandwidth for the coding of information crucial to the perceptual coherence of the image sequences. In addition to the reduction in the amount of coded data, the heavily computational DCT (Discrete Cosine Transform) and I DCT (Inverse Discrete Cosine Transform) operations can be bypassed, since the results are all zeros Fig. 1 is a block diagram of a video transmission system 100 in accordance with a first preferred embodiment of the present invention. Fig. 1 includes a transmitter 102 (which can be part of a first transceiver) sending video data over connection 106 to a receiver 104 (which can be part of a second transceiver). In the described embodiment, transmitter 102 and receiver 104 each include a processor 110, 120 and a memory 112, 122. Memory 112, 122 stores program instructions performing the steps of Figs. 2-4 and also including appropriate data structures, video data, and reference data as described below. Connection 106 can be any appropriate type of connection, such as a LAN, WAN, a hardware channel, the internet, a carrier wave, etc. It should be understood that the system of Fig. 1 is shown for purposes of example only. A person of ordinary skill in the art will understand that system 100 may also contain additional information, such as input/output lines; input devices, such as a keyboard, a mouse, and a voice input device; and display devices, such as a display terminal. Transmitter 102 and receiver 104 can be (or can be part of) general purpose computers, special purpose computers, or specialized hardware containing a processor and memory. Other embodiments of the invention may also be implemented in hardware, such as programmable logic devices, or in analog circuitry. One or more of system 100 may also include an input device, such as a floppy disk drive, CD ROM reader, or DVD reader, that reads computer instructions stored on a computer readable medium, such as a floppy disk, a CD ROM, or a DVD drive. System 100 also may include application programs, operating systems, data, etc., which are not shown in the figure for the sake of clarity. In the following discussion, it will be understood that the steps of methods and flow charts discussed preferably are performed by processor 110 (or a similar processor) executing instructions stored in memory 112 (or other appropriate memory). It will also be understood that the invention is not limited to any particular implementation or programming technique and that the invention may be implemented using any appropriate techniques for implementing the functionality described herein. The invention is not limited to any particular programming language or operating system. In alternative embodiments, hard-wired circuitry may be used in place of or in combination with software instructions to implement the invention. Thus, the invention is not limited to any specific combination of hardware circuitry and software. The term "computer-usable medium" as used herein refers to any medium that participates in providing instructions to a processor for execution. Such a medium may take many forms, including but not limited to, non-volatile media, volatile media, and transmission media. Non-volatile media includes, for example, optical or magnetic disks, such as a storage device. Volatile media includes dynamic memory. Transmission media include coaxial cables, copper wire and fiber optics, including the wires that comprise a bus within a computer. Transmission media can also take the form of acoustic or light waves, such as those generated during radio-wave and infra-red data communications. Common forms of computer-usable media include, for example a floppy disk, a flexible disk, a hard disk, magnetic tape, or any other magnetic medium, a CD- ROM, any other optical medium, punchcards, papertapes, any other physical medium with patterns of holes, a RAM, a PROM, an EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrier wave as described hereafter, or any other medium from which a computer can read. II. Specifics of A Preferred Embodiment Fig. 2 is a flow chart of steps performed by a transmitter in the embodiment of Fig. 1. The method is formed of two parts: a preprocessing part, which includes step 202 and a center of gravity part, which includes steps 204-212. The preprocessing step 202 involves determination of a difference array by determining the difference in intensity between respective pixels in the previous and current blocks. In the described embodiment, DIFF and the video data being processed are stored in memory 112. Fig. 3 shows the determination of difference array DIFF 306 by subtracting a current block NEW 304 of a current frame from a best-matched block OLD 302 of a previous frame. DIFF is further processed as shown in Fig. 4 to yield a preprocessed difference array DIFF 308. Difference array DIFF 306, 308 contains a total of NxN pixels, and each pixel has an effect, with strength dependent on both the magnitude and position of the pixel, on the center of gravity of the whole array population. The influence, however, of any pixel on the center of gravity can be frozen by removing its value from the difference array DIFF. Scanning for pixels whose value must be removed from DIFF is the purpose of the preprocessing step. In this regard, two types of pixels are undesirable and their effects must be removed. The first type is pixels with outstanding values among their surrounding neighborhood due to the contributions of noise. The second type of pixels involves those originated from highly intensity varying patterns (e.g., checker-board patterns of shirts). Because such patterns have sharp variations in pixel intensity in the near locality, they can easily generate high-valued pixels in the difference array and result in a wrong conclusion of a substantial change in the center of gravity of the associated blocks even though the patterns shift by only a small margin. The following variables used in Fig. 4: N: Length of blocks, NEW: Block in current frame being coded, OLD: Best-matched block for NEW in the previous frame, DIFF: the difference array (NEW - OLD), VALID: Label for pixels in DIFF to be retained, INVALID: Label for pixels in DIFF to be destroyed, DIFF_TEST: Test for isolating pixels in DIFF with outstanding values from their immediate neighborhood, and OLD_TEST: Test for isolating pixels in DIFF that originate from patterns in OLD with highly varying intensities. Fig. 4 shows details of the preprocessing part. As shown by loop 402, the steps of Fig. 4 are performed for each of NxN pixels in the current block. In a DIFF_TEST step 404, the difference in pixel intensities between a current pixel in the current block and a corresponding pixel in the block's best-match correspondence in the previous frame are determined. DIFF_TEST 404 compares, to the current pixel in the difference array DIFF, pixels in DIFF that are one up, one down, one left and one right from the current pixel in DIFF. If the ratio between any of the neighboring pixels in DIFF and the current pixel in DIFF is larger than a predetermined threshold ThresDIFF, then control passes to OLD_TEST 406. In the described embodiment, ThresDIFF is 0.9, although other values can also be used. Otherwise (if all ratios are less than or equal to ThresDIFF) control passes to INVALID 408 and the current pixel in the difference array DIFF 308 is set to zero. OLD_TEST 406, compares difference values for pixels in the OLD array that are one up, one down, one left and one right from a current pixel in OLD to the current pixel in DIFF. If the ratio between a difference value for any one of the neighboring pixels in OLD and the current pixel in DIFF is greater than a predetermined threshold ThresOLD, control passes to INVALID and the current pixel in the difference array DIFF 308 is set to zero. In the described embodiment, ThresOLD is1 , although other values can also be used. Otherwise control passes to VALID 408 and the value of the current pixel in DIFF 308 remains unchanged. The second part of the method in accordance with the present invention applies the "center of gravity" concept. The core of the background extraction method lies in the interpretation of the difference in center of gravity as a measure of the degree of similarity in the content of the blocks involved. For the center of gravity of an object to be meaningful, it has to be calculated with respect to a certain point of reference that functions as the origin of the coordinate system being used. This reference point can be chosen to be any one of the NxN points contained in a block. Taking the point (1 ,1) as a reference (as shown in Fig. 5), the center of gravity of NEW and OLD can be written from definitions as: XNEW = ∑oii rows ) ∑ ( aiicois ) [NEW(row, col) • col] / ∑ (all rows) ∑ (a „ cois ) NEW(row, col), YNEW = ∑ ( aii rows ) ∑ ( aiicois ) [NEW(row, col) • row]/ ∑ (all rows) ∑ (all cols) NEW(row, col), and X 0LD = ∑ (all rows) ∑ (all ∞ls) [OLD(row, col) • col] / ∑ (all rows) ∑ (all ∞ls) OLD(row, col), YOLD = ∑oii rows ) ∑ ( aii cois ) [OLD(row, col) • row]/ ∑ (all rows) ∑ (all cols) OLD(row, col). (1) where the "•" operator is the multiplication operator. The direct employment of the above formula in the described method may be problematic for certain types of data because the same image of a different scale plus an appropriate shifting can give the same center of gravity value despite their difference in appearance to the human eye. To avoid this, X 0LD and Y 0LD can be redefined as: XQ D = ∑ ( aii rows ) ∑ ( aii cois ) [OLD(row, col) • col] / ∑ (all rows) ∑ (all cols) NEW(row, col), YQLD = ∑ (a ιι rows ) ∑ ( aiι cois ) [OLD(row, col) • row]/ ∑ (all rows) ∑ (all ∞ls) NEW(row, col). (2) The modifications in equation (2) will not affect blocks that are truly similar. Because the method is only interested in the change in the center of gravity in the two blocks NEW and OLD, we obtain: = ∑t a ii rows) ∑ (a ii oo i s) [DIFF(row, col) • col]/ ∑ (all rows) ∑ (all cols) NEW(row, col), ΔY r r o e f f 1 l = : Y YN NEEWW " Y ' O, OLLDD = ∑ (a ii rows) ∑( a ii co i s) [DIFF(row, col) • row]/ ∑ (al , rows) Σ (a , l c0 | S) NEW(row, col). Contrary to what is expected based on knowledge in the theory of center of gravity the center of gravity of OLD varies with the reference point location after the replacement of equation (1) by equation (2) is made. Taking (N,N) as another point of reference (denoted by ref2 below) the following equations can be obtained. ΔX ref2 = Σ (a n rows) ∑ (a ii co i s) [DIFF(row, col) • (N+1-col)]/ ∑ (all rows) ∑ (all cols) NEW(row, col) = k-ΔX ref1, ΔY ref2 = ∑ fa ii rows) ∑ (a ii co i s) [DIFF(row, col) • (N+1-row)]/ ∑ (all rows) ∑ (all cols) NEW(row, col) = k-ΔY ref2 where k = (N+1) • [1-∑ (all rows) Σ (all cols) OLD(row, col) /∑ (al | rows) ∑ (a ,ι ∞ ι s) NEW(row,col)]. Therefore, (ΔX r _ f i. ΔY ref1 ) and (AX^, AY^) measure the shift in center of gravity in the x and y directions with reference to the points (1,1) and (N,N) respectively. The described embodiment checks for the condition that at least one of the above figures has an absolute value exceeding a certain threshold. If the condition is satisfied, it implies that there are observable differences between the blocks, and hence the NEW block must be coded and sent by the transmitter. Conversely, if the condition fails to hold, the two blocks are reasonably similar and, thus, both the DCT calculation and the coding procedure can be skipped for NEW. There are occasions when NEW and OLD carry the same image with the same center of gravity but, owing to a change in lighting, they are seen to be different. Because the center of gravity test introduced above is not able to identify these situations, an extra rule is introduced to serve the purpose. If any entry in DIFF exceeds a specified threshold, then the NEW block has to be coded, regardless of the change in center of gravity. The second part of the method is shown in steps 204-212 of Fig. 2. Step 204 determines whether an entry in DIFF 308 exceeds a predetermined large difference threshold. In a preferred embodiment, this predetermined large difference threshold is 70, although other values can be used. If an entry in DIFF exceed the predetermined large difference threshold, control passes to step 210 and the block is encoded. Step 206 determines a shift in the center of gravity between the current block and the previous block for the reference points refl and ref2. In a preferred embodiment, this determination is made as follows: ΔX r efi = X EW " XOLD = Σ (a ιi rows) ∑ (a ιi co i s) [DIFF(row, col) • col]/ ∑ (all rows) ∑ (all cols) NEW(row, col); N" ref1 = ^NEW " ' OLD = ∑ (a iι rows) ∑ (a iι co i s) [Dl FF(row, col) • row]/ ∑ (all rows) ∑ (all ∞ls) N EW(row, col) ; k = (N+1) • [1-Σ (a ,ι rows) Σ (a ιi colS) OLD(row, col) /∑ (all rows) Σ (all co , s) NEW(row,col)]; ΔX re β = k-ΔX ref1 = ∑ (all rows) ∑ (a „ eh , [DIFF(row, col) • (N+1-col)]/ ∑ (all rows) ∑ (all ∞ls) NEW(row, col); Δ re f 2 = K " ΔY re f2 = Σ (a ιi rows) ∑ (a ii co i s) [DIFF(row, col) • (N+1-row)]/ Σ (all rows) Σ (a , l cols) NEW(row, col). In step 208, if the shift in the center of gravity for any one of (ΔX ref1 , ΔY ref1 , ΔX^, or AY ref2 ) is greater than a predetermined threshold, then control passes to step 210 and the block is encoded. Otherwise, the block is skipped and is not encoded. In a preferred embodiment, the threshold for the shift in the center of gravity is 0.1 , although other values can be used. In summary, the present invention provides a method and apparatus that isolates the stationary portions of video images from their moving components. This method and apparatus can produce a considerable increase in frame rate for, for example, video conferencing applications. While the invention has been described in conjunction with a specific embodiment, it is evident that many alternatives, modifications and variations will be apparent to those skilled in the art in light of the foregoing description.

Claims: WHAT IS CLAIMED IS: 1. A method of distinguishing a static component in a current frame of video data, comprising the steps of: determining a difference between a current block of the current frame and a best-matched block in a previous frame to yield a difference array; determining, in accordance with the difference array, a shift of center of gravity between the current block and the best-matched block; and encoding the current block when the shift in the center of gravity exceeds a predetermined threshold for the shift of gravity. 2. The method of claim 1 , further comprising the step of: preprocessing the difference array to reduce the effects of noise prior to the step of determining the shift in the center of gravity. 3. The method of claim 2, wherein the preprocessing step includes the steps of: zeroing values from the difference array corresponding to pixels with outstanding values among their neighbor pixels. 4. The method of claim 3, wherein the preprocessing step includes the step of: comparing, to a current pixel in the difference array, pixels in the difference array that are one up, one down, one left and one right from the current pixel in the difference array. 5. The method of claim 3, wherein the preprocessing step includes the step of: comparing, to a current pixel in the difference array, difference values for pixels in the previous block that are one up, one down, one left and one right from a current pixel in the previous block. 6. The method of claim 2, wherein the preprocessing step includes the steps of: zeroing values from the difference array corresponding to pixels corresponding to high intensity varying patterns. 7. The method of claim 1 , further comprising the step of: determining whether the intensity of an entry in the difference array exceeds a predetermined large difference threshold value. 8. The method of claim 1 , further comprising the step of: determining whether the change in lighting for the current block exceeds a predetermined large difference threshold. 9. The method of claim 1 , further comprising the step of: transmitting the encoded block. 10. The method of claim 1 , further comprising the step of: refraining from encoding the current block when the shift in the center of gravity falls below a predetermined threshold for the shift of gravity. 11. An apparatus that distinguishes a static component in a current frame of video data, comprising: a portion configured to determine a difference between a current block of the current frame and a best-matched block in a previous frame to yield a difference array; a portion configured to determine, in accordance with the difference array, a shift of center of gravity between the current block and the best-matched block; and a portion configured to encode the current block when the shift in the center of gravity exceeds a predetermined threshold for the shift of gravity. 12. The apparatus of claim 11 , further comprising: a portion configured to preprocess the difference array to reduce the effects of noise prior to the step of determining the shift in the center of gravity. 13. The apparatus of claim 12, wherein the preprocessing portion includes: a portion configured to zero values from the difference array corresponding to pixels with outstanding values among their neighbor pixels. 14. The apparatus of claim 13, wherein the preprocessing portion includes: a portion configured to compare, to a current pixel in the difference array, pixels in the difference array that are one up, one down, one left and one right from the current pixel in the difference array. 15. The apparatus of claim 13, wherein the preprocessing portion includes: a portion configured to compare, to a current pixel in the difference array, difference values for pixels in the previous block that are one up, one down, one left and one right from a current pixel in the previous block. 16. The apparatus of claim 12, wherein the preprocessing portion includes: a portion configured to zero values from the difference array corresponding to pixels corresponding to high intensity varying patterns. 17. The apparatus of claim 11 , further comprising: a portion configured to determine whether the intensity of an entry in the difference array exceeds a predetermined large difference threshold value. 18. The apparatus of claim 11 , further comprising: a portion configured to determine whether the change in lighting for the current block exceeds a predetermined large difference threshold. 19. The apparatus of claim 11 , further comprising: a portion configured to transmit the encoded block. 20. The apparatus of claim 11 , further comprising: a portion configured to refrain from encoding the current block when the shift in the center of gravity falls below a predetermined threshold for the shift of gravity. 21. An apparatus that distinguishes a static component in a current frame of video data, comprising: means for determining a difference between a current block of the current frame and a best-matched block in a previous frame to yield a difference array; means for determining, in accordance with the difference array, a shift of center of gravity between the current block and the best-matched block; and means for encoding the current block when the shift in the center of gravity exceeds a predetermined threshold for the shift of gravity. 22. A computer program product comprising: a computer usable medium having computer readable code embodied therein for generating a motion vector for a search block of video data, the computer program product including: computer readable program code devices configured to cause a computer to effect determining a difference between a current block of the current frame and a best-matched block in a previous frame to yield a difference array; computer readable program code devices configured to cause a computer to effect determining, in accordance with the difference array, a shift of center of gravity between the current block and the best-matched block; and computer readable program code devices configured to cause a computer to effect encoding the current block when the shift in the center of gravity exceeds a predetermined threshold for the shift of gravity.

Inventors: FUNG PATRICK, YU SHAUN, FUNG, PATRICK, YU, SHAUN
Applicants: INNOMEDIA PTE LTD, INNOMEDIA PTE LTD.
Application year: 1999
Main classification: H04N7
IPC codes: H04N7