Error- Subscripted assignment dimension mismatch.

1 次查看(过去 30 天)
I have divided image into non overlapping blocks using command
x=imread('im9.bmp');
x=imresize(x,[256 256]);
rgbImage=x;x=double(x);
[rows columns numberOfColorBands] = size(rgbImage)
fun=@(block_struct) block_struct.data;
a = blockproc(x,[64 64],fun);
%%%%%%%%now to non overlapping blocks
a1= blkproc(x,[64 64],[2 3],fun);
i get the following error
Subscripted assignment dimension mismatch.
Error in blkproc (line 92) aa(border(1)+(1:ma),border(2)+(1:na)) = a;
Error in news (line 28) a1= blkproc(rgbImage,[64 64],[2 3],fun);
kindly helo to resolve it

回答(1 个)

Walter Roberson
Walter Roberson 2013-4-18
blkproc() and blockproc() are two different routines that process the data fairly differently.
blkproc() has either already been removed from MATLAB or will be removed soon; it is no longer a documented command.
The form of blkproc() you have used is for overlapping blocks, not for the non-overlapping blocks of your comment. The form of blockproc() you have used is for non-overlapping blocks.

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by