cut video with beginning and end frame number

2 次查看(过去 30 天)
Hello!
I want to "cut" a shorter video out of a long video in Matlab. I have the start frame number and the end frame number.
For example a video lasts 30 seconds and I want to have only the new video from 4 seconds to 17 seconds by knowing the beginning frame number of hypothesised 125 and end frame number of 501.
Any ideas how to do this?
Thank you for your help and your time!

采纳的回答

Daniel M
Daniel M 2019-10-4
编辑:Daniel M 2019-10-4
I'm not sure the size of your video data, but observe the following:
x = rand(50,60,1000);
whos x % x = [50, 60, 1000]
x(:,:,[1:124,502:end]) = []; % delete beginning and end sections
whos x % x = [50, 60, 377]

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by