Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
needed immediately highboost filter!

Subject: needed immediately highboost filter!

From: Regina

Date: 13 Mar, 2009 05:05:03

Message: 1 of 3

does anyone know how to code this in matlab?

i need to highboost all the high frequencies in a given 1xN vector.
the formula i found is:

Highboost = (A – 1) original + highpass

where A = 1

thanks!

Subject: needed immediately highboost filter!

From: srivastava tumuluri

Date: 13 Oct, 2009 02:43:07

Message: 2 of 3

%this the program written by me for high boost check it it may help you at-least little
clc;
clear;
disp('text input should be in single inverted comas');
filename=input('enter the file name ');
sir = imread(filename); % reading the image
s=imfinfo(filename);
rgb=strcmp(s.ColorType,'truecolor');
ind=strcmp(s.ColorType,'indexed');
if rgb==1
ir = rgb2gray(sir);
else
    if ind==1
        ir=ind2gray(sir,s.Colormap);
    else
        ir=sir;
    end
end
A=input('enter the value of A');
f=fspecial('laplacian');
cf=filter2(f,ir);
ir=double(ir);
 xl=(A-1)*ir+cf;
xl=uencode(xl,3);
ir=A*sir+xl;

subplot(1,2,1);
imshow(ir);
title('output')

subplot(1,2,2);
imshow(sir);
title('input')

Subject: needed immediately highboost filter!

From: ImageAnalyst

Date: 13 Oct, 2009 10:28:45

Message: 3 of 3

Yes. The standard answer is to just simply convolve with 17
surrounded by all -1's:
-1 -1 -1
-1 17 -1
-1 -1 -1
which is just the standard Laplacian
-1 -1 -1
-1 8 -1
-1 -1 -1
with the original image
0 0 0
0 9 0
0 0 0
added back in.
Use the conv2() function, but make sure that you divide the matrices
by 9 first. That will keep the mean intensity of the output image the
same value as the input image, because the kernel values will all sum
to 1.
You can adapt it to different window sizes if you want but the common
thing is that the kernel numbers (after the division by 9) need to add
to 1. The kernel will have a high positive central number surrounded
by negative numbers.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us