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!