How can I identify a video frame with scene change using histogram or any other way?
1 view (last 30 days)
Show older comments
I want to seperate only those frames of a video that have scene change information
0 Comments
Answers (1)
Mark Sherstan
on 15 Dec 2018
As a video is just a bunch of pictures and pictures are just matrices you can subtract the two frames (or matrices) to find the differences. How you want to analyze the data or define change (e.g. - is it 5% change or less or more) I will leave up to you. This should put you in the right direction tho:
v = VideoReader('test.mp4');
framePrev = readFrame(v);
% Loop through video frame by frame
while hasFrame(v)
frameCurrent = readFrame(v);
frameCompare = frameCurrent-framePrev;
imshow(frameCompare)
framePrev = frameCurrent;
end
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!