MATLAB Answers


how to provide video (Heigh x Width x frames)

Asked by Ren
on 19 May 2013

Hi, i'm working in the spatio temporel interest point, and in order to detect the keypoints , the video have to be matrice (Height x Width x frames) How can i do it? Thank you.

  1 Comment

Search the tag keyframes

2 Answers

Answer by Image Analyst
on 19 May 2013

I'm not sure what you're asking. You can provide video by using a video camera to create a video that is stored in a file. Or you can create one manually from a bunch of frames and using the im2frame() function. Or you can "provide" one to your program (i.e. put into a variable in your program) by using VideoReader class, or mmreader(), or avireader().


Answer by Youssef Khmou
on 19 May 2013

hi Ren,

i think you have to explain a little more your situation, are you working on existing Video or image sequences ? or you want to generate such 3d array ?


Is it from a video camera, or a disk file? What is x, y, and the number of frames? Presumably it's different than what you desire so you're going to have to call imcrop() for each frame.

you can use "aviread" function, next you extract the dimensions from that structure , and you create a 3d matrix A(x,y,t).Using a loop on the third dimension, you can affect each frame to A .

on 19 May 2013

Thanks it works now

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!