Compressed domain logo insertion

Design Team Members: Mate Prgin

Supervisor:  Ed Jernigan

Background

The area of digital video broadcasting has been growing immensely over the last decade. Therefore, applications in digital video processing have been getting more sophisticated, and certain needs are being established by the broadcasting industry. A particular feature of interest to broadcasters is Logo Insertion.

A logo insertion mechanism allows a broadcaster to place their transparent logo in the corner of the screen, so that the customer can identify the channel (or program) they are watching. The same principle can also be extended beyond logos, to give the broadcaster the ability to overlay programming with any image or text.

The concept of logo insertion through alpha blending is not a particularly new one, assuming it is performed in the spatial domain (i.e. clean NTSC video). However, today’s digital broadcasters do not distribute NTSC, but in fact they distribute in MPEG-2 video format. This means that in order to perform logo insertion, we must either, decode MPEG-2« To NTSC, insert the logo and re-encode, or alternately, we must insert the logo in the compressed domain.

Taking the first approach is technically feasible and readily possible, however it introduces image quality loss at the re-encoding step, since MPEG is a lossy compression algorithm. This approach is also not very efficient, since it requires the video stream to go through the DCT (Discrete Cosine Transform) algorithm an extra two times.

The second approach is much more efficient, and it results in no image quality loss from the encoded MPEG-2 stream. However, the implementation of this approach is far less than trivial, since it requires image-processing operations in the compressed domain.

The process of alpha blending in the spatial domain is used to obtain transparent logos. Alpha blending requires multiplication in the spatial domain therefore it shall require some kind of convolution in the compressed domain. A convolution theorem for the DCT domain was obtained from IEEE literature that allows us to key a logo onto a compressed video image.

The challenge is to implement the above theory, and to produce a real time algorithm that will key any given logo onto any given MPEG-2 video stream. Furthermore, the possibility of keying moving logos would be of interest if time permits.

Project description

The purpose of my project is to implement a real time logo insertion algorithm that has the ability to operate on an MPEG-2 video stream without causing image degradation or any quality loss. I will also be looking at implementing insertion of moving logos (animations) if time permits.

The end goal is to have an algorithm that can be attached to any MPEG-2 video stream processor. The algorithm will be able to take any image (of appropriate size) and overlay it transparently over the existing videos stream. The algorithm will furthermore have the ability of transparently overlaying any animation onto the video stream.

Design methodology

The challenge in implementing any algorithm that functions in the DCT (frequency) domain of MPEG-2 video is dealing with both spatial and temporal compression. A DCT domain convolution will be used to key a logo onto spatially compressed frames, and a Macroblock editing algorithm will be used to update temporally compressed frames, in order to prevent error propagation. Special care will have to be taken when editing Macroblocks while keying a moving logo.