Two videos sampling frequency sync

6 Ansichten (letzte 30 Tage)
Or Amselem
Or Amselem am 28 Mär. 2020
Kommentiert: Dhananjay Kumar am 31 Mär. 2020
Hello, i have two different videos. one was sampled at 30Hz, the other is sampled at 9Hz.
i want to sync the both videos on 30Hz. How can i do it?
right now i'm kind of deviding the number manually by (30/9)
for ii=1:frame_sampeled
%sample freq adaptetion
VO_temp(:,:,:,ii) = vid_VO.readFrame();
VO=squeeze(VO_temp(:,:,:,ii));
ii_ir=1+uint8((ii/10)*3);
if ii_ir ~= last_ii_ir
IR_temp(:,:,:,ii_ir) = vid_IR.readFrame();
IR=squeeze(IR_temp(:,:,:,ii_ir));
last_ii_ir=ii_ir;
end
  3 Kommentare
Dhananjay Kumar
Dhananjay Kumar am 31 Mär. 2020
Bearbeitet: Dhananjay Kumar am 31 Mär. 2020
Here 30Hz and 9Hz are frame frequencies , right?
Or Amselem
Or Amselem am 31 Mär. 2020
yes, i'm using two diffrent cameras - one is 30 fps, other 9fps.
I explored the function you suggested' and explored timeseries object.
timeseries object doesn't regard the frequenct, only the time of day/date if i understand correctly

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Dhananjay Kumar
Dhananjay Kumar am 31 Mär. 2020
  2 Kommentare
Or Amselem
Or Amselem am 31 Mär. 2020
Thnx for the answer,
According to my understanding - this action will resample the pixels inside the frames
i would like to resample the entire video in a diffrent freq (frame-by-frame).
Those functions are simulink blocks, but i'm using matlab command line.
Dhananjay Kumar
Dhananjay Kumar am 31 Mär. 2020
I guess you want to make the frame count in the two videos same. I am not aware of any function which will resample frames of one video to make the frame counts same as another video.
If you want to make the running time of the videos same then you can adjust the frame rate(number of frames displayed per second) using VideoWriter object. Note that this will not change the total frame count of a video.
Also see this page which might click some ideas.

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by