フィルターのクリア

Downsample and Upsample videos in matlab

11 ビュー (過去 30 日間)
Ala baccar
Ala baccar 2022 年 7 月 16 日
コメント済み: Image Analyst 2022 年 7 月 18 日
I am working with videos in matlab and the code is taking so much time to give me results, that's why i thought downsampling and upsmaling the video could be the best solution, can anyone help me with that.
  1 件のコメント
Star Strider
Star Strider 2022 年 7 月 16 日
What do you intend by ‘upsampling’ and ‘downsampling’?

サインインしてコメントする。

回答 (2 件)

KSSV
KSSV 2022 年 7 月 16 日
Read video frame by frame, and use imresize on each frame.
  10 件のコメント
Ala baccar
Ala baccar 2022 年 7 月 16 日
Even when i changed the path out from "C:\Program Files" it gave me this eror Unable to find file. Ensure file exists and path is valid.
% Create a VideoWriter object to write the video out to a new, different file.
outputFullFileName = fullfile(pwd, 'C:\resize\NewRhinos.avi');
outputVideoWriterObject = VideoWriter(outputFullFileName);
Image Analyst
Image Analyst 2022 年 7 月 18 日
When using VideoWriter, it creates a new file. So all you need to do is to make sure the folder exists:
You can't append c:\resize onto your current folder because then you'd have two drive letters and two colons in the filename. Just leave off the colon off
outputFullFileName = fullfile(pwd, 'C:\resize\NewRhinos.avi')
to see.
>> fullfile(pwd, 'C:\resize\NewRhinos.avi')
ans =
'C:\Users\alabaccar\Documents\MATLAB\work\Tests\C:\resize\NewRhinos.avi'
See - that's not a proper filename.
So do this:
% Create a VideoWriter object to write the video out to a new, different file.
outputFolder = 'C:\resize';
outputFullFileName = fullfile(outputFolder, 'NewRhinos.avi');
fprintf('Creating new output file : "%s".\n', outputFullFileName)
outputVideoWriterObject = VideoWriter(outputFullFileName);

サインインしてコメントする。


Image Analyst
Image Analyst 2022 年 7 月 16 日
I already have a demo for resizing a video. See attached.
  1 件のコメント
Image Analyst
Image Analyst 2022 年 7 月 16 日
If you say that it takes too long, how long does it take and what is the maximum time you will allow? Perhaps you can use parfor and the Parallel Processing Toolbox, and a faster computer, to speed it up.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by