Zia*_*Zia 1 c++ matlab window visual-c++ sliding
我是这个网站的新手,这是我的第一个查询...我需要简单的滑动窗口算法实现在c ++或matlab请帮助我在这方面谢谢
假设你需要一个通用的滑动窗口进行图像处理,你可以在Matlab中做到:
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
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
16729 次 |
最近记录: |