滑动窗口

image = imread('image.png');
imageWidth = size(image, 2);
imageHeight = size(image, 1);

windowWidth = 32;
windowHeight = 32;

for j = 1:imageHeight - windowHeight + 1
for i = 1:imageWidth - windowWidth + 1
window = image(j:j + windowHeight - 1, i:i + windowWidth - 1, :);
% do stuff with subimage
end
end
posted @ 2012-04-01 11:01  hailong  阅读(396)  评论(0编辑  收藏  举报