Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sharpen image by blurring and then adding both images?

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. :-)