5

A video file (in .ptw format) is read in MATLAB in the form of a 3 dimensional matrix (a structured format). My aim is to process the video in time domain on each coordinate pixel individually and eventually write the processed time domain output in a video file. I am looking for a technique for the same.

Please see - The processing are of type cross-correlation, filter in fourier domain, that requires the data to be transformed to 1-d matrix.

Royi
  • 33,983
  • 4
  • 72
  • 179
deboshree
  • 111
  • 1
  • 8

1 Answers1

4

I assume your matrix is 3D where the first 2 dimensions are Width and Height and the third is time (Gray Scale Video).

If you can write your processing as a Filter you can use MATLAB's filter() function.
The function has the dim property hence you can set it to 3 and it will apply on the filter over the third dimension.
The limitation is applying the same filter to whole data.
If you need to have different filter for each pixel then you should iterate over the filter bank.

Another solution is to use the functions permute() and reshape() to rearrange the data to have the Time Axis in the dimension which fits your needs.

Royi
  • 33,983
  • 4
  • 72
  • 179