Question

described above. (6 pts.) l Write a Matlab code to apply the high-boost filter to a medical image. (2 pt.)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

In image processing, it is often desirable to .emphasize high frequency components representing the image details without eliminating low frequency components (such as sharpening). Thus, the high-boost filter can be used to enhance high frequency component.

Please find required MATLAB code along with necessary details in comments:

clear all; clc; close all;

img=imread('spine.tif'); % load an image
para=5; % filter parameter value


f = double(img); % change the image to double

[m n]=size(f); % size of the image
J0 = f;

for i=3:m-2
for j=3:n-2
J0(i,j) = (-8*f(i,j))+(1*f(i-1,j))+(1*f(i+1,j))+(1*f(i,j-1))+(1*f(i,j+1))...
+(1*f(i-1,j-1))+(1*f(i+1,j+1))+(1*f(i-1,j+1))+(1*f(i+1,j-1));
end
end

% Apply Laplacian filter
I1 = f .* (para-1);
J1 = J0 + I1;

subplot(1,2,1)
imshow(img);
title('Original Image')

subplot(1,2,2)
imshow(uint8(J1));
title('High-boost Image')

----------------------------------- SCREENSHOT OF CODE

main-script·m + clear all clc: close all: img-imre ad ( ·spine. tif ) ; para 5: load an image filter parameter value f = double (img); % change the image to double [m -JO=f; n]=size (f); size of the image for i=3 : m-2 13 14 15 16 - 17 18 19 20 21 for i-3:n-2 J0 (i,j) (-8*f (1,j))+(1*t(1-1,j) ) + (1*t(1+1 , j )) + (1*t(1,J-1))+(1*t(1,jt1 ) ) = end end Apply Laplacian filter 11-f .* (para-1); JI -JO + 11; 23 24 25 26 27 28 29 subplot (1,2,1) imshow (img); title (Original Image) subplot (1,2,2) imshow (uint8 (J1)) title High-boost Image)

------------------------------------------------------ SAMPLE OUTPUT

Add a comment
Know the answer?
Add Answer to:
described above. (6 pts.) l Write a Matlab code to apply the high-boost filter to a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT