Image Processing using Matlab: Sharpening Filter Without Using Inbuilt Matlab Function
Problem:
Implement the function SharpenImage(image, sigma, alpha) to sharpen an image. ”sigma” is the Gaussian standard deviation and alpha is the scale factor . Hint: Use SecondDerivImage.
Original Image |
Main Function:
clear
close all
input = imread('Yosemite.png');
input1=rgb2gray(input);
figure,imshow(input1),title('original');
im=SharpenImage(input1,1,5);
figure(3)
imshow(im), title('sharpened');
SharpenImage Function:
function[out]=SharpenImage(im3,sigma,alp)
im7=SecondDerivImage(im3,sigma);
im7=padarray(im7,[1,1],'replicate','pre');
im9=alp*im7;
size(im9)
size(im3)
out=im3-im9;
Sharpened Image
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home