Plaque It!
|
| 5692117 | Method and apparatus for producing animated drawings and in-between drawings | November, 1997 | Berend et al. | 345/475 |
| 5757668 | Device, method and digital video encoder of complexity scalable block-matching motion estimation utilizing adaptive threshold termination | May, 1998 | Zhu | 375/240.16 |
| 5818463 | Data compression for animated three dimensional objects | October, 1998 | Tao et al. | 345/473 |
| 5933549 | Method and apparatus for image editing using key frame image control data | August, 1999 | Ide et al. | 382/309 |
| 6075901 | Method and system for predictive encoding of arrays of data | June, 2000 | Signes et al. | |
| 6151033 | Method and apparatus for producing animation data | November, 2000 | Mihara et al. | 345/475 |
| 6559848 | Coding and decoding three-dimensional data | May, 2003 | O'Rourke | 345/473 |
| 6704890 | Skew compensating interface for operation with arbitrary data | March, 2004 | Carotti et al. | |
| 6798835 | Apparatus and method of switching moving-picture bitstream | September, 2004 | Sugiyama | |
| 6891565 | Bitstream testing method and apparatus employing embedded reference data | May, 2005 | Dieterich |
| JP410215458 | August, 1998 | |||
| WO/2001/041156 | June, 2001 | OPTIMIZED BIFS ENCODER |
1. Field of the Invention
The present invention relates to a method and an apparatus for encoding and decoding three-dimensional animation data, and more particularly, to a method and an apparatus for encoding and decoding an orientation interpolator representing information on the rotation of an object in animation.
2. Description of the Related Art
MPEG-4 BIFS, which is one of the international multimedia standards, supports a keyframe-based animation using an interpolator node having keys and key values of an animation.
In order to represent animation as naturally and smoothly as possible using such a keyframe-based animation technique, a considerable number of keys and a considerable amount of key value data are required, and field data between key frames are filled in by interpolation. Interpolation in a virtual reality modeling language (VRML) involves linear or spherical interpolation.
Keys and key values approximate an original animation curve on a temporal axis. FIG. 1 is a diagram illustrating two-dimensional trajectories of animation data, represented by an orientation interpolator node, in accordance with the passage of time on the surface of a three-dimensional sphere. As shown in FIG. 1, the conventional MPEG-4 BIFS supports spherical linear interpolation between keyframes, and an animation path looks similar to a set of segments representing the variation of the animation data.
In an orientation interpolator node provided by BIFS, key data indicate a predetermined moment of time on a temporal axis where an animation is located using discontinuous numbers between −∞ and ∞. Key value data represent information on the rotation of an object in a synthetic image at a predetermined moment of time indicated by key data. Information on the rotation of the object at another predetermined moment of time, which is not represented by key data, is obtained using key data corresponding to two moments of time, which are most adjacent to the predetermined moment of time, by spherical linear interpolation.
In spherical linear interpolation, rotation information is represented by a rotation axis and a rotation angle. MPEG-4 BIFS, like virtual reality modeling language (VRML), supports rotation information represented by a rotation axis and a rotation angle using an orientation interpolator node. When generating a smooth animation using key value data in spherical linear interpolation, differential values of key value data between keyframes are highly correlated with each other, which causes redundancy among data. Accordingly, it is effective to use a method for encoding key value data using differential values of data.
MPEG-4 BIFS provides two different methods for encoding field data represented by keys and key value data of an orientation interpolator node. One is a method for encoding field data using pulse code modulation (PCM) and the other is a method for encoding field data using differential pulse code modulation (DPCM) and entropy encoding.
In the method for encoding field data using PCM, only a quantization process is performed on key data and key value data to be encoded. Since the characteristics of data to be encoded are not considered in this method, this method is considered ineffective. In the method for encoding field data using PCM, field data of an orientation interpolator node are input, and key value data of the field data are converted into values in a quaternion space. Next, keys and key value data are quantized. Quantized field data are output in the form of binary data. In order to measure the degree to which the results of quaternion transformation are visually distorted as compared with original field data, the binary data are restored into key value data consisting of a rotation axis and a rotation angle. Restored field data of an orientation interpolator node are stored and then are output on a screen. It is possible to measure the degree of visual distortion of images caused by a quaternion error using the restored data. Distortion of images can be calculated with Equation (1) below.
In Equation (1), N represents the number of field data, and ε i represents a differential value between encoded key value data Q i and key value data {circumflex over (Q)} i restored in a quaternion space.
On the other hand, in the method for encoding field data using DPCM and entropy encoding, a correlation between successive data is considered, and thus this method is considered more effective than the method for encoding field data using PCM in terms of encoding efficiency. In this method, a differential value between previously restored key value data and key value data to be encoded is calculated before a quantization process, and then the differential value is quantized, thus enhancing the encoding efficiency by taking advantage of the characteristics of data shown in the differential value.
FIGS. 2A and 2B are block diagrams of a MPEG-4 PMFC encoder using linear DPCM and entropy encoding, and a MPEG-4 PMFC decoder using inverse linear DPCM and entropy decoding, respectively. A linear DPCM operator shown in FIG. 2A calculates differential data {dot over (Q)} i between current key value data and previously restored key value data following Equation (2).
{dot over (Q)} i =Q i {circumflex over (Q)} i−1 =( q i,0 −{circumflex over (q)} i−1,0 ,q i,1 −{circumflex over (q)} i−1,1 ,q i,2 −{circumflex over (q)} i−2,2 ,q i,3 −{circumflex over (q)} i−1,3 ) (2)
In Equation (2), Q i represents original key value data at a predetermined moment of time (t), which are represented by a quaternion, and {circumflex over (Q)} i−1 represents key value data at a predetermined moment of time (t−1), which are restored from an error compensation circuit.
However, the encoding method performed in the apparatus for encoding key value data shown in FIG. 2A does not have a high encoding efficiency. It is possible to easily figure out what the disadvantages of the encoding method are by analyzing key value data, which determine the rotation of an object in a quaternion space. Key value data are represented by a quaternion in the following equation.
For example, when components of one quaternion have the same absolute values as their corresponding components of another quaternion but different signs in a quaternion space, as shown in Equation (3), the two quaternions are considered the same. In other words, the two quaternions provide the same effects in terms of the rotational transformation of an object in a 3D space, which means the factors that affect the rotational transformation of an object are a direction of a rotation axis and a rotation angle, rather than the vector of the rotation axis. However, like in MPEG-4 BIFS, if key value data are represented by a quaternion using Equation (3) and a differential value is linearly calculated by calculating differences in vectors between successive key value data, the differential value is not 0, which means that linear differential values do not reflect redundancy in rotational transformation well. Accordingly, it is impossible to precisely measure the quality of images using the method for measuring the distortion degree of images shown in Equation (1).
To solve the above as well as other problems, it is an aspect of the present invention to provide a method and an apparatus for encoding and decoding an orientation interpolator, which encodes and decodes an extracted orientation interpolator constituted by break points extracted from an original orientation interpolator so as to prevent an error between the extracted orientation interpolator and the original orientation interpolator from being greater than an allowable error limit and thus can provide high-quality animation with a high compression rate.
It is another aspect of the present invention to provide a method and an apparatus for encoding and decoding an orientation interpolator, which can provide high-quality animation with a high compression rate by calculating a rotational differential value, which can sufficiently reflect redundancy in rotational transformation, and encoding key value data of an orientation interpolator using the rotational differential value.
It is another aspect of the present invention to provide a bitstream encoded and decoded by a method and an apparatus for encoding and decoding an orientation interpolator according to the present invention, which can provide high-quality animation with a high compression rate.
Accordingly, to achieve the above as well as other aspects of the present invention, there is provided an apparatus for encoding an orientation interpolator, which includes key data indicating the locations of keyframes on a temporal axis and key value data indicating the rotation of an object. The apparatus includes an break point extractor which extracts, from a first animation path constituted by an orientation interpolator input thereinto, a minimum number of break points, which can bring about an error of no greater than a predetermined error limit between the first animation path and a second animation to be generated by the extracted break points, a key data encoder which encodes key data input from the break point extractor, and a key value data encoder which encodes key value data input from the break point extractor.
Preferably, the apparatus further includes a resampler which samples the first animation path into a predetermined number of sections having an interval of a predetermined amount of time and outputs an orientation interpolator including resampled key data and resampled key value data, and a selector which outputs an orientation interpolator input thereinto to the resampler or the break point extractor in response to an external input signal.
To achieve the above as well as other aspects of the present invention, there is provided an apparatus for encoding an orientation interpolator, which includes key data indicating the locations of keyframes on a temporal axis and key value data indicating the rotation of an object. The apparatus includes a resampler which samples an animation path constituted by an input orientation interpolator into a predetermined number of sections having an interval of a predetermined amount of time and outputs an orientation interpolator including resampled key data and resampled key value data, a key data encoder which encodes key data input from the resampler, and a key value data encoder which generates a rotational differential value used to rotate an object by as much as a difference between rotational transformation applied to the object by key value data of a current keyframe and rotational transformation applied to the object by key value data of a previous keyframe and thus encodes key value data input from the resampler.
Preferably, the break point extractor includes a linear interpolator which extracts a beginning path point and an ending path point of an input animation path, selects path points between the beginning and ending path points, and interpolates other path points, which still have not yet been selected, using the selected path points, an error calculator which calculates an error between the input animation path and an interpolated animation path generated by the linear interpolator using interpolation, and a determining unit which extracts break points, by which an error between the input animation path and the interpolated animation path can be minimized, and outputs the selected break points if the corresponding error is not greater than a predetermined error limit.
Preferably, the key value encoder includes a rotational differential data generator which generates, using a rotational transformation value of a current keyframe and a restored rotational transformation value of a previous keyframe, a rotational differential value used to rotate the object by as much as a difference between rotational transformation applied to the object in the current keyframe by key value data and rotational transformation applied to the object in the previous keyframe by key value data, and outputs rotational differential data by quantizing the rotational differential value, and an entropy encoder which entropy-encodes the rotational differential data.
Preferably, the rotational differential data generator includes a first quaternion multiplier which generates the rotational differential value using the rotational transformation value of the current keyframe and the restored rotational transformation value of the previous keyframe, a quantizer which generates rotational differential data by quantizing the rotational differential value, an inverse quantizer which generates a restored rotational differential value by inverse-quantizing the rotational differential data, and a second quaternion multiplier which generates a restored rotational transformation value of the current keyframe by quaternion-multiplying the restored rotational differential value by a rotational transformation value of the previous keyframe.
Preferably, the key data encoder includes a first quantizer which quantizes key data of a orientation interpolator using predetermined quantization bits, a first DPCM processor which generates differential data of the quantized key data, a DND processor which performs a DND operation on the differential data depending on a relationship between the differential data and a maximum value and a minimum value among them, and a first entropy encoder which entropy-encodes the differential data input from the DND processor.
To achieve the above as well as other aspects of the present invention, there is provided an apparatus for decoding a bitstream, into which an orientation interpolator, including key data indicating the locations of keyframes on a temporal axis and key value data indicating the rotation of an object, is encoded. The apparatus includes a key data decoder which decodes key data from an input bitstream, a key value data decoder which decodes key value data from the input bitstream, and an orientation interpolator synthesizer which generates an orientation interpolator by synthesizing decoded key value data and key value data spherically linearly interpolated using the decoded key value data.
Preferably, the key value data decoder includes an entropy decoder which generates circular-DPCMed rotational differential data or quantized rotational differential data by entropy-decoding key value data from the bitstream, an inverse circular DPCM operator which generates quantized rotational differential data by performing an inverse circular DPCM operation on rotational differential data input from the entropy-decoder following the order of DPCM operation decoded from the bitstream, an inverse quantizer which rotates the object by as much as a difference between rotational transformations applied to the object by quaternion key value data of each of the keyframes by inverse-quantizing the quantized rotational differential data, and a quaternion multiplier which generates a rotational transformation value of a current keyframe by quaternion-multiplying a rotational differential value of the current keyframe by a restored rotational transformation value of a previous keyframe.
To achieve the above as well as other aspects of the present invention, there is provided a method for encoding an orientation interpolator including key data indicating the locations of keyframes on a temporal axis and key value data indicating the rotation of an object. The method includes (b) generating key data and key value data to be encoded by extracting, from a first animation path constituted by the orientation interpolator, a minimum number of break points, which can bring about an error of no greater than a predetermined error limit between the first animation path and a second animation to be generated by the extracted break points, (d) encoding the key data generated in step (b), and (e) encoding the key value data generated in step (b).
Preferably, step (b) includes (b 1 ) selecting a beginning path point and an ending path point of the first animation path, (b 2 ) selecting path points between the beginning and ending path points one by one and interpolating other path points, which still have not yet been selected, using the selected path points, (b 3 ) calculating an error between the first animation path and a second animation path generated by interpolation in step (b 2 ), and (b 4 ) selecting break points, by which an error between the first animation path and the second animation path can be minimized, checking if the corresponding error is not greater than a predetermined error limit, and determining key data and key value data to be encoded.
Preferably, the method for encoding an orientation interpolator may further include (a) generating an orientation interpolator including resampled key data and resampled key value data by sampling the first animation path into a predetermined number of sections having an interval of a predetermined amount of time, before step (b) or may further include (c) generating key data and key value data to be encoded by sampling the second animation path constituted using the extracted break points into a predetermined number of sections having an interval of a predetermined number of time, after step (b).
To achieve the above as well as other aspects of the present invention, there is provided a method for encoding an orientation interpolator including key data indicating the locations of keyframes on a temporal axis and key value data indicating the rotation of an object. The method includes (a) sampling an animation path constituted by the orientation interpolator into a predetermined number of sections having an interval of a predetermined amount of time and thus generating an orientation interpolator including resampled key data and resampled key value data, (d) reducing the range of the key data sampled in step (a) and encoding the key data, and (e) encoding the key value data sampled in step (a) by generating and encoding a rotational differential value used to rotate the object by as much as a difference between rotational transformation applied to the object by key value data of a current keyframe and rotational transformation applied to the object by key value data of a previous keyframe.
Preferably, step (d) includes quantizing the key data with a predetermined number of quantization bits, generating differential data by performing a predetermined DPCM operation on quantized data, and entropy-encoding the differential data.
Preferably, step (e) includes (e 1 ) generating a rotational differential value used to rotate the object by as much as a difference between rotational transformations applied to the object by key value data of the current and previous keyframes using a rotational transformation value of the current keyframe and a restored rotational transformation value of the previous keyframe and generating rotational differential data by quantizing the rotational differential value, (e 2 ) selectively performing a linear DPCM operation or a circular DPCM operation on the rotational differential data, and (e 3 ) entropy-encoding the rotational differential data
Preferably, step (e 1 ) includes (e 11 ) generating the rotational differential value using a rotational transformation value of the current keyframe and a restored rotational transformation value of the previous keyframe, (e 12 ) generating rotational differential data by quantizing the rotational differential value, (e 13 ) generating a restored rotational differential value by inverse-quantizing the rotational differential data, and (e 14 ) generating a restored rotational transformation value of the current keyframe by quaternion-multiplying the restored rotational differential value by a restored rotational transformation value of the previous keyframe.
To achieve the above as well as other aspects of the present invention, there is provided a method for decoding a bitstream, into which an orientation interpolator, including key data indicating the locations of keyframes on a temporal axis and key value data indicating the rotation of an object, is encoded. The method includes (a) decoding key data from an input bitstream, (b) decoding key value data from the input bitstream, and (c) generating an orientation interpolator by synthesizing decoded key value data and key value data spherically linearly interpolated using the decoded key value data.
Preferably, in step (c), if there is no decoded key value data corresponding to key data currently being subjected to orientation interpolator synthesization, key value data corresponding to the key data currently being subjected to orientation interpolator synthesization are interpolated using decoded key value data corresponding to previously synthesized key data and decoded key value data corresponding to key data to be synthesized next.
Preferably, step (a) includes generating differential data by entropy-decoding the input bitstream, generating quantized key data by performing a predetermined DPCM operation and an inverse DND operation on the differential data, and generating restored key data by inverse-quantizing the quantized key value data.
Preferably, step (b) includes (b 1 ) generating circular-DPCMed rotational differential data or quantized rotational differential data by entropy-decoding key value data from the bitstream, (b 2 ) generating rotational differential data by performing an inverse circular DPCM operation on entropy-decoded rotational differential data following the order of DPCM operation decoded from the bitstream, (b 3 ) generating a rotational differential value used to rotate the object by as much as a difference between rotational transformations applied to the object by quaternion key value data of each of the keyframes by inverse-quantizing the rotational differential data, and (b 4 ) generating a rotational transformation value of a current keyframe by quaternion-multiplying a rotational differential value of the current keyframe by a decoded rotational transformation value of a previous keyframe.
To achieve the above as well as other aspects of the present invention, there is provided a bitstream, into which an orientation interpolator, including key data indicating the locations of keyframes on a temporal axis and key value data indicating the rotation of an object, is encoded. The bitstream includes key data encoding/decoding information, into which key data and information necessary to decode the key data are encoded, and key value data encoding/decoding information, into which key value data and information necessary to decode the key value data are encoded. Here, the key data encoding/decoding information includes inverse DND operation information including the order of inverse DND indicating a predetermined number of cycles of inverse DND to be performed on differential data generated by entropy-decoding the bitstream in order to extend the range of the differential data and maximum and minimum values among differential data used in each cycle of inverse DND operation, first inverse DPCM operation information including the order of inverse DPCM operation to be performed on the inverse-DNDed differential data so as to transform the inverse-DNDed differential data into quantized key data and intra key data which are used for each cycle of inverse DPCM operation, and first inverse quantization information used in inverse quantization to generate restored key data by inverse-quantizing the quantized key data. The key value data encoding/decoding information includes rotational differential data entropy-encoded by quantizing a rotational differential value used to rotate the object by as much as a difference between rotational transformations applied to the object by quaternion key value data of each of the keyframes, entropy-decoding information including an entropy decoding mode indicating an entropy decoding method to be performed on the rotational differential data, inverse circular DPCM operation information including the order of inverse circular DPCM operation, which indicates whether or not an inverse circular DPCM operation will be performed on entropy-decoded rotational differential data following the entropy decoding mode, and second inverse quantization information including a predetermined number of inverse quantization bits used to restore original key value data by inverse-quantizing the quantized key value data.
Preferably, the key data encoding/decoding information further includes linear key decoding information used for decoding a linear key region included in the bitstream, and the linear key decoding information includes a flag indicating whether or not there exists the linear key region where key data linearly increase among the key data, the number of key data included in the linear key region, and beginning and ending key data of the linear key region.
The above objects and advantages of the present invention will become more apparent by describing in detail preferred embodiments thereof with reference to the attached drawings in which:
FIG. 1 is a diagram illustrating two-dimensional trajectories of animation data, represented by an orientation interpolator node, in accordance with the passage of time on the surface of a three-dimensional sphere;
FIGS. 2A and 2B are block diagrams of a MPEG-4 PMFC encoder using linear DPCM and entropy encoding and a MPEG-4 PMFC decoder using linear inverse DPCM and entropy decoding, respectively;
FIG. 3A is a block diagram of an apparatus for encoding an orientation interpolator according to a preferred embodiment of the present invention, and FIG. 3B is a flowchart of a method for encoding an orientation interpolator according to a preferred embodiment of the present invention;
FIGS. 4A through 4C are block diagrams of examples of an analyzer according to preferred embodiments of the present invention;
FIG. 5A is a flowchart of a step S 320 shown in FIG. 3B;
FIG. 5B is a flowchart of a resampling method according to a preferred embodiment of the present invention;
FIG. 5C is a flowchart of a method of extracting break points according to a preferred embodiment of the present invention;
FIG. 6A is a diagram illustrating original key data and resampled key data, and FIG. 6B is a diagram illustrating an original animation path and a resampled animation path;
FIGS. 7A through 7F are diagrams illustrating an example of a method of extracting break points according to a preferred embodiment of the present invention;
FIG. 8 is a diagram illustrating key data and key value data output from an break point extractor in an break point generation mode;
FIG. 9A is a block diagram of a key data encoder according to a preferred embodiment of the present invention;
FIG. 9B is a block diagram of a DND processor shown in FIG. 9A;
FIGS. 10A through 10G are flowcharts of a method of encoding key data according to a preferred embodiment of the present invention;
FIG. 11 is a diagram illustrating an example of a function encodeSignedAAC;
FIGS. 12A through 12J are diagrams illustrating key data obtained after performing different steps of encoding key data according to a preferred embodiment of the present invention;
FIG. 13A is a block diagram of a key value data encoder according to a first embodiment of the present invention, and FIG. 13B is a flowchart of a method of encoding key value data according to a first embodiment of the present invention;
FIG. 14A is a diagram illustrating a typical example of a probability distribution function (PDF) in each component of a rotational differential value;
FIG. 14B is an arc-tangent curve for nonlinear quantization;
FIG. 15A is an example of rotational differential data output from a quantizer included in a key value data encoder according to a preferred embodiment of the present invention, FIG. 15B is a diagram illustrating the results of performing a linear DPCM operation on the differential data shown in FIG. 15A, and FIG. 15C is a diagram illustrating the results of performing a circular DPCM operation on the linear-DPCMed differential data shown in FIG. 15B;
FIG. 16 is a diagram illustrating an example of a function UnaryAAC( ) used for entropy encoding;
FIG. 17 is a diagram illustrating a rotation direction error occurring during encoding quaternion rotational transformation values using a rotational differential value;
FIG. 18A is a block diagram of a rotational DPCM operator of a key value data encoder according to a second embodiment of the present invention, and FIG. 18B is a block diagram of a rotation direction error calculator shown in FIG. 18A;
FIG. 19A is a flowchart of a rotational DPCM operation according to a second embodiment of the present invention, and FIG. 19B is a flowchart illustrating the operations of a rotation direction error calculator, a rotation direction error detector, and a rotation direction corrector shown in FIG. 9A;
FIG. 20A is a block diagram of a quantizer of a key value data encoder to a third embodiment of the present invention, and FIG. 20B is a flowchart of the operation of a quantizer according to a third embodiment of the present invention;
FIG. 21A is a block diagram of an apparatus for decoding an orientation interpolator according to a preferred embodiment of the present invention, and FIG. 21B is a flowchart of a method for decoding an orientation interpolator according to a preferred embodiment of the present invention.
FIG. 22 is a block diagram of a key data decoder according to a preferred embodiment of the present invention;
FIGS. 23A and 23B are flowcharts of a method of decoding key data according to a preferred embodiment of the present invention;
FIG. 24A is a block diagram of a key value data decoder according to a preferred embodiment of the present invention, and FIG. 24B is a flowchart of a method of encoding key value data according to a preferred embodiment of the present invention;
FIG. 25 is a diagram illustrating the structure of a bitstream input into an entropy decoder of a key value data decoder according to a preferred embodiment of the present invention;
FIG. 26 is a flowchart of a method of synthesizing key data and key value data of an orientation interpolator according to a preferred embodiment of the present invention;
FIG. 27 is a diagram illustrating an example of a method of calculating an error between an orientation interpolator to be encoded and a decoded orientation interpolator;
FIG. 28 is a diagram for comparing the performance of a method for encoding an orientation interpolator according to the present invention with the performance of a conventional method for encoding an orientation interpolator; and
FIGS. 29A through 29J are SDL-language program codes, by which an apparatus for decoding an orientation interpolator according to a preferred embodiment of the present invention, which decodes key data and key value data, is realized.
An apparatus and a method for encoding an orientation interpolator according to a preferred embodiment of the present invention will be described more fully with reference to the accompanying drawings.
FIG. 3A is a block diagram of an apparatus for encoding an orientation interpolator according to a preferred embodiment of the present invention. Referring to FIG. 3A, the apparatus for encoding an orientation interpolator includes an analyzer 40 , a key data encoder 200 , a key value data encoder 300 , and a header encoder 400 .
FIG. 3B is a flowchart of a method for encoding an orientation interpolator according to a preferred embodiment of the present invention. Referring to FIG. 3B, an orientation interpolator to be encoded is input into the analyzer 40 in step S 300 . In step S 320 , the analyzer 40 extracts key data and key value data to be encoded from a first animation path comprised of key value data of x, y, z and theta(rotation angle) components of the orientation interpolator, outputs the extracted key data to the key data encoder 200 , and outputs the extracted key value data to the key value data encoder 300 .
The key data encoder 200 quantizes the key data input from the analyzer 40 using a predetermined number of quantization bits, generates differential data by performing a predetermined DPCM operation on the quantized key data, and entropy-encodes the differential data in step S 340 .
The key value data encoder 300 quantizes the key value data input from the analyzer 40 using a predetermined number of quantization bits, generates differential data by performing a predetermined DPCM operation on the quantized data, and encodes the differential data in step S 360 .
The header encoder 400 receives information necessary to decode the key data and key value data from the key data encoder 200 and the key value data encoder 300 and encodes the information in step S 380 .
Hereinafter, the structures and operations of the analyzer 40 , the key data encoder 200 , and the key value data encoder 300 will be described in greater detail with the accompanying drawings.
FIG. 4A is a block diagram of an example of the analyzer 40 according to a first embodiment of the present invention. Even though a process of extracting key data and key value data to be encoded using the analyzer 40 can be performed on all the components (x, y, z and theta) of key value data, this process will be described in the following paragraphs, taking only one of the components of the key value data (the orientation interpolator) into consideration for the convenience of explanation.
Referring to FIG. 4A, the analyzer according to the first embodiment of the present invention includes a resampler 43 , which samples a first animation path based on an input orientation interpolator into a predetermined number of sections having intervals of a predetermined amount of time with one another and outputs the sampled animation path to a key encoder 200 , a key value encoder 300 , and a header encoder 400 , an break point extractor 42 , which extracts a minimum number of break points by which an error between the first animation path and a second animation path generated based on break points extracted from the first animation path can be prevented from exceeding a predetermined error limit, and outputs the extracted break points to the key data encoder 200 , the key value data encoder 300 , and the header encoder 400 , and a selector 41 , which outputs the input orientation interpolator to the resampler 43 or the break point extractor 42 in response to an external input signal. The break point extractor 42 includes a linear interpolator 42 a , an error calculator 42 b , and a determining unit 42 c.
FIG. 5A is a flowchart of the operation of the analyzer 40 according to the first embodiment of the present invention. Referring to FIG. 5A, the selector 41 receives an orientation interpolator and a setting signal from the outside in step S 325 . The setting signal includes a generation method setting signal used to determine a method of generating key data and key value data to be encoded and a generation mode setting signal used to determine a mode for generating key data and key value data to be encoded.
The mode for generating key data and key value data will be described first in the following paragraphs.
The analyzer 40 reduces the amount of key data and key value data to be encoded by decreasing the number of keyframes of an orientation interpolator input thereinto. The analyzer 40 is supposed to have either an animation path-preserving mode or an animation key-preserving mode, depending on a mode setting signal input thereinto from the outside.
In an animation path-preserving mode, an orientation interpolator is only used to describe interpolation of an animation path, and random access to keyframes is not necessary. In order to effectively encode an orientation interpolator in the animation path-preserving mode, key data of an orientation interpolator existing along an animation path within a predetermined error range and key value data corresponding to the key data may be removed.
On the other hand, in an animation key-preserving mode, it is necessary to have random access to keyframes using MPEG-4 BIFS commands, such as ‘replace’, ‘delete’, or ‘insert’. In the animation key-preserving mode, the number of key data of an orientation interpolator does not change. The animation path-preserving mode and the animation key-preserving mode will be described more fully later.
Referring to FIG. 5A again, the selector 41 selects a mode for generating key data and key value data to be encoded, following a generation mode input from the outside. In step S 330 , the selector 41 outputs the input orientation interpolator to the break point extractor 42 , if the input generation mode is an animation key-preserving mode. If the input generation mode is an animation path-preserving mode, the selector 41 outputs the input orientation interpolator to the resampler 43 or the break point extractor 42 together with information necessary to generate key data and key value data in step S 330 , in response to a generation method setting signal input from the outside.
Specifically, in the case of generating key data and key value data to be encoded by resampling, the selector 41 outputs the number of key data (i.e., time intervals) and a generation mode together with the orientation interpolator to the resampler 43 . In the case of generating key data and key value data to be encoded by extracting break points, the selector 41 outputs a critical error between an original animation path and a path to be generated by the extracted break points and the generation mode to the break point extractor 42 .
The resampler 43 generates sampled key data and sampled key value data by sampling an animation path generated by the orientation interpolator input from the selector 41 at intervals of a predetermined amount of time, and the break point extractor 42 extracts a minimum number of break points, by which an error between the animation path generated by the input orientation interpolator and an animation path to be generated by the extracted break points can be prevented from exceeding a predetermined error limit, in step S 335 .
FIG. 5B is a flowchart of the operation of the resampler 43 according to a preferred embodiment of the present invention. Referring to FIG. 5B, the resampler 43 receives an orientation interpolator and the number (m) of key data to be resampled from the selector 41 in step S 502 . The number (m) of key data to be resampled may be arbitrarily set up by a user or may be set up at a predetermined value in advance.
The resampler 43 selects a first path point and a final path point of an original animation path generated by the input orientation interpolator and sets up an initial value (i) of the key data to be resampled at 1 in step S 504 .
Thereafter, the resampler 43 generates i-th key data at intervals of a predetermined amount of time in step S 506 .
FIG. 6A is a diagram illustrating original key data and resampled key data. Since the key data of the input orientation interpolator represent the locations of keyframes on a temporal axis, the key data monotonously increase, but intervals among the key data are irregular, as shown in FIG. 6A.
Therefore, as shown in FIG. 6A, the resampler 43 obtains an interval of a predetermined amount of time by dividing a difference between key data respectively representing the first path point and the final path point selected in step S 504 by the number of key data to be resampled and then resamples the key data to be resampled at intervals of the predetermined amount of time.
In step S 508 , the resampler 43 generates key value data corresponding to the key data generated by resampling by linear interpolation using the original animation path. In other words, key value data corresponding to the resampled key data are linearly interpolated using key value data corresponding to key data right after the resampled key data and key value data corresponding to key data right before the resampled key data.
Thereafter, in step S 510 , the resampler 43 verifies if the resampling process has been performed on all the key data to be resampled and repeatedly performs steps S 506 and S 508 until all the key data and their corresponding key value data are resampled.
FIG. 5C is a flowchart of a method of extracting break points according to a first embodiment of the present invention, and FIGS. 7A through 7F are diagrams illustrating each step of extracting break points from an orientation interpolator according to a preferred embodiment of the present invention.
Referring to FIGS. 4A, 5 C, and 7 A through 7 F, the linear interpolator 42 a of the break point extractor 42 receives an orientation interpolator and a critical error e th from the selector 41 in step S 520 . An animation path constituted by the input orientation interpolator is shown in FIG. 7A.
The linear interpolator 42 a extracts a first path point Q 0 and a final path point Q n of the animation path constituted by the input orientation interpolator, as shown in FIG. 7A, and sets up a counter (i) at 1 in step S 522 .
The linear interpolator 42 a arbitrarily or sequentially selects path points between the first and final path points Q 0 and Q n one by one in step S 524 . Next, the linear interpolator 42 a linearly interpolates path points, which have not been selected yet, using the selected path points and outputs the selected path points and the interpolated path points to the error calculator 42 b in step S 526 .
The error calculator 42 b calculates an error (e) between the original animation path and a candidate animation path constituted by the selected path points and the interpolated path points and outputs the error (e) to the determining unit 42 c in step S 528 . The method of calculating the error (e) will be described later.
The error calculator 42 b checks if among the path points, which have not been selected by the linear interpolator 42 a , there still exists path points, which have not been considered when calculating the error (e). If there are path points, which have not been considered when calculating the error (e), the error calculator 42 b calculates an error between the path points and the original animation path in step S 530 by repeatedly performing steps S 524 through S 528 .
FIG. 7C is a diagram illustrating steps S 524 through S 530 . Referring to FIG. 7C, the linear interpolator 42 a extracts an break point Q 1 corresponding to key data at a predetermined moment of time k 1 and generates a first candidate animation path by linearly interpolating path points between the first path point Q 0 and the break point Q 1 . The error calculator 42 b calculates an error e 1 between the original animation path and the first candidate animation path. Thereafter, in the same manner, the linear interpolator 42 a selects another break point Q k and generates a k-th candidate animation path by linearly interpolating path points between the first path point Q 0 and the break point Q k and between the break point Q k and the final path point Q n . The error calculator 42 b calculates an error (e k ) between the original animation path and the k-th candidate animation path.
If steps S 524 through S 530 have been performed on all the path points that have not been selected by the linear interpolator 42 a , errors between the original animation path and candidate animation paths each generated following steps S 524 through S 530 are output to the determining unit 42 c . Then, the determining unit 42 c selects an break point, which forms a candidate animation path having the smallest error with the original animation path, and increases the value of the counter (i) by 1 in step S 532 .
The determining unit 42 c checks if an error (e) between the original animation path and the candidate animation path constituted by the extracted break point is greater than the critical error e th and the value of the counter (i) is greater than the number (n) of key data, i.e., the number of path points between the first path point Q 0 and the final path point Q n , in step S 534 .
If the error (e) is smaller than the critical error e th , it means all the break points required for encoding have been extracted. If the number of break points finally selected as the ones to be encoded is equal to ‘n’, which means that all the path points of the process of extracting break points is completed.
However, if the number of extracted break points is smaller than n and the error (e) is greater than the critical error e th , which means there still exists break points to be extracted, the selected break points are output to the linear interpolator 42 a , and then steps S 524 through S 532 are performed again.
Hereinafter, data, which are supposed to be output from the resampler 43 and the break point extractor 42 to the key data encoder 200 and the key value data encoder 300 when the generation mode is an animation path-preserving mode, will be described in the following paragraphs.
The resampler 43 outputs sampled key data and sampled key value data to the key data encoder 200 and the key value data encoder 300 , respectively, as key data and key value data to be encoded, respectively.
Hereinafter, key data and key value data output from the break point extractor 42 depending on a generation mode will be described with reference to FIG. 8.
As shown in FIG. 8, supposing finally extracted break points are referred to as 0 , 3 , 6 , and 8 , key data and key value data corresponding to the break points 0 , 3 , 6 , and 8 are output with a key selection flag, which is shown in the following table.
| TABLE 2 | |||||||||
| Key Data of Original Path | P0 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 |
| Key Selection Flag | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
The structure of the analyzer 40 according to the first embodiment of the present invention has been described above. However, the analyzer 40 may be only constituted by the break point extractor 42 without the selector 41 and the resampler 43 or may be only constituted by the resampler 43 without the selector 41 and the break point extractor 42 , which is obvious to one skilled in the art.
Hereinafter, another example of the analyzer 40 according to a second embodiment of the present invention will be described.
Referring to FIG. 4B, the analyzer 40 according to the second embodiment of the present invention includes a resampler 45 , which receives and resamples an orientation interpolator, and an break point extractor 46 , which extracts break points of the resampled orientation interpolator and outputs key data and key value data to be encoded. The break point extractor 46 in the second embodiment of the present invention, like the one in the first embodiment of the present invention, also includes a linear interpolator 46 a , an error calculator 46 b , and a determining unit 46 c.
When an orientation interpolator is input into the analyzer 40 , the resampler 45 resamples a first animation path constituted by the orientation interpolator into a predetermined number of sections having an interval of a predetermined amount of time with one another.
The resampler 45 outputs the orientation interpolator consisting of sampled key data and sampled key value data to the linear interpolator 46 a of the break point extractor 46 .
The linear interpolator 46 a interpolates an orientation interpolator by performing steps S 522 through S 526 shown in FIG. 5C and outputs the interpolated orientation interpolator to the error calculator 46 b . The error calculator 46 b calculates an error between the first animation path and a second animation path constituted by the interpolated orientation interpolator by performing steps S 528 and S 530 . The determining unit 46 c selects a path point, which will lead to a minimum error between the first and second animation paths, verifies if the corresponding error is greater than a critical error e th and if all path points of the first animation path have been selected, and generates key data and key value data to be encoded.
As described above, in the analyzer 40 according to the second embodiment of the present invention, the operation of the resampler 45 and the break point extractor 46 is the same as the operation of the corresponding elements in the first embodiment of the present invention except that the break point extractor 46 receives an orientation interpolator consisting of the key data and key value data output from the resampler 45 and the process of extracting break points s performed on an animation path constituted by the orientation interpolator input from the resampler 45 .
Hereinafter, an example of the analyzer 40 according to a third embodiment of the present invention will be described with reference to FIG. 4C.
Referring to FIG. 4C, the analyzer 40 includes an break point extractor 48 , which receives an orientation interpolator, extracts break points from a first animation path constituted by the orientation interpolator, and outputs key data and key value data, and a resampler 49 , which resamples a second animation path constituted by an orientation interpolator consisting of the key data and key value data input from the break point extractor 48 at intervals of a predetermined amount of time. The break point extractor 48 , like the ones in the first and second embodiments of the present invention, also includes a linear interpolator 48 a , an error calculator 48 b , and a determining unit 48 c.
The break point extractor 48 , like the one in the first embodiment of the present invention, outputs the key data and key value data extracted from the first animation path to the resampler 49 .
The resampler 49 resamples an animation path constituted by an orientation interpolator consisting of the key data and key value data input from the break point extractor 48 at intervals of a predetermined amount of time and outputs the key data and key value data to be encoded. The function of the resampler 49 is the same as the ones in the first and second embodiments of the present invention, and thus its description will not be repeated here.
The key data and the key value data output from the analyzer 40 in the first through third embodiments of the present invention are output to the key data encoder 200 and the key value data encoder 300 , respectively.
Hereinafter, the structure and operation of the key data encoder 200 will be described with reference to FIGS. 9A through 12J.
FIG. 9A is a block diagram of a key data encoder according to a preferred embodiment of the present invention. Referring to FIG. 9A, a key data encoder 200 includes a linear key encoder 900 , a quantizer 910 , a DPCM processor 920 , a shifter 930 , a folding processor 940 , a DND processor 950 , and an entropy encoder 960 .
The linear key encoder 900 identifies a region where key data linearly increase in an entire key data range and encodes the region. The quantizer 910 quantizes key data input thereinto using a quantization method capable of minimizing a quantization error. The DPCM processor 920 receives quantized key data and generates differential data of key data. The shifter 930 subtracts a differential datum having the highest frequency among all differential data from the differential data. The folding processor 940 transfers all differential data to either a positive number region or a negative number region. The DND processor 950 reduces the range of differential data of key data by performing a divide operation and then selectively performing a divide-up operation or a divide-down operation. The entropy encoder 960 encodes differential data using a function SignedAAC or UnsignedAAC on each bit plane.
Hereinafter, the operation of the key data encoder 200 will be described more fully with reference to FIG. 10A. FIG. 10A is a flowchart of a method of encoding key data according to a preferred embodiment of the present invention. When key data are input into an apparatus for encoding an orientation interpolator, information, such as the number of key data and the number of digits of each of the key data, is input into the header encoder 400 and is encoded. The linear key encoder 900 searches for a region in the input key data where key frames exist at certain temporal intervals, key data have the same difference, and the key data changes linearly, and the searched linear region is encoded first in step S 9000 .
Famous 3D application software, such as 3DMax or Maya, generates key-frame based animation using keys having a predetermined time interval therebetween in specific regions. In this case, it is possible to easily encode key data using the beginning and ending key data of a linear key data region and the number of key frames existing between them. Accordingly, linear prediction is very useful for encoding keys in a certain region using an interpolator.
The following equation is used for linear prediction.
Here, t S represents the data of a key where a partially linear region begins, t E represents the data of a key where the partially linear region ends, S represents an index of t S , and E represents an index of t E . The error between real key data in a specific region ranging from S-th key data to E-th key data and key data linearly predicted following Equation (4) can be calculated using the following equation.
If a maximum value among errors calculated using Equation (5) is not greater than a predetermined error limit, t i can be considered co-linear in region [t S , t E ] or within a certain range of errors. Whether or not the maximum error value t i is co-linear with the specific region is determined using the following Equation (6).
If
t i is co-linear with region [t S , t E ]. Here, nBits represents the number of bits used for encoding.
If the linear key encoder 900 searches for the partially linear region, the beginning and ending key data of the partially linear key data region are output to the floating-point number converter 905 . The number of keys included in the linear key data region is output to the header encoder 400 and is encoded. It is possible to considerably reduce the amount of data to be encoded using linear encoding.
The beginning key data and the ending key data are encoded using floating-point number transformation, which will be described later.
The floating-point number converter 905 converts key data represented in the binary system into the decimal system in order to encode the beginning key data and the ending key data.
A computer stores floating-point numbers as 32-bit binary numbers. If a floating-point number represented in the binary system is given, the floating-point number converter 905 converts the floating-point number into a mantissa and an exponent in the decimal system, and this process is expressed by the following equation.
For example, a floating-point number 12.34 can be converted into a binary number by a computer, which is shown in the following.
1: the sign
2: the mantissa in the binary system
3: the exponent in the binary system
The binary number can be converted into a decimal number following Equation (7), which is shown in the following.
1: the sign
2: the mantissa in the decimal system
3: the exponent in the decimal system
In order to include a mantissa and an exponent in the decimal system in a bitstream, the numbers of bits required to represent the mantissa and the exponent must be calculated. The exponent has a value between −38 and 38 and thus can be expressed together with its sign using 7 bits. The number of bits required to represent the mantissa is dependent on the number of digits. The values of the mantissa and the number of bits required to represent the mantissa are shown in the following table.
| TABLE 4 | ||
| Values of mantissa | Digits of mantissa | Number of bits required |
| 0 | 0 | 0 |
| 1–9 | 1 | 4 |
| 10–99 | 2 | 7 |
| 100–999 | 3 | 10 |
| 1000–9999 | 4 | 14 |
| 10000–99999 | 5 | 17 |
| 100000–999999 | 6 | 20 |
| 1000000–9999999 | 7 | 24 |
The beginning and ending key data of the linear key data region that has been searched for and converted using the above-mentioned processes are encoded following the encoding process shown in FIG. 10B, are output to the header encoder 400 , and are stored in the bitstream.
FIG. 10B shows a process of encoding two input floating-point numbers performed in the floating-point number converter 905 . The way the floating-point number converter 905 encodes a floating-point number will be described with reference to FIG. 10B.
The floating-point number converter 905 receives the digit number Kd of original key data, beginning key data S, and ending key data E and converts them in step S 9040 following Equation (7).
The floating-point number converter 905 encodes S first. In particular, the floating-point number converter 905 checks whether or not the digit number of S is different from Kd. If the digit number of S is different from Kd, the digit number of S is obtained and is output to the header encoder 400 in step S 9042 . The floating-point number converter 905 obtains the digit number of S using function Digit ( ).
If the digit number of S is greater than 7, S is output to the header encoder 400 using a predetermined number of bits (in the present invention, 32 bits are used following a floating-point number manner of IEEE Standard 754) in step 9043 so that the digit number of S can be included in the bitstream.
If the digit number of S is not 0 and is smaller than 7, the floating-point number converter 905 outputs the sign of S to the header encoder 400 in step 9044 . The number of bits required to encode the absolute value of the mantissa of S, is obtained using Table 4. Next, the absolute value of the mantissa of S is output to the header encoder 400 using the number of bits obtained using Table 4, in step S 9045 . The floating-point number converter 905 calculates the exponent of S, outputs the sign of S to the header encoder 400 , and outputs the exponent to the header encoder 400 as a predetermined number of bits, for example, 6 bits, in step S 9046 . Such key data transformation makes it possible to considerably reduce the number of bits included in the bitstream.
If the digit number of S is 0, the encoding of the beginning key data is ended, and the method goes t