how to encode a low pass filter to an image

1 回表示 (過去 30 日間)
hasan alhussaini
hasan alhussaini 2017 年 10 月 17 日
編集済み: Christoph F. 2017 年 10 月 17 日
Hi, I'm quite new to Matlab. im trying to write an encoded code to filter an image. i'm using the following filter code. filter = 1/9 * [1 1 1; 1 1 1; 1 1 1];
i get the message "matrix dimensions must agree", how would you go about filtering a whole image? do i have to loop it somehow? thanks
  3 件のコメント
hasan alhussaini
hasan alhussaini 2017 年 10 月 17 日
編集済み: KSSV 2017 年 10 月 17 日
image=checkerboard(100);
filter = 1/9 * [1 1 1; 1 1 1; 1 1 1];
filteredboard= image*filter
(my question is, how would you go about using the above filter on a image. in other words, would i have to loop it or somesort?)
Christoph F.
Christoph F. 2017 年 10 月 17 日
編集済み: Christoph F. 2017 年 10 月 17 日
Use the filter2() or the conv2() command to apply the filter.
The mathematical operation that applies a filter is convolution, not matrix/vector multiplication.

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

採用された回答

KSSV
KSSV 2017 年 10 月 17 日
You can do this using blocproc. Read about blocproc.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by