Adaptive contour coding

Abstract: A contour coding method adaptively encodes a contour image in a video frame based on the size and complexity of the contour image in order to improve the quality of a reconstructed contour image. First, the size and complexity of the contour image inputted are determined. Simultaneously, the contour image is encoded by using a first and a second contour coding methods to thereby provide first and second coded contour data, respectively. And, the first or the second coded contour data is selected as encoded contour image data based on the size and complexity of the contour image.

Description: This invention relates to a video signal coding method; and, more particularly, to a method for adaptively encoding a contour image in a video frame of a video signal based on the size and complexity of the contour image. In digital video systems such as video-telephone, teleconference and high definition television systems, a large amount of digital data is needed to define each video frame signal since the video frame signal comprises a sequence of digital data referred to as pixel values. Since, however, the available frequency bandwidth of a conventional transmission channel is limited, in order to transmit the substantial amount of digital data therethrough, it is necessary to compress or reduce the volume of data through the use of various data compression techniques, especially, in the case of such low bit-rate video signal encoders as video-telephone and teleconference systems. One of such techniques for encoding video signals for a low bit-rate encoding system is the so-called object-oriented analysis-synthesis coding technique( see , Michael Hötter, "Object-Oriented Analysis-Synthesis Coding Based on Moving Two-Dimensional Objects", Signal Processing: Image Communication, 2 , No.4, pp. 409-428 (December, 1990)). According to the object-oriented analysis-synthesis coding technique, an input video image is divided into objects and three sets of parameters for defining the motion, the contour and pixel data of each object are processed through different encoding channels. In processing a contour image of an object, contour information is important for the analysis and synthesis of the shape of the object. One of the classical coding schemes for representing the contour information is a chain coding technique. In the chain coding technique, although there is no loss in the contour information, the amount of bits required is substantially large. To overcome the latter drawback, there have been proposed several techniques to approximate a contour such as a polygonal approximation and a B-spline approximation. Compared with the polygonal approximation, it is possible to obtain a more accurate representation in case of the B-spline approximation, wherein a high-order polynomial is used to reduce the approximation error. The B-spline approximation technique, however, results in an increased overall computational complexity of the video encoder. One of the techniques introduced to ameliorate such problem of increased computational complexity is a contour coding technique employing a polygonal approximation and a discrete sine transform(DST). This technique is described in a commonly owned copending application, U.S. Patent No. 5774595, filed on August 28, 1995 and entitled "IMPROVED CONTOUR APPROXIMATION METHOD FOR REPRESENTING A CONTOUR OF AN OBJECT". However, when dealing with a complex contour image, the above technique employing the polygonal approximation and DST may yield a reconstructed image that may still have considerable discrepancies from its original contour image. It is, therefore, a primary object of embodiments of the invention to provide a method for use in an encoder which appropriately encodes a contour image in a video frame of a video signal based on the size and the complexity of the contour image to thereby improve the quality of a reconstructed contour image in the video frame. In accordance with one aspect of the present invention, there is provided a method for adaptively encoding a contour image of an object included in a video frame of a video signal wherein the video frame is divided into a multiplicity of blocks, each of the blocks having K x L pixels with K and L being positive integers, respectively, and the contour image consists of a plurality of contour pixels, the contour pixels representing pixels located on the contour, said method comprising the steps of: (a1) coding (200, 300) the contour image by using a first and a second contour coding methods to thereby provide first and second coded contour data, respectively, the first coded contour data being capable of representing the contour image more precisely than the second coded contour data; (b1) detecting (110) the number of contour blocks, each of the contour blocks including one or more contour pixels therein; (c1) comparing (120) the number of contour blocks with a first predetermined threshold value; (d1) calculating (130) curvatures of the contour at selected contour pixels to thereby determine a mean curvature based on the calculated curvatures wherein a curvature of the contour(30) at a selected contour pixel(T2)denotes an angle change between two lines that pass therethrough, the two lines being drawn through said selected contour pixel (T2) and two contour pixels (T1, T3) located a predetermined number of contour pixels away. from said selected contour pixel (T1) on both sides of the contour; (e1) comparing (140) the mean curvature with a second predetermined threshold value; and (f1) selecting (150, 400) the first coded contour data if the number of contour blocks is smaller than the first predetermined threshold value and the mean curvature is greater than or equal to the second predetemined threshold value and selecting the second coded contour data if the number of contour blocks is larger than or equal to the first predetermined threshold value or the mean curvature is smaller than the second predetermined threshold value, to thereby provide the selected coded contour data as encoded contour image data, wherein the first contour coding method is a chain coding method and the second contour coding method includes a polygonal approximation and a discrete sine transform. In accordance with a second aspect of the present invention there is provided a method for adaptively encoding a contour image of an object included in a video frame of a video signal wherein the video frame is divided into a multiplicity of blocks, each of the blocks having K x L pixels with K and L being positive integers, respectively, and the contour image consists of a plurality of contour pixels, the contour pixels representing pixels located on a contour, said method comprising the steps of: (a2) detecting (110) the number of contour blocks, each of the contour blocks including one or more contour pixels therein; (b2) calculating (130) curvatures of the contour at selectedt contour pixels to thereby determine a mean curvature based on the calculated curvatures wherein a curvature of the contour(30) at a selected contour pixel(T2)denotes an angle change between two lines that pass therethrough, the two lines being drawn through said selected contour pixel (T2) and two contour pixels (T1, T3) located a predetermined number of contour pixels away from said selected contour pixel (T1) on both sides of the contour; (c2) comparing (120, 140) the number of contour blocks and the mean curvature with a first and a second predetermined threshold values, respectively; (d2) coding (200) the contour image by using a first contour coding method if the number of contour blocks is smaller than the first predetermined threshold value and the mean curvature is greater than or equal to the second predetermined threshold value; and (e2) coding (300) the contour image by using a second contour: coding method if the number of contour blocks is larger than or equal to the first predetermined threshold value or the mean curvature is smaller than the second predetermined threshold value, wherein the first contour coding method is a chain coding method and the second contour coding method includes a polygonal approximation and a discrete sine transform The above and other objects and features of the present invention will become apparent from the following description of preferred embodiments given in conjunction with the accompanying drawings, in which: Fig. 1 represents a block diagram of a contour coding apparatus embodying the present invention; Fig. 2 provides an illustrative diagram for defining contour blocks; and Fig. 3 offers an explanatory diagram describing a curvature calculation process. Referring to Fig. 1, there is shown a block diagram of a contour coding apparatus 10 for adaptively encoding a contour image of an object in a video frame of a video signal embodying the present invention. Contour image data of an object included in the video frame is inputted to a size detection unit 110, a complexity detection unit 130, a first contour coding unit 200, and a second contour coding unit 300 in parallel, wherein the contour image data represents position information of contour pixels, the contour pixels representing pixels located on the contour. At the size detection unit 110, the video frame is first divided into a plurality of blocks of K x L pixels with K and L being positive integers, respectively, and the number of contour blocks is determined for the contour, each contour block denoting a block containing therein at least one contour pixel. That is, as shown in Fig. 2, each block located in a shaded region 20 is overlapping with a portion of a contour 30 in the video frame 40 and these blocks are referred to as contour blocks. Then, the number of contour blocks is inputted to a first comparison unit 120, wherein the number is compared with a first predetermined threshold value TH1. An output from the first comparison unit 120 is a logic high signal if the number is greater than or equal to the first threshold value TH1, i.e., if the size of the contour image is considered as being large; and a logic low signal, if otherwise. In the meanwhile, the complexity detection unit 130 calculates curvatures at selected contour pixels and determines a mean curvature for the contour. Referring to Fig. 3, there is shown an explanatory diagram depicting a curvature calculation process carried out at the complexity detection unit 130. First, one contour pixel, e.g., T2, is selected as a target pixel and its two Nth, e.g., 6th, neighboring contour pixels, e.g., T1 and T3, on both sides of the contour 30 are determined. Then, two lines are drawn through the target pixel T2 and its two Nth neighboring contour pixels T1 and T3. An angle change between the two lines that pass through the target pixel T2 is defined as the curvature of the contour at the target pixel T2. In the preferred embodiment of the invention, all the contour pixels are selected as the target pixels. However, in order to reduce the calculation burden, every Pth contour pixels may be selected as the target pixels, P being an integer larger than 1. Thereafter, curvatures of the contour at the remaining target pixels are calculated in the same manner as described above. As the curvatures of the contour at all the target pixels are determined, the mean curvature of the contour may be calculated as follows: wherein C M denotes the mean curvature; M is the number of target pixels; and  i represents a curvature at each of the target pixels. Referring back to Fig. 1, at a second comparison unit 140, the mean curvature C M determined at the complexity detection unit 130 is compared with a second predetermined threshold value TH2. The second comparison unit 140 provides a control unit 150 with a logic low signal if the mean curvature C M is greater than or equal to the second threshold value TH2, i.e., if the contour image is determined as being rather complex; and a logic high signal, if otherwise. At the control unit 150, the signals from the two comparison units 120 and 140 are logically combined, and a logic low control signal is generated to a switching unit 400 if both of the signals from the comparison units 120 and 140 are logic low, i.e., if the contour is regarded small and complex. Otherwise, i.e., if the contour image is large or simple, a logic high control signal is generated to the switching unit 400. Meantime, the contour image data is encoded at the first and second contour coding units 200 and 300. Specifically, at the first contour coding unit 200, the contour image data is encoded, e.g., by using a conventional chain coding method and fed to the switching unit 400 as first encoded data, wherein the direction vectors between successive contour pixels are encoded. As an example, a commonly used chain coding scheme employs eight direction vectors, which can be coded by 3-bit code words. In the chain coding, typically, the start contour pixel address information is followed by a string of code words. On the other hand, at the second contour coding unit 300, the contour image data is encoded, e.g., by using the method employing the polygonal approximation and the DST and resultant encoded data is provided to the switching unit 400 as second encoded data, wherein the contour image data is first approximated by the polygonal approximation; errors between the original contour image and the approximated contour image are calculated by using DST; the result of the polygonal approximation is encoded by using, e.g., a fixed length code without compression; and the result of the DST is then encoded by using, e.g., a binary arithmetic code of JPEG(Joint Picture Experts Group). Details of the polygonal approximation and the DST techniques are disclosed in the afore-mentioned U.S. Patent No. 5 774 595. In response to the control signal provided from the control unit 150, the switching unit 400 selects, as encoded contour image data, either the first or the second encoded data. That is, if the logic low control signal is applied thereto, the first encoded data is transmitted to a transmitter(not shown) for the transmission thereof, and the second encoded data is transmitted if the control signal is logic high. As a result, the smaller and more complex contour images in the video frame are selected to be encoded at the first contour coding unit 200 by the chain coding method, while the larger or the simpler contour images in the video frame are chosen to be encoded at the second contour coding unit 300 by the contour coding method employing the polygonal approximation and DST.

Claims: A method for adaptively encoding a contour image of an object included in a video frame of a video signal wherein the video frame is divided into a multiplicity of blocks, each of the blocks having K x L pixels with K and L being positive integers, respectively, and the contour image consists of a plurality of contour pixels, the contour pixels representing pixels located on the contour, said method comprising the steps of: (a1) coding (200, 300) the contour image by using a first and a second contour coding methods to thereby provide first and second coded contour data, respectively, the first coded contour data being capable of representing the contour image more precisely than the second coded contour data; (b1) detecting (110) the number of contour blocks, each of the contour blocks including one or more contour pixels therein; (c1) comparing (120) the number of contour-blocks with a first predetermined threshold value; (d1) calculating (130) curvatures of the contour at selected contour pixels to thereby determine a mean curvature based on the calculated curvatures wherein a curvature of the contour (30) at a selected contourpixel(T2)denotes an angle change between two lines that pass therethrough, the two lines being drawn through said selected contour pixel (T2) and two contour pixels (T1, T3) located a predetermined number of contour pixels away from said selected contour pixel (T1) on both sides of the contour; (e1) comparing (140) the mean curvature with a second predetermined threshold value; and (f1) selecting (150, 400) the first coded contour data if the number of contour blocks is smaller than the first predetermined threshold value and the mean curvature is greater than or equal to the second predetermined threshold value and selecting the second coded contour data if the number of contour blocks is larger than or equal to the first predetermined threshold value or the mean curvature is smaller than the second predetermined threshold value, to thereby provide the selected coded contour data as encoded contour image data, wherein the first contour coding method is a chain coding method and the second contour coding method includes a polygonal approximation and a discrete sine transform. The method according to claim 1, wherein said mean curvature is defined as: wherein C M denotes the mean curvature; M is the number of selected contour pixels; and  i represents a curvature at each of the selected contour pixels. A method for adaptively encoding a contour image of an object included in a video frame of a video signal wherein the video frame is divided into a multiplicity of blocks, each of the blocks having K x L pixels with K and L being positive integers, respectively, and the contour image consists of a plurality of contour pixels, the contour pixels representing pixels located on a contour, said method comprising the steps of: (a2) detecting (110) the number of contour blocks, each of the contour blocks including one or more contour pixels therein; (b2) calculating (130) curvatures of the contour at selected contour pixels to thereby determine a mean curvature based on the calculated curvatures wherein a curvature of the contour (30) at a selected contour pixel denotes an angle change between two lines that pass therethrough, the two lines being drawn through said selected contour pixel (T2) and two contour pixels (T1; T3) located a predetermined number of contour pixels away from said selected contour pixel (T1) on both sides of the contour; (c2) comparing (120, 140) the number of contour blocks and the mean curvature with a first and a second predetermined threshold values, respectively; (d2) coding (200) the contour image by using a first contour coding method if the number of contour blocks is smaller than the first predetermined threshold value and the mean curvature is greater than or equal to the second predetermined threshold value; and (e2) coding (300) the contour image by using a second contour coding method if the number of contour blocks is larger than or equal to the first predetermined threshold value or the mean curvature is smaller than the second predetermined threshold value, wherein the first contour coding method is a chain coding method and the second contour coding method includes a polygonal approximation and a discrete sine transform. The method according to claim 3, wherein said mean curvature is defined as: wherein C M denotes the mean curvature; M is the number of selected contour pixels; and  i represents a curvature at each of the selected contour pixels.

Inventors: KIM JIN-HUN, KIM, JIN-HUN, Kim, Jin-Hun, Video Research Center
Applicants: DAEWOO ELECTRONICS CO LTD, DAEWOO ELECTRONICS CO., LTD
Application year: 1996
Main classification: G06T9
IPC codes: H03M7, H04N7, G06T9