Hi,
I have a camera recorded video data.
how can i convert video camera data into time-series data?
Thank you!

답변 (2개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 1월 11일
편집: KALYAN ACHARJYA 2021년 1월 11일

0 개 추천

댓글 수: 1

garima sharma
garima sharma 2021년 1월 12일
Thank you for reply.
it will convert video into image, but i want to extract pixel vs time information. eg cantlilever beam motion

댓글을 달려면 로그인하십시오.

Bjorn Gustavsson
Bjorn Gustavsson 2021년 1월 11일

0 개 추천

Simplest way might be to use VideoReader:
vidObj = VideoReader('Your-video.mp4');
Frame1 = read(vidObj,1);
idx1toExtract = 12:27:size(Frame1,1);
idx2toExtrace = 17:37:size(Frame1,2);
for frameNR = vidObj.NumFrames:-1:1
vidFrame = read(vidObj, frameNR);
Couple_of_timeseries(:,:,frameNR) = vidFrame(idx1toExtract,idx2toExtract);
end
% Plot the time-series for one pixel:
plot(squeeze(Couple_of_timeseries(2,4,:)))
You'll have to generate an array for the time of the frames from the FrameRate or CurrentTime information in vidObj. For much of the remaining processing I typically cast the data from uint8 to double as soon as possible.
HTH

댓글 수: 3

garima sharma
garima sharma 2021년 1월 12일
thank you for reply.
there is error, while running program:
"No appropriate method, property, or field 'NumFrames' for class 'VideoReader'.
Error in videoreader (line 5)
for frameNR = vidObj.NumFrames:-1:1"
I am new in image & video processing area,could you please explain little bit about program? and also how to generate FrameRate?
Bjorn Gustavsson
Bjorn Gustavsson 2021년 1월 13일
Which matlab-version are you using? In my 2020a version vidObj has these properties.
garima sharma
garima sharma 2021년 1월 13일
Sir, I am using R2016a.

댓글을 달려면 로그인하십시오.

질문:

2021년 1월 11일

댓글:

2021년 1월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by