how to divide an image into blocks
1 回表示 (過去 30 日間)
古いコメントを表示
how to divide an image into blocks of size 10*10,can anyone help please
0 件のコメント
回答 (2 件)
Junaid
2011 年 12 月 11 日
Dear Pat,
mat2cell is the only easy solution for your question. You are getting this error because your the mod of your IMG and 10 is not equal to zero. In other words the dimensions of IMG can't be evenly divided by 10. so either you take image of size whose dimensions are divisible by 10. Example:
IMG = magic(100);
IMGcells = mat2cell(IMG, 10*ones(1,size(IMG,1)/10), 10*ones(1,size(IMG,2)/10));
so make sure your image dimensions are divisible by 10, or any grid size you want.
0 件のコメント
Walter Roberson
2011 年 9 月 12 日
IMGcells = mat2cell(IMG, 10*ones(1,size(IMG,1)/10), 10*ones(1,size(IMG,2)/10);
参考
カテゴリ
Help Center および File Exchange で Computer Vision with Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!