【问题标题】:How to divide an image into 8 regions using Matlab如何使用Matlab将图像分成8个区域
【发布时间】:2012-05-03 06:40:12
【问题描述】:

我有 256x256 的图像,有没有简单的方法将它分成 8 个区域(32x32)并获得特定区域?例如:区域 4,6

【问题讨论】:

    标签: image-processing matlab


    【解决方案1】:

    图像存储为二维数组。

    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-23
      • 1970-01-01
      • 2021-06-26
      • 2023-03-23
      • 1970-01-01
      • 2010-12-10
      • 1970-01-01
      相关资源
      最近更新 更多