# Decompose video frames into slices

I am working on a video motion feature implementation. I am implementing a work in a research paper. What I want to implement is this:

The frames contained in a video clip can be thought of as a volume obtained by considering all the frames in time. This volume can be decomposed into a set of two 2-D temporal slices I(x,t)and I(y,t).

What's the methodology of implementing this i.e slicing the volume of frames in time?

• Hello @Panther, welcome to Signals.SE. With respect to how to do the slicing, I think this is a great question. However, asking for a Matlab solution is off-topic in general. As long as you're ok with answers that explain the methodology (which may or may not include snippets of code), then I think we can keep this open. – datageist Mar 14 '13 at 12:29
• @datageist Hi thanks for pointing out. Yes I am totally ok with methododlogy. i will change the question accrodingly.Thanks again – Panther Mar 14 '13 at 15:40
• Are you looking for just horizontal/vertical slices, or arbitrary angles? Could you link the research paper you're reading as well? – datageist Mar 14 '13 at 15:45
• @datageist Yes sure. I am linking it here: cs.cmu.edu/~yaser/RasheedSheikhShah_CVST_2005.pdf . I am trying to implement Motion content (page 4). I have to implement visual disturbance.And as far as I understand it is along x,y corrdinate not at random angel but I might be wrong – Panther Mar 14 '13 at 15:49
• @datageist Hi, have you seen the linked paper? I'm still stuck with it. – Panther Mar 15 '13 at 4:11

Each frame of your movie is a 2D plane indexed by $x$ and $y$. When you consider several consecutive frames, you can stack them in order to have a 3D cube, where each slice of the cube is a frame. This space-time volume is now indexed by $x,y$ and $t$.

You can manipulate this volume as any 3D volume, just replace i nyour mind $t$ by $z$ if you find it confusing.

Once you have this volume, if you change the normal axis used to define the 2D slices (remember it was the $t$ axis initially), you obtain the different slices that you want:

• choosing the $x$ axis as normal, you obtain 2D $(y,t)$ slices
• choosing the $y$ axis as normal, you obtain 2D $(x,t)$ slices

By the way, the classical term for these kind of slices is epipolar-plane image analysis if you are loking for more references.

The simplest 'idea' as to do this would be:

1. Partition video into image frames at a particular frame rate. This can be done as in - link 1
2. Then, extract the (x,y) co-ordinates from each frame via batch processing of images and batch them with the frame numbers as a vector/matrix.
• Can you please explain point 2 a little more. Sorry I am pretty new to this field. Thanks a lot :) – Panther Mar 14 '13 at 15:44

Like other formats of videos like mov,moeg,... YUV is a video format but with no compression. So, the video size increases a lot. You can find more information and some data set about this video format in the internet.

As the different type of videos have different size, you should first specify your video format. These videos formats use different types of compression which makes you decode them before stating the processing. So, researchers usually use uncompressed (raw) format of videos named YUV. If you are using this format I can give you the m files which extracts each frame of the video sequence as a matrix in a cell. You should create a cell which its elements are the video frames.