|
Algorithm 1: Key-Frame Extraction [29] |
Read videos from the directory
Store all videos in an array name all_videos []
Specify a threshold T for keyframe selection
for i uptoall_videos in array
Read frame i as prev_frame also do (frameCount) in video (i)
Loop until
while (fc < frameCount)
-
7.
Read the next frame as curr_frame (i + 1)
-
8.
Compute absdiff (curr_frame, prev_frame)
-
9.
Compute the Average of absdiff
-
10.
If Averagediff > T (threshold)
-
11.
Select the current frame as a keyframe
-
12.
Update frames: prev_frame = curr_frame
-
13.
Update:
|