I am using 3 X 3 convolution matrix to obtain an sharpness image.

enter image description here

But the output result obtain from the above matrix is not much sharpen image. How to increase the sharpness of the image ?

Ya i am using same matrix.

common.getPixels(inputPath).then(function () {


           width: 3,
           height: 3, 
           kernel: [0,-1,0,-1,5,-1,0,-1,0]         

But the output generated is different. Need to get more sharpen image than the generated one.

enter image description here

  • 1
    $\begingroup$ Please include a sample of your image. The effectiveness of these filters depend on how sharp and noisy your original image is. An image sample will help others provide help. $\endgroup$ – Juancho Dec 27 '18 at 14:33

Probably you are doing something wrong.

Below few lines of matlab code demonstrates the filter kernel you have provided which improves the sharpness of an example image. Note that the kernel is a highpass filter and usually (but not always) highpass filters are used to improve sharpness of typical images...

I  = im2double(imread('Cameraman.tif'));
h2 = [0,-1,0;-1,5,-1;0,-1,0];
I2 = conv2(I,h2);
figure,imshow(I);title('original image')
figure,imshow(I2);title('Sharpened image');

with the result:

enter image description here


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.