Info
此问题已关闭。 请重新打开它进行编辑或回答。
shot boundary detection algorithm
2 次查看(过去 30 天)
显示 更早的评论
Algorithm :Shot boundary detection
Let F(k) be the kth frame in video sequence, k = 1,2,…., Fv( Fv denotes the total number of video). The algorithm of shot boundary detection is described as follows. Step 1: Partitioning a frame into blocks with m rows and n columns, and B(i, j, k) stands for the block at (i, j) in the kth frame; Step 2: Computing x2 histogram [8] matching difference between the corresponding blocks between consecutive frames in video sequence. H(i, j,k) and H(i, j, k +1) stand for the histogram of blocks at (i, j) in the kth and (k +1) th frame respectively. Block’s difference is measured by the following equation: DB(k,k+1,i,j) = ∑_(l=0)^(L-1)▒([H(i,j,k)-H(i,j,k+1)]²)/(H(i,j,k)) Where L is the number of gray in an image; Step 3: Computing x2 histogram difference between two consecutive frames: D(k,k+1,i,j) = ∑_(i=1)^m▒∑_(j=1)^n▒〖 〗 DB Wij(k,k+1,i,j) where wij stands for the weight of block at (i, j) ; Step 4: Computing threshold automatically: Computing the mean and standard variance of x2 histogram difference over the whole video sequence. Mean and standard variance are defined as follows: MD = (∑_(k=1)^(Fv-1)▒〖D(k,k+1)〗)/(Fv-1) STD = √((∑_(k=1)^(Fv-1)▒(D(k,k+1)- MD )²)/(Fv-1)) Step 5: Shot boundary detection Let threshold T = M D + a × S T D. Shot candidate detection: if D(i, i +1) ≥ T , the ith frame is the end frame of previous shot,and the (i +1)th frame is the end frame of next shot. Final shot detection: shots may be very long but not much short, because those shots with only several frames cannot be captured by people and they cannot convey a whole message. Usually, a shortest shot should last for 1 to 2.5 s. For the reason of fluency,frame rate is at least 25 fps, (it is 30 fps in most cases), or flash will appear. So, a shot contains at least a minimum number of 30 to 45 frames. In our experiment, video sequences are down sampled at 10 fps to improve simulation speed. On this condition, the shortest shot should contain 10 to 15 frames. 13 is selected for our experiment. We formulate a “shots merging principle”: if a detected shot contain fewer frames than 13 frames, it will be merged into previous shot, or it will be thought as an independent one.
i ve 2 read videos and convert them to frames and detect shot boundary using above algorithm ...
1 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!