In a lip reading project. I have a data set of not equal number of frames for each video a feature matrix was extracted where the number of rows is the number of frames and the columns is the value of the feature extracted. The problem is that the videos are not of equal number of frames. I need to make them equal using linear interpolation and adding the missing point.
Asked
Active
Viewed 101 times
0
-
What is your input? A nxmx3xf matrix where nxm is the pixel size, 3 the number of colour channels and f the number of frames? Have you tried using `interpn`? – Daniel Mar 14 '15 at 20:06
-
my input is a n*m matrix where n is the number of frames and m is the angles between the lip points. i tried to use interp1q however i dont get the last parameter what is it – Ahmed Abdel Moneim Elket Mar 14 '15 at 20:55
1 Answers
0
newframes=11 %number of frames you want
interpolate_data=interpn(1:size(Data,1),1:size(Data,2),Data,linspace(1,size(Data,1),newframes),1:size(Data,2))
For the second dimensions, indices are untouched to have no interpolation. For the first dimension linspace is used to define a interpolation grid with newframes
values.

Daniel
- 36,610
- 3
- 36
- 69