convolution

조회 수: 1 (최근 30일)
priya
priya 2011년 12월 9일
Would anyone be able to explain what this command does to an image?
fx =conv2(image1,[-1 1;1 1],'same');

답변 (1개)

Wayne King
Wayne King 2011년 12월 9일
Hi Priya, this implements bandpass filtering on an image.
If you have the Image Processing Toolbox, do:
h = [-1 1; 1 1];
freqz2(h);
You'll see that this is a bandpass filter (and as David Young correctly points out in his comment -- I incorrectly labeled it as highpass initially).
Contrast it with a lowpass filter:
Lo =[ -0.0106 0.0329 0.0308 -0.1870 -0.0280 0.6309 0.7148 0.2304];
Lo = Lo'*Lo;
freqz2(Lo);
Or a highpass filter
hi = [-0.2304 0.7148 -0.6309 -0.0280 0.1870 0.0308 -0.0329 -0.0106];
hi = hi'*hi;
freqz2(hi);
Thanks to David for his correction.
  댓글 수: 1
David Young
David Young 2011년 12월 9일
Doesn't it let through a lot of the DC component for a highpass filter? It's equal to 0.5 + [-1.5 0.5; 0.5 0.5] and while the second part of this is indeed highpass (but with a rather unusual asymmetrical form), having half the local mean added in surely makes it a kind of anisotropic bandpass, no?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Digital Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by