Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 256x256 的图像,有没有简单的方法将它分成 8 个区域(32x32)并得到一个特定的区域?例如:地区 4,6
图像存储为二维数组。
function region = fnGetRegion(C,I,J); % C is 256x256 image, I, J each range 1:8 to get 32x32 subregion of C region = C((I-1)*32+[1:32],(J-1)*32+[1:32]); end