How to resize video
155 ビュー (過去 30 日間)
回答 (4 件)
Image Analyst 2017 年 1 月 31 日
See my attached demo. In the loop over frame, just resize the frame just read in and write it out with writeVideo(). If you can't figure it out, let me know what frame size you want your output in.
Takuji Fukumoto 2017 年 1 月 30 日
imresize function is fine. Here is the example.
vidobj = vision.VideoFileReader('moviename')
viewer = vision.DeployableVideoPlayer;
A = step(vidobj);
viewframe = imresize(A,0.5);
Takuji Fukumoto 2017 年 1 月 31 日
I think you can write like this
In this example, imresize is used in function. https://jp.mathworks.com/help/releases/R2016b/vision/examples/tracking-pedestrians-from-a-moving-car.html?lang=en
Abdullah Amer Mohammed Salih 2020 年 11 月 24 日
Thanks for your code, I need to change video in dimentions means the video for example is 100 x 100 it will be 30 x30. that is a liniear transformation.
I also need to change the shape of the video means I change it from rectangle to polygon for example. any clue how I do that?