Ask Your Question

Sharpen image by blurring and then adding both images?

asked 2018-02-10 10:02:24 -0500

mrizp gravatar image

Hey everyone,

I am pretty new to image processing. Somewhere on the internet I came across a method to sharpen an image (and it actually works), but I do not understand, why it really works. Here is the code:

cv::Mat image = cv::imread(file);

cv::Mat gaussBlur;

GaussianBlur(image, gaussBlur, cv::Size(0,0), 3);

cv::addWeighted(image, 1.5, gaussBlur, -0.5, 0, image);

Why does subtracting 0.5 times the blurred image from 1.5 times the original image lead to a sharpened image?

Thank you for your help. :-)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-02-10 10:37:21 -0500

LBerger gravatar image

You must use frequency domain to understand your operation :

A gaussian filter is low pass filter. When you substract original and blurred image you amplify medium frequency (or high frequency)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-02-10 10:01:46 -0500

Seen: 6,759 times

Last updated: Feb 10 '18