video camera data processing

1 view (last 30 days)
garima sharma
garima sharma on 11 Jan 2021
Commented: garima sharma on 13 Jan 2021
Hi,
I have a camera recorded video data.
how can i convert video camera data into time-series data?
Thank you!

Answers (2)

KALYAN ACHARJYA
KALYAN ACHARJYA on 11 Jan 2021
Edited: KALYAN ACHARJYA on 11 Jan 2021
  1 Comment
garima sharma
garima sharma on 12 Jan 2021
Thank you for reply.
it will convert video into image, but i want to extract pixel vs time information. eg cantlilever beam motion

Sign in to comment.


Bjorn Gustavsson
Bjorn Gustavsson on 11 Jan 2021
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 Comments
garima sharma
garima sharma on 13 Jan 2021
Sir, I am using R2016a.

Sign in to comment.

Categories

Find more on MATLAB Support Package for IP Cameras in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!