Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 使用MATLAB将图像分成大小相等的块,并使用Gabor滤波器_Image_Matlab_Image Processing_Block - Fatal编程技术网

Image 使用MATLAB将图像分成大小相等的块,并使用Gabor滤波器

Image 使用MATLAB将图像分成大小相等的块,并使用Gabor滤波器,image,matlab,image-processing,block,Image,Matlab,Image Processing,Block,如何使用MATLAB将大小为120x120的人脸图像分割为64块大小为15x15像素的图像?然后我想用Gabor滤波器卷积每个15x15块。我未能使用blkproc函数。我如何才能做到这一点?要提取这些块,可以使用以下方法,假设img是120x120图像矩阵,c=15,w=8: 现在blocks是一个15x15x64矩阵,blocks:,:,i是一个15x15矩阵,表示第i个块。要提取这些块,可以使用以下方法,假设img是一个120x120图像矩阵,c=15,w=8: 现在blocks是一个15

如何使用MATLAB将大小为120x120的人脸图像分割为64块大小为15x15像素的图像?然后我想用Gabor滤波器卷积每个15x15块。我未能使用blkproc函数。我如何才能做到这一点?

要提取这些块,可以使用以下方法,假设img是120x120图像矩阵,c=15,w=8:


现在blocks是一个15x15x64矩阵,blocks:,:,i是一个15x15矩阵,表示第i个块。

要提取这些块,可以使用以下方法,假设img是一个120x120图像矩阵,c=15,w=8:


现在blocks是一个15x15x64矩阵,blocks:,:,i是一个15x15矩阵,代表第i个块。

谢谢。在得到你的答案之前,我用以下方法得到了我想要的:'B=mat2celly,[15 15 15],[15 15]然后我使用for循环来获得块。MATLAB是关于矩阵计算和多维数据处理的。所以,让重塑和置换成为你的朋友。谢谢。在得到你的答案之前,我用以下方法得到了我想要的:'B=mat2celly,[15 15 15],[15 15 15]'然后我用for循环得到块。MATLAB是关于矩阵计算和多维数据处理的。因此,让重塑和排列你的朋友。
blocks = reshape(permute(reshape(img, c, w, c, w), [1 3 2 4]), c, c, w * w)