To encode a video object plan (for example talking head) efficiently and with a maximum of flexibility, MPEG-4 treats the shape and the texture of a video sequence separately. The shape encoder, which is our concern for this project, compresses a bitmap shape sequence, which can be extracted from the original video by chroma keying.
For Intra-coding of the first shape, we used 2 methods:
The measured compression ratios where as follows:
|
|
|
|
|
|
|
|
|
|
|
|
Source code: chain_encode.c,
huffmanencode.c,
makefile_encode
chain_decode.c,
huffmandecode.c,
makefile_decode
Following compression ratios are
measured:
|
|
|
|
|
|
|
|
|
|
|
|
As we see, this algorithm is a little bit less efficient than chain coding for simple figures. However, with complicated natural shapes, chain coding becomes very computationnaly intensive and unefficient. The lossy compression with threshold 256 is efficient, but also extremely blocky!