High pass filter in MATLAB

8 visualizzazioni (ultimi 30 giorni)
Yvonne
Yvonne il 23 Lug 2012
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.

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by