International Journal of Computer Applications (0975 8887) Volume 40No.9, February 2012 11 Fast Content Aware Video Retargeting Awadhesh Srivastava Department of Information Technology Krishna Institute of Engineering &Technology Ghaziabad K.K. Biswas Department of Computer Science & Engineering Indian Institute of Technology Delhi ABSTRACT When a video is displayed on a smaller screen than originally intended, some of the information in the video is necessarily lost. In this paper, we introduce Video Retargeting that adapts video to better suit the target display, minimizing the important information lost. We can remove uninteresting part from video like image with some important modifications to retarget it using seam carving. Instead of removing seam from individual frames we extract seam-surface from the space- time volume. To calculate this surface we use seam carving in association with motion projection with lesser algorithmic complexity. General Terms Video, retargeting, screens, layout. Key words Dynamic programming, Seam surface, video-frames. 1. INTRODUCTION With the advancement of technology it is easier to take picture or video in higher resolution, but the displaying these pictures or videos are limited by multiple screen sizes. There are very few methods proposed to display video on various screen size. While cropping may cut some important information from the video, whereas scaling will change the dimension of objects which may lead to unpleasant experience. Existing work in video retargeting can be divided into two broad categories: cropping and resizing. Cropping uses a sliding window to pan through a scene, which works like a virtual camera focus on salient regions. Resizing adjusts the frames in a non homogeneous manner by either squeezing less salient regions or removing the seams with minimized energy. Michael Rubinstein et. al. [1] proposed very good but computationally expensive scheme to retarget the video, on the other hand you must have complete video sequence to retarget for their approach. Seam-surface is a surface in video cube which is 8-connected not only in XY plane but also in time domain. Removing such surfaces leave very less artifacts. In cropping, Fan [3] and Wang [9] extracted the regions of interest (ROIs) and sent output videos to users adaptively with a “display path”. Liu et al. [4] convert a high resolution film to a normal resolution, keeping the original camera movement by using heuristic penalties. Likewise, a sliding window was employed by F. Megino [5], D. Thomas [8] to create the effects of pan, tilt and zoom from still images. When a single window cannot cover two separate objects in one frame, intermittent black padding is usually applied, which disturbs most viewers. Overall, the cropping methods introduce pseudocamera movements that compromise the original intent of the photographer. In terms of resizing techniques, Setlur first introduced bi-layer segmentation for scaling the filled-in background and removed objects respectively [6]. This approach is limited as it heavily depends on the segmentation results, which could break the relative proportion between objects. Nonhomogeneous resizing, i.e., shrinking less important regions more, was adopted by Wolf et al. [11], but the pixel- wise mapping approach suffers high computational complexity. Recently, Wang et al. [10] presented an image resizing method with a scaleand-stretch mesh, which computes an optimal scaling factor for each region by combining visual attention and gradient map. This method is only designed for images, and a bended grid may distort the structure of complex backgrounds. Feng Liu et. Al. [12] proposed automatic pan and scan in which they find most salient part of video frames using face detection and motion detection but videos like football match players are hardly headed to camera, in that case face detection will fail. [13] Yu-Shuen Wang et.al. used a grid based approach with scale- and-stretch optimization technique to retarget the video. Nam et. al. [14] done the video retargeting using DCT with motion vectors for mobile screens. Our seam surface removal technique is different from [1]. To calculate seam-surface, [1] are using graph-cut method to calculate a min-cut using their specially constructed graph, which has as many nodes as the pixels in the video and edges are almost 8-fold of nodes. It is quite large graph and complexity of calculating a cut in this graph is either O(N*E^2) or O(N^2*sqrt(E)) depending upon Labeling algorithm by Edmonds or preflow-push algorithm by Goldberg respectively, where n is number of nodes and e is number of edges in the graph. 2. MOTION PROJECTION MATRIX We have used this metric to measure motion of objects within a video segment or in entire video sequence. This metric would show where it is high motion, and where it is low motion in the video. this information help us to decide which area in the video is less salient in terms of motion and so uninteresting part of video can be extracted fig 1. If a video V have F frames, and each frame f i has of size MxN, then motion projection matrix P will be calculated as below  =  ,  −  +1 (, ) ,  =  1 ,  2 , …… ,  −1 Where = 1,2, …; = 1,2, …; = 1,2, …;