MATLAB Image Sharpening - Gaussian High Pass Filter using (1- Gaussian Low Pass Filter)

后端 未结 3 797
醉酒成梦
醉酒成梦 2021-01-16 11:16

I am trying to sharpen an image by designing a Gaussian High-Pass Filter. I would like to do this using the fact that the high-pass filter is equivalent to the identity matr

3条回答
  •  终归单人心
    2021-01-16 11:54

    Try this:

    H = padarray(2,[2 2]) - fspecial('gaussian' ,[5 5],2); % create unsharp mask
    

    1 is a scalar. You need a 5x5 array with one in the center. Furthermore, the filter elements must sum to one if you want to conserve brightness, so you need to double the central value to counter the amount you are subtracting.

提交回复
热议问题