dividing video into scenes
古いコメントを表示
hi everyone the attached file is matlab code for dividing AVI movie into scenes. unfortunately, the accuracy of this
program is low. So, is there any alternative matlab program?
Regards
Majid
回答 (4 件)
Image Analyst
2018 年 7 月 7 日
0 投票
It's hard to define what a scene is. If the camera smoothly turns around 180 degrees is that a new scene?
See my attached example where I take the mean of all frames. You could examine the means and try to find abrupt changes in the means which could indicate a change in scene. Though it could also be the same scene where someone just put their hand over the lens for a short time.
7 件のコメント
Majid Al-Sirafi
2018 年 7 月 7 日
Image Analyst
2018 年 7 月 7 日
編集済み: Image Analyst
2018 年 7 月 7 日
It's a standard one that ships with MATLAB. Look here:
C:\Program Files\MATLAB\R2018a\toolbox\images\imdata\rhinos.avi
Stephen23
2018 年 7 月 8 日
thank you dear Image Analyst I found the file and tried your example. my be it will useful for me
regards
Image Analyst
2018 年 7 月 8 日
Based on the image,

For this video it looks like whenever the mean gray level changes by about 10-15 gray levels, there is a scene change.
Majid Al-Sirafi
2018 年 7 月 8 日
Image Analyst
2018 年 7 月 8 日
Look at the plot of gray levels in the upper left axes. See how the mean abruptly jumps at certain frames? What do you think might cause that?
That jump would be caused when the image changes drastically from the prior frame, in other words, it would happen at an abrupt scene change. Does that make sense?
Now, look at the magnitude of the gray level jumps when you're at one of these jumps. It looks like it changes about 20 gray levels or more. When it changes less, the scene is just undergoing normal, slow changes in scenery (like the camera slowly panning) but not a complete scene change. Another way you could do it is to look at the binary image and count the white pixels -- the area fraction. A large area fractions (lots of differences showing up in white) would indicate a scene change. This would also indicate a scene change if the image changed but the histogram didn't, like the camera flipped upside down, or a person walked from one side of the scene to the other. You'd have to decide if that constituted a scene change or not. You could even have 2 or 3 scene change metrics and have them vote as to whether a genuine scene change occurred.
Majid Al-Sirafi
2018 年 7 月 9 日
Majid Al-Sirafi
2018 年 7 月 7 日
0 投票
1 件のコメント
Image Analyst
2018 年 7 月 8 日
No. I think you should plot the difference from frame to frame as a function of frame and look at the frames where you know for a fact that the scene has changed. Those differences should be about right, and all the other differences will probably be a lot less. So set the threshold about half way between the known scene change difference, and a typical non-changing scene difference.
Majid Al-Sirafi
2018 年 7 月 8 日
0 投票
1 件のコメント
Image Analyst
2018 年 7 月 8 日
zip files can be attached if they are less than about 5 MB
カテゴリ
ヘルプ センター および File Exchange で Simulink 3D Animation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!