High pass filter in MATLAB

10 次查看(过去 30 天)
Hi,
I understand that high pass filter is essentially, orignal image - low pass filter.
I attempted the following but gotten a black screen. Anyone knows what when wrong? Thanks lots!
--CODE-
A=imread('image.jpg');
G=fspecial('gaussian', [50 50], 5);
Ig=imfilter(A,G,'same');
JK=A-Ig;
S=imshow(JK) >>> the output here is black image.

采纳的回答

Christian Lenz
Christian Lenz 2012-7-23
normalize image...
A = double( imread('image.jpg'));
A = A./max(max(max(A)));
keep the rest.
  5 个评论
Christian Lenz
Christian Lenz 2012-7-23
Or play with your parameters (thresholding)
Yvonne
Yvonne 2012-7-24
Thanks! I need to do mat2gray as well =)

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by