how to create a sliding window?

1 回表示 (過去 30 日間)
Andrea Finocchiaro
Andrea Finocchiaro 2015 年 10 月 19 日
コメント済み: Walter Roberson 2018 年 12 月 25 日
Hi guys, I would like to know ho to create a sliding window in a matrix. Thank you very much.

回答 (1 件)

Image Analyst
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 件のコメント
Le Dung
Le Dung 2018 年 12 月 25 日
Undefined function or variable 'grayImage'.
Walter Roberson
Walter Roberson 2018 年 12 月 25 日
Replace grayImage with the variable that stores your gray-scale image (not RGB)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by