线性插值如何在特征矩阵中插入点以使它们具有相同的大小(Linear interpolation how to insert points in a feature matrix in order to

编程入门 行业动态 更新时间:2024-10-26 16:32:56
线性插值如何在特征矩阵中插入点以使它们具有相同的大小(Linear interpolation how to insert points in a feature matrix in order to make them of equal size)

在唇读项目中。 对于每个视频,我有一个不相等的帧数的数据集,提取了一个特征矩阵,其中行数是帧数,列是提取的特征的值。 问题是视频的帧数不相同。 我需要使用线性插值并添加缺失点使它们相等。

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.

最满意答案

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

对于第二维,索引是不受影响的,没有插值。 对于第一维,linspace用于定义具有newframes值的插值网格。

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.

更多推荐

本文发布于:2023-07-05 07:54:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1034894.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:矩阵   线性   使它   特征   大小

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!