how to divide an 512*512 image into 8*8 blocks??
5 ビュー (過去 30 日間)
古いコメントを表示
i want to divide an 512*512 image into 8*8 blocks using matlab can u please help me
0 件のコメント
回答 (3 件)
Mihir Daptardar
2014 年 1 月 22 日
編集済み: Mihir Daptardar
2014 年 1 月 22 日
You can use the mat2cell command to subdivide the matrix. For this particular case, please refer to the following code snippet. Please make sure that your inputSqMat is exactly divisible into the subDivisions
function out = cropping(inputSqMat, subDivisions)
lengthSqMat = size(inputSqMat,1);
subDivisionVect = subDivisions*ones(1, lengthSqMat/subDivisions);
out = mat2cell(inputSqMat, subDivisionVect, subDivisionVect);
To access a particular element, you can index into the variable. For example:
out{1,1}
0 件のコメント
Image Analyst
2014 年 1 月 22 日
See the FAQ for two ways to do it, one using cell arrays, and one not.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!