how i can implement lowpass filter on image using matlab

204 ビュー (過去 30 日間)
wissa amer
wissa amer 2013 年 5 月 15 日
回答済み: David Young 2014 年 9 月 16 日
how i can implement lowpass filter on image using matlab when we implement the fractal image compressin we need to do that ,how i can do it plz help me

回答 (3 件)

Image Analyst
Image Analyst 2013 年 5 月 21 日
One way is to just convolve with a kernel that has all positive weights, like a box filter:
boxKernel = ones(21,21); % Or whatever size window you want.
blurredImage = conv2(grayImage, boxKernel, 'same');
imfilter() does a similar (though not exact) thing. The more pointed the filter is in the middle, the less filtering it will do, and the bigger the window size, the more blurring it will do. For example, a Gaussian filter does less blurring (filtering) than a box filter of the same window size. A bigger box (e.g. 31 x 31) will blur more than a smaller one (e.g. 3 x 3).
You can do other, non-linear filters in the spatial domain. You can do linear filtering in the Fourier domain if you want to and have reason to, like you have known frequencies you want to remove, or you have a periodic structure you want to get rid of.
  3 件のコメント
ramin bba
ramin bba 2014 年 9 月 16 日
Dear Image Analyst,
Could you please upload your Fourier filtering demo?
tnx
Image Analyst
Image Analyst 2014 年 9 月 16 日
See attached.

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


David Young
David Young 2014 年 9 月 16 日
If you want to smooth with a Gaussian kernel, as already suggested, you might find gsmooth2, available here, helpful. It only does the equivalent of calling fspecial and imfilter, but it handles some of the details for you, which can be convenient.

Amith Kamath
Amith Kamath 2013 年 5 月 20 日
I am assuming you need to smooth (low pass) an image. These two functions are what you need to use:
and
specifically, the 'gaussian' filter.

カテゴリ

Help Center および File ExchangeImage Filtering and Enhancement についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by