|This page contains various different examples of key frame identification and extraction. The first one generates excellent image summaries of all key frames, in one single summary image (such as house_tour.jpg [69k] and blade_runner.jpg [120k] , note the red line to show the path of time). The approach taken by the second student was the suggested approach - the others have added their own ideas. DR|
|STUDENT NAME: HUI MAN
File Format: MPEG
File Format: PPM Format & TXT Format
<input filename>: the input mpeg video
example: perl keyframe.pl energy.mpg
The keyframes are then packed into one summary file calle shots.ppm. In this file, the size of the vidoe frames are determinded by its relative length of the shots, in another word, determined by how important that shot is. let L be the length of the longer shot. For shot which lenght is k, if L > k > 2*L/3, the keyframe is displayed in organial size; if 2*L/3 > k > L/3, the keyframe is displayed in 2/3 of the organial size; if k > L/3, the keyframe is displayed in 1/3 of the organial size; The keyframe is then line up according to there time of persent such that user can have a gernal idea of the video
Usage:perl keyframe.pl <input file>Paremeter:input file = the input video used to extract the key framesAchievement:This program extracts the keyframes from the input video and output to a ppm file call keyframe.ppm. The key frames in the output file is placed from top to down, which indicating the time.How it works:The key frame extraction method based on the similarity between cotiguous frames. The similarity calculated is using the same method of assignment 2. i.e. consider the whole frame similarity. The reference and each video frame being checked are first divided into 7X7 blocks. Then mean and standard deviation (SD) of each block for each color of RGB is calculated. The similarity index is the square root of the sum of the square of the difference between the mean and SD of each block. A similarity which is bigger than a preset threshold indicates a key frame is found . The threshold is set by looking the similarity value between each pair of contiguous frame. It is assumed that the first frame in the video is also the first key frame.Result:
|Name: Akhlesh Agrawal
Usage : perl keyframe.pl <inputfilename>
The program extracts keyframes from the input file.
I used the similarity program as used in
Assignment 2, with a few modifications. I decoded the input file into ppm
format. Then for each ppm file i found the similarity
value compared to the previous frame and stored this in an array.
After doing this, i made a histogram making
a count for each similarity value how many times it occurred.
The results were quite good, as my method i think was quite well thought out. For the kylie.mpg [1.15M] file provided in the Assignment page, my program generated all the keyframes listed except for 1 (fin101.ppm), this was because this frame and the previous frame were in fact quite similar and my program would not distinguish it as a new frame. Also at frame fin89.ppm - there was a sudden change in lights, which led my program to believe it was a new scene. Key Frames were determined to occur:
|Name: Pong Chi Chiu
Interesting automatically generated html page summary of frame similarity here.