# Pixel Wise Write into a Video File in MATLAB

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.

• Could you please review my answer and either mark it or say what's missing? – Royi Jan 6 at 22:16

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.
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.