Χ (Chi-Square) Based Shot Boundary Detection and Key Frame Extraction for Video
Χ (Chi-Square) Based Shot Boundary Detection and Key Frame Extraction for Video
Com
2 (Chi-Square) Based Shot Boundary Detection and Key Frame Extraction for Video Prajesh V. Kathiriya1, Dhaval S. Pipalia2, Gaurav B. Vasani, Alpesh J. Thesiya4, Devendra J. Varanva5
1
(EC, Balaji Institute, India), 2,3,5,( EC, Rk University, India), 4 (EC, LJ Institute, India),
Abstract : To Extract valid information from video, without any loss of information, much attention is being
paid to video processing technology. For this key frame is very useful technique. Extracting a small number of key frames that can abstract the content of video is very important for efficient browsing and retrieval in video databases. Consequently, technologies for video segmentation and key-frame extraction have become crucial for the development of advanced digital video systems. In this paper, Shot Boundary is detected by using very popular method i.e. Histogram method. By using this Shot Boundary the Key frame is extracted from the video.
17
Videos are made using different combination of shots. Many shots together make a different scene and different scenes together make a total video. Shot shows a continuous action in an image sequence. The consecutive frames fro m the start to the end of recording in a camera are called shot [1]. There are mainly two types of transitions which used in that field. 1. Cut or Abrupt (discontinuous): It is defined as finish first shot and direct start second shot its called Cut Transition. 2. Gradual (continuous): The gradual change occurs over multiple frames. It has four different types of transitions. Those are A) Fade in: Image gradually change fro m b lank to current image is called fade in. B) Fade out: Image gradually change fro m current image to blank is called fade out. C) Dissolve: Image g radually changes between two distinct frames is called d issolve. D) Wipe: A wipe occurs when a line moves across the screen, with the new scene appearing behind line.
III.
3.1. Histogram Method: There are six kinds of histogram match [8]. Ho wever, through comparing several kinds of histogram matching methods, Nagasaka [10] reached on conclusion that x2 histogram outperformed others in Shot Boundary Recognition. Hence, x2 histogram matching method is referred in this paper. Here we also used different approach for finding a difference of two frames because here we do not convert image into block but we just take whole image intensity for three basic colors. For that first of all, fra mes are converted into three different color i.e. R(Red), G(Green), B(Blue). The steps for histogram methods are as follows: 1) Co mpute the Histogram of kth and (k+1)th frames for d ifferent three colors Hr, Hg and Hb, where Hr, Hg, and Hb are histogram of red, green and blue respectively. Now calculate the difference between two frames using (1): D f (k,k+1) = [H(k,i) H(k+1,i)]2 H(k,i)
(1)
Where H(k,i) and H(k+1,i) is stands for histogram of Red, Green and Blue for consecutive frames. 2) Calculate the total difference for the total video and then calculate the mean difference(M D) using (2): MD = D f (k,k+1) N-1
(2)
Where N is total number of frames. 3) Co mpute standard variance STD of histogram difference over whole video sequence by using (3): (3)
4)
Calculate the two threshold for two types of shots, i.e. Cut and Gradual Threshold by using (4): T = MD + STD A (4)
Where A is pre-specified constant for both Cut and Gradual transitions. So we get two thresholds T CUT and TGRD for cut and gradual transitions respectively. 5) Now if the mean difference of two consecutive frames is greater than Cut threshold (T CUT), then Cut transition is occurred in video sequence. If the mean d ifference of two consecutive frames is greater than
18
IV.
IV.1 Algorithm: 1) For finding a KEY frame fro m v ideo, take first frame of each shot is reference frame and all other frames within shots are general frames. Co mputing the difference between all the general frames and reference frame in each shot with the above algorithm.[2,7] 2) Searching for the maximu m difference within a shot: Max (i) = {D f (1, k)}, k= 2, 3N. 3) Now if the Max(i) > M D, then the frame with the maximu m d ifference is called a key frame and otherwise with respect to the odd number of a shots frames, the frame in the middle of shot is chose as key frame; in the case of the even number, any one fra me between the two frames in the middle of shot can be chose as key frame.[7] IV.2 Fl ow Chart: The whole process of extracting a KEY frame fro m the video is as shown in fig.2 which shows the flow chart for the whole process.
V.
We have imp lemented this algorith m in different types of uncompressed video stream. Here we show the results of two different videos, one is fro m cricket match and another one is an action sequence from mov ie Resident Ev il 5. V.I Cricket Vi deo:
Fig. 3 Left side is showing that video is playing and right side shows Histogram of R,G,B
19
20
VI.
In this paper, we see Chi Square technique for color Histogram method to find a shot boundary from the video. After detecting a shot boundary we can extract the KEY frame fro m the video. Histogram method is very time consuming process but the accuracy is higher especially in Gradual transitions. So we can say that there is trade-off between speed and accuracy in Histogram method. This method is well sup ported to the uncompressed stream. In future this method can extend to all types of videos and also extend for any format of the video.
REFERENCES
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Seung-Hoon Han, Kuk-Jin Yoon, and In So Kweon, 2000. A new technique for shot detection and key frames selection in histogram space. Workshop on Image Processing and Image Understanding, pp 475 -479. ZHAO Guang-sheng, A Novel Approach for Shot Boundary Detection and Key Frames Extraction, 2008 International Conference on Multimedia and Information T echnology, IEEE-2008. A. Hanjalic, Shot -boundary detection: Unraveled and resolved?, IEEE Circuits and System for Video T echnology., Vol.12, No.2, February, 2002, pp. 90-105. Z. Cernekova, I. Pitas, and C Nikou, Information Theory-based shot cut/fade detection and Video Summarization, IEEE Transaction on Circuits and System for Video Technology, Vol.16, No.1, January 2006, pp. 82 -91. N. Babaguchi, Y. Kawai.T. Ogura, and T . Kitahashi, Personalized abstraction of broadcasted American football video by highli ght selection, IEEE Transaction On Multimedia, Vol.6, No.4, August 2004, pp. 575-586. A. Hanjalic, Multimodal approach to measuring excitement in video, Proceedings of International Conference on Multimedia an d Expo ICME 03[C].Vol.2, July 2003, pp. 289-292. Naimish Thakar,Upesh Patel, Pradip Panchal and Hitesh Panchal Shot Boundary Detection and Key Frame Extraction from Uncompressed Video Stream, International Conference of Signals, Systems and Automation, ICSSA-2011, ISBN 978-1-61233002-0. Y. Cheng, X. Yang, and D. Xu, A method for shot boundary detection with automatic threshold, TENCON02. Proceedings. 2002 IEEE Region 10 Conference on Computers, Communication, Control and Power Engineering[C], Vol.1, October 2002: 582 -585. D. Swanberg, C. F. Shu, and R. Jain, Knowledge guided parsing and retrieval in video databases, in Storage and Retrieval for Image and Video Databases, Proc. SPIE 1908, 173187 ~1993!. F. Arman, A. Hsu, and M-Y. Chiu, Image processing on encoded video sequences, Multimedia Systems 1~5!, 211219 ~1994!. T. D. C. Little, G. Ahanger, R. J. Folz, J. F. Gibbon, F. W. Reeve, D. H. Schelleng, and D. Venkatesh, A digital on -demand video service supporting content-based queries, Proc. ACM Multimedia 93, pp. 427436, Anaheim, CA ~1993!. J. Boreczky, Using video and audio data for content extraction and shot and scene boundary determination, PhD dissertatio n, University of California Berkeley, to appear ~1996!.
[12]
21