我应该从视频帧中收集一堆SURF点,并且在过滤这些坐标点群后,我想将它转换回它自己的形成。 下面你可以看到我写的代码:在MATLAB中过滤DetectSURFfeatures并将数组转换回它自己的类型
surfpoints_raw_single_column_matrix = detectSURFFeatures(img);
raw_points_double_column_matrix = SURFPoints(Location);
s=1;
for a=1:size(raw_points_double_column_matrix,1)
i=raw_points_double_column_matrix(a,1);
j=raw_points_double_column_matrix(a,2);
if ((i>156-9-70 && i<156+9+70) && (j>406-9-70 && j<406+9+70))
matrix_filtered(s,1)=i;
matrix_filtered(s,2)=j;
s=s+1; %filtered matrix index counter
end
end
???? = matrix_filtered;
% Conversion back to the type of surfpoints_raw_single_column_matrix
我需要的是转换(例如)24x2矩阵划分成24x1矩阵仍然保持选定的X和Y坐标为一对(24倍[X ,y])。 在此先感谢...
嗨!尝试添加[mcve],以便我们可以测试代码。但是,我明白你想要什么。 Surf功能会给你一些特定的像素的x,y坐标,它们有一些SURF值。这里发生了什么样的转换? –