how to create a sliding window?
1 次查看(过去 30 天)
显示 更早的评论
Hi guys, I would like to know ho to create a sliding window in a matrix. Thank you very much.
0 个评论
回答(1 个)
Image Analyst
2015-10-19
You can use conv2() or imfilter(). For example:
windowWidth = 11;
kernel = ones(windowWidth, windowWidth) / windowWidth ^ 2;
smoothedImage = conv2(double(grayImage), kernel, 'same');
2 个评论
Walter Roberson
2018-12-25
Replace grayImage with the variable that stores your gray-scale image (not RGB)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Import, Export, and Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!