Hi guys, I would like to know ho to create a sliding window in a matrix. Thank you very much.

Antworten (1)

Image Analyst
Image Analyst am 19 Okt. 2015

0 Stimmen

You can use conv2() or imfilter(). For example:
windowWidth = 11;
kernel = ones(windowWidth, windowWidth) / windowWidth ^ 2;
smoothedImage = conv2(double(grayImage), kernel, 'same');

2 Kommentare

Le Dung
Le Dung am 25 Dez. 2018
Undefined function or variable 'grayImage'.
Walter Roberson
Walter Roberson am 25 Dez. 2018
Replace grayImage with the variable that stores your gray-scale image (not RGB)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Signal Processing Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 19 Okt. 2015

Kommentiert:

am 25 Dez. 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by