我正在尝试将多维数组重塑成原始图像。我已拆分使用很好的解决方案,我发现in this question一个在8×8像素的子矩阵512×512像素的图像:在此情况下N = M = 8和sub_imagesMatlab重塑成原始图像
sub_images = permute(reshape(permute(reshape(i_image, size(i_image, 1), n, []), [2 1 3]), n, m, []), [2 1 3]);
是8x8x4096阵列。现在问题是我想回到原始图像避免for循环,但我不明白如何去做。我知道存在函数colfilt
或blockproc
,但我无法使用它们。任何帮助是极大的赞赏!
谢谢!你解决了我的问题。 – BugsFree